| 1 |
'\" t |
| 2 |
.\" DO NOT EDIT THIS FILE BY HAND! |
| 3 |
.\" man/MKterminfo.sh generated it from: |
| 4 |
.\" terminfo.head, ../../man/../include/Caps, ../../man/../include/Caps-ncurses, |
| 5 |
.\" and terminfo.tail. |
| 6 |
.\" |
| 7 |
.\" Note: this document must be run through tbl before nroff or troff. |
| 8 |
.\" Some man(1) programs recognize the token in the first-line comment |
| 9 |
.\" as directing them to arrange such a pipeline. |
| 10 |
.\"*************************************************************************** |
| 11 |
.\" Copyright 2018-2024,2025 Thomas E. Dickey * |
| 12 |
.\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * |
| 13 |
.\" * |
| 14 |
.\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 15 |
.\" copy of this software and associated documentation files (the * |
| 16 |
.\" "Software"), to deal in the Software without restriction, including * |
| 17 |
.\" without limitation the rights to use, copy, modify, merge, publish, * |
| 18 |
.\" distribute, distribute with modifications, sublicense, and/or sell * |
| 19 |
.\" copies of the Software, and to permit persons to whom the Software is * |
| 20 |
.\" furnished to do so, subject to the following conditions: * |
| 21 |
.\" * |
| 22 |
.\" The above copyright notice and this permission notice shall be included * |
| 23 |
.\" in all copies or substantial portions of the Software. * |
| 24 |
.\" * |
| 25 |
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 26 |
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 27 |
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 28 |
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 29 |
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 30 |
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 31 |
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 32 |
.\" * |
| 33 |
.\" Except as contained in this notice, the name(s) of the above copyright * |
| 34 |
.\" holders shall not be used in advertising or otherwise to promote the * |
| 35 |
.\" sale, use or other dealings in this Software without prior written * |
| 36 |
.\" authorization. * |
| 37 |
.\"*************************************************************************** |
| 38 |
.\" |
| 39 |
.\" $Id: terminfo.head,v 1.69 2025/08/16 21:50:23 tom Exp $ |
| 40 |
.TH terminfo 5 2025-08-16 "ncurses 6.6" "File formats" |
| 41 |
.ie \n(.g \{\ |
| 42 |
.ds `` \(lq |
| 43 |
.ds '' \(rq |
| 44 |
.ds ' \(aq |
| 45 |
.ds ^ \(ha |
| 46 |
.ds ~ \(ti |
| 47 |
.\} |
| 48 |
.el \{\ |
| 49 |
.ie t .ds `` `` |
| 50 |
.el .ds `` "" |
| 51 |
.ie t .ds '' '' |
| 52 |
.el .ds '' "" |
| 53 |
.ds ' ' |
| 54 |
.ds ^ ^ |
| 55 |
.ds ~ ~ |
| 56 |
.\} |
| 57 |
. |
| 58 |
.de bP |
| 59 |
.ie n .IP \(bu 4 |
| 60 |
.el .IP \(bu 2 |
| 61 |
.. |
| 62 |
. |
| 63 |
.SH NAME |
| 64 |
\fB\%terminfo\fP \- |
| 65 |
terminal capability database |
| 66 |
.SH SYNOPSIS |
| 67 |
/etc/terminfo/*/* |
| 68 |
.SH DESCRIPTION |
| 69 |
.I Terminfo |
| 70 |
is a database describing terminals, |
| 71 |
used by screen-oriented programs such as |
| 72 |
\fBnvi\fP(1), |
| 73 |
\fBlynx\fP(1), |
| 74 |
\fBmutt\fP(1), |
| 75 |
and other curses applications, |
| 76 |
using high-level calls to libraries such as \fBncurses\fP(3NCURSES). |
| 77 |
It is also used via low-level calls by non-curses applications |
| 78 |
which may be screen-oriented (such as \fBclear\fP(1)) |
| 79 |
or non-screen (such as \fBtabs\fP(1)). |
| 80 |
.PP |
| 81 |
.I Terminfo |
| 82 |
describes terminals by giving a set of capabilities which they |
| 83 |
have, by specifying how to perform screen operations, and by |
| 84 |
specifying padding requirements and initialization sequences. |
| 85 |
.PP |
| 86 |
This document describes |
| 87 |
.I \%ncurses |
| 88 |
version 6.6 |
| 89 |
(patch 20251231). |
| 90 |
.SS "\fIterminfo\fP Entry Syntax" |
| 91 |
Entries in |
| 92 |
.I terminfo |
| 93 |
consist of a sequence of fields: |
| 94 |
.bP |
| 95 |
Each field ends with a comma \*(``,\*('' |
| 96 |
(embedded commas may be |
| 97 |
escaped with a backslash or written as \*(``\e054\*(''). |
| 98 |
.bP |
| 99 |
White space between fields is ignored. |
| 100 |
.bP |
| 101 |
The first field in a \fIterminfo\fP entry begins in the first column. |
| 102 |
.bP |
| 103 |
Newlines and leading whitespace (spaces or tabs) |
| 104 |
may be used for formatting entries for readability. |
| 105 |
These are removed from parsed entries. |
| 106 |
.IP |
| 107 |
The \fBinfocmp\fP \fB\-f\fP and \fB\-W\fP options rely on this to |
| 108 |
format if-then-else expressions, |
| 109 |
or to enforce maximum line-width. |
| 110 |
The resulting formatted terminal description can be read by \fBtic\fP. |
| 111 |
.bP |
| 112 |
The first field for each terminal gives the names which are known for the |
| 113 |
terminal, separated by \*(``|\*('' characters. |
| 114 |
.IP |
| 115 |
The first name given is the most common abbreviation for the terminal |
| 116 |
(its primary name), |
| 117 |
the last name given should be a long name fully identifying the terminal |
| 118 |
(see \fBlongname\fP(3NCURSES)), |
| 119 |
and all others are treated as synonyms (aliases) for the primary terminal name. |
| 120 |
.IP |
| 121 |
X/Open Curses advises that all names but the last should be in lower case |
| 122 |
and contain no blanks; |
| 123 |
the last name may well contain upper case and blanks for readability. |
| 124 |
.IP |
| 125 |
This implementation is not so strict; |
| 126 |
it allows mixed case in the primary name and aliases. |
| 127 |
If the last name has no embedded blanks, |
| 128 |
it allows that to be both an alias and a verbose name |
| 129 |
(but will warn about this ambiguity). |
| 130 |
.bP |
| 131 |
Lines beginning with a \*(``#\*('' in the first column are treated as comments. |
| 132 |
.IP |
| 133 |
While comment lines are valid at any point, the output of \fBcaptoinfo\fP |
| 134 |
and \fBinfotocap\fP (aliases for \fBtic\fP) |
| 135 |
will move comments so they occur only between entries. |
| 136 |
.PP |
| 137 |
Terminal names (except for the last, verbose entry) should |
| 138 |
be chosen using the following conventions. |
| 139 |
The particular piece of hardware making up the terminal should |
| 140 |
have a root name, thus \*(``hp2621\*(''. |
| 141 |
This name should not contain hyphens. |
| 142 |
Modes that the hardware can be in, or user preferences, should |
| 143 |
be indicated by appending a hyphen and a mode suffix. |
| 144 |
Thus, a vt100 in 132-column mode would be vt100\-w. |
| 145 |
The following suffixes should be used where possible: |
| 146 |
.PP |
| 147 |
.TS |
| 148 |
center; |
| 149 |
Lb Lb Lb |
| 150 |
L L Lx. |
| 151 |
Suffix Example Meaning |
| 152 |
_ |
| 153 |
\-\fInn\fP aaa\-60 Number of lines on the screen |
| 154 |
\-\fIn\fPp c100\-4p Number of pages of memory |
| 155 |
\-am vt100\-am With automargins (usually the default) |
| 156 |
\-m ansi\-m Mono mode; suppress color |
| 157 |
\-mc wy30\-mc Magic cookie; spaces when highlighting |
| 158 |
\-na c100\-na No arrow keys (leave them in local) |
| 159 |
\-nam vt100\-nam Without automatic margins |
| 160 |
\-nl hp2621\-nl No status line |
| 161 |
\-ns hp2626\-ns No status line |
| 162 |
\-rv c100\-rv Reverse video |
| 163 |
\-s vt100\-s Enable status line |
| 164 |
\-vb wy370\-vb Use visible bell instead of beep |
| 165 |
\-w vt100\-w Wide mode (> 80 columns, usually 132) |
| 166 |
.TE |
| 167 |
.PP |
| 168 |
For more on terminal naming conventions, see the \fBterm\fP(7) manual page. |
| 169 |
.SS "\fIterminfo\fP Capabilities Syntax" |
| 170 |
The terminfo entry consists of several \fIcapabilities\fP, |
| 171 |
i.e., features that the terminal has, |
| 172 |
or methods for exercising the terminal's features. |
| 173 |
.PP |
| 174 |
After the first field (giving the name(s) of the terminal entry), |
| 175 |
there should be one or more \fIcapability\fP fields. |
| 176 |
These are Boolean, numeric or string names with corresponding values: |
| 177 |
.bP |
| 178 |
Boolean capabilities are true when present, false when absent. |
| 179 |
There is no explicit value for Boolean capabilities. |
| 180 |
.bP |
| 181 |
Numeric capabilities have a \*(``#\*('' following the name, |
| 182 |
then an unsigned decimal integer value. |
| 183 |
.bP |
| 184 |
String capabilities have a \*(``=\*('' following the name, |
| 185 |
then an string of characters making up the capability value. |
| 186 |
.IP |
| 187 |
String capabilities can be split into multiple lines, |
| 188 |
just as the fields comprising a terminal entry can be |
| 189 |
split into multiple lines. |
| 190 |
While blanks between fields are ignored, |
| 191 |
blanks embedded within a string value are retained, |
| 192 |
except for leading blanks on a line. |
| 193 |
.PP |
| 194 |
Any capability can be \fIcanceled\fP, |
| 195 |
i.e., suppressed from the terminal entry, |
| 196 |
by following its name with \*(``@\*('' |
| 197 |
rather than a capability value. |
| 198 |
.SS "Similar Terminals" |
| 199 |
If there are two very similar terminals, one (the variant) can be defined as |
| 200 |
being just like the other (the base) with certain exceptions. |
| 201 |
In the |
| 202 |
definition of the variant, the string capability \fBuse\fP can be given with |
| 203 |
the name of the base terminal: |
| 204 |
.bP |
| 205 |
The capabilities given before |
| 206 |
.B use |
| 207 |
override those in the base type named by |
| 208 |
.BR use . |
| 209 |
.bP |
| 210 |
If there are multiple \fBuse\fP capabilities, they are merged in reverse order. |
| 211 |
That is, the rightmost \fBuse\fP reference is processed first, then the one to |
| 212 |
its left, and so forth. |
| 213 |
.bP |
| 214 |
Capabilities given explicitly in the entry override |
| 215 |
those brought in by \fBuse\fP references. |
| 216 |
.PP |
| 217 |
A capability can be canceled by placing \fBxx@\fP to the left of the |
| 218 |
use reference that imports it, where \fIxx\fP is the capability. |
| 219 |
For example, the entry |
| 220 |
.RS |
| 221 |
.PP |
| 222 |
2621\-nl, smkx@, rmkx@, use=2621, |
| 223 |
.RE |
| 224 |
.PP |
| 225 |
defines a 2621\-nl that does not have the \fBsmkx\fP or \fBrmkx\fP capabilities, |
| 226 |
and hence does not turn on the function key labels when in visual mode. |
| 227 |
This is useful for different modes for a terminal, or for different |
| 228 |
user preferences. |
| 229 |
.PP |
| 230 |
An entry included via \fBuse\fP can contain canceled capabilities, |
| 231 |
which have the same effect as if those cancels were inline in the |
| 232 |
using terminal entry. |
| 233 |
.SS "Standard Capabilities" |
| 234 |
.\" Head of terminfo man page ends here |
| 235 |
.ps -1 |
| 236 |
Tables of capabilities |
| 237 |
.I \%ncurses |
| 238 |
recognizes in a |
| 239 |
.I \%term\%info |
| 240 |
terminal type description and available to |
| 241 |
.IR \%term\%info -using |
| 242 |
code follow. |
| 243 |
.bP |
| 244 |
The capability name identifies the symbol by which the programmer |
| 245 |
using the |
| 246 |
.I \%term\%info |
| 247 |
API accesses the capability. |
| 248 |
.bP |
| 249 |
The TI |
| 250 |
.RI ( \%term\%info ) |
| 251 |
code is the short name used by a person composing or updating a |
| 252 |
terminal type entry. |
| 253 |
.IP |
| 254 |
Whenever possible, |
| 255 |
these codes are the same as or similar to those of the ANSI X3.64-1979 |
| 256 |
standard |
| 257 |
(now superseded by ECMA-48, |
| 258 |
which uses identical or very similar names). |
| 259 |
Semantics are also intended to match those of the specification. |
| 260 |
.IP |
| 261 |
.I \%term\%info |
| 262 |
codes have no hard length limit, |
| 263 |
but |
| 264 |
.I \%ncurses |
| 265 |
maintains an informal one of 5 characters to keep them short and to |
| 266 |
allow the tabs in the source file |
| 267 |
.I Caps |
| 268 |
to line up nicely. |
| 269 |
(Some standard codes exceed this limit regardless.) |
| 270 |
.bP |
| 271 |
The TC |
| 272 |
.RI ( termcap ) |
| 273 |
code is that used by the corresponding API of |
| 274 |
.IR \%ncurses . |
| 275 |
(Some capabilities are new, |
| 276 |
and have names that BSD |
| 277 |
.I termcap |
| 278 |
did not originate.) |
| 279 |
.bP |
| 280 |
The description field attempts to convey the capability's semantics. |
| 281 |
.PP |
| 282 |
The description field employs a handful of notations. |
| 283 |
.TP |
| 284 |
.B (P) |
| 285 |
indicates that padding may be specified. |
| 286 |
.TP |
| 287 |
.B (P*) |
| 288 |
indicates that padding may vary in proportion to the number of output |
| 289 |
lines affected. |
| 290 |
.TP |
| 291 |
.BI # i |
| 292 |
indicates the |
| 293 |
.IR i th |
| 294 |
parameter of a string capability; |
| 295 |
the programmer should pass the string to \fB\%tparm\fP(3NCURSES) with the |
| 296 |
parameters listed. |
| 297 |
.IP |
| 298 |
If the description lists no parameters, |
| 299 |
passing the string to \fB\%tparm\fP(3NCURSES) may produce unexpected |
| 300 |
behavior, |
| 301 |
for instance if the string contains percent signs. |
| 302 |
. |
| 303 |
.br |
| 304 |
.if n .ne 4v |
| 305 |
.if t .ne 3v |
| 306 |
.PP |
| 307 |
.TS |
| 308 |
center; |
| 309 |
Lb Cb S Lb |
| 310 |
Lb Lb Lb Lb |
| 311 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 312 |
\& Code \& |
| 313 |
Boolean Capability Name TI TC Description |
| 314 |
_ |
| 315 |
auto_left_margin bw bw T{ |
| 316 |
.na |
| 317 |
cub1 wraps from column 0 to last column |
| 318 |
T} |
| 319 |
auto_right_margin am am T{ |
| 320 |
.na |
| 321 |
terminal has automatic margins |
| 322 |
T} |
| 323 |
no_esc_ctlc xsb xb T{ |
| 324 |
.na |
| 325 |
beehive (f1=escape, f2=ctrl C) |
| 326 |
T} |
| 327 |
ceol_standout_glitch xhp xs T{ |
| 328 |
.na |
| 329 |
standout not erased by overwriting (hp) |
| 330 |
T} |
| 331 |
eat_newline_glitch xenl xn T{ |
| 332 |
.na |
| 333 |
newline ignored after 80 cols (concept) |
| 334 |
T} |
| 335 |
erase_overstrike eo eo T{ |
| 336 |
.na |
| 337 |
can erase overstrikes with a blank |
| 338 |
T} |
| 339 |
generic_type gn gn T{ |
| 340 |
.na |
| 341 |
generic line type |
| 342 |
T} |
| 343 |
hard_copy hc hc T{ |
| 344 |
.na |
| 345 |
hardcopy terminal |
| 346 |
T} |
| 347 |
has_meta_key km km T{ |
| 348 |
.na |
| 349 |
Has a meta key (i.e., sets 8th-bit) |
| 350 |
T} |
| 351 |
has_status_line hs hs T{ |
| 352 |
.na |
| 353 |
has extra status line |
| 354 |
T} |
| 355 |
insert_null_glitch in in T{ |
| 356 |
.na |
| 357 |
insert mode distinguishes nulls |
| 358 |
T} |
| 359 |
memory_above da da T{ |
| 360 |
.na |
| 361 |
display may be retained above the screen |
| 362 |
T} |
| 363 |
memory_below db db T{ |
| 364 |
.na |
| 365 |
display may be retained below the screen |
| 366 |
T} |
| 367 |
move_insert_mode mir mi T{ |
| 368 |
.na |
| 369 |
safe to move while in insert mode |
| 370 |
T} |
| 371 |
move_standout_mode msgr ms T{ |
| 372 |
.na |
| 373 |
safe to move while in standout mode |
| 374 |
T} |
| 375 |
over_strike os os T{ |
| 376 |
.na |
| 377 |
terminal can overstrike |
| 378 |
T} |
| 379 |
status_line_esc_ok eslok es T{ |
| 380 |
.na |
| 381 |
escape can be used on the status line |
| 382 |
T} |
| 383 |
dest_tabs_magic_smso xt xt T{ |
| 384 |
.na |
| 385 |
tabs destructive, magic so char (t1061) |
| 386 |
T} |
| 387 |
tilde_glitch hz hz T{ |
| 388 |
.na |
| 389 |
cannot print ~'s (Hazeltine) |
| 390 |
T} |
| 391 |
transparent_underline ul ul T{ |
| 392 |
.na |
| 393 |
underline character overstrikes |
| 394 |
T} |
| 395 |
xon_xoff xon xo T{ |
| 396 |
.na |
| 397 |
terminal uses xon/xoff handshaking |
| 398 |
T} |
| 399 |
needs_xon_xoff nxon nx T{ |
| 400 |
.na |
| 401 |
padding will not work, xon/xoff required |
| 402 |
T} |
| 403 |
prtr_silent mc5i 5i T{ |
| 404 |
.na |
| 405 |
printer will not echo on screen |
| 406 |
T} |
| 407 |
hard_cursor chts HC T{ |
| 408 |
.na |
| 409 |
cursor is hard to see |
| 410 |
T} |
| 411 |
non_rev_rmcup nrrmc NR T{ |
| 412 |
.na |
| 413 |
smcup does not reverse rmcup |
| 414 |
T} |
| 415 |
no_pad_char npc NP T{ |
| 416 |
.na |
| 417 |
pad character does not exist |
| 418 |
T} |
| 419 |
non_dest_scroll_region ndscr ND T{ |
| 420 |
.na |
| 421 |
scrolling region is non-destructive |
| 422 |
T} |
| 423 |
can_change ccc cc T{ |
| 424 |
.na |
| 425 |
terminal can re-define existing colors |
| 426 |
T} |
| 427 |
back_color_erase bce ut T{ |
| 428 |
.na |
| 429 |
screen erased with background color |
| 430 |
T} |
| 431 |
hue_lightness_saturation hls hl T{ |
| 432 |
.na |
| 433 |
terminal uses only HLS color notation (Tektronix) |
| 434 |
T} |
| 435 |
col_addr_glitch xhpa YA T{ |
| 436 |
.na |
| 437 |
only positive motion for hpa/mhpa caps |
| 438 |
T} |
| 439 |
cr_cancels_micro_mode crxm YB T{ |
| 440 |
.na |
| 441 |
using cr turns off micro mode |
| 442 |
T} |
| 443 |
has_print_wheel daisy YC T{ |
| 444 |
.na |
| 445 |
printer needs operator to change character set |
| 446 |
T} |
| 447 |
row_addr_glitch xvpa YD T{ |
| 448 |
.na |
| 449 |
only positive motion for vpa/mvpa caps |
| 450 |
T} |
| 451 |
semi_auto_right_margin sam YE T{ |
| 452 |
.na |
| 453 |
printing in last column causes cr |
| 454 |
T} |
| 455 |
cpi_changes_res cpix YF T{ |
| 456 |
.na |
| 457 |
changing character pitch changes resolution |
| 458 |
T} |
| 459 |
lpi_changes_res lpix YG T{ |
| 460 |
.na |
| 461 |
changing line pitch changes resolution |
| 462 |
T} |
| 463 |
.TE |
| 464 |
.PP |
| 465 |
. |
| 466 |
.TS |
| 467 |
center; |
| 468 |
Lb Cb S Lb |
| 469 |
Lb Lb Lb Lb |
| 470 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 471 |
\& Code \& |
| 472 |
Numeric Capability Name TI TC Description |
| 473 |
_ |
| 474 |
columns cols co T{ |
| 475 |
.na |
| 476 |
number of columns in a line |
| 477 |
T} |
| 478 |
init_tabs it it T{ |
| 479 |
.na |
| 480 |
tabs initially every # spaces |
| 481 |
T} |
| 482 |
lines lines li T{ |
| 483 |
.na |
| 484 |
number of lines on screen or page |
| 485 |
T} |
| 486 |
lines_of_memory lm lm T{ |
| 487 |
.na |
| 488 |
lines of memory if > line. 0 means varies |
| 489 |
T} |
| 490 |
magic_cookie_glitch xmc sg T{ |
| 491 |
.na |
| 492 |
number of blank characters left by smso or rmso |
| 493 |
T} |
| 494 |
padding_baud_rate pb pb T{ |
| 495 |
.na |
| 496 |
lowest baud rate where padding needed |
| 497 |
T} |
| 498 |
virtual_terminal vt vt T{ |
| 499 |
.na |
| 500 |
virtual terminal number (CB/unix) |
| 501 |
T} |
| 502 |
width_status_line wsl ws T{ |
| 503 |
.na |
| 504 |
number of columns in status line |
| 505 |
T} |
| 506 |
num_labels nlab Nl T{ |
| 507 |
.na |
| 508 |
number of labels on screen |
| 509 |
T} |
| 510 |
label_height lh lh T{ |
| 511 |
.na |
| 512 |
rows in each label |
| 513 |
T} |
| 514 |
label_width lw lw T{ |
| 515 |
.na |
| 516 |
columns in each label |
| 517 |
T} |
| 518 |
max_attributes ma ma T{ |
| 519 |
.na |
| 520 |
maximum combined attributes terminal can handle |
| 521 |
T} |
| 522 |
maximum_windows wnum MW T{ |
| 523 |
.na |
| 524 |
maximum number of definable windows |
| 525 |
T} |
| 526 |
max_colors colors Co T{ |
| 527 |
.na |
| 528 |
maximum number of colors on screen |
| 529 |
T} |
| 530 |
max_pairs pairs pa T{ |
| 531 |
.na |
| 532 |
maximum number of color-pairs on the screen |
| 533 |
T} |
| 534 |
no_color_video ncv NC T{ |
| 535 |
.na |
| 536 |
video attributes that cannot be used with colors |
| 537 |
T} |
| 538 |
.TE |
| 539 |
.PP |
| 540 |
. |
| 541 |
The following numeric capabilities are present in the SVr4.0 term structure, |
| 542 |
but are not yet documented in the man page. |
| 543 |
They came in with SVr4's printer support. |
| 544 |
. |
| 545 |
.PP |
| 546 |
.TS |
| 547 |
center; |
| 548 |
Lb Cb S Lb |
| 549 |
Lb Lb Lb Lb |
| 550 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 551 |
\& Code \& |
| 552 |
Numeric Capability Name TI TC Description |
| 553 |
_ |
| 554 |
buffer_capacity bufsz Ya T{ |
| 555 |
.na |
| 556 |
numbers of bytes buffered before printing |
| 557 |
T} |
| 558 |
dot_vert_spacing spinv Yb T{ |
| 559 |
.na |
| 560 |
spacing of pins vertically in pins per inch |
| 561 |
T} |
| 562 |
dot_horz_spacing spinh Yc T{ |
| 563 |
.na |
| 564 |
spacing of dots horizontally in dots per inch |
| 565 |
T} |
| 566 |
max_micro_address maddr Yd T{ |
| 567 |
.na |
| 568 |
maximum value in micro_..._address |
| 569 |
T} |
| 570 |
max_micro_jump mjump Ye T{ |
| 571 |
.na |
| 572 |
maximum value in parm_..._micro |
| 573 |
T} |
| 574 |
micro_col_size mcs Yf T{ |
| 575 |
.na |
| 576 |
character step size when in micro mode |
| 577 |
T} |
| 578 |
micro_line_size mls Yg T{ |
| 579 |
.na |
| 580 |
line step size when in micro mode |
| 581 |
T} |
| 582 |
number_of_pins npins Yh T{ |
| 583 |
.na |
| 584 |
numbers of pins in print-head |
| 585 |
T} |
| 586 |
output_res_char orc Yi T{ |
| 587 |
.na |
| 588 |
horizontal resolution in units per line |
| 589 |
T} |
| 590 |
output_res_line orl Yj T{ |
| 591 |
.na |
| 592 |
vertical resolution in units per line |
| 593 |
T} |
| 594 |
output_res_horz_inch orhi Yk T{ |
| 595 |
.na |
| 596 |
horizontal resolution in units per inch |
| 597 |
T} |
| 598 |
output_res_vert_inch orvi Yl T{ |
| 599 |
.na |
| 600 |
vertical resolution in units per inch |
| 601 |
T} |
| 602 |
print_rate cps Ym T{ |
| 603 |
.na |
| 604 |
print rate in characters per second |
| 605 |
T} |
| 606 |
wide_char_size widcs Yn T{ |
| 607 |
.na |
| 608 |
character step size when in double wide mode |
| 609 |
T} |
| 610 |
buttons btns BT T{ |
| 611 |
.na |
| 612 |
number of buttons on mouse |
| 613 |
T} |
| 614 |
bit_image_entwining bitwin Yo T{ |
| 615 |
.na |
| 616 |
number of passes for each bit-image row |
| 617 |
T} |
| 618 |
bit_image_type bitype Yp T{ |
| 619 |
.na |
| 620 |
type of bit-image device |
| 621 |
T} |
| 622 |
.TE |
| 623 |
.PP |
| 624 |
. |
| 625 |
.TS |
| 626 |
center; |
| 627 |
Lb Cb S Lb |
| 628 |
Lb Lb Lb Lb |
| 629 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 630 |
\& Code \& |
| 631 |
String Capability Name TI TC Description |
| 632 |
_ |
| 633 |
back_tab cbt bt T{ |
| 634 |
.na |
| 635 |
back tab (P) |
| 636 |
T} |
| 637 |
bell bel bl T{ |
| 638 |
.na |
| 639 |
audible signal (bell) (P) |
| 640 |
T} |
| 641 |
carriage_return cr cr T{ |
| 642 |
.na |
| 643 |
carriage return (P*) (P*) |
| 644 |
T} |
| 645 |
change_scroll_region csr cs T{ |
| 646 |
.na |
| 647 |
change region to line #1 to line #2 (P) |
| 648 |
T} |
| 649 |
clear_all_tabs tbc ct T{ |
| 650 |
.na |
| 651 |
clear all tab stops (P) |
| 652 |
T} |
| 653 |
clear_screen clear cl T{ |
| 654 |
.na |
| 655 |
clear screen and home cursor (P*) |
| 656 |
T} |
| 657 |
clr_eol el ce T{ |
| 658 |
.na |
| 659 |
clear to end of line (P) |
| 660 |
T} |
| 661 |
clr_eos ed cd T{ |
| 662 |
.na |
| 663 |
clear to end of screen (P*) |
| 664 |
T} |
| 665 |
column_address hpa ch T{ |
| 666 |
.na |
| 667 |
horizontal position #1, absolute (P) |
| 668 |
T} |
| 669 |
command_character cmdch CC T{ |
| 670 |
.na |
| 671 |
terminal settable cmd character in prototype !? |
| 672 |
T} |
| 673 |
cursor_address cup cm T{ |
| 674 |
.na |
| 675 |
move to row #1 columns #2 |
| 676 |
T} |
| 677 |
cursor_down cud1 do T{ |
| 678 |
.na |
| 679 |
down one line |
| 680 |
T} |
| 681 |
cursor_home home ho T{ |
| 682 |
.na |
| 683 |
home cursor (if no cup) |
| 684 |
T} |
| 685 |
cursor_invisible civis vi T{ |
| 686 |
.na |
| 687 |
make cursor invisible |
| 688 |
T} |
| 689 |
cursor_left cub1 le T{ |
| 690 |
.na |
| 691 |
move left one space |
| 692 |
T} |
| 693 |
cursor_mem_address mrcup CM T{ |
| 694 |
.na |
| 695 |
memory relative cursor addressing, move to row #1 columns #2 |
| 696 |
T} |
| 697 |
cursor_normal cnorm ve T{ |
| 698 |
.na |
| 699 |
make cursor appear normal (undo civis/cvvis) |
| 700 |
T} |
| 701 |
cursor_right cuf1 nd T{ |
| 702 |
.na |
| 703 |
non-destructive space (move right one space) |
| 704 |
T} |
| 705 |
cursor_to_ll ll ll T{ |
| 706 |
.na |
| 707 |
last line, first column (if no cup) |
| 708 |
T} |
| 709 |
cursor_up cuu1 up T{ |
| 710 |
.na |
| 711 |
up one line |
| 712 |
T} |
| 713 |
cursor_visible cvvis vs T{ |
| 714 |
.na |
| 715 |
make cursor very visible |
| 716 |
T} |
| 717 |
delete_character dch1 dc T{ |
| 718 |
.na |
| 719 |
delete character (P*) |
| 720 |
T} |
| 721 |
delete_line dl1 dl T{ |
| 722 |
.na |
| 723 |
delete line (P*) |
| 724 |
T} |
| 725 |
dis_status_line dsl ds T{ |
| 726 |
.na |
| 727 |
disable status line |
| 728 |
T} |
| 729 |
down_half_line hd hd T{ |
| 730 |
.na |
| 731 |
half a line down |
| 732 |
T} |
| 733 |
enter_alt_charset_mode smacs as T{ |
| 734 |
.na |
| 735 |
start alternate character set (P) |
| 736 |
T} |
| 737 |
enter_blink_mode blink mb T{ |
| 738 |
.na |
| 739 |
turn on blinking |
| 740 |
T} |
| 741 |
enter_bold_mode bold md T{ |
| 742 |
.na |
| 743 |
turn on bold (extra bright) mode |
| 744 |
T} |
| 745 |
enter_ca_mode smcup ti T{ |
| 746 |
.na |
| 747 |
string to start programs using cup |
| 748 |
T} |
| 749 |
enter_delete_mode smdc dm T{ |
| 750 |
.na |
| 751 |
enter delete mode |
| 752 |
T} |
| 753 |
enter_dim_mode dim mh T{ |
| 754 |
.na |
| 755 |
turn on half-bright mode |
| 756 |
T} |
| 757 |
enter_insert_mode smir im T{ |
| 758 |
.na |
| 759 |
enter insert mode |
| 760 |
T} |
| 761 |
enter_secure_mode invis mk T{ |
| 762 |
.na |
| 763 |
turn on blank mode (characters invisible) |
| 764 |
T} |
| 765 |
enter_protected_mode prot mp T{ |
| 766 |
.na |
| 767 |
turn on protected mode |
| 768 |
T} |
| 769 |
enter_reverse_mode rev mr T{ |
| 770 |
.na |
| 771 |
turn on reverse video mode |
| 772 |
T} |
| 773 |
enter_standout_mode smso so T{ |
| 774 |
.na |
| 775 |
begin standout mode |
| 776 |
T} |
| 777 |
enter_underline_mode smul us T{ |
| 778 |
.na |
| 779 |
begin underline mode |
| 780 |
T} |
| 781 |
erase_chars ech ec T{ |
| 782 |
.na |
| 783 |
erase #1 characters (P) |
| 784 |
T} |
| 785 |
exit_alt_charset_mode rmacs ae T{ |
| 786 |
.na |
| 787 |
end alternate character set (P) |
| 788 |
T} |
| 789 |
exit_attribute_mode sgr0 me T{ |
| 790 |
.na |
| 791 |
turn off all attributes |
| 792 |
T} |
| 793 |
exit_ca_mode rmcup te T{ |
| 794 |
.na |
| 795 |
strings to end programs using cup |
| 796 |
T} |
| 797 |
exit_delete_mode rmdc ed T{ |
| 798 |
.na |
| 799 |
end delete mode |
| 800 |
T} |
| 801 |
exit_insert_mode rmir ei T{ |
| 802 |
.na |
| 803 |
exit insert mode |
| 804 |
T} |
| 805 |
exit_standout_mode rmso se T{ |
| 806 |
.na |
| 807 |
exit standout mode |
| 808 |
T} |
| 809 |
exit_underline_mode rmul ue T{ |
| 810 |
.na |
| 811 |
exit underline mode |
| 812 |
T} |
| 813 |
flash_screen flash vb T{ |
| 814 |
.na |
| 815 |
visible bell (may not move cursor) |
| 816 |
T} |
| 817 |
form_feed ff ff T{ |
| 818 |
.na |
| 819 |
hardcopy terminal page eject (P*) |
| 820 |
T} |
| 821 |
from_status_line fsl fs T{ |
| 822 |
.na |
| 823 |
return from status line |
| 824 |
T} |
| 825 |
init_1string is1 i1 T{ |
| 826 |
.na |
| 827 |
initialization string |
| 828 |
T} |
| 829 |
init_2string is2 is T{ |
| 830 |
.na |
| 831 |
initialization string |
| 832 |
T} |
| 833 |
init_3string is3 i3 T{ |
| 834 |
.na |
| 835 |
initialization string |
| 836 |
T} |
| 837 |
init_file if if T{ |
| 838 |
.na |
| 839 |
name of initialization file |
| 840 |
T} |
| 841 |
insert_character ich1 ic T{ |
| 842 |
.na |
| 843 |
insert character (P) |
| 844 |
T} |
| 845 |
insert_line il1 al T{ |
| 846 |
.na |
| 847 |
insert line (P*) |
| 848 |
T} |
| 849 |
insert_padding ip ip T{ |
| 850 |
.na |
| 851 |
insert padding after inserted character |
| 852 |
T} |
| 853 |
key_backspace kbs kb T{ |
| 854 |
.na |
| 855 |
backspace key |
| 856 |
T} |
| 857 |
key_catab ktbc ka T{ |
| 858 |
.na |
| 859 |
clear-all-tabs key |
| 860 |
T} |
| 861 |
key_clear kclr kC T{ |
| 862 |
.na |
| 863 |
clear-screen or erase key |
| 864 |
T} |
| 865 |
key_ctab kctab kt T{ |
| 866 |
.na |
| 867 |
clear-tab key |
| 868 |
T} |
| 869 |
key_dc kdch1 kD T{ |
| 870 |
.na |
| 871 |
delete-character key |
| 872 |
T} |
| 873 |
key_dl kdl1 kL T{ |
| 874 |
.na |
| 875 |
delete-line key |
| 876 |
T} |
| 877 |
key_down kcud1 kd T{ |
| 878 |
.na |
| 879 |
down-arrow key |
| 880 |
T} |
| 881 |
.TE |
| 882 |
.TS |
| 883 |
center; |
| 884 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 885 |
key_eic krmir kM T{ |
| 886 |
.na |
| 887 |
sent by rmir or smir in insert mode |
| 888 |
T} |
| 889 |
key_eol kel kE T{ |
| 890 |
.na |
| 891 |
clear-to-end-of-line key |
| 892 |
T} |
| 893 |
key_eos ked kS T{ |
| 894 |
.na |
| 895 |
clear-to-end-of-screen key |
| 896 |
T} |
| 897 |
key_f0 kf0 k0 T{ |
| 898 |
.na |
| 899 |
F0 function key |
| 900 |
T} |
| 901 |
key_f1 kf1 k1 T{ |
| 902 |
.na |
| 903 |
F1 function key |
| 904 |
T} |
| 905 |
key_f10 kf10 k; T{ |
| 906 |
.na |
| 907 |
F10 function key |
| 908 |
T} |
| 909 |
key_f2 kf2 k2 T{ |
| 910 |
.na |
| 911 |
F2 function key |
| 912 |
T} |
| 913 |
key_f3 kf3 k3 T{ |
| 914 |
.na |
| 915 |
F3 function key |
| 916 |
T} |
| 917 |
key_f4 kf4 k4 T{ |
| 918 |
.na |
| 919 |
F4 function key |
| 920 |
T} |
| 921 |
key_f5 kf5 k5 T{ |
| 922 |
.na |
| 923 |
F5 function key |
| 924 |
T} |
| 925 |
key_f6 kf6 k6 T{ |
| 926 |
.na |
| 927 |
F6 function key |
| 928 |
T} |
| 929 |
key_f7 kf7 k7 T{ |
| 930 |
.na |
| 931 |
F7 function key |
| 932 |
T} |
| 933 |
key_f8 kf8 k8 T{ |
| 934 |
.na |
| 935 |
F8 function key |
| 936 |
T} |
| 937 |
key_f9 kf9 k9 T{ |
| 938 |
.na |
| 939 |
F9 function key |
| 940 |
T} |
| 941 |
key_home khome kh T{ |
| 942 |
.na |
| 943 |
home key |
| 944 |
T} |
| 945 |
key_ic kich1 kI T{ |
| 946 |
.na |
| 947 |
insert-character key |
| 948 |
T} |
| 949 |
key_il kil1 kA T{ |
| 950 |
.na |
| 951 |
insert-line key |
| 952 |
T} |
| 953 |
key_left kcub1 kl T{ |
| 954 |
.na |
| 955 |
left-arrow key |
| 956 |
T} |
| 957 |
key_ll kll kH T{ |
| 958 |
.na |
| 959 |
lower-left key (home down) |
| 960 |
T} |
| 961 |
key_npage knp kN T{ |
| 962 |
.na |
| 963 |
next-page key |
| 964 |
T} |
| 965 |
key_ppage kpp kP T{ |
| 966 |
.na |
| 967 |
previous-page key |
| 968 |
T} |
| 969 |
key_right kcuf1 kr T{ |
| 970 |
.na |
| 971 |
right-arrow key |
| 972 |
T} |
| 973 |
key_sf kind kF T{ |
| 974 |
.na |
| 975 |
scroll-forward key |
| 976 |
T} |
| 977 |
key_sr kri kR T{ |
| 978 |
.na |
| 979 |
scroll-backward key |
| 980 |
T} |
| 981 |
key_stab khts kT T{ |
| 982 |
.na |
| 983 |
set-tab key |
| 984 |
T} |
| 985 |
key_up kcuu1 ku T{ |
| 986 |
.na |
| 987 |
up-arrow key |
| 988 |
T} |
| 989 |
keypad_local rmkx ke T{ |
| 990 |
.na |
| 991 |
leave keypad transmit mode |
| 992 |
T} |
| 993 |
keypad_xmit smkx ks T{ |
| 994 |
.na |
| 995 |
enter keypad transmit mode |
| 996 |
T} |
| 997 |
lab_f0 lf0 l0 T{ |
| 998 |
.na |
| 999 |
label on function key f0 if not f0 |
| 1000 |
T} |
| 1001 |
lab_f1 lf1 l1 T{ |
| 1002 |
.na |
| 1003 |
label on function key f1 if not f1 |
| 1004 |
T} |
| 1005 |
lab_f10 lf10 la T{ |
| 1006 |
.na |
| 1007 |
label on function key f10 if not f10 |
| 1008 |
T} |
| 1009 |
lab_f2 lf2 l2 T{ |
| 1010 |
.na |
| 1011 |
label on function key f2 if not f2 |
| 1012 |
T} |
| 1013 |
lab_f3 lf3 l3 T{ |
| 1014 |
.na |
| 1015 |
label on function key f3 if not f3 |
| 1016 |
T} |
| 1017 |
lab_f4 lf4 l4 T{ |
| 1018 |
.na |
| 1019 |
label on function key f4 if not f4 |
| 1020 |
T} |
| 1021 |
lab_f5 lf5 l5 T{ |
| 1022 |
.na |
| 1023 |
label on function key f5 if not f5 |
| 1024 |
T} |
| 1025 |
lab_f6 lf6 l6 T{ |
| 1026 |
.na |
| 1027 |
label on function key f6 if not f6 |
| 1028 |
T} |
| 1029 |
lab_f7 lf7 l7 T{ |
| 1030 |
.na |
| 1031 |
label on function key f7 if not f7 |
| 1032 |
T} |
| 1033 |
lab_f8 lf8 l8 T{ |
| 1034 |
.na |
| 1035 |
label on function key f8 if not f8 |
| 1036 |
T} |
| 1037 |
lab_f9 lf9 l9 T{ |
| 1038 |
.na |
| 1039 |
label on function key f9 if not f9 |
| 1040 |
T} |
| 1041 |
meta_off rmm mo T{ |
| 1042 |
.na |
| 1043 |
turn off meta mode |
| 1044 |
T} |
| 1045 |
meta_on smm mm T{ |
| 1046 |
.na |
| 1047 |
turn on meta mode (8th-bit on) |
| 1048 |
T} |
| 1049 |
newline nel nw T{ |
| 1050 |
.na |
| 1051 |
newline (behave like cr followed by lf) |
| 1052 |
T} |
| 1053 |
pad_char pad pc T{ |
| 1054 |
.na |
| 1055 |
padding char (instead of null) |
| 1056 |
T} |
| 1057 |
parm_dch dch DC T{ |
| 1058 |
.na |
| 1059 |
delete #1 characters (P*) |
| 1060 |
T} |
| 1061 |
parm_delete_line dl DL T{ |
| 1062 |
.na |
| 1063 |
delete #1 lines (P*) |
| 1064 |
T} |
| 1065 |
parm_down_cursor cud DO T{ |
| 1066 |
.na |
| 1067 |
down #1 lines (P*) |
| 1068 |
T} |
| 1069 |
parm_ich ich IC T{ |
| 1070 |
.na |
| 1071 |
insert #1 characters (P*) |
| 1072 |
T} |
| 1073 |
parm_index indn SF T{ |
| 1074 |
.na |
| 1075 |
scroll forward #1 lines (P) |
| 1076 |
T} |
| 1077 |
parm_insert_line il AL T{ |
| 1078 |
.na |
| 1079 |
insert #1 lines (P*) |
| 1080 |
T} |
| 1081 |
parm_left_cursor cub LE T{ |
| 1082 |
.na |
| 1083 |
move #1 characters to the left (P) |
| 1084 |
T} |
| 1085 |
parm_right_cursor cuf RI T{ |
| 1086 |
.na |
| 1087 |
move #1 characters to the right (P*) |
| 1088 |
T} |
| 1089 |
parm_rindex rin SR T{ |
| 1090 |
.na |
| 1091 |
scroll back #1 lines (P) |
| 1092 |
T} |
| 1093 |
parm_up_cursor cuu UP T{ |
| 1094 |
.na |
| 1095 |
up #1 lines (P*) |
| 1096 |
T} |
| 1097 |
pkey_key pfkey pk T{ |
| 1098 |
.na |
| 1099 |
program function key #1 to type string #2 |
| 1100 |
T} |
| 1101 |
pkey_local pfloc pl T{ |
| 1102 |
.na |
| 1103 |
program function key #1 to execute string #2 |
| 1104 |
T} |
| 1105 |
pkey_xmit pfx px T{ |
| 1106 |
.na |
| 1107 |
program function key #1 to transmit string #2 |
| 1108 |
T} |
| 1109 |
print_screen mc0 ps T{ |
| 1110 |
.na |
| 1111 |
print contents of screen |
| 1112 |
T} |
| 1113 |
prtr_off mc4 pf T{ |
| 1114 |
.na |
| 1115 |
turn off printer |
| 1116 |
T} |
| 1117 |
prtr_on mc5 po T{ |
| 1118 |
.na |
| 1119 |
turn on printer |
| 1120 |
T} |
| 1121 |
repeat_char rep rp T{ |
| 1122 |
.na |
| 1123 |
repeat char #1 #2 times (P*) |
| 1124 |
T} |
| 1125 |
reset_1string rs1 r1 T{ |
| 1126 |
.na |
| 1127 |
reset string |
| 1128 |
T} |
| 1129 |
reset_2string rs2 r2 T{ |
| 1130 |
.na |
| 1131 |
reset string |
| 1132 |
T} |
| 1133 |
.TE |
| 1134 |
.TS |
| 1135 |
center; |
| 1136 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 1137 |
reset_3string rs3 r3 T{ |
| 1138 |
.na |
| 1139 |
reset string |
| 1140 |
T} |
| 1141 |
reset_file rf rf T{ |
| 1142 |
.na |
| 1143 |
name of reset file |
| 1144 |
T} |
| 1145 |
restore_cursor rc rc T{ |
| 1146 |
.na |
| 1147 |
restore cursor to position of last save_cursor |
| 1148 |
T} |
| 1149 |
row_address vpa cv T{ |
| 1150 |
.na |
| 1151 |
vertical position #1 absolute (P) |
| 1152 |
T} |
| 1153 |
save_cursor sc sc T{ |
| 1154 |
.na |
| 1155 |
save current cursor position (P) |
| 1156 |
T} |
| 1157 |
scroll_forward ind sf T{ |
| 1158 |
.na |
| 1159 |
scroll text up (P) |
| 1160 |
T} |
| 1161 |
scroll_reverse ri sr T{ |
| 1162 |
.na |
| 1163 |
scroll text down (P) |
| 1164 |
T} |
| 1165 |
set_attributes sgr sa T{ |
| 1166 |
.na |
| 1167 |
define video attributes #1-#9 (PG9) |
| 1168 |
T} |
| 1169 |
set_tab hts st T{ |
| 1170 |
.na |
| 1171 |
set a tab in every row, current columns |
| 1172 |
T} |
| 1173 |
set_window wind wi T{ |
| 1174 |
.na |
| 1175 |
current window is lines #1-#2 cols #3-#4 |
| 1176 |
T} |
| 1177 |
tab ht ta T{ |
| 1178 |
.na |
| 1179 |
tab to next 8-space hardware tab stop |
| 1180 |
T} |
| 1181 |
to_status_line tsl ts T{ |
| 1182 |
.na |
| 1183 |
move to status line, column #1 |
| 1184 |
T} |
| 1185 |
underline_char uc uc T{ |
| 1186 |
.na |
| 1187 |
underline char and move past it |
| 1188 |
T} |
| 1189 |
up_half_line hu hu T{ |
| 1190 |
.na |
| 1191 |
half a line up |
| 1192 |
T} |
| 1193 |
init_prog iprog iP T{ |
| 1194 |
.na |
| 1195 |
path name of program for initialization |
| 1196 |
T} |
| 1197 |
key_a1 ka1 K1 T{ |
| 1198 |
.na |
| 1199 |
upper left of keypad |
| 1200 |
T} |
| 1201 |
key_a3 ka3 K3 T{ |
| 1202 |
.na |
| 1203 |
upper right of keypad |
| 1204 |
T} |
| 1205 |
key_b2 kb2 K2 T{ |
| 1206 |
.na |
| 1207 |
center of keypad |
| 1208 |
T} |
| 1209 |
key_c1 kc1 K4 T{ |
| 1210 |
.na |
| 1211 |
lower left of keypad |
| 1212 |
T} |
| 1213 |
key_c3 kc3 K5 T{ |
| 1214 |
.na |
| 1215 |
lower right of keypad |
| 1216 |
T} |
| 1217 |
prtr_non mc5p pO T{ |
| 1218 |
.na |
| 1219 |
turn on printer for #1 bytes |
| 1220 |
T} |
| 1221 |
char_padding rmp rP T{ |
| 1222 |
.na |
| 1223 |
like ip but when in insert mode |
| 1224 |
T} |
| 1225 |
acs_chars acsc ac T{ |
| 1226 |
.na |
| 1227 |
graphics charset pairs, based on vt100 |
| 1228 |
T} |
| 1229 |
plab_norm pln pn T{ |
| 1230 |
.na |
| 1231 |
program label #1 to show string #2 |
| 1232 |
T} |
| 1233 |
key_btab kcbt kB T{ |
| 1234 |
.na |
| 1235 |
back-tab key |
| 1236 |
T} |
| 1237 |
enter_xon_mode smxon SX T{ |
| 1238 |
.na |
| 1239 |
turn on xon/xoff handshaking |
| 1240 |
T} |
| 1241 |
exit_xon_mode rmxon RX T{ |
| 1242 |
.na |
| 1243 |
turn off xon/xoff handshaking |
| 1244 |
T} |
| 1245 |
enter_am_mode smam SA T{ |
| 1246 |
.na |
| 1247 |
turn on automatic margins |
| 1248 |
T} |
| 1249 |
exit_am_mode rmam RA T{ |
| 1250 |
.na |
| 1251 |
turn off automatic margins |
| 1252 |
T} |
| 1253 |
xon_character xonc XN T{ |
| 1254 |
.na |
| 1255 |
XON character |
| 1256 |
T} |
| 1257 |
xoff_character xoffc XF T{ |
| 1258 |
.na |
| 1259 |
XOFF character |
| 1260 |
T} |
| 1261 |
ena_acs enacs eA T{ |
| 1262 |
.na |
| 1263 |
enable alternate char set |
| 1264 |
T} |
| 1265 |
label_on smln LO T{ |
| 1266 |
.na |
| 1267 |
turn on soft labels |
| 1268 |
T} |
| 1269 |
label_off rmln LF T{ |
| 1270 |
.na |
| 1271 |
turn off soft labels |
| 1272 |
T} |
| 1273 |
key_beg kbeg @1 T{ |
| 1274 |
.na |
| 1275 |
begin key |
| 1276 |
T} |
| 1277 |
key_cancel kcan @2 T{ |
| 1278 |
.na |
| 1279 |
cancel key |
| 1280 |
T} |
| 1281 |
key_close kclo @3 T{ |
| 1282 |
.na |
| 1283 |
close key |
| 1284 |
T} |
| 1285 |
key_command kcmd @4 T{ |
| 1286 |
.na |
| 1287 |
command key |
| 1288 |
T} |
| 1289 |
key_copy kcpy @5 T{ |
| 1290 |
.na |
| 1291 |
copy key |
| 1292 |
T} |
| 1293 |
key_create kcrt @6 T{ |
| 1294 |
.na |
| 1295 |
create key |
| 1296 |
T} |
| 1297 |
key_end kend @7 T{ |
| 1298 |
.na |
| 1299 |
end key |
| 1300 |
T} |
| 1301 |
key_enter kent @8 T{ |
| 1302 |
.na |
| 1303 |
enter/send key |
| 1304 |
T} |
| 1305 |
key_exit kext @9 T{ |
| 1306 |
.na |
| 1307 |
exit key |
| 1308 |
T} |
| 1309 |
key_find kfnd @0 T{ |
| 1310 |
.na |
| 1311 |
find key |
| 1312 |
T} |
| 1313 |
key_help khlp %1 T{ |
| 1314 |
.na |
| 1315 |
help key |
| 1316 |
T} |
| 1317 |
key_mark kmrk %2 T{ |
| 1318 |
.na |
| 1319 |
mark key |
| 1320 |
T} |
| 1321 |
key_message kmsg %3 T{ |
| 1322 |
.na |
| 1323 |
message key |
| 1324 |
T} |
| 1325 |
key_move kmov %4 T{ |
| 1326 |
.na |
| 1327 |
move key |
| 1328 |
T} |
| 1329 |
key_next knxt %5 T{ |
| 1330 |
.na |
| 1331 |
next key |
| 1332 |
T} |
| 1333 |
key_open kopn %6 T{ |
| 1334 |
.na |
| 1335 |
open key |
| 1336 |
T} |
| 1337 |
key_options kopt %7 T{ |
| 1338 |
.na |
| 1339 |
options key |
| 1340 |
T} |
| 1341 |
key_previous kprv %8 T{ |
| 1342 |
.na |
| 1343 |
previous key |
| 1344 |
T} |
| 1345 |
key_print kprt %9 T{ |
| 1346 |
.na |
| 1347 |
print key |
| 1348 |
T} |
| 1349 |
key_redo krdo %0 T{ |
| 1350 |
.na |
| 1351 |
redo key |
| 1352 |
T} |
| 1353 |
key_reference kref &1 T{ |
| 1354 |
.na |
| 1355 |
reference key |
| 1356 |
T} |
| 1357 |
key_refresh krfr &2 T{ |
| 1358 |
.na |
| 1359 |
refresh key |
| 1360 |
T} |
| 1361 |
key_replace krpl &3 T{ |
| 1362 |
.na |
| 1363 |
replace key |
| 1364 |
T} |
| 1365 |
key_restart krst &4 T{ |
| 1366 |
.na |
| 1367 |
restart key |
| 1368 |
T} |
| 1369 |
key_resume kres &5 T{ |
| 1370 |
.na |
| 1371 |
resume key |
| 1372 |
T} |
| 1373 |
key_save ksav &6 T{ |
| 1374 |
.na |
| 1375 |
save key |
| 1376 |
T} |
| 1377 |
key_suspend kspd &7 T{ |
| 1378 |
.na |
| 1379 |
suspend key |
| 1380 |
T} |
| 1381 |
key_undo kund &8 T{ |
| 1382 |
.na |
| 1383 |
undo key |
| 1384 |
T} |
| 1385 |
.TE |
| 1386 |
.TS |
| 1387 |
center; |
| 1388 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 1389 |
key_sbeg kBEG &9 T{ |
| 1390 |
.na |
| 1391 |
shifted begin key |
| 1392 |
T} |
| 1393 |
key_scancel kCAN &0 T{ |
| 1394 |
.na |
| 1395 |
shifted cancel key |
| 1396 |
T} |
| 1397 |
key_scommand kCMD *1 T{ |
| 1398 |
.na |
| 1399 |
shifted command key |
| 1400 |
T} |
| 1401 |
key_scopy kCPY *2 T{ |
| 1402 |
.na |
| 1403 |
shifted copy key |
| 1404 |
T} |
| 1405 |
key_screate kCRT *3 T{ |
| 1406 |
.na |
| 1407 |
shifted create key |
| 1408 |
T} |
| 1409 |
key_sdc kDC *4 T{ |
| 1410 |
.na |
| 1411 |
shifted delete-character key |
| 1412 |
T} |
| 1413 |
key_sdl kDL *5 T{ |
| 1414 |
.na |
| 1415 |
shifted delete-line key |
| 1416 |
T} |
| 1417 |
key_select kslt *6 T{ |
| 1418 |
.na |
| 1419 |
select key |
| 1420 |
T} |
| 1421 |
key_send kEND *7 T{ |
| 1422 |
.na |
| 1423 |
shifted end key |
| 1424 |
T} |
| 1425 |
key_seol kEOL *8 T{ |
| 1426 |
.na |
| 1427 |
shifted clear-to-end-of-line key |
| 1428 |
T} |
| 1429 |
key_sexit kEXT *9 T{ |
| 1430 |
.na |
| 1431 |
shifted exit key |
| 1432 |
T} |
| 1433 |
key_sfind kFND *0 T{ |
| 1434 |
.na |
| 1435 |
shifted find key |
| 1436 |
T} |
| 1437 |
key_shelp kHLP #1 T{ |
| 1438 |
.na |
| 1439 |
shifted help key |
| 1440 |
T} |
| 1441 |
key_shome kHOM #2 T{ |
| 1442 |
.na |
| 1443 |
shifted home key |
| 1444 |
T} |
| 1445 |
key_sic kIC #3 T{ |
| 1446 |
.na |
| 1447 |
shifted insert-character key |
| 1448 |
T} |
| 1449 |
key_sleft kLFT #4 T{ |
| 1450 |
.na |
| 1451 |
shifted left-arrow key |
| 1452 |
T} |
| 1453 |
key_smessage kMSG %a T{ |
| 1454 |
.na |
| 1455 |
shifted message key |
| 1456 |
T} |
| 1457 |
key_smove kMOV %b T{ |
| 1458 |
.na |
| 1459 |
shifted move key |
| 1460 |
T} |
| 1461 |
key_snext kNXT %c T{ |
| 1462 |
.na |
| 1463 |
shifted next key |
| 1464 |
T} |
| 1465 |
key_soptions kOPT %d T{ |
| 1466 |
.na |
| 1467 |
shifted options key |
| 1468 |
T} |
| 1469 |
key_sprevious kPRV %e T{ |
| 1470 |
.na |
| 1471 |
shifted previous key |
| 1472 |
T} |
| 1473 |
key_sprint kPRT %f T{ |
| 1474 |
.na |
| 1475 |
shifted print key |
| 1476 |
T} |
| 1477 |
key_sredo kRDO %g T{ |
| 1478 |
.na |
| 1479 |
shifted redo key |
| 1480 |
T} |
| 1481 |
key_sreplace kRPL %h T{ |
| 1482 |
.na |
| 1483 |
shifted replace key |
| 1484 |
T} |
| 1485 |
key_sright kRIT %i T{ |
| 1486 |
.na |
| 1487 |
shifted right-arrow key |
| 1488 |
T} |
| 1489 |
key_srsume kRES %j T{ |
| 1490 |
.na |
| 1491 |
shifted resume key |
| 1492 |
T} |
| 1493 |
key_ssave kSAV !1 T{ |
| 1494 |
.na |
| 1495 |
shifted save key |
| 1496 |
T} |
| 1497 |
key_ssuspend kSPD !2 T{ |
| 1498 |
.na |
| 1499 |
shifted suspend key |
| 1500 |
T} |
| 1501 |
key_sundo kUND !3 T{ |
| 1502 |
.na |
| 1503 |
shifted undo key |
| 1504 |
T} |
| 1505 |
req_for_input rfi RF T{ |
| 1506 |
.na |
| 1507 |
send next input char (for ptys) |
| 1508 |
T} |
| 1509 |
key_f11 kf11 F1 T{ |
| 1510 |
.na |
| 1511 |
F11 function key |
| 1512 |
T} |
| 1513 |
key_f12 kf12 F2 T{ |
| 1514 |
.na |
| 1515 |
F12 function key |
| 1516 |
T} |
| 1517 |
key_f13 kf13 F3 T{ |
| 1518 |
.na |
| 1519 |
F13 function key |
| 1520 |
T} |
| 1521 |
key_f14 kf14 F4 T{ |
| 1522 |
.na |
| 1523 |
F14 function key |
| 1524 |
T} |
| 1525 |
key_f15 kf15 F5 T{ |
| 1526 |
.na |
| 1527 |
F15 function key |
| 1528 |
T} |
| 1529 |
key_f16 kf16 F6 T{ |
| 1530 |
.na |
| 1531 |
F16 function key |
| 1532 |
T} |
| 1533 |
key_f17 kf17 F7 T{ |
| 1534 |
.na |
| 1535 |
F17 function key |
| 1536 |
T} |
| 1537 |
key_f18 kf18 F8 T{ |
| 1538 |
.na |
| 1539 |
F18 function key |
| 1540 |
T} |
| 1541 |
key_f19 kf19 F9 T{ |
| 1542 |
.na |
| 1543 |
F19 function key |
| 1544 |
T} |
| 1545 |
key_f20 kf20 FA T{ |
| 1546 |
.na |
| 1547 |
F20 function key |
| 1548 |
T} |
| 1549 |
key_f21 kf21 FB T{ |
| 1550 |
.na |
| 1551 |
F21 function key |
| 1552 |
T} |
| 1553 |
key_f22 kf22 FC T{ |
| 1554 |
.na |
| 1555 |
F22 function key |
| 1556 |
T} |
| 1557 |
key_f23 kf23 FD T{ |
| 1558 |
.na |
| 1559 |
F23 function key |
| 1560 |
T} |
| 1561 |
key_f24 kf24 FE T{ |
| 1562 |
.na |
| 1563 |
F24 function key |
| 1564 |
T} |
| 1565 |
key_f25 kf25 FF T{ |
| 1566 |
.na |
| 1567 |
F25 function key |
| 1568 |
T} |
| 1569 |
key_f26 kf26 FG T{ |
| 1570 |
.na |
| 1571 |
F26 function key |
| 1572 |
T} |
| 1573 |
key_f27 kf27 FH T{ |
| 1574 |
.na |
| 1575 |
F27 function key |
| 1576 |
T} |
| 1577 |
key_f28 kf28 FI T{ |
| 1578 |
.na |
| 1579 |
F28 function key |
| 1580 |
T} |
| 1581 |
key_f29 kf29 FJ T{ |
| 1582 |
.na |
| 1583 |
F29 function key |
| 1584 |
T} |
| 1585 |
key_f30 kf30 FK T{ |
| 1586 |
.na |
| 1587 |
F30 function key |
| 1588 |
T} |
| 1589 |
key_f31 kf31 FL T{ |
| 1590 |
.na |
| 1591 |
F31 function key |
| 1592 |
T} |
| 1593 |
key_f32 kf32 FM T{ |
| 1594 |
.na |
| 1595 |
F32 function key |
| 1596 |
T} |
| 1597 |
key_f33 kf33 FN T{ |
| 1598 |
.na |
| 1599 |
F33 function key |
| 1600 |
T} |
| 1601 |
key_f34 kf34 FO T{ |
| 1602 |
.na |
| 1603 |
F34 function key |
| 1604 |
T} |
| 1605 |
key_f35 kf35 FP T{ |
| 1606 |
.na |
| 1607 |
F35 function key |
| 1608 |
T} |
| 1609 |
key_f36 kf36 FQ T{ |
| 1610 |
.na |
| 1611 |
F36 function key |
| 1612 |
T} |
| 1613 |
key_f37 kf37 FR T{ |
| 1614 |
.na |
| 1615 |
F37 function key |
| 1616 |
T} |
| 1617 |
key_f38 kf38 FS T{ |
| 1618 |
.na |
| 1619 |
F38 function key |
| 1620 |
T} |
| 1621 |
key_f39 kf39 FT T{ |
| 1622 |
.na |
| 1623 |
F39 function key |
| 1624 |
T} |
| 1625 |
key_f40 kf40 FU T{ |
| 1626 |
.na |
| 1627 |
F40 function key |
| 1628 |
T} |
| 1629 |
key_f41 kf41 FV T{ |
| 1630 |
.na |
| 1631 |
F41 function key |
| 1632 |
T} |
| 1633 |
key_f42 kf42 FW T{ |
| 1634 |
.na |
| 1635 |
F42 function key |
| 1636 |
T} |
| 1637 |
.TE |
| 1638 |
.TS |
| 1639 |
center; |
| 1640 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 1641 |
key_f43 kf43 FX T{ |
| 1642 |
.na |
| 1643 |
F43 function key |
| 1644 |
T} |
| 1645 |
key_f44 kf44 FY T{ |
| 1646 |
.na |
| 1647 |
F44 function key |
| 1648 |
T} |
| 1649 |
key_f45 kf45 FZ T{ |
| 1650 |
.na |
| 1651 |
F45 function key |
| 1652 |
T} |
| 1653 |
key_f46 kf46 Fa T{ |
| 1654 |
.na |
| 1655 |
F46 function key |
| 1656 |
T} |
| 1657 |
key_f47 kf47 Fb T{ |
| 1658 |
.na |
| 1659 |
F47 function key |
| 1660 |
T} |
| 1661 |
key_f48 kf48 Fc T{ |
| 1662 |
.na |
| 1663 |
F48 function key |
| 1664 |
T} |
| 1665 |
key_f49 kf49 Fd T{ |
| 1666 |
.na |
| 1667 |
F49 function key |
| 1668 |
T} |
| 1669 |
key_f50 kf50 Fe T{ |
| 1670 |
.na |
| 1671 |
F50 function key |
| 1672 |
T} |
| 1673 |
key_f51 kf51 Ff T{ |
| 1674 |
.na |
| 1675 |
F51 function key |
| 1676 |
T} |
| 1677 |
key_f52 kf52 Fg T{ |
| 1678 |
.na |
| 1679 |
F52 function key |
| 1680 |
T} |
| 1681 |
key_f53 kf53 Fh T{ |
| 1682 |
.na |
| 1683 |
F53 function key |
| 1684 |
T} |
| 1685 |
key_f54 kf54 Fi T{ |
| 1686 |
.na |
| 1687 |
F54 function key |
| 1688 |
T} |
| 1689 |
key_f55 kf55 Fj T{ |
| 1690 |
.na |
| 1691 |
F55 function key |
| 1692 |
T} |
| 1693 |
key_f56 kf56 Fk T{ |
| 1694 |
.na |
| 1695 |
F56 function key |
| 1696 |
T} |
| 1697 |
key_f57 kf57 Fl T{ |
| 1698 |
.na |
| 1699 |
F57 function key |
| 1700 |
T} |
| 1701 |
key_f58 kf58 Fm T{ |
| 1702 |
.na |
| 1703 |
F58 function key |
| 1704 |
T} |
| 1705 |
key_f59 kf59 Fn T{ |
| 1706 |
.na |
| 1707 |
F59 function key |
| 1708 |
T} |
| 1709 |
key_f60 kf60 Fo T{ |
| 1710 |
.na |
| 1711 |
F60 function key |
| 1712 |
T} |
| 1713 |
key_f61 kf61 Fp T{ |
| 1714 |
.na |
| 1715 |
F61 function key |
| 1716 |
T} |
| 1717 |
key_f62 kf62 Fq T{ |
| 1718 |
.na |
| 1719 |
F62 function key |
| 1720 |
T} |
| 1721 |
key_f63 kf63 Fr T{ |
| 1722 |
.na |
| 1723 |
F63 function key |
| 1724 |
T} |
| 1725 |
clr_bol el1 cb T{ |
| 1726 |
.na |
| 1727 |
Clear to beginning of line |
| 1728 |
T} |
| 1729 |
clear_margins mgc MC T{ |
| 1730 |
.na |
| 1731 |
clear right and left soft margins |
| 1732 |
T} |
| 1733 |
set_left_margin smgl ML T{ |
| 1734 |
.na |
| 1735 |
set left soft margin at current column (not in BSD \fItermcap\fP) |
| 1736 |
T} |
| 1737 |
set_right_margin smgr MR T{ |
| 1738 |
.na |
| 1739 |
set right soft margin at current column |
| 1740 |
T} |
| 1741 |
label_format fln Lf T{ |
| 1742 |
.na |
| 1743 |
label format |
| 1744 |
T} |
| 1745 |
set_clock sclk SC T{ |
| 1746 |
.na |
| 1747 |
set clock, #1 hrs #2 mins #3 secs |
| 1748 |
T} |
| 1749 |
display_clock dclk DK T{ |
| 1750 |
.na |
| 1751 |
display clock |
| 1752 |
T} |
| 1753 |
remove_clock rmclk RC T{ |
| 1754 |
.na |
| 1755 |
remove clock |
| 1756 |
T} |
| 1757 |
create_window cwin CW T{ |
| 1758 |
.na |
| 1759 |
define a window #1 from #2,#3 to #4,#5 |
| 1760 |
T} |
| 1761 |
goto_window wingo WG T{ |
| 1762 |
.na |
| 1763 |
go to window #1 |
| 1764 |
T} |
| 1765 |
hangup hup HU T{ |
| 1766 |
.na |
| 1767 |
hang-up phone |
| 1768 |
T} |
| 1769 |
dial_phone dial DI T{ |
| 1770 |
.na |
| 1771 |
dial number #1 |
| 1772 |
T} |
| 1773 |
quick_dial qdial QD T{ |
| 1774 |
.na |
| 1775 |
dial number #1 without checking |
| 1776 |
T} |
| 1777 |
tone tone TO T{ |
| 1778 |
.na |
| 1779 |
select touch tone dialing |
| 1780 |
T} |
| 1781 |
pulse pulse PU T{ |
| 1782 |
.na |
| 1783 |
select pulse dialing |
| 1784 |
T} |
| 1785 |
flash_hook hook fh T{ |
| 1786 |
.na |
| 1787 |
flash switch hook |
| 1788 |
T} |
| 1789 |
fixed_pause pause PA T{ |
| 1790 |
.na |
| 1791 |
pause for 2-3 seconds |
| 1792 |
T} |
| 1793 |
wait_tone wait WA T{ |
| 1794 |
.na |
| 1795 |
wait for dial-tone |
| 1796 |
T} |
| 1797 |
user0 u0 u0 T{ |
| 1798 |
.na |
| 1799 |
User string #0 |
| 1800 |
T} |
| 1801 |
user1 u1 u1 T{ |
| 1802 |
.na |
| 1803 |
User string #1 |
| 1804 |
T} |
| 1805 |
user2 u2 u2 T{ |
| 1806 |
.na |
| 1807 |
User string #2 |
| 1808 |
T} |
| 1809 |
user3 u3 u3 T{ |
| 1810 |
.na |
| 1811 |
User string #3 |
| 1812 |
T} |
| 1813 |
user4 u4 u4 T{ |
| 1814 |
.na |
| 1815 |
User string #4 |
| 1816 |
T} |
| 1817 |
user5 u5 u5 T{ |
| 1818 |
.na |
| 1819 |
User string #5 |
| 1820 |
T} |
| 1821 |
user6 u6 u6 T{ |
| 1822 |
.na |
| 1823 |
User string #6 |
| 1824 |
T} |
| 1825 |
user7 u7 u7 T{ |
| 1826 |
.na |
| 1827 |
User string #7 |
| 1828 |
T} |
| 1829 |
user8 u8 u8 T{ |
| 1830 |
.na |
| 1831 |
User string #8 |
| 1832 |
T} |
| 1833 |
user9 u9 u9 T{ |
| 1834 |
.na |
| 1835 |
User string #9 |
| 1836 |
T} |
| 1837 |
orig_pair op op T{ |
| 1838 |
.na |
| 1839 |
Set default pair to its original value |
| 1840 |
T} |
| 1841 |
orig_colors oc oc T{ |
| 1842 |
.na |
| 1843 |
Set all color pairs to the original ones |
| 1844 |
T} |
| 1845 |
initialize_color initc Ic T{ |
| 1846 |
.na |
| 1847 |
initialize color #1 to (#2,#3,#4) |
| 1848 |
T} |
| 1849 |
initialize_pair initp Ip T{ |
| 1850 |
.na |
| 1851 |
Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7) |
| 1852 |
T} |
| 1853 |
set_color_pair scp sp T{ |
| 1854 |
.na |
| 1855 |
Set current color pair to #1 |
| 1856 |
T} |
| 1857 |
set_foreground setf Sf T{ |
| 1858 |
.na |
| 1859 |
Set foreground color #1 |
| 1860 |
T} |
| 1861 |
set_background setb Sb T{ |
| 1862 |
.na |
| 1863 |
Set background color #1 |
| 1864 |
T} |
| 1865 |
change_char_pitch cpi ZA T{ |
| 1866 |
.na |
| 1867 |
Change number of characters per inch to #1 |
| 1868 |
T} |
| 1869 |
change_line_pitch lpi ZB T{ |
| 1870 |
.na |
| 1871 |
Change number of lines per inch to #1 |
| 1872 |
T} |
| 1873 |
change_res_horz chr ZC T{ |
| 1874 |
.na |
| 1875 |
Change horizontal resolution to #1 |
| 1876 |
T} |
| 1877 |
change_res_vert cvr ZD T{ |
| 1878 |
.na |
| 1879 |
Change vertical resolution to #1 |
| 1880 |
T} |
| 1881 |
define_char defc ZE T{ |
| 1882 |
.na |
| 1883 |
Define a character #1, #2 dots wide, descender #3 |
| 1884 |
T} |
| 1885 |
enter_doublewide_mode swidm ZF T{ |
| 1886 |
.na |
| 1887 |
Enter double-wide mode |
| 1888 |
T} |
| 1889 |
.TE |
| 1890 |
.TS |
| 1891 |
center; |
| 1892 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 1893 |
enter_draft_quality sdrfq ZG T{ |
| 1894 |
.na |
| 1895 |
Enter draft-quality mode |
| 1896 |
T} |
| 1897 |
enter_italics_mode sitm ZH T{ |
| 1898 |
.na |
| 1899 |
Enter italic mode |
| 1900 |
T} |
| 1901 |
enter_leftward_mode slm ZI T{ |
| 1902 |
.na |
| 1903 |
Start leftward carriage motion |
| 1904 |
T} |
| 1905 |
enter_micro_mode smicm ZJ T{ |
| 1906 |
.na |
| 1907 |
Start micro-motion mode |
| 1908 |
T} |
| 1909 |
enter_near_letter_quality snlq ZK T{ |
| 1910 |
.na |
| 1911 |
Enter NLQ mode |
| 1912 |
T} |
| 1913 |
enter_normal_quality snrmq ZL T{ |
| 1914 |
.na |
| 1915 |
Enter normal-quality mode |
| 1916 |
T} |
| 1917 |
enter_shadow_mode sshm ZM T{ |
| 1918 |
.na |
| 1919 |
Enter shadow-print mode |
| 1920 |
T} |
| 1921 |
enter_subscript_mode ssubm ZN T{ |
| 1922 |
.na |
| 1923 |
Enter subscript mode |
| 1924 |
T} |
| 1925 |
enter_superscript_mode ssupm ZO T{ |
| 1926 |
.na |
| 1927 |
Enter superscript mode |
| 1928 |
T} |
| 1929 |
enter_upward_mode sum ZP T{ |
| 1930 |
.na |
| 1931 |
Start upward carriage motion |
| 1932 |
T} |
| 1933 |
exit_doublewide_mode rwidm ZQ T{ |
| 1934 |
.na |
| 1935 |
End double-wide mode |
| 1936 |
T} |
| 1937 |
exit_italics_mode ritm ZR T{ |
| 1938 |
.na |
| 1939 |
End italic mode |
| 1940 |
T} |
| 1941 |
exit_leftward_mode rlm ZS T{ |
| 1942 |
.na |
| 1943 |
End left-motion mode |
| 1944 |
T} |
| 1945 |
exit_micro_mode rmicm ZT T{ |
| 1946 |
.na |
| 1947 |
End micro-motion mode |
| 1948 |
T} |
| 1949 |
exit_shadow_mode rshm ZU T{ |
| 1950 |
.na |
| 1951 |
End shadow-print mode |
| 1952 |
T} |
| 1953 |
exit_subscript_mode rsubm ZV T{ |
| 1954 |
.na |
| 1955 |
End subscript mode |
| 1956 |
T} |
| 1957 |
exit_superscript_mode rsupm ZW T{ |
| 1958 |
.na |
| 1959 |
End superscript mode |
| 1960 |
T} |
| 1961 |
exit_upward_mode rum ZX T{ |
| 1962 |
.na |
| 1963 |
End reverse character motion |
| 1964 |
T} |
| 1965 |
micro_column_address mhpa ZY T{ |
| 1966 |
.na |
| 1967 |
Like column_address in micro mode |
| 1968 |
T} |
| 1969 |
micro_down mcud1 ZZ T{ |
| 1970 |
.na |
| 1971 |
Like cursor_down in micro mode |
| 1972 |
T} |
| 1973 |
micro_left mcub1 Za T{ |
| 1974 |
.na |
| 1975 |
Like cursor_left in micro mode |
| 1976 |
T} |
| 1977 |
micro_right mcuf1 Zb T{ |
| 1978 |
.na |
| 1979 |
Like cursor_right in micro mode |
| 1980 |
T} |
| 1981 |
micro_row_address mvpa Zc T{ |
| 1982 |
.na |
| 1983 |
Like row_address #1 in micro mode |
| 1984 |
T} |
| 1985 |
micro_up mcuu1 Zd T{ |
| 1986 |
.na |
| 1987 |
Like cursor_up in micro mode |
| 1988 |
T} |
| 1989 |
order_of_pins porder Ze T{ |
| 1990 |
.na |
| 1991 |
Match software bits to print-head pins |
| 1992 |
T} |
| 1993 |
parm_down_micro mcud Zf T{ |
| 1994 |
.na |
| 1995 |
Like parm_down_cursor in micro mode |
| 1996 |
T} |
| 1997 |
parm_left_micro mcub Zg T{ |
| 1998 |
.na |
| 1999 |
Like parm_left_cursor in micro mode |
| 2000 |
T} |
| 2001 |
parm_right_micro mcuf Zh T{ |
| 2002 |
.na |
| 2003 |
Like parm_right_cursor in micro mode |
| 2004 |
T} |
| 2005 |
parm_up_micro mcuu Zi T{ |
| 2006 |
.na |
| 2007 |
Like parm_up_cursor in micro mode |
| 2008 |
T} |
| 2009 |
select_char_set scs Zj T{ |
| 2010 |
.na |
| 2011 |
Select character set, #1 |
| 2012 |
T} |
| 2013 |
set_bottom_margin smgb Zk T{ |
| 2014 |
.na |
| 2015 |
Set bottom margin at current line |
| 2016 |
T} |
| 2017 |
set_bottom_margin_parm smgbp Zl T{ |
| 2018 |
.na |
| 2019 |
Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom |
| 2020 |
T} |
| 2021 |
set_left_margin_parm smglp Zm T{ |
| 2022 |
.na |
| 2023 |
Set left (right) margin at column #1 |
| 2024 |
T} |
| 2025 |
set_right_margin_parm smgrp Zn T{ |
| 2026 |
.na |
| 2027 |
Set right margin at column #1 |
| 2028 |
T} |
| 2029 |
set_top_margin smgt Zo T{ |
| 2030 |
.na |
| 2031 |
Set top margin at current line |
| 2032 |
T} |
| 2033 |
set_top_margin_parm smgtp Zp T{ |
| 2034 |
.na |
| 2035 |
Set top (bottom) margin at row #1 |
| 2036 |
T} |
| 2037 |
start_bit_image sbim Zq T{ |
| 2038 |
.na |
| 2039 |
Start printing bit image graphics |
| 2040 |
T} |
| 2041 |
start_char_set_def scsd Zr T{ |
| 2042 |
.na |
| 2043 |
Start character set definition #1, with #2 characters in the set |
| 2044 |
T} |
| 2045 |
stop_bit_image rbim Zs T{ |
| 2046 |
.na |
| 2047 |
Stop printing bit image graphics |
| 2048 |
T} |
| 2049 |
stop_char_set_def rcsd Zt T{ |
| 2050 |
.na |
| 2051 |
End definition of character set #1 |
| 2052 |
T} |
| 2053 |
subscript_characters subcs Zu T{ |
| 2054 |
.na |
| 2055 |
List of subscriptable characters |
| 2056 |
T} |
| 2057 |
superscript_characters supcs Zv T{ |
| 2058 |
.na |
| 2059 |
List of superscriptable characters |
| 2060 |
T} |
| 2061 |
these_cause_cr docr Zw T{ |
| 2062 |
.na |
| 2063 |
Printing any of these characters causes CR |
| 2064 |
T} |
| 2065 |
zero_motion zerom Zx T{ |
| 2066 |
.na |
| 2067 |
No motion for subsequent character |
| 2068 |
T} |
| 2069 |
.TE |
| 2070 |
.PP |
| 2071 |
. |
| 2072 |
The following string capabilities are present in the SVr4.0 term structure, |
| 2073 |
but were originally not documented in the man page. |
| 2074 |
. |
| 2075 |
.PP |
| 2076 |
.TS |
| 2077 |
center; |
| 2078 |
Lb Cb S Lb |
| 2079 |
Lb Lb Lb Lb |
| 2080 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 2081 |
\& Code \& |
| 2082 |
String Capability Name TI TC Description |
| 2083 |
_ |
| 2084 |
char_set_names csnm Zy T{ |
| 2085 |
.na |
| 2086 |
Produce #1'th item from list of character set names |
| 2087 |
T} |
| 2088 |
key_mouse kmous Km T{ |
| 2089 |
.na |
| 2090 |
Mouse event has occurred |
| 2091 |
T} |
| 2092 |
mouse_info minfo Mi T{ |
| 2093 |
.na |
| 2094 |
Mouse status information |
| 2095 |
T} |
| 2096 |
req_mouse_pos reqmp RQ T{ |
| 2097 |
.na |
| 2098 |
Request mouse position |
| 2099 |
T} |
| 2100 |
get_mouse getm Gm T{ |
| 2101 |
.na |
| 2102 |
Curses should get button events, parameter #1 not documented. |
| 2103 |
T} |
| 2104 |
set_a_foreground setaf AF T{ |
| 2105 |
.na |
| 2106 |
Set foreground color to #1, using ANSI escape |
| 2107 |
T} |
| 2108 |
set_a_background setab AB T{ |
| 2109 |
.na |
| 2110 |
Set background color to #1, using ANSI escape |
| 2111 |
T} |
| 2112 |
pkey_plab pfxl xl T{ |
| 2113 |
.na |
| 2114 |
Program function key #1 to type string #2 and show string #3 |
| 2115 |
T} |
| 2116 |
device_type devt dv T{ |
| 2117 |
.na |
| 2118 |
Indicate language, codeset support |
| 2119 |
T} |
| 2120 |
code_set_init csin ci T{ |
| 2121 |
.na |
| 2122 |
Init sequence for multiple codesets |
| 2123 |
T} |
| 2124 |
set0_des_seq s0ds s0 T{ |
| 2125 |
.na |
| 2126 |
Shift to codeset 0 (EUC set 0, ASCII) |
| 2127 |
T} |
| 2128 |
set1_des_seq s1ds s1 T{ |
| 2129 |
.na |
| 2130 |
Shift to codeset 1 |
| 2131 |
T} |
| 2132 |
set2_des_seq s2ds s2 T{ |
| 2133 |
.na |
| 2134 |
Shift to codeset 2 |
| 2135 |
T} |
| 2136 |
set3_des_seq s3ds s3 T{ |
| 2137 |
.na |
| 2138 |
Shift to codeset 3 |
| 2139 |
T} |
| 2140 |
set_lr_margin smglr ML T{ |
| 2141 |
.na |
| 2142 |
Set both left and right margins to #1, #2. (ML is not in BSD termcap). |
| 2143 |
T} |
| 2144 |
set_tb_margin smgtb MT T{ |
| 2145 |
.na |
| 2146 |
Sets both top and bottom margins to #1, #2 |
| 2147 |
T} |
| 2148 |
bit_image_repeat birep Xy T{ |
| 2149 |
.na |
| 2150 |
Repeat bit image cell #1 #2 times |
| 2151 |
T} |
| 2152 |
bit_image_newline binel Zz T{ |
| 2153 |
.na |
| 2154 |
Move to next row of the bit image |
| 2155 |
T} |
| 2156 |
bit_image_carriage_return bicr Yv T{ |
| 2157 |
.na |
| 2158 |
Move to beginning of same row |
| 2159 |
T} |
| 2160 |
color_names colornm Yw T{ |
| 2161 |
.na |
| 2162 |
Give name for color #1 |
| 2163 |
T} |
| 2164 |
define_bit_image_region defbi Yx T{ |
| 2165 |
.na |
| 2166 |
Define rectangular bit image region |
| 2167 |
T} |
| 2168 |
end_bit_image_region endbi Yy T{ |
| 2169 |
.na |
| 2170 |
End a bit-image region |
| 2171 |
T} |
| 2172 |
set_color_band setcolor Yz T{ |
| 2173 |
.na |
| 2174 |
Change to ribbon color #1 |
| 2175 |
T} |
| 2176 |
set_page_length slines YZ T{ |
| 2177 |
.na |
| 2178 |
Set page length to #1 lines |
| 2179 |
T} |
| 2180 |
display_pc_char dispc S1 T{ |
| 2181 |
.na |
| 2182 |
Display PC character #1 |
| 2183 |
T} |
| 2184 |
enter_pc_charset_mode smpch S2 T{ |
| 2185 |
.na |
| 2186 |
Enter PC character display mode |
| 2187 |
T} |
| 2188 |
exit_pc_charset_mode rmpch S3 T{ |
| 2189 |
.na |
| 2190 |
Exit PC character display mode |
| 2191 |
T} |
| 2192 |
enter_scancode_mode smsc S4 T{ |
| 2193 |
.na |
| 2194 |
Enter PC scancode mode |
| 2195 |
T} |
| 2196 |
exit_scancode_mode rmsc S5 T{ |
| 2197 |
.na |
| 2198 |
Exit PC scancode mode |
| 2199 |
T} |
| 2200 |
pc_term_options pctrm S6 T{ |
| 2201 |
.na |
| 2202 |
PC terminal options |
| 2203 |
T} |
| 2204 |
scancode_escape scesc S7 T{ |
| 2205 |
.na |
| 2206 |
Escape for scancode emulation |
| 2207 |
T} |
| 2208 |
alt_scancode_esc scesa S8 T{ |
| 2209 |
.na |
| 2210 |
Alternate escape for scancode emulation |
| 2211 |
T} |
| 2212 |
.TE |
| 2213 |
.PP |
| 2214 |
. |
| 2215 |
The XSI Curses standard added these hardcopy capabilities. |
| 2216 |
They were used in some post-4.1 versions of System V curses, |
| 2217 |
e.g., Solaris 2.5 and IRIX 6.x. |
| 2218 |
Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented. |
| 2219 |
According to the XSI Curses standard, they have no termcap names. |
| 2220 |
If your compiled terminfo entries use these, |
| 2221 |
they may not be binary-compatible with System V terminfo |
| 2222 |
entries after SVr4.1; beware! |
| 2223 |
. |
| 2224 |
.PP |
| 2225 |
.TS |
| 2226 |
center; |
| 2227 |
Lb Cb S Lb |
| 2228 |
Lb Lb Lb Lb |
| 2229 |
Lbw(25n)2 Lbw(8n)2 Lb2 Lw(17n)x. |
| 2230 |
\& Code \& |
| 2231 |
String Capability Name TI TC Description |
| 2232 |
_ |
| 2233 |
enter_horizontal_hl_mode ehhlm Xh T{ |
| 2234 |
.na |
| 2235 |
Enter horizontal highlight mode |
| 2236 |
T} |
| 2237 |
enter_left_hl_mode elhlm Xl T{ |
| 2238 |
.na |
| 2239 |
Enter left highlight mode |
| 2240 |
T} |
| 2241 |
enter_low_hl_mode elohlm Xo T{ |
| 2242 |
.na |
| 2243 |
Enter low highlight mode |
| 2244 |
T} |
| 2245 |
enter_right_hl_mode erhlm Xr T{ |
| 2246 |
.na |
| 2247 |
Enter right highlight mode |
| 2248 |
T} |
| 2249 |
enter_top_hl_mode ethlm Xt T{ |
| 2250 |
.na |
| 2251 |
Enter top highlight mode |
| 2252 |
T} |
| 2253 |
enter_vertical_hl_mode evhlm Xv T{ |
| 2254 |
.na |
| 2255 |
Enter vertical highlight mode |
| 2256 |
T} |
| 2257 |
set_a_attributes sgr1 sA T{ |
| 2258 |
.na |
| 2259 |
Define second set of video attributes #1-#6 |
| 2260 |
T} |
| 2261 |
set_pglen_inch slength YI T{ |
| 2262 |
.na |
| 2263 |
Set page length to #1 hundredth of an inch (some implementations use sL for termcap). |
| 2264 |
T} |
| 2265 |
.TE |
| 2266 |
.\"*************************************************************************** |
| 2267 |
.\" Copyright 2018-2024,2025 Thomas E. Dickey * |
| 2268 |
.\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * |
| 2269 |
.\" * |
| 2270 |
.\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 2271 |
.\" copy of this software and associated documentation files (the * |
| 2272 |
.\" "Software"), to deal in the Software without restriction, including * |
| 2273 |
.\" without limitation the rights to use, copy, modify, merge, publish, * |
| 2274 |
.\" distribute, distribute with modifications, sublicense, and/or sell * |
| 2275 |
.\" copies of the Software, and to permit persons to whom the Software is * |
| 2276 |
.\" furnished to do so, subject to the following conditions: * |
| 2277 |
.\" * |
| 2278 |
.\" The above copyright notice and this permission notice shall be included * |
| 2279 |
.\" in all copies or substantial portions of the Software. * |
| 2280 |
.\" * |
| 2281 |
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 2282 |
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 2283 |
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 2284 |
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 2285 |
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 2286 |
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 2287 |
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 2288 |
.\" * |
| 2289 |
.\" Except as contained in this notice, the name(s) of the above copyright * |
| 2290 |
.\" holders shall not be used in advertising or otherwise to promote the * |
| 2291 |
.\" sale, use or other dealings in this Software without prior written * |
| 2292 |
.\" authorization. * |
| 2293 |
.\"*************************************************************************** |
| 2294 |
.\" |
| 2295 |
.\" $Id: terminfo.tail,v 1.163 2025/11/12 01:01:34 Branden.Robinson Exp $ |
| 2296 |
.ps +1 |
| 2297 |
.SS "User-Defined Capabilities" |
| 2298 |
. |
| 2299 |
The preceding section listed the |
| 2300 |
.I standard |
| 2301 |
capabilities. |
| 2302 |
Some are esoteric, |
| 2303 |
supporting functionality that terminal emulators do not implement, |
| 2304 |
or may never have been realized in manufactured hardware. |
| 2305 |
Occasionally, |
| 2306 |
emulators have special features |
| 2307 |
that are awkward or impossible to represent |
| 2308 |
via standard capabilities. |
| 2309 |
.PP |
| 2310 |
.I \%ncurses |
| 2311 |
addresses this limitation by allowing user-defined capabilities. |
| 2312 |
The |
| 2313 |
.B \%tic |
| 2314 |
and |
| 2315 |
.B \%infocmp |
| 2316 |
programs provide an |
| 2317 |
.B \-x |
| 2318 |
option for this purpose. |
| 2319 |
When |
| 2320 |
.B \-x |
| 2321 |
is used, |
| 2322 |
.B \%tic |
| 2323 |
treats unknown capabilities as user-defined. |
| 2324 |
That is, |
| 2325 |
if |
| 2326 |
.B \%tic |
| 2327 |
encounters a capability name |
| 2328 |
that it does not recognize, |
| 2329 |
the program infers the capability's type |
| 2330 |
(Boolean, |
| 2331 |
numeric, |
| 2332 |
or |
| 2333 |
string) |
| 2334 |
from the syntax of the capability value |
| 2335 |
and makes an extended table entry for that capability. |
| 2336 |
\fBuse_extended_names\fP(3NCURSES) makes this information |
| 2337 |
conditionally available to applications. |
| 2338 |
.I \%ncurses |
| 2339 |
library functions supply callers with capability data, |
| 2340 |
the interpretation of which is mostly up to the application. |
| 2341 |
.bP |
| 2342 |
.I \%ncurses |
| 2343 |
treats user-defined string capabilities |
| 2344 |
whose names begin with \*(``k\*('' |
| 2345 |
as function keys. |
| 2346 |
.bP |
| 2347 |
Capability types |
| 2348 |
(Boolean, |
| 2349 |
numeric, |
| 2350 |
or |
| 2351 |
string) |
| 2352 |
determined by |
| 2353 |
.B \%tic |
| 2354 |
can be inferred by successful |
| 2355 |
\fB\%tigetflag\fP(3NCURSES), |
| 2356 |
\fB\%tigetnum\fP(3NCURSES), |
| 2357 |
and |
| 2358 |
\fB\%tigetstr\fP(3NCURSES) |
| 2359 |
calls. |
| 2360 |
.bP |
| 2361 |
If the capability name happens to be two characters, |
| 2362 |
the capability is also available through the termcap interface. |
| 2363 |
.PP |
| 2364 |
While |
| 2365 |
.I termcap |
| 2366 |
is said to be extensible because it mandates no capabilities, |
| 2367 |
in practice it has been limited to those defined by |
| 2368 |
.I \%term\%info |
| 2369 |
implementations. |
| 2370 |
As a rule, |
| 2371 |
employ only user-defined capabilities of Boolean and numeric type |
| 2372 |
with |
| 2373 |
.I termcap |
| 2374 |
applications to avoid overrunning the 1023 byte limit |
| 2375 |
assumed by |
| 2376 |
.I termcap |
| 2377 |
implementations and their applications. |
| 2378 |
Specifically, |
| 2379 |
support for extended sets of function keys |
| 2380 |
(past the 60 numbered keys and the handful of special named keys) |
| 2381 |
is better achieved with longer names available via |
| 2382 |
.IR \%term\%info "." |
| 2383 |
.PP |
| 2384 |
The |
| 2385 |
.I \%ncurses |
| 2386 |
library uses a few of these user-defined capabilities, |
| 2387 |
as described in \fBuser_caps\fR(5). |
| 2388 |
For other user-defined capabilities, |
| 2389 |
including function keys, |
| 2390 |
consult the source form of the terminal database, |
| 2391 |
.IR \%terminfo.src "," |
| 2392 |
under the heading \*(``NCURSES USER-DEFINABLE CAPABILITIES\*(''. |
| 2393 |
. |
| 2394 |
.SS "A Sample Entry" |
| 2395 |
. |
| 2396 |
The following entry, describing an ANSI\ X3.64- |
| 2397 |
(or ECMA-48-) |
| 2398 |
-standard terminal |
| 2399 |
(henceforth \*(``ANSI-standard\*('' for brevity), |
| 2400 |
is representative |
| 2401 |
of what a |
| 2402 |
.I \%term\%info |
| 2403 |
entry for a modern terminal typically looks like. |
| 2404 |
.PP |
| 2405 |
.EX |
| 2406 |
.nf |
| 2407 |
\s-2ansi|ansi/pc\-term compatible with color, |
| 2408 |
am, mc5i, mir, msgr, |
| 2409 |
colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64, |
| 2410 |
acsc=+\e020\e,\e021\-\e030.\*^Y0\e333\(ga\e004a\e261f\e370g\e361h\e260 |
| 2411 |
j\e331k\e277l\e332m\e300n\e305o\*~p\e304q\e304r\e304s_t\e303 |
| 2412 |
u\e264v\e301w\e302x\e263y\e363z\e362{\e343|\e330}\e234\*~\e376, |
| 2413 |
bel=\*^G, blink=\eE[5m, bold=\eE[1m, cbt=\eE[Z, clear=\eE[H\eE[J, |
| 2414 |
cr=\*^M, cub=\eE[%p1%dD, cub1=\eE[D, cud=\eE[%p1%dB, cud1=\eE[B, |
| 2415 |
cuf=\eE[%p1%dC, cuf1=\eE[C, cup=\eE[%i%p1%d;%p2%dH, |
| 2416 |
cuu=\eE[%p1%dA, cuu1=\eE[A, dch=\eE[%p1%dP, dch1=\eE[P, |
| 2417 |
dl=\eE[%p1%dM, dl1=\eE[M, ech=\eE[%p1%dX, ed=\eE[J, el=\eE[K, |
| 2418 |
el1=\eE[1K, home=\eE[H, hpa=\eE[%i%p1%dG, ht=\eE[I, hts=\eEH, |
| 2419 |
ich=\eE[%p1%d@, il=\eE[%p1%dL, il1=\eE[L, ind=\*^J, |
| 2420 |
indn=\eE[%p1%dS, invis=\eE[8m, kbs=\*^H, kcbt=\eE[Z, kcub1=\eE[D, |
| 2421 |
kcud1=\eE[B, kcuf1=\eE[C, kcuu1=\eE[A, khome=\eE[H, kich1=\eE[L, |
| 2422 |
mc4=\eE[4i, mc5=\eE[5i, nel=\er\eE[S, op=\eE[39;49m, |
| 2423 |
rep=%p1%c\eE[%p2%{1}%\-%db, rev=\eE[7m, rin=\eE[%p1%dT, |
| 2424 |
rmacs=\eE[10m, rmpch=\eE[10m, rmso=\eE[m, rmul=\eE[m, |
| 2425 |
s0ds=\eE(B, s1ds=\eE)B, s2ds=\eE*B, s3ds=\eE+B, |
| 2426 |
setab=\eE[4%p1%dm, setaf=\eE[3%p1%dm, |
| 2427 |
sgr=\eE[0;10%?%p1%t;7%; |
| 2428 |
%?%p2%t;4%; |
| 2429 |
%?%p3%t;7%; |
| 2430 |
%?%p4%t;5%; |
| 2431 |
%?%p6%t;1%; |
| 2432 |
%?%p7%t;8%; |
| 2433 |
%?%p9%t;11%;m, |
| 2434 |
sgr0=\eE[0;10m, smacs=\eE[11m, smpch=\eE[11m, smso=\eE[7m, |
| 2435 |
smul=\eE[4m, tbc=\eE[3g, u6=\eE[%i%d;%dR, u7=\eE[6n, |
| 2436 |
u8=\eE[?%[;0123456789]c, u9=\eE[c, vpa=\eE[%i%p1%dd, |
| 2437 |
.fi |
| 2438 |
.EE |
| 2439 |
.PP |
| 2440 |
Entries may continue onto multiple lines by placing white space at |
| 2441 |
the beginning of each line except the first. |
| 2442 |
Comments may be included on lines beginning with \*(``#\*(''. |
| 2443 |
Capabilities in |
| 2444 |
.I terminfo |
| 2445 |
are of three types: |
| 2446 |
.bP |
| 2447 |
Boolean capabilities which indicate that the terminal has |
| 2448 |
some particular feature, |
| 2449 |
.bP |
| 2450 |
numeric capabilities giving the size of the terminal |
| 2451 |
or the size of particular delays, and |
| 2452 |
.bP |
| 2453 |
string |
| 2454 |
capabilities, which give a sequence which can be used to perform particular |
| 2455 |
terminal operations. |
| 2456 |
.SS "Types of Capabilities" |
| 2457 |
All capabilities have names. |
| 2458 |
For instance, the fact that |
| 2459 |
ANSI-standard terminals have |
| 2460 |
.I "automatic margins" |
| 2461 |
(i.e., an automatic return and line-feed |
| 2462 |
when the end of a line is reached) is indicated by the capability \fBam\fP. |
| 2463 |
Hence the description of ansi includes \fBam\fP. |
| 2464 |
Numeric capabilities are followed by the character \*(``#\*('' |
| 2465 |
and then a positive value. |
| 2466 |
Thus \fBcols\fP, which indicates the number of columns the terminal has, |
| 2467 |
gives the value \*(``80\*('' for ansi. |
| 2468 |
Values for numeric capabilities may be specified in |
| 2469 |
decimal, |
| 2470 |
octal, or |
| 2471 |
hexadecimal, |
| 2472 |
using the C programming language conventions |
| 2473 |
(e.g., 255, 0377 and 0xff or 0xFF). |
| 2474 |
.PP |
| 2475 |
Finally, string valued capabilities, |
| 2476 |
such as \fBel\fP (clear to end of line sequence) |
| 2477 |
are given by the two-character code, |
| 2478 |
an \*(``=\*('', and then |
| 2479 |
a string ending at the next following \*(``,\*(''. |
| 2480 |
.PP |
| 2481 |
A number of escape sequences are provided in the string valued capabilities |
| 2482 |
for easy encoding of characters there: |
| 2483 |
.bP |
| 2484 |
Both \fB\eE\fP and \fB\ee\fP |
| 2485 |
map to an \s-1ESCAPE\s0 character, |
| 2486 |
.bP |
| 2487 |
\fB\*^\f(BIx\fR maps to a control-\fIx\fP for any appropriate \fIx\fP, |
| 2488 |
and |
| 2489 |
.bP |
| 2490 |
the sequences |
| 2491 |
.RS 6 |
| 2492 |
.PP |
| 2493 |
\fB\en\fP, \fB\el\fP, \fB\er\fP, \fB\et\fP, \fB\eb\fP, \fB\ef\fP, and \fB\es\fP |
| 2494 |
.RE |
| 2495 |
.IP |
| 2496 |
produce |
| 2497 |
.RS 6 |
| 2498 |
.PP |
| 2499 |
\fInewline\fP, \fIline-feed\fP, \fIreturn\fP, \fItab\fP, \fIbackspace\fP, \fIform-feed\fP, and \fIspace\fP, |
| 2500 |
.RE |
| 2501 |
.IP |
| 2502 |
respectively. |
| 2503 |
.PP |
| 2504 |
X/Open Curses does not say what \*(``appropriate \fIx\fP\*('' might be. |
| 2505 |
In practice, that is a printable ASCII graphic character. |
| 2506 |
The special case \*(``\*^?\*('' is interpreted as DEL (127). |
| 2507 |
In all other cases, |
| 2508 |
the character value is logically \*(``and\*(''-ed with 0x1f, |
| 2509 |
mapping to ASCII control codes in the range 0 through 31. |
| 2510 |
.PP |
| 2511 |
Other escapes include |
| 2512 |
.bP |
| 2513 |
\fB\e\*^\fP for \fB\*^\fP, |
| 2514 |
.bP |
| 2515 |
\fB\e\e\fP for \fB\e\fP, |
| 2516 |
.bP |
| 2517 |
\fB\e\fP, for comma, |
| 2518 |
.bP |
| 2519 |
\fB\e:\fP for \fB:\fP, |
| 2520 |
.bP |
| 2521 |
and \fB\e0\fP for null. |
| 2522 |
.IP |
| 2523 |
\fB\e0\fP will produce \e200, which does not terminate a string but behaves |
| 2524 |
as a null character on most terminals, providing CS7 is specified. |
| 2525 |
See \fBstty\fP(1). |
| 2526 |
.IP |
| 2527 |
The reason for this quirk is to maintain binary compatibility of the |
| 2528 |
compiled terminfo files with other implementations, |
| 2529 |
e.g., the SVr4 systems, which document this. |
| 2530 |
Compiled terminfo files use null-terminated strings, with no lengths. |
| 2531 |
Modifying this would require a new binary format, |
| 2532 |
which would not work with other implementations. |
| 2533 |
.PP |
| 2534 |
Finally, characters may be given as three octal digits after a \fB\e\fP. |
| 2535 |
.PP |
| 2536 |
A delay in milliseconds may appear anywhere in a string capability, enclosed in |
| 2537 |
$<..> brackets, as in \fBel\fP=\eEK$<5>, |
| 2538 |
and padding characters are supplied by \fBtputs\fP(3NCURSES) |
| 2539 |
to provide this delay. |
| 2540 |
.bP |
| 2541 |
The delay must be a number with at most one decimal |
| 2542 |
place of precision; |
| 2543 |
it may be followed by suffixes \*(``*\*('' or \*(``/\*('' or both. |
| 2544 |
.bP |
| 2545 |
A \*(``*\*('' |
| 2546 |
indicates that the padding required is proportional to the number of lines |
| 2547 |
affected by the operation, and the amount given is the per-affected-unit |
| 2548 |
padding required. |
| 2549 |
(In the case of insert character, the factor is still the |
| 2550 |
number of \fIlines\fP affected.) |
| 2551 |
.IP |
| 2552 |
Normally, padding is advisory if the device has the \fBxon\fP |
| 2553 |
capability; it is used for cost computation but does not trigger delays. |
| 2554 |
.bP |
| 2555 |
A \*(``/\*('' |
| 2556 |
suffix indicates that the padding is mandatory and forces a delay of the given |
| 2557 |
number of milliseconds even on devices for which \fBxon\fP is present to |
| 2558 |
indicate flow control. |
| 2559 |
.PP |
| 2560 |
Sometimes individual capabilities must be commented out. |
| 2561 |
To do this, put a period before the capability name. |
| 2562 |
For example, see the second |
| 2563 |
.B ind |
| 2564 |
in the example above. |
| 2565 |
.br |
| 2566 |
.ne 5 |
| 2567 |
.SS "Fetching Compiled Descriptions" |
| 2568 |
Terminal descriptions in \fI\%ncurses\fP are stored in terminal |
| 2569 |
databases. |
| 2570 |
These databases, which are found by their pathname, |
| 2571 |
may be configured either as directory trees or hashed databases |
| 2572 |
(see \fBterm\fR(5)), |
| 2573 |
.PP |
| 2574 |
The library uses a compiled-in list of pathnames, |
| 2575 |
which can be overridden by environment variables. |
| 2576 |
Before starting to search, |
| 2577 |
\fI\%ncurses\fP checks the search list, |
| 2578 |
eliminating duplicates and pathnames where no terminal database is found. |
| 2579 |
The \fI\%ncurses\fP library reads the first description |
| 2580 |
which passes its consistency checks. |
| 2581 |
.bP |
| 2582 |
The environment variable \fBTERMINFO\fR is checked first, for |
| 2583 |
a terminal database containing the terminal description. |
| 2584 |
.bP |
| 2585 |
Next, |
| 2586 |
\fI\%ncurses\fP looks in \fI$HOME/.terminfo\fP |
| 2587 |
for a compiled description. |
| 2588 |
.IP |
| 2589 |
This is an optional feature which may be omitted entirely from |
| 2590 |
the library, or limited to prevent accidental use by privileged applications. |
| 2591 |
.bP |
| 2592 |
Next, |
| 2593 |
if the environment variable \fI\%TERMINFO_DIRS\fP is set, |
| 2594 |
\fI\%ncurses\fP interprets the contents of that variable |
| 2595 |
as a list of colon-separated pathnames of terminal databases to be searched. |
| 2596 |
.IP |
| 2597 |
An empty pathname (i.e., if the variable begins or ends |
| 2598 |
with a colon, or contains adjacent colons) |
| 2599 |
is interpreted as the system location \fI/etc/terminfo\fP. |
| 2600 |
.bP |
| 2601 |
Finally, \fI\%ncurses\fP searches these compiled-in locations: |
| 2602 |
.RS |
| 2603 |
.bP |
| 2604 |
a list of directories (/etc/terminfo:/lib/terminfo:/usr/share/terminfo), and |
| 2605 |
.bP |
| 2606 |
the system terminfo directory, \fI/etc/terminfo\fP |
| 2607 |
.RE |
| 2608 |
.PP |
| 2609 |
The \fBTERMINFO\fP variable can contain a terminal description instead |
| 2610 |
of the pathname of a terminal database. |
| 2611 |
If this variable begins with \*(``hex:\*('' or \*(``b64:\*('' |
| 2612 |
then \fI\%ncurses\fP reads a terminal description from |
| 2613 |
hexadecimal- or base64-encoded data, |
| 2614 |
and if that description matches the name sought, will use that. |
| 2615 |
This encoded data can be set using the \*(``\-Q\*('' option of |
| 2616 |
\fBtic\fR or \fBinfocmp\fR. |
| 2617 |
.PP |
| 2618 |
The preceding addresses the usual configuration of \fI\%ncurses\fP, |
| 2619 |
which uses terminal descriptions prepared in \fIterminfo\fP format. |
| 2620 |
While \fItermcap\fP is less expressive, |
| 2621 |
\fI\%ncurses\fP can also be configured to read \fItermcap\fP |
| 2622 |
descriptions. |
| 2623 |
In that configuration, |
| 2624 |
it checks the \fI\%TERMCAP\fP and \fI\%TERMPATH\fP variables |
| 2625 |
(for content and search path, |
| 2626 |
respectively) |
| 2627 |
after the system terminal database. |
| 2628 |
.SS "Preparing Descriptions" |
| 2629 |
We now outline how to prepare descriptions of terminals. |
| 2630 |
The most effective way to prepare a terminal description is by imitating |
| 2631 |
the description of a similar terminal in |
| 2632 |
.I terminfo |
| 2633 |
and to build up a description gradually, using partial descriptions |
| 2634 |
with |
| 2635 |
.I vi |
| 2636 |
or some other screen-oriented program to check that they are correct. |
| 2637 |
Be aware that a very unusual terminal may expose deficiencies in |
| 2638 |
the ability of the |
| 2639 |
.I terminfo |
| 2640 |
file to describe it |
| 2641 |
or bugs in the screen-handling code of the test program. |
| 2642 |
.PP |
| 2643 |
To get the padding for insert line right (if the terminal manufacturer |
| 2644 |
did not document it) a severe test is to edit a large file at 9600 baud, |
| 2645 |
delete 16 or so lines from the middle of the screen, then hit the \*(``u\*('' |
| 2646 |
key several times quickly. |
| 2647 |
If the terminal messes up, more padding is usually needed. |
| 2648 |
A similar test can be used for insert character. |
| 2649 |
.SS "Basic Capabilities" |
| 2650 |
The number of columns on each line for the terminal is given by the |
| 2651 |
\fBcols\fP numeric capability. |
| 2652 |
If the terminal is a \s-1CRT\s0, then the |
| 2653 |
number of lines on the screen is given by the \fBlines\fP capability. |
| 2654 |
If the terminal wraps around to the beginning of the next line when |
| 2655 |
it reaches the right margin, then it should have the \fBam\fP capability. |
| 2656 |
If the terminal can clear its screen, leaving the cursor in the home |
| 2657 |
position, then this is given by the \fBclear\fP string capability. |
| 2658 |
If the terminal overstrikes |
| 2659 |
(rather than clearing a position when a character is struck over) |
| 2660 |
then it should have the \fBos\fP capability. |
| 2661 |
If the terminal is a printing terminal, with no soft copy unit, |
| 2662 |
give it both |
| 2663 |
.B hc |
| 2664 |
and |
| 2665 |
.BR os . |
| 2666 |
.RB ( os |
| 2667 |
applies to storage scope terminals, such as \s-1TEKTRONIX\s+1 4010 |
| 2668 |
series, as well as hard copy and APL terminals.) |
| 2669 |
If there is a code to move the cursor to the left edge of the current |
| 2670 |
line, give this as |
| 2671 |
.BR cr . |
| 2672 |
(Normally this will be carriage return, control/M.) |
| 2673 |
If there is a code to produce an audible signal (bell, beep, etc) |
| 2674 |
give this as |
| 2675 |
.BR bel . |
| 2676 |
.PP |
| 2677 |
If there is a code to move the cursor one position to the left |
| 2678 |
(such as backspace) that capability should be given as |
| 2679 |
.BR cub1 . |
| 2680 |
Similarly, codes to move to the right, up, and down should be |
| 2681 |
given as |
| 2682 |
.BR cuf1 , |
| 2683 |
.BR cuu1 , |
| 2684 |
and |
| 2685 |
.BR cud1 . |
| 2686 |
These local cursor motions should not alter the text they pass over, |
| 2687 |
for example, you would not normally use \*(``\fBcuf1\fP=\ \*('' because the |
| 2688 |
space would erase the character moved over. |
| 2689 |
.PP |
| 2690 |
A very important point here is that the local cursor motions encoded |
| 2691 |
in |
| 2692 |
.I terminfo |
| 2693 |
are undefined at the left and top edges of a \s-1CRT\s0 terminal. |
| 2694 |
Programs should never attempt to backspace around the left edge, |
| 2695 |
unless |
| 2696 |
.B bw |
| 2697 |
is given, |
| 2698 |
and never attempt to go up locally off the top. |
| 2699 |
In order to scroll text up, a program will go to the bottom left corner |
| 2700 |
of the screen and send the |
| 2701 |
.B ind |
| 2702 |
(index) string. |
| 2703 |
.PP |
| 2704 |
To scroll text down, a program goes to the top left corner |
| 2705 |
of the screen and sends the |
| 2706 |
.B ri |
| 2707 |
(reverse index) string. |
| 2708 |
The strings |
| 2709 |
.B ind |
| 2710 |
and |
| 2711 |
.B ri |
| 2712 |
are undefined when not on their respective corners of the screen. |
| 2713 |
.PP |
| 2714 |
Parameterized versions of the scrolling sequences are |
| 2715 |
.B indn |
| 2716 |
and |
| 2717 |
.B rin |
| 2718 |
which have the same semantics as |
| 2719 |
.B ind |
| 2720 |
and |
| 2721 |
.B ri |
| 2722 |
except that they take one parameter, and scroll that many lines. |
| 2723 |
They are also undefined except at the appropriate edge of the screen. |
| 2724 |
.PP |
| 2725 |
The \fBam\fP capability tells whether the cursor sticks at the right |
| 2726 |
edge of the screen when text is output, but this does not necessarily |
| 2727 |
apply to a |
| 2728 |
.B cuf1 |
| 2729 |
from the last column. |
| 2730 |
The only local motion which is defined from the left edge is if |
| 2731 |
.B bw |
| 2732 |
is given, then a |
| 2733 |
.B cub1 |
| 2734 |
from the left edge will move to the right edge of the previous line. |
| 2735 |
If |
| 2736 |
.B bw |
| 2737 |
is not given, the effect is undefined. |
| 2738 |
This is useful for drawing a box around the edge of the screen, for example. |
| 2739 |
If the terminal has switch selectable automatic margins, |
| 2740 |
the |
| 2741 |
.I terminfo |
| 2742 |
file usually assumes that this is on; i.e., \fBam\fP. |
| 2743 |
If the terminal has a command which moves to the first column of the next |
| 2744 |
line, that command can be given as |
| 2745 |
.B nel |
| 2746 |
(newline). |
| 2747 |
It does not matter if the command clears the remainder of the current line, |
| 2748 |
so if the terminal has no |
| 2749 |
.B cr |
| 2750 |
and |
| 2751 |
.B lf |
| 2752 |
it may still be possible to craft a working |
| 2753 |
.B nel |
| 2754 |
out of one or both of them. |
| 2755 |
.PP |
| 2756 |
These capabilities suffice to describe |
| 2757 |
hard-copy and \*(``glass-tty\*('' terminals. |
| 2758 |
Thus the model 33 teletype is described as |
| 2759 |
.PP |
| 2760 |
.EX |
| 2761 |
.\".in -2 |
| 2762 |
\s-133\||\|tty33\||\|tty\||\|model 33 teletype, |
| 2763 |
bel=\*^G, cols#72, cr=\*^M, cud1=\*^J, hc, ind=\*^J, os,\s+1 |
| 2764 |
.\".in +2 |
| 2765 |
.EE |
| 2766 |
.PP |
| 2767 |
while the Lear Siegler \s-1ADM-3\s0 is described as |
| 2768 |
.PP |
| 2769 |
.EX |
| 2770 |
.nf |
| 2771 |
.\".in -2 |
| 2772 |
\s-1adm3\||\|3\||\|lsi adm3, |
| 2773 |
am, bel=\*^G, clear=\*^Z, cols#80, cr=\*^M, cub1=\*^H, cud1=\*^J, |
| 2774 |
ind=\*^J, lines#24,\s+1 |
| 2775 |
.\".in +2 |
| 2776 |
.fi |
| 2777 |
.EE |
| 2778 |
.SS "Parameterized Strings" |
| 2779 |
Cursor addressing and other strings requiring parameters |
| 2780 |
in the terminal are described by a |
| 2781 |
parameterized string capability, |
| 2782 |
with \fIprintf\fP-like escapes such as \fI%x\fP in it. |
| 2783 |
For example, to address the cursor, the |
| 2784 |
.B cup |
| 2785 |
capability is given, using two parameters: |
| 2786 |
the line and column to address to. |
| 2787 |
(Lines and columns are numbered from zero and refer to the |
| 2788 |
physical screen visible to the user, not to any unseen memory.) |
| 2789 |
If the terminal has memory relative cursor addressing, |
| 2790 |
that can be indicated by |
| 2791 |
.BR mrcup . |
| 2792 |
.PP |
| 2793 |
The parameter mechanism uses a stack and special \fB%\fP codes |
| 2794 |
to manipulate it. |
| 2795 |
Typically a sequence will push one of the |
| 2796 |
parameters onto the stack and then print it in some format. |
| 2797 |
Print (e.g., \*(``%d\*('') is a special case. |
| 2798 |
Other operations, including \*(``%t\*('' pop their operand from the stack. |
| 2799 |
It is noted that more complex operations are often necessary, |
| 2800 |
e.g., in the \fBsgr\fP string. |
| 2801 |
.PP |
| 2802 |
The \fB%\fP encodings have the following meanings: |
| 2803 |
.TP 5 |
| 2804 |
\fB%%\fP |
| 2805 |
outputs \*(``%\*('' |
| 2806 |
.TP |
| 2807 |
\fB%\fI[[\fR:\fI]flags][width[.precision]][\fBdoxXs\fI]\fR |
| 2808 |
as in \fBprintf\fP(3), flags are \fI[\-+#]\fP and \fIspace\fP. |
| 2809 |
Use a \*(``:\*('' to allow the next character to be a \*(``\-\*('' flag, |
| 2810 |
avoiding interpreting \*(``%\-\*('' as an operator. |
| 2811 |
.TP |
| 2812 |
\fB%c\fP |
| 2813 |
print \fIpop()\fP like %c in \fBprintf\fP |
| 2814 |
.TP |
| 2815 |
\fB%s\fP |
| 2816 |
print \fIpop()\fP like %s in \fBprintf\fP |
| 2817 |
.TP |
| 2818 |
\fB%p\fI[1\-9]\fR |
| 2819 |
push \fIi\fP'th parameter |
| 2820 |
.TP |
| 2821 |
\fB%P\fI[a\-z]\fR |
| 2822 |
set dynamic variable \fI[a\-z]\fP to \fIpop()\fP |
| 2823 |
.TP |
| 2824 |
\fB%g\fI[a\-z]\fR |
| 2825 |
get dynamic variable \fI[a\-z]\fP and push it |
| 2826 |
.TP |
| 2827 |
\fB%P\fI[A\-Z]\fR |
| 2828 |
set static variable \fI[a\-z]\fP to \fIpop()\fP |
| 2829 |
.TP |
| 2830 |
\fB%g\fI[A\-Z]\fR |
| 2831 |
get static variable \fI[a\-z]\fP and push it |
| 2832 |
.IP |
| 2833 |
The terms \*(``static\*('' and \*(``dynamic\*('' are misleading. |
| 2834 |
Historically, these are simply two different sets of variables, |
| 2835 |
whose values are not reset between calls to \fBtparm\fP(3NCURSES). |
| 2836 |
However, that fact is not documented in other implementations. |
| 2837 |
Relying on it will adversely impact portability to other implementations: |
| 2838 |
.RS |
| 2839 |
.bP |
| 2840 |
SVr2 curses supported \fIdynamic\fP variables. |
| 2841 |
Those are set only by a \fB%P\fP operator. |
| 2842 |
A \fB%g\fP for a given variable without first setting it with \fB%P\fP |
| 2843 |
will give unpredictable results, because dynamic variables are |
| 2844 |
an uninitialized local array on the stack in the \fBtparm\fP function. |
| 2845 |
.bP |
| 2846 |
SVr3.2 curses supported \fIstatic\fP variables. |
| 2847 |
Those are an array in the \fI\%TERMINAL\fP |
| 2848 |
structure (declared in \fBterm.h\fP), |
| 2849 |
and are zeroed automatically when the \fBsetupterm\fP function |
| 2850 |
allocates the data. |
| 2851 |
.bP |
| 2852 |
SVr4 curses made no further improvements |
| 2853 |
to the \fIdynamic/static\fP variable feature. |
| 2854 |
.bP |
| 2855 |
Solaris XPG4 curses does not distinguish between \fIdynamic\fP and |
| 2856 |
\fIstatic\fP variables. |
| 2857 |
They are the same. |
| 2858 |
Like SVr4 curses, XPG4 curses does not initialize these explicitly. |
| 2859 |
.bP |
| 2860 |
Before version 6.3, |
| 2861 |
\fI\%ncurses\fP stores both \fIdynamic\fP and \fIstatic\fP |
| 2862 |
variables in persistent storage, initialized to zeros. |
| 2863 |
.bP |
| 2864 |
Beginning with version 6.3, |
| 2865 |
\fI\%ncurses\fP stores \fIstatic\fP and \fIdynamic\fP |
| 2866 |
variables in the same manner as SVr4. |
| 2867 |
.RS |
| 2868 |
.bP |
| 2869 |
Unlike other implementations, \fI\%ncurses\fP zeros dynamic variables |
| 2870 |
before the first \fB%g\fP or \fB%P\fP operator. |
| 2871 |
.bP |
| 2872 |
Like SVr2, |
| 2873 |
the scope of dynamic variables in \fI\%ncurses\fP |
| 2874 |
is within the current call to |
| 2875 |
\fBtparm\fP. |
| 2876 |
Use static variables if persistent storage is needed. |
| 2877 |
.RE |
| 2878 |
.RE |
| 2879 |
.TP |
| 2880 |
\fB%\*'\fIc\fB\*'\fR |
| 2881 |
char constant \fIc\fP |
| 2882 |
.TP |
| 2883 |
\fB%{\fInn\fB}\fR |
| 2884 |
integer constant \fInn\fP |
| 2885 |
.TP |
| 2886 |
\fB%l\fP |
| 2887 |
push strlen(pop) |
| 2888 |
.TP |
| 2889 |
\fB%+\fP, \fB%\-\fP, \fB%*\fP, \fB%/\fP, \fB%m\fP |
| 2890 |
arithmetic (%m is \fImod\fP): \fIpush(pop() op pop())\fP |
| 2891 |
.TP |
| 2892 |
\fB%&\fP, \fB%|\fP, \fB%\*^\fP |
| 2893 |
bit operations |
| 2894 |
(\*(``and\*('', \*(``or\*('' and exclusive \*(``or\*(''): |
| 2895 |
\fIpush(pop() op pop())\fP |
| 2896 |
.TP |
| 2897 |
\fB%=\fP, \fB%>\fP, \fB%<\fP |
| 2898 |
logical operations: \fIpush(pop() op pop())\fP |
| 2899 |
.TP |
| 2900 |
\fB%A\fP, \fB%O\fP |
| 2901 |
logical \*(``and\*('' and \*(``or\*('' operations (for conditionals) |
| 2902 |
.TP |
| 2903 |
\fB%!\fP, \fB%\*~\fP |
| 2904 |
unary operations (logical and bit complement): \fIpush(op pop())\fP |
| 2905 |
.TP |
| 2906 |
\fB%i\fP |
| 2907 |
add 1 to first two parameters (for ANSI terminals) |
| 2908 |
.TP |
| 2909 |
\fB%?\fP \fIexpr\fP \fB%t\fP \fIthenpart\fP \fB%e\fP \fIelsepart\fP \fB%;\fP |
| 2910 |
This forms an if-then-else. |
| 2911 |
The \fB%e\fP \fIelsepart\fP is optional. |
| 2912 |
Usually the \fB%?\fP \fIexpr\fP part pushes a value onto the stack, |
| 2913 |
and \fB%t\fP pops it from the stack, testing if it is nonzero (true). |
| 2914 |
If it is zero (false), control passes to the \fB%e\fP (else) part. |
| 2915 |
.IP |
| 2916 |
It is possible to form else-if's a la Algol 68: |
| 2917 |
.RS |
| 2918 |
\fB%?\fP c\d1\u \fB%t\fP b\d1\u \fB%e\fP c\d2\u \fB%t\fP b\d2\u \fB%e\fP c\d3\u \fB%t\fP b\d3\u \fB%e\fP c\d4\u \fB%t\fP b\d4\u \fB%e\fP \fB%;\fP |
| 2919 |
.RE |
| 2920 |
.IP |
| 2921 |
where c\di\u are conditions, b\di\u are bodies. |
| 2922 |
.IP |
| 2923 |
Use the \fB\-f\fP option of \fBtic\fP or \fBinfocmp\fP to see |
| 2924 |
the structure of if-then-else's. |
| 2925 |
Some strings, e.g., \fBsgr\fP can be very complicated when written |
| 2926 |
on one line. |
| 2927 |
The \fB\-f\fP option splits the string into lines with the parts indented. |
| 2928 |
.PP |
| 2929 |
Binary operations are in postfix form with the operands in the usual order. |
| 2930 |
That is, to get x\-5 one would use \*(``%gx%{5}%\-\*(''. |
| 2931 |
\fB%P\fP and \fB%g\fP variables are |
| 2932 |
persistent across escape-string evaluations. |
| 2933 |
.PP |
| 2934 |
Consider the HP2645, which, to get to line 3 and column 12, needs |
| 2935 |
to be sent \eE&a12c03Y padded for 6 milliseconds. |
| 2936 |
The order of the lines and columns is inverted here, |
| 2937 |
and the lines and column are printed as two digits. |
| 2938 |
The corresponding terminal description is expressed thus: |
| 2939 |
.RS |
| 2940 |
cup=\eE&a%p2%dc%p1%dY$<6>, |
| 2941 |
.RE |
| 2942 |
.PP |
| 2943 |
The Microterm \s-1ACT-IV\s0 needs the current line and column sent |
| 2944 |
preceded by a \fB\*^T\fP, with the line and column simply encoded in binary, |
| 2945 |
.RS |
| 2946 |
cup=\*^T%p1%c%p2%c |
| 2947 |
.RE |
| 2948 |
.PP |
| 2949 |
Terminals which use \*(``%c\*('' need to be able to |
| 2950 |
backspace the cursor (\fBcub1\fP), |
| 2951 |
and to move the cursor up one line on the screen (\fBcuu1\fP). |
| 2952 |
This is necessary because it is not always safe to transmit \fB\en\fP |
| 2953 |
\fB\*^D\fP and \fB\er\fP, as the system may change or discard them. |
| 2954 |
(The library routines dealing with terminfo set tty modes so that |
| 2955 |
tabs are never expanded, so \et is safe to send. |
| 2956 |
This turns out to be essential for the Ann Arbor 4080.) |
| 2957 |
.PP |
| 2958 |
A final example is the LSI ADM-3A, |
| 2959 |
which uses line and column offset by a space, |
| 2960 |
thus |
| 2961 |
.RS |
| 2962 |
.EX |
| 2963 |
cup=\eE=%p1%\*' \*'%+%c%p2%\*' \*'%+%c |
| 2964 |
.EE |
| 2965 |
.RE |
| 2966 |
.PP |
| 2967 |
After sending \*(``\eE=\*('', this pushes the first parameter, pushes the |
| 2968 |
ASCII value for a space (32), adds them (pushing the sum on the stack |
| 2969 |
in place of the two previous values) and outputs that value as a character. |
| 2970 |
Then the same is done for the second parameter. |
| 2971 |
More complex arithmetic is possible using the stack. |
| 2972 |
.SS "Cursor Motions" |
| 2973 |
If the terminal has a fast way to home the cursor |
| 2974 |
(to very upper left corner of screen) then this can be given as |
| 2975 |
\fBhome\fP; similarly a fast way of getting to the lower left-hand corner |
| 2976 |
can be given as \fBll\fP; this may involve going up with \fBcuu1\fP |
| 2977 |
from the home position, |
| 2978 |
but a program should never do this itself (unless \fBll\fP does) because it |
| 2979 |
can make no assumption about the effect of moving up from the home position. |
| 2980 |
Note that the home position is the same as addressing to (0,0): |
| 2981 |
to the top left corner of the screen, not of memory. |
| 2982 |
(Thus, the \eEH sequence on HP terminals cannot be used for |
| 2983 |
.BR home .) |
| 2984 |
.PP |
| 2985 |
If the terminal has line or column absolute cursor addressing, |
| 2986 |
these can be given as single parameter capabilities |
| 2987 |
.B hpa |
| 2988 |
(horizontal position absolute) |
| 2989 |
and |
| 2990 |
.B vpa |
| 2991 |
(vertical position absolute). |
| 2992 |
Sometimes these are shorter than the more general two parameter |
| 2993 |
sequence (as with the hp2645) and can be used in preference to |
| 2994 |
.BR cup . |
| 2995 |
If there are parameterized local motions (e.g., move |
| 2996 |
.I n |
| 2997 |
spaces to the right) these can be given as |
| 2998 |
.BR cud , |
| 2999 |
.BR cub , |
| 3000 |
.BR cuf , |
| 3001 |
and |
| 3002 |
.B cuu |
| 3003 |
with a single parameter indicating how many spaces to move. |
| 3004 |
These are primarily useful if the terminal does not have |
| 3005 |
.BR cup , |
| 3006 |
such as the \s-1TEKTRONIX\s+1 4025. |
| 3007 |
.PP |
| 3008 |
If the terminal needs to be in a special mode when running |
| 3009 |
a program that uses these capabilities, |
| 3010 |
the codes to enter and exit this mode can be given |
| 3011 |
as \fBsmcup\fP and \fBrmcup\fP. |
| 3012 |
This arises, for example, from terminals like the Concept with more than |
| 3013 |
one page of memory. |
| 3014 |
If the terminal has only memory relative cursor addressing and not screen |
| 3015 |
relative cursor addressing, a one screen-sized window must be fixed into |
| 3016 |
the terminal for cursor addressing to work properly. |
| 3017 |
This is also used for the \s-1TEKTRONIX\s+1 4025, |
| 3018 |
where |
| 3019 |
.B smcup |
| 3020 |
sets the command character to be the one used by terminfo. |
| 3021 |
If the \fBsmcup\fP sequence will not restore the screen after an |
| 3022 |
\fBrmcup\fP sequence is output (to the state prior to outputting |
| 3023 |
\fBrmcup\fP), specify \fBnrrmc\fP. |
| 3024 |
.SS Margins |
| 3025 |
SVr4 (and X/Open Curses) |
| 3026 |
list several string capabilities for setting margins. |
| 3027 |
Two were intended for use with terminals, |
| 3028 |
and another six were intended for use with printers. |
| 3029 |
.bP |
| 3030 |
The two terminal capabilities assume that the terminal may have |
| 3031 |
the capability of setting the left and/or right margin at the current |
| 3032 |
cursor column position. |
| 3033 |
.bP |
| 3034 |
The printer capabilities assume that the printer may have |
| 3035 |
two types of capability: |
| 3036 |
.RS |
| 3037 |
.bP |
| 3038 |
the ability to set a top and/or bottom margin using the current |
| 3039 |
line position, and |
| 3040 |
.bP |
| 3041 |
parameterized capabilities for setting the top, bottom, left, right margins |
| 3042 |
given the number of lines or columns. |
| 3043 |
.RE |
| 3044 |
.PP |
| 3045 |
In practice, the categorization into \*(``terminal\*('' and \*(``printer\*('' |
| 3046 |
is not suitable: |
| 3047 |
.bP |
| 3048 |
The AT&T SVr4 terminal database uses \fBsmgl\fP four times, |
| 3049 |
for AT&T hardware. |
| 3050 |
.IP |
| 3051 |
Three of the four are printers. |
| 3052 |
They lack the ability to set left/right margins by specifying the column. |
| 3053 |
.bP |
| 3054 |
Other (non-AT&T) terminals may support margins |
| 3055 |
but using different assumptions from AT&T. |
| 3056 |
.IP |
| 3057 |
For instance, the DEC VT420 supports left/right margins, |
| 3058 |
but only using a column parameter. |
| 3059 |
As an added complication, the VT420 uses two settings to fully enable |
| 3060 |
left/right margins (left/right margin mode, and origin mode). |
| 3061 |
The former enables the margins, which causes printed text |
| 3062 |
to wrap within margins, but the latter is needed to prevent |
| 3063 |
cursor-addressing outside those margins. |
| 3064 |
.bP |
| 3065 |
Both DEC VT420 left/right margins are set with a single control sequence. |
| 3066 |
If either is omitted, the corresponding margin is set to the left or |
| 3067 |
right edge of the display (rather than leaving the margin unmodified). |
| 3068 |
.PP |
| 3069 |
These are the margin-related capabilities: |
| 3070 |
.PP |
| 3071 |
.TS |
| 3072 |
center; |
| 3073 |
Lb Lb |
| 3074 |
Lb L . |
| 3075 |
Name Description |
| 3076 |
_ |
| 3077 |
smgl Set left margin at current column |
| 3078 |
smgr Set right margin at current column |
| 3079 |
smgb Set bottom margin at current line |
| 3080 |
smgt Set top margin at current line |
| 3081 |
smgbp Set bottom margin at line \fIN\fP |
| 3082 |
smglp Set left margin at column \fIN\fP |
| 3083 |
smgrp Set right margin at column \fIN\fP |
| 3084 |
smgtp Set top margin at line \fIN\fP |
| 3085 |
smglr Set both left and right margins to \fIL\fP and \fIR\fP |
| 3086 |
smgtb Set both top and bottom margins to \fIT\fP and \fIB\fP |
| 3087 |
.TE |
| 3088 |
.PP |
| 3089 |
When writing an application that |
| 3090 |
uses these string capabilities, |
| 3091 |
the pairs should be first checked to see |
| 3092 |
if each capability in the pair is set or only one is set: |
| 3093 |
.bP |
| 3094 |
If both \fBsmglp\fP and \fBsmgrp\fP are set, |
| 3095 |
each is used with a single argument, \fIN\fP, |
| 3096 |
that gives the column number of the left and right margin, respectively. |
| 3097 |
.bP |
| 3098 |
If both \fBsmgtp\fP and \fBsmgbp\fP are set, |
| 3099 |
each is used to set the top and bottom margin, |
| 3100 |
respectively: |
| 3101 |
.RS 4 |
| 3102 |
.bP |
| 3103 |
\fBsmgtp\fP is used with a single argument, \fIN\fP, |
| 3104 |
the line number of the top margin. |
| 3105 |
.bP |
| 3106 |
\fBsmgbp\fP is used with two arguments, \fIN\fP and \fIM\fP, |
| 3107 |
that give the line number of the bottom margin, |
| 3108 |
the first counting from the top of the |
| 3109 |
page and the second counting from the bottom. |
| 3110 |
This accommodates the two styles of specifying |
| 3111 |
the bottom margin in different manufacturers' printers. |
| 3112 |
.RE |
| 3113 |
.IP |
| 3114 |
When designing a terminfo entry for a |
| 3115 |
printer that has a settable bottom margin, |
| 3116 |
only the first or second argument should be used, depending on the printer. |
| 3117 |
When developing an application that uses \fBsmgbp\fP to set the bottom margin, |
| 3118 |
both arguments must be given. |
| 3119 |
.PP |
| 3120 |
Conversely, when only one capability in the pair is set: |
| 3121 |
.bP |
| 3122 |
If only one of \fBsmglp\fP and \fBsmgrp\fP is set, |
| 3123 |
then it is used with two arguments, |
| 3124 |
the column number of the left and right margins, in that order. |
| 3125 |
.bP |
| 3126 |
Likewise, if only one of \fBsmgtp\fP and \fBsmgbp\fP is set, then it |
| 3127 |
is used with two arguments that give the top and bottom margins, |
| 3128 |
in that order, counting from the top of the page. |
| 3129 |
.IP |
| 3130 |
When designing a terminfo entry for a printer that requires setting both |
| 3131 |
left and right or top and bottom margins simultaneously, |
| 3132 |
only one capability in the pairs |
| 3133 |
\fBsmglp\fP and \fBsmgrp\fP or |
| 3134 |
\fBsmgtp\fP and \fBsmgbp\fP should be defined, |
| 3135 |
leaving the other unset. |
| 3136 |
.PP |
| 3137 |
Except for very old terminal descriptions, e.g., those developed for SVr4, |
| 3138 |
the scheme just described should be considered obsolete. |
| 3139 |
An improved set of capabilities was added late in the SVr4 releases |
| 3140 |
(\fBsmglr\fP and \fBsmgtb\fP), |
| 3141 |
which explicitly use two parameters for setting the left/right or top/bottom |
| 3142 |
margins. |
| 3143 |
.PP |
| 3144 |
When setting margins, the line- and column-values are zero-based. |
| 3145 |
.PP |
| 3146 |
The \fBmgc\fP string capability should be defined. |
| 3147 |
Applications such as \fBtabs\fP(1) rely upon this to reset all margins. |
| 3148 |
.\" |
| 3149 |
.SS "Area Clears" |
| 3150 |
If the terminal can clear from the current position to the end of the |
| 3151 |
line, leaving the cursor where it is, this should be given as \fBel\fP. |
| 3152 |
If the terminal can clear from the beginning of the line to the current |
| 3153 |
position inclusive, leaving |
| 3154 |
the cursor where it is, this should be given as \fBel1\fP. |
| 3155 |
If the terminal can clear from the current position to the end of the |
| 3156 |
display, then this should be given as \fBed\fP. |
| 3157 |
\fBEd\fP is only defined from the first column of a line. |
| 3158 |
(Thus, it can be simulated by a request to delete a large number of lines, |
| 3159 |
if a true |
| 3160 |
.B ed |
| 3161 |
is not available.) |
| 3162 |
.\" |
| 3163 |
.SS "Insert/Delete Line and Vertical Motions" |
| 3164 |
If the terminal can open a new blank line before the line where the cursor |
| 3165 |
is, this should be given as \fBil1\fP; this is done only from the first |
| 3166 |
position of a line. |
| 3167 |
The cursor must then appear on the newly blank line. |
| 3168 |
If the terminal can delete the line which the cursor is on, then this |
| 3169 |
should be given as \fBdl1\fP; this is done only from the first position on |
| 3170 |
the line to be deleted. |
| 3171 |
Versions of |
| 3172 |
.B il1 |
| 3173 |
and |
| 3174 |
.B dl1 |
| 3175 |
which take a single parameter and insert or delete that many lines can |
| 3176 |
be given as |
| 3177 |
.B il |
| 3178 |
and |
| 3179 |
.BR dl . |
| 3180 |
.PP |
| 3181 |
If the terminal has a settable scrolling region (like the vt100) |
| 3182 |
the command to set this can be described with the |
| 3183 |
.B csr |
| 3184 |
capability, which takes two parameters: |
| 3185 |
the top and bottom lines of the scrolling region. |
| 3186 |
The cursor position is, alas, undefined after using this command. |
| 3187 |
.PP |
| 3188 |
It is possible to get the effect of insert or delete line using |
| 3189 |
.B csr |
| 3190 |
on a properly chosen region; the |
| 3191 |
.B sc |
| 3192 |
and |
| 3193 |
.B rc |
| 3194 |
(save and restore cursor) commands may be useful for ensuring that |
| 3195 |
your synthesized insert/delete string does not move the cursor. |
| 3196 |
(Note that the \fB\%ncurses\fP(3NCURSES) library does this synthesis |
| 3197 |
automatically, so you need not compose insert/delete strings for |
| 3198 |
an entry with \fBcsr\fP). |
| 3199 |
.PP |
| 3200 |
Yet another way to construct insert and delete might be to use a combination of |
| 3201 |
index with the memory-lock feature found on some terminals (like the HP-700/90 |
| 3202 |
series, which however also has insert/delete). |
| 3203 |
.PP |
| 3204 |
Inserting lines at the top or bottom of the screen can also be |
| 3205 |
done using |
| 3206 |
.B ri |
| 3207 |
or |
| 3208 |
.B ind |
| 3209 |
on many terminals without a true insert/delete line, |
| 3210 |
and is often faster even on terminals with those features. |
| 3211 |
.PP |
| 3212 |
The Boolean \fBnon_dest_scroll_region\fP should be set if each scrolling |
| 3213 |
window is effectively a view port on a screen-sized canvas. |
| 3214 |
To test for |
| 3215 |
this capability, create a scrolling region in the middle of the screen, |
| 3216 |
write something to the bottom line, move the cursor to the top of the region, |
| 3217 |
and do \fBri\fP followed by \fBdl1\fP or \fBind\fP. |
| 3218 |
If the data scrolled |
| 3219 |
off the bottom of the region by the \fBri\fP re-appears, then scrolling |
| 3220 |
is non-destructive. |
| 3221 |
System V and X/Open Curses expect that \fBind\fP, \fBri\fP, |
| 3222 |
\fBindn\fP, and \fBrin\fP will simulate destructive scrolling; their |
| 3223 |
documentation cautions you not to define \fBcsr\fP unless this is true. |
| 3224 |
This \fBcurses\fP implementation is more liberal and will do explicit erases |
| 3225 |
after scrolling if \fBndsrc\fP is defined. |
| 3226 |
.PP |
| 3227 |
If the terminal has the ability to define a window as part of |
| 3228 |
memory, which all commands affect, |
| 3229 |
it should be given as the parameterized string |
| 3230 |
.BR wind . |
| 3231 |
The four parameters are the starting and ending lines in memory |
| 3232 |
and the starting and ending columns in memory, in that order. |
| 3233 |
.PP |
| 3234 |
If the terminal can retain display memory above, then the |
| 3235 |
\fBda\fP capability should be given; if display memory can be retained |
| 3236 |
below, then \fBdb\fP should be given. |
| 3237 |
These indicate |
| 3238 |
that deleting a line or scrolling may bring non-blank lines up from below |
| 3239 |
or that scrolling back with \fBri\fP may bring down non-blank lines. |
| 3240 |
.SS "Insert/Delete Character" |
| 3241 |
There are two basic kinds of intelligent terminals with respect to |
| 3242 |
insert/delete character which can be described using |
| 3243 |
.IR terminfo . |
| 3244 |
The most common insert/delete character operations affect only the characters |
| 3245 |
on the current line and shift characters off the end of the line rigidly. |
| 3246 |
Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make |
| 3247 |
a distinction between typed and untyped blanks on the screen, shifting |
| 3248 |
upon an insert or delete only to an untyped blank on the screen which is |
| 3249 |
either eliminated, or expanded to two untyped blanks. |
| 3250 |
.PP |
| 3251 |
You can determine the |
| 3252 |
kind of terminal you have by clearing the screen and then typing |
| 3253 |
text separated by cursor motions. |
| 3254 |
Type \*(``abc\ \ \ \ def\*('' using local |
| 3255 |
cursor motions (not spaces) between the \*(``abc\*('' and the \*(``def\*(''. |
| 3256 |
Then position the cursor before the \*(``abc\*('' and put the terminal in insert |
| 3257 |
mode. |
| 3258 |
If typing characters causes the rest of the line to shift |
| 3259 |
rigidly and characters to fall off the end, then your terminal does |
| 3260 |
not distinguish between blanks and untyped positions. |
| 3261 |
If the \*(``abc\*('' |
| 3262 |
shifts over to the \*(``def\*('' which then move together around the end of the |
| 3263 |
current line and onto the next as you insert, you have the second type of |
| 3264 |
terminal, and should give the capability \fBin\fP, which stands for |
| 3265 |
\*(``insert null\*(''. |
| 3266 |
.PP |
| 3267 |
While these are two logically separate attributes (one line versus multi-line |
| 3268 |
insert mode, and special treatment of untyped spaces) we have seen no |
| 3269 |
terminals whose insert mode cannot be described with the single attribute. |
| 3270 |
.PP |
| 3271 |
Terminfo can describe both terminals which have an insert mode, and terminals |
| 3272 |
which send a simple sequence to open a blank position on the current line. |
| 3273 |
Give as \fBsmir\fP the sequence to get into insert mode. |
| 3274 |
Give as \fBrmir\fP the sequence to leave insert mode. |
| 3275 |
Now give as \fBich1\fP any sequence needed to be sent just before sending |
| 3276 |
the character to be inserted. |
| 3277 |
Most terminals with a true insert mode |
| 3278 |
will not give \fBich1\fP; terminals which send a sequence to open a screen |
| 3279 |
position should give it here. |
| 3280 |
.PP |
| 3281 |
If your terminal has both, insert mode is usually preferable to \fBich1\fP. |
| 3282 |
Technically, you should not give both unless the terminal actually requires |
| 3283 |
both to be used in combination. |
| 3284 |
Accordingly, some non-curses applications get |
| 3285 |
confused if both are present; the symptom is doubled characters in an update |
| 3286 |
using insert. |
| 3287 |
This requirement is now rare; most \fBich\fP sequences do not |
| 3288 |
require previous smir, and most smir insert modes do not require \fBich1\fP |
| 3289 |
before each character. |
| 3290 |
Therefore, the new \fBcurses\fP actually assumes this |
| 3291 |
is the case and uses either \fBrmir\fP/\fBsmir\fP or \fBich\fP/\fBich1\fP as |
| 3292 |
appropriate (but not both). |
| 3293 |
If you have to write an entry to be used under |
| 3294 |
new curses for a terminal old enough to need both, include the |
| 3295 |
\fBrmir\fP/\fBsmir\fP sequences in \fBich1\fP. |
| 3296 |
.PP |
| 3297 |
If post insert padding is needed, give this as a number of milliseconds |
| 3298 |
in \fBip\fP (a string option). |
| 3299 |
Any other sequence which may need to be |
| 3300 |
sent after an insert of a single character may also be given in \fBip\fP. |
| 3301 |
If your terminal needs both to be placed into an \*(``insert mode\*('' and |
| 3302 |
a special code to precede each inserted character, then both |
| 3303 |
.BR smir / rmir |
| 3304 |
and |
| 3305 |
.B ich1 |
| 3306 |
can be given, and both will be used. |
| 3307 |
The |
| 3308 |
.B ich |
| 3309 |
capability, with one parameter, |
| 3310 |
.IR n , |
| 3311 |
will repeat the effects of |
| 3312 |
.B ich1 |
| 3313 |
.I n |
| 3314 |
times. |
| 3315 |
.PP |
| 3316 |
If padding is necessary between characters typed while not |
| 3317 |
in insert mode, give this as a number of milliseconds padding in \fBrmp\fP. |
| 3318 |
.PP |
| 3319 |
It is occasionally necessary to move around while in insert mode |
| 3320 |
to delete characters on the same line (e.g., if there is a tab after |
| 3321 |
the insertion position). |
| 3322 |
If your terminal allows motion while in |
| 3323 |
insert mode you can give the capability \fBmir\fP to speed up inserting |
| 3324 |
in this case. |
| 3325 |
Omitting \fBmir\fP will affect only speed. |
| 3326 |
Some terminals |
| 3327 |
(notably Datamedia's) must not have \fBmir\fP because of the way their |
| 3328 |
insert mode works. |
| 3329 |
.PP |
| 3330 |
Finally, you can specify |
| 3331 |
.B dch1 |
| 3332 |
to delete a single character, |
| 3333 |
.B dch |
| 3334 |
with one parameter, |
| 3335 |
.IR n , |
| 3336 |
to delete |
| 3337 |
.IR n " characters," |
| 3338 |
and delete mode by giving \fBsmdc\fP and \fBrmdc\fP |
| 3339 |
to enter and exit delete mode (any mode the terminal needs to be placed |
| 3340 |
in for |
| 3341 |
.B dch1 |
| 3342 |
to work). |
| 3343 |
.PP |
| 3344 |
A command to erase |
| 3345 |
.I n |
| 3346 |
characters (equivalent to outputting |
| 3347 |
.I n |
| 3348 |
blanks without moving the cursor) |
| 3349 |
can be given as |
| 3350 |
.B ech |
| 3351 |
with one parameter. |
| 3352 |
.SS "Highlighting, Underlining, and Visible Bells" |
| 3353 |
If your terminal has one or more kinds of display attributes, |
| 3354 |
these can be represented in a number of different ways. |
| 3355 |
You should choose one display form as |
| 3356 |
\f2standout mode\fP, |
| 3357 |
representing a good, high contrast, easy-on-the-eyes, |
| 3358 |
format for highlighting error messages and other attention getters. |
| 3359 |
(If you have a choice, reverse video plus half-bright is good, |
| 3360 |
or reverse video alone.) |
| 3361 |
The sequences to enter and exit standout mode |
| 3362 |
are given as \fBsmso\fP and \fBrmso\fP, respectively. |
| 3363 |
If the code to change into or out of standout |
| 3364 |
mode leaves one or even two blank spaces on the screen, |
| 3365 |
as the TVI 912 and Teleray 1061 do, |
| 3366 |
then \fBxmc\fP should be given to tell how many spaces are left. |
| 3367 |
.PP |
| 3368 |
Codes to begin underlining and end underlining can be given as \fBsmul\fP |
| 3369 |
and \fBrmul\fP respectively. |
| 3370 |
If the terminal has a code to underline the current character and move |
| 3371 |
the cursor one space to the right, |
| 3372 |
such as the Microterm Mime, |
| 3373 |
this can be given as \fBuc\fP. |
| 3374 |
.PP |
| 3375 |
Other capabilities to enter various highlighting modes include |
| 3376 |
.B blink |
| 3377 |
(blinking) |
| 3378 |
.B bold |
| 3379 |
(bold or extra bright) |
| 3380 |
.B dim |
| 3381 |
(dim or half-bright) |
| 3382 |
.B invis |
| 3383 |
(blanking or invisible text) |
| 3384 |
.B prot |
| 3385 |
(protected) |
| 3386 |
.B rev |
| 3387 |
(reverse video) |
| 3388 |
.B sgr0 |
| 3389 |
(turn off |
| 3390 |
.I all |
| 3391 |
attribute modes) |
| 3392 |
.B smacs |
| 3393 |
(enter alternate character set mode) |
| 3394 |
and |
| 3395 |
.B rmacs |
| 3396 |
(exit alternate character set mode). |
| 3397 |
Turning on any of these modes singly may or may not turn off other modes. |
| 3398 |
.PP |
| 3399 |
If there is a sequence to set arbitrary combinations of modes, |
| 3400 |
this should be given as |
| 3401 |
.B sgr |
| 3402 |
(set attributes), |
| 3403 |
taking 9 parameters. |
| 3404 |
Each parameter is either zero (0) or nonzero, |
| 3405 |
as the corresponding attribute is on or off. |
| 3406 |
The 9 parameters are, in order: |
| 3407 |
standout, underline, reverse, blink, dim, bold, blank, protect, alternate |
| 3408 |
character set. |
| 3409 |
Not all modes need be supported by |
| 3410 |
.BR sgr , |
| 3411 |
only those for which corresponding separate attribute commands exist. |
| 3412 |
.PP |
| 3413 |
For example, the DEC vt220 supports most of the modes: |
| 3414 |
.PP |
| 3415 |
.TS |
| 3416 |
center; |
| 3417 |
Lb Lb Lb |
| 3418 |
L L L . |
| 3419 |
tparm Parameter Attribute Escape Sequence |
| 3420 |
_ |
| 3421 |
none none \eE[0m |
| 3422 |
p1 standout \eE[0;1;7m |
| 3423 |
p2 underline \eE[0;4m |
| 3424 |
p3 reverse \eE[0;7m |
| 3425 |
p4 blink \eE[0;5m |
| 3426 |
p5 dim not available |
| 3427 |
p6 bold \eE[0;1m |
| 3428 |
p7 invis \eE[0;8m |
| 3429 |
p8 protect not used |
| 3430 |
p9 altcharset \*^O (off) \*^N (on) |
| 3431 |
.TE |
| 3432 |
.PP |
| 3433 |
We begin each escape sequence by turning off any existing modes, since |
| 3434 |
there is no quick way to determine whether they are active. |
| 3435 |
Standout is set up to be the combination of reverse and bold. |
| 3436 |
The vt220 terminal has a protect mode, |
| 3437 |
though it is not commonly used in sgr |
| 3438 |
because it protects characters on the screen from the host's erasures. |
| 3439 |
The altcharset mode also is different in that it is either \*^O or \*^N, |
| 3440 |
depending on whether it is off or on. |
| 3441 |
If all modes are turned on, the resulting sequence is \eE[0;1;4;5;7;8m\*^N. |
| 3442 |
.PP |
| 3443 |
Some sequences are common to different modes. |
| 3444 |
For example, ;7 is output when either p1 or p3 is true, that is, if |
| 3445 |
either standout or reverse modes are turned on. |
| 3446 |
.PP |
| 3447 |
Writing out the above sequences, along with their dependencies yields |
| 3448 |
.PP |
| 3449 |
.ne 11 |
| 3450 |
.TS |
| 3451 |
center; |
| 3452 |
Lb Lb Lb |
| 3453 |
L L L . |
| 3454 |
Sequence When to Output terminfo Translation |
| 3455 |
_ |
| 3456 |
\eE[0 always \eE[0 |
| 3457 |
;1 if p1 or p6 %?%p1%p6%|%t;1%; |
| 3458 |
;4 if p2 %?%p2%|%t;4%; |
| 3459 |
;5 if p4 %?%p4%|%t;5%; |
| 3460 |
;7 if p1 or p3 %?%p1%p3%|%t;7%; |
| 3461 |
;8 if p7 %?%p7%|%t;8%; |
| 3462 |
m always m |
| 3463 |
\*^N or \*^O if p9 \*^N, else \*^O %?%p9%t\*^N%e\*^O%; |
| 3464 |
.TE |
| 3465 |
.PP |
| 3466 |
Putting this all together into the sgr sequence gives: |
| 3467 |
.PP |
| 3468 |
.EX |
| 3469 |
.nf |
| 3470 |
sgr=\eE[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p4%t;5%; |
| 3471 |
%?%p1%p3%|%t;7%;%?%p7%t;8%;m%?%p9%t\e016%e\e017%;, |
| 3472 |
.fi |
| 3473 |
.EE |
| 3474 |
.PP |
| 3475 |
Remember that if you specify sgr, you must also specify sgr0. |
| 3476 |
Also, some implementations rely on sgr being given if sgr0 is, |
| 3477 |
Not all terminfo entries necessarily have an sgr string, however. |
| 3478 |
Many terminfo entries are derived from termcap entries |
| 3479 |
which have no sgr string. |
| 3480 |
The only drawback to adding an sgr string is that termcap also |
| 3481 |
assumes that sgr0 does not exit alternate character set mode. |
| 3482 |
.PP |
| 3483 |
Terminals with the \*(``magic cookie\*('' glitch |
| 3484 |
.RB ( xmc ) |
| 3485 |
deposit special \*(``cookies\*('' when they receive mode-setting sequences, |
| 3486 |
which affect the display algorithm rather than having extra bits for |
| 3487 |
each character. |
| 3488 |
Some terminals, such as the HP 2621, automatically leave standout |
| 3489 |
mode when they move to a new line or the cursor is addressed. |
| 3490 |
Programs using standout mode should exit standout mode before |
| 3491 |
moving the cursor or sending a newline, |
| 3492 |
unless the |
| 3493 |
.B msgr |
| 3494 |
capability, asserting that it is safe to move in standout mode, is present. |
| 3495 |
.PP |
| 3496 |
If the terminal has |
| 3497 |
a way of flashing the screen to indicate an error quietly (a bell replacement) |
| 3498 |
then this can be given as \fBflash\fP; it must not move the cursor. |
| 3499 |
.PP |
| 3500 |
If the cursor needs to be made more visible than normal when it is |
| 3501 |
not on the bottom line (to make, for example, a non-blinking underline into an |
| 3502 |
easier to find block or blinking underline) |
| 3503 |
give this sequence as |
| 3504 |
.BR cvvis . |
| 3505 |
If there is a way to make the cursor completely invisible, give that as |
| 3506 |
.BR civis . |
| 3507 |
The capability |
| 3508 |
.B cnorm |
| 3509 |
should be given which undoes the effects of both of these modes. |
| 3510 |
.PP |
| 3511 |
If your terminal correctly generates underlined characters |
| 3512 |
(with no special codes needed) |
| 3513 |
even though it does not overstrike, |
| 3514 |
then you should give the capability \fBul\fP. |
| 3515 |
If a character overstriking another leaves both characters on the screen, |
| 3516 |
specify the capability \fBos\fP. |
| 3517 |
If overstrikes are erasable with a blank, |
| 3518 |
then this should be indicated by giving \fBeo\fP. |
| 3519 |
.SS "Keypad and Function Keys" |
| 3520 |
If the terminal has a keypad that transmits codes when the keys are pressed, |
| 3521 |
this information can be given. |
| 3522 |
Note that it is not possible to handle |
| 3523 |
terminals where the keypad only works in local (this applies, for example, |
| 3524 |
to the unshifted HP 2621 keys). |
| 3525 |
If the keypad can be set to transmit or not transmit, |
| 3526 |
give these codes as \fBsmkx\fP and \fBrmkx\fP. |
| 3527 |
Otherwise the keypad is assumed to always transmit. |
| 3528 |
.PP |
| 3529 |
The codes sent by the left arrow, right arrow, up arrow, down arrow, |
| 3530 |
and home keys can be given as |
| 3531 |
\fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fP respectively. |
| 3532 |
If there are function keys such as f0, f1, ..., f10, the codes they send |
| 3533 |
can be given as \fBkf0, kf1, ..., kf10\fP. |
| 3534 |
If these keys have labels other than the default f0 through f10, the labels |
| 3535 |
can be given as \fBlf0, lf1, ..., lf10\fP. |
| 3536 |
.PP |
| 3537 |
The codes transmitted by certain other special keys can be given: |
| 3538 |
.bP |
| 3539 |
.B kll |
| 3540 |
(home down), |
| 3541 |
.bP |
| 3542 |
.B kbs |
| 3543 |
(backspace), |
| 3544 |
.bP |
| 3545 |
.B ktbc |
| 3546 |
(clear all tabs), |
| 3547 |
.bP |
| 3548 |
.B kctab |
| 3549 |
(clear the tab stop in this column), |
| 3550 |
.bP |
| 3551 |
.B kclr |
| 3552 |
(clear screen or erase key), |
| 3553 |
.bP |
| 3554 |
.B kdch1 |
| 3555 |
(delete character), |
| 3556 |
.bP |
| 3557 |
.B kdl1 |
| 3558 |
(delete line), |
| 3559 |
.bP |
| 3560 |
.B krmir |
| 3561 |
(exit insert mode), |
| 3562 |
.bP |
| 3563 |
.B kel |
| 3564 |
(clear to end of line), |
| 3565 |
.bP |
| 3566 |
.B ked |
| 3567 |
(clear to end of screen), |
| 3568 |
.bP |
| 3569 |
.B kich1 |
| 3570 |
(insert character or enter insert mode), |
| 3571 |
.bP |
| 3572 |
.B kil1 |
| 3573 |
(insert line), |
| 3574 |
.bP |
| 3575 |
.B knp |
| 3576 |
(next page), |
| 3577 |
.bP |
| 3578 |
.B kpp |
| 3579 |
(previous page), |
| 3580 |
.bP |
| 3581 |
.B kind |
| 3582 |
(scroll forward/down), |
| 3583 |
.bP |
| 3584 |
.B kri |
| 3585 |
(scroll backward/up), |
| 3586 |
.bP |
| 3587 |
.B khts |
| 3588 |
(set a tab stop in this column). |
| 3589 |
.PP |
| 3590 |
In addition, if the keypad has a 3 by 3 array of keys including the four |
| 3591 |
arrow keys, the other five keys can be given as |
| 3592 |
.BR ka1 , |
| 3593 |
.BR ka3 , |
| 3594 |
.BR kb2 , |
| 3595 |
.BR kc1 , |
| 3596 |
and |
| 3597 |
.BR kc3 . |
| 3598 |
These keys are useful when the effects of a 3 by 3 directional pad are needed. |
| 3599 |
.PP |
| 3600 |
Strings to program function keys can be given as |
| 3601 |
.BR pfkey , |
| 3602 |
.BR pfloc , |
| 3603 |
and |
| 3604 |
.BR pfx . |
| 3605 |
A string to program screen labels should be specified as \fBpln\fP. |
| 3606 |
Each of these strings takes two parameters: the function key number to |
| 3607 |
program (from 0 to 10) and the string to program it with. |
| 3608 |
Function key numbers out of this range may program undefined keys in |
| 3609 |
a terminal dependent manner. |
| 3610 |
The difference between the capabilities is that |
| 3611 |
.B pfkey |
| 3612 |
causes pressing the given key to be the same as the user typing the |
| 3613 |
given string; |
| 3614 |
.B pfloc |
| 3615 |
causes the string to be executed by the terminal in local; and |
| 3616 |
.B pfx |
| 3617 |
causes the string to be transmitted to the computer. |
| 3618 |
.PP |
| 3619 |
The capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fP |
| 3620 |
define the number of programmable |
| 3621 |
screen labels and their width and height. |
| 3622 |
If there are commands to turn the labels on and off, |
| 3623 |
give them in \fBsmln\fP and \fBrmln\fP. |
| 3624 |
\fBsmln\fP is normally output after one or more pln |
| 3625 |
sequences to make sure that the change becomes visible. |
| 3626 |
.SS "Tabs and Initialization" |
| 3627 |
A few capabilities are used only to manage tab stops. |
| 3628 |
.bP |
| 3629 |
If the terminal has hardware tabs, |
| 3630 |
specify the character sequence that advances to the next tab stop |
| 3631 |
as the value of the |
| 3632 |
.B tab |
| 3633 |
.RB ( ht ) |
| 3634 |
string capability |
| 3635 |
(usually Control+I). |
| 3636 |
.bP |
| 3637 |
Specify a character sequence that retreats |
| 3638 |
(moves leftward) |
| 3639 |
to the preceding tab stop |
| 3640 |
as the value of the |
| 3641 |
.B \%back_tab |
| 3642 |
.RB ( cbt ) |
| 3643 |
string capability. |
| 3644 |
.IP |
| 3645 |
By convention, |
| 3646 |
if the terminal modes are configured such that tabs are expanded |
| 3647 |
by the host rather than terminal, |
| 3648 |
applications should not employ the |
| 3649 |
.B tab |
| 3650 |
.RB ( ht ) |
| 3651 |
or |
| 3652 |
.B \%back_tab |
| 3653 |
.RB ( cbt ) |
| 3654 |
capabilities even if they are present, |
| 3655 |
since the user may not have the tab stops properly set. |
| 3656 |
.bP |
| 3657 |
If the terminal has hardware tab stops that are set at every |
| 3658 |
.I n |
| 3659 |
character cells when the terminal is powered up, |
| 3660 |
specify |
| 3661 |
.I n |
| 3662 |
as the value of the the numeric capability |
| 3663 |
.B \%init_tabs |
| 3664 |
.RB ( it )\c |
| 3665 |
\&. |
| 3666 |
.IP |
| 3667 |
The |
| 3668 |
.B \%tset |
| 3669 |
and |
| 3670 |
.RB \*(`` \%tput |
| 3671 |
.BR init \*('' |
| 3672 |
commands interpret the presence of the |
| 3673 |
.B \%init_tabs |
| 3674 |
.RB ( it ) |
| 3675 |
capability as implying that the terminal |
| 3676 |
is responsible for tab stop expansion |
| 3677 |
as well as an instruction to set the tab stops to its value. |
| 3678 |
If the terminal has tab stops that can be saved in non-volatile memory, |
| 3679 |
its |
| 3680 |
.I \%term\%info |
| 3681 |
type description can assume that they are properly set. |
| 3682 |
.PP |
| 3683 |
Other capabilities |
| 3684 |
include |
| 3685 |
.bP |
| 3686 |
.BR is1 , |
| 3687 |
.BR is2 , |
| 3688 |
and |
| 3689 |
.BR is3 , |
| 3690 |
initialization strings for the terminal, |
| 3691 |
.bP |
| 3692 |
.BR iprog , |
| 3693 |
the path name of a program to be run to initialize the terminal, |
| 3694 |
.bP |
| 3695 |
and \fBif\fP, the name of a file containing long initialization strings. |
| 3696 |
.PP |
| 3697 |
These strings are expected to set the terminal into modes consistent |
| 3698 |
with the rest of the terminfo description. |
| 3699 |
They are normally sent to the terminal, by the |
| 3700 |
.I init |
| 3701 |
option of the \fBtput\fP program, each time the user logs in. |
| 3702 |
They will be printed in the following order: |
| 3703 |
.RS |
| 3704 |
.TP |
| 3705 |
run the program |
| 3706 |
.B iprog |
| 3707 |
.TP |
| 3708 |
output |
| 3709 |
.br |
| 3710 |
\fBis1\fP and |
| 3711 |
.br |
| 3712 |
\fBis2\fP |
| 3713 |
.TP |
| 3714 |
set the margins using |
| 3715 |
\fBmgc\fP or |
| 3716 |
.br |
| 3717 |
\fBsmglp\fP and \fBsmgrp\fP or |
| 3718 |
.br |
| 3719 |
\fBsmgl\fP and \fBsmgr\fP |
| 3720 |
.TP |
| 3721 |
set tabs using |
| 3722 |
.B tbc |
| 3723 |
and |
| 3724 |
.B hts |
| 3725 |
.TP |
| 3726 |
print the file |
| 3727 |
\fBif\fP |
| 3728 |
.TP |
| 3729 |
and finally output |
| 3730 |
\fBis3\fP. |
| 3731 |
.RE |
| 3732 |
.PP |
| 3733 |
Most initialization is done with |
| 3734 |
.BR is2 . |
| 3735 |
Special terminal modes can be set up without duplicating strings |
| 3736 |
by putting the common sequences in |
| 3737 |
.B is2 |
| 3738 |
and special cases in |
| 3739 |
.B is1 |
| 3740 |
and |
| 3741 |
.BR is3 . |
| 3742 |
.PP |
| 3743 |
A set of sequences that does a harder reset from a totally unknown state |
| 3744 |
can be given as |
| 3745 |
.BR rs1 , |
| 3746 |
.BR rs2 , |
| 3747 |
.B rf |
| 3748 |
and |
| 3749 |
.BR rs3 , |
| 3750 |
analogous to |
| 3751 |
.B is1 , |
| 3752 |
.B is2 , |
| 3753 |
.B if |
| 3754 |
and |
| 3755 |
.B is3 |
| 3756 |
respectively. |
| 3757 |
These strings are output |
| 3758 |
by \fIreset\fP option of \fBtput\fP, |
| 3759 |
or by the \fBreset\fP program |
| 3760 |
(an alias of \fBtset\fP), |
| 3761 |
which is used when the terminal gets into a wedged state. |
| 3762 |
Commands are normally placed in |
| 3763 |
.BR rs1 , |
| 3764 |
.B rs2 |
| 3765 |
.B rs3 |
| 3766 |
and |
| 3767 |
.B rf |
| 3768 |
only if they produce annoying effects on the screen and are not |
| 3769 |
necessary when logging in. |
| 3770 |
For example, the command to set the vt100 into 80-column mode would |
| 3771 |
normally be part of |
| 3772 |
.BR is2 , |
| 3773 |
but it causes an annoying glitch of the screen and is not normally |
| 3774 |
needed since the terminal is usually already in 80-column mode. |
| 3775 |
.PP |
| 3776 |
The \fBreset\fP program writes strings including |
| 3777 |
.BR iprog , |
| 3778 |
etc., in the same order as the |
| 3779 |
.I init |
| 3780 |
program, using |
| 3781 |
.BR rs1 , |
| 3782 |
etc., instead of |
| 3783 |
.BR is1 , |
| 3784 |
etc. |
| 3785 |
If any of |
| 3786 |
.BR rs1 , |
| 3787 |
.BR rs2 , |
| 3788 |
.BR rs3 , |
| 3789 |
or |
| 3790 |
.B rf |
| 3791 |
reset capability strings are missing, |
| 3792 |
the \fBreset\fP program |
| 3793 |
falls back upon the corresponding initialization capability string. |
| 3794 |
.PP |
| 3795 |
If there are commands to set and clear tab stops, they can be given as |
| 3796 |
.B tbc |
| 3797 |
(clear all tab stops) |
| 3798 |
and |
| 3799 |
.B hts |
| 3800 |
(set a tab stop in the current column of every line). |
| 3801 |
If a more complex sequence is needed to set the tabs than can be |
| 3802 |
described by this, the sequence can be placed in |
| 3803 |
.B is2 |
| 3804 |
or |
| 3805 |
.BR if . |
| 3806 |
.PP |
| 3807 |
The \fBtput reset\fP command uses the same capability strings |
| 3808 |
as the \fBreset\fP command, |
| 3809 |
although the two programs (\fBtput\fP and \fBreset\fP) |
| 3810 |
provide different command-line options. |
| 3811 |
.PP |
| 3812 |
In practice, these terminfo capabilities are not often used in |
| 3813 |
initialization of tabs |
| 3814 |
(though they are required for the \fBtabs\fP program): |
| 3815 |
.bP |
| 3816 |
Almost all hardware terminals (at least those which supported tabs) |
| 3817 |
initialized those to every \fIeight\fP columns: |
| 3818 |
.IP |
| 3819 |
The only exception was the AT&T 2300 series, |
| 3820 |
which set tabs to every \fIfive\fP columns. |
| 3821 |
.bP |
| 3822 |
In particular, developers of the hardware terminals which are commonly used |
| 3823 |
as models for modern terminal emulators provided documentation demonstrating |
| 3824 |
that \fIeight\fP columns were the standard. |
| 3825 |
.bP |
| 3826 |
Because of this, the terminal initialization programs |
| 3827 |
\fBtput\fP and \fBtset\fP |
| 3828 |
use the |
| 3829 |
\fBtbc\fP (\fBclear_all_tabs\fP) and |
| 3830 |
\fBhts\fP (\fBset_tab\fP) capabilities directly |
| 3831 |
only when the \fBit\fP (\fBinit_tabs\fP) capability |
| 3832 |
is set to a value other than \fIeight\fP. |
| 3833 |
.SS "Delays and Padding" |
| 3834 |
Many older and slower terminals do not support either XON/XOFF or DTR |
| 3835 |
handshaking, including hard copy terminals and some very archaic CRTs |
| 3836 |
(including, for example, DEC VT100s). |
| 3837 |
These may require padding characters |
| 3838 |
after certain cursor motions and screen changes. |
| 3839 |
.PP |
| 3840 |
If the terminal uses xon/xoff handshaking for flow control (that is, |
| 3841 |
it automatically emits \*^S back to the host when its input buffers are |
| 3842 |
close to full), set |
| 3843 |
.BR xon . |
| 3844 |
This capability suppresses the emission of padding. |
| 3845 |
You can also set it |
| 3846 |
for memory-mapped console devices effectively that do not have a speed limit. |
| 3847 |
Padding information should still be included so that routines can |
| 3848 |
make better decisions about relative costs, but actual pad characters will |
| 3849 |
not be transmitted. |
| 3850 |
.PP |
| 3851 |
If \fBpb\fP (padding baud rate) is given, padding is suppressed at baud rates |
| 3852 |
below the value of \fBpb\fP. |
| 3853 |
If the entry has no padding baud rate, then |
| 3854 |
whether padding is emitted or not is completely controlled by \fBxon\fP. |
| 3855 |
.PP |
| 3856 |
If the terminal requires other than a null (zero) character as a pad, |
| 3857 |
then this can be given as \fBpad\fP. |
| 3858 |
Only the first character of the |
| 3859 |
.B pad |
| 3860 |
string is used. |
| 3861 |
.SS "Status Lines" |
| 3862 |
Some terminals have an extra \*(``status line\*('' which is not normally used by |
| 3863 |
software (and thus not counted in the terminal's \fBlines\fP capability). |
| 3864 |
.PP |
| 3865 |
The simplest case is a status line which is cursor-addressable but not |
| 3866 |
part of the main scrolling region on the screen; the Heathkit H19 has |
| 3867 |
a status line of this kind, as would a 24-line VT100 with a 23-line |
| 3868 |
scrolling region set up on initialization. |
| 3869 |
This situation is indicated |
| 3870 |
by the \fBhs\fP capability. |
| 3871 |
.PP |
| 3872 |
Some terminals with status lines need special sequences to access the |
| 3873 |
status line. |
| 3874 |
These may be expressed as a string with single parameter |
| 3875 |
\fBtsl\fP which takes the cursor to a given zero-origin column on the |
| 3876 |
status line. |
| 3877 |
The capability \fBfsl\fP must return to the main-screen |
| 3878 |
cursor positions before the last \fBtsl\fP. |
| 3879 |
You may need to embed the |
| 3880 |
string values of \fBsc\fP (save cursor) and \fBrc\fP (restore cursor) |
| 3881 |
in \fBtsl\fP and \fBfsl\fP to accomplish this. |
| 3882 |
.PP |
| 3883 |
The status line is normally assumed to be the same width as the width |
| 3884 |
of the terminal. |
| 3885 |
If this is untrue, you can specify it with the numeric |
| 3886 |
capability \fBwsl\fP. |
| 3887 |
.PP |
| 3888 |
A command to erase or blank the status line may be specified as \fBdsl\fP. |
| 3889 |
.PP |
| 3890 |
The Boolean capability \fBeslok\fP specifies that escape sequences, tabs, |
| 3891 |
etc., work ordinarily in the status line. |
| 3892 |
.PP |
| 3893 |
The \fI\%ncurses\fP implementation does not yet use any of these |
| 3894 |
capabilities. |
| 3895 |
They are documented here in case they ever become important. |
| 3896 |
.SS "Line Graphics" |
| 3897 |
Many terminals have alternate character sets useful for forms-drawing. |
| 3898 |
Terminfo and \fBcurses\fP have built-in support |
| 3899 |
for most of the drawing characters |
| 3900 |
supported by the VT100, with some characters from the AT&T 4410v1 added. |
| 3901 |
This alternate character set may be specified by the \fBacsc\fP capability. |
| 3902 |
.PP |
| 3903 |
.TS |
| 3904 |
center; |
| 3905 |
Lb Cb S L Lb |
| 3906 |
Lb2 Lb2 Lb Lb1 S |
| 3907 |
Lb L C Lb Lx. |
| 3908 |
\& acsc \& \& |
| 3909 |
ACS Name Value Symbol ASCII Fallback / Glyph Name |
| 3910 |
_ |
| 3911 |
ACS_RARROW 0x2b + > arrow pointing right |
| 3912 |
ACS_LARROW 0x2c , < arrow pointing left |
| 3913 |
ACS_UARROW 0x2d \- \*^ arrow pointing up |
| 3914 |
ACS_DARROW 0x2e . v arrow pointing down |
| 3915 |
ACS_BLOCK 0x30 0 # solid square block |
| 3916 |
ACS_DIAMOND 0x60 \(ga + diamond |
| 3917 |
ACS_CKBOARD 0x61 a : checker board (stipple) |
| 3918 |
ACS_DEGREE 0x66 f \e degree symbol |
| 3919 |
ACS_PLMINUS 0x67 g # plus/minus |
| 3920 |
ACS_BOARD 0x68 h # board of squares |
| 3921 |
ACS_LANTERN 0x69 i # lantern symbol |
| 3922 |
ACS_LRCORNER 0x6a j + lower right corner |
| 3923 |
ACS_URCORNER 0x6b k + upper right corner |
| 3924 |
ACS_ULCORNER 0x6c l + upper left corner |
| 3925 |
ACS_LLCORNER 0x6d m + lower left corner |
| 3926 |
ACS_PLUS 0x6e n + large plus or crossover |
| 3927 |
ACS_S1 0x6f o \*~ scan line 1 |
| 3928 |
ACS_S3 0x70 p \- scan line 3 |
| 3929 |
ACS_HLINE 0x71 q \- horizontal line |
| 3930 |
ACS_S7 0x72 r \- scan line 7 |
| 3931 |
ACS_S9 0x73 s \&_ scan line 9 |
| 3932 |
ACS_LTEE 0x74 t + tee pointing right |
| 3933 |
ACS_RTEE 0x75 u + tee pointing left |
| 3934 |
ACS_BTEE 0x76 v + tee pointing up |
| 3935 |
ACS_TTEE 0x77 w + tee pointing down |
| 3936 |
ACS_VLINE 0x78 x | vertical line |
| 3937 |
ACS_LEQUAL 0x79 y < less-than-or-equal-to |
| 3938 |
ACS_GEQUAL 0x7a z > greater-than-or-equal-to |
| 3939 |
ACS_PI 0x7b { * greek pi |
| 3940 |
ACS_NEQUAL 0x7c | ! not-equal |
| 3941 |
ACS_STERLING 0x7d } f UK pound sign |
| 3942 |
ACS_BULLET 0x7e \*~ o bullet |
| 3943 |
.TE |
| 3944 |
.PP |
| 3945 |
A few notes apply to the table itself: |
| 3946 |
.bP |
| 3947 |
X/Open Curses incorrectly states that the mapping for \fIlantern\fP is |
| 3948 |
uppercase \*(``I\*('' although Unix implementations use the |
| 3949 |
lowercase \*(``i\*('' mapping. |
| 3950 |
.bP |
| 3951 |
The DEC VT100 implemented graphics using the alternate character set |
| 3952 |
feature, temporarily switching \fImodes\fP and sending characters |
| 3953 |
in the range 0x60 (96) to 0x7e (126) |
| 3954 |
(the \fBacsc Value\fP column in the table). |
| 3955 |
.bP |
| 3956 |
The AT&T terminal added graphics characters outside that range. |
| 3957 |
.IP |
| 3958 |
Some of the characters within the range do not match the VT100; |
| 3959 |
presumably they were used in the AT&T terminal: |
| 3960 |
\fIboard of squares\fP replaces the VT100 \fInewline\fP symbol, while |
| 3961 |
\fIlantern symbol\fP replaces the VT100 \fIvertical tab\fP symbol. |
| 3962 |
The other VT100 symbols for control characters (\fIhorizontal tab\fP, |
| 3963 |
\fIcarriage return\fP and \fIline-feed\fP) are not (re)used in curses. |
| 3964 |
.PP |
| 3965 |
The best way to define a new device's graphics set is to add a column |
| 3966 |
to a copy of this table for your terminal, giving the character which |
| 3967 |
(when emitted between \fBsmacs\fP/\fBrmacs\fP switches) will be rendered |
| 3968 |
as the corresponding graphic. |
| 3969 |
Then read off the VT100/your terminal |
| 3970 |
character pairs right to left in sequence; these become the ACSC string. |
| 3971 |
.SS "Color Handling" |
| 3972 |
The |
| 3973 |
.I curses |
| 3974 |
library functions |
| 3975 |
.B \%init_pair |
| 3976 |
and |
| 3977 |
.B \%init_color |
| 3978 |
manipulate the |
| 3979 |
.I "color pairs" |
| 3980 |
and |
| 3981 |
.I colors |
| 3982 |
(color values or indices, |
| 3983 |
such as \*(``1=red\*('') |
| 3984 |
discussed in this section |
| 3985 |
(see \fB\%color\fP(3NCURSES) for details on these and related functions). |
| 3986 |
.PP |
| 3987 |
Most color terminals are either \*(``Tektronix-like\*('' |
| 3988 |
or \*(``HP-like\*('' |
| 3989 |
in their approach to color management. |
| 3990 |
.bP |
| 3991 |
.I Tektronix-like |
| 3992 |
terminals define a set of |
| 3993 |
.I n |
| 3994 |
colors |
| 3995 |
(where |
| 3996 |
.I n |
| 3997 |
is usually 8), |
| 3998 |
and can alter |
| 3999 |
character-cell foreground and background colors independently, |
| 4000 |
mixing them into |
| 4001 |
.IR n \(mu n |
| 4002 |
color pairs. |
| 4003 |
ANSI-standard terminals are Tektronix-like. |
| 4004 |
.bP |
| 4005 |
On |
| 4006 |
.I HP-like |
| 4007 |
terminals, |
| 4008 |
the user must set up each color pair separately; |
| 4009 |
foreground and background are not independently alterable. |
| 4010 |
Up to |
| 4011 |
.I m |
| 4012 |
color pairs may be configured from |
| 4013 |
.RI 2\(mu m |
| 4014 |
different colors. |
| 4015 |
.PP |
| 4016 |
Some basic color management capabilities |
| 4017 |
are independent of the color encoding method. |
| 4018 |
The numeric capabilities |
| 4019 |
.B \%max_colors |
| 4020 |
.RB ( \%colors ) |
| 4021 |
and |
| 4022 |
.B \%max_pairs |
| 4023 |
.RB ( \%pairs ) |
| 4024 |
specify the maximum numbers of colors |
| 4025 |
and color pairs that the device can display simultaneously. |
| 4026 |
The |
| 4027 |
.B \%orig_pair |
| 4028 |
.RB ( \%op ) |
| 4029 |
(\*(``original pair\*('') |
| 4030 |
string capability |
| 4031 |
resets foreground and background colors |
| 4032 |
to their default values for the terminal. |
| 4033 |
The |
| 4034 |
.B \%orig_colors |
| 4035 |
.RB ( \%oc ) |
| 4036 |
(\*(``original colors\*('') |
| 4037 |
string capability |
| 4038 |
resets all colors or color pairs |
| 4039 |
to their default values for the terminal. |
| 4040 |
Some terminal types |
| 4041 |
(including many PC terminal emulators) |
| 4042 |
erase screen areas with the current background color rather |
| 4043 |
than the power-up default background; |
| 4044 |
these should declare the Boolean capability |
| 4045 |
.B \%back_color_erase |
| 4046 |
.RB ( bce ). |
| 4047 |
.PP |
| 4048 |
While the |
| 4049 |
.I curses |
| 4050 |
library works with \fIcolor pairs\fP |
| 4051 |
(reflecting the inability of some devices to set foreground |
| 4052 |
and background colors independently), |
| 4053 |
there are separate capabilities for setting these features: |
| 4054 |
.bP |
| 4055 |
To change the current foreground or background color on a Tektronix-type |
| 4056 |
terminal, use \fBsetaf\fP (set ANSI foreground) and \fBsetab\fP (set ANSI |
| 4057 |
background) or \fBsetf\fP (set foreground) and \fBsetb\fP (set background). |
| 4058 |
These take one parameter, the color number. |
| 4059 |
The SVr4 documentation describes |
| 4060 |
only \fBsetaf\fP/\fBsetab\fP; the XPG4 draft says that "If the terminal |
| 4061 |
supports ANSI escape sequences to set background and foreground, they should |
| 4062 |
be coded as \fBsetaf\fP and \fBsetab\fP, respectively. |
| 4063 |
.bP |
| 4064 |
If the terminal |
| 4065 |
supports other escape sequences to set background and foreground, they should |
| 4066 |
be coded as \fBsetf\fP and \fBsetb\fP, respectively. |
| 4067 |
The \fBvidputs\fP and the \fBrefresh\fP(3NCURSES) functions |
| 4068 |
use the \fBsetaf\fP and \fBsetab\fP capabilities if they are defined. |
| 4069 |
.PP |
| 4070 |
The \fBsetaf\fP/\fBsetab\fP and \fBsetf\fP/\fBsetb\fP capabilities take a |
| 4071 |
single numeric argument each. |
| 4072 |
Argument values 0-7 of \fBsetaf\fP/\fBsetab\fP are portably defined as |
| 4073 |
follows (the middle column is the symbolic #define available in the header for |
| 4074 |
the \fBcurses\fP or \fI\%ncurses\fP libraries). |
| 4075 |
The terminal hardware is free to |
| 4076 |
map these as it likes, but the RGB values indicate normal locations in color |
| 4077 |
space. |
| 4078 |
.PP |
| 4079 |
.TS |
| 4080 |
center; |
| 4081 |
Cb Cb Cb Cb S S |
| 4082 |
L Lb C L1 L1 L . |
| 4083 |
Color #define Value RGB |
| 4084 |
_ |
| 4085 |
black COLOR_BLACK 0 0, 0, 0 |
| 4086 |
red COLOR_RED 1 max, 0, 0 |
| 4087 |
green COLOR_GREEN 2 0, max, 0 |
| 4088 |
yellow COLOR_YELLOW 3 max, max, 0 |
| 4089 |
blue COLOR_BLUE 4 0, 0, max |
| 4090 |
magenta COLOR_MAGENTA 5 max, 0, max |
| 4091 |
cyan COLOR_CYAN 6 0, max, max |
| 4092 |
white COLOR_WHITE 7 max, max, max |
| 4093 |
.TE |
| 4094 |
.br |
| 4095 |
.if t .ne 6v |
| 4096 |
.PP |
| 4097 |
The argument values of \fBsetf\fP/\fBsetb\fP historically correspond to |
| 4098 |
a different mapping, i.e., |
| 4099 |
.PP |
| 4100 |
.TS |
| 4101 |
center; |
| 4102 |
Cb Cb Cb Cb S S |
| 4103 |
L Lb C L1 L1 L . |
| 4104 |
Color #define Value RGB |
| 4105 |
_ |
| 4106 |
black COLOR_BLACK 0 0, 0, 0 |
| 4107 |
blue COLOR_BLUE 1 0, 0, max |
| 4108 |
green COLOR_GREEN 2 0, max, 0 |
| 4109 |
cyan COLOR_CYAN 3 0, max, max |
| 4110 |
red COLOR_RED 4 max, 0, 0 |
| 4111 |
magenta COLOR_MAGENTA 5 max, 0, max |
| 4112 |
yellow COLOR_YELLOW 6 max, max, 0 |
| 4113 |
white COLOR_WHITE 7 max, max, max |
| 4114 |
.TE |
| 4115 |
.PP |
| 4116 |
It is important to not confuse the two sets of color capabilities; |
| 4117 |
otherwise red/blue will be interchanged on the display. |
| 4118 |
.PP |
| 4119 |
On an HP-like terminal, use \fBscp\fP with a color pair number parameter to set |
| 4120 |
which color pair is current. |
| 4121 |
.PP |
| 4122 |
Some terminals allow the \fIcolor values\fP to be modified: |
| 4123 |
.bP |
| 4124 |
On a Tektronix-like terminal, the capability \fBccc\fP may be present to |
| 4125 |
indicate that colors can be modified. |
| 4126 |
If so, the \fBinitc\fP capability will |
| 4127 |
take a color number (0 to \fBcolors\fP \- 1)and three more parameters which |
| 4128 |
describe the color. |
| 4129 |
These three parameters default to being interpreted as RGB |
| 4130 |
(Red, Green, Blue) values. |
| 4131 |
If the Boolean capability \fBhls\fP is present, |
| 4132 |
they are instead as HLS (Hue, Lightness, Saturation) indices. |
| 4133 |
The ranges are |
| 4134 |
terminal-dependent. |
| 4135 |
.bP |
| 4136 |
On an HP-like terminal, \fBinitp\fP may give a capability for changing a |
| 4137 |
color pair value. |
| 4138 |
It will take seven parameters; a color pair number (0 to |
| 4139 |
\fBmax_pairs\fP \- 1), and two triples describing first background and then |
| 4140 |
foreground colors. |
| 4141 |
These parameters must be (Red, Green, Blue) or |
| 4142 |
(Hue, Lightness, Saturation) depending on \fBhls\fP. |
| 4143 |
.PP |
| 4144 |
On some color terminals, colors collide with highlights. |
| 4145 |
You can register |
| 4146 |
these collisions with the \fBncv\fP capability. |
| 4147 |
This is a bit mask of |
| 4148 |
attributes not to be used when colors are enabled. |
| 4149 |
The correspondence with the |
| 4150 |
attributes understood by \fBcurses\fP is as follows: |
| 4151 |
.PP |
| 4152 |
.TS |
| 4153 |
center; |
| 4154 |
Cb Cb Cb Cb |
| 4155 |
Lb N N Lb. |
| 4156 |
Attribute Bit Decimal Set by |
| 4157 |
_ |
| 4158 |
A_STANDOUT 0 1 sgr |
| 4159 |
A_UNDERLINE 1 2 sgr |
| 4160 |
A_REVERSE 2 4 sgr |
| 4161 |
A_BLINK 3 8 sgr |
| 4162 |
A_DIM 4 16 sgr |
| 4163 |
A_BOLD 5 32 sgr |
| 4164 |
A_INVIS 6 64 sgr |
| 4165 |
A_PROTECT 7 128 sgr |
| 4166 |
A_ALTCHARSET 8 256 sgr |
| 4167 |
A_HORIZONTAL 9 512 sgr1 |
| 4168 |
A_LEFT 10 1024 sgr1 |
| 4169 |
A_LOW 11 2048 sgr1 |
| 4170 |
A_RIGHT 12 4096 sgr1 |
| 4171 |
A_TOP 13 8192 sgr1 |
| 4172 |
A_VERTICAL 14 16384 sgr1 |
| 4173 |
A_ITALIC 15 32768 sitm |
| 4174 |
.TE |
| 4175 |
.PP |
| 4176 |
For example, on many IBM PC consoles, the underline attribute collides with the |
| 4177 |
foreground color blue and is not available in color mode. |
| 4178 |
These should have |
| 4179 |
an \fBncv\fP capability of 2. |
| 4180 |
.PP |
| 4181 |
SVr4 curses does nothing with \fBncv\fP, |
| 4182 |
\fI\%ncurses\fP recognizes it and optimizes |
| 4183 |
the output in favor of colors. |
| 4184 |
.SS Miscellaneous |
| 4185 |
If the terminal requires other than a null (zero) character as a pad, then this |
| 4186 |
can be given as pad. |
| 4187 |
Only the first character of the pad string is used. |
| 4188 |
If the terminal does not have a pad character, specify npc. |
| 4189 |
Note that \fI\%ncurses\fP implements the termcap-compatible \fBPC\fP |
| 4190 |
variable; |
| 4191 |
though the application may set this value to something other than |
| 4192 |
a null, |
| 4193 |
\fI\%ncurses\fP will test \fBnpc\fP first and use napms if the terminal |
| 4194 |
has no pad character. |
| 4195 |
.PP |
| 4196 |
If the terminal can move up or down half a line, |
| 4197 |
this can be indicated with |
| 4198 |
.B hu |
| 4199 |
(half-line up) |
| 4200 |
and |
| 4201 |
.B hd |
| 4202 |
(half-line down). |
| 4203 |
This is primarily useful for superscripts and subscripts on hard-copy terminals. |
| 4204 |
If a hard-copy terminal can eject to the next page (form feed), give this as |
| 4205 |
.B ff |
| 4206 |
(usually control/L). |
| 4207 |
.PP |
| 4208 |
If there is a command to repeat a given character a given number of |
| 4209 |
times (to save time transmitting a large number of identical characters) |
| 4210 |
this can be indicated with the parameterized string |
| 4211 |
.BR rep . |
| 4212 |
The first parameter is the character to be repeated and the second |
| 4213 |
is the number of times to repeat it. |
| 4214 |
Thus, tparm(repeat_char, \*'x\*', 10) is the same as \*(``xxxxxxxxxx\*(''. |
| 4215 |
.PP |
| 4216 |
If the terminal has a settable command character, |
| 4217 |
such as the \s-1TEKTRONIX\s+1 4025, |
| 4218 |
this can be indicated with |
| 4219 |
.BR cmdch . |
| 4220 |
A prototype command character is chosen which is used in all capabilities. |
| 4221 |
This character is given in the |
| 4222 |
.B cmdch |
| 4223 |
capability to identify it. |
| 4224 |
The following convention is supported on some Unix systems: |
| 4225 |
The environment is to be searched for a |
| 4226 |
.B CC |
| 4227 |
variable, and if found, all |
| 4228 |
occurrences of the prototype character are replaced with the character |
| 4229 |
in the environment variable. |
| 4230 |
.PP |
| 4231 |
Terminal descriptions that do not represent a specific kind of known |
| 4232 |
terminal, such as |
| 4233 |
.IR switch , |
| 4234 |
.IR dialup , |
| 4235 |
.IR patch , |
| 4236 |
and |
| 4237 |
.IR network , |
| 4238 |
should include the |
| 4239 |
.B gn |
| 4240 |
(generic) capability so that programs can complain that they do not know |
| 4241 |
how to talk to the terminal. |
| 4242 |
(This capability does not apply to |
| 4243 |
.I virtual |
| 4244 |
terminal descriptions for which the escape sequences are known.) |
| 4245 |
.PP |
| 4246 |
If the terminal has a \*(``meta key\*('' which acts as a shift key, |
| 4247 |
setting the 8th bit of any character transmitted, this fact can |
| 4248 |
be indicated with |
| 4249 |
.BR km . |
| 4250 |
Otherwise, software will assume that the 8th bit is parity and it |
| 4251 |
will usually be cleared. |
| 4252 |
If strings exist to turn this \*(``meta mode\*('' on and off, they |
| 4253 |
can be given as |
| 4254 |
.B smm |
| 4255 |
and |
| 4256 |
.BR rmm . |
| 4257 |
.PP |
| 4258 |
If the terminal has more lines of memory than will fit on the screen |
| 4259 |
at once, the number of lines of memory can be indicated with |
| 4260 |
.BR lm . |
| 4261 |
A value of |
| 4262 |
.BR lm #0 |
| 4263 |
indicates that the number of lines is not fixed, |
| 4264 |
but that there is still more memory than fits on the screen. |
| 4265 |
.PP |
| 4266 |
If the terminal is one of those supported by the Unix virtual |
| 4267 |
terminal protocol, the terminal number can be given as |
| 4268 |
.BR vt . |
| 4269 |
.PP |
| 4270 |
Media copy |
| 4271 |
strings which control an auxiliary printer connected to the terminal |
| 4272 |
can be given as |
| 4273 |
.BR mc0 : |
| 4274 |
print the contents of the screen, |
| 4275 |
.BR mc4 : |
| 4276 |
turn off the printer, and |
| 4277 |
.BR mc5 : |
| 4278 |
turn on the printer. |
| 4279 |
When the printer is on, all text sent to the terminal will be sent |
| 4280 |
to the printer. |
| 4281 |
It is undefined whether the text is also displayed on the terminal screen |
| 4282 |
when the printer is on. |
| 4283 |
A variation |
| 4284 |
.B mc5p |
| 4285 |
takes one parameter, and leaves the printer on for as many characters |
| 4286 |
as the value of the parameter, then turns the printer off. |
| 4287 |
The parameter should not exceed 255. |
| 4288 |
All text, including |
| 4289 |
.BR mc4 , |
| 4290 |
is transparently passed to the printer while an |
| 4291 |
.B mc5p |
| 4292 |
is in effect. |
| 4293 |
.SS "Glitches and Brain Damage" |
| 4294 |
Hazeltine terminals, |
| 4295 |
which do not allow \*(``\*~\*('' characters to be displayed should |
| 4296 |
indicate \fBhz\fP. |
| 4297 |
.PP |
| 4298 |
Terminals which ignore a line-feed immediately after an \fBam\fP wrap, |
| 4299 |
such as the Concept and vt100, |
| 4300 |
should indicate \fBxenl\fP. |
| 4301 |
.PP |
| 4302 |
If |
| 4303 |
.B el |
| 4304 |
is required to get rid of standout |
| 4305 |
(instead of merely writing normal text on top of it), |
| 4306 |
\fBxhp\fP should be given. |
| 4307 |
.PP |
| 4308 |
Teleray terminals, where tabs turn all characters moved over to blanks, |
| 4309 |
should indicate \fBxt\fP (destructive tabs). |
| 4310 |
Note: the variable indicating this is now \*(``dest_tabs_magic_smso\*(''; in |
| 4311 |
older versions, it was teleray_glitch. |
| 4312 |
This glitch is also taken to mean that it is not possible to position |
| 4313 |
the cursor on top of a \*(``magic cookie\*('', |
| 4314 |
that to erase standout mode it is instead necessary to use |
| 4315 |
delete and insert line. |
| 4316 |
The \fI\%ncurses\fP implementation ignores this glitch. |
| 4317 |
.PP |
| 4318 |
The Beehive Superbee, which is unable to correctly transmit the escape |
| 4319 |
or control/C characters, has |
| 4320 |
.BR xsb , |
| 4321 |
indicating that the f1 key is used for escape and f2 for control/C. |
| 4322 |
(Only certain Superbees have this problem, depending on the ROM.) |
| 4323 |
Note that in older terminfo versions, this capability was called |
| 4324 |
\*(``beehive_glitch\*(''; it is now \*(``no_esc_ctl_c\*(''. |
| 4325 |
.PP |
| 4326 |
Other specific terminal problems may be corrected by adding more |
| 4327 |
capabilities of the form \fBx\fIx\fR. |
| 4328 |
.SS "Pitfalls of Long Entries" |
| 4329 |
Long terminfo entries are unlikely to be a problem; to date, no entry has even |
| 4330 |
approached terminfo's 4096-byte string-table maximum. |
| 4331 |
Unfortunately, the termcap |
| 4332 |
translations are much more strictly limited (to 1023 bytes), |
| 4333 |
thus termcap translations of long terminfo entries can cause problems. |
| 4334 |
.PP |
| 4335 |
The man pages for 4.3BSD |
| 4336 |
and older versions of \fBtgetent\fP instruct the user to |
| 4337 |
allocate a 1024-byte buffer for the termcap entry. |
| 4338 |
The entry gets null-terminated by |
| 4339 |
the termcap library, so that makes the maximum safe length for a termcap entry |
| 4340 |
1k\-1 (1023) bytes. |
| 4341 |
Depending on what the application and the termcap library being used does, |
| 4342 |
and where in the termcap file the terminal type that \fBtgetent\fP |
| 4343 |
is searching for is, several bad things can happen: |
| 4344 |
.bP |
| 4345 |
some termcap libraries print a warning message, |
| 4346 |
.bP |
| 4347 |
some exit if they find an entry that's longer than 1023 bytes, |
| 4348 |
.bP |
| 4349 |
some neither exit nor warn, doing nothing useful, and |
| 4350 |
.bP |
| 4351 |
some simply truncate the entries to 1023 bytes. |
| 4352 |
.PP |
| 4353 |
Some application programs allocate more than |
| 4354 |
the recommended 1K for the termcap entry; others do not. |
| 4355 |
.PP |
| 4356 |
Each termcap entry has two important sizes associated with it: before |
| 4357 |
\*(``tc\*('' expansion, and after \*(``tc\*('' expansion. |
| 4358 |
\*(``tc\*('' is the capability that |
| 4359 |
tacks on another termcap entry to the end of the current one, to add |
| 4360 |
on its capabilities. |
| 4361 |
If a termcap entry does not use the \*(``tc\*('' |
| 4362 |
capability, then of course the two lengths are the same. |
| 4363 |
.PP |
| 4364 |
The \*(``before tc expansion\*('' length is the most important one, because it |
| 4365 |
affects more than just users of that particular terminal. |
| 4366 |
This is the |
| 4367 |
length of the entry as it exists in /etc/termcap, minus the |
| 4368 |
backslash-newline pairs, which \fBtgetent\fP strips out while reading it. |
| 4369 |
Some termcap libraries strip off the final newline, too (GNU termcap does not). |
| 4370 |
Now suppose: |
| 4371 |
.bP |
| 4372 |
a termcap entry before expansion is more than 1023 bytes long, |
| 4373 |
.bP |
| 4374 |
and the application has only allocated a 1k buffer, |
| 4375 |
.bP |
| 4376 |
and the termcap library (like the one in BSD/OS 1.1 and GNU) reads |
| 4377 |
the whole entry into the buffer, no matter what its length, to see |
| 4378 |
if it is the entry it wants, |
| 4379 |
.bP |
| 4380 |
and \fBtgetent\fP is searching for a terminal type that either is the |
| 4381 |
long entry, appears in the termcap file after the long entry, or |
| 4382 |
does not appear in the file at all (so that \fBtgetent\fP has to search |
| 4383 |
the whole termcap file). |
| 4384 |
.PP |
| 4385 |
Then \fBtgetent\fP will overwrite memory, |
| 4386 |
perhaps its stack, |
| 4387 |
and probably core dump the program. |
| 4388 |
Programs like telnet are particularly vulnerable; modern telnets |
| 4389 |
pass along values like the terminal type automatically. |
| 4390 |
The results are almost |
| 4391 |
as undesirable with a termcap library, like SunOS 4.1.3 and Ultrix 4.4, that |
| 4392 |
prints warning messages when it reads an overly long termcap entry. |
| 4393 |
If a |
| 4394 |
termcap library truncates long entries, like OSF/1 3.0, it is immune to dying |
| 4395 |
here but will return incorrect data for the terminal. |
| 4396 |
.PP |
| 4397 |
The \*(``after tc expansion\*('' length will have a similar effect to the |
| 4398 |
above, but only for people who actually set \fITERM\fP to that terminal |
| 4399 |
type, since \fBtgetent\fP only does \*(``tc\*('' expansion once it is found the |
| 4400 |
terminal type it was looking for, not while searching. |
| 4401 |
.PP |
| 4402 |
In summary, a termcap entry that is longer than 1023 bytes can cause, |
| 4403 |
on various combinations of termcap libraries and applications, a core |
| 4404 |
dump, warnings, or incorrect operation. |
| 4405 |
If it is too long even before |
| 4406 |
\*(``tc\*('' expansion, it will have this effect even for users of some other |
| 4407 |
terminal types and users whose \fITERM\fP variable does not have a termcap |
| 4408 |
entry. |
| 4409 |
.PP |
| 4410 |
When in \-C (translate to termcap) mode, |
| 4411 |
the \fI\%ncurses\fP implementation of |
| 4412 |
\fBtic\fP(1) issues warning messages when the pre-tc length of a termcap |
| 4413 |
translation is too long. |
| 4414 |
The \-c (check) option also checks resolved (after tc |
| 4415 |
expansion) lengths. |
| 4416 |
.SH FILES |
| 4417 |
.TP |
| 4418 |
.I /etc/terminfo |
| 4419 |
compiled terminal description database directory |
| 4420 |
.SH EXTENSIONS |
| 4421 |
Searching for terminal descriptions in |
| 4422 |
\fI$HOME/.terminfo\fP and \fI\%TERMINFO_DIRS\fP |
| 4423 |
is not supported by older implementations. |
| 4424 |
.PP |
| 4425 |
Some SVr4 \fBcurses\fP implementations, and all previous to SVr4, do not |
| 4426 |
interpret the %A and %O operators in parameter strings. |
| 4427 |
.PP |
| 4428 |
SVr4/XPG4 do not specify whether \fBmsgr\fP licenses movement while in |
| 4429 |
an alternate-character-set mode (such modes may, among other things, map |
| 4430 |
CR and NL to characters that do not trigger local motions). |
| 4431 |
The \fI\%ncurses\fP implementation ignores \fBmsgr\fP in |
| 4432 |
\fBALTCHARSET\fP mode. |
| 4433 |
This raises the possibility that an XPG4 |
| 4434 |
implementation making the opposite interpretation may need terminfo |
| 4435 |
entries made for \fI\%ncurses\fP to have \fBmsgr\fP turned off. |
| 4436 |
.PP |
| 4437 |
The \fI\%ncurses\fP library handles insert-character and |
| 4438 |
insert-character modes in a slightly non-standard way to get better |
| 4439 |
update efficiency. |
| 4440 |
See |
| 4441 |
the \fBInsert/Delete Character\fP subsection above. |
| 4442 |
.PP |
| 4443 |
The parameter substitutions for \fBset_clock\fP and \fBdisplay_clock\fP are |
| 4444 |
not documented in SVr4 or X/Open Curses. |
| 4445 |
They are deduced from the |
| 4446 |
documentation for the AT&T 505 terminal. |
| 4447 |
.PP |
| 4448 |
Be careful assigning the \fBkmous\fP capability. |
| 4449 |
The \fI\%ncurses\fP library wants to interpret it as \fBKEY_MOUSE\fP, |
| 4450 |
for use by terminals and emulators like xterm |
| 4451 |
that can return mouse-tracking information in the keyboard-input stream. |
| 4452 |
.PP |
| 4453 |
X/Open Curses does not mention italics. |
| 4454 |
Portable applications must assume that numeric capabilities are |
| 4455 |
signed 16-bit values. |
| 4456 |
This includes the \fIno_color_video\fP (\fBncv\fP) capability. |
| 4457 |
The 32768 mask value used for italics with \fBncv\fP can be confused with |
| 4458 |
an absent or canceled \fBncv\fP. |
| 4459 |
If italics should work with colors, |
| 4460 |
then the \fBncv\fP value must be specified, even if it is zero. |
| 4461 |
.PP |
| 4462 |
Different commercial ports of \fI\%terminfo\fP and \fIcurses\fP support |
| 4463 |
different subsets of X/Open Curses and |
| 4464 |
(in some cases) |
| 4465 |
different extensions. |
| 4466 |
Here is a summary, |
| 4467 |
accurate as of October 1995, |
| 4468 |
after which the commercial Unix market contracted and lost diversity. |
| 4469 |
.bP |
| 4470 |
SVr4, |
| 4471 |
Solaris, |
| 4472 |
and \fI\%ncurses\fP support all SVr4 capabilities. |
| 4473 |
.bP |
| 4474 |
IRIX supports the SVr4 set and adds one undocumented extended string |
| 4475 |
capability \%(\fBset_pglen\fP). |
| 4476 |
.bP |
| 4477 |
SVr1 and Ultrix support a restricted subset of \fI\%terminfo\fP |
| 4478 |
capabilities. |
| 4479 |
The Booleans end with \fB\%xon_xoff\fP; |
| 4480 |
the numerics with \fB\%width_status_line\fP; |
| 4481 |
and the strings with \fB\%prtr_non\fP. |
| 4482 |
.bP |
| 4483 |
HP/UX supports the SVr1 subset, |
| 4484 |
plus the SVr[234] numerics |
| 4485 |
\fB\%num_labels\fP, |
| 4486 |
\fB\%label_height\fP, |
| 4487 |
\fB\%label_width\fP, |
| 4488 |
plus function keys 11 through 63, |
| 4489 |
plus |
| 4490 |
\fB\%plab_norm\fP, |
| 4491 |
\fB\%label_on\fP, |
| 4492 |
and |
| 4493 |
\fB\%label_off\fP, |
| 4494 |
plus a number of incompatible string table extensions. |
| 4495 |
.bP |
| 4496 |
AIX supports the SVr1 subset, |
| 4497 |
plus function keys 11 through 63, |
| 4498 |
plus a number of incompatible string table extensions. |
| 4499 |
.bP |
| 4500 |
OSF/1 supports both the SVr4 set and the AIX extensions. |
| 4501 |
.SH PORTABILITY |
| 4502 |
Do not count on compiled (binary) \fI\%terminfo\fP entries being |
| 4503 |
portable between commercial Unix systems. |
| 4504 |
At least two implementations of \fI\%terminfo\fP |
| 4505 |
(those of HP-UX and AIX) |
| 4506 |
diverged from those of other System V Unices after SVr1, |
| 4507 |
adding extension capabilities to the string table that |
| 4508 |
(in the binary format) |
| 4509 |
collide with subsequent System V and X/Open Curses extensions. |
| 4510 |
.SH AUTHORS |
| 4511 |
Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. |
| 4512 |
Based on \fIpcurses\fP by Pavel Curtis. |
| 4513 |
.SH SEE ALSO |
| 4514 |
\fB\%infocmp\fP(1), |
| 4515 |
\fB\%tabs\fP(1), |
| 4516 |
\fB\%tic\fP(1), |
| 4517 |
\fB\%ncurses\fP(3NCURSES), |
| 4518 |
\fB\%color\fP(3NCURSES), |
| 4519 |
\fB\%terminfo\fP(3NCURSES), |
| 4520 |
\fB\%curses_variables\fP(3NCURSES), |
| 4521 |
\fB\%printf\fP(3), |
| 4522 |
\fB\%terminfo_variables\fP(3NCURSES), |
| 4523 |
\fB\%term\fP(5), |
| 4524 |
\fB\%user_caps\fP(5) |