]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/terminfo.tail
ncurses 5.9 - patch 20130202
[ncurses.git] / man / terminfo.tail
index 1f4dab54443cbfc36432adb1f0916c83568dda82..df0438060db81b59f26184291645a1a0899f8736 100644 (file)
@@ -1,4 +1,4 @@
-.\" $Id: terminfo.tail,v 1.52 2010/10/02 23:40:29 tom Exp $
+.\" $Id: terminfo.tail,v 1.58 2013/02/02 21:45:47 tom Exp $
 .\" Beginning of terminfo.tail file
 .\" This file is part of ncurses.
 .\" See "terminfo.head" for copyright.
@@ -75,14 +75,29 @@ map to an \s-1ESCAPE\s0 character,
 \fB^x\fR maps to a control-x for any appropriate x, and the sequences
 \fB\en \el \er \et \eb \ef \es\fR give
 a newline, line-feed, return, tab, backspace, form-feed, and space.
-Other escapes include \fB\e^\fR for \fB^\fR,
+Other escapes include
+.bP
+\fB\e^\fR for \fB^\fR,
+.bP
 \fB\e\e\fR for \fB\e\fR,
+.bP
 \fB\e\fR, for comma,
+.bP
 \fB\e:\fR for \fB:\fR,
+.bP
 and \fB\e0\fR for null.
-(\fB\e0\fR will produce \e200, which does not terminate a string but behaves
+.IP
+\fB\e0\fR will produce \e200, which does not terminate a string but behaves
 as a null character on most terminals, providing CS7 is specified.
-See stty(1).)
+See stty(1).
+.IP
+The reason for this quirk is to maintain binary compatibility of the
+compiled terminfo files with other implementations,
+e.g., the SVr4 systems, which document this.
+Compiled terminfo files use null-terminated strings, with no lengths.
+Modifying this would require a new binary format, 
+which would not work with other implementations.
+.PP
 Finally, characters may be given as three octal digits after a \fB\e\fR.
 .PP
 A delay in milliseconds may appear anywhere in a string capability, enclosed in
@@ -115,27 +130,36 @@ in the example above.
 .PP
 .SS Fetching Compiled Descriptions
 .PP
+The \fBncurses\fP library searches for terminal descriptions in several places.
+It uses only the first description found.
+The library has a compiled-in list of places to search
+which can be overridden by environment variables.
+Before starting to search,
+\fBncurses\fP eliminates duplicates in its search list.
+.bP
 If the environment variable TERMINFO is set, it is interpreted as the pathname
 of a directory containing the compiled description you are working on.
-Only
-that directory is searched.
-.PP
-If TERMINFO is not set, the \fBncurses\fR version of the terminfo reader code
-will instead look in the directory \fB$HOME/.terminfo\fR
+Only that directory is searched.
+.bP
+If TERMINFO is not set,
+\fBncurses\fR will instead look in the directory \fB$HOME/.terminfo\fR
 for a compiled description.
-If it fails to find one there, and the environment variable TERMINFO_DIRS is
-set, it will interpret the contents of that variable as a list of colon-
-separated directories to be searched (an empty entry is interpreted as a
-command to search \fI\*d\fR).
-If no description is found in any of the
-TERMINFO_DIRS directories, the fetch fails.
-.PP
-If neither TERMINFO nor TERMINFO_DIRS is set, the last place tried will be the
-system terminfo directory, \fI\*d\fR.
-.PP
-(Neither the \fB$HOME/.terminfo\fR lookups nor TERMINFO_DIRS extensions are
-supported under stock System V terminfo/curses.)
-.PP
+.bP
+Next, if the environment variable TERMINFO_DIRS is set,
+\fBncurses\fR will interpret the contents of that variable
+as a list of colon-separated directories (or database files) to be searched.
+.IP
+An empty directory name (i.e., if the variable begins or ends
+with a colon, or contains adacent colons)
+is interpreted as the system location \fI\*d\fR.
+.bP
+Finally, \fBncurses\fP searches these compiled-in locations:
+.RS
+.bP
+a list of directories (@TERMINFO_DIRS@), and
+.bP
+the system terminfo directory, \fI\*d\fR (the compiled-in default).
+.RE
 .SS Preparing Descriptions
 .PP
 We now outline how to prepare descriptions of terminals.
