tic

NAME

tic - the terminfo entry-description compiler

SYNOPSIS

tic [-cCINpru] [-v[n]] file

DESCRIPTION

The command tic(1) translates a terminfo file from source format into compiled format. The compiled format is necessary for use with the library routines in ncurses(3).

The results are normally placed in the system terminfo directory TERMINFO. There are two ways to change this behavior. First, you can override the system default by setting the variable TERMINFO in your shell environment to a valid (existing) directory name. Second, if tic(1) cannot get access to TERMINFO or your TERMINFO directory, it looks for the directory $HOME/.terminfo; if that directory exists, the entry is placed there.

Libraries that read terminfo entries are expected to check for a TERMINFO directory first, look at $HOME/.terminfo if TERMINFO is not set, and finally look in TERMINFO.

The tic(1) utility takes the following options:

-c
Only check file for errors, including syntax problems and bad use links. If you specify -C (-I) with this option, the code will print warnings about entries which, after use resolution, are more than 1023 (4096) bytes long. Due to a fixed buffer length in older termcap libraries (and a documented limit in terminfo), these entries can cause core dumps.
-vn
Write verbose output to standard error showing the progress of tic(1). The n is optional and specifies the level of detail; it can have a value from 1 through 10 inclusive, with 1 being the least detail and 10 the most. If n is not specified, it defaults to 1.

The debug flag levels are as follows:

1
Names of files created and linked.
2
Information related to the use facility.
3
Statistics from the hashing algorithm.
5
String-table memory allocations.
7
Entries into the string-table.
8
List of tokens encountered by scanner.
9
All values computed in construction of the hash table.
-C
Force source translation to termcap format. Capabilities that are not translatable are left in the entry under their terminfo names but commented out with two preceding dots.
-I
Force source translation to terminfo format.
-N
Disable smart defaults. Usually, when translating from termcap to terminfo, the compiler makes some assumptions about the defaults of string capabilities reset1_string, carriage_return, cursor_left, cursor_down, scroll_forward, tab, newline, key_backspace, key_left, and key_down, then attempts to use obsolete termcap capabilities to deduce correct values. It also normally suppresses output of obsolete termcap capabilities, such as bs. This option forces a more literal translation that also preserves the obsolete capabilities.
-r
Force entry resolution (so there are no remaining tc capabilities) even when doing translation to termcap format. You might need this if you are preparing a termcap file for a termcap library (such as GNU termcap up to version 1.3 or Berkeley Software Distribution (BSD) termcap up to 4.3BSD) that does not handle multiple tc capabilities per entry.
-Rsubset
Restrict output to a given subset. This option is for use with archaic versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX that have their own extensions incompatible with SVr4/XSI. Available subsets are "SVr1", "Ultrix", "HP", and "AIX"; see terminfo(1) for details.

The file contains one or more terminfo terminal descriptions in source format. Each description in the file describes the capabilities of a particular terminal.

All but one of the capabilities recognized by tic(1) are documented in terminfo(1). The use capability is documented here.

When a terminal entry being compiled contains a field of the form

use=entry_name
tic(1) reads in the binary from TERMINFO to complete the entry. (Entries created from file will be used first. If the environment variable TERMINFO is set, that directory is searched instead of TERMINFO.) The tic(1) utility makes the current entry a duplicate of the capabilities for entry_name except for any capabilities explicitly defined for the current entry.

When an entry, such as entry_name_1, contains a use=entry_name_2 field, any cancelled capabilities in entry_name_2 must also appear in entry_name_1 before use= for these capabilities to be canceled in entry_name_1

If the environment variable TERMINFO is set, the compiled results are placed there instead of TERMINFO.

Total compiled entries cannot exceed 4096 bytes. The name field cannot exceed 128 bytes. Terminal names exceeding 14 characters will be truncated to 14 characters and a warning message will be printed.

COMPATIBILITY

There is some evidence that historic tic(1) implementations treated description fields that contained no white space as additional aliases or short names. This tic(1) does not do that, but it warns when description fields might be treated that way, and checks them for dangerous characters.

EXTENSIONS

Unlike the stock SVr4 tic(1) command, this implementation can actually compile termcap sources. In fact, entries in terminfo and termcap syntax can be mixed in a single source file. See terminfo(1) for the list of termcap names taken to be equivalent to terminfo names.

The SVr4 manual pages are not clear on the resolution rules for use capabilities. This implementation of tic(1) will find use targets anywhere in the source file, or anywhere in the file tree routed at TERMINFO (if TERMINFO is defined), or in the user's $HOME/.terminfo directory (if it exists), or (finally) anywhere in the system's file tree of compiled entries.

The error messages from this tic(1) have the same format as GNU C error messages, and can be parsed by GNU Emacs's compile facility.

FILES

The tic(1) utility makes use of the following files:

TERMINFO/?/*
Compiled terminal description database.

SEE ALSO

infocmp(1)

toe(1)

curses(3)

terminfo(5)