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