Content-type: text/html Man page of infocmp

infocmp

Section: User Commands (1)
Index Return to Main Contents
 

NAME

infocmp - Compares or prints terminfo descriptions  

SYNOPSIS

infocmp [-c] [-d] [-n] [-I] [-L] [-C] [-r] [-u] [-s d|i|l|c] [-v] [-V] [-l] [-w width] [-A directory] [-B directory] [termname...]


 

OPTIONS


 

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

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:


terminfotermcapTerminals

%p%c%adm
%p1%d%d hp, ANSI standard, VT100
%p%'x'%+%c%+xconcept
%i%iANSI standard, VT100
%p1%?%'x'%>%t%p1%'y'%+%;%>xyconcept
%p2 is printed before %p1 %rhp


 

User Options

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

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

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.
 

DESCRIPTION

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 or one termname is specified, the -I option is assumed. If more than one termname is specified, the -d option is assumed.
 

FILES

Compiled terminal description database.
 

SEE ALSO

Commands:  captoinfo(1), tic(1)

Functions:  curses(3)

Files:  terminfo(4)


 

Index

NAME
SYNOPSIS
OPTIONS
Comparison Options
Source Listing Options
User Options
Other Options
Database Options
DESCRIPTION
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:42:56 GMT, October 02, 2010