version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
infocmp |
|
|
2 |
!!!infocmp |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
FILES |
|
|
7 |
EXTENSIONS |
|
|
8 |
BUGS |
|
|
9 |
SEE ALSO |
|
|
10 |
AUTHOR |
|
|
11 |
---- |
|
|
12 |
!!NAME |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
__infocmp__ - compare or print out ''terminfo'' descriptions |
|
|
16 |
!!SYNOPSIS |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
__infocmp__ [[__-dceEGgnpqrILCuV1__] [[__-v__ |
|
|
20 |
''n''] [[__-s d__| __i__| __l__| __c__] |
|
|
21 |
[[__-w__ ''width''] [[__-A__ ''directory''] |
|
|
22 |
[[__-B__ ''directory''] |
|
|
23 |
[[''termname''...] |
|
|
24 |
!!DESCRIPTION |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
__infocmp__ can be used to compare a binary |
|
|
28 |
__terminfo__ entry with other terminfo entries, rewrite a |
|
|
29 |
__terminfo__ description to take advantage of the |
|
|
30 |
__use=__ terminfo field, or print out a __terminfo__ |
|
|
31 |
description from the binary file (__term__) in a variety |
|
|
32 |
of formats. In all cases, the boolean fields will be printed |
|
|
33 |
first, followed by the numeric fields, followed by the |
|
|
34 |
string fields. |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
__Default Options__ |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
If no options are specified and zero or one ''termnames'' |
|
|
41 |
are specified, the __-I__ option will be assumed. If more |
|
|
42 |
than one ''termname'' is specified, the __-d__ option |
|
|
43 |
will be assumed. |
|
|
44 |
|
|
|
45 |
|
|
|
46 |
__Comparison Options [[-d] [[-c] [[-n]__ |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
__infocmp__ compares the __terminfo__ description of |
|
|
50 |
the first terminal ''termname'' with each of the |
|
|
51 |
descriptions given by the entries for the other terminal's |
|
|
52 |
''termnames''. If a capability is defined for only one of |
|
|
53 |
the terminals, the value returned will depend on the type of |
|
|
54 |
the capability: __F__ for boolean variables, __-1__ |
|
|
55 |
for integer variables, and __NULL__ for string |
|
|
56 |
variables. |
|
|
57 |
|
|
|
58 |
|
|
|
59 |
The __-d__ option produces a list of each capability that |
|
|
60 |
is different between two entries. This option is useful to |
|
|
61 |
show the difference between two entries, created by |
|
|
62 |
different people, for the same or similar |
|
|
63 |
terminals. |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
The __-c__ option produces a list of each capability that |
|
|
67 |
is common between two entries. Capabilities that are not set |
|
|
68 |
are ignored. This option can be used as a quick check to see |
|
|
69 |
if the __-u__ option is worth using. |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
The __-n__ option produces a list of each capability that |
|
|
73 |
is in neither entry. If no ''termnames'' are given, the |
|
|
74 |
environment variable __TERM__ will be used for both of |
|
|
75 |
the ''termnames''. This can be used as a quick check to |
|
|
76 |
see if anything was left out of a description. |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
__Source Listing Options [[-I] [[-L] [[-C] |
|
|
80 |
[[-r]__ |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
The __-I__, __-L__, and __-C__ options will produce |
|
|
84 |
a source listing for each terminal named. |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
If no ''termnames'' are given, the environment variable __TERM__ will be used for the terminal name. |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
The source produced by the __-C__ option may be used |
|
|
91 |
directly as a __termcap__ entry, but not all |
|
|
92 |
parameterized strings can be changed to the __termcap__ |
|
|
93 |
format. __infocmp__ will attempt to convert most of the |
|
|
94 |
parameterized information, and anything not converted will |
|
|
95 |
be plainly marked in the output and commented out. These |
|
|
96 |
should be edited by hand. |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
All padding information for strings will be collected |
|
|
100 |
together and placed at the beginning of the string where |
|
|
101 |
__termcap__ expects it. Mandatory padding (padding |
|
|
102 |
information with a trailing '/') will become |
|
|
103 |
optional. |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
All __termcap__ variables no longer supported by |
|
|
107 |
__terminfo__, but which are derivable from other |
|
|
108 |
__terminfo__ variables, will be output. Not all |
|
|
109 |
__terminfo__ capabilities will be translated; only those |
|
|
110 |
variables which were part of __termcap__ will normally be |
|
|
111 |
output. Specifying the __-r__ option will take off this |
|
|
112 |
restriction, allowing all capabilities to be output in |
|
|
113 |
''termcap'' form. |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
Note that because padding is collected to the beginning of |
|
|
117 |
the capability, not all capabilities are output. Mandatory |
|
|
118 |
padding is not supported. Because __termcap__ strings are |
|
|
119 |
not as flexible, it is not always possible to convert a |
|
|
120 |
__terminfo__ string capability into an equivalent |
|
|
121 |
__termcap__ format. A subsequent conversion of the |
|
|
122 |
__termcap__ file back into __terminfo__ format will |
|
|
123 |
not necessarily reproduce the original __terminfo__ |
|
|
124 |
source. |
|
|
125 |
|
|
|
126 |
|
|
|
127 |
Some common __terminfo__ parameter sequences, their |
|
|
128 |
__termcap__ equivalents, and some terminal types which |
|
|
129 |
commonly have such sequences, are: |
|
|
130 |
|
|
|
131 |
|
|
|
132 |
__Use= Option [[-u]__ |
|
|
133 |
|
|
|
134 |
|
|
|
135 |
The __-u__ option produces a __terminfo__ source |
|
|
136 |
description of the first terminal ''termname'' which is |
|
|
137 |
relative to the sum of the descriptions given by the entries |
|
|
138 |
for the other terminals ''termnames''. It does this by |
|
|
139 |
analyzing the differences between the first ''termname'' |
|
|
140 |
and the other ''termnames'' and producing a description |
|
|
141 |
with __use=__ fields for the other terminals. In this |
|
|
142 |
manner, it is possible to retrofit generic terminfo entries |
|
|
143 |
into a terminal's description. Or, if two similar terminals |
|
|
144 |
exist, but were coded at different times or by different |
|
|
145 |
people so that each description is a full description, using |
|
|
146 |
__infocmp__ will show what can be done to change one |
|
|
147 |
description to be relative to the other. |
|
|
148 |
|
|
|
149 |
|
|
|
150 |
A capability will get printed with an at-sign (@) if it no |
|
|
151 |
longer exists in the first ''termname'', but one of the |
|
|
152 |
other ''termname'' entries contains a value for it. A |
|
|
153 |
capability's value gets printed if the value in the first |
|
|
154 |
''termname'' is not found in any of the other |
|
|
155 |
''termname'' entries, or if the first of the other |
|
|
156 |
''termname'' entries that has this capability gives a |
|
|
157 |
different value for the capability than that in the first |
|
|
158 |
''termname''. |
|
|
159 |
|
|
|
160 |
|
|
|
161 |
The order of the other ''termname'' entries is |
|
|
162 |
significant. Since the terminfo compiler __tic__ does a |
|
|
163 |
left-to-right scan of the capabilities, specifying two |
|
|
164 |
__use=__ entries that contain differing entries for the |
|
|
165 |
same capabilities will produce different results depending |
|
|
166 |
on the order that the entries are given in. __infocmp__ |
|
|
167 |
will flag any such inconsistencies between the other |
|
|
168 |
''termname'' entries as they are found. |
|
|
169 |
|
|
|
170 |
|
|
|
171 |
Alternatively, specifying a capability ''after'' a |
|
|
172 |
__use=__ entry that contains that capability will cause |
|
|
173 |
the second specification to be ignored. Using __infocmp__ |
|
|
174 |
to recreate a description can be a useful check to make sure |
|
|
175 |
that everything was specified correctly in the original |
|
|
176 |
source description. |
|
|
177 |
|
|
|
178 |
|
|
|
179 |
Another error that does not cause incorrect compiled files, |
|
|
180 |
but will slow down the compilation time, is specifying extra |
|
|
181 |
__use=__ fields that are superfluous. __infocmp__ will |
|
|
182 |
flag any other ''termname use='' fields that were not |
|
|
183 |
needed. |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
__Changing Databases [[-A__ ''directory''] [[-B |
|
|
187 |
''directory''] |
|
|
188 |
|
|
|
189 |
|
|
|
190 |
The location of the compiled __terminfo__ database is |
|
|
191 |
taken from the environment variable __TERMINFO__ . If the |
|
|
192 |
variable is not defined, or the terminal is not found in |
|
|
193 |
that location, the system __terminfo__ database, in |
|
|
194 |
__/usr/share/terminfo__, will be used. The options |
|
|
195 |
__-A__ and __-B__ may be used to override this |
|
|
196 |
location. The __-A__ option will set __TERMINFO__ for |
|
|
197 |
the first ''termname'' and the __-B__ option will set |
|
|
198 |
__TERMINFO__ for the other ''termnames''. With this, |
|
|
199 |
it is possible to compare descriptions for a terminal with |
|
|
200 |
the same name located in two different databases. This is |
|
|
201 |
useful for comparing descriptions for the same terminal |
|
|
202 |
created by different people. |
|
|
203 |
|
|
|
204 |
|
|
|
205 |
__Other Options [[-s d|i|l|c] [[-1FTVefip] [[-Rsubset] [[-v__ |
|
|
206 |
''n''] [[-w ''width''] |
|
|
207 |
|
|
|
208 |
|
|
|
209 |
The __-s__ option sorts the fields within each type |
|
|
210 |
according to the argument below: |
|
|
211 |
|
|
|
212 |
|
|
|
213 |
__d__ |
|
|
214 |
|
|
|
215 |
|
|
|
216 |
leave fields in the order that they are stored in the |
|
|
217 |
''terminfo'' database. |
|
|
218 |
|
|
|
219 |
|
|
|
220 |
__i__ |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
sort by ''terminfo'' name. |
|
|
224 |
|
|
|
225 |
|
|
|
226 |
__l__ |
|
|
227 |
|
|
|
228 |
|
|
|
229 |
sort by the long C variable name. |
|
|
230 |
|
|
|
231 |
|
|
|
232 |
__c__ |
|
|
233 |
|
|
|
234 |
|
|
|
235 |
sort by the ''termcap'' name. |
|
|
236 |
|
|
|
237 |
|
|
|
238 |
If the __-s__ option is not given, the fields printed out |
|
|
239 |
will be sorted alphabetically by the __terminfo__ name |
|
|
240 |
within each type, except in the case of the __-C__ or the |
|
|
241 |
__-L__ options, which cause the sorting to be done by the |
|
|
242 |
__termcap__ name or the long C variable name, |
|
|
243 |
respectively. |
|
|
244 |
|
|
|
245 |
|
|
|
246 |
__-1__ |
|
|
247 |
|
|
|
248 |
|
|
|
249 |
causes the fields to be printed out one to a line. |
|
|
250 |
Otherwise, the fields will be printed several to a line to a |
|
|
251 |
maximum width of 60 characters. |
|
|
252 |
|
|
|
253 |
|
|
|
254 |
__-F__ |
|
|
255 |
|
|
|
256 |
|
|
|
257 |
compare terminfo files. This assumes that two following |
|
|
258 |
arguments are filenames. The files are searched for pairwise |
|
|
259 |
matches between entries, with two entries considered to |
|
|
260 |
match if any of their names do. The report printed to |
|
|
261 |
standard output lists entries with no matches in the other |
|
|
262 |
file, and entries with more than one match. For entries with |
|
|
263 |
exactly one match it includes a difference report. Normally, |
|
|
264 |
to reduce the volume of the report, use references are not |
|
|
265 |
resolved before looking for differences, but resolution can |
|
|
266 |
be forced by also specifying __-r__. |
|
|
267 |
|
|
|
268 |
|
|
|
269 |
__-G__ |
|
|
270 |
|
|
|
271 |
|
|
|
272 |
Display constant literals in decimal form rather than their |
|
|
273 |
character equivalents. |
|
|
274 |
|
|
|
275 |
|
|
|
276 |
__-a__ |
|
|
277 |
|
|
|
278 |
|
|
|
279 |
tells __infocmp__ to retain commented-out capabilities |
|
|
280 |
rather than discarding them. Capabilities are commented by |
|
|
281 |
prefixing them with a period. |
|
|
282 |
|
|
|
283 |
|
|
|
284 |
__-q__ |
|
|
285 |
|
|
|
286 |
|
|
|
287 |
Make the comparison listing shorter by omitting subheadings, |
|
|
288 |
and using |
|
|
289 |
|
|
|
290 |
|
|
|
291 |
__-R__''subset'' |
|
|
292 |
|
|
|
293 |
|
|
|
294 |
Restrict output to a given subset. This option is for use |
|
|
295 |
with archaic versions of terminfo like those on SVr1, |
|
|
296 |
Ultrix, or HP/UX that do not support the full set of |
|
|
297 |
SVR4/XSI Curses terminfo; and variants such as AIX that have |
|
|
298 |
their own extensions incompatible with SVr4/XSI. Available |
|
|
299 |
terminfo subsets are |
|
|
300 |
terminfo__(5) |
|
|
301 |
for details. You can also choose the subset |
|
|
302 |
__ |
|
|
303 |
|
|
|
304 |
|
|
|
305 |
__-T__ |
|
|
306 |
|
|
|
307 |
|
|
|
308 |
eliminates size-restrictions on the generated text. This is |
|
|
309 |
mainly useful for testing and analysis, since the compiled |
|
|
310 |
descriptions are limited (e.g., 1023 for termcap, 4096 for |
|
|
311 |
terminfo). |
|
|
312 |
|
|
|
313 |
|
|
|
314 |
__-V__ |
|
|
315 |
|
|
|
316 |
|
|
|
317 |
reports the version of ncurses which was used in this |
|
|
318 |
program, and exits. |
|
|
319 |
|
|
|
320 |
|
|
|
321 |
__-e__ |
|
|
322 |
|
|
|
323 |
|
|
|
324 |
Dump the capabilities of the given terminal as a C |
|
|
325 |
initializer for a TERMTYPE structure (the terminal |
|
|
326 |
capability structure in the ____). This |
|
|
327 |
option is useful for preparing versions of the curses |
|
|
328 |
library hardwired for a given terminal type. |
|
|
329 |
|
|
|
330 |
|
|
|
331 |
__-E__ |
|
|
332 |
|
|
|
333 |
|
|
|
334 |
Dump the capabilities of the given terminal as tables, |
|
|
335 |
needed in the C initializer for a TERMTYPE structure (the |
|
|
336 |
terminal capability structure in the ____). |
|
|
337 |
This option is useful for preparing versions of the curses |
|
|
338 |
library hardwired for a given terminal type. The tables are |
|
|
339 |
all declared static, and are named according to the type and |
|
|
340 |
the name of the corresponding terminal entry. |
|
|
341 |
|
|
|
342 |
|
|
|
343 |
Before ncurses 5.0, the split between the __-e__ and |
|
|
344 |
__-E__ options was not needed; but support for extended |
|
|
345 |
names required making the arrays of terminal capabilities |
|
|
346 |
separate from the TERMTYPE structure. |
|
|
347 |
|
|
|
348 |
|
|
|
349 |
__-f__ |
|
|
350 |
|
|
|
351 |
|
|
|
352 |
Display complex terminfo strings which contain |
|
|
353 |
if/then/else/endif expressions indented for |
|
|
354 |
readability. |
|
|
355 |
|
|
|
356 |
|
|
|
357 |
__-g__ |
|
|
358 |
|
|
|
359 |
|
|
|
360 |
Display constant character literals in quoted form rather |
|
|
361 |
than their decimal equivalents. |
|
|
362 |
|
|
|
363 |
|
|
|
364 |
__-i__ |
|
|
365 |
|
|
|
366 |
|
|
|
367 |
Analyze the initialization (__is1__, __is2__, |
|
|
368 |
__is3__), and reset (__rs1__, __rs2__, __rs3__), |
|
|
369 |
strings in the entry. For each string, the code tries to |
|
|
370 |
analyze it into actions in terms of the other capabilities |
|
|
371 |
in the entry, certain X3.64/ISO 6429/ECMA-48 capabilities, |
|
|
372 |
and certain DEC VT-series private modes (the set of |
|
|
373 |
recognized special sequences has been selected for |
|
|
374 |
completeness over the existing terminfo database). Each |
|
|
375 |
report line consists of the capability name, followed by a |
|
|
376 |
colon and space, followed by a printable expansion of the |
|
|
377 |
capability string with sections matching recognized actions |
|
|
378 |
translated into {}-bracketed descriptions. Here is a list of |
|
|
379 |
the DEC/ANSI special sequences recognized: |
|
|
380 |
|
|
|
381 |
|
|
|
382 |
It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set Graphics Rendition, with the values NORMAL, BOLD, UNDERLINE, BLINK, and REVERSE. All but NORMAL may be prefixed with `+' (turn on) or `-' (turn off). |
|
|
383 |
|
|
|
384 |
|
|
|
385 |
An SGR0 designates an empty highlight sequence (equivalent |
|
|
386 |
to {SGR:NORMAL}). |
|
|
387 |
|
|
|
388 |
|
|
|
389 |
__-p__ |
|
|
390 |
|
|
|
391 |
|
|
|
392 |
Ignore padding specifications when comparing |
|
|
393 |
strings. |
|
|
394 |
|
|
|
395 |
|
|
|
396 |
__-v__ ''n'' |
|
|
397 |
|
|
|
398 |
|
|
|
399 |
prints out tracing information on standard error as the |
|
|
400 |
program runs. Higher values of n induce greater |
|
|
401 |
verbosity. |
|
|
402 |
|
|
|
403 |
|
|
|
404 |
__-w__ ''width'' |
|
|
405 |
|
|
|
406 |
|
|
|
407 |
changes the output to ''width'' characters. |
|
|
408 |
!!FILES |
|
|
409 |
|
|
|
410 |
|
|
|
411 |
/usr/share/terminfo |
|
|
412 |
|
|
|
413 |
|
|
|
414 |
Compiled terminal description database. |
|
|
415 |
!!EXTENSIONS |
|
|
416 |
|
|
|
417 |
|
|
|
418 |
The __-E__, __-F__, __-G__, __-R__, __-T__, |
|
|
419 |
__-V__, __-a__, __-e__, __-f__, __-g__, |
|
|
420 |
__-i__, __-p__, and __-q__ options are not |
|
|
421 |
supported in SVr4 curses. |
|
|
422 |
|
|
|
423 |
|
|
|
424 |
The __-r__ option's notion of `termcap' capabilities is |
|
|
425 |
System V Release 4's. Actual BSD curses versions will have a |
|
|
426 |
more restricted set. To see only the 4.4BSD set, use -r |
|
|
427 |
-RBSD. |
|
|
428 |
!!BUGS |
|
|
429 |
|
|
|
430 |
|
|
|
431 |
The -F option of __infocmp__(1M) should be a |
|
|
432 |
__toe__(1M) mode. |
|
|
433 |
!!SEE ALSO |
|
|
434 |
|
|
|
435 |
|
|
|
436 |
__infocmp__(1M), __captoinfo__(1M), |
|
|
437 |
__infotocap__(1M), __tic__(1M), __toe__(1M), |
|
|
438 |
__curses__(3X), terminfo(5). |
|
|
439 |
!!AUTHOR |
|
|
440 |
|
|
|
441 |
|
|
|
442 |
Eric S. Raymond |
|
|
443 |
---- |