<!--
* t
****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
+ * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 1998-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: infocmp.1m,v 1.67 2017/11/18 23:51:17 tom Exp @
+ * @Id: infocmp.1m,v 1.77 2020/07/25 20:37:39 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
-<meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
+<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
<TITLE>infocmp 1m</TITLE>
-<link rev=made href="mailto:bug-ncurses@gnu.org">
+<link rel="author" href="mailto:bug-ncurses@gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
each description is a full description, using <STRONG>infocmp</STRONG> will show what
can be done to change one description to be relative to the other.
- A capability will get printed with an at-sign (@) if it no longer
- exists in the first <EM>termname</EM>, but one of the other <EM>termname</EM> entries
- contains a value for it. A capability's value gets printed if the
- value in the first <EM>termname</EM> is not found in any of the other <EM>termname</EM>
- entries, or if the first of the other <EM>termname</EM> entries that has this
- capability gives a different value for the capability than that in the
- first <EM>termname</EM>.
+ A capability will be printed with an at-sign (@) if it no longer exists
+ in the first <EM>termname</EM>, but one of the other <EM>termname</EM> entries contains a
+ value for it. A capability's value will be printed if the value in the
+ first <EM>termname</EM> is not found in any of the other <EM>termname</EM> entries, or if
+ the first of the other <EM>termname</EM> entries that has this capability gives
+ a different value for the capability than that in the first <EM>termname</EM>.
The order of the other <EM>termname</EM> entries is significant. Since the ter-
minfo compiler <STRONG>tic</STRONG> does a left-to-right scan of the capabilities, spec-
- ifying two <STRONG>use=</STRONG> entries that contain differing entries for the same
+ ifying two <STRONG>use=</STRONG> entries that contain differing entries for the same
capabilities will produce different results depending on the order that
- the entries are given in. <STRONG>infocmp</STRONG> will flag any such inconsistencies
+ the entries are given in. <STRONG>infocmp</STRONG> will flag any such inconsistencies
between the other <EM>termname</EM> entries as they are found.
Alternatively, specifying a capability <EM>after</EM> a <STRONG>use=</STRONG> entry that contains
- that capability will cause the second specification to be ignored.
- Using <STRONG>infocmp</STRONG> to recreate a description can be a useful check to make
- sure that everything was specified correctly in the original source
+ that capability will cause the second specification to be ignored.
+ Using <STRONG>infocmp</STRONG> to recreate a description can be a useful check to make
+ sure that everything was specified correctly in the original source
description.
- Another error that does not cause incorrect compiled files, but will
- slow down the compilation time, is specifying extra <STRONG>use=</STRONG> fields that
+ Another error that does not cause incorrect compiled files, but will
+ slow down the compilation time, is specifying extra <STRONG>use=</STRONG> fields that
are superfluous. <STRONG>infocmp</STRONG> will flag any other <EM>termname</EM> <EM>use=</EM> fields that
were not needed.
<STRONG>Changing</STRONG> <STRONG>Databases</STRONG> <STRONG>[-A</STRONG> <EM>directory</EM>] [-B <EM>directory</EM>]
- Like other <STRONG>ncurses</STRONG> utilities, <STRONG>infocmp</STRONG> looks for the terminal descrip-
- tions in several places. You can use the <STRONG>TERMINFO</STRONG> and <STRONG>TERMINFO_DIRS</STRONG>
- environment variables to override the compiled-in default list of
+ Like other <STRONG>ncurses</STRONG> utilities, <STRONG>infocmp</STRONG> looks for the terminal descrip-
+ tions in several places. You can use the <STRONG>TERMINFO</STRONG> and <STRONG>TERMINFO_DIRS</STRONG>
+ environment variables to override the compiled-in default list of
places to search (see <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> for details).
- You can also use the options <STRONG>-A</STRONG> and <STRONG>-B</STRONG> to override the list of places
+ You can also use the options <STRONG>-A</STRONG> and <STRONG>-B</STRONG> to override the list of places
to search when comparing terminal descriptions:
<STRONG>o</STRONG> The <STRONG>-A</STRONG> option sets the location for the first <EM>termname</EM>
<STRONG>o</STRONG> The <STRONG>-B</STRONG> option sets the location for the other <EM>termnames</EM>.
- Using these options, it is possible to compare descriptions for a ter-
- minal with the same name located in two different databases. For
- instance, you can use this feature for comparing descriptions for the
+ Using these options, it is possible to compare descriptions for a ter-
+ minal with the same name located in two different databases. For
+ instance, you can use this feature for comparing descriptions for the
same terminal created by different people.
<STRONG>-0</STRONG> causes the fields to be printed on one line, without wrapping.
<STRONG>-1</STRONG> causes the fields to be printed out one to a line. Otherwise, the
- fields will be printed several to a line to a maximum width of 60
+ fields will be printed several to a line to a maximum width of 60
characters.
- <STRONG>-a</STRONG> tells <STRONG>infocmp</STRONG> to retain commented-out capabilities rather than
- discarding them. Capabilities are commented by prefixing them
+ <STRONG>-a</STRONG> tells <STRONG>infocmp</STRONG> to retain commented-out capabilities rather than
+ discarding them. Capabilities are commented by prefixing them
with a period.
<STRONG>-D</STRONG> tells <STRONG>infocmp</STRONG> to print the database locations that it knows about,
and exit.
- <STRONG>-E</STRONG> Dump the capabilities of the given terminal as tables, needed in
- the C initializer for a TERMTYPE structure (the terminal capabil-
+ <STRONG>-E</STRONG> Dump the capabilities of the given terminal as tables, needed in
+ the C initializer for a TERMTYPE structure (the terminal capabil-
ity structure in the <STRONG><term.h></STRONG>). This option is useful for prepar-
- ing versions of the curses library hardwired for a given terminal
+ ing versions of the curses library hardwired for a given terminal
type. The tables are all declared static, and are named according
to the type and the name of the corresponding terminal entry.
- Before ncurses 5.0, the split between the <STRONG>-e</STRONG> and <STRONG>-E</STRONG> options was
- not needed; but support for extended names required making the
- arrays of terminal capabilities separate from the TERMTYPE struc-
+ Before ncurses 5.0, the split between the <STRONG>-e</STRONG> and <STRONG>-E</STRONG> options was
+ not needed; but support for extended names required making the
+ arrays of terminal capabilities separate from the TERMTYPE struc-
ture.
<STRONG>-e</STRONG> Dump the capabilities of the given terminal as a C initializer for
- a TERMTYPE structure (the terminal capability structure in the
- <STRONG><term.h></STRONG>). This option is useful for preparing versions of the
+ a TERMTYPE structure (the terminal capability structure in the
+ <STRONG><term.h></STRONG>). This option is useful for preparing versions of the
curses library hardwired for a given terminal type.
<STRONG>-F</STRONG> compare terminfo files. This assumes that two following arguments
- are filenames. The files are searched for pairwise matches
- between entries, with two entries considered to match if any of
- their names do. The report printed to standard output lists
- entries with no matches in the other file, and entries with more
- than one match. For entries with exactly one match it includes a
- difference report. Normally, to reduce the volume of the report,
- use references are not resolved before looking for differences,
+ are filenames. The files are searched for pairwise matches
+ between entries, with two entries considered to match if any of
+ their names do. The report printed to standard output lists
+ entries with no matches in the other file, and entries with more
+ than one match. For entries with exactly one match it includes a
+ difference report. Normally, to reduce the volume of the report,
+ use references are not resolved before looking for differences,
but resolution can be forced by also specifying <STRONG>-r</STRONG>.
- <STRONG>-f</STRONG> Display complex terminfo strings which contain if/then/else/endif
+ <STRONG>-f</STRONG> Display complex terminfo strings which contain if/then/else/endif
expressions indented for readability.
- <STRONG>-G</STRONG> Display constant literals in decimal form rather than their char-
+ <STRONG>-G</STRONG> Display constant literals in decimal form rather than their char-
acter equivalents.
- <STRONG>-g</STRONG> Display constant character literals in quoted form rather than
+ <STRONG>-g</STRONG> Display constant character literals in quoted form rather than
their decimal equivalents.
- <STRONG>-i</STRONG> Analyze the initialization (<STRONG>is1</STRONG>, <STRONG>is2</STRONG>, <STRONG>is3</STRONG>), and reset (<STRONG>rs1</STRONG>, <STRONG>rs2</STRONG>,
- <STRONG>rs3</STRONG>), strings in the entry, as well as those used for start-
- ing/stopping cursor-positioning mode (<STRONG>smcup</STRONG>, <STRONG>rmcup</STRONG>) as well as
+ <STRONG>-i</STRONG> Analyze the initialization (<STRONG>is1</STRONG>, <STRONG>is2</STRONG>, <STRONG>is3</STRONG>), and reset (<STRONG>rs1</STRONG>, <STRONG>rs2</STRONG>,
+ <STRONG>rs3</STRONG>), strings in the entry, as well as those used for start-
+ ing/stopping cursor-positioning mode (<STRONG>smcup</STRONG>, <STRONG>rmcup</STRONG>) as well as
starting/stopping keymap mode (<STRONG>smkx</STRONG>, <STRONG>rmkx</STRONG>).
- For each string, the code tries to analyze it into actions in
- terms of the other capabilities in the entry, certain X3.64/ISO
+ For each string, the code tries to analyze it into actions in
+ terms of the other capabilities in the entry, certain X3.64/ISO
6429/ECMA-48 capabilities, and certain DEC VT-series private modes
- (the set of recognized special sequences has been selected for
- completeness over the existing terminfo database). Each report
- line consists of the capability name, followed by a colon and
- space, followed by a printable expansion of the capability string
- with sections matching recognized actions translated into
+ (the set of recognized special sequences has been selected for
+ completeness over the existing terminfo database). Each report
+ line consists of the capability name, followed by a colon and
+ space, followed by a printable expansion of the capability string
+ with sections matching recognized actions translated into
{}-bracketed descriptions.
Here is a list of the DEC/ANSI special sequences recognized:
DECSTR soft reset (VT320)
S7C1T 7-bit controls (VT220)
-----------------------------------------
-
ISO DEC G0 enable DEC graphics for G0
+
ISO UK G0 enable UK chars for G0
ISO US G0 enable US chars for G0
ISO DEC G1 enable DEC graphics for G1
DEC[+-]AWM wraparound mode
DEC[+-]ARM auto-repeat mode
- It also recognizes a SGR action corresponding to ANSI/ISO
- 6429/ECMA Set Graphics Rendition, with the values NORMAL, BOLD,
- UNDERLINE, BLINK, and REVERSE. All but NORMAL may be prefixed
+ It also recognizes a SGR action corresponding to ANSI/ISO
+ 6429/ECMA Set Graphics Rendition, with the values NORMAL, BOLD,
+ UNDERLINE, BLINK, and REVERSE. All but NORMAL may be prefixed
with
<STRONG>o</STRONG> "+" (turn on) or
<STRONG>o</STRONG> "-" (turn off).
- An SGR0 designates an empty highlight sequence (equivalent to
+ An SGR0 designates an empty highlight sequence (equivalent to
{SGR:NORMAL}).
<STRONG>-l</STRONG> Set output format to terminfo.
<STRONG>-p</STRONG> Ignore padding specifications when comparing strings.
- <STRONG>-Q</STRONG> <EM>n</EM> Rather than show source in terminfo (text) format, print the com-
- piled (binary) format in hexadecimal or base64 form, depending on
+ <STRONG>-Q</STRONG> <EM>n</EM> Rather than show source in terminfo (text) format, print the com-
+ piled (binary) format in hexadecimal or base64 form, depending on
the option's value:
1 hexadecimal
3 hexadecimal and base64
+ For example, this prints the compiled terminfo value as a string
+ which could be assigned to the <STRONG>TERMINFO</STRONG> environment variable:
+
+ infocmp -0 -q -Q2
+
<STRONG>-q</STRONG> This makes the output a little shorter:
<STRONG>o</STRONG> Make the comparison listing shorter by omitting subheadings,
<STRONG>-w</STRONG> <EM>width</EM>
changes the output to <EM>width</EM> characters.
- <STRONG>-x</STRONG> print information for user-defined capabilities. These are exten-
- sions to the terminfo repertoire which can be loaded using the <STRONG>-x</STRONG>
- option of <STRONG>tic</STRONG>.
+ <STRONG>-x</STRONG> print information for user-defined capabilities (see <STRONG>user_caps(5)</STRONG>.
+ These are extensions to the terminfo repertoire which can be
+ loaded using the <STRONG>-x</STRONG> option of <STRONG>tic</STRONG>.
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
/usr/share/terminfo Compiled terminal description database.
+</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
+ Although System V Release 2 provided a terminfo library, it had no doc-
+ umented tool for decompiling the terminal descriptions. Tony Hansen
+ (AT&T) wrote the first <STRONG>infocmp</STRONG> in early 1984, for System V Release 3.
+
+ Eric Raymond used the AT&T documentation in 1995 to provide an equiva-
+ lent <STRONG>infocmp</STRONG> for ncurses. In addition, he added a few new features
+ such as:
+
+ <STRONG>o</STRONG> the <STRONG>-e</STRONG> option, to support <EM>fallback</EM> (compiled-in) terminal descrip-
+ tions
+
+ <STRONG>o</STRONG> the <STRONG>-i</STRONG> option, to help with analysis
+
+ Later, Thomas Dickey added the <STRONG>-x</STRONG> (user-defined capabilities) option,
+ and the <STRONG>-E</STRONG> option to support fallback entries with user-defined capa-
+ bilities.
+
+ For a complete list, see the <EM>EXTENSIONS</EM> section.
+
+ In 2010, Roy Marples provided an <STRONG>infocmp</STRONG> program for NetBSD. It is
+ less capable than the SVr4 or ncurses versions (e.g., it lacks the
+ sorting options documented in X/Open), but does include the <STRONG>-x</STRONG> option
+ adapted from ncurses.
+
+
+</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
+ X/Open Curses, Issue 7 (2009) provides a description of <STRONG>infocmp</STRONG>. It
+ does not mention the options used for converting to termcap format.
+
+
</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
- The <STRONG>-0</STRONG>, <STRONG>-1</STRONG>, <STRONG>-E</STRONG>, <STRONG>-F</STRONG>, <STRONG>-G</STRONG>, <STRONG>-Q</STRONG>, <STRONG>-R</STRONG>, <STRONG>-T</STRONG>, <STRONG>-V</STRONG>, <STRONG>-a</STRONG>, <STRONG>-e</STRONG>, <STRONG>-f</STRONG>, <STRONG>-g</STRONG>, <STRONG>-i</STRONG>, <STRONG>-l</STRONG>, <STRONG>-p</STRONG>, <STRONG>-q</STRONG>
+ The <STRONG>-0</STRONG>, <STRONG>-1</STRONG>, <STRONG>-E</STRONG>, <STRONG>-F</STRONG>, <STRONG>-G</STRONG>, <STRONG>-Q</STRONG>, <STRONG>-R</STRONG>, <STRONG>-T</STRONG>, <STRONG>-V</STRONG>, <STRONG>-a</STRONG>, <STRONG>-e</STRONG>, <STRONG>-f</STRONG>, <STRONG>-g</STRONG>, <STRONG>-i</STRONG>, <STRONG>-l</STRONG>, <STRONG>-p</STRONG>, <STRONG>-q</STRONG>
and <STRONG>-t</STRONG> options are not supported in SVr4 curses.
SVr4 infocmp does not distinguish between absent and cancelled capabil-
ities. Also, it shows missing integer capabilities as <STRONG>-1</STRONG> (the internal
- value used to represent missing integers). This implementation shows
+ value used to represent missing integers). This implementation shows
those as "NULL", for consistency with missing strings.
- The <STRONG>-r</STRONG> option's notion of "termcap" capabilities is System V Release
- 4's. Actual BSD curses versions will have a more restricted set. To
+ The <STRONG>-r</STRONG> option's notion of "termcap" capabilities is System V Release
+ 4's. Actual BSD curses versions will have a more restricted set. To
see only the 4.4BSD set, use <STRONG>-r</STRONG> <STRONG>-RBSD</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG>ter-</STRONG>
- <STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG>.
+ <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG>ter-</STRONG>
+ <STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG>. <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.
- http://invisible-island.net/ncurses/tctest.html
+ https://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171118).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20201107).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</ul>
</li>
<li><a href="#h2-FILES">FILES</a></li>
+<li><a href="#h2-HISTORY">HISTORY</a></li>
+<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
<li><a href="#h2-EXTENSIONS">EXTENSIONS</a></li>
<li><a href="#h2-BUGS">BUGS</a></li>
<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>