Annotation of src/usr.bin/infocmp/infocmp.1, Revision 1.2
1.1 daniel 1: '\" t
1.2 ! nicm 2: .\" $OpenBSD: infocmp.1,v 1.1 2022/07/11 03:11:49 daniel Exp $
1.1 daniel 3: .\"
4: .\"***************************************************************************
1.2 ! nicm 5: .\" Copyright 2018-2022,2023 Thomas E. Dickey *
! 6: .\" Copyright 1998-2017,2018 Free Software Foundation, Inc. *
1.1 daniel 7: .\" *
8: .\" Permission is hereby granted, free of charge, to any person obtaining a *
9: .\" copy of this software and associated documentation files (the *
10: .\" "Software"), to deal in the Software without restriction, including *
11: .\" without limitation the rights to use, copy, modify, merge, publish, *
12: .\" distribute, distribute with modifications, sublicense, and/or sell *
13: .\" copies of the Software, and to permit persons to whom the Software is *
14: .\" furnished to do so, subject to the following conditions: *
15: .\" *
16: .\" The above copyright notice and this permission notice shall be included *
17: .\" in all copies or substantial portions of the Software. *
18: .\" *
19: .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
20: .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
21: .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
22: .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
23: .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
24: .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
25: .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
26: .\" *
27: .\" Except as contained in this notice, the name(s) of the above copyright *
28: .\" holders shall not be used in advertising or otherwise to promote the *
29: .\" sale, use or other dealings in this Software without prior written *
30: .\" authorization. *
31: .\"***************************************************************************
32: .\"
1.2 ! nicm 33: .\" $Id: infocmp.1,v 1.1 2022/07/11 03:11:49 daniel Exp $
! 34: .TH infocmp 1 2023-08-19 "ncurses 6.4" "User commands"
! 35: .ie \n(.g .ds `` \(lq
! 36: .el .ds `` ``
! 37: .ie \n(.g .ds '' \(rq
! 38: .el .ds '' ''
1.1 daniel 39: .ds n 5
1.2 ! nicm 40: .de bP
! 41: .ie n .IP \(bu 4
! 42: .el .IP \(bu 2
! 43: ..
! 44: .de NS
! 45: .ie n .sp
! 46: .el .sp .5
! 47: .ie n .in +4
! 48: .el .in +2
! 49: .nf
! 50: .ft CR \" Courier
! 51: ..
! 52: .de NE
! 53: .fi
! 54: .ft R
! 55: .ie n .in -4
! 56: .el .in -2
! 57: ..
1.1 daniel 58: .ds d /usr/share/terminfo
59: .SH NAME
1.2 ! nicm 60: \fBinfocmp\fP \- compare or print out \fIterminfo\fP descriptions
1.1 daniel 61: .SH SYNOPSIS
1.2 ! nicm 62: \fBinfocmp\fP [\fB\-\
1.1 daniel 63: 1\
64: C\
1.2 ! nicm 65: D\
1.1 daniel 66: E\
67: F\
68: G\
69: I\
1.2 ! nicm 70: K\
1.1 daniel 71: L\
72: T\
73: U\
74: V\
1.2 ! nicm 75: W\
1.1 daniel 76: c\
77: d\
78: e\
79: g\
80: i\
81: l\
82: n\
83: p\
84: q\
85: r\
86: t\
87: u\
88: x\
1.2 ! nicm 89: \fP]
! 90: [\fB\-v\fR \fIn\fR] [\fB\-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB\-Q\fR \fIn\fR] [\fB\-R \fBsubset\fR]
! 91: [\fB\-w\fP\ \fIwidth\fP] [\fB\-A\fP\ \fIdirectory\fP] [\fB\-B\fP\ \fIdirectory\fP]
! 92: [\fItermname\fP...]
1.1 daniel 93: .SH DESCRIPTION
1.2 ! nicm 94: \fBinfocmp\fP can be used to compare a binary \fBterminfo\fP entry with other
! 95: terminfo entries, rewrite a \fBterminfo\fP description to take advantage of the
! 96: \fBuse=\fP terminfo field, or print out a \fBterminfo\fP description from the
! 97: binary file (\fBterm\fP) in a variety of formats.
! 98: In all cases, the boolean
1.1 daniel 99: fields will be printed first, followed by the numeric fields, followed by the
100: string fields.
101: .SS Default Options
1.2 ! nicm 102: If no options are specified and zero or one \fItermnames\fP are specified, the
! 103: \fB\-I\fP option will be assumed.
! 104: If more than one \fItermname\fP is specified,
! 105: the \fB\-d\fP option will be assumed.
! 106: .SS Comparison Options [\-d] [\-c] [\-n]
! 107: \fBinfocmp\fP compares the \fBterminfo\fP description of the first terminal
! 108: \fItermname\fP with each of the descriptions given by the entries for the other
! 109: terminal's \fItermnames\fP.
! 110: If a capability is defined for only one of the
! 111: terminals, the value returned depends on the type of the capability:
! 112: .bP
! 113: \fBF\fP for missing boolean variables
! 114: .bP
! 115: \fBNULL\fP for missing integer or string variables
! 116: .PP
! 117: Use the \fB\-q\fP option to show the distinction between
! 118: \fIabsent\fP and \fIcancelled\fP capabilities.
! 119: .PP
! 120: These options produce a list which you can use to compare two
! 121: or more terminal descriptions:
! 122: .TP 5
! 123: \fB\-d\fP
! 124: produces a list of each capability that is \fIdifferent\fP
! 125: between two entries.
! 126: Each item in the list shows \*(``:\*('' after the capability name,
! 127: followed by the capability values, separated by a comma.
! 128: .TP
! 129: \fB\-c\fP
! 130: produces a list of each capability that is \fIcommon\fP between
! 131: two or more entries.
! 132: Missing capabilities are ignored.
! 133: Each item in the list shows \*(``=\*('' after the capability name,
! 134: followed by the capability value.
! 135: .IP
! 136: The \fB\-u\fP option provides a related output,
! 137: showing the first terminal description rewritten to use the second
! 138: as a building block via the \*(``use=\*('' clause.
! 139: .TP
! 140: \fB\-n\fP
! 141: produces a list of each capability that is in \fInone\fP of the given entries.
! 142: Each item in the list shows \*(``!\*('' before the capability name.
! 143: .IP
! 144: Normally only the conventional capabilities are shown.
! 145: Use the \fB\-x\fP option to add the BSD-compatibility
! 146: capabilities (names prefixed with \*(``OT\*('').
! 147: .IP
! 148: If no \fItermnames\fP are given,
! 149: \fBinfocmp\fP uses the environment variable \fBTERM\fP
! 150: for each of the \fItermnames\fP.
! 151: .SS Source Listing Options [\-I] [\-L] [\-C] [\-r]
! 152: The \fB\-I\fP, \fB\-L\fP, and \fB\-C\fP options will produce
! 153: a source listing for each terminal named.
! 154: .PP
1.1 daniel 155: .TS
156: center tab(/) ;
157: l l .
1.2 ! nicm 158: \fB\-I\fP/use the \fBterminfo\fP names
! 159: \fB\-L\fP/use the long C variable name listed in <\fBterm.h\fP>
! 160: \fB\-C\fP/use the \fBtermcap\fP names
! 161: \fB\-r\fP/when using \fB\-C\fP, put out all capabilities in \fBtermcap\fP form
! 162: \fB\-K\fP/modifies the \fB\-C\fP option, improving BSD-compatibility.
1.1 daniel 163: .TE
164: .PP
1.2 ! nicm 165: If no \fItermnames\fP are given, the environment variable \fBTERM\fP will be
1.1 daniel 166: used for the terminal name.
167: .PP
1.2 ! nicm 168: The source produced by the \fB\-C\fP option may be used directly as a
! 169: \fBtermcap\fP entry, but not all parameterized strings can be changed to
! 170: the \fBtermcap\fP format.
! 171: \fBinfocmp\fP will attempt to convert most of the
1.1 daniel 172: parameterized information, and anything not converted will be plainly marked in
1.2 ! nicm 173: the output and commented out.
! 174: These should be edited by hand.
! 175: .PP
! 176: For best results when converting to \fBtermcap\fP format,
! 177: you should use both \fB\-C\fP and \fB\-r\fP.
! 178: Normally a termcap description is limited to 1023 bytes.
! 179: \fBinfocmp\fP trims away less essential parts to make it fit.
! 180: If you are converting to one of the (rare) termcap implementations
! 181: which accept an unlimited size of termcap,
! 182: you may want to add the \fB\-T\fP option.
! 183: More often however, you must help the termcap implementation,
! 184: and trim excess whitespace (use the \fB\-0\fP option for that).
1.1 daniel 185: .PP
186: All padding information for strings will be collected together and placed
1.2 ! nicm 187: at the beginning of the string where \fBtermcap\fP expects it.
! 188: Mandatory
! 189: padding (padding information with a trailing \*(``/\*('') will become optional.
! 190: .PP
! 191: All \fBtermcap\fP variables no longer supported by \fBterminfo\fP, but which
! 192: are derivable from other \fBterminfo\fP variables, will be output.
! 193: Not all
! 194: \fBterminfo\fP capabilities will be translated; only those variables which were
! 195: part of \fBtermcap\fP will normally be output.
! 196: Specifying the \fB\-r\fP option
1.1 daniel 197: will take off this restriction, allowing all capabilities to be output in
1.2 ! nicm 198: \fItermcap\fP form.
! 199: Normally you would use both the \fB\-C\fP and \fB\-r\fP options.
! 200: The actual format used incorporates some improvements for escaped characters
! 201: from terminfo format.
! 202: For a stricter BSD-compatible translation, use the \fB\-K\fP option
! 203: rather than \fB\-C\fP.
1.1 daniel 204: .PP
205: Note that because padding is collected to the beginning of the capability, not
1.2 ! nicm 206: all capabilities are output.
! 207: Mandatory padding is not supported.
! 208: Because
! 209: \fBtermcap\fP strings are not as flexible, it is not always possible to convert
! 210: a \fBterminfo\fP string capability into an equivalent \fBtermcap\fP format.
! 211: A subsequent conversion of the \fBtermcap\fP file
! 212: back into \fBterminfo\fP format
! 213: will not necessarily reproduce the original \fBterminfo\fP source.
1.1 daniel 214: .PP
1.2 ! nicm 215: Some common \fBterminfo\fP parameter sequences, their \fBtermcap\fP
1.1 daniel 216: equivalents, and some terminal types which commonly have such sequences, are:
1.2 ! nicm 217: .PP
1.1 daniel 218: .TS
219: center tab(/) ;
220: l c l
221: l l l.
1.2 ! nicm 222: \fBterminfo/termcap\fP/Representative Terminals
1.1 daniel 223: =
1.2 ! nicm 224: \fB%p1%c/%.\fP/adm
! 225: \fB%p1%d/%d\fP/hp, ANSI standard, vt100
! 226: \fB%p1%'x'%+%c/%+x\fP/concept
! 227: \fB%i/%i\fPq/ANSI standard, vt100
! 228: \fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fP/concept
! 229: \fB%p2\fP is printed before \fB%p1/%r\fP/hp
1.1 daniel 230: .TE
1.2 ! nicm 231: .SS Use= Option [\-u]
! 232: The \fB\-u\fP option produces a \fBterminfo\fP source description of the first
! 233: terminal \fItermname\fP which is relative to the sum of the descriptions given
! 234: by the entries for the other terminals \fItermnames\fP.
! 235: It does this by
! 236: analyzing the differences between the first \fItermname\fP and the other
! 237: \fItermnames\fP and producing a description with \fBuse=\fP fields for the
! 238: other terminals.
! 239: In this manner, it is possible to retrofit generic terminfo
! 240: entries into a terminal's description.
! 241: Or, if two similar terminals exist, but
1.1 daniel 242: were coded at different times or by different people so that each description
1.2 ! nicm 243: is a full description, using \fBinfocmp\fP
! 244: will show what can be done to change
1.1 daniel 245: one description to be relative to the other.
246: .PP
1.2 ! nicm 247: A capability will be printed with an at-sign (@) if it no longer exists in the
! 248: first \fItermname\fP, but one of the other \fItermname\fP entries contains a
! 249: value for it.
! 250: A capability's value will be printed if the value in the first
! 251: \fItermname\fP is not found in any of the other \fItermname\fP entries, or if
! 252: the first of the other \fItermname\fP entries that has this capability gives a
! 253: different value for the capability than that in the first \fItermname\fP.
! 254: .PP
! 255: The order of the other \fItermname\fP entries is significant.
! 256: Since the
! 257: terminfo compiler \fBtic\fP does a left-to-right scan of the capabilities,
! 258: specifying two \fBuse=\fP entries that contain differing entries for the same
1.1 daniel 259: capabilities will produce different results depending on the order that the
1.2 ! nicm 260: entries are given in.
! 261: \fBinfocmp\fP will flag any such inconsistencies between
! 262: the other \fItermname\fP entries as they are found.
1.1 daniel 263: .PP
1.2 ! nicm 264: Alternatively, specifying a capability \fIafter\fP a \fBuse=\fP entry that
1.1 daniel 265: contains that capability will cause the second specification to be ignored.
1.2 ! nicm 266: Using \fBinfocmp\fP to recreate a description can be a useful check to make
1.1 daniel 267: sure that everything was specified correctly in the original source
268: description.
269: .PP
270: Another error that does not cause incorrect compiled files, but will slow down
1.2 ! nicm 271: the compilation time, is specifying extra \fBuse=\fP fields that are
! 272: superfluous.
! 273: \fBinfocmp\fP will flag any other \fItermname use=\fP fields that
1.1 daniel 274: were not needed.
1.2 ! nicm 275: .SS Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR]
! 276: Like other \fBncurses\fP utilities,
! 277: \fBinfocmp\fP looks for the terminal descriptions in several places.
! 278: You can use the \fBTERMINFO\fP and \fBTERMINFO_DIRS\fP environment variables
! 279: to override the compiled-in default list of places to search
! 280: (see \fBcurses\fP(3) for details).
! 281: .PP
! 282: You can also use the options \fB\-A\fP
! 283: and \fB\-B\fP to override the list of places to search
! 284: when comparing terminal descriptions:
! 285: .bP
! 286: The \fB\-A\fP option sets the location for the first \fItermname\fP
! 287: .bP
! 288: The \fB\-B\fP option sets the location for the other \fItermnames\fP.
! 289: .PP
! 290: Using these options, it is possible to
1.1 daniel 291: compare descriptions for a terminal with the same name located in two different
1.2 ! nicm 292: databases.
! 293: For instance,
! 294: you can use this feature for comparing descriptions for the same terminal
1.1 daniel 295: created by different people.
296: .SS Other Options
297: .TP 5
1.2 ! nicm 298: \fB\-0\fP
! 299: causes the fields to be printed on one line, without wrapping.
! 300: .TP 5
! 301: \fB\-1\fP
! 302: causes the fields to be printed out one to a line.
! 303: Otherwise,
1.1 daniel 304: the fields will be printed several to a line to a maximum width
305: of 60 characters.
306: .TP
1.2 ! nicm 307: \fB\-a\fP
! 308: tells \fBinfocmp\fP to retain commented-out capabilities
! 309: rather than discarding them.
! 310: Capabilities are commented by prefixing them with a period.
! 311: .TP
! 312: \fB\-D\fP
! 313: tells \fBinfocmp\fP to print the database locations that it knows about,
! 314: and exit.
1.1 daniel 315: .TP 5
1.2 ! nicm 316: \fB\-E\fP
1.1 daniel 317: Dump the capabilities of the given terminal as tables, needed in
318: the C initializer for a
1.2 ! nicm 319: TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fP).
1.1 daniel 320: This option is useful for preparing versions of the curses library hardwired
321: for a given terminal type.
322: The tables are all declared static, and are named according to the type
323: and the name of the corresponding terminal entry.
324: .sp
1.2 ! nicm 325: Before ncurses 5.0, the split between the \fB\-e\fP and \fB\-E\fP
1.1 daniel 326: options was not needed; but support for extended names required making
327: the arrays of terminal capabilities separate from the TERMTYPE structure.
328: .TP 5
1.2 ! nicm 329: \fB\-e\fP
1.1 daniel 330: Dump the capabilities of the given terminal as a C initializer for a
1.2 ! nicm 331: TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fP).
1.1 daniel 332: This option is useful for preparing versions of the curses library hardwired
333: for a given terminal type.
334: .TP 5
1.2 ! nicm 335: \fB\-F\fP
! 336: compare terminfo files.
! 337: This assumes that two following arguments are filenames.
! 338: The files are searched for pairwise matches between
1.1 daniel 339: entries, with two entries considered to match if any of their names do.
340: The report printed to standard output lists entries with no matches in
1.2 ! nicm 341: the other file, and entries with more than one match.
! 342: For entries
! 343: with exactly one match it includes a difference report.
! 344: Normally,
1.1 daniel 345: to reduce the volume of the report, use references are
346: not resolved before looking for differences, but resolution can be forced
1.2 ! nicm 347: by also specifying \fB\-r\fP.
1.1 daniel 348: .TP 5
1.2 ! nicm 349: \fB\-f\fP
1.1 daniel 350: Display complex terminfo strings which contain if/then/else/endif expressions
351: indented for readability.
352: .TP 5
1.2 ! nicm 353: \fB\-G\fP
1.1 daniel 354: Display constant literals in decimal form
355: rather than their character equivalents.
356: .TP 5
1.2 ! nicm 357: \fB\-g\fP
1.1 daniel 358: Display constant character literals in quoted form
359: rather than their decimal equivalents.
360: .TP 5
1.2 ! nicm 361: \fB\-i\fP
! 362: Analyze the initialization (\fBis1\fP, \fBis2\fP, \fBis3\fP), and reset
! 363: (\fBrs1\fP, \fBrs2\fP, \fBrs3\fP), strings in the entry,
! 364: as well as those used for starting/stopping cursor-positioning mode
! 365: (\fBsmcup\fP, \fBrmcup\fP) as well as starting/stopping keymap mode
! 366: (\fBsmkx\fP, \fBrmkx\fP).
! 367: .IP
! 368: For each string, the
1.1 daniel 369: code tries to analyze it into actions in terms of the other capabilities in the
1.2 ! nicm 370: entry, certain X3.64/ISO 6429/ECMA\-48 capabilities, and certain DEC VT-series
1.1 daniel 371: private modes (the set of recognized special sequences has been selected for
1.2 ! nicm 372: completeness over the existing terminfo database).
! 373: Each report line consists
1.1 daniel 374: of the capability name, followed by a colon and space, followed by a printable
375: expansion of the capability string with sections matching recognized actions
1.2 ! nicm 376: translated into {}-bracketed descriptions.
! 377: .IP
! 378: Here is a list of the DEC/ANSI
1.1 daniel 379: special sequences recognized:
1.2 ! nicm 380: .PP
1.1 daniel 381: .TS
382: center tab(/) ;
383: l l
384: l l.
385: Action/Meaning
386: =
387: RIS/full reset
388: SC/save cursor
389: RC/restore cursor
390: LL/home-down
391: RSR/reset scroll region
392: =
393: DECSTR/soft reset (VT320)
394: S7C1T/7-bit controls (VT220)
395: =
396: ISO DEC G0/enable DEC graphics for G0
397: ISO UK G0/enable UK chars for G0
398: ISO US G0/enable US chars for G0
399: ISO DEC G1/enable DEC graphics for G1
400: ISO UK G1/enable UK chars for G1
401: ISO US G1/enable US chars for G1
402: =
403: DECPAM/application keypad mode
404: DECPNM/normal keypad mode
405: DECANSI/enter ANSI mode
406: =
1.2 ! nicm 407: ECMA[+\-]AM/keyboard action mode
! 408: ECMA[+\-]IRM/insert replace mode
! 409: ECMA[+\-]SRM/send receive mode
! 410: ECMA[+\-]LNM/linefeed mode
1.1 daniel 411: =
1.2 ! nicm 412: DEC[+\-]CKM/application cursor keys
! 413: DEC[+\-]ANM/set VT52 mode
! 414: DEC[+\-]COLM/132-column mode
! 415: DEC[+\-]SCLM/smooth scroll
! 416: DEC[+\-]SCNM/reverse video mode
! 417: DEC[+\-]OM/origin mode
! 418: DEC[+\-]AWM/wraparound mode
! 419: DEC[+\-]ARM/auto-repeat mode
1.1 daniel 420: .TE
421: .sp
422: It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set
423: Graphics Rendition, with the values NORMAL, BOLD, UNDERLINE, BLINK, and
1.2 ! nicm 424: REVERSE.
! 425: All but NORMAL may be prefixed with
! 426: .RS
! 427: .bP
! 428: \*(``+\*('' (turn on) or
! 429: .bP
! 430: \*(``\-\*('' (turn off).
! 431: .RE
! 432: .IP
1.1 daniel 433: An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}).
434: .TP 5
1.2 ! nicm 435: \fB\-l\fP
1.1 daniel 436: Set output format to terminfo.
437: .TP 5
1.2 ! nicm 438: \fB\-p\fP
1.1 daniel 439: Ignore padding specifications when comparing strings.
440: .TP 5
1.2 ! nicm 441: \fB\-Q\fP \fIn\fP
! 442: Rather than show source in terminfo (text) format,
! 443: print the compiled (binary) format in hexadecimal or base64 form,
! 444: depending on the option's value:
! 445: .RS 8
! 446: .TP 3
! 447: 1
! 448: hexadecimal
! 449: .TP 3
! 450: 2
! 451: base64
! 452: .TP 3
! 453: 3
! 454: hexadecimal and base64
! 455: .RE
! 456: .IP
! 457: For example, this prints the compiled terminfo value as a string
! 458: which could be assigned to the \fBTERMINFO\fP environment variable:
! 459: .NS
! 460: infocmp -0 -q -Q2
! 461: .NE
! 462: .TP 5
! 463: \fB\-q\fP
! 464: This makes the output a little shorter:
! 465: .RS
! 466: .bP
1.1 daniel 467: Make the comparison listing shorter by omitting subheadings, and using
1.2 ! nicm 468: \*(``\-\*('' for absent capabilities, \*(``@\*(''
! 469: for canceled rather than \*(``NULL\*(''.
! 470: .bP
! 471: However, show differences between absent and cancelled capabilities.
! 472: .bP
! 473: Omit the \*(``Reconstructed from\*('' comment for source listings.
! 474: .RE
1.1 daniel 475: .TP 5
1.2 ! nicm 476: \fB\-R\fIsubset\fR
! 477: Restrict output to a given subset.
! 478: This option is for use with archaic
! 479: versions of terminfo like those on SVr1, Ultrix, or HP-UX that do not support
1.1 daniel 480: the full set of SVR4/XSI Curses terminfo; and variants such as AIX
1.2 ! nicm 481: that have their own extensions incompatible with SVr4/XSI.
! 482: .RS
! 483: .bP
! 484: Available terminfo
! 485: subsets are \*(``SVr1\*('', \*(``Ultrix\*('', \*(``HP\*('', and \*(``AIX\*('';
! 486: see \fBterminfo\fP(\*n) for details.
! 487: .bP
! 488: You can also choose the subset \*(``BSD\*('' which selects only capabilities
1.1 daniel 489: with termcap equivalents recognized by 4.4BSD.
1.2 ! nicm 490: .bP
! 491: If you select any other value for \fB\-R\fP,
! 492: it is the same as no subset, i.e., all capabilities are used.
! 493: .RE
! 494: .IP
! 495: A few options override the subset selected with \fB\-R\fP,
! 496: if they are processed later in the command parameters:
! 497: .RS
! 498: .TP 5
! 499: \fB\-C\fP
! 500: sets the \*(``BSD\*('' subset as a side-effect.
! 501: .TP 5
! 502: \fB\-I\fP
! 503: sets the subset to all capabilities.
! 504: .TP 5
! 505: \fB\-r\fP
! 506: sets the subset to all capabilities.
! 507: .RE
1.1 daniel 508: .TP
1.2 ! nicm 509: \fB\-s \fI[d|i|l|c]\fR
! 510: The \fB\-s\fP option sorts the fields within each type according to the argument
1.1 daniel 511: below:
512: .br
513: .RS 5
514: .TP 5
1.2 ! nicm 515: \fBd\fP
! 516: leave fields in the order that they are stored in the \fIterminfo\fP database.
1.1 daniel 517: .TP 5
1.2 ! nicm 518: \fBi\fP
! 519: sort by \fIterminfo\fP name.
1.1 daniel 520: .TP 5
1.2 ! nicm 521: \fBl\fP
1.1 daniel 522: sort by the long C variable name.
523: .TP 5
1.2 ! nicm 524: \fBc\fP
! 525: sort by the \fItermcap\fP name.
1.1 daniel 526: .RE
527: .IP
1.2 ! nicm 528: If the \fB\-s\fP option is not given, the fields printed out will be
! 529: sorted alphabetically by the \fBterminfo\fP name within each type,
! 530: except in the case of the \fB\-C\fP or the \fB\-L\fP options, which cause the
! 531: sorting to be done by the \fBtermcap\fP name or the long C variable
1.1 daniel 532: name, respectively.
533: .TP 5
1.2 ! nicm 534: \fB\-T\fP
1.1 daniel 535: eliminates size-restrictions on the generated text.
536: This is mainly useful for testing and analysis, since the compiled
537: descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
538: .TP
1.2 ! nicm 539: \fB\-t\fP
1.1 daniel 540: tells \fBtic\fP to discard commented-out capabilities.
541: Normally when translating from terminfo to termcap,
542: untranslatable capabilities are commented-out.
543: .TP 5
1.2 ! nicm 544: \fB\-U\fP
! 545: tells \fBinfocmp\fP to not post-process the data
! 546: after parsing the source file.
1.1 daniel 547: This feature helps when comparing the actual contents of two source files,
548: since it excludes the inferences that \fBinfocmp\fP makes to fill in missing
549: data.
550: .TP 5
1.2 ! nicm 551: \fB\-V\fP
1.1 daniel 552: reports the version of ncurses which was used in this program, and exits.
553: .TP 5
1.2 ! nicm 554: \fB\-v\fP \fIn\fP
1.1 daniel 555: prints out tracing information on standard error as the program runs.
1.2 ! nicm 556: .IP
! 557: The optional parameter \fIn\fP is a number from 1 to 10, inclusive,
! 558: indicating the desired level of detail of information.
! 559: If ncurses is built without tracing support, the optional parameter is ignored.
! 560: .TP
! 561: \fB\-W\fP
! 562: By itself, the \fB\-w\fP option will not force long strings to be wrapped.
! 563: Use the \fB\-W\fP option to do this.
1.1 daniel 564: .TP 5
1.2 ! nicm 565: \fB\-w\fP \fIwidth\fP
! 566: changes the output to \fIwidth\fP characters.
1.1 daniel 567: .TP
1.2 ! nicm 568: \fB\-x\fP
! 569: print information for user-defined capabilities (see \fBuser_caps(\*n)\fP.
1.1 daniel 570: These are extensions to the terminfo repertoire which can be loaded
1.2 ! nicm 571: using the \fB\-x\fP option of \fBtic\fP.
1.1 daniel 572: .SH FILES
573: .TP 20
574: \*d
575: Compiled terminal description database.
1.2 ! nicm 576: .SH HISTORY
! 577: Although System V Release 2 provided a terminfo library,
! 578: it had no documented tool for decompiling the terminal descriptions.
! 579: Tony Hansen (AT&T) wrote the first \fBinfocmp\fP in early 1984,
! 580: for System V Release 3.
! 581: .PP
! 582: Eric Raymond used the AT&T documentation in 1995 to provide an equivalent
! 583: \fBinfocmp\fP for ncurses.
! 584: In addition, he added a few new features such as:
! 585: .bP
! 586: the \fB\-e\fP option, to support \fIfallback\fP
! 587: (compiled-in) terminal descriptions
! 588: .bP
! 589: the \fB\-i\fP option, to help with analysis
! 590: .PP
! 591: Later, Thomas Dickey added the \fB\-x\fP (user-defined capabilities)
! 592: option, and the \fB\-E\fP option to support fallback entries with
! 593: user-defined capabilities.
! 594: .PP
! 595: For a complete list, see the \fIEXTENSIONS\fP section.
! 596: .PP
! 597: In 2010, Roy Marples provided an \fBinfocmp\fP program for NetBSD.
! 598: It is less capable than the SVr4 or ncurses versions
! 599: (e.g., it lacks the sorting options documented in X/Open),
! 600: but does include the \fB\-x\fP option adapted from ncurses.
! 601: .SH PORTABILITY
! 602: X/Open Curses, Issue 7 (2009) provides a description of \fBinfocmp\fP.
! 603: It does not mention the options used for converting to termcap format.
1.1 daniel 604: .SH EXTENSIONS
605: The
1.2 ! nicm 606: \fB\-0\fP,
! 607: \fB\-1\fP,
! 608: \fB\-E\fP,
! 609: \fB\-F\fP,
! 610: \fB\-G\fP,
! 611: \fB\-Q\fP,
! 612: \fB\-R\fP,
! 613: \fB\-T\fP,
! 614: \fB\-V\fP,
! 615: \fB\-a\fP,
! 616: \fB\-e\fP,
! 617: \fB\-f\fP,
! 618: \fB\-g\fP,
! 619: \fB\-i\fP,
! 620: \fB\-l\fP,
! 621: \fB\-p\fP,
! 622: \fB\-q\fP and
! 623: \fB\-t\fP
1.1 daniel 624: options are not supported in SVr4 curses.
625: .PP
1.2 ! nicm 626: SVr4 infocmp does not distinguish between absent and cancelled capabilities.
! 627: Also, it shows missing integer capabilities as \fB\-1\fP
! 628: (the internal value used to represent missing integers).
! 629: This implementation shows those as \*(``NULL\*('',
! 630: for consistency with missing strings.
! 631: .PP
! 632: The \fB\-r\fP option's notion of \*(``termcap\*('' capabilities
! 633: is System V Release 4's.
! 634: Actual BSD curses versions will have a more restricted set.
! 635: To see only the
! 636: 4.4BSD set, use \fB\-r\fP \fB\-RBSD\fP.
! 637: .SH BUGS
! 638: The \fB\-F\fP option of \fBinfocmp\fP(1) should be a \fBtoe\fP(1) mode.
1.1 daniel 639: .SH SEE ALSO
1.2 ! nicm 640: \fBcaptoinfo\fP(1),
! 641: \fBinfotocap\fP(1),
! 642: \fBtic\fP(1),
! 643: \fBtoe\fP(1),
! 644: \fBcurses\fP(3),
! 645: \fBterminfo\fP(\*n).
! 646: \fBuser_caps\fP(\*n).
! 647: .sp
! 648: https://invisible-island.net/ncurses/tctest.html
1.1 daniel 649: .PP
1.2 ! nicm 650: This describes \fBncurses\fP
! 651: version 6.4 (patch 20230826).
1.1 daniel 652: .SH AUTHOR
653: Eric S. Raymond <esr@snark.thyrsus.com>
654: and
655: .br
656: Thomas E. Dickey <dickey@invisible-island.net>