source: trunk/ncurses/man/infocmp.1m@ 2787

Last change on this file since 2787 was 2621, checked in by bird, 19 years ago

GNU ncurses 5.5

File size: 16.6 KB
Line 
1'\" t
2.\"***************************************************************************
3.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
4.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
30.\" $Id: infocmp.1m,v 1.39 2004/08/28 22:43:49 tom Exp $
31.TH infocmp 1M ""
32.ds n 5
33.ds d @TERMINFO@
34.SH NAME
35\fBinfocmp\fR - compare or print out \fIterminfo\fR descriptions
36.SH SYNOPSIS
37\fBinfocmp\fR [\fB-\
381\
39C\
40E\
41F\
42G\
43I\
44L\
45T\
46V\
47c\
48d\
49e\
50g\
51i\
52l\
53n\
54p\
55q\
56r\
57t\
58u\
59x\
60\fR]
61.br
62 [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB-R \fR\fBsubset\fR]
63.br
64 [\fB-w\fR\ \fIwidth\fR] [\fB-A\fR\ \fIdirectory\fR] [\fB-B\fR\ \fIdirectory\fR]
65.br
66 [\fItermname\fR...]
67.SH DESCRIPTION
68\fBinfocmp\fR can be used to compare a binary \fBterminfo\fR entry with other
69terminfo entries, rewrite a \fBterminfo\fR description to take advantage of the
70\fBuse=\fR terminfo field, or print out a \fBterminfo\fR description from the
71binary file (\fBterm\fR) in a variety of formats. In all cases, the boolean
72fields will be printed first, followed by the numeric fields, followed by the
73string fields.
74.SS Default Options
75If no options are specified and zero or one \fItermnames\fR are specified, the
76\fB-I\fR option will be assumed. If more than one \fItermname\fR is specified,
77the \fB-d\fR option will be assumed.
78.SS Comparison Options [-d] [-c] [-n]
79\fBinfocmp\fR compares the \fBterminfo\fR description of the first terminal
80\fItermname\fR with each of the descriptions given by the entries for the other
81terminal's \fItermnames\fR. If a capability is defined for only one of the
82terminals, the value returned will depend on the type of the capability:
83\fBF\fR for boolean variables, \fB-1\fR for integer variables, and \fBNULL\fR
84for string variables.
85
86The \fB-d\fR option produces a list of each capability that is different
87between two entries. This option is useful to show the difference between two
88entries, created by different people, for the same or similar terminals.
89
90The \fB-c\fR option produces a list of each capability that is common between
91two entries. Capabilities that are not set are ignored. This option can be
92used as a quick check to see if the \fB-u\fR option is worth using.
93
94The \fB-n\fR option produces a list of each capability that is in neither
95entry. If no \fItermnames\fR are given, the environment variable \fBTERM\fR
96will be used for both of the \fItermnames\fR. This can be used as a quick
97check to see if anything was left out of a description.
98.SS Source Listing Options [-I] [-L] [-C] [-r]
99The \fB-I\fR, \fB-L\fR, and \fB-C\fR options will produce a source listing for
100each terminal named.
101
102.TS
103center tab(/) ;
104l l .
105\fB-I\fR/use the \fBterminfo\fR names
106\fB-L\fR/use the long C variable name listed in <\fBterm.h\fR>
107\fB-C\fR/use the \fBtermcap\fR names
108\fB-r\fR/when using \fB-C\fR, put out all capabilities in \fBtermcap\fR form
109.TE
110
111If no \fItermnames\fR are given, the environment variable \fBTERM\fR will be
112used for the terminal name.
113
114The source produced by the \fB-C\fR option may be used directly as a
115\fBtermcap\fR entry, but not all parameterized strings can be changed to
116the \fBtermcap\fR format. \fBinfocmp\fR will attempt to convert most of the
117parameterized information, and anything not converted will be plainly marked in
118the output and commented out. These should be edited by hand.
119
120All padding information for strings will be collected together and placed
121at the beginning of the string where \fBtermcap\fR expects it. Mandatory
122padding (padding information with a trailing '/') will become optional.
123
124All \fBtermcap\fR variables no longer supported by \fBterminfo\fR, but which
125are derivable from other \fBterminfo\fR variables, will be output. Not all
126\fBterminfo\fR capabilities will be translated; only those variables which were
127part of \fBtermcap\fR will normally be output. Specifying the \fB-r\fR option
128will take off this restriction, allowing all capabilities to be output in
129\fItermcap\fR form.
130
131Note that because padding is collected to the beginning of the capability, not
132all capabilities are output. Mandatory padding is not supported. Because
133\fBtermcap\fR strings are not as flexible, it is not always possible to convert
134a \fBterminfo\fR string capability into an equivalent \fBtermcap\fR format. A
135subsequent conversion of the \fBtermcap\fR file back into \fBterminfo\fR format
136will not necessarily reproduce the original \fBterminfo\fR
137source.
138
139Some common \fBterminfo\fR parameter sequences, their \fBtermcap\fR
140equivalents, and some terminal types which commonly have such sequences, are:
141
142.TS
143center tab(/) ;
144l c l
145l l l.
146\fBterminfo/termcap\fR/Representative Terminals
147=
148\fB%p1%c/%.\fR/adm
149\fB%p1%d/%d\fR/hp, ANSI standard, vt100
150\fB%p1%'x'%+%c/%+x\fR/concept
151\fB%i/%i\fRq/ANSI standard, vt100
152\fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fR/concept
153\fB%p2\fR is printed before \fB%p1/%r\fR/hp
154.TE
155.SS Use= Option [-u]
156The \fB-u\fR option produces a \fBterminfo\fR source description of the first
157terminal \fItermname\fR which is relative to the sum of the descriptions given
158by the entries for the other terminals \fItermnames\fR. It does this by
159analyzing the differences between the first \fItermname\fR and the other
160\fItermnames\fR and producing a description with \fBuse=\fR fields for the
161other terminals. In this manner, it is possible to retrofit generic terminfo
162entries into a terminal's description. Or, if two similar terminals exist, but
163were coded at different times or by different people so that each description
164is a full description, using \fBinfocmp\fR will show what can be done to change
165one description to be relative to the other.
166
167A capability will get printed with an at-sign (@) if it no longer exists in the
168first \fItermname\fR, but one of the other \fItermname\fR entries contains a
169value for it. A capability's value gets printed if the value in the first
170\fItermname\fR is not found in any of the other \fItermname\fR entries, or if
171the first of the other \fItermname\fR entries that has this capability gives a
172different value for the capability than that in the first \fItermname\fR.
173
174The order of the other \fItermname\fR entries is significant. Since the
175terminfo compiler \fBtic\fR does a left-to-right scan of the capabilities,
176specifying two \fBuse=\fR entries that contain differing entries for the same
177capabilities will produce different results depending on the order that the
178entries are given in. \fBinfocmp\fR will flag any such inconsistencies between
179the other \fItermname\fR entries as they are found.
180
181Alternatively, specifying a capability \fIafter\fR a \fBuse=\fR entry that
182contains that capability will cause the second specification to be ignored.
183Using \fBinfocmp\fR to recreate a description can be a useful check to make
184sure that everything was specified correctly in the original source
185description.
186
187Another error that does not cause incorrect compiled files, but will slow down
188the compilation time, is specifying extra \fBuse=\fR fields that are
189superfluous. \fBinfocmp\fR will flag any other \fItermname use=\fR fields that
190were not needed.
191.SS Changing Databases [-A \fIdirectory\fR] [-B \fIdirectory\fR]
192The location of the compiled \fBterminfo\fR database is taken from the
193environment variable \fBTERMINFO\fR . If the variable is not defined, or the
194terminal is not found in that location, the system \fBterminfo\fR database,
195in \fB@TERMINFO@\fR, will be used. The options \fB-A\fR
196and \fB-B\fR may be used to override this location. The \fB-A\fR option will
197set \fBTERMINFO\fR for the first \fItermname\fR and the \fB-B\fR option will
198set \fBTERMINFO\fR for the other \fItermnames\fR. With this, it is possible to
199compare descriptions for a terminal with the same name located in two different
200databases. This is useful for comparing descriptions for the same terminal
201created by different people.
202.SS Other Options
203.TP 5
204\fB-1\fR
205causes the fields to be printed out one to a line. Otherwise,
206the fields will be printed several to a line to a maximum width
207of 60 characters.
208.TP
209\fB-a\fR
210tells \fBinfocmp\fP to retain commented-out capabilities rather than discarding
211them. Capabilities are commented by prefixing them with a period.
212.TP 5
213\fB-E\fR
214Dump the capabilities of the given terminal as tables, needed in
215the C initializer for a
216TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR).
217This option is useful for preparing versions of the curses library hardwired
218for a given terminal type.
219The tables are all declared static, and are named according to the type
220and the name of the corresponding terminal entry.
221.sp
222Before ncurses 5.0, the split between the \fB-e\fP and \fB-E\fP
223options was not needed; but support for extended names required making
224the arrays of terminal capabilities separate from the TERMTYPE structure.
225.TP 5
226\fB-e\fR
227Dump the capabilities of the given terminal as a C initializer for a
228TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR).
229This option is useful for preparing versions of the curses library hardwired
230for a given terminal type.
231.TP 5
232\fB-F\fR
233compare terminfo files. This assumes that two following arguments are
234filenames. The files are searched for pairwise matches between
235entries, with two entries considered to match if any of their names do.
236The report printed to standard output lists entries with no matches in
237the other file, and entries with more than one match. For entries
238with exactly one match it includes a difference report. Normally,
239to reduce the volume of the report, use references are
240not resolved before looking for differences, but resolution can be forced
241by also specifying \fB-r\fR.
242.TP 5
243\fB-f\fR
244Display complex terminfo strings which contain if/then/else/endif expressions
245indented for readability.
246.TP 5
247\fB-G\fR
248Display constant literals in decimal form
249rather than their character equivalents.
250.TP 5
251\fB-g\fR
252Display constant character literals in quoted form
253rather than their decimal equivalents.
254.TP 5
255\fB-i\fR
256Analyze the initialization (\fBis1\fR, \fBis2\fR, \fBis3\fR), and reset
257(\fBrs1\fR, \fBrs2\fR, \fBrs3\fR), strings in the entry. For each string, the
258code tries to analyze it into actions in terms of the other capabilities in the
259entry, certain X3.64/ISO 6429/ECMA-48 capabilities, and certain DEC VT-series
260private modes (the set of recognized special sequences has been selected for
261completeness over the existing terminfo database). Each report line consists
262of the capability name, followed by a colon and space, followed by a printable
263expansion of the capability string with sections matching recognized actions
264translated into {}-bracketed descriptions. Here is a list of the DEC/ANSI
265special sequences recognized:
266
267.TS
268center tab(/) ;
269l l
270l l.
271Action/Meaning
272=
273RIS/full reset
274SC/save cursor
275RC/restore cursor
276LL/home-down
277RSR/reset scroll region
278
279DECSTR/soft reset (VT320)
280S7C1T/7-bit controls (VT220)
281
282ISO DEC G0/enable DEC graphics for G0
283ISO UK G0/enable UK chars for G0
284ISO US G0/enable US chars for G0
285ISO DEC G1/enable DEC graphics for G1
286ISO UK G1/enable UK chars for G1
287ISO US G1/enable US chars for G1
288
289DECPAM/application keypad mode
290DECPNM/normal keypad mode
291DECANSI/enter ANSI mode
292
293ECMA[+-]AM/keyboard action mode
294ECMA[+-]IRM/insert replace mode
295ECMA[+-]SRM/send receive mode
296ECMA[+-]LNM/linefeed mode
297
298DEC[+-]CKM/application cursor keys
299DEC[+-]ANM/set VT52 mode
300DEC[+-]COLM/132-column mode
301DEC[+-]SCLM/smooth scroll
302DEC[+-]SCNM/reverse video mode
303DEC[+-]OM/origin mode
304DEC[+-]AWM/wraparound mode
305DEC[+-]ARM/auto-repeat mode
306.TE
307.sp
308It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set
309Graphics Rendition, with the values NORMAL, BOLD, UNDERLINE, BLINK, and
310REVERSE. All but NORMAL may be prefixed with `+' (turn on) or `-' (turn off).
311
312An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}).
313.TP 5
314\fB-l\fR
315Set output format to terminfo.
316.TP 5
317\fB-p\fR
318Ignore padding specifications when comparing strings.
319.TP 5
320\fB-q\fR
321Make the comparison listing shorter by omitting subheadings, and using
322"-" for absent capabilities, "@" for canceled rather than "NULL".
323.TP 5
324\fB-R\fR\fIsubset\fR
325Restrict output to a given subset. This option is for use with archaic
326versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
327the full set of SVR4/XSI Curses terminfo; and variants such as AIX
328that have their own extensions incompatible with SVr4/XSI. Available terminfo
329subsets are "SVr1", "Ultrix", "HP", and "AIX"; see \fBterminfo\fR(\*n) for
330details. You can also choose the subset "BSD" which selects only capabilities
331with termcap equivalents recognized by 4.4BSD.
332.TP
333\fB-s \fR\fI[d|i|l|c]\fR
334The \fB-s\fR option sorts the fields within each type according to the argument
335below:
336.br
337.RS 5
338.TP 5
339\fBd\fR
340leave fields in the order that they are stored in the \fIterminfo\fR database.
341.TP 5
342\fBi\fR
343sort by \fIterminfo\fR name.
344.TP 5
345\fBl\fR
346sort by the long C variable name.
347.TP 5
348\fBc\fR
349sort by the \fItermcap\fR name.
350.RE
351.IP
352If the \fB-s\fR option is not given, the fields printed out will be
353sorted alphabetically by the \fBterminfo\fR name within each type,
354except in the case of the \fB-C\fR or the \fB-L\fR options, which cause the
355sorting to be done by the \fBtermcap\fR name or the long C variable
356name, respectively.
357.TP 5
358\fB-T\fR
359eliminates size-restrictions on the generated text.
360This is mainly useful for testing and analysis, since the compiled
361descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
362.TP
363\fB-t\fR
364tells \fBtic\fP to discard commented-out capabilities.
365Normally when translating from terminfo to termcap,
366untranslatable capabilities are commented-out.
367.TP 5
368\fB-V\fR
369reports the version of ncurses which was used in this program, and exits.
370.TP 5
371\fB-v\fR \fIn\fR
372prints out tracing information on standard error as the program runs.
373Higher values of n induce greater verbosity.
374.TP 5
375\fB-w\fR \fIwidth\fR
376changes the output to \fIwidth\fR characters.
377.TP
378\fB-x\fR
379print information for user-defined capabilities.
380These are extensions to the terminfo repertoire which can be loaded
381using the \fB-x\fR option of \fBtic\fP.
382.SH FILES
383.TP 20
384\*d
385Compiled terminal description database.
386.SH EXTENSIONS
387The
388\fB-E\fR,
389\fB-F\fR,
390\fB-G\fR,
391\fB-R\fR,
392\fB-T\fR,
393\fB-V\fR,
394\fB-a\fR,
395\fB-e\fR,
396\fB-f\fR,
397\fB-g\fR,
398\fB-i\fR,
399\fB-l\fR,
400\fB-p\fR,
401\fB-q\fR and
402\fB-t\fR
403options are not supported in SVr4 curses.
404
405The \fB-r\fR option's notion of `termcap' capabilities is System V Release 4's.
406Actual BSD curses versions will have a more restricted set. To see only the
4074.4BSD set, use \fB-r\fR \fB-RBSD\fR.
408.SH BUGS
409The \fB-F\fR option of \fBinfocmp\fR(1M) should be a \fBtoe\fR(1M) mode.
410.SH SEE ALSO
411\fBinfocmp\fR(1M), \fBcaptoinfo\fR(1M), \fBinfotocap\fR(1M),
412\fBtic\fR(1M), \fBtoe\fR(1M),
413\fBcurses\fR(3X), \fBterminfo\fR(\*n).
414.SH AUTHOR
415Eric S. Raymond <esr@snark.thyrsus.com>
416and
417.br
418Thomas E. Dickey <dickey@invisible-island.net>
419.\"#
420.\"# The following sets edit modes for GNU EMACS
421.\"# Local Variables:
422.\"# mode:nroff
423.\"# fill-column:79
424.\"# End:
Note: See TracBrowser for help on using the repository browser.