- 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 contains the most significant 8 bits.
- (Thus, the value represented is 256*second+first.) The
- value -1 is represented by the two bytes 0377, 0377; other
- negative values are illegal. This value generally means
- that the corresponding capability is missing from this
- terminal. Note that this format corresponds to the hard-
- ware of the VAX and PDP-11 (that is, little-endian
- machines). Machines where this does not correspond to the
- hardware must read the integers as two bytes and compute
- the little-endian value.
-
- The terminal names section comes next. It contains the
- first line of the terminfo description, listing the vari-
- ous names for the terminal, separated by the `|' charac-
- ter. The section is terminated with an ASCII NUL charac-
- ter.
-
- The boolean flags have one byte for each flag. This byte
- is either 0 or 1 as the flag is present or absent. The
- capabilities are in the same order as 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 (this is a relic of
- the PDP-11's word-addressed architecture, originally
- designed in to avoid IOT traps induced by addressing a
- word on an odd byte boundary). All short integers are
- aligned on a short word boundary.
-
- The numbers section is similar to the flags section. Each
- capability takes up two bytes, and is stored as a little-
- endian short integer. If the value represented is -1, the
- capability is taken to be missing.
-
- 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 repre-
- sentation. Padding information $<nn> and parameter infor-
- mation %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.
-
- <STRONG>EXTENDED</STRONG> <STRONG>STORAGE</STRONG> <STRONG>FORMAT</STRONG>
- The previous section describes the conventional terminfo
- binary format. With some minor variations of the offsets
- (see PORTABILITY), the same binary format is used in all
- modern UNIX systems. Each system uses a predefined set of
- boolean, number or string capabilities.
-
- The ncurses libraries and applications support extended
- terminfo binary format, allowing users to define capabili-
- ties which are loaded at runtime. This extension is made
- possible by using the fact that the other implementations
- stop reading the terminfo data when they have reached the
- end of the size given in the header. ncurses checks the
- size, and if it exceeds that due to the predefined data,
- continues to parse according to its own scheme.
+ 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 contains
+ the most significant 8 bits. (Thus, the value represented is 256*sec-
+ ond+first.) The value -1 is represented by the two bytes 0377, 0377;
+ other negative values are illegal. This value generally means that the
+ corresponding capability is missing from this terminal. Note that this
+ format corresponds to the hardware of the VAX and PDP-11 (that is, lit-
+ tle-endian machines). Machines where this does not correspond to the
+ hardware must read the integers as two bytes and compute the little-
+ endian value.
+
+ 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.
+
+ The boolean flags have one byte for each flag. This byte is either 0
+ or 1 as the flag is present or absent. The capabilities are in the
+ same order as 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 (this is a relic of the PDP-11's word-addressed architecture,
+ originally designed in to avoid IOT traps induced by addressing a word
+ on an odd byte boundary). All short integers are aligned on a short
+ word boundary.
+
+ The numbers section is similar to the flags section. Each capability
+ takes up two bytes, and is stored as a little-endian short integer. If
+ the value represented is -1, the capability is taken to be missing.
+
+ 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 begin-
+ ning 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.
+
+ 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.
+
+
+</PRE><H3><a name="h3-EXTENDED-STORAGE-FORMAT">EXTENDED STORAGE FORMAT</a></H3><PRE>
+ The previous section describes the conventional terminfo binary format.
+ With some minor variations of the offsets (see PORTABILITY), the same
+ binary format is used in all modern UNIX systems. Each system uses a
+ predefined set of boolean, number or string capabilities.
+
+ The ncurses libraries and applications support extended terminfo binary
+ format, allowing users to define capabilities which are loaded at run-
+ time. This extension is made possible by using the fact that the other
+ implementations stop reading the terminfo data when they have reached
+ the end of the size given in the header. ncurses checks the size, and
+ if it exceeds that due to the predefined data, continues to parse
+ according to its own scheme.