Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ term(4) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

infocmp(1M)

tic(1M)

curses(3X)

setupterm(3X)

terminfo(4)

term(5)

term(4)                                                             term(4)

NAME
     term - format of compiled terminfo files

SYNOPSIS
     /usr/lib/share/terminfo/?/*

DESCRIPTION
     Compiled terminfo(4) description files are placed under the directory
     /usr/share/lib/terminfo. In order to avoid a linear search of a huge
     UNIX 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, 97801 can be found in the
     file /usr/share/lib/terminfo/9/97801. 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 byte is assumed, but no assumptions about byte ordering or sign
     extension are made. Thus, these binary terminfo files can be trans-
     ported to other hardware with 8-bit bytes.

     Short integers are stored in two 8-bit bytes. The first byte contains
     the least significant 8 bits of the value, and the second byte con-
     tains the most significant 8 bits. (Thus, the value represented is
     256*second+first.) The value -1 is represented by 0377,0377, and the
     value -2 is represented by 0376,0377; other negative values are ille-
     gal. The -1 generally means that a capability is missing from this
     terminal. The -2 means that the capability has been cancelled in the
     terminfo source and also is to be considered missing.

     The compiled file is created from the source file descriptions of the
     terminals [see the -I option of infocmp(1M)] by using the terminfo
     compiler, tic(1M), and read by the routine setupterm(3X). The file is
     divided into six parts in the following order: the header, terminal
     names, boolean flags, numbers, strings, and string table.

     The header section begins the file. This section contains six short
     integers in the format described below. These integers are:

     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.






Page 1                       Reliant UNIX 5.44                Printed 11/98

term(4)                                                             term(4)

     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 bar (|) character [see termnames(5)]. The section is
     terminated with an ASCII NUL character.

     The boolean flags have one byte for each flag. This byte is either 0
     or 1 as the flag is present or absent. The value of 2 means that the
     flag has been cancelled. The capabilities are in the same order as the
     file <term.h>.

     Between the boolean section and the number section, a null byte is
     inserted, if necessary, to ensure that the number section begins on an
     even byte offset. All short integers are aligned on a short word boun-
     dary.

     The numbers section is similar to the boolean flags section. Each
     capability takes up two bytes, and is stored as a short integer. If
     the value represented is -1 or -2, the capability is taken to be miss-
     ing.

     The strings section is also similar. Each capability is stored as a
     short integer, in the format above. A value of -1 or -2 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 repre-
     sentation. Padding information ($<nn>) and parameter information (%x)
     are stored intact in uninterpreted form.

     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 data-
     base may 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 - this 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.













Page 2                       Reliant UNIX 5.44                Printed 11/98

term(4)                                                             term(4)

     As an example, here is terminal information on the 97801 terminal as
     output by the infocmp -I 97801 command:

     standard|97801|97808,
          am, hs, npc,
          cols#80, lines#24,
          acsc=+K\,L.N-Mf?jEkClBmDnJqAtFuGvIwHx@~\,, bel=^G,
          blink=\E[5m, cbt=\E[Z, civis=\E[6p, clear=\E[H\E[2J,
          cnorm=\E[7p, cr=\r, csr=\E[%i%p1%d;%p2%dr,
          cub=\E[%p1%dD, cub1=\b, cud=\E[%p1%dB, cud1=\E[B,
          cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
          cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
          dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M,
          dsl=\E[s\E[25;1H\E[K\E[u, ed=\E[0J, el=\E[0K\E[0m,
          fsl=\E[u, home=\E[H, ht=\t, ich=\E[%p1%d@, ich1=\E[@,
          il=\E[%p1%dL, il1=\E[L, ind=\E[S, indn=\E[%p1%dS,
          invis=\E[8m, is2=\E[0u\E[H\E[2J\E[1u\E[7p, kbs=\b,
          kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
          kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M, kdw=\Ep, kf1=\E@,
          kf10=\EJ, kf11=\EK, kf12=\EL, kf13=\EM, kf14=\EN,
          kf15=\EO, kf16=\EP, kf17=\E0, kf18=\E, kf19=\Ed,
          kf2=\EA, kf20=\ET, kf21=\EV, kf22=\EX, kf23=\E\s,
          kf24=\E;, kf25=\E", kf26=\E#, kf27=\E$, kf28=\E%,
          kf29=\E&, kf3=\EB, kf30=\E', kf31=\E<, kf32=\E=,
          kf33=\E*, kf34=\E+, kf35=\E\,, kf36=\E-, kf37=\E.,
          kf38=\E/, kf39=\E1, kf4=\EC, kf40=\E2, kf41=\E3,
          kf42=\EU, kf43=\EW, kf44=\EY, kf5=\ED, kf6=\EF,
          kf7=\EG, kf8=\EH, kf9=\EI, khlp=\E>, khome=\E[H,
          kich1=\E[@, kil1=\E[L, kind=\E[T, kiw=\Eo, kmenu=\n,
          kmode=\E4, kprt=\Eg, kri=\E[S, krst=\Em, krst=\Em,
          lf0=\E>, lf2=^D, nel=\EE, pctrm=USETERM:s97801pc:,
          rc=\E[u, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, rmacs=^O,
          rmso=\E[0m, rmul=\E[0m, sbt=\E9, sc=\E[s,
          sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;\
              2%;%?%p6%t;7%;%?%p7%t;8m%em%;%?%p9%t^N%e^O%;,
          sgr0=\E[0m^O, sht=\E:, smacs=^N,
          smcup=\E[1;24r\E[m^O\E)w, smso=\E[7m, smul=\E[4m,
          tsl=\E[s\E[25;1H,
















Page 3                       Reliant UNIX 5.44                Printed 11/98

term(4)                                                             term(4)

     And here is an octal dump of the term file, produced by the od -c
     /usr/share/lib/terminfo/9/97801 command:

     0000000 032 001 025  \0   %  \0   !  \0 211 001 324 002   s   t   a   n
     0000020   d   a   r   d   |   9   7   8   0   1   |   9   7   8   0   8
     0000040  \0  \0 001  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0  \0  \0
     0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0  \0  \0
     0000100  \0  \0  \0  \0  \0  \0   P  \0 377 377 030  \0 377 377 377 377
     0000120 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
     *
     0000200 377 377 377 377 377 377 377 377   b  \0   ^  \0   \  \0   v 001
     0000220 377 377 221  \0 203  \0 214  \0 377 377 377 377   f  \0   {  \0
     0000240 362  \0   P 001   `  \0 377 377   U 001   w  \0 377 377 177  \0
     0000260 377 377   b 001 231  \0   <  \0 377 377   3 001 214 001 377 377
     0000300   A 001 377 377 207 001 377 377   # 001 377 377   ( 001   7 001
     0000320   j 001 377 377   5 001   - 001 377 377 377 377 377 377   < 001
     0000340   o 001 377 377 377 377   M  \0 377 377   (  \0 377 377 377 377
     0000360   Z 001 241  \0 377 377   @ 002 377 377 377 377 377 377   f 001
     0000400 235  \0 225 001 377 377 377 377 377 377 377 377 245 001 300 001
     0000420 250 001 253 001 256 001 261 001 264 001 267 001 272 001 275 001
     0000440 241 001   ^ 001 245  \0 235 001 377 377 377 377 377 377 231 001
     0000460 265  \0 255  \0 377 377 221 001 377 377 377 377   * 002 377 377
     0000500 377 377   - 002 377 377 377 377 377 377 377 377 377 377 377 377
     0000520 377 377 377 377 377 377 313  \0 377 377 032 001  \0 001 316  \0
     0000540 021 001 271  \0 366  \0 340  \0 351  \0 302  \0 327  \0 377 377
     0000560 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
     0000600 377 377 377 377  \r 001 377 377  \t 001 261  \0 251  \0   O 002
     0000620 377 377 377 377   t 001   Q  \0 377 377 377 377 377 377 377 377
     0000640 377 377 377 377 377 377 377 377 377 377 377 377 261 002 377 377
     0000660   B 002 377 377 377 377 377 377 377 377 377 377 377 377 377 377
     0000700 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
     0000720 377 377 377 377 377 377 377 377   2 002 377 377 377 377 377 377
     0000740 377 377 377 377 377 377 377 377   / 002 377 377 377 377 377 377
     0000760 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
     *
     0001060 377 377 377 377 377 377 377 377 303 001 306 001 311 001 314 001
     0001100 317 001 322 001 325 001 330 001 333 001 336 001 341 001 344 001
     0001120 347 001 352 001 355 001 360 001 363 001 366 001 371 001 374 001
     0001140  \0 002 003 002 006 002  \t 002  \f 002 017 002 022 002 025 002
     0001160 030 002 033 002 036 002   ! 002   $ 002   ' 002 377 377 377 377
     0001200 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
     *
     0001600 377 377 377 377 377 377 025  \0 377 377 377 377   ; 002   8 002
     0001620   5 002   > 002   F 002   I 002   L 002   s   t   a   n   d   a
     0001640   r   d   |   9   7   8   0   1   |   9   7   8   0   8  \0   U
     0001660   S   E      T   E   R   M   :   s   9   7   8   0   1   p   c
     0001700   :  \0 033   [   0   u 033   [   H 033   [   2   J 033   [   1
     0001720   u 033   [   7   p  \0 033   [   s 033   [   2   5   ;   1   H
     0001740 033   [   K 033   [   u  \0 033   [   u  \0 033   [   s 033   [
     0001760   2   5   ;   1   H  \0  \r  \0 007  \0  \b  \0 033   [   Z  \0
     0002000 033   [   %   i   %   p   1   %   d   ;   %   p   2   %   d   H
     0002020  \0 033   [   C  \0 033   [   B  \0 033   [   A  \0 033   [   0


Page 4                       Reliant UNIX 5.44                Printed 11/98

term(4)                                                             term(4)

     0002040   K 033   [   0   m  \0 033   [   0   J  \0 033   [   H 033   [
     0002060   2   J  \0 033   [   M  \0 033   [   M  \0 033   [   L  \0 033
     0002100   [   L  \0 033   [   T  \0 033   [   S  \0 033   [   S  \0 033
     0002120   [   T  \0 033   [   %   p   1   %   d   S  \0 033   [   %   p
     0002140   1   %   d   T  \0 033   E  \0 033   [   %   p   1   %   d   B
     0002160  \0 033   [   %   p   1   %   d   A  \0 033   [   %   p   1   %
     0002200   d   D  \0 033   [   %   p   1   %   d   C  \0 033   [   H  \0
     0002220 033   [   %   p   1   %   d   L  \0  \0 033   [   %   p   1   %
     0002240   d   M  \0 033   [   s  \0 033   [   u  \0 033   [   %   p   1
     0002260   %   d   @  \0 033   [   %   p   1   %   d   P  \0 033   [   8
     0002300   m  \0 033   [   7   m  \0 033   [   0   m 017  \0 016  \0 017
     0002320  \0 033   [   7   m  \0 033   [   0   m  \0 033   [   1   ;   2
     0002340   4   r 033   [   m 017 033   )   w  \0 033   [   6   p  \0 033
     0002360   [   7   p  \0 033   [   @  \0 033   [   @  \0 033   [   P  \0
     0002400 033   [   P  \0 033   [   4   m  \0 033   [   0   m  \0  \t  \0
     0002420 033   [   %   i   %   p   1   %   d   ;   %   p   2   %   d   r
     0002440  \0 033   [   2   m  \0 033   [   5   m  \0 033   [   A  \0 033
     0002460   [   B  \0 033   [   C  \0 033   [   D  \0 033   [   H  \0 033
     0002500   @  \0 033   A  \0 033   B  \0 033   C  \0 033   D  \0 033   F
     0002520  \0 033   G  \0 033   H  \0 033   I  \0 033   J  \0 033   K  \0
     0002540 033   L  \0 033   M  \0 033   N  \0 033   O  \0 033   P  \0 033
     0002560   0  \0 033     \0 033   d  \0 033   T  \0 033   V  \0 033   X
     0002600  \0 033      \0 033   ;  \0 033   "  \0 033   #  \0 033   $  \0
     0002620 033   %  \0 033   &  \0 033   '  \0  \0 033   <  \0 033   =  \0
     0002640 033   *  \0 033   +  \0 033   ,  \0 033   -  \0 033   .  \0 033
     0002660   /  \0 033   1  \0 033   2  \0 033   3  \0 033   U  \0 033   W
     0002700  \0 033   Y  \0 033   >  \0 004  \0 033   g  \0 033   >  \0 033
     0002720   m  \0 033   9  \0 033   :  \0  \n  \0  \b  \0 033   [   Z  \0
     0002740 033   4  \0 033   p  \0 033   o  \0 033   [   0   %   ?   %   p
     0002760   1   %   t   ;   7   %   ;   %   ?   %   p   2   %   t   ;   4
     0003000   %   ;   %   ?   %   p   3   %   t   ;   7   %   ;   %   ?   %
     0003020   p   4   %   t   ;   5   %   ;   %   ?   %   p   5   %   t   ;
     0003040   2   %   ;   %   ?   %   p   6   %   t   ;   7   %   ;   %   ?
     0003060   %   p   7   %   t   ;   8   m   %   e   m   %   ;   %   ?   %
     0003100   p   9   %   t 016   %   e 017   %   ;  \0   +   K   ,   L   .
     0003120   N   -   M   f   ?   j   E   k   C   l   B   m   D   n   J   q
     0003140   A   t   F   u   G   v   I   w   H   x   @   ~   ,  \0
     0003156

     Some limitations: total compiled entries cannot exceed 4096 bytes; all
     entries in the name field cannot exceed 128 bytes.

FILES
     /usr/share/lib/terminfo/?/*
          compiled terminal description database

     /usr/include/term.h
          terminfo header file

SEE ALSO
     infocmp(1M), tic(1M), curses(3X), setupterm(3X), terminfo(4), term(5),
     termnames(5).


Page 5                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026