Debian Codegraph @

upstream/opensuse-tumbleweed/man1/infocmp.1

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