captoinfo(8) CLIX captoinfo(8)
NAME
captoinfo - Converts a termcap description into a terminfo description
SYNOPSIS
captoinfo [-v ... ] [-V] [-1] [-w width] file ...
FLAGS
-v Displays tracing information on stderr as the command runs.
Specifying additional -v flags will cause more detailed information
to be displayed.
-V Displays the version of the command in use on stderr and exit.
-1 Causes the fields to display one to a line. Otherwise, the fields
will be displayed several to a line to a maximum width of 60
characters.
-w Changes the output to width characters.
DESCRIPTION
The captoinfo command looks in file for termcap descriptions. For each
one found, an equivalent terminfo(4) description is written to stdout,
along with any comments found. A description that is expressed as
relative to another description (as specified in the termcap tc= field)
will be reduced to the minimum superset before being output.
If no file is given, then the environment variable $TERMCAP is used for
the filename or entry. If $TERMCAP is a full pathname to a file, only the
terminal whose name is specified in the environment variable $TERM is
extracted from that file. If the environment variable $TERMCAP is not
set, then the file /etc/termcap is read.
EXAMPLES
To convert each termcap entry in /etc/termcap to a terminfo entry:
captoinfo etc/termcap >terminfo.dat
The terminfo entries are written to terminfo.dat in the current directory.
FILES
/usr/lib/terminfo/?/* Compiled terminal description database.
NOTES
Certain termcap defaults are assumed to be true. For example, the bell
2/94 - Intergraph Corporation 1
captoinfo(8) CLIX captoinfo(8)
character (terminfo bel) is assumed to be ^G. The linefeed capability
(termcap nl) is assumed to be the same for both cursor_down and
scroll_forward (terminfo cud1 and ind, respectively.) Padding information
is assumed to belong at the end of the string.
The short two-letter name at the beginning of the list of names in a
termcap entry, a hold-over from an earlier version of the UNIX system, has
been removed.
CAUTIONS
The algorithm used to expand parameterized information for termcap fields,
such as cursor_position (termcap cm, terminfo cup) will sometimes produce
a string which, though technically correct, may not be optimal. In
particular, the rarely used termcap operation %n will produce strings that
are especially long. Most occurrences of these nonoptimal strings will be
flagged with a warning message and may need to be recoded by hand.
The captoinfo command should be used to convert termcap entries to
terminfo(4) entries because the termcap database (from earlier versions of
UNIX System V) may not be supplied in future releases.
DIAGNOSTICS
tgetent failed with return code n (reason)
The termcap entry is not valid. In particular, check for a tc=
entry that is not valid.
unknown type given for the termcap code cc.
The termcap description had an entry for cc whose type was not
boolean, numeric or string.
wrong type given for boolean (numeric, string)
termcap code cc.
The boolean termcap entry cc was entered as a numeric or string
capability.
the boolean (numeric, string) termcap code cc is not
a valid name.
An unknown termcap code was specified.
tgetent failed on TERM=term.
The terminal type specified could not be found in the termcap file.
TERM=term: cap cc (info ii) is NULL: REMOVED
The termcap code was specified as a null string. The correct way
to cancel an entry is with an @, as in :bs@:. Giving a null string
could cause incorrect assumptions to be made by the software that
uses termcap or terminfo.
function key for cc was specified but it already has
2 Intergraph Corporation - 2/94
captoinfo(8) CLIX captoinfo(8)
the value vv
When parsing the ko capability, the key <cc> was specified as
having the same value as the capability cc, but the key <cc>
already had a value assigned to it.
unknown termcap name cc specified in
the ko termcap capability.
A key was specified in the ko capability which could not be
handled.
the vi character v (info ii) has the value
xx, but ma gives n.
The ma capability specified a function key with a value different
from that specified in another setting of the same key.
the unknown vi key v was specified in
the ma termcap capability.
A vi key unknown to captoinfo was specified in the ma capability.
Warning: termcap sg (nn) and termcap ug (nn) had
different values.
The terminfo database assumes that the sg (now xmc) and ug values
were the same.
Warning: the string produced for ii may be inefficient.
The parameterized string being created should be rewritten by hand.
Null termname given.
The terminal type was null. This is given if the environment
variable TERM is not set or is null.
cannot open file for reading.
The specified file could not be opened.
EXIT VALUES
The captoinfo command exits with a value of 0 if successful and a value of
1 if it fails.
RELATED INFORMATION
Commands: infocmp(8), tic(8)
Functions: curses(3)
Files: terminfo(4)
AT&T UNIX System V Programmer's Guide
2/94 - Intergraph Corporation 3