Debian Codegraph @

upstream/debian-trixie/man5/terminfo.5

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