COHERENT manpages

This page displays the COHERENT manpage for term [Format of compiled terminfo file].

List of available manpages
Index


term -- System Administration

Format of compiled terminfo file

Before it can be used, a file of terminfo information must be compiled with
the command tic. It is read by the command setupterm.

Once compiled,  the binary terminfo  file is moved into  a sub-directory of
directory /usr/lib/terminfo.  To avoid a  linear search of  a huge COHERENT
directory,  a  two-level   scheme  is  used  to  name  the  subdirectories:
/usr/lib/terminfo/C/name, where name names  the terminal and C is the first
character  of  name. For  example,  the  terminfo entry  for  the Wyse  150
terminal is  kept in the file  /usr/lib/terminfo/w/wyse150.  Synonyms for a
terminal exist as links to the same compiled file.

The binary  format of a terminfo  file has been designed to  be the same on
all hardware.  The file is  divided into six parts: header, terminal names,
boolean flags, numbers, strings, and string table.

Header

The header  section begins the  file.  This section  contains the following
six short integers:

1. The magic number (octal 0432).

2. The size, in bytes, of the names section.

3. The number of bytes in the boolean section.

4. The number of short integers in the numbers section.

5. The number of offsets (short integers) in the strings section.

6. The size, in bytes, of the string table.

A short  integer is  two bytes  long.  Under the  term file  format, 0xFFFF
represents -1;  all other  negative value  are illegal.  Minus  1 generally
means that a capability is  missing from this terminal.  All short integers
are aligned on a short-word boundary.

Names

The  names section  contains the  first line  of the  terminfo description,
which lists the  names for the terminal, each name  separated by a vertical
bar `|'.  The section is  terminated with a NUL.

Boolean

The boolean section contains the boolean flags for terminals.  There is one
flag for each boolean capacity  recognized by terminfo. The flags appear in
the order described in the header  file term.h. Each flag is one byte long,
and is set to zero or one, depending upon whether the capacity is absent or
present in this  terminal.  If necessary, this section is  ended with a NUL
to ensure that the next section begins on an even byte.

Numbers

The numbers  section is similar to  the flags section.  There  is one entry
for  each numeric  capacity  recognized by  terminfo,  each capacity  being
represented by a short integer.  A value of -1 indicates that this terminal
lacks this capability.  Entries appear in the order described in the header
file term.h.

Strings

The  strings  section  also contains  one  short  integer  for each  string
capability recognized  by terminfo. A value of -1  means that this terminal
lacks  this capability.   Otherwise,  the value  gives an  offset from  the
beginning of  the string table.   Entries appear in the  order described in
the header file term.h.

Special characters  in ^X  or \c notation  are stored in  their interpreted
form.  Padding  information and parameter information  are stored intact in
uninterpreted form.

String Table

The final section is the string table. It contains all the values of string
capabilities  referenced  in  the  string  section.   Each string  is  null
terminated.

Files

/usr/lib/terminfo/* -- Default location of object files

See Also

Administering COHERENT,
curses,
infocmp,
tic,
terminfo
Strang, J.,  Mui, L., O'Reilly, T.: termcap  and terminfo.  Sebastopol, CA:
O'Reilly & Associates, Inc., 1991.

Notes

The total  compiled file cannot exceed 4,096 bytes.   The name field cannot
exceed 128 bytes.