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