Debian Codegraph @

upstream/mageia-cauldron/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 /usr/share/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 \fBcurses\fP(3X).
74 It is also used via low-level calls by non-curses applications
75 which may be screen-oriented (such as \fBclear\fP(1))
76 or non-screen (such as \fBtabs\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 20250802).
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 \fBlongname\fP(3X)),
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 \fBterm\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(3X) with the
293 parameters listed.
294 .IP
295 If the description lists no parameters,
296 passing the string to \fB\%tparm\fP(3X) 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.158 2025/04/05 21:56:26 Branden.Robinson 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 \fBuse_extended_names\fP(3X) 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 .nf
2350 \s-2ansi|ansi/pc\-term compatible with color,
2351 am, mc5i, mir, msgr,
2352 colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64,
2353 acsc=+\e020\e,\e021\-\e030.\*^Y0\e333\(ga\e004a\e261f\e370g\e361h\e260
2354 j\e331k\e277l\e332m\e300n\e305o\*~p\e304q\e304r\e304s_t\e303
2355 u\e264v\e301w\e302x\e263y\e363z\e362{\e343|\e330}\e234\*~\e376,
2356 bel=\*^G, blink=\eE[5m, bold=\eE[1m, cbt=\eE[Z, clear=\eE[H\eE[J,
2357 cr=\*^M, cub=\eE[%p1%dD, cub1=\eE[D, cud=\eE[%p1%dB, cud1=\eE[B,
2358 cuf=\eE[%p1%dC, cuf1=\eE[C, cup=\eE[%i%p1%d;%p2%dH,
2359 cuu=\eE[%p1%dA, cuu1=\eE[A, dch=\eE[%p1%dP, dch1=\eE[P,
2360 dl=\eE[%p1%dM, dl1=\eE[M, ech=\eE[%p1%dX, ed=\eE[J, el=\eE[K,
2361 el1=\eE[1K, home=\eE[H, hpa=\eE[%i%p1%dG, ht=\eE[I, hts=\eEH,
2362 ich=\eE[%p1%d@, il=\eE[%p1%dL, il1=\eE[L, ind=\*^J,
2363 indn=\eE[%p1%dS, invis=\eE[8m, kbs=\*^H, kcbt=\eE[Z, kcub1=\eE[D,
2364 kcud1=\eE[B, kcuf1=\eE[C, kcuu1=\eE[A, khome=\eE[H, kich1=\eE[L,
2365 mc4=\eE[4i, mc5=\eE[5i, nel=\er\eE[S, op=\eE[39;49m,
2366 rep=%p1%c\eE[%p2%{1}%\-%db, rev=\eE[7m, rin=\eE[%p1%dT,
2367 rmacs=\eE[10m, rmpch=\eE[10m, rmso=\eE[m, rmul=\eE[m,
2368 s0ds=\eE(B, s1ds=\eE)B, s2ds=\eE*B, s3ds=\eE+B,
2369 setab=\eE[4%p1%dm, setaf=\eE[3%p1%dm,
2370 sgr=\eE[0;10%?%p1%t;7%;
2371 %?%p2%t;4%;
2372 %?%p3%t;7%;
2373 %?%p4%t;5%;
2374 %?%p6%t;1%;
2375 %?%p7%t;8%;
2376 %?%p9%t;11%;m,
2377 sgr0=\eE[0;10m, smacs=\eE[11m, smpch=\eE[11m, smso=\eE[7m,
2378 smul=\eE[4m, tbc=\eE[3g, u6=\eE[%i%d;%dR, u7=\eE[6n,
2379 u8=\eE[?%[;0123456789]c, u9=\eE[c, vpa=\eE[%i%p1%dd,
2380 .fi
2381 .EE
2382 .PP
2383 Entries may continue onto multiple lines by placing white space at
2384 the beginning of each line except the first.
2385 Comments may be included on lines beginning with \*(``#\*(''.
2386 Capabilities in
2387 .I terminfo
2388 are of three types:
2389 .bP
2390 Boolean capabilities which indicate that the terminal has
2391 some particular feature,
2392 .bP
2393 numeric capabilities giving the size of the terminal
2394 or the size of particular delays, and
2395 .bP
2396 string
2397 capabilities, which give a sequence which can be used to perform particular
2398 terminal operations.
2399 .SS "Types of Capabilities"
2400 All capabilities have names.
2401 For instance, the fact that
2402 ANSI-standard terminals have
2403 .I "automatic margins"
2404 (i.e., an automatic return and line-feed
2405 when the end of a line is reached) is indicated by the capability \fBam\fP.
2406 Hence the description of ansi includes \fBam\fP.
2407 Numeric capabilities are followed by the character \*(``#\*(''
2408 and then a positive value.
2409 Thus \fBcols\fP, which indicates the number of columns the terminal has,
2410 gives the value \*(``80\*('' for ansi.
2411 Values for numeric capabilities may be specified in
2412 decimal,
2413 octal, or
2414 hexadecimal,
2415 using the C programming language conventions
2416 (e.g., 255, 0377 and 0xff or 0xFF).
2417 .PP
2418 Finally, string valued capabilities,
2419 such as \fBel\fP (clear to end of line sequence)
2420 are given by the two-character code,
2421 an \*(``=\*('', and then
2422 a string ending at the next following \*(``,\*(''.
2423 .PP
2424 A number of escape sequences are provided in the string valued capabilities
2425 for easy encoding of characters there:
2426 .bP
2427 Both \fB\eE\fP and \fB\ee\fP
2428 map to an \s-1ESCAPE\s0 character,
2429 .bP
2430 \fB\*^\f(BIx\fR maps to a control-\fIx\fP for any appropriate \fIx\fP,
2431 and
2432 .bP
2433 the sequences
2434 .RS 6
2435 .PP
2436 \fB\en\fP, \fB\el\fP, \fB\er\fP, \fB\et\fP, \fB\eb\fP, \fB\ef\fP, and \fB\es\fP
2437 .RE
2438 .IP
2439 produce
2440 .RS 6
2441 .PP
2442 \fInewline\fP, \fIline-feed\fP, \fIreturn\fP, \fItab\fP, \fIbackspace\fP, \fIform-feed\fP, and \fIspace\fP,
2443 .RE
2444 .IP
2445 respectively.
2446 .PP
2447 X/Open Curses does not say what \*(``appropriate \fIx\fP\*('' might be.
2448 In practice, that is a printable ASCII graphic character.
2449 The special case \*(``\*^?\*('' is interpreted as DEL (127).
2450 In all other cases,
2451 the character value is logically \*(``and\*(''-ed with 0x1f,
2452 mapping to ASCII control codes in the range 0 through 31.
2453 .PP
2454 Other escapes include
2455 .bP
2456 \fB\e\*^\fP for \fB\*^\fP,
2457 .bP
2458 \fB\e\e\fP for \fB\e\fP,
2459 .bP
2460 \fB\e\fP, for comma,
2461 .bP
2462 \fB\e:\fP for \fB:\fP,
2463 .bP
2464 and \fB\e0\fP for null.
2465 .IP
2466 \fB\e0\fP will produce \e200, which does not terminate a string but behaves
2467 as a null character on most terminals, providing CS7 is specified.
2468 See \fBstty\fP(1).
2469 .IP
2470 The reason for this quirk is to maintain binary compatibility of the
2471 compiled terminfo files with other implementations,
2472 e.g., the SVr4 systems, which document this.
2473 Compiled terminfo files use null-terminated strings, with no lengths.
2474 Modifying this would require a new binary format,
2475 which would not work with other implementations.
2476 .PP
2477 Finally, characters may be given as three octal digits after a \fB\e\fP.
2478 .PP
2479 A delay in milliseconds may appear anywhere in a string capability, enclosed in
2480 $<..> brackets, as in \fBel\fP=\eEK$<5>,
2481 and padding characters are supplied by \fBtputs\fP(3X)
2482 to provide this delay.
2483 .bP
2484 The delay must be a number with at most one decimal
2485 place of precision;
2486 it may be followed by suffixes \*(``*\*('' or \*(``/\*('' or both.
2487 .bP
2488 A \*(``*\*(''
2489 indicates that the padding required is proportional to the number of lines
2490 affected by the operation, and the amount given is the per-affected-unit
2491 padding required.
2492 (In the case of insert character, the factor is still the
2493 number of \fIlines\fP affected.)
2494 .IP
2495 Normally, padding is advisory if the device has the \fBxon\fP
2496 capability; it is used for cost computation but does not trigger delays.
2497 .bP
2498 A \*(``/\*(''
2499 suffix indicates that the padding is mandatory and forces a delay of the given
2500 number of milliseconds even on devices for which \fBxon\fP is present to
2501 indicate flow control.
2502 .PP
2503 Sometimes individual capabilities must be commented out.
2504 To do this, put a period before the capability name.
2505 For example, see the second
2506 .B ind
2507 in the example above.
2508 .br
2509 .ne 5
2510 .SS "Fetching Compiled Descriptions"
2511 Terminal descriptions in \fI\%ncurses\fP are stored in terminal
2512 databases.
2513 These databases, which are found by their pathname,
2514 may be configured either as directory trees or hashed databases
2515 (see \fBterm\fR(5)),
2516 .PP
2517 The library uses a compiled-in list of pathnames,
2518 which can be overridden by environment variables.
2519 Before starting to search,
2520 \fI\%ncurses\fP checks the search list,
2521 eliminating duplicates and pathnames where no terminal database is found.
2522 The \fI\%ncurses\fP library reads the first description
2523 which passes its consistency checks.
2524 .bP
2525 The environment variable \fBTERMINFO\fR is checked first, for
2526 a terminal database containing the terminal description.
2527 .bP
2528 Next,
2529 \fI\%ncurses\fP looks in \fI$HOME/.terminfo\fP
2530 for a compiled description.
2531 .IP
2532 This is an optional feature which may be omitted entirely from
2533 the library, or limited to prevent accidental use by privileged applications.
2534 .bP
2535 Next,
2536 if the environment variable \fI\%TERMINFO_DIRS\fP is set,
2537 \fI\%ncurses\fP interprets the contents of that variable
2538 as a list of colon-separated pathnames of terminal databases to be searched.
2539 .IP
2540 An empty pathname (i.e., if the variable begins or ends
2541 with a colon, or contains adjacent colons)
2542 is interpreted as the system location \fI/usr/share/terminfo\fP.
2543 .bP
2544 Finally, \fI\%ncurses\fP searches these compiled-in locations:
2545 .RS
2546 .bP
2547 a list of directories (/usr/share/terminfo), and
2548 .bP
2549 the system terminfo directory, \fI/usr/share/terminfo\fP
2550 .RE
2551 .PP
2552 The \fBTERMINFO\fP variable can contain a terminal description instead
2553 of the pathname of a terminal database.
2554 If this variable begins with \*(``hex:\*('' or \*(``b64:\*(''
2555 then \fI\%ncurses\fP reads a terminal description from
2556 hexadecimal- or base64-encoded data,
2557 and if that description matches the name sought, will use that.
2558 This encoded data can be set using the \*(``\-Q\*('' option of
2559 \fBtic\fR or \fBinfocmp\fR.
2560 .PP
2561 The preceding addresses the usual configuration of \fI\%ncurses\fP,
2562 which uses terminal descriptions prepared in \fIterminfo\fP format.
2563 While \fItermcap\fP is less expressive,
2564 \fI\%ncurses\fP can also be configured to read \fItermcap\fP
2565 descriptions.
2566 In that configuration,
2567 it checks the \fI\%TERMCAP\fP and \fI\%TERMPATH\fP variables
2568 (for content and search path,
2569 respectively)
2570 after the system terminal database.
2571 .SS "Preparing Descriptions"
2572 We now outline how to prepare descriptions of terminals.
2573 The most effective way to prepare a terminal description is by imitating
2574 the description of a similar terminal in
2575 .I terminfo
2576 and to build up a description gradually, using partial descriptions
2577 with
2578 .I vi
2579 or some other screen-oriented program to check that they are correct.
2580 Be aware that a very unusual terminal may expose deficiencies in
2581 the ability of the
2582 .I terminfo
2583 file to describe it
2584 or bugs in the screen-handling code of the test program.
2585 .PP
2586 To get the padding for insert line right (if the terminal manufacturer
2587 did not document it) a severe test is to edit a large file at 9600 baud,
2588 delete 16 or so lines from the middle of the screen, then hit the \*(``u\*(''
2589 key several times quickly.
2590 If the terminal messes up, more padding is usually needed.
2591 A similar test can be used for insert character.
2592 .SS "Basic Capabilities"
2593 The number of columns on each line for the terminal is given by the
2594 \fBcols\fP numeric capability.
2595 If the terminal is a \s-1CRT\s0, then the
2596 number of lines on the screen is given by the \fBlines\fP capability.
2597 If the terminal wraps around to the beginning of the next line when
2598 it reaches the right margin, then it should have the \fBam\fP capability.
2599 If the terminal can clear its screen, leaving the cursor in the home
2600 position, then this is given by the \fBclear\fP string capability.
2601 If the terminal overstrikes
2602 (rather than clearing a position when a character is struck over)
2603 then it should have the \fBos\fP capability.
2604 If the terminal is a printing terminal, with no soft copy unit,
2605 give it both
2606 .B hc
2607 and
2608 .BR os .
2609 .RB ( os
2610 applies to storage scope terminals, such as \s-1TEKTRONIX\s+1 4010
2611 series, as well as hard copy and APL terminals.)
2612 If there is a code to move the cursor to the left edge of the current
2613 line, give this as
2614 .BR cr .
2615 (Normally this will be carriage return, control/M.)
2616 If there is a code to produce an audible signal (bell, beep, etc)
2617 give this as
2618 .BR bel .
2619 .PP
2620 If there is a code to move the cursor one position to the left
2621 (such as backspace) that capability should be given as
2622 .BR cub1 .
2623 Similarly, codes to move to the right, up, and down should be
2624 given as
2625 .BR cuf1 ,
2626 .BR cuu1 ,
2627 and
2628 .BR cud1 .
2629 These local cursor motions should not alter the text they pass over,
2630 for example, you would not normally use \*(``\fBcuf1\fP=\ \*('' because the
2631 space would erase the character moved over.
2632 .PP
2633 A very important point here is that the local cursor motions encoded
2634 in
2635 .I terminfo
2636 are undefined at the left and top edges of a \s-1CRT\s0 terminal.
2637 Programs should never attempt to backspace around the left edge,
2638 unless
2639 .B bw
2640 is given,
2641 and never attempt to go up locally off the top.
2642 In order to scroll text up, a program will go to the bottom left corner
2643 of the screen and send the
2644 .B ind
2645 (index) string.
2646 .PP
2647 To scroll text down, a program goes to the top left corner
2648 of the screen and sends the
2649 .B ri
2650 (reverse index) string.
2651 The strings
2652 .B ind
2653 and
2654 .B ri
2655 are undefined when not on their respective corners of the screen.
2656 .PP
2657 Parameterized versions of the scrolling sequences are
2658 .B indn
2659 and
2660 .B rin
2661 which have the same semantics as
2662 .B ind
2663 and
2664 .B ri
2665 except that they take one parameter, and scroll that many lines.
2666 They are also undefined except at the appropriate edge of the screen.
2667 .PP
2668 The \fBam\fP capability tells whether the cursor sticks at the right
2669 edge of the screen when text is output, but this does not necessarily
2670 apply to a
2671 .B cuf1
2672 from the last column.
2673 The only local motion which is defined from the left edge is if
2674 .B bw
2675 is given, then a
2676 .B cub1
2677 from the left edge will move to the right edge of the previous line.
2678 If
2679 .B bw
2680 is not given, the effect is undefined.
2681 This is useful for drawing a box around the edge of the screen, for example.
2682 If the terminal has switch selectable automatic margins,
2683 the
2684 .I terminfo
2685 file usually assumes that this is on; i.e., \fBam\fP.
2686 If the terminal has a command which moves to the first column of the next
2687 line, that command can be given as
2688 .B nel
2689 (newline).
2690 It does not matter if the command clears the remainder of the current line,
2691 so if the terminal has no
2692 .B cr
2693 and
2694 .B lf
2695 it may still be possible to craft a working
2696 .B nel
2697 out of one or both of them.
2698 .PP
2699 These capabilities suffice to describe
2700 hard-copy and \*(``glass-tty\*('' terminals.
2701 Thus the model 33 teletype is described as
2702 .PP
2703 .EX
2704 .\".in -2
2705 \s-133\||\|tty33\||\|tty\||\|model 33 teletype,
2706 bel=\*^G, cols#72, cr=\*^M, cud1=\*^J, hc, ind=\*^J, os,\s+1
2707 .\".in +2
2708 .EE
2709 .PP
2710 while the Lear Siegler \s-1ADM-3\s0 is described as
2711 .PP
2712 .EX
2713 .nf
2714 .\".in -2
2715 \s-1adm3\||\|3\||\|lsi adm3,
2716 am, bel=\*^G, clear=\*^Z, cols#80, cr=\*^M, cub1=\*^H, cud1=\*^J,
2717 ind=\*^J, lines#24,\s+1
2718 .\".in +2
2719 .fi
2720 .EE
2721 .SS "Parameterized Strings"
2722 Cursor addressing and other strings requiring parameters
2723 in the terminal are described by a
2724 parameterized string capability,
2725 with \fIprintf\fP-like escapes such as \fI%x\fP in it.
2726 For example, to address the cursor, the
2727 .B cup
2728 capability is given, using two parameters:
2729 the line and column to address to.
2730 (Lines and columns are numbered from zero and refer to the
2731 physical screen visible to the user, not to any unseen memory.)
2732 If the terminal has memory relative cursor addressing,
2733 that can be indicated by
2734 .BR mrcup .
2735 .PP
2736 The parameter mechanism uses a stack and special \fB%\fP codes
2737 to manipulate it.
2738 Typically a sequence will push one of the
2739 parameters onto the stack and then print it in some format.
2740 Print (e.g., \*(``%d\*('') is a special case.
2741 Other operations, including \*(``%t\*('' pop their operand from the stack.
2742 It is noted that more complex operations are often necessary,
2743 e.g., in the \fBsgr\fP string.
2744 .PP
2745 The \fB%\fP encodings have the following meanings:
2746 .TP 5
2747 \fB%%\fP
2748 outputs \*(``%\*(''
2749 .TP
2750 \fB%\fI[[\fR:\fI]flags][width[.precision]][\fBdoxXs\fI]\fR
2751 as in \fBprintf\fP(3), flags are \fI[\-+#]\fP and \fIspace\fP.
2752 Use a \*(``:\*('' to allow the next character to be a \*(``\-\*('' flag,
2753 avoiding interpreting \*(``%\-\*('' as an operator.
2754 .TP
2755 \fB%c\fP
2756 print \fIpop()\fP like %c in \fBprintf\fP
2757 .TP
2758 \fB%s\fP
2759 print \fIpop()\fP like %s in \fBprintf\fP
2760 .TP
2761 \fB%p\fI[1\-9]\fR
2762 push \fIi\fP'th parameter
2763 .TP
2764 \fB%P\fI[a\-z]\fR
2765 set dynamic variable \fI[a\-z]\fP to \fIpop()\fP
2766 .TP
2767 \fB%g\fI[a\-z]\fR
2768 get dynamic variable \fI[a\-z]\fP and push it
2769 .TP
2770 \fB%P\fI[A\-Z]\fR
2771 set static variable \fI[a\-z]\fP to \fIpop()\fP
2772 .TP
2773 \fB%g\fI[A\-Z]\fR
2774 get static variable \fI[a\-z]\fP and push it
2775 .IP
2776 The terms \*(``static\*('' and \*(``dynamic\*('' are misleading.
2777 Historically, these are simply two different sets of variables,
2778 whose values are not reset between calls to \fBtparm\fP(3X).
2779 However, that fact is not documented in other implementations.
2780 Relying on it will adversely impact portability to other implementations:
2781 .RS
2782 .bP
2783 SVr2 curses supported \fIdynamic\fP variables.
2784 Those are set only by a \fB%P\fP operator.
2785 A \fB%g\fP for a given variable without first setting it with \fB%P\fP
2786 will give unpredictable results, because dynamic variables are
2787 an uninitialized local array on the stack in the \fBtparm\fP function.
2788 .bP
2789 SVr3.2 curses supported \fIstatic\fP variables.
2790 Those are an array in the \fI\%TERMINAL\fP
2791 structure (declared in \fBterm.h\fP),
2792 and are zeroed automatically when the \fBsetupterm\fP function
2793 allocates the data.
2794 .bP
2795 SVr4 curses made no further improvements
2796 to the \fIdynamic/static\fP variable feature.
2797 .bP
2798 Solaris XPG4 curses does not distinguish between \fIdynamic\fP and
2799 \fIstatic\fP variables.
2800 They are the same.
2801 Like SVr4 curses, XPG4 curses does not initialize these explicitly.
2802 .bP
2803 Before version 6.3,
2804 \fI\%ncurses\fP stores both \fIdynamic\fP and \fIstatic\fP
2805 variables in persistent storage, initialized to zeros.
2806 .bP
2807 Beginning with version 6.3,
2808 \fI\%ncurses\fP stores \fIstatic\fP and \fIdynamic\fP
2809 variables in the same manner as SVr4.
2810 .RS
2811 .bP
2812 Unlike other implementations, \fI\%ncurses\fP zeros dynamic variables
2813 before the first \fB%g\fP or \fB%P\fP operator.
2814 .bP
2815 Like SVr2,
2816 the scope of dynamic variables in \fI\%ncurses\fP
2817 is within the current call to
2818 \fBtparm\fP.
2819 Use static variables if persistent storage is needed.
2820 .RE
2821 .RE
2822 .TP
2823 \fB%\*'\fIc\fB\*'\fR
2824 char constant \fIc\fP
2825 .TP
2826 \fB%{\fInn\fB}\fR
2827 integer constant \fInn\fP
2828 .TP
2829 \fB%l\fP
2830 push strlen(pop)
2831 .TP
2832 \fB%+\fP, \fB%\-\fP, \fB%*\fP, \fB%/\fP, \fB%m\fP
2833 arithmetic (%m is \fImod\fP): \fIpush(pop() op pop())\fP
2834 .TP
2835 \fB%&\fP, \fB%|\fP, \fB%\*^\fP
2836 bit operations
2837 (\*(``and\*('', \*(``or\*('' and exclusive \*(``or\*(''):
2838 \fIpush(pop() op pop())\fP
2839 .TP
2840 \fB%=\fP, \fB%>\fP, \fB%<\fP
2841 logical operations: \fIpush(pop() op pop())\fP
2842 .TP
2843 \fB%A\fP, \fB%O\fP
2844 logical \*(``and\*('' and \*(``or\*('' operations (for conditionals)
2845 .TP
2846 \fB%!\fP, \fB%\*~\fP
2847 unary operations (logical and bit complement): \fIpush(op pop())\fP
2848 .TP
2849 \fB%i\fP
2850 add 1 to first two parameters (for ANSI terminals)
2851 .TP
2852 \fB%?\fP \fIexpr\fP \fB%t\fP \fIthenpart\fP \fB%e\fP \fIelsepart\fP \fB%;\fP
2853 This forms an if-then-else.
2854 The \fB%e\fP \fIelsepart\fP is optional.
2855 Usually the \fB%?\fP \fIexpr\fP part pushes a value onto the stack,
2856 and \fB%t\fP pops it from the stack, testing if it is nonzero (true).
2857 If it is zero (false), control passes to the \fB%e\fP (else) part.
2858 .IP
2859 It is possible to form else-if's a la Algol 68:
2860 .RS
2861 \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
2862 .RE
2863 .IP
2864 where c\di\u are conditions, b\di\u are bodies.
2865 .IP
2866 Use the \fB\-f\fP option of \fBtic\fP or \fBinfocmp\fP to see
2867 the structure of if-then-else's.
2868 Some strings, e.g., \fBsgr\fP can be very complicated when written
2869 on one line.
2870 The \fB\-f\fP option splits the string into lines with the parts indented.
2871 .PP
2872 Binary operations are in postfix form with the operands in the usual order.
2873 That is, to get x\-5 one would use \*(``%gx%{5}%\-\*(''.
2874 \fB%P\fP and \fB%g\fP variables are
2875 persistent across escape-string evaluations.
2876 .PP
2877 Consider the HP2645, which, to get to line 3 and column 12, needs
2878 to be sent \eE&a12c03Y padded for 6 milliseconds.
2879 The order of the lines and columns is inverted here,
2880 and the lines and column are printed as two digits.
2881 The corresponding terminal description is expressed thus:
2882 .RS
2883 cup=\eE&a%p2%dc%p1%dY$<6>,
2884 .RE
2885 .PP
2886 The Microterm \s-1ACT-IV\s0 needs the current line and column sent
2887 preceded by a \fB\*^T\fP, with the line and column simply encoded in binary,
2888 .RS
2889 cup=\*^T%p1%c%p2%c
2890 .RE
2891 .PP
2892 Terminals which use \*(``%c\*('' need to be able to
2893 backspace the cursor (\fBcub1\fP),
2894 and to move the cursor up one line on the screen (\fBcuu1\fP).
2895 This is necessary because it is not always safe to transmit \fB\en\fP
2896 \fB\*^D\fP and \fB\er\fP, as the system may change or discard them.
2897 (The library routines dealing with terminfo set tty modes so that
2898 tabs are never expanded, so \et is safe to send.
2899 This turns out to be essential for the Ann Arbor 4080.)
2900 .PP
2901 A final example is the LSI ADM-3A,
2902 which uses line and column offset by a space,
2903 thus
2904 .RS
2905 .EX
2906 cup=\eE=%p1%\*' \*'%+%c%p2%\*' \*'%+%c
2907 .EE
2908 .RE
2909 .PP
2910 After sending \*(``\eE=\*('', this pushes the first parameter, pushes the
2911 ASCII value for a space (32), adds them (pushing the sum on the stack
2912 in place of the two previous values) and outputs that value as a character.
2913 Then the same is done for the second parameter.
2914 More complex arithmetic is possible using the stack.
2915 .SS "Cursor Motions"
2916 If the terminal has a fast way to home the cursor
2917 (to very upper left corner of screen) then this can be given as
2918 \fBhome\fP; similarly a fast way of getting to the lower left-hand corner
2919 can be given as \fBll\fP; this may involve going up with \fBcuu1\fP
2920 from the home position,
2921 but a program should never do this itself (unless \fBll\fP does) because it
2922 can make no assumption about the effect of moving up from the home position.
2923 Note that the home position is the same as addressing to (0,0):
2924 to the top left corner of the screen, not of memory.
2925 (Thus, the \eEH sequence on HP terminals cannot be used for
2926 .BR home .)
2927 .PP
2928 If the terminal has line or column absolute cursor addressing,
2929 these can be given as single parameter capabilities
2930 .B hpa
2931 (horizontal position absolute)
2932 and
2933 .B vpa
2934 (vertical position absolute).
2935 Sometimes these are shorter than the more general two parameter
2936 sequence (as with the hp2645) and can be used in preference to
2937 .BR cup .
2938 If there are parameterized local motions (e.g., move
2939 .I n
2940 spaces to the right) these can be given as
2941 .BR cud ,
2942 .BR cub ,
2943 .BR cuf ,
2944 and
2945 .B cuu
2946 with a single parameter indicating how many spaces to move.
2947 These are primarily useful if the terminal does not have
2948 .BR cup ,
2949 such as the \s-1TEKTRONIX\s+1 4025.
2950 .PP
2951 If the terminal needs to be in a special mode when running
2952 a program that uses these capabilities,
2953 the codes to enter and exit this mode can be given
2954 as \fBsmcup\fP and \fBrmcup\fP.
2955 This arises, for example, from terminals like the Concept with more than
2956 one page of memory.
2957 If the terminal has only memory relative cursor addressing and not screen
2958 relative cursor addressing, a one screen-sized window must be fixed into
2959 the terminal for cursor addressing to work properly.
2960 This is also used for the \s-1TEKTRONIX\s+1 4025,
2961 where
2962 .B smcup
2963 sets the command character to be the one used by terminfo.
2964 If the \fBsmcup\fP sequence will not restore the screen after an
2965 \fBrmcup\fP sequence is output (to the state prior to outputting
2966 \fBrmcup\fP), specify \fBnrrmc\fP.
2967 .SS Margins
2968 SVr4 (and X/Open Curses)
2969 list several string capabilities for setting margins.
2970 Two were intended for use with terminals,
2971 and another six were intended for use with printers.
2972 .bP
2973 The two terminal capabilities assume that the terminal may have
2974 the capability of setting the left and/or right margin at the current
2975 cursor column position.
2976 .bP
2977 The printer capabilities assume that the printer may have
2978 two types of capability:
2979 .RS
2980 .bP
2981 the ability to set a top and/or bottom margin using the current
2982 line position, and
2983 .bP
2984 parameterized capabilities for setting the top, bottom, left, right margins
2985 given the number of lines or columns.
2986 .RE
2987 .PP
2988 In practice, the categorization into \*(``terminal\*('' and \*(``printer\*(''
2989 is not suitable:
2990 .bP
2991 The AT&T SVr4 terminal database uses \fBsmgl\fP four times,
2992 for AT&T hardware.
2993 .IP
2994 Three of the four are printers.
2995 They lack the ability to set left/right margins by specifying the column.
2996 .bP
2997 Other (non-AT&T) terminals may support margins
2998 but using different assumptions from AT&T.
2999 .IP
3000 For instance, the DEC VT420 supports left/right margins,
3001 but only using a column parameter.
3002 As an added complication, the VT420 uses two settings to fully enable
3003 left/right margins (left/right margin mode, and origin mode).
3004 The former enables the margins, which causes printed text
3005 to wrap within margins, but the latter is needed to prevent
3006 cursor-addressing outside those margins.
3007 .bP
3008 Both DEC VT420 left/right margins are set with a single control sequence.
3009 If either is omitted, the corresponding margin is set to the left or
3010 right edge of the display (rather than leaving the margin unmodified).
3011 .PP
3012 These are the margin-related capabilities:
3013 .PP
3014 .TS
3015 center;
3016 lb lb
3017 lb l .
3018 Name Description
3019 _
3020 smgl Set left margin at current column
3021 smgr Set right margin at current column
3022 smgb Set bottom margin at current line
3023 smgt Set top margin at current line
3024 smgbp Set bottom margin at line \fIN\fP
3025 smglp Set left margin at column \fIN\fP
3026 smgrp Set right margin at column \fIN\fP
3027 smgtp Set top margin at line \fIN\fP
3028 smglr Set both left and right margins to \fIL\fP and \fIR\fP
3029 smgtb Set both top and bottom margins to \fIT\fP and \fIB\fP
3030 .TE
3031 .PP
3032 When writing an application that
3033 uses these string capabilities,
3034 the pairs should be first checked to see
3035 if each capability in the pair is set or only one is set:
3036 .bP
3037 If both \fBsmglp\fP and \fBsmgrp\fP are set,
3038 each is used with a single argument, \fIN\fP,
3039 that gives the column number of the left and right margin, respectively.
3040 .bP
3041 If both \fBsmgtp\fP and \fBsmgbp\fP are set,
3042 each is used to set the top and bottom margin,
3043 respectively:
3044 .RS 4
3045 .bP
3046 \fBsmgtp\fP is used with a single argument, \fIN\fP,
3047 the line number of the top margin.
3048 .bP
3049 \fBsmgbp\fP is used with two arguments, \fIN\fP and \fIM\fP,
3050 that give the line number of the bottom margin,
3051 the first counting from the top of the
3052 page and the second counting from the bottom.
3053 This accommodates the two styles of specifying
3054 the bottom margin in different manufacturers' printers.
3055 .RE
3056 .IP
3057 When designing a terminfo entry for a
3058 printer that has a settable bottom margin,
3059 only the first or second argument should be used, depending on the printer.
3060 When developing an application that uses \fBsmgbp\fP to set the bottom margin,
3061 both arguments must be given.
3062 .PP
3063 Conversely, when only one capability in the pair is set:
3064 .bP
3065 If only one of \fBsmglp\fP and \fBsmgrp\fP is set,
3066 then it is used with two arguments,
3067 the column number of the left and right margins, in that order.
3068 .bP
3069 Likewise, if only one of \fBsmgtp\fP and \fBsmgbp\fP is set, then it
3070 is used with two arguments that give the top and bottom margins,
3071 in that order, counting from the top of the page.
3072 .IP
3073 When designing a terminfo entry for a printer that requires setting both
3074 left and right or top and bottom margins simultaneously,
3075 only one capability in the pairs
3076 \fBsmglp\fP and \fBsmgrp\fP or
3077 \fBsmgtp\fP and \fBsmgbp\fP should be defined,
3078 leaving the other unset.
3079 .PP
3080 Except for very old terminal descriptions, e.g., those developed for SVr4,
3081 the scheme just described should be considered obsolete.
3082 An improved set of capabilities was added late in the SVr4 releases
3083 (\fBsmglr\fP and \fBsmgtb\fP),
3084 which explicitly use two parameters for setting the left/right or top/bottom
3085 margins.
3086 .PP
3087 When setting margins, the line- and column-values are zero-based.
3088 .PP
3089 The \fBmgc\fP string capability should be defined.
3090 Applications such as \fBtabs\fP(1) rely upon this to reset all margins.
3091 .\"
3092 .SS "Area Clears"
3093 If the terminal can clear from the current position to the end of the
3094 line, leaving the cursor where it is, this should be given as \fBel\fP.
3095 If the terminal can clear from the beginning of the line to the current
3096 position inclusive, leaving
3097 the cursor where it is, this should be given as \fBel1\fP.
3098 If the terminal can clear from the current position to the end of the
3099 display, then this should be given as \fBed\fP.
3100 \fBEd\fP is only defined from the first column of a line.
3101 (Thus, it can be simulated by a request to delete a large number of lines,
3102 if a true
3103 .B ed
3104 is not available.)
3105 .\"
3106 .SS "Insert/Delete Line and Vertical Motions"
3107 If the terminal can open a new blank line before the line where the cursor
3108 is, this should be given as \fBil1\fP; this is done only from the first
3109 position of a line.
3110 The cursor must then appear on the newly blank line.
3111 If the terminal can delete the line which the cursor is on, then this
3112 should be given as \fBdl1\fP; this is done only from the first position on
3113 the line to be deleted.
3114 Versions of
3115 .B il1
3116 and
3117 .B dl1
3118 which take a single parameter and insert or delete that many lines can
3119 be given as
3120 .B il
3121 and
3122 .BR dl .
3123 .PP
3124 If the terminal has a settable scrolling region (like the vt100)
3125 the command to set this can be described with the
3126 .B csr
3127 capability, which takes two parameters:
3128 the top and bottom lines of the scrolling region.
3129 The cursor position is, alas, undefined after using this command.
3130 .PP
3131 It is possible to get the effect of insert or delete line using
3132 .B csr
3133 on a properly chosen region; the
3134 .B sc
3135 and
3136 .B rc
3137 (save and restore cursor) commands may be useful for ensuring that
3138 your synthesized insert/delete string does not move the cursor.
3139 (Note that the \fB\%ncurses\fP(3X) library does this synthesis
3140 automatically, so you need not compose insert/delete strings for
3141 an entry with \fBcsr\fP).
3142 .PP
3143 Yet another way to construct insert and delete might be to use a combination of
3144 index with the memory-lock feature found on some terminals (like the HP-700/90
3145 series, which however also has insert/delete).
3146 .PP
3147 Inserting lines at the top or bottom of the screen can also be
3148 done using
3149 .B ri
3150 or
3151 .B ind
3152 on many terminals without a true insert/delete line,
3153 and is often faster even on terminals with those features.
3154 .PP
3155 The Boolean \fBnon_dest_scroll_region\fP should be set if each scrolling
3156 window is effectively a view port on a screen-sized canvas.
3157 To test for
3158 this capability, create a scrolling region in the middle of the screen,
3159 write something to the bottom line, move the cursor to the top of the region,
3160 and do \fBri\fP followed by \fBdl1\fP or \fBind\fP.
3161 If the data scrolled
3162 off the bottom of the region by the \fBri\fP re-appears, then scrolling
3163 is non-destructive.
3164 System V and X/Open Curses expect that \fBind\fP, \fBri\fP,
3165 \fBindn\fP, and \fBrin\fP will simulate destructive scrolling; their
3166 documentation cautions you not to define \fBcsr\fP unless this is true.
3167 This \fBcurses\fP implementation is more liberal and will do explicit erases
3168 after scrolling if \fBndsrc\fP is defined.
3169 .PP
3170 If the terminal has the ability to define a window as part of
3171 memory, which all commands affect,
3172 it should be given as the parameterized string
3173 .BR wind .
3174 The four parameters are the starting and ending lines in memory
3175 and the starting and ending columns in memory, in that order.
3176 .PP
3177 If the terminal can retain display memory above, then the
3178 \fBda\fP capability should be given; if display memory can be retained
3179 below, then \fBdb\fP should be given.
3180 These indicate
3181 that deleting a line or scrolling may bring non-blank lines up from below
3182 or that scrolling back with \fBri\fP may bring down non-blank lines.
3183 .SS "Insert/Delete Character"
3184 There are two basic kinds of intelligent terminals with respect to
3185 insert/delete character which can be described using
3186 .IR terminfo .
3187 The most common insert/delete character operations affect only the characters
3188 on the current line and shift characters off the end of the line rigidly.
3189 Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make
3190 a distinction between typed and untyped blanks on the screen, shifting
3191 upon an insert or delete only to an untyped blank on the screen which is
3192 either eliminated, or expanded to two untyped blanks.
3193 .PP
3194 You can determine the
3195 kind of terminal you have by clearing the screen and then typing
3196 text separated by cursor motions.
3197 Type \*(``abc\ \ \ \ def\*('' using local
3198 cursor motions (not spaces) between the \*(``abc\*('' and the \*(``def\*(''.
3199 Then position the cursor before the \*(``abc\*('' and put the terminal in insert
3200 mode.
3201 If typing characters causes the rest of the line to shift
3202 rigidly and characters to fall off the end, then your terminal does
3203 not distinguish between blanks and untyped positions.
3204 If the \*(``abc\*(''
3205 shifts over to the \*(``def\*('' which then move together around the end of the
3206 current line and onto the next as you insert, you have the second type of
3207 terminal, and should give the capability \fBin\fP, which stands for
3208 \*(``insert null\*(''.
3209 .PP
3210 While these are two logically separate attributes (one line versus multi-line
3211 insert mode, and special treatment of untyped spaces) we have seen no
3212 terminals whose insert mode cannot be described with the single attribute.
3213 .PP
3214 Terminfo can describe both terminals which have an insert mode, and terminals
3215 which send a simple sequence to open a blank position on the current line.
3216 Give as \fBsmir\fP the sequence to get into insert mode.
3217 Give as \fBrmir\fP the sequence to leave insert mode.
3218 Now give as \fBich1\fP any sequence needed to be sent just before sending
3219 the character to be inserted.
3220 Most terminals with a true insert mode
3221 will not give \fBich1\fP; terminals which send a sequence to open a screen
3222 position should give it here.
3223 .PP
3224 If your terminal has both, insert mode is usually preferable to \fBich1\fP.
3225 Technically, you should not give both unless the terminal actually requires
3226 both to be used in combination.
3227 Accordingly, some non-curses applications get
3228 confused if both are present; the symptom is doubled characters in an update
3229 using insert.
3230 This requirement is now rare; most \fBich\fP sequences do not
3231 require previous smir, and most smir insert modes do not require \fBich1\fP
3232 before each character.
3233 Therefore, the new \fBcurses\fP actually assumes this
3234 is the case and uses either \fBrmir\fP/\fBsmir\fP or \fBich\fP/\fBich1\fP as
3235 appropriate (but not both).
3236 If you have to write an entry to be used under
3237 new curses for a terminal old enough to need both, include the
3238 \fBrmir\fP/\fBsmir\fP sequences in \fBich1\fP.
3239 .PP
3240 If post insert padding is needed, give this as a number of milliseconds
3241 in \fBip\fP (a string option).
3242 Any other sequence which may need to be
3243 sent after an insert of a single character may also be given in \fBip\fP.
3244 If your terminal needs both to be placed into an \*(``insert mode\*('' and
3245 a special code to precede each inserted character, then both
3246 .BR smir / rmir
3247 and
3248 .B ich1
3249 can be given, and both will be used.
3250 The
3251 .B ich
3252 capability, with one parameter,
3253 .IR n ,
3254 will repeat the effects of
3255 .B ich1
3256 .I n
3257 times.
3258 .PP
3259 If padding is necessary between characters typed while not
3260 in insert mode, give this as a number of milliseconds padding in \fBrmp\fP.
3261 .PP
3262 It is occasionally necessary to move around while in insert mode
3263 to delete characters on the same line (e.g., if there is a tab after
3264 the insertion position).
3265 If your terminal allows motion while in
3266 insert mode you can give the capability \fBmir\fP to speed up inserting
3267 in this case.
3268 Omitting \fBmir\fP will affect only speed.
3269 Some terminals
3270 (notably Datamedia's) must not have \fBmir\fP because of the way their
3271 insert mode works.
3272 .PP
3273 Finally, you can specify
3274 .B dch1
3275 to delete a single character,
3276 .B dch
3277 with one parameter,
3278 .IR n ,
3279 to delete
3280 .IR n " characters,"
3281 and delete mode by giving \fBsmdc\fP and \fBrmdc\fP
3282 to enter and exit delete mode (any mode the terminal needs to be placed
3283 in for
3284 .B dch1
3285 to work).
3286 .PP
3287 A command to erase
3288 .I n
3289 characters (equivalent to outputting
3290 .I n
3291 blanks without moving the cursor)
3292 can be given as
3293 .B ech
3294 with one parameter.
3295 .SS "Highlighting, Underlining, and Visible Bells"
3296 If your terminal has one or more kinds of display attributes,
3297 these can be represented in a number of different ways.
3298 You should choose one display form as
3299 \f2standout mode\fP,
3300 representing a good, high contrast, easy-on-the-eyes,
3301 format for highlighting error messages and other attention getters.
3302 (If you have a choice, reverse video plus half-bright is good,
3303 or reverse video alone.)
3304 The sequences to enter and exit standout mode
3305 are given as \fBsmso\fP and \fBrmso\fP, respectively.
3306 If the code to change into or out of standout
3307 mode leaves one or even two blank spaces on the screen,
3308 as the TVI 912 and Teleray 1061 do,
3309 then \fBxmc\fP should be given to tell how many spaces are left.
3310 .PP
3311 Codes to begin underlining and end underlining can be given as \fBsmul\fP
3312 and \fBrmul\fP respectively.
3313 If the terminal has a code to underline the current character and move
3314 the cursor one space to the right,
3315 such as the Microterm Mime,
3316 this can be given as \fBuc\fP.
3317 .PP
3318 Other capabilities to enter various highlighting modes include
3319 .B blink
3320 (blinking)
3321 .B bold
3322 (bold or extra bright)
3323 .B dim
3324 (dim or half-bright)
3325 .B invis
3326 (blanking or invisible text)
3327 .B prot
3328 (protected)
3329 .B rev
3330 (reverse video)
3331 .B sgr0
3332 (turn off
3333 .I all
3334 attribute modes)
3335 .B smacs
3336 (enter alternate character set mode)
3337 and
3338 .B rmacs
3339 (exit alternate character set mode).
3340 Turning on any of these modes singly may or may not turn off other modes.
3341 .PP
3342 If there is a sequence to set arbitrary combinations of modes,
3343 this should be given as
3344 .B sgr
3345 (set attributes),
3346 taking 9 parameters.
3347 Each parameter is either zero (0) or nonzero,
3348 as the corresponding attribute is on or off.
3349 The 9 parameters are, in order:
3350 standout, underline, reverse, blink, dim, bold, blank, protect, alternate
3351 character set.
3352 Not all modes need be supported by
3353 .BR sgr ,
3354 only those for which corresponding separate attribute commands exist.
3355 .PP
3356 For example, the DEC vt220 supports most of the modes:
3357 .PP
3358 .TS
3359 center;
3360 lb lb lb
3361 l l l .
3362 tparm Parameter Attribute Escape Sequence
3363 _
3364 none none \eE[0m
3365 p1 standout \eE[0;1;7m
3366 p2 underline \eE[0;4m
3367 p3 reverse \eE[0;7m
3368 p4 blink \eE[0;5m
3369 p5 dim not available
3370 p6 bold \eE[0;1m
3371 p7 invis \eE[0;8m
3372 p8 protect not used
3373 p9 altcharset \*^O (off) \*^N (on)
3374 .TE
3375 .PP
3376 We begin each escape sequence by turning off any existing modes, since
3377 there is no quick way to determine whether they are active.
3378 Standout is set up to be the combination of reverse and bold.
3379 The vt220 terminal has a protect mode,
3380 though it is not commonly used in sgr
3381 because it protects characters on the screen from the host's erasures.
3382 The altcharset mode also is different in that it is either \*^O or \*^N,
3383 depending on whether it is off or on.
3384 If all modes are turned on, the resulting sequence is \eE[0;1;4;5;7;8m\*^N.
3385 .PP
3386 Some sequences are common to different modes.
3387 For example, ;7 is output when either p1 or p3 is true, that is, if
3388 either standout or reverse modes are turned on.
3389 .PP
3390 Writing out the above sequences, along with their dependencies yields
3391 .PP
3392 .ne 11
3393 .TS
3394 center;
3395 lb lb lb
3396 l l l .
3397 Sequence When to Output terminfo Translation
3398 _
3399 \eE[0 always \eE[0
3400 ;1 if p1 or p6 %?%p1%p6%|%t;1%;
3401 ;4 if p2 %?%p2%|%t;4%;
3402 ;5 if p4 %?%p4%|%t;5%;
3403 ;7 if p1 or p3 %?%p1%p3%|%t;7%;
3404 ;8 if p7 %?%p7%|%t;8%;
3405 m always m
3406 \*^N or \*^O if p9 \*^N, else \*^O %?%p9%t\*^N%e\*^O%;
3407 .TE
3408 .PP
3409 Putting this all together into the sgr sequence gives:
3410 .PP
3411 .EX
3412 .nf
3413 sgr=\eE[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p4%t;5%;
3414 %?%p1%p3%|%t;7%;%?%p7%t;8%;m%?%p9%t\e016%e\e017%;,
3415 .fi
3416 .EE
3417 .PP
3418 Remember that if you specify sgr, you must also specify sgr0.
3419 Also, some implementations rely on sgr being given if sgr0 is,
3420 Not all terminfo entries necessarily have an sgr string, however.
3421 Many terminfo entries are derived from termcap entries
3422 which have no sgr string.
3423 The only drawback to adding an sgr string is that termcap also
3424 assumes that sgr0 does not exit alternate character set mode.
3425 .PP
3426 Terminals with the \*(``magic cookie\*('' glitch
3427 .RB ( xmc )
3428 deposit special \*(``cookies\*('' when they receive mode-setting sequences,
3429 which affect the display algorithm rather than having extra bits for
3430 each character.
3431 Some terminals, such as the HP 2621, automatically leave standout
3432 mode when they move to a new line or the cursor is addressed.
3433 Programs using standout mode should exit standout mode before
3434 moving the cursor or sending a newline,
3435 unless the
3436 .B msgr
3437 capability, asserting that it is safe to move in standout mode, is present.
3438 .PP
3439 If the terminal has
3440 a way of flashing the screen to indicate an error quietly (a bell replacement)
3441 then this can be given as \fBflash\fP; it must not move the cursor.
3442 .PP
3443 If the cursor needs to be made more visible than normal when it is
3444 not on the bottom line (to make, for example, a non-blinking underline into an
3445 easier to find block or blinking underline)
3446 give this sequence as
3447 .BR cvvis .
3448 If there is a way to make the cursor completely invisible, give that as
3449 .BR civis .
3450 The capability
3451 .B cnorm
3452 should be given which undoes the effects of both of these modes.
3453 .PP
3454 If your terminal correctly generates underlined characters
3455 (with no special codes needed)
3456 even though it does not overstrike,
3457 then you should give the capability \fBul\fP.
3458 If a character overstriking another leaves both characters on the screen,
3459 specify the capability \fBos\fP.
3460 If overstrikes are erasable with a blank,
3461 then this should be indicated by giving \fBeo\fP.
3462 .SS "Keypad and Function Keys"
3463 If the terminal has a keypad that transmits codes when the keys are pressed,
3464 this information can be given.
3465 Note that it is not possible to handle
3466 terminals where the keypad only works in local (this applies, for example,
3467 to the unshifted HP 2621 keys).
3468 If the keypad can be set to transmit or not transmit,
3469 give these codes as \fBsmkx\fP and \fBrmkx\fP.
3470 Otherwise the keypad is assumed to always transmit.
3471 .PP
3472 The codes sent by the left arrow, right arrow, up arrow, down arrow,
3473 and home keys can be given as
3474 \fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fP respectively.
3475 If there are function keys such as f0, f1, ..., f10, the codes they send
3476 can be given as \fBkf0, kf1, ..., kf10\fP.
3477 If these keys have labels other than the default f0 through f10, the labels
3478 can be given as \fBlf0, lf1, ..., lf10\fP.
3479 .PP
3480 The codes transmitted by certain other special keys can be given:
3481 .bP
3482 .B kll
3483 (home down),
3484 .bP
3485 .B kbs
3486 (backspace),
3487 .bP
3488 .B ktbc
3489 (clear all tabs),
3490 .bP
3491 .B kctab
3492 (clear the tab stop in this column),
3493 .bP
3494 .B kclr
3495 (clear screen or erase key),
3496 .bP
3497 .B kdch1
3498 (delete character),
3499 .bP
3500 .B kdl1
3501 (delete line),
3502 .bP
3503 .B krmir
3504 (exit insert mode),
3505 .bP
3506 .B kel
3507 (clear to end of line),
3508 .bP
3509 .B ked
3510 (clear to end of screen),
3511 .bP
3512 .B kich1
3513 (insert character or enter insert mode),
3514 .bP
3515 .B kil1
3516 (insert line),
3517 .bP
3518 .B knp
3519 (next page),
3520 .bP
3521 .B kpp
3522 (previous page),
3523 .bP
3524 .B kind
3525 (scroll forward/down),
3526 .bP
3527 .B kri
3528 (scroll backward/up),
3529 .bP
3530 .B khts
3531 (set a tab stop in this column).
3532 .PP
3533 In addition, if the keypad has a 3 by 3 array of keys including the four
3534 arrow keys, the other five keys can be given as
3535 .BR ka1 ,
3536 .BR ka3 ,
3537 .BR kb2 ,
3538 .BR kc1 ,
3539 and
3540 .BR kc3 .
3541 These keys are useful when the effects of a 3 by 3 directional pad are needed.
3542 .PP
3543 Strings to program function keys can be given as
3544 .BR pfkey ,
3545 .BR pfloc ,
3546 and
3547 .BR pfx .
3548 A string to program screen labels should be specified as \fBpln\fP.
3549 Each of these strings takes two parameters: the function key number to
3550 program (from 0 to 10) and the string to program it with.
3551 Function key numbers out of this range may program undefined keys in
3552 a terminal dependent manner.
3553 The difference between the capabilities is that
3554 .B pfkey
3555 causes pressing the given key to be the same as the user typing the
3556 given string;
3557 .B pfloc
3558 causes the string to be executed by the terminal in local; and
3559 .B pfx
3560 causes the string to be transmitted to the computer.
3561 .PP
3562 The capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fP
3563 define the number of programmable
3564 screen labels and their width and height.
3565 If there are commands to turn the labels on and off,
3566 give them in \fBsmln\fP and \fBrmln\fP.
3567 \fBsmln\fP is normally output after one or more pln
3568 sequences to make sure that the change becomes visible.
3569 .SS "Tabs and Initialization"
3570 A few capabilities are used only for tabs:
3571 .bP
3572 If the terminal has hardware tabs, the command to advance to the next
3573 tab stop can be given as
3574 .B ht
3575 (usually control/I).
3576 .bP
3577 A \*(``back-tab\*('' command which moves leftward to the preceding tab stop can
3578 be given as
3579 .BR cbt .
3580 .IP
3581 By convention, if the teletype modes indicate that tabs are being
3582 expanded by the computer rather than being sent to the terminal,
3583 programs should not use
3584 .B ht
3585 or
3586 .B cbt
3587 even if they are present, since the user may not have the tab stops
3588 properly set.
3589 .bP
3590 If the terminal has hardware tabs which are initially set every
3591 .I n
3592 spaces when the terminal is powered up,
3593 the numeric parameter
3594 .B it
3595 is given, showing the number of spaces the tabs are set to.
3596 .IP
3597 The \fBit\fP capability is normally used by the \fBtset\fP
3598 command to determine whether to set the mode for hardware tab expansion,
3599 and whether to set the tab stops.
3600 If the terminal has tab stops that can be saved in non-volatile memory,
3601 the terminfo description can assume that they are properly set.
3602 .PP
3603 Other capabilities
3604 include
3605 .bP
3606 .BR is1 ,
3607 .BR is2 ,
3608 and
3609 .BR is3 ,
3610 initialization strings for the terminal,
3611 .bP
3612 .BR iprog ,
3613 the path name of a program to be run to initialize the terminal,
3614 .bP
3615 and \fBif\fP, the name of a file containing long initialization strings.
3616 .PP
3617 These strings are expected to set the terminal into modes consistent
3618 with the rest of the terminfo description.
3619 They are normally sent to the terminal, by the
3620 .I init
3621 option of the \fBtput\fP program, each time the user logs in.
3622 They will be printed in the following order:
3623 .RS
3624 .TP
3625 run the program
3626 .B iprog
3627 .TP
3628 output
3629 .br
3630 \fBis1\fP and
3631 .br
3632 \fBis2\fP
3633 .TP
3634 set the margins using
3635 \fBmgc\fP or
3636 .br
3637 \fBsmglp\fP and \fBsmgrp\fP or
3638 .br
3639 \fBsmgl\fP and \fBsmgr\fP
3640 .TP
3641 set tabs using
3642 .B tbc
3643 and
3644 .B hts
3645 .TP
3646 print the file
3647 \fBif\fP
3648 .TP
3649 and finally output
3650 \fBis3\fP.
3651 .RE
3652 .PP
3653 Most initialization is done with
3654 .BR is2 .
3655 Special terminal modes can be set up without duplicating strings
3656 by putting the common sequences in
3657 .B is2
3658 and special cases in
3659 .B is1
3660 and
3661 .BR is3 .
3662 .PP
3663 A set of sequences that does a harder reset from a totally unknown state
3664 can be given as
3665 .BR rs1 ,
3666 .BR rs2 ,
3667 .B rf
3668 and
3669 .BR rs3 ,
3670 analogous to
3671 .B is1 ,
3672 .B is2 ,
3673 .B if
3674 and
3675 .B is3
3676 respectively.
3677 These strings are output
3678 by \fIreset\fP option of \fBtput\fP,
3679 or by the \fBreset\fP program
3680 (an alias of \fBtset\fP),
3681 which is used when the terminal gets into a wedged state.
3682 Commands are normally placed in
3683 .BR rs1 ,
3684 .B rs2
3685 .B rs3
3686 and
3687 .B rf
3688 only if they produce annoying effects on the screen and are not
3689 necessary when logging in.
3690 For example, the command to set the vt100 into 80-column mode would
3691 normally be part of
3692 .BR is2 ,
3693 but it causes an annoying glitch of the screen and is not normally
3694 needed since the terminal is usually already in 80-column mode.
3695 .PP
3696 The \fBreset\fP program writes strings including
3697 .BR iprog ,
3698 etc., in the same order as the
3699 .I init
3700 program, using
3701 .BR rs1 ,
3702 etc., instead of
3703 .BR is1 ,
3704 etc.
3705 If any of
3706 .BR rs1 ,
3707 .BR rs2 ,
3708 .BR rs3 ,
3709 or
3710 .B rf
3711 reset capability strings are missing,
3712 the \fBreset\fP program
3713 falls back upon the corresponding initialization capability string.
3714 .PP
3715 If there are commands to set and clear tab stops, they can be given as
3716 .B tbc
3717 (clear all tab stops)
3718 and
3719 .B hts
3720 (set a tab stop in the current column of every line).
3721 If a more complex sequence is needed to set the tabs than can be
3722 described by this, the sequence can be placed in
3723 .B is2
3724 or
3725 .BR if .
3726 .PP
3727 The \fBtput reset\fP command uses the same capability strings
3728 as the \fBreset\fP command,
3729 although the two programs (\fBtput\fP and \fBreset\fP)
3730 provide different command-line options.
3731 .PP
3732 In practice, these terminfo capabilities are not often used in
3733 initialization of tabs
3734 (though they are required for the \fBtabs\fP program):
3735 .bP
3736 Almost all hardware terminals (at least those which supported tabs)
3737 initialized those to every \fIeight\fP columns:
3738 .IP
3739 The only exception was the AT&T 2300 series,
3740 which set tabs to every \fIfive\fP columns.
3741 .bP
3742 In particular, developers of the hardware terminals which are commonly used
3743 as models for modern terminal emulators provided documentation demonstrating
3744 that \fIeight\fP columns were the standard.
3745 .bP
3746 Because of this, the terminal initialization programs
3747 \fBtput\fP and \fBtset\fP
3748 use the
3749 \fBtbc\fP (\fBclear_all_tabs\fP) and
3750 \fBhts\fP (\fBset_tab\fP) capabilities directly
3751 only when the \fBit\fP (\fBinit_tabs\fP) capability
3752 is set to a value other than \fIeight\fP.
3753 .SS "Delays and Padding"
3754 Many older and slower terminals do not support either XON/XOFF or DTR
3755 handshaking, including hard copy terminals and some very archaic CRTs
3756 (including, for example, DEC VT100s).
3757 These may require padding characters
3758 after certain cursor motions and screen changes.
3759 .PP
3760 If the terminal uses xon/xoff handshaking for flow control (that is,
3761 it automatically emits \*^S back to the host when its input buffers are
3762 close to full), set
3763 .BR xon .
3764 This capability suppresses the emission of padding.
3765 You can also set it
3766 for memory-mapped console devices effectively that do not have a speed limit.
3767 Padding information should still be included so that routines can
3768 make better decisions about relative costs, but actual pad characters will
3769 not be transmitted.
3770 .PP
3771 If \fBpb\fP (padding baud rate) is given, padding is suppressed at baud rates
3772 below the value of \fBpb\fP.
3773 If the entry has no padding baud rate, then
3774 whether padding is emitted or not is completely controlled by \fBxon\fP.
3775 .PP
3776 If the terminal requires other than a null (zero) character as a pad,
3777 then this can be given as \fBpad\fP.
3778 Only the first character of the
3779 .B pad
3780 string is used.
3781 .SS "Status Lines"
3782 Some terminals have an extra \*(``status line\*('' which is not normally used by
3783 software (and thus not counted in the terminal's \fBlines\fP capability).
3784 .PP
3785 The simplest case is a status line which is cursor-addressable but not
3786 part of the main scrolling region on the screen; the Heathkit H19 has
3787 a status line of this kind, as would a 24-line VT100 with a 23-line
3788 scrolling region set up on initialization.
3789 This situation is indicated
3790 by the \fBhs\fP capability.
3791 .PP
3792 Some terminals with status lines need special sequences to access the
3793 status line.
3794 These may be expressed as a string with single parameter
3795 \fBtsl\fP which takes the cursor to a given zero-origin column on the
3796 status line.
3797 The capability \fBfsl\fP must return to the main-screen
3798 cursor positions before the last \fBtsl\fP.
3799 You may need to embed the
3800 string values of \fBsc\fP (save cursor) and \fBrc\fP (restore cursor)
3801 in \fBtsl\fP and \fBfsl\fP to accomplish this.
3802 .PP
3803 The status line is normally assumed to be the same width as the width
3804 of the terminal.
3805 If this is untrue, you can specify it with the numeric
3806 capability \fBwsl\fP.
3807 .PP
3808 A command to erase or blank the status line may be specified as \fBdsl\fP.
3809 .PP
3810 The Boolean capability \fBeslok\fP specifies that escape sequences, tabs,
3811 etc., work ordinarily in the status line.
3812 .PP
3813 The \fI\%ncurses\fP implementation does not yet use any of these
3814 capabilities.
3815 They are documented here in case they ever become important.
3816 .SS "Line Graphics"
3817 Many terminals have alternate character sets useful for forms-drawing.
3818 Terminfo and \fBcurses\fP have built-in support
3819 for most of the drawing characters
3820 supported by the VT100, with some characters from the AT&T 4410v1 added.
3821 This alternate character set may be specified by the \fBacsc\fP capability.
3822 .PP
3823 .TS
3824 center;
3825 Lb Cb S L Lb
3826 Lb2 Lb2 Lb Lb1 S
3827 Lb L C Lb Lx.
3828 \& acsc \& \&
3829 ACS Name Value Symbol ASCII Fallback / Glyph Name
3830 _
3831 ACS_RARROW 0x2b + > arrow pointing right
3832 ACS_LARROW 0x2c , < arrow pointing left
3833 ACS_UARROW 0x2d \- \*^ arrow pointing up
3834 ACS_DARROW 0x2e . v arrow pointing down
3835 ACS_BLOCK 0x30 0 # solid square block
3836 ACS_DIAMOND 0x60 \(ga + diamond
3837 ACS_CKBOARD 0x61 a : checker board (stipple)
3838 ACS_DEGREE 0x66 f \e degree symbol
3839 ACS_PLMINUS 0x67 g # plus/minus
3840 ACS_BOARD 0x68 h # board of squares
3841 ACS_LANTERN 0x69 i # lantern symbol
3842 ACS_LRCORNER 0x6a j + lower right corner
3843 ACS_URCORNER 0x6b k + upper right corner
3844 ACS_ULCORNER 0x6c l + upper left corner
3845 ACS_LLCORNER 0x6d m + lower left corner
3846 ACS_PLUS 0x6e n + large plus or crossover
3847 ACS_S1 0x6f o \*~ scan line 1
3848 ACS_S3 0x70 p \- scan line 3
3849 ACS_HLINE 0x71 q \- horizontal line
3850 ACS_S7 0x72 r \- scan line 7
3851 ACS_S9 0x73 s \&_ scan line 9
3852 ACS_LTEE 0x74 t + tee pointing right
3853 ACS_RTEE 0x75 u + tee pointing left
3854 ACS_BTEE 0x76 v + tee pointing up
3855 ACS_TTEE 0x77 w + tee pointing down
3856 ACS_VLINE 0x78 x | vertical line
3857 ACS_LEQUAL 0x79 y < less-than-or-equal-to
3858 ACS_GEQUAL 0x7a z > greater-than-or-equal-to
3859 ACS_PI 0x7b { * greek pi
3860 ACS_NEQUAL 0x7c | ! not-equal
3861 ACS_STERLING 0x7d } f UK pound sign
3862 ACS_BULLET 0x7e \*~ o bullet
3863 .TE
3864 .PP
3865 A few notes apply to the table itself:
3866 .bP
3867 X/Open Curses incorrectly states that the mapping for \fIlantern\fP is
3868 uppercase \*(``I\*('' although Unix implementations use the
3869 lowercase \*(``i\*('' mapping.
3870 .bP
3871 The DEC VT100 implemented graphics using the alternate character set
3872 feature, temporarily switching \fImodes\fP and sending characters
3873 in the range 0x60 (96) to 0x7e (126)
3874 (the \fBacsc Value\fP column in the table).
3875 .bP
3876 The AT&T terminal added graphics characters outside that range.
3877 .IP
3878 Some of the characters within the range do not match the VT100;
3879 presumably they were used in the AT&T terminal:
3880 \fIboard of squares\fP replaces the VT100 \fInewline\fP symbol, while
3881 \fIlantern symbol\fP replaces the VT100 \fIvertical tab\fP symbol.
3882 The other VT100 symbols for control characters (\fIhorizontal tab\fP,
3883 \fIcarriage return\fP and \fIline-feed\fP) are not (re)used in curses.
3884 .PP
3885 The best way to define a new device's graphics set is to add a column
3886 to a copy of this table for your terminal, giving the character which
3887 (when emitted between \fBsmacs\fP/\fBrmacs\fP switches) will be rendered
3888 as the corresponding graphic.
3889 Then read off the VT100/your terminal
3890 character pairs right to left in sequence; these become the ACSC string.
3891 .SS "Color Handling"
3892 The curses library functions \fBinit_pair\fP and \fBinit_color\fP
3893 manipulate the \fIcolor pairs\fP and \fIcolor values\fP discussed in this
3894 section
3895 (see \fBcurs_color\fP(3X) for details on these and related functions).
3896 .PP
3897 Most color terminals are either \*(``Tektronix-like\*('' or \*(``HP-like\*('':
3898 .bP
3899 Tektronix-like
3900 terminals have a predefined set of \fIN\fP colors
3901 (where \fIN\fP is usually 8),
3902 and can set
3903 character-cell foreground and background colors independently,
3904 mixing them into \fIN\fP\ *\ \fIN\fP color pairs.
3905 .bP
3906 On HP-like terminals, the user must set each color
3907 pair up separately (foreground and background are not independently settable).
3908 Up to \fIM\fP color pairs may be set up from 2*\fIM\fP different colors.
3909 ANSI-compatible terminals are Tektronix-like.
3910 .PP
3911 Some basic color capabilities are independent of the color method.
3912 The numeric
3913 capabilities \fBcolors\fP and \fBpairs\fP specify the maximum numbers of colors
3914 and color pairs that can be displayed simultaneously.
3915 The \fBop\fP (original
3916 pair) string resets foreground and background colors to their default values
3917 for the terminal.
3918 The \fBoc\fP string resets all colors or color pairs to
3919 their default values for the terminal.
3920 Some terminals (including many PC
3921 terminal emulators) erase screen areas with the current background color rather
3922 than the power-up default background; these should have the Boolean capability
3923 \fBbce\fP.
3924 .PP
3925 While the curses library works with \fIcolor pairs\fP
3926 (reflecting the inability of some devices to set foreground
3927 and background colors independently),
3928 there are separate capabilities for setting these features:
3929 .bP
3930 To change the current foreground or background color on a Tektronix-type
3931 terminal, use \fBsetaf\fP (set ANSI foreground) and \fBsetab\fP (set ANSI
3932 background) or \fBsetf\fP (set foreground) and \fBsetb\fP (set background).
3933 These take one parameter, the color number.
3934 The SVr4 documentation describes
3935 only \fBsetaf\fP/\fBsetab\fP; the XPG4 draft says that "If the terminal
3936 supports ANSI escape sequences to set background and foreground, they should
3937 be coded as \fBsetaf\fP and \fBsetab\fP, respectively.
3938 .bP
3939 If the terminal
3940 supports other escape sequences to set background and foreground, they should
3941 be coded as \fBsetf\fP and \fBsetb\fP, respectively.
3942 The \fBvidputs\fP and the \fBrefresh\fP(3X) functions
3943 use the \fBsetaf\fP and \fBsetab\fP capabilities if they are defined.
3944 .PP
3945 The \fBsetaf\fP/\fBsetab\fP and \fBsetf\fP/\fBsetb\fP capabilities take a
3946 single numeric argument each.
3947 Argument values 0-7 of \fBsetaf\fP/\fBsetab\fP are portably defined as
3948 follows (the middle column is the symbolic #define available in the header for
3949 the \fBcurses\fP or \fI\%ncurses\fP libraries).
3950 The terminal hardware is free to
3951 map these as it likes, but the RGB values indicate normal locations in color
3952 space.
3953 .PP
3954 .TS
3955 center;
3956 cb cb cb cb s s
3957 l lb c l1 l1 l .
3958 Color #define Value RGB
3959 _
3960 black COLOR_BLACK 0 0, 0, 0
3961 red COLOR_RED 1 max, 0, 0
3962 green COLOR_GREEN 2 0, max, 0
3963 yellow COLOR_YELLOW 3 max, max, 0
3964 blue COLOR_BLUE 4 0, 0, max
3965 magenta COLOR_MAGENTA 5 max, 0, max
3966 cyan COLOR_CYAN 6 0, max, max
3967 white COLOR_WHITE 7 max, max, max
3968 .TE
3969 .br
3970 .if t .ne 6v
3971 .PP
3972 The argument values of \fBsetf\fP/\fBsetb\fP historically correspond to
3973 a different mapping, i.e.,
3974 .PP
3975 .TS
3976 center;
3977 cb cb cb cb s s
3978 l lb c l1 l1 l .
3979 Color #define Value RGB
3980 _
3981 black COLOR_BLACK 0 0, 0, 0
3982 blue COLOR_BLUE 1 0, 0, max
3983 green COLOR_GREEN 2 0, max, 0
3984 cyan COLOR_CYAN 3 0, max, max
3985 red COLOR_RED 4 max, 0, 0
3986 magenta COLOR_MAGENTA 5 max, 0, max
3987 yellow COLOR_YELLOW 6 max, max, 0
3988 white COLOR_WHITE 7 max, max, max
3989 .TE
3990 .PP
3991 It is important to not confuse the two sets of color capabilities;
3992 otherwise red/blue will be interchanged on the display.
3993 .PP
3994 On an HP-like terminal, use \fBscp\fP with a color pair number parameter to set
3995 which color pair is current.
3996 .PP
3997 Some terminals allow the \fIcolor values\fP to be modified:
3998 .bP
3999 On a Tektronix-like terminal, the capability \fBccc\fP may be present to
4000 indicate that colors can be modified.
4001 If so, the \fBinitc\fP capability will
4002 take a color number (0 to \fBcolors\fP \- 1)and three more parameters which
4003 describe the color.
4004 These three parameters default to being interpreted as RGB
4005 (Red, Green, Blue) values.
4006 If the Boolean capability \fBhls\fP is present,
4007 they are instead as HLS (Hue, Lightness, Saturation) indices.
4008 The ranges are
4009 terminal-dependent.
4010 .bP
4011 On an HP-like terminal, \fBinitp\fP may give a capability for changing a
4012 color pair value.
4013 It will take seven parameters; a color pair number (0 to
4014 \fBmax_pairs\fP \- 1), and two triples describing first background and then
4015 foreground colors.
4016 These parameters must be (Red, Green, Blue) or
4017 (Hue, Lightness, Saturation) depending on \fBhls\fP.
4018 .PP
4019 On some color terminals, colors collide with highlights.
4020 You can register
4021 these collisions with the \fBncv\fP capability.
4022 This is a bit mask of
4023 attributes not to be used when colors are enabled.
4024 The correspondence with the
4025 attributes understood by \fBcurses\fP is as follows:
4026 .PP
4027 .TS
4028 center;
4029 cb cb cb cb
4030 lb n n lb.
4031 Attribute Bit Decimal Set by
4032 _
4033 A_STANDOUT 0 1 sgr
4034 A_UNDERLINE 1 2 sgr
4035 A_REVERSE 2 4 sgr
4036 A_BLINK 3 8 sgr
4037 A_DIM 4 16 sgr
4038 A_BOLD 5 32 sgr
4039 A_INVIS 6 64 sgr
4040 A_PROTECT 7 128 sgr
4041 A_ALTCHARSET 8 256 sgr
4042 A_HORIZONTAL 9 512 sgr1
4043 A_LEFT 10 1024 sgr1
4044 A_LOW 11 2048 sgr1
4045 A_RIGHT 12 4096 sgr1
4046 A_TOP 13 8192 sgr1
4047 A_VERTICAL 14 16384 sgr1
4048 A_ITALIC 15 32768 sitm
4049 .TE
4050 .PP
4051 For example, on many IBM PC consoles, the underline attribute collides with the
4052 foreground color blue and is not available in color mode.
4053 These should have
4054 an \fBncv\fP capability of 2.
4055 .PP
4056 SVr4 curses does nothing with \fBncv\fP,
4057 \fI\%ncurses\fP recognizes it and optimizes
4058 the output in favor of colors.
4059 .SS Miscellaneous
4060 If the terminal requires other than a null (zero) character as a pad, then this
4061 can be given as pad.
4062 Only the first character of the pad string is used.
4063 If the terminal does not have a pad character, specify npc.
4064 Note that \fI\%ncurses\fP implements the termcap-compatible \fBPC\fP
4065 variable;
4066 though the application may set this value to something other than
4067 a null,
4068 \fI\%ncurses\fP will test \fBnpc\fP first and use napms if the terminal
4069 has no pad character.
4070 .PP
4071 If the terminal can move up or down half a line,
4072 this can be indicated with
4073 .B hu
4074 (half-line up)
4075 and
4076 .B hd
4077 (half-line down).
4078 This is primarily useful for superscripts and subscripts on hard-copy terminals.
4079 If a hard-copy terminal can eject to the next page (form feed), give this as
4080 .B ff
4081 (usually control/L).
4082 .PP
4083 If there is a command to repeat a given character a given number of
4084 times (to save time transmitting a large number of identical characters)
4085 this can be indicated with the parameterized string
4086 .BR rep .
4087 The first parameter is the character to be repeated and the second
4088 is the number of times to repeat it.
4089 Thus, tparm(repeat_char, \*'x\*', 10) is the same as \*(``xxxxxxxxxx\*(''.
4090 .PP
4091 If the terminal has a settable command character,
4092 such as the \s-1TEKTRONIX\s+1 4025,
4093 this can be indicated with
4094 .BR cmdch .
4095 A prototype command character is chosen which is used in all capabilities.
4096 This character is given in the
4097 .B cmdch
4098 capability to identify it.
4099 The following convention is supported on some Unix systems:
4100 The environment is to be searched for a
4101 .B CC
4102 variable, and if found, all
4103 occurrences of the prototype character are replaced with the character
4104 in the environment variable.
4105 .PP
4106 Terminal descriptions that do not represent a specific kind of known
4107 terminal, such as
4108 .IR switch ,
4109 .IR dialup ,
4110 .IR patch ,
4111 and
4112 .IR network ,
4113 should include the
4114 .B gn
4115 (generic) capability so that programs can complain that they do not know
4116 how to talk to the terminal.
4117 (This capability does not apply to
4118 .I virtual
4119 terminal descriptions for which the escape sequences are known.)
4120 .PP
4121 If the terminal has a \*(``meta key\*('' which acts as a shift key,
4122 setting the 8th bit of any character transmitted, this fact can
4123 be indicated with
4124 .BR km .
4125 Otherwise, software will assume that the 8th bit is parity and it
4126 will usually be cleared.
4127 If strings exist to turn this \*(``meta mode\*('' on and off, they
4128 can be given as
4129 .B smm
4130 and
4131 .BR rmm .
4132 .PP
4133 If the terminal has more lines of memory than will fit on the screen
4134 at once, the number of lines of memory can be indicated with
4135 .BR lm .
4136 A value of
4137 .BR lm #0
4138 indicates that the number of lines is not fixed,
4139 but that there is still more memory than fits on the screen.
4140 .PP
4141 If the terminal is one of those supported by the Unix virtual
4142 terminal protocol, the terminal number can be given as
4143 .BR vt .
4144 .PP
4145 Media copy
4146 strings which control an auxiliary printer connected to the terminal
4147 can be given as
4148 .BR mc0 :
4149 print the contents of the screen,
4150 .BR mc4 :
4151 turn off the printer, and
4152 .BR mc5 :
4153 turn on the printer.
4154 When the printer is on, all text sent to the terminal will be sent
4155 to the printer.
4156 It is undefined whether the text is also displayed on the terminal screen
4157 when the printer is on.
4158 A variation
4159 .B mc5p
4160 takes one parameter, and leaves the printer on for as many characters
4161 as the value of the parameter, then turns the printer off.
4162 The parameter should not exceed 255.
4163 All text, including
4164 .BR mc4 ,
4165 is transparently passed to the printer while an
4166 .B mc5p
4167 is in effect.
4168 .SS "Glitches and Brain Damage"
4169 Hazeltine terminals,
4170 which do not allow \*(``\*~\*('' characters to be displayed should
4171 indicate \fBhz\fP.
4172 .PP
4173 Terminals which ignore a line-feed immediately after an \fBam\fP wrap,
4174 such as the Concept and vt100,
4175 should indicate \fBxenl\fP.
4176 .PP
4177 If
4178 .B el
4179 is required to get rid of standout
4180 (instead of merely writing normal text on top of it),
4181 \fBxhp\fP should be given.
4182 .PP
4183 Teleray terminals, where tabs turn all characters moved over to blanks,
4184 should indicate \fBxt\fP (destructive tabs).
4185 Note: the variable indicating this is now \*(``dest_tabs_magic_smso\*(''; in
4186 older versions, it was teleray_glitch.
4187 This glitch is also taken to mean that it is not possible to position
4188 the cursor on top of a \*(``magic cookie\*('',
4189 that to erase standout mode it is instead necessary to use
4190 delete and insert line.
4191 The \fI\%ncurses\fP implementation ignores this glitch.
4192 .PP
4193 The Beehive Superbee, which is unable to correctly transmit the escape
4194 or control/C characters, has
4195 .BR xsb ,
4196 indicating that the f1 key is used for escape and f2 for control/C.
4197 (Only certain Superbees have this problem, depending on the ROM.)
4198 Note that in older terminfo versions, this capability was called
4199 \*(``beehive_glitch\*(''; it is now \*(``no_esc_ctl_c\*(''.
4200 .PP
4201 Other specific terminal problems may be corrected by adding more
4202 capabilities of the form \fBx\fIx\fR.
4203 .SS "Pitfalls of Long Entries"
4204 Long terminfo entries are unlikely to be a problem; to date, no entry has even
4205 approached terminfo's 4096-byte string-table maximum.
4206 Unfortunately, the termcap
4207 translations are much more strictly limited (to 1023 bytes),
4208 thus termcap translations of long terminfo entries can cause problems.
4209 .PP
4210 The man pages for 4.3BSD
4211 and older versions of \fBtgetent\fP instruct the user to
4212 allocate a 1024-byte buffer for the termcap entry.
4213 The entry gets null-terminated by
4214 the termcap library, so that makes the maximum safe length for a termcap entry
4215 1k\-1 (1023) bytes.
4216 Depending on what the application and the termcap library being used does,
4217 and where in the termcap file the terminal type that \fBtgetent\fP
4218 is searching for is, several bad things can happen:
4219 .bP
4220 some termcap libraries print a warning message,
4221 .bP
4222 some exit if they find an entry that's longer than 1023 bytes,
4223 .bP
4224 some neither exit nor warn, doing nothing useful, and
4225 .bP
4226 some simply truncate the entries to 1023 bytes.
4227 .PP
4228 Some application programs allocate more than
4229 the recommended 1K for the termcap entry; others do not.
4230 .PP
4231 Each termcap entry has two important sizes associated with it: before
4232 \*(``tc\*('' expansion, and after \*(``tc\*('' expansion.
4233 \*(``tc\*('' is the capability that
4234 tacks on another termcap entry to the end of the current one, to add
4235 on its capabilities.
4236 If a termcap entry does not use the \*(``tc\*(''
4237 capability, then of course the two lengths are the same.
4238 .PP
4239 The \*(``before tc expansion\*('' length is the most important one, because it
4240 affects more than just users of that particular terminal.
4241 This is the
4242 length of the entry as it exists in /etc/termcap, minus the
4243 backslash-newline pairs, which \fBtgetent\fP strips out while reading it.
4244 Some termcap libraries strip off the final newline, too (GNU termcap does not).
4245 Now suppose:
4246 .bP
4247 a termcap entry before expansion is more than 1023 bytes long,
4248 .bP
4249 and the application has only allocated a 1k buffer,
4250 .bP
4251 and the termcap library (like the one in BSD/OS 1.1 and GNU) reads
4252 the whole entry into the buffer, no matter what its length, to see
4253 if it is the entry it wants,
4254 .bP
4255 and \fBtgetent\fP is searching for a terminal type that either is the
4256 long entry, appears in the termcap file after the long entry, or
4257 does not appear in the file at all (so that \fBtgetent\fP has to search
4258 the whole termcap file).
4259 .PP
4260 Then \fBtgetent\fP will overwrite memory,
4261 perhaps its stack,
4262 and probably core dump the program.
4263 Programs like telnet are particularly vulnerable; modern telnets
4264 pass along values like the terminal type automatically.
4265 The results are almost
4266 as undesirable with a termcap library, like SunOS 4.1.3 and Ultrix 4.4, that
4267 prints warning messages when it reads an overly long termcap entry.
4268 If a
4269 termcap library truncates long entries, like OSF/1 3.0, it is immune to dying
4270 here but will return incorrect data for the terminal.
4271 .PP
4272 The \*(``after tc expansion\*('' length will have a similar effect to the
4273 above, but only for people who actually set \fITERM\fP to that terminal
4274 type, since \fBtgetent\fP only does \*(``tc\*('' expansion once it is found the
4275 terminal type it was looking for, not while searching.
4276 .PP
4277 In summary, a termcap entry that is longer than 1023 bytes can cause,
4278 on various combinations of termcap libraries and applications, a core
4279 dump, warnings, or incorrect operation.
4280 If it is too long even before
4281 \*(``tc\*('' expansion, it will have this effect even for users of some other
4282 terminal types and users whose \fITERM\fP variable does not have a termcap
4283 entry.
4284 .PP
4285 When in \-C (translate to termcap) mode,
4286 the \fI\%ncurses\fP implementation of
4287 \fBtic\fP(1M) issues warning messages when the pre-tc length of a termcap
4288 translation is too long.
4289 The \-c (check) option also checks resolved (after tc
4290 expansion) lengths.
4291 .SH FILES
4292 .TP
4293 .I /usr/share/terminfo
4294 compiled terminal description database directory
4295 .SH EXTENSIONS
4296 Searching for terminal descriptions in
4297 \fI$HOME/.terminfo\fP and \fI\%TERMINFO_DIRS\fP
4298 is not supported by older implementations.
4299 .PP
4300 Some SVr4 \fBcurses\fP implementations, and all previous to SVr4, do not
4301 interpret the %A and %O operators in parameter strings.
4302 .PP
4303 SVr4/XPG4 do not specify whether \fBmsgr\fP licenses movement while in
4304 an alternate-character-set mode (such modes may, among other things, map
4305 CR and NL to characters that do not trigger local motions).
4306 The \fI\%ncurses\fP implementation ignores \fBmsgr\fP in
4307 \fBALTCHARSET\fP mode.
4308 This raises the possibility that an XPG4
4309 implementation making the opposite interpretation may need terminfo
4310 entries made for \fI\%ncurses\fP to have \fBmsgr\fP turned off.
4311 .PP
4312 The \fI\%ncurses\fP library handles insert-character and
4313 insert-character modes in a slightly non-standard way to get better
4314 update efficiency.
4315 See
4316 the \fBInsert/Delete Character\fP subsection above.
4317 .PP
4318 The parameter substitutions for \fBset_clock\fP and \fBdisplay_clock\fP are
4319 not documented in SVr4 or X/Open Curses.
4320 They are deduced from the
4321 documentation for the AT&T 505 terminal.
4322 .PP
4323 Be careful assigning the \fBkmous\fP capability.
4324 The \fI\%ncurses\fP library wants to interpret it as \fBKEY_MOUSE\fP,
4325 for use by terminals and emulators like xterm
4326 that can return mouse-tracking information in the keyboard-input stream.
4327 .PP
4328 X/Open Curses does not mention italics.
4329 Portable applications must assume that numeric capabilities are
4330 signed 16-bit values.
4331 This includes the \fIno_color_video\fP (\fBncv\fP) capability.
4332 The 32768 mask value used for italics with \fBncv\fP can be confused with
4333 an absent or canceled \fBncv\fP.
4334 If italics should work with colors,
4335 then the \fBncv\fP value must be specified, even if it is zero.
4336 .PP
4337 Different commercial ports of \fI\%terminfo\fP and \fIcurses\fP support
4338 different subsets of X/Open Curses and
4339 (in some cases)
4340 different extensions.
4341 Here is a summary,
4342 accurate as of October 1995,
4343 after which the commercial Unix market contracted and lost diversity.
4344 .bP
4345 SVr4,
4346 Solaris,
4347 and \fI\%ncurses\fP support all SVr4 capabilities.
4348 .bP
4349 IRIX supports the SVr4 set and adds one undocumented extended string
4350 capability \%(\fBset_pglen\fP).
4351 .bP
4352 SVr1 and Ultrix support a restricted subset of \fI\%terminfo\fP
4353 capabilities.
4354 The Booleans end with \fB\%xon_xoff\fP;
4355 the numerics with \fB\%width_status_line\fP;
4356 and the strings with \fB\%prtr_non\fP.
4357 .bP
4358 HP/UX supports the SVr1 subset,
4359 plus the SVr[234] numerics
4360 \fB\%num_labels\fP,
4361 \fB\%label_height\fP,
4362 \fB\%label_width\fP,
4363 plus function keys 11 through 63,
4364 plus
4365 \fB\%plab_norm\fP,
4366 \fB\%label_on\fP,
4367 and
4368 \fB\%label_off\fP,
4369 plus a number of incompatible string table extensions.
4370 .bP
4371 AIX supports the SVr1 subset,
4372 plus function keys 11 through 63,
4373 plus a number of incompatible string table extensions.
4374 .bP
4375 OSF/1 supports both the SVr4 set and the AIX extensions.
4376 .SH PORTABILITY
4377 Do not count on compiled (binary) \fI\%terminfo\fP entries being
4378 portable between commercial Unix systems.
4379 At least two implementations of \fI\%terminfo\fP
4380 (those of HP-UX and AIX)
4381 diverged from those of other System V Unices after SVr1,
4382 adding extension capabilities to the string table that
4383 (in the binary format)
4384 collide with subsequent System V and X/Open Curses extensions.
4385 .SH AUTHORS
4386 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
4387 Based on \fIpcurses\fP by Pavel Curtis.
4388 .SH SEE ALSO
4389 \fB\%infocmp\fP(1M),
4390 \fB\%tabs\fP(1),
4391 \fB\%tic\fP(1M),
4392 \fB\%curses\fP(3X),
4393 \fB\%curs_color\fP(3X),
4394 \fB\%curs_terminfo\fP(3X),
4395 \fB\%curs_variables\fP(3X),
4396 \fB\%printf\fP(3),
4397 \fB\%term_variables\fP(3X),
4398 \fB\%term\fP(5),
4399 \fB\%user_caps\fP(5)