-.\" $Id: terminfo.tail,v 1.72 2016/10/15 18:34:58 tom Exp $
+.\" $Id: terminfo.tail,v 1.75 2016/12/24 22:54:11 tom Exp $
.\" Beginning of terminfo.tail file
.\" This file is part of ncurses.
.\" See "terminfo.head" for copyright.
\fBindn\fR, and \fBrin\fR will simulate destructive scrolling; their
documentation cautions you not to define \fBcsr\fR unless this is true.
This \fBcurses\fR implementation is more liberal and will do explicit erases
-after scrolling if \fBndstr\fR is defined.
+after scrolling if \fBndsrc\fR is defined.
.PP
If the terminal has the ability to define a window as part of
memory, which all commands affect,
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@
+This is normally used by the \fB@TSET@\fP
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,
with the rest of the terminfo description.
They are normally sent to the terminal, by the
.I init
-option of the
-.IR @TPUT@
-program, each time the user logs in.
+option of the \fB@TPUT@\fP program, each time the user logs in.
They will be printed in the following order:
.RS
.TP
.PP
.SS Color Handling
.PP
-Most color terminals are either \*(``Tektronix-like\*('' or \*(``HP-like\*(''.
+The curses library functions \fBinit_pair\fP and \fBinit_color\fP
+manipulate the \fIcolor pairs\fP and \fIcolor values\fP discussed in this
+section
+(see \fBcurs_color\fP(3X) for details on these and related functions).
+.PP
+Most color terminals are either \*(``Tektronix-like\*('' or \*(``HP-like\*('':
+.bP
Tektronix-like
-terminals have a predefined set of N colors (where N usually 8), and can set
+terminals have a predefined set of \fIN\fP colors
+(where \fIN\fP is usually 8),
+and can set
character-cell foreground and background characters independently, mixing them
-into N\ *\ N color-pairs.
-On HP-like terminals, the use must set each color
+into \fIN\fP\ *\ \fIN\fP color-pairs.
+.bP
+On HP-like terminals, the user must set each color
pair up separately (foreground and background are not independently settable).
-Up to M color-pairs may be set up from 2*M different colors.
-ANSI-compatible
-terminals are Tektronix-like.
+Up to \fIM\fP color-pairs may be set up from 2*\fIM\fP different colors.
+ANSI-compatible terminals are Tektronix-like.
.PP
Some basic color capabilities are independent of the color method.
The numeric
than the power-up default background; these should have the boolean capability
\fBbce\fR.
.PP
+While the curses library works with \fIcolor pairs\fP
+(reflecting the inability of some devices to set foreground
+and background colors independently),
+there are separate capabilities for setting these features:
+.bP
To change the current foreground or background color on a Tektronix-type
terminal, use \fBsetaf\fR (set ANSI foreground) and \fBsetab\fR (set ANSI
background) or \fBsetf\fR (set foreground) and \fBsetb\fR (set background).
only \fBsetaf\fR/\fBsetab\fR; the XPG4 draft says that "If the terminal
supports ANSI escape sequences to set background and foreground, they should
be coded as \fBsetaf\fR and \fBsetab\fR, respectively.
+.bP
If the terminal
supports other escape sequences to set background and foreground, they should
be coded as \fBsetf\fR and \fBsetb\fR, respectively.
-The \fBvidputs\fR
-function and the refresh functions use \fBsetaf\fR and \fBsetab\fR if they are
-defined."
+The \fBvidputs\fR and the \fBrefresh\fP functions
+use the \fBsetaf\fR and \fBsetab\fR capabilities if they are defined.
.PP
The \fBsetaf\fR/\fBsetab\fR and \fBsetf\fR/\fBsetb\fR capabilities take a
single numeric argument each.
On an HP-like terminal, use \fBscp\fR with a color-pair number parameter to set
which color pair is current.
.PP
+Some terminals allow the \fIcolor values\fP to be modified:
+.bP
On a Tektronix-like terminal, the capability \fBccc\fR may be present to
indicate that colors can be modified.
If so, the \fBinitc\fR capability will
they are instead as HLS (Hue, Lightness, Saturation) indices.
The ranges are
terminal-dependent.
-.PP
+.bP
On an HP-like terminal, \fBinitp\fR may give a capability for changing a
color-pair value.
It will take seven parameters; a color-pair number (0 to
\fB@TIC@\fR(1M),
\fB@INFOCMP@\fR(1M),
\fBcurses\fR(3X),
+\fBcurs_color\fR(3X),
\fBprintf\fR(3),
\fBterm\fR(\*n).
\fBterm_variables\fR(3X).