Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / tconv / tconv.1
1 .\" @(#) mytinfo tconv.1 3.2 92/02/01 public domain, By Ross Ridge
2 .\" $FreeBSD: src/usr.bin/tconv/tconv.1,v 1.10.2.6 2002/06/21 15:29:26 charnier Exp $
3 .\" $DragonFly: src/usr.bin/tconv/Attic/tconv.1,v 1.2 2003/06/17 04:29:32 dillon Exp $
4 .\"
5 .Dd February 1, 1992
6 .Dt TCONV 1
7 .Os
8 .Sh NAME
9 .Nm tconv ,
10 .Nm tic ,
11 .Nm captoinfo
12 .Nd convert between termcap, terminfo source and terminfo binary
13 .Sh SYNOPSIS
14 .Nm
15 .Op Fl b
16 .Op Fl c Op Fl OUGd
17 .Op Fl i
18 .Op Fl B Op Fl D Ar dir
19 .Op Fl I
20 .Op Fl k
21 .Op Fl V
22 .Op Fl t Ar term
23 .Op Ar file
24 .Nm tic
25 .Op Ar file
26 .Nm captoinfo
27 .Op Fl t Ar term
28 .Op Fl OUGdk
29 .Op Ar file
30 .Sh DESCRIPTION
31 The
32 .Nm
33 utility converts between the three terminal descriptions,
34 termcap, terminfo source, and terminfo binary,
35 that the
36 .Em tinfo
37 library uses.
38 It performs the same functions of
39 .Xr captoinfo 1
40 and
41 .Xr tic 1
42 of System V.
43 It also can be used to generate a terminfo source listing from a terminfo
44 binary, one of the functions of System V's
45 .Xr infocmp 1 .
46 .Pp
47 Translation options:
48 .Bl -tag -width indent
49 .It Fl c
50 Convert from termcap.
51 .It Fl i
52 Convert from terminfo source.
53 .It Fl b
54 Convert from terminfo binary.
55 .It Fl B
56 Convert to terminfo binary.
57 .It Fl I
58 Convert to terminfo source.
59 .El
60 .Pp
61 If a file is specified, one of
62 .Fl c
63 or
64 .Fl i
65 must specified and the whole file while be translated.
66 If no file is specified then the input options will only restrict looking
67 for the terminal to be translated in places likely have descriptions
68 of the desired type
69 (ie. with the
70 .Fl c
71 option in the
72 .Ev TERMCAP
73 environment variable, and in
74 .Pa /usr/share/misc/termcap ,
75 with the
76 .Fl i
77 option in the
78 .Ev TERMINFO
79 environment variable, and in
80 .Pa /usr/lib/terminfo ) ,
81 otherwise
82 .Nm
83 will look in all available databases.
84 If neither
85 .Fl I
86 or
87 .Fl B
88 are given the
89 .Fl I
90 option will be assumed.
91 If the
92 .Fl B
93 option is used, the compiled output will be put in the
94 terminfo database, otherwise standard output is used.
95 .Pp
96 You cannot translate from terminfo binary to terminfo binary.
97 Translating from terminfo source to terminfo source is possible,
98 but not of much use in most cases, as
99 .Em use=
100 fields will be followed and incorporated into the output terminal
101 description.
102 .Pp
103 The
104 .Nm
105 utility should be able translate all standard termcap parameterized strings
106 terminfo format, but complex strings using GNU's %a code may be
107 too hard to translate.
108 If
109 .Nm
110 thinks a termcap string is already in terminfo format (if a %p
111 code appears in the string), it won't try to translate it.
112 String capabilities that don't take parameters won't be translated.
113 .Pp
114 Termcap options: the following options are available when translating termcap
115 entries
116 .Fl ( c
117 option is used).
118 .Bl -tag -width indent
119 .It Fl d
120 Don't supply any defaults for missing capabilities.
121 .It Fl O
122 Include obsolete termcap capabilities.
123 .It Fl G
124 Include GNU capabilities.
125 .It Fl U
126 Include UW capabilities.
127 .El
128 .Pp
129 Other options:
130 .Bl -tag -width indent
131 .It Fl k
132 Keep comments when translating a file.
133 .It Fl V
134 Print version information and exit.
135 .It Fl D Ar dir
136 Directory to put terminfo binaries in.
137 .It Fl t Ar term
138 Terminal name to translate.
139 .El
140 .Pp
141 If no terminal specified with the
142 .Fl t
143 option, then the terminal name to translate will be taken from the
144 environment variable
145 .Ev TERM .
146 .Sh FILES
147 .Bl -tag -width /usr/lib/terminfo/terminfo.src -compact
148 .It Pa /usr/lib/terminfo
149 The default location to get and put terminfo binaries.
150 .It Pa /usr/lib/terminfo/terminfo.src
151 The default filename of the terminfo source file.
152 .It Pa /etc/termcap
153 The default filename of the termcap database.
154 .El
155 .Sh SEE ALSO
156 .Xr curses 3 ,
157 .Xr termcap 3 ,
158 .Xr term 5 ,
159 .Xr termcap 5 ,
160 .Xr terminfo 5
161 .Sh DIAGNOSTICS
162 The line number of a warning message when translating a file
163 may refer to the last line of an entry instead of the line in the entry
164 that generated the warning.
165 .Sh BUGS
166 More warning messages could be generated.
167 The
168 .Nm
169 utility can't translate to termcap.  Binaries generated will have canceled
170 capabilities marked as canceled, which is incompatible with
171 System V Release 2.0 terminfo.