@@ -397,7 +421,7 @@ It is possible to form else-if's a la Algol 68:
 .IP
 where c\di\u are conditions, b\di\u are bodies.
 .IP
-Use the \fB\-f\fP option of \fBtic\fP or \fB@INFOCMP@\fP to see
+Use the \fB\-f\fP option of \fB@TIC@\fP or \fB@INFOCMP@\fP to see
 the structure of if-then-else's.
 Some strings, e.g., \fBsgr\fP can be very complicated when written
 on one line.
@@ -593,6 +617,7 @@ Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make
 a distinction between typed and untyped blanks on the screen, shifting
 upon an insert or delete only to an untyped blank on the screen which is
 either eliminated, or expanded to two untyped blanks.
+.PP
 You can determine the
 kind of terminal you have by clearing the screen and then typing
 text separated by cursor motions.
@@ -608,6 +633,7 @@ shifts over to the \*(lqdef\*(rq which then move together around the end of the
 current line and onto the next as you insert, you have the second type of
 terminal, and should give the capability \fBin\fR, which stands for
 \*(lqinsert null\*(rq.
+.PP
 While these are two logically separate attributes (one line versus multi-line
 insert mode, and special treatment of untyped spaces) we have seen no
 terminals whose insert mode cannot be described with the single attribute.
@@ -974,7 +1000,7 @@ the numeric parameter
 .B it
 is given, showing the number of spaces the tabs are set to.
 This is normally used by the
-.IR tset
+.IR @TSET@
 command to determine whether to set the mode for hardware tab expansion,
 and whether to set the tab stops.
 If the terminal has tab stops that can be saved in non-volatile memory,
@@ -1524,8 +1550,10 @@ those brought in by \fBuse\fR references.
 A capability can be canceled by placing \fBxx@\fR to the left of the
 use reference that imports it, where \fIxx\fP is the capability.
 For example, the entry
+.RS
 .PP
-       2621\-nl, smkx@, rmkx@, use=2621,
+2621\-nl, smkx@, rmkx@, use=2621,
+.RE
 .PP
 defines a 2621\-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities,
 and hence does not turn on the function key labels when in visual mode.
@@ -1570,19 +1598,15 @@ length of the entry as it exists in /etc/termcap, minus the
 backslash-newline pairs, which \fBtgetent()\fP strips out while reading it.
 Some termcap libraries strip off the final newline, too (GNU termcap does not).
 Now suppose:
-.TP 5
-*
+.bP
 a termcap entry before expansion is more than 1023 bytes long,
-.TP 5
-*
+.bP
 and the application has only allocated a 1k buffer,
-.TP 5
-*
+.bP
 and the termcap library (like the one in BSD/OS 1.1 and GNU) reads
 the whole entry into the buffer, no matter what its length, to see
 if it is the entry it wants,
-.TP 5
-*
+.bP
 and \fBtgetent()\fP is searching for a terminal type that either is the
 long entry, appears in the termcap file after the long entry, or
 does not appear in the file at all (so that \fBtgetent()\fP has to search
@@ -1625,6 +1649,11 @@ of terminfo (under HP\-UX and AIX) 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.
 .SH EXTENSIONS
+.PP
+Searching for terminal descriptions in
+\fB$HOME/.terminfo\fR and TERMINFO_DIRS 
+is not supported by older implementations.
+.PP
 Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, do not
 interpret the %A and %O operators in parameter strings.
 .PP
@@ -1666,9 +1695,9 @@ capability (\fBset_pglen\fR).
 .PP
 \fBSVr1, Ultrix\fR \-\-
 These support a restricted subset of terminfo capabilities.
-The booleans
-end with \fBxon_xoff\fR; the numerics with \fBwidth_status_line\fR; and the
-strings with \fBprtr_non\fR.
+The booleans end with \fBxon_xoff\fR;
+the numerics with \fBwidth_status_line\fR;
+and the strings with \fBprtr_non\fR.
 .PP
 \fBHP/UX\fR \-\-
 Supports the SVr1 subset, plus the SVr[234] numerics \fBnum_labels\fR,
@@ -1696,9 +1725,3 @@ files containing terminal descriptions
 .SH AUTHORS
 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
 Based on pcurses by Pavel Curtis.
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End: