1infocmp(1M) System Administration Commands infocmp(1M)
2
3
4
6 infocmp - compare or print out terminfo descriptions
7
9 /usr/bin/infocmp [-d] [-c] [-n] [-I] [-L] [-C] [-r] [-u]
10 [-s | d | i | l | c] [-v] [-V] [-1] [-w width]
11 [-A directory] [-B directory] [termname]...
12
13
15 infocmp compares a binary terminfo entry with other terminfo entries,
16 rewrites a terminfo description to take advantage of the use= terminfo
17 field, or prints out a terminfo description from the binary file ( term
18 ) in a variety of formats. It displays boolean fields first, then
19 numeric fields, followed by the string fields. If no options are speci‐
20 fied and zero, or one termname is specified, the -I option is assumed.
21 If more than one termname is specified, the -d option is assumed.
22
24 The -d , -c , and -n options can be used for comparisons. infocmp com‐
25 pares the terminfo description of the first terminal termname with each
26 of the descriptions given by the entries for the other terminal's
27 termname. If a capability is defined for only one of the terminals, the
28 value returned will depend on the type of the capability: F for boolean
29 variables, −1 for integer variables, and NULL for string variables.
30
31 -d Produce a list of each capability that is different between two
32 entries. This option is useful to show the difference between two
33 entries, created by different people, for the same or similar
34 terminals.
35
36
37 -c Produce a list of each capability that is common between two
38 entries. Capabilities that are not set are ignored. This option
39 can be used as a quick check to see if the -u option is worth
40 using.
41
42
43 -n Produce a list of each capability that is in neither entry. If no
44 termname is given, the environment variable TERM will be used for
45 both of the termnames. This can be used as a quick check to see
46 if anything was left out of a description.
47
48
49
50 The -I , -L , and -C options will produce a source listing for each
51 terminal named.
52
53 -I Use the terminfo names.
54
55
56 -L Use the long C variable name listed in < term.h >.
57
58
59 -C Use the termcap names. The source produced by the -C option may
60 be used directly as a termcap entry, but not all of the parame‐
61 terized strings may be changed to the termcap format. infocmp
62 will attempt to convert most of the parameterized information,
63 but anything not converted will be plainly marked in the output
64 and commented out. These should be edited by hand.
65
66
67 -r When using -C , put out all capabilities in termcap form.
68
69
70
71 If no termname is given, the environment variable TERM will be used for
72 the terminal name.
73
74
75 All padding information for strings will be collected together and
76 placed at the beginning of the string where termcap expects it. Manda‐
77 tory padding (padding information with a trailing '/') will become
78 optional.
79
80
81 All termcap variables no longer supported by terminfo , but are deriv‐
82 able from other terminfo variables, will be displayed. Not all ter‐
83 minfo capabilities will be translated; only those variables which were
84 part of termcap will normally be displayed. Specifying the -r option
85 will take off this restriction, allowing all capabilities to be dis‐
86 played in termcap form.
87
88
89 Note that because padding is collected to the beginning of the capabil‐
90 ity, not all capabilities are displayed. Mandatory padding is not sup‐
91 ported. Because termcap strings are not as flexible, it is not always
92 possible to convert a terminfo string capability into an equivalent
93 termcap format. A subsequent conversion of the termcap file back into
94 terminfo format will not necessarily reproduce the original terminfo
95 source.
96
97
98 Some common terminfo parameter sequences, their termcap equivalents,
99 and some terminal types which commonly have such sequences, are:
100
101 terminfo termcap Representative Terminals
102 %p1%c %. adm
103 %p1%d %d hp, ANSI standard, vt100
104 %p1%'x'%+%c %+x concept
105 %i %i ANSI standard, vt100
106 %p1%?%'x'%>%t%p1%'y'%+%; %>xy concept
107 %p2 is printed before %p1 %r hp
108
109
110
111 -u Produce a terminfo source description of the first terminal
112 termname which is relative to the sum of the descriptions given
113 by the entries for the other terminals' termnames. It does this
114 by analyzing the differences between the first termname and the
115 other termnames and producing a description with use= fields for
116 the other terminals. In this manner, it is possible to retrofit
117 generic terminfo entries into a terminal's description. Or, if
118 two similar terminals exist, but were coded at different times,
119 or by different people so that each description is a full
120 description, using infocmp will show what can be done to change
121 one description to be relative to the other.
122
123
124
125 A capability is displayed with an at-sign (@) if it no longer exists in
126 the first termname, but one of the other termname entries contains a
127 value for it. A capability's value is displayed if the value in the
128 first termname is not found in any of the other termname entries, or if
129 the first of the other termname entries that has this capability gives
130 a different value for that capability.
131
132
133 The order of the other termname entries is significant. Since the ter‐
134 minfo compiler tic does a left-to-right scan of the capabilities, spec‐
135 ifying two use= entries that contain differing entries for the same
136 capabilities will produce different results, depending on the order in
137 which the entries are given. infocmp will flag any such inconsistencies
138 between the other termname entries as they are found.
139
140
141 Alternatively, specifying a capability after a use= entry that con‐
142 tains, it will cause the second specification to be ignored. Using
143 infocmp to recreate a description can be a useful check to make sure
144 that everything was specified correctly in the original source descrip‐
145 tion.
146
147
148 Another error that does not cause incorrect compiled files, but will
149 slow down the compilation time, is specifying superfluous use= fields.
150 infocmp will flag any superfluous use= fields.
151
152 -s Sorts the fields within each type according to the argument
153 below:
154
155 d Leave fields in the order that they are stored in the
156 terminfo database.
157
158
159 i Sort by terminfo name.
160
161
162 l Sort by the long C variable name.
163
164
165 c Sort by the termcap name.
166
167 If the -s option is not given, the fields are sorted alpha‐
168 betically by the terminfo name within each type, except in
169 the case of the -C or the -L options, which cause the sort‐
170 ing to be done by the termcap name or the long C variable
171 name, respectively.
172
173
174 -v Print out tracing information on standard error as the pro‐
175 gram runs.
176
177
178 -V Print out the version of the program in use on standard
179 error and exit.
180
181
182 −1 Print the fields one to a line. Otherwise, the fields are
183 printed several to a line to a maximum width of 60 charac‐
184 ters.
185
186
187 -wwidth Changes the output to width characters.
188
189
190
191 The location of the compiled terminfo database is taken from the envi‐
192 ronment variable TERMINFO . If the variable is not defined, or the ter‐
193 minal is not found in that location, the system terminfo database, usu‐
194 ally in /usr/share/lib/terminfo, is used. The options -A and -B may be
195 used to override this location.
196
197 -A directory Set TERMINFO for the first termname.
198
199
200 -B directory Set TERMINFO for the other termnames. With this, it is
201 possible to compare descriptions for a terminal with
202 the same name located in two different databases. This
203 is useful for comparing descriptions for the same ter‐
204 minal created by different people.
205
206
208 /usr/share/lib/terminfo/?/*
209
210 Compiled terminal description database.
211
212
214 See attributes(5) for descriptions of the following attributes:
215
216
217
218
219 ┌─────────────────────────────┬─────────────────────────────┐
220 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
221 ├─────────────────────────────┼─────────────────────────────┤
222 │Availability │SUNWcsu │
223 └─────────────────────────────┴─────────────────────────────┘
224
226 captoinfo(1M), tic(1M), curses(3CURSES), terminfo(4), attributes(5)
227
228
229
230SunOS 5.11 5 Jul 1990 infocmp(1M)