* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: terminfo.tail,v 1.120 2023/07/15 19:46:56 tom Exp @
+ * @Id: terminfo.tail,v 1.122 2023/08/19 20:14:38 tom Exp @
*.in -2
*.in +2
*.in -2
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences.
- This manual describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230812).
+ This manual describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230819).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
are followed by the character "#" and then a positive value. Thus
<STRONG>cols</STRONG>, which indicates the number of columns the terminal has, gives the
value "80" for ansi. Values for numeric capabilities may be specified
- in decimal, octal or hexadecimal, using the C programming language
+ in decimal, octal, or hexadecimal, using the C programming language
conventions (e.g., 255, 0377 and 0xff or 0xFF).
Finally, string valued capabilities, such as <STRONG>el</STRONG> (clear to end of line
variables are persistent across escape-string evaluations.
Consider the HP2645, which, to get to row 3 and column 12, needs to be
- sent \E&a12c03Y padded for 6 milliseconds. Note that the order of the
- rows and columns is inverted here, and that the row and column are
- printed as two digits. Thus its <STRONG>cup</STRONG> capability is
- "cup=6\E&%p2%2dc%p1%2dY".
-
- The Microterm ACT-IV needs the current row and column sent preceded by
- a <STRONG>^T</STRONG>, with the row and column simply encoded in binary,
- "cup=^T%p1%c%p2%c". Terminals which use "%c" need to be able to
- backspace the cursor (<STRONG>cub1</STRONG>), and to move the cursor up one line on the
- screen (<STRONG>cuu1</STRONG>). This is necessary because it is not always safe to
- transmit <STRONG>\n</STRONG> <STRONG>^D</STRONG> and <STRONG>\r</STRONG>, as the system may change or discard them. (The
- library routines dealing with terminfo set tty modes so that tabs are
- never expanded, so \t is safe to send. This turns out to be essential
- for the Ann Arbor 4080.)
-
- A final example is the LSI ADM-3a, which uses row and column offset by
- a blank character, thus "cup=\E=%p1%' '%+%c%p2%' '%+%c". After sending
- "\E=", this pushes the first parameter, pushes the ASCII value for a
- space (32), adds them (pushing the sum on the stack in place of the two
- previous values) and outputs that value as a character. Then the same
- is done for the second parameter. More complex arithmetic is possible
- using the stack.
+ sent \E&a12c03Y padded for 6 milliseconds. The order of the rows and
+ columns is inverted here, and the row and column are printed as two
+ digits. The corresponding terminal description is expressed thus:
+ cup=\E&a%p2%dc%p1%dY$<6>,
+
+ The Microterm ACT-IV needs the current row and column sent preceded by
+ a <STRONG>^T</STRONG>, with the row and column simply encoded in binary,
+ cup=^T%p1%c%p2%c
+
+ Terminals which use "%c" need to be able to backspace the cursor
+ (<STRONG>cub1</STRONG>), and to move the cursor up one line on the screen (<STRONG>cuu1</STRONG>). This
+ is necessary because it is not always safe to transmit <STRONG>\n</STRONG> <STRONG>^D</STRONG> and <STRONG>\r</STRONG>, as
+ the system may change or discard them. (The library routines dealing
+ with terminfo set tty modes so that tabs are never expanded, so \t is
+ safe to send. This turns out to be essential for the Ann Arbor 4080.)
+
+ A final example is the LSI ADM-3a, which uses row and column offset by
+ a blank character, thus
+ cup=\E=%p1%' '%+%c%p2%' '%+%c
+
+ After sending "\E=", this pushes the first parameter, pushes the ASCII
+ value for a space (32), adds them (pushing the sum on the stack in
+ place of the two previous values) and outputs that value as a
+ character. Then the same is done for the second parameter. More
+ complex arithmetic is possible using the stack.
</PRE><H3><a name="h3-Cursor-Motions">Cursor Motions</a></H3><PRE>
If there is a sequence to set arbitrary combinations of modes, this
should be given as <STRONG>sgr</STRONG> (set attributes), taking 9 parameters. Each
- parameter is either 0 or nonzero, as the corresponding attribute is on
- or off. The 9 parameters are, in order: standout, underline, reverse,
- blink, dim, bold, blank, protect, alternate character set. Not all
- modes need be supported by <STRONG>sgr</STRONG>, only those for which corresponding
- separate attribute commands exist.
+ parameter is either zero (0) or nonzero, as the corresponding attribute
+ is on or off. The 9 parameters are, in order: standout, underline,
+ reverse, blink, dim, bold, blank, protect, alternate character set.
+ Not all modes need be supported by <STRONG>sgr</STRONG>, only those for which
+ corresponding separate attribute commands exist.
For example, the DEC vt220 supports most of the modes:
diamond ACS_DIAMOND + ` 0x60
checker board (stipple) ACS_CKBOARD : a 0x61
degree symbol ACS_DEGREE \ f 0x66
-
plus/minus ACS_PLMINUS # g 0x67
board of squares ACS_BOARD # h 0x68
lantern symbol ACS_LANTERN # i 0x69
lower right corner ACS_LRCORNER + j 0x6a
upper right corner ACS_URCORNER + k 0x6b
upper left corner ACS_ULCORNER + l 0x6c
+
lower left corner ACS_LLCORNER + m 0x6d
large plus or crossover ACS_PLUS + n 0x6e
scan line 1 ACS_S1 ~ o 0x6f
safe length for a termcap entry 1k-1 (1023) bytes. Depending on what
the application and the termcap library being used does, and where in
the termcap file the terminal type that <STRONG>tgetent</STRONG> is searching for is,
- several bad things can happen.
+ several bad things can happen:
+
+ <STRONG>o</STRONG> some termcap libraries print a warning message,
+
+ <STRONG>o</STRONG> some exit if they find an entry that's longer than 1023 bytes,
+
+ <STRONG>o</STRONG> some neither exit nor warn, doing nothing useful, and
+
+ <STRONG>o</STRONG> some simply truncate the entries to 1023 bytes.
- Some termcap libraries print a warning message or exit if they find an
- entry that's longer than 1023 bytes; others do not; others truncate the
- entries to 1023 bytes. Some application programs allocate more than
- the recommended 1K for the termcap entry; others do not.
+ Some application programs allocate more than the recommended 1K for the
+ termcap entry; others do not.
Each termcap entry has two important sizes associated with it: before
"tc" expansion, and after "tc" expansion. "tc" is the capability that