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