infocmp - Compares or prints terminfo descriptions
infocmp [-c] [-d] [-n] [-I] [-L] [-C] [-r] [-u] [-s
d|i|l|c] [-v] [-V] [-1] [-w width] [-A directory] [-B
directory] [termname...]
Comparison Options
The infocmp command compares the terminfo description of
the first terminal's termname with the description of the
other terminal's termname entries. If a capability is
defined for only one of the terminals, the value returned
depends on the type of capability as follows: F for
Boolean variables, -1 for integer variables, and NULL for
string variables.
The options are as follows: Produces a list of each capability
that is different between the two entries. This
option is useful when displaying the differences between
two entries, created by different persons for the same or
similar terminals. Produces a list of each capability
that is the same between the two entries. Capabilities
that are not set are ignored. This option can be used to
determine the need of the -u option. Produces a list of
each capability that is in neither entry. If a termname
is not provided, the environment variable TERM is substituted
for each termname. This is a quick means of determining
whether or not anything was omitted from a description.
Source Listing Options [Toc] [Back]
The following options produce a source listing for each
terminal specified. If a termname is not specified, the
environment variable TERM is determines the terminal name.
Specifies that terminfo names be used. Specifies that the
long C variable names listed in <term.h> be used. Specifies
that the termcap names be used.
The source produced by this option may be used
directly as a termcap entry, but not all of the
information represented as parameter strings can be
changed to termcap format. The infocmp command
attempts to convert most of this data, but data
that is not converted is marked in the output and
commented. These strings should be edited manually.
Specifies that when using the -C option,
output all capabilities in termcap form.
All padding information for strings is collected and
placed at the beginning of the string as expected by termcap.
Mandatory padding (padding information with a trailing
`/' is optional.
All termcap variables that are not supported by terminfo,
but which are derived from other terminfo variables are
output. Not all terminfo capabilities are translated;
that is, only those variables which are typically a part
of termcap are output. Use the -r option to remove this
restriction.
Because padding is collected at the beginning of the capability,
not all capabilities are output. Mandatory
padding is not supported. As termcap strings are not as
flexible, converting a terminfo string capability into an
equivalent termcap format is not always possible. Likewise,
a subsequent conversion of the termcap file into
terminfo format does not necessarily reproduce the original
terminfo source.
Some common terminfo parameter sequences, their termcap
equivalents, and some terminal types which typically have
such sequences follows:
-------------------------------------------------------------
terminfo termcap Terminals
-------------------------------------------------------------
%p%c % adm
%p1%d %d hp, ANSI standard,
VT100
%p%'x'%+%c %+x concept
%i %i ANSI standard, VT100
%p1%?%'x'%>%t%p1%'y'%+%; %>xy concept
%p2 is printed before %r hp
%p1
-------------------------------------------------------------
User Options [Toc] [Back]
Produces a terminfo source description of the first terminal
specified by termname which is relative to the sum of
descriptions given by the entries for the other terminals
specified by termname. This is done by analyzing the differences
between the first termname and the remaining terminals
specified by termname and producing a description
with user fields for the other terminals. You can then
retrofit generic terminfo entries into a terminal's
description. Or, if two similar terminals exist, but were
coded at different times or by different people so that
each is a full description, using the infocmp command
shows what can be done to change one description relative
to the other.
A capability gets printed with an at sign (@) if it does
not exist in the first specified termname, but one of the
other entries contains a value for it. A capability's
value is printed if the value in the first specified
termname is not found in any other termname entry, or if
the first of the remaining termname entries that has this
capability provides a different value for the capability
that that listed in the first termname entry.
The order of the remaining termname entries is significant.
Because the tic command (terminfo compiler) performs
a left to right scan of the capabilities, specifying two
user entries that have differing descriptions for the same
capabilities produces varying results depending on the
order that the entries are specified. The infocmp command
options any inconsistencies between the termname entries
as they are encountered.
Alternately specifying a capability after a user entry
that contains that capability causes the second specification
to be ignored. Using the infocmp command to recreate
a description can be a useful check to ensure that everything
was specified correctly in the original source
description.
Another error that does not cause incorrect compiled
files, but which slows down the compilation time is specifying
users fields that are extraneous. The infocmp command
options any excess termname user fields.
Other Options [Toc] [Back]
Causes each field to print on an individual line. If not
specified, multiple fields are printed on a line up to a
maximum width of 60 characters. Sorts fields within each
type using the following arguments: Leaves fields in the
order that they are stored in the terminfo database.
Sorts by the terminfo name. Sorts by the long C variable
name. Sorts by the termcap name.
If the -s option is not specified, the field
printed are sorted alphabetically by the terminfo
name within each type, except in the case of the -C
or the -L options which sort by the termcap name or
the long C variable name respectively. Prints
tracing information to standard error during program
execution. Prints to standard error, the version
of number of the executing program. Outputs
information according to the specified width (in
characters).
Database Options [Toc] [Back]
The location of the compiled terminfo database is taken
from the environment variable TERMINFO. If the variable
is not defined or the terminal is not found in that location,
the system terminfo database (typically
/usr/share/lib/terminfo) is used. The following options
override the location: Sets the environment variable TERMINFO
to the name specified by the first directory entry.
Sets the environment variable TERMINFO to the name specified
by the second directory entry.
Using these options enables you to compare descriptions
for a terminal with the same name that is located in two
different databases or for comparing descriptions prepared
by different people.
Use the infocmp command to: Compare a binary terminfo
entry with other terminfo entries. Rewrite a terminfo
description to take advantage of the user (-u option) terminfo
field. Print a terminfo description from the binary
file (term) in a variety of formats. In all cases, the
Boolean fields are printed first, numeric fields next, and
string fields last.
If options are not specified and zero to one termname is
specified, the -I option is assumed. If more than one
termname is specified, the -d option is assumed.
Compiled terminal description database.
Commands: captoinfo(1), tic(1)
Functions: curses(3)
Files: terminfo(4)
infocmp(1)
[ Back ] |