|
» |
|
|
|
NAMEterm — format of compiled term file DESCRIPTIONCompiled terminfo descriptions are placed under the directory
/usr/share/lib/terminfo.
In order to avoid a linear search of a huge
HP-UX
system directory, a two-level scheme is used:
/usr/share/lib/terminfo/c/name
where
name
is the name of the terminal, and
c
is the first character of
name.
Thus,
hp110
can be found in the file
/usr/share/lib/terminfo/h/hp110.
Synonyms for the same terminal
are implemented by multiple links to the same compiled file. The format has been chosen so that it is the same on all hardware.
An 8-bit or longer byte is assumed,
but no assumptions about byte ordering
or sign extension are made. The compiled file is created using the
tic
program (see
tic(1M)),
and read by the
setupterm()
routine.
The file is divided into the following six parts:
- 1.
The header section begins the file and contains six short integers
in the following format:
- 1.
Magic number (octal 0432); - 2.
Size, in bytes, of the names section; - 3.
Number of bytes in the Boolean section; - 4.
Number of short integers in the numbers section; - 5.
Number of offsets (short integers) in the strings section; - 6.
Size, in bytes, of the string table.
Short integers are stored in two 8-bit bytes.
The first byte contains the least significant 8 bits of the value;
the second byte contains the most significant 8 bits.
(Thus, the value represented is 256*second+first.)
The value -1 is represented by
0377,
0377;
other negative values are illegal.
The -1 generally means
that a capability is missing from this terminal.
Note that this format corresponds to the hardware of the
VAX
and
PDP-11.
Machines where this does not correspond to the hardware
read the integers as two bytes and compute the result. - 2.
The terminal names section comes next.
It contains the first line of the terminfo description,
listing the various names for the terminal,
separated by the
|
character.
The section is terminated with an
ASCII NUL
character. - 3.
In the Boolean section,
the Boolean flags have one byte for each flag.
This byte is either
0
or
1
as the flag is absent or present, respectively.
The capabilities are in the same order as they are listed in the file
<term.h>. Between the Boolean section and the number section,
a null byte will be inserted, if necessary,
to ensure that the number section begins on an even byte.
All short integers are aligned on a short word boundary. - 4.
The numbers section is similar to the flags section.
Each capability consists of two bytes,
and is stored as a short integer.
If the value represented is -1,
the capability is considered missing. - 5.
The strings section is also similar.
Each capability is stored as a short integer in the format above.
A value of -1 means the capability is missing.
Otherwise, the value is taken as an offset
from the beginning of the string table.
Special characters in
^X
or
\c
notation are stored in their
interpreted form, not the printing representation.
Padding information
$nn
and parameter information
%x
are stored intact in uninterpreted form. - 6.
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.
Note that it is possible for
setupterm()
to expect a different set of capabilities
than are actually present in the file.
Either the database might have been updated since
setupterm()
has been recompiled
(resulting in extra unrecognized entries in the file)
or the program may have been recompiled more recently
than the database was updated
(resulting in missing entries).
The routine
setupterm()
must be prepared for both possibilities,
which is why the numbers and sizes are included.
Also, new capabilities must always be added at the end of the lists
of Boolean, number, and string capabilities. The following example is an octal dump
of the description for the
HP
Portable Computer (HP-110):
110|hp110|hp110a portable computer,
am, xhp, da, db, mir, cols#80, lines#16, lm#0,
cbt=\Ei, bel=^G, cr=\r, tbc=\E3, clear=\E&a0y0C\EJ,
el=\EK, ed=\EJ, hpa=\E&a%p1%dC, cup=\E&a%p1%dy%p2%dC,
cud1=\EB, cub1=\b, cuf1=\EC, cuu1=\EA, cvvis=\E&j@,
dch1=\EP, dl1=\EM, smir=\EQ, smso=\E&dB, sgr0=\E&d@,
rmir=\ER, rmso=\E&d@, is2=\E&j@,
if=/usr/share/lib/tabset/stdcrt, il1=\EL, kbs=\b, kcud1=\EB,
khome=\Eh, kcub1=\ED, kcuf1=\EC, kcuu1=\EA, rmkx=\E&s0A,
smkx=\E&s1A, vpa=\E&a%p1%dY, ind=\n, hts=\E1, ht=\t,
0000 032 001 # \0 025 \0 \b \0 223 \0 254 \0 1 1 0 |
0020 h p 1 1 0 | h p 1 1 0 a p o r
0040 t a b l e c o m p u t e r \0 \0
0060 001 \0 001 \0 \0 \0 \0 \0 \0 \0 001 001 001 \0 \0 \0
0100 \0 \0 \0 \0 P \0 377 377 020 \0 \0 \0 377 377 377 377
0120 377 377 377 377 \0 \0 003 \0 005 \0 377 377 007 \0 \n \0
0140 024 \0 027 \0 032 \0 377 377 $ \0 4 \0 377 377 377 377
0160 7 \0 377 377 377 377 9 \0 377 377 < \0 ? \0 D \0
0200 G \0 377 377 377 377 377 377 377 377 377 377 377 377 377 377
0220 377 377 J \0 377 377 377 377 377 377 M \0 377 377 377 377
0240 377 377 R \0 377 377 377 377 W \0 Z \0 377 377 377 377
0260 377 377 377 377 377 377 _ \0 377 377 d \0 377 377 { \0
0300 377 377 ~ \0 377 377 377 377 377 377 377 377 377 377 200 \0
0320 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
0340 377 377 377 377 377 377 377 377 377 377 377 377 203 \0 377 377
0360 377 377 206 \0 377 377 377 377 377 377 211 \0 377 377 377 377
0400 377 377 214 \0 217 \0 225 \0 377 377 377 377 377 377 377 377
0420 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
0520 377 377 233 \0 377 377 245 \0 377 377 377 377 247 \0 377 377
0540 252 \0 377 377 377 377 377 377 377 377 377 377 377 377 377 377
0560 377 377 377 377 377 377 377 377 377 377 033 i \0 007 \0 \r
0600 \0 033 3 \0 033 & a 0 y 0 C 033 J \0 033 K
0620 \0 033 J \0 033 & a % p 1 % d C \0 033 &
0640 a % p 1 % d y % p 2 % d C \0 033 B
0660 \0 \b \0 033 C \0 033 A \0 033 & j @ \0 033 P
0700 \0 033 M \0 033 Q \0 033 & d B \0 033 & d @
0720 \0 033 R \0 033 & d @ \0 033 & j @ \0 / u
0740 s r / l i b / t a b s e t / s t
0760 d c r t \0 033 L \0 \b \0 033 B \0 033 h \0
1000 033 D \0 033 C \0 033 A \0 033 & s 0 A \0 033
1020 & s 1 A \0 033 & a % p 1 % d Y \0 \n
1040 \0 033 1 \0 \t \0
1046 WARNINGSTotal compiled entries cannot exceed 4096 bytes. The name field cannot exceed 128 bytes. Hewlett-Packard Company supports only those terminals
that are listed on the current list of supported devices.
However, both non-supported and supported terminals
may be in the terminfo database.
If non-supported terminals are used, they may not work correctly. FILES- /usr/share/lib/terminfo/?/*
compiled terminal capability data base
|