Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ infocmp(1M) — sys5 — Apollo Domain/OS SR10.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tic(1M)

curses(3X)

term(4)

terminfo(4)

captoinfo(1M)

INFOCMP(1M)                          SysV                          INFOCMP(1M)



NAME
     infocmp - compare or print out terminfo descriptions

SYNOPSIS
     infocmp [-d] [-c] [-n] [-I] [-L] [-C] [-r] [-u] [-s d|i|l|c] [-v] [-V]
     [-1] [-wwidth] [-Adirectory] [-Bdirectory] [termname ...]

DESCRIPTION
     infocmp compares a binary terminfo(4) entry with other terminfo entries,
     rewrites a terminfo(4) description to take advantage of the use= terminfo
     field, or prints a terminfo(4) description from the binary file (term(4))
     in a variety of formats.  In all cases, Boolean fields are printed first,
     followed by numeric fields, followed by string fields.

     infocmp compares the terminfo(4) description of the first terminal
     termname with each description given by the entries for the other
     terminal's termnames.  If a capability is defined for only one of the
     terminals, the value returned depends on the type of the capability: F
     for Boolean variables, -1 for integer variables, and NULL for string
     variables.

     -I, -L, and -C produce a source listing for each terminal named.

OPTIONS
     -d   (Comparison option) Produce a list of each capability that is
          different.  If you have two entries for the same or similar
          terminals, infocmp shows what is different between the two entries.
          Use this when more than one person produces an entry for the same
          terminal and you want to see what is different between the two.

     -c   (Comparison option) Produce a list of each capability that is common
          to the two entries.  Capabilities that are not set are ignored.  Use
          this as a quick check to see if the -u option is worth using.

     -n   (comparison option) Produce a list of each capability that is in
          neither entry.  If no termname is given, the environment variable
          TERM is used for both termnames.  Use this as a quick check to see
          if anything was left out of the description.

     -I   (Source-listing option) Use the terminfo(4) names.

     -L   (Source-listing option) Use the long C variable name listed in
          <term.h>

     -C   (Source-listing option) Use the termcap names

     -r   (Source-listing option) When using -C, put out all capabilities in
          termcap form.  If no termnames are given, the environment variable
          TERM is used for the terminal name.  The source produced by the -C
          option may be used directly as a termcap entry, but not all of the
          string parameters may be changed to the termcap format.  infocmp
          converts most of the parameter information, and that which it
          doesn't is plainly marked in the output and commented out.  These
          should be edited by hand.  All padding information for strings is
          collected and placed at the beginning of the string where termcap
          expects it.  Mandatory padding (padding information with a trailing
          '/') becomes optional.  All termcap variables no longer supported by
          terminfo(4), but derivable from other terminfo(4) variables, are
          output.  Not all terminfo(4) capabilities are translated; only those
          variables that were part of termcap are normally output.  Specifying
          -r removes this restriction, allowing all capabilities to be output
          in termcap form.  Note that because padding is collected to the
          beginning of the capability, not all capabilities are output,
          mandatory padding is not supported, and termcap strings are not as
          flexible, it is not always possible to convert a terminfo(4) string
          capability into an equivalent termcap format.  Not all of these
          strings can be converted.  A subsequent conversion of the termcap
          file back into terminfo(4) format will not necessarily reproduce the
          original terminfo(4) source.  The follwoing are some common terminfo
          parameter sequences, their termcap equivalents, and some terminal
          types that commonly have such sequences,
             Terminfo                    Termcap   Representative Terminals

             %p1%c                       %.        adm
             %p1%d                       %d        hp, ANSI standard, vt100
             %p1%'x'%+%c                 %+x       concept
             %i                          %i        ANSI standard, vt100
             %p1%?%'x'%>%t%p1%'y'%+%;    %>xy      concept
             %p2 is printed before %p1   %r        hp


     -u   (use= option) Produce a terminfo(4) source description of the first
          terminal termname that is relative to the sum description given by
          the entries for the other terminals termnames.  infocmp does this by
          analyzing the differences between the first termname and the other
          termnames and producing a description with use= fields for the other
          terminals.  In this manner, you can to 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 description is a full description, infocmp shows what can
          be done to change one description to be relative to the other.  A
          capability is printed with an at-sign (@) if it no longer exists in
          the first termname, but one of the other termname entries contains a
          value for it.  A capability's value gets printed if the value in the
          first termname is not found in any of the other termname entries, or
          if the first of the other termname entries that has this capability
          gives a different value for the capability than that in the first
          termname.  The order of the other termname entries is significant.
          Since the terminfo compiler tic(1M) does a left-to-right scan of the
          capabilities, specifying two use= entries that contain differing
          entries for the same capabilities produces different results
          depending on the order that the entries are given in.  infocmp flags
          any such inconsistencies between the other termname entries as they
          are found.  Alternatively, specifying a capability after a use=
          entry that contains that capability causes the second specification
          to be ignored.  Using infocmp to recreate a description can be
          useful to make sure that everything was specified correctly in the
          original source description.  Another error that does not cause
          incorrect compiled files, but slows down the compilation time, is
          specifying superfluous use= fields. infocmp flags any other termname
          use= fields that are not needed.

     -s   Sort the fields within each type according to the argument below:

             d    Leave fields in the order that they are stored in the
                  terminfo database.

             i    Sort by terminfo name.

             l    Sort by the long C variable name.

             c    Sort by the termcap name.

             If no -s option is given, fields printed out are sorted
             alphabetically by the terminfo name within each type, except in
             the case of the -C or the -L options, which cause the sorting to
             be done by the termcap name or the long C variable name,
             respectively.

     -v   Print tracing information on standard error as the program runs.

     -V   Print the version of the program in use on standard error and exit.

     -1   Print fields, one to a line.  Otherwise, the fields are printed
          several to a line, to a maximum width of 60 characters.

     -w width
          Change the output to width characters.

     [-Adirectory] [-Bdirectory]
          (Changing databases) The location of the compiled terminfo(4)
          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(4) database, usually in
          /usr/lib/terminfo, is used.  -A and -B may be used to override this
          location.  -A sets TERMINFO for the first termname, and -B sets
          TERMINFO for the other termnames.  Now you can compare descriptions
          for a terminal with the same name located in two different
          databases.  This is useful for comparing descriptions for the same
          terminal created by different people.  Otherwise, the terminals
          would have to be named differently in the terminfo(4) database for a
          comparison to be made.

NOTES
     The termcap database (from earlier releases of UNIX System V) may not be
     supplied in future releases.

     If no options are specified and zero or one termnames are specified, -I
     is assumed.  If more than one termname is specified, -d is assumed.

FILES
     /usr/lib/terminfo/?/*
                    Compiled terminal description database

DIAGNOSTICS
     malloc is out of space!
               There is not enough memory available to process all the
               terminal descriptions requested.  Run infocmp several times,
               each time including a subset of the desired termnames.

     use= order dependency found:
               A value specified in one relative terminal specification is
               different from that in another relative terminal specification.

     'use=term' did not add anything to the description.
               A relative terminal name did not contribute anything to the
               final description.

     must have at least two terminal names for a comparison
     to be done.
               The -u, -d and -c options require at least two terminal names.

SEE ALSO
     tic(1M), curses(3X), term(4), terminfo(4) captoinfo(1M)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026