- Note that it is possible for <STRONG>setupterm</STRONG> to expect a differ-
- ent set of capabilities than are actually present in the
- file. Either the database may have been updated since
- <STRONG>setupterm</STRONG> has been recompiled (resulting in extra unrecog-
- nized entries in the file) or the program may have been
- recompiled more recently than the database was updated
- (resulting in missing entries). The routine <STRONG>setupterm</STRONG>
- 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.
-
- Despite the consistent use of little-endian for numbers
- and the otherwise self-describing format, it is not wise
- to count on portability of binary terminfo entries between
- commercial UNIX versions. The problem is that there are
- at least three versions of terminfo (under HP-UX, AIX, and
- OSF/1) which diverged from System V terminfo after SVr1,
- and have added extension capabilities to the string table
- that (in the binary format) collide with System V and XSI
- Curses extensions. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for detailed discus-
- sion of terminfo source compatibility issues.
+
+</PRE><H3><a name="h3-setupterm">setupterm</a></H3><PRE>
+ Note that it is possible for <STRONG>setupterm</STRONG> to expect a different set of
+ capabilities than are actually present in the file. Either the data-
+ base may have been updated since <STRONG>setupterm</STRONG> has been recompiled (result-
+ ing 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 <STRONG>setupterm</STRONG> 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 bool-
+ ean, number, and string capabilities.
+
+
+</PRE><H3><a name="h3-Binary-format">Binary format</a></H3><PRE>
+ X/Open Curses does not specify a format for the terminfo database.
+ UNIX System V curses used a directory-tree of binary files, one per
+ terminal description.
+
+ Despite the consistent use of little-endian for numbers and the other-
+ wise self-describing format, it is not wise to count on portability of
+ binary terminfo entries between commercial UNIX versions. The problem
+ is that there are at least three versions of terminfo (under HP-UX,
+ AIX, and OSF/1) which diverged from System V terminfo after SVr1, and
+ have added extension capabilities to the string table that (in the
+ binary format) collide with System V and XSI Curses extensions. See
+ <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for detailed discussion of terminfo source compatibility
+ issues.
+
+ This implementation is by default compatible with the binary terminfo
+ format used by Solaris curses, except in a few less-used details where
+ it was found that the latter did not match X/Open Curses. The format
+ used by the other Unix versions can be matched by building ncurses with
+ different configuration options.
+
+
+</PRE><H3><a name="h3-Magic-codes">Magic codes</a></H3><PRE>
+ The magic number in a binary terminfo file is the first 16-bits (two
+ bytes). Besides making it more reliable for the library to check that
+ a file is terminfo, utilities such as <STRONG>file</STRONG> also use that to tell what
+ the file-format is. System V defined more than one magic number, with
+ 0433, 0435 as screen-dumps (see <STRONG><A HREF="scr_dump.5.html">scr_dump(5)</A></STRONG>). This implementation uses
+ 01036 as a continuation of that sequence, but with a different high-
+ order byte to avoid confusion.
+
+
+</PRE><H3><a name="h3-The-TERMTYPE-structure">The TERMTYPE structure</a></H3><PRE>
+ Direct access to the <STRONG>TERMTYPE</STRONG> structure is provided for legacy applica-
+ tions. Portable applications should use the <STRONG>tigetflag</STRONG> and related
+ functions described in <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> for reading terminal capabili-
+ ties.
+
+
+</PRE><H3><a name="h3-Mixed-case-terminal-names">Mixed-case terminal names</a></H3><PRE>
+ A small number of terminal descriptions use uppercase characters in
+ their names. If the underlying filesystem ignores the difference
+ between uppercase and lowercase, <STRONG>ncurses</STRONG> represents the "first charac-
+ ter" of the terminal name used as the intermediate level of a directory
+ tree in (two-character) hexadecimal form.