TERMCAP(1L)

NAME
termcap - a termcap compiler

SYNOPSIS
termcap [ options ]

DESCRIPTION
termcap reads termcap entries and outputs them in standard order and with standard escape sequences. This allows to convert termcap files into a comparable format.

The termcap database is an ASCII representation of the data so people may believe that there is no need for a compiler. Syntax checks and unification however are a property of compilers. The termcap progam checks for correct data types, outputs all entries in a unique order and recodes all strings with the same escape notation. This is needed in to compare two entries and it makes life easier.

When termcap compiles entries, it checks the entries for noncompliances. If any problems were found, it inserts comments in the form:

# NOTICE(name) some reason

or

# BAD(name) some reason

before the related termcap entry. These comments should be carefully checked. Frequent problems are illegally escaped colons \: instead of \072 that in most cases have been created by defective terminfo software.

OPTIONS

-help
    Prints a short summary of the termcap(1) options and exists.

-version
    Prints the termcap(1) version number string and exists.

-dooctal
    When printing terminal capabilities, prefer octal output like \003 before escape sequences like ^C.

-dumplist
    Dump the complete internal list of terminal capabilities.

if=filename
    Read the file filename with many termcap entries and produce compiled output in standard order on stdout. This option is used in order to recompile a whole set of termcap entries.

-inorder
    Output all capabilities in the standard order. First the boolean capabilities, then the numeric capabilities and at last the string capabilities. Without -inorder, the obsolete capabilities are printed last.

-gnugoto
    Allow the GNU tgoto() format extexsions %C and %m.

-nowarn
    Do not warn about incorrect entries that could be fixed by asuming that the problem is a result from not correctly converting escape sequences in terminfo syntax to termcap syntax. For this purpose, currently null characters (\0) are converted to \200. In addition, the escape sequences \e, \:, \,, \s and \l are mapped to ESCAPE, ':', ',', ' ' and LINEFEED.

-tc Follow tc= entries and generate cumulative output. Amongst others, this allows to retrieve the cumulative size of the related termcap entry. Termcap normally does not interpret tc= entries in order to allow the entries to be reused the same way they are in the termcap file.

-v  Increment verbose level. By default, termcap only prints a recoded termcap entry. With increasing verbose level, more information on the termcap entry is printed. With a higher verbose level, termcap prints the size of the termcap entry.

ENVIRONMENT

HOME
    To find the private files like ~/.termcap

TERM
    The type of terminal for which the output should be formatted.

TERMCAP
    This environment variable holds either a precompiled termcap entry or the pathname to be used to find a termcap database file. If it holds a precompiled entry that does not match the TERM environment, the termcap database is parsed as if the TERMCAP environment is not set.

TERMPATH
    If TERMCAP is empty, then the TERMPATH environment is scanned for pathnames of files that contain a termcap database. It holds a list of filenames separated by colons or spaces (i.e., ":" or " "). If the TERMPATH symbol is not set, the files $HOME/.termcap and /etc/termcap are scanned in that order. If a pathname in TERMPATH does not start with a slash ("/"), then the HOME environment is prepended to the name.

FILES

/etc/termcap
    The system's terminal capabilities database.

~/.termcap
    The private terminal capabilities database.

NOTES

BUGS