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