1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
4 * DO NOT EDIT THIS FILE BY HAND!
5 * It is generated from terminfo.head, Caps, and terminfo.tail.
6 * Note: this must be run through tbl before nroff.
7 * The magic cookie on the first line triggers this under some man programs.
8 ****************************************************************************
9 * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. *
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: *
19 * The above copyright notice and this permission notice shall be included *
20 * in all copies or substantial portions of the Software. *
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. *
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 *
34 ****************************************************************************
35 * @Id: terminfo.head,v 1.10 2002/08/17 23:37:10 tom Exp @
36 * Head of terminfo man page ends here
37 * @Id: terminfo.tail,v 1.35 2002/04/20 16:49:33 tom Exp @
38 * Beginning of terminfo.tail file
43 <TITLE>TERMINFO 5 File Formats</TITLE>
44 <link rev=made href="mailto:bug-ncurses@gnu.org">
45 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
48 <H1>TERMINFO 5 File Formats</H1>
51 <!-- Manpage converted by man2html 3.0.1 -->
55 terminfo - terminal capability data base
59 <H2>SYNOPSIS</H2><PRE>
60 /usr/share/terminfo/*/*
64 <H2>DESCRIPTION</H2><PRE>
65 <EM>Terminfo</EM> is a data base describing terminals, used by
66 screen-oriented programs such as <STRONG><A HREF="nvi.1.html">nvi(1)</A></STRONG>, <STRONG><A HREF="rogue.1.html">rogue(1)</A></STRONG> and
67 libraries such as <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>. <EM>Terminfo</EM> describes termi-
68 nals by giving a set of capabilities which they have, by
69 specifying how to perform screen operations, and by speci-
70 fying padding requirements and initialization sequences.
72 Entries in <EM>terminfo</EM> consist of a sequence of `,' separated
73 fields (embedded commas may be escaped with a backslash or
74 notated as \054). White space after the `,' separator is
75 ignored. The first entry for each terminal gives the
76 names which are known for the terminal, separated by `|'
77 characters. The first name given is the most common
78 abbreviation for the terminal, the last name given should
79 be a long name fully identifying the terminal, and all
80 others are understood as synonyms for the terminal name.
81 All names but the last should be in lower case and contain
82 no blanks; the last name may well contain upper case and
83 blanks for readability.
85 Terminal names (except for the last, verbose entry) should
86 be chosen using the following conventions. The particular
87 piece of hardware making up the terminal should have a
88 root name, thus ``hp2621''. This name should not contain
89 hyphens. Modes that the hardware can be in, or user pref-
90 erences, should be indicated by appending a hyphen and a
91 mode suffix. Thus, a vt100 in 132 column mode would be
92 vt100-w. The following suffixes should be used where pos-
95 <STRONG>Suffix</STRONG> <STRONG>Meaning</STRONG> <STRONG>Example</STRONG>
96 -<EM>nn</EM> Number of lines on the screen aaa-60
97 -<EM>n</EM>p Number of pages of memory c100-4p
98 -am With automargins (usually the default) vt100-am
99 -m Mono mode; suppress color ansi-m
100 -mc Magic cookie; spaces when highlighting wy30-mc
101 -na No arrow keys (leave them in local) c100-na
102 -nam Without automatic margins vt100-nam
103 -nl No status line att4415-nl
104 -ns No status line hp2626-ns
105 -rv Reverse video c100-rv
106 -s Enable status line vt100-s
107 -vb Use visible bell instead of beep wy370-vb
108 -w Wide mode (> 80 columns, usually 132) vt100-w
110 For more on terminal naming conventions, see the <STRONG>term(7)</STRONG>
113 <STRONG>Capabilities</STRONG>
114 The following is a complete table of the capabilities
115 included in a terminfo description block and available to
116 terminfo-using code. In each line of the table,
118 The <STRONG>variable</STRONG> is the name by which the programmer (at the
119 terminfo level) accesses the capability.
121 The <STRONG>capname</STRONG> is the short name used in the text of the
122 database, and is used by a person updating the database.
123 Whenever possible, capnames are chosen to be the same as
124 or similar to the ANSI X3.64-1979 standard (now superseded
125 by ECMA-48, which uses identical or very similar names).
126 Semantics are also intended to match those of the specifi-
129 The termcap code is the old <STRONG>termcap</STRONG> capability name (some
130 capabilities are new, and have names which termcap did not
133 Capability names have no hard length limit, but an infor-
134 mal limit of 5 characters has been adopted to keep them
135 short and to allow the tabs in the source file <STRONG>Caps</STRONG> to
138 Finally, the description field attempts to convey the
139 semantics of the capability. You may find some codes in
140 the description field:
142 (P) indicates that padding may be specified
144 #[1-9] in the description field indicates that the string
145 is passed through tparm with parms as given (#<EM>i</EM>).
147 (P*) indicates that padding may vary in proportion to
148 the number of lines affected
150 (#<EM>i</EM>) indicates the <EM>i</EM>th parameter.
153 These are the boolean capabilities:
155 <STRONG>Variable</STRONG> <STRONG>Cap-</STRONG> <STRONG>TCap</STRONG> <STRONG>Description</STRONG>
156 <STRONG>Booleans</STRONG> <STRONG>name</STRONG> <STRONG>Code</STRONG>
157 auto_left_margin bw bw cub1 wraps from col-
159 auto_right_margin am am terminal has auto-
161 back_color_erase bce ut screen erased with
163 can_change ccc cc terminal can re-
167 ceol_standout_glitch xhp xs standout not erased
169 col_addr_glitch xhpa YA only positive motion
171 cpi_changes_res cpix YF changing character
174 cr_cancels_micro_mode crxm YB using cr turns off
176 dest_tabs_magic_smso xt xt tabs destructive,
179 eat_newline_glitch xenl xn newline ignored
182 erase_overstrike eo eo can erase over-
184 generic_type gn gn generic line type
185 hard_copy hc hc hardcopy terminal
186 hard_cursor chts HC cursor is hard to
188 has_meta_key km km Has a meta key
190 has_print_wheel daisy YC printer needs opera-
193 has_status_line hs hs has extra status
195 hue_lightness_saturation hls hl terminal uses only
198 insert_null_glitch in in insert mode distin-
200 lpi_changes_res lpix YG changing line pitch
202 memory_above da da display may be
205 memory_below db db display may be
208 move_insert_mode mir mi safe to move while
210 move_standout_mode msgr ms safe to move while
212 needs_xon_xoff nxon nx padding will not
215 no_esc_ctlc xsb xb beehive (f1=escape,
217 no_pad_char npc NP pad character does
221 non_dest_scroll_region ndscr ND scrolling region is
223 non_rev_rmcup nrrmc NR smcup does not
225 over_strike os os terminal can over-
227 prtr_silent mc5i 5i printer will not
229 row_addr_glitch xvpa YD only positive motion
231 semi_auto_right_margin sam YE printing in last
233 status_line_esc_ok eslok es escape can be used
235 tilde_glitch hz hz cannot print ~'s
237 transparent_underline ul ul underline character
239 xon_xoff xon xo terminal uses
242 These are the numeric capabilities:
244 <STRONG>Variable</STRONG> <STRONG>Cap-</STRONG> <STRONG>TCap</STRONG> <STRONG>Description</STRONG>
245 <STRONG>Numeric</STRONG> <STRONG>name</STRONG> <STRONG>Code</STRONG>
246 columns cols co number of columns in
248 init_tabs it it tabs initially every
250 label_height lh lh rows in each label
251 label_width lw lw columns in each
253 lines lines li number of lines on
255 lines_of_memory lm lm lines of memory if >
257 magic_cookie_glitch xmc sg number of blank
260 max_attributes ma ma maximum combined
263 max_colors colors Co maximum number of
265 max_pairs pairs pa maximum number of
268 maximum_windows wnum MW maximum number of
270 no_color_video ncv NC video attributes
275 num_labels nlab Nl number of labels on
277 padding_baud_rate pb pb lowest baud rate
279 virtual_terminal vt vt virtual terminal
281 width_status_line wsl ws number of columns in
284 The following numeric capabilities are present in the
285 SVr4.0 term structure, but are not yet documented in the
286 man page. They came in with SVr4's printer support.
288 <STRONG>Variable</STRONG> <STRONG>Cap-</STRONG> <STRONG>TCap</STRONG> <STRONG>Description</STRONG>
289 <STRONG>Numeric</STRONG> <STRONG>name</STRONG> <STRONG>Code</STRONG>
290 bit_image_entwining bitwin Yo number of passes for
292 bit_image_type bitype Yp type of bit-image
294 buffer_capacity bufsz Ya numbers of bytes
297 buttons btns BT number of buttons on
299 dot_horz_spacing spinh Yc spacing of dots hor-
302 dot_vert_spacing spinv Yb spacing of pins ver-
305 max_micro_address maddr Yd maximum value in
307 max_micro_jump mjump Ye maximum value in
309 micro_col_size mcs Yf character step size
311 micro_line_size mls Yg line step size when
313 number_of_pins npins Yh numbers of pins in
315 output_res_char orc Yi horizontal resolu-
318 output_res_horz_inch orhi Yk horizontal resolu-
321 output_res_line orl Yj vertical resolution
323 output_res_vert_inch orvi Yl vertical resolution
325 print_rate cps Ym print rate in char-
329 wide_char_size widcs Yn character step size
333 These are the string capabilities:
335 <STRONG>Variable</STRONG> <STRONG>Cap-</STRONG> <STRONG>TCap</STRONG> <STRONG>Description</STRONG>
336 <STRONG>String</STRONG> <STRONG>name</STRONG> <STRONG>Code</STRONG>
337 acs_chars acsc ac graphics charset
340 back_tab cbt bt back tab (P)
341 bell bel bl audible signal
343 carriage_return cr cr carriage return (P*)
345 change_char_pitch cpi ZA Change number of
348 change_line_pitch lpi ZB Change number of
350 change_res_horz chr ZC Change horizontal
352 change_res_vert cvr ZD Change vertical res-
354 change_scroll_region csr cs change region to
357 char_padding rmp rP like ip but when in
359 clear_all_tabs tbc ct clear all tab stops
361 clear_margins mgc MC clear right and left
363 clear_screen clear cl clear screen and
365 clr_bol el1 cb Clear to beginning
367 clr_eol el ce clear to end of line
369 clr_eos ed cd clear to end of
371 column_address hpa ch horizontal position
373 command_character cmdch CC terminal settable
376 create_window cwin CW define a window #1
378 cursor_address cup cm move to row #1
380 cursor_down cud1 do down one line
383 cursor_home home ho home cursor (if no
385 cursor_invisible civis vi make cursor invisi-
387 cursor_left cub1 le move left one space
388 cursor_mem_address mrcup CM memory relative cur-
391 cursor_normal cnorm ve make cursor appear
394 cursor_right cuf1 nd non-destructive
397 cursor_to_ll ll ll last line, first
399 cursor_up cuu1 up up one line
400 cursor_visible cvvis vs make cursor very
402 define_char defc ZE Define a character
405 delete_character dch1 dc delete character
407 delete_line dl1 dl delete line (P*)
408 dial_phone dial DI dial number #1
409 dis_status_line dsl ds disable status line
410 display_clock dclk DK display clock
411 down_half_line hd hd half a line down
412 ena_acs enacs eA enable alternate
414 enter_alt_charset_mode smacs as start alternate
416 enter_am_mode smam SA turn on automatic
418 enter_blink_mode blink mb turn on blinking
419 enter_bold_mode bold md turn on bold (extra
421 enter_ca_mode smcup ti string to start pro-
423 enter_delete_mode smdc dm enter delete mode
424 enter_dim_mode dim mh turn on half-bright
426 enter_doublewide_mode swidm ZF Enter double-wide
428 enter_draft_quality sdrfq ZG Enter draft-quality
430 enter_insert_mode smir im enter insert mode
431 enter_italics_mode sitm ZH Enter italic mode
432 enter_leftward_mode slm ZI Start leftward car-
434 enter_micro_mode smicm ZJ Start micro-motion
437 enter_near_letter_quality snlq ZK Enter NLQ mode
438 enter_normal_quality snrmq ZL Enter normal-quality
440 enter_protected_mode prot mp turn on protected
442 enter_reverse_mode rev mr turn on reverse
444 enter_secure_mode invis mk turn on blank mode
447 enter_shadow_mode sshm ZM Enter shadow-print
449 enter_standout_mode smso so begin standout mode
450 enter_subscript_mode ssubm ZN Enter subscript mode
451 enter_superscript_mode ssupm ZO Enter superscript
453 enter_underline_mode smul us begin underline mode
454 enter_upward_mode sum ZP Start upward car-
456 enter_xon_mode smxon SX turn on xon/xoff
458 erase_chars ech ec erase #1 characters
460 exit_alt_charset_mode rmacs ae end alternate char-
462 exit_am_mode rmam RA turn off automatic
464 exit_attribute_mode sgr0 me turn off all
466 exit_ca_mode rmcup te strings to end pro-
468 exit_delete_mode rmdc ed end delete mode
469 exit_doublewide_mode rwidm ZQ End double-wide mode
470 exit_insert_mode rmir ei exit insert mode
471 exit_italics_mode ritm ZR End italic mode
472 exit_leftward_mode rlm ZS End left-motion mode
473 exit_micro_mode rmicm ZT End micro-motion
475 exit_shadow_mode rshm ZU End shadow-print
477 exit_standout_mode rmso se exit standout mode
478 exit_subscript_mode rsubm ZV End subscript mode
479 exit_superscript_mode rsupm ZW End superscript mode
480 exit_underline_mode rmul ue exit underline mode
481 exit_upward_mode rum ZX End reverse charac-
483 exit_xon_mode rmxon RX turn off xon/xoff
485 fixed_pause pause PA pause for 2-3 sec-
487 flash_hook hook fh flash switch hook
488 flash_screen flash vb visible bell (may
491 form_feed ff ff hardcopy terminal
493 from_status_line fsl fs return from status
495 goto_window wingo WG go to window #1
496 hangup hup HU hang-up phone
497 init_1string is1 i1 initialization
499 init_2string is2 is initialization
501 init_3string is3 i3 initialization
503 init_file if if name of initializa-
505 init_prog iprog iP path name of program
507 initialize_color initc Ic initialize color #1
509 initialize_pair initp Ip Initialize color
513 insert_character ich1 ic insert character (P)
514 insert_line il1 al insert line (P*)
515 insert_padding ip ip insert padding after
517 key_a1 ka1 K1 upper left of keypad
518 key_a3 ka3 K3 upper right of key-
520 key_b2 kb2 K2 center of keypad
521 key_backspace kbs kb backspace key
522 key_beg kbeg @1 begin key
523 key_btab kcbt kB back-tab key
524 key_c1 kc1 K4 lower left of keypad
525 key_c3 kc3 K5 lower right of key-
527 key_cancel kcan @2 cancel key
528 key_catab ktbc ka clear-all-tabs key
529 key_clear kclr kC clear-screen or
531 key_close kclo @3 close key
532 key_command kcmd @4 command key
533 key_copy kcpy @5 copy key
534 key_create kcrt @6 create key
535 key_ctab kctab kt clear-tab key
536 key_dc kdch1 kD delete-character key
537 key_dl kdl1 kL delete-line key
538 key_down kcud1 kd down-arrow key
539 key_eic krmir kM sent by rmir or smir
541 key_end kend @7 end key
542 key_enter kent @8 enter/send key
545 key_eol kel kE clear-to-end-of-line
547 key_eos ked kS clear-to-end-of-
549 key_exit kext @9 exit key
550 key_f0 kf0 k0 F0 function key
551 key_f1 kf1 k1 F1 function key
552 key_f10 kf10 k; F10 function key
553 key_f11 kf11 F1 F11 function key
554 key_f12 kf12 F2 F12 function key
555 key_f13 kf13 F3 F13 function key
556 key_f14 kf14 F4 F14 function key
557 key_f15 kf15 F5 F15 function key
558 key_f16 kf16 F6 F16 function key
559 key_f17 kf17 F7 F17 function key
560 key_f18 kf18 F8 F18 function key
561 key_f19 kf19 F9 F19 function key
562 key_f2 kf2 k2 F2 function key
563 key_f20 kf20 FA F20 function key
564 key_f21 kf21 FB F21 function key
565 key_f22 kf22 FC F22 function key
566 key_f23 kf23 FD F23 function key
567 key_f24 kf24 FE F24 function key
568 key_f25 kf25 FF F25 function key
569 key_f26 kf26 FG F26 function key
570 key_f27 kf27 FH F27 function key
571 key_f28 kf28 FI F28 function key
572 key_f29 kf29 FJ F29 function key
573 key_f3 kf3 k3 F3 function key
574 key_f30 kf30 FK F30 function key
575 key_f31 kf31 FL F31 function key
576 key_f32 kf32 FM F32 function key
577 key_f33 kf33 FN F33 function key
578 key_f34 kf34 FO F34 function key
579 key_f35 kf35 FP F35 function key
580 key_f36 kf36 FQ F36 function key
581 key_f37 kf37 FR F37 function key
582 key_f38 kf38 FS F38 function key
583 key_f39 kf39 FT F39 function key
584 key_f4 kf4 k4 F4 function key
585 key_f40 kf40 FU F40 function key
586 key_f41 kf41 FV F41 function key
587 key_f42 kf42 FW F42 function key
588 key_f43 kf43 FX F43 function key
589 key_f44 kf44 FY F44 function key
590 key_f45 kf45 FZ F45 function key
591 key_f46 kf46 Fa F46 function key
592 key_f47 kf47 Fb F47 function key
593 key_f48 kf48 Fc F48 function key
594 key_f49 kf49 Fd F49 function key
595 key_f5 kf5 k5 F5 function key
596 key_f50 kf50 Fe F50 function key
597 key_f51 kf51 Ff F51 function key
599 key_f52 kf52 Fg F52 function key
600 key_f53 kf53 Fh F53 function key
601 key_f54 kf54 Fi F54 function key
602 key_f55 kf55 Fj F55 function key
603 key_f56 kf56 Fk F56 function key
604 key_f57 kf57 Fl F57 function key
605 key_f58 kf58 Fm F58 function key
606 key_f59 kf59 Fn F59 function key
607 key_f6 kf6 k6 F6 function key
608 key_f60 kf60 Fo F60 function key
609 key_f61 kf61 Fp F61 function key
610 key_f62 kf62 Fq F62 function key
611 key_f63 kf63 Fr F63 function key
612 key_f7 kf7 k7 F7 function key
613 key_f8 kf8 k8 F8 function key
614 key_f9 kf9 k9 F9 function key
615 key_find kfnd @0 find key
616 key_help khlp %1 help key
617 key_home khome kh home key
618 key_ic kich1 kI insert-character key
619 key_il kil1 kA insert-line key
620 key_left kcub1 kl left-arrow key
621 key_ll kll kH lower-left key (home
623 key_mark kmrk %2 mark key
624 key_message kmsg %3 message key
625 key_move kmov %4 move key
626 key_next knxt %5 next key
627 key_npage knp kN next-page key
628 key_open kopn %6 open key
629 key_options kopt %7 options key
630 key_ppage kpp kP previous-page key
631 key_previous kprv %8 previous key
632 key_print kprt %9 print key
633 key_redo krdo %0 redo key
634 key_reference kref &1 reference key
635 key_refresh krfr &2 refresh key
636 key_replace krpl &3 replace key
637 key_restart krst &4 restart key
638 key_resume kres &5 resume key
639 key_right kcuf1 kr right-arrow key
640 key_save ksav &6 save key
641 key_sbeg kBEG &9 shifted begin key
642 key_scancel kCAN &0 shifted cancel key
643 key_scommand kCMD *1 shifted command key
644 key_scopy kCPY *2 shifted copy key
645 key_screate kCRT *3 shifted create key
646 key_sdc kDC *4 shifted delete-char-
648 key_sdl kDL *5 shifted delete-line
650 key_select kslt *6 select key
651 key_send kEND *7 shifted end key
653 key_seol kEOL *8 shifted clear-to-
655 key_sexit kEXT *9 shifted exit key
656 key_sf kind kF scroll-forward key
657 key_sfind kFND *0 shifted find key
658 key_shelp kHLP #1 shifted help key
659 key_shome kHOM #2 shifted home key
660 key_sic kIC #3 shifted insert-char-
662 key_sleft kLFT #4 shifted left-arrow
664 key_smessage kMSG %a shifted message key
665 key_smove kMOV %b shifted move key
666 key_snext kNXT %c shifted next key
667 key_soptions kOPT %d shifted options key
668 key_sprevious kPRV %e shifted previous key
669 key_sprint kPRT %f shifted print key
670 key_sr kri kR scroll-backward key
671 key_sredo kRDO %g shifted redo key
672 key_sreplace kRPL %h shifted replace key
673 key_sright kRIT %i shifted right-arrow
675 key_srsume kRES %j shifted resume key
676 key_ssave kSAV !1 shifted save key
677 key_ssuspend kSPD !2 shifted suspend key
678 key_stab khts kT set-tab key
679 key_sundo kUND !3 shifted undo key
680 key_suspend kspd &7 suspend key
681 key_undo kund &8 undo key
682 key_up kcuu1 ku up-arrow key
683 keypad_local rmkx ke leave 'key-
685 keypad_xmit smkx ks enter 'key-
687 lab_f0 lf0 l0 label on function
689 lab_f1 lf1 l1 label on function
691 lab_f10 lf10 la label on function
693 lab_f2 lf2 l2 label on function
695 lab_f3 lf3 l3 label on function
697 lab_f4 lf4 l4 label on function
699 lab_f5 lf5 l5 label on function
701 lab_f6 lf6 l6 label on function
703 lab_f7 lf7 l7 label on function
707 lab_f8 lf8 l8 label on function
709 lab_f9 lf9 l9 label on function
711 label_format fln Lf label format
712 label_off rmln LF turn off soft labels
713 label_on smln LO turn on soft labels
714 meta_off rmm mo turn off meta mode
715 meta_on smm mm turn on meta mode
717 micro_column_address mhpa ZY Like column_address
719 micro_down mcud1 ZZ Like cursor_down in
721 micro_left mcub1 Za Like cursor_left in
723 micro_right mcuf1 Zb Like cursor_right in
725 micro_row_address mvpa Zc Like row_address #1
727 micro_up mcuu1 Zd Like cursor_up in
729 newline nel nw newline (behave like
731 order_of_pins porder Ze Match software bits
733 orig_colors oc oc Set all color pairs
735 orig_pair op op Set default pair to
737 pad_char pad pc padding char
739 parm_dch dch DC delete #1 characters
741 parm_delete_line dl DL delete #1 lines (P*)
742 parm_down_cursor cud DO down #1 lines (P*)
743 parm_down_micro mcud Zf Like parm_down_cur-
745 parm_ich ich IC insert #1 characters
747 parm_index indn SF scroll forward #1
749 parm_insert_line il AL insert #1 lines (P*)
750 parm_left_cursor cub LE move #1 characters
752 parm_left_micro mcub Zg Like parm_left_cur-
754 parm_right_cursor cuf RI move #1 characters
756 parm_right_micro mcuf Zh Like parm_right_cur-
758 parm_rindex rin SR scroll back #1 lines
761 parm_up_cursor cuu UP up #1 lines (P*)
762 parm_up_micro mcuu Zi Like parm_up_cursor
764 pkey_key pfkey pk program function key
766 pkey_local pfloc pl program function key
769 pkey_xmit pfx px program function key
772 plab_norm pln pn program label #1 to
774 print_screen mc0 ps print contents of
776 prtr_non mc5p pO turn on printer for
778 prtr_off mc4 pf turn off printer
779 prtr_on mc5 po turn on printer
780 pulse pulse PU select pulse dialing
781 quick_dial qdial QD dial number #1 with-
783 remove_clock rmclk RC remove clock
784 repeat_char rep rp repeat char #1 #2
786 req_for_input rfi RF send next input char
788 reset_1string rs1 r1 reset string
789 reset_2string rs2 r2 reset string
790 reset_3string rs3 r3 reset string
791 reset_file rf rf name of reset file
792 restore_cursor rc rc restore cursor to
795 row_address vpa cv vertical position #1
797 save_cursor sc sc save current cursor
799 scroll_forward ind sf scroll text up (P)
800 scroll_reverse ri sr scroll text down (P)
801 select_char_set scs Zj Select character
803 set_attributes sgr sa define video
806 set_background setb Sb Set background color
808 set_bottom_margin smgb Zk Set bottom margin at
810 set_bottom_margin_parm smgbp Zl Set bottom margin at
815 set_clock sclk SC set clock, #1 hrs #2
817 set_color_pair scp sp Set current color
819 set_foreground setf Sf Set foreground color
821 set_left_margin smgl ML set left soft margin
825 set_left_margin_parm smglp Zm Set left (right)
827 set_right_margin smgr MR set right soft mar-
830 set_right_margin_parm smgrp Zn Set right margin at
832 set_tab hts st set a tab in every
834 set_top_margin smgt Zo Set top margin at
836 set_top_margin_parm smgtp Zp Set top (bottom)
838 set_window wind wi current window is
841 start_bit_image sbim Zq Start printing bit
843 start_char_set_def scsd Zr Start character set
847 stop_bit_image rbim Zs Stop printing bit
849 stop_char_set_def rcsd Zt End definition of
851 subscript_characters subcs Zu List of subscript-
853 superscript_characters supcs Zv List of superscript-
855 tab ht ta tab to next 8-space
857 these_cause_cr docr Zw Printing any of
860 to_status_line tsl ts move to status line,
862 tone tone TO select touch tone
864 underline_char uc uc underline char and
866 up_half_line hu hu half a line up
867 user0 u0 u0 User string #0
869 user1 u1 u1 User string #1
870 user2 u2 u2 User string #2
871 user3 u3 u3 User string #3
872 user4 u4 u4 User string #4
873 user5 u5 u5 User string #5
874 user6 u6 u6 User string #6
875 user7 u7 u7 User string #7
876 user8 u8 u8 User string #8
877 user9 u9 u9 User string #9
878 wait_tone wait WA wait for dial-tone
879 xoff_character xoffc XF XOFF character
880 xon_character xonc XN XON character
881 zero_motion zerom Zx No motion for subse-
884 The following string capabilities are present in the
885 SVr4.0 term structure, but were originally not documented
888 <STRONG>Variable</STRONG> <STRONG>Cap-</STRONG> <STRONG>TCap</STRONG> <STRONG>Description</STRONG>
889 <STRONG>String</STRONG> <STRONG>name</STRONG> <STRONG>Code</STRONG>
890 alt_scancode_esc scesa S8 Alternate escape
893 bit_image_carriage_return bicr Yv Move to beginning
895 bit_image_newline binel Zz Move to next row
897 bit_image_repeat birep Xy Repeat bit image
899 char_set_names csnm Zy Produce #1'th item
902 code_set_init csin ci Init sequence for
904 color_names colornm Yw Give name for
906 define_bit_image_region defbi Yx Define rectan-
909 device_type devt dv Indicate lan-
912 display_pc_char dispc S1 Display PC charac-
914 end_bit_image_region endbi Yy End a bit-image
916 enter_pc_charset_mode smpch S2 Enter PC character
918 enter_scancode_mode smsc S4 Enter PC scancode
920 exit_pc_charset_mode rmpch S3 Exit PC character
923 exit_scancode_mode rmsc S5 Exit PC scancode
925 get_mouse getm Gm Curses should get
929 key_mouse kmous Km Mouse event has
931 mouse_info minfo Mi Mouse status
933 pc_term_options pctrm S6 PC terminal
935 pkey_plab pfxl xl Program function
939 req_mouse_pos reqmp RQ Request mouse
941 scancode_escape scesc S7 Escape for scan-
943 set0_des_seq s0ds s0 Shift to codeset 0
945 set1_des_seq s1ds s1 Shift to codeset 1
946 set2_des_seq s2ds s2 Shift to codeset 2
947 set3_des_seq s3ds s3 Shift to codeset 3
948 set_a_background setab AB Set background
951 set_a_foreground setaf AF Set foreground
954 set_color_band setcolor Yz Change to ribbon
956 set_lr_margin smglr ML Set both left and
961 set_page_length slines YZ Set page length to
963 set_tb_margin smgtb MT Sets both top and
967 The XSI Curses standard added these. They are some
968 post-4.1 versions of System V curses, e.g., Solaris 2.5
969 and IRIX 6.x. The <STRONG>ncurses</STRONG> termcap names for them are
970 invented; according to the XSI Curses standard, they have
971 no termcap names. If your compiled terminfo entries use
972 these, they may not be binary-compatible with System V
973 terminfo entries after SVr4.1; beware!
975 <STRONG>Variable</STRONG> <STRONG>Cap-</STRONG> <STRONG>TCap</STRONG> <STRONG>Description</STRONG>
977 <STRONG>String</STRONG> <STRONG>name</STRONG> <STRONG>Code</STRONG>
978 enter_horizontal_hl_mode ehhlm Xh Enter horizontal
980 enter_left_hl_mode elhlm Xl Enter left highlight
982 enter_low_hl_mode elohlm Xo Enter low highlight
984 enter_right_hl_mode erhlm Xr Enter right high-
986 enter_top_hl_mode ethlm Xt Enter top highlight
988 enter_vertical_hl_mode evhlm Xv Enter vertical high-
990 set_a_attributes sgr1 sA Define second set of
993 set_pglen_inch slengthsL YI Set page length
998 <STRONG>A</STRONG> <STRONG>Sample</STRONG> <STRONG>Entry</STRONG>
999 The following entry, describing an ANSI-standard terminal,
1000 is representative of what a <STRONG>terminfo</STRONG> entry for a modern
1001 terminal typically looks like.
1003 ansi|ansi/pc-term compatible with color,
1005 colors#8, ncv#3, pairs#64,
1006 cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
1007 cuu=\E[%p1%dA, dch=\E[%p1%dP, dl=\E[%p1%dM,
1008 ech=\E[%p1%dX, el1=\E[1K, hpa=\E[%p1%dG, ht=\E[I,
1009 ich=\E[%p1%d@, il=\E[%p1%dL, indn=\E[%p1%dS, .indn=\E[%p1%dT,
1010 kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
1011 kcuf1=\E[C, kcuu1=\E[A, kf1=\E[M, kf10=\E[V,
1012 kf11=\E[W, kf12=\E[X, kf2=\E[N, kf3=\E[O, kf4=\E[P,
1013 kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U,
1014 kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S,
1015 op=\E[37;40m, rep=%p1%c\E[%p2%{1}%-%db,
1016 rin=\E[%p1%dT, s0ds=\E(B, s1ds=\E)B, s2ds=\E*B,
1017 s3ds=\E+B, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
1018 setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
1019 setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
1020 sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p8%t;11%;%?%p9%t;12%;m,
1021 sgr0=\E[0;10m, tbc=\E[2g, u6=\E[%d;%dR, u7=\E[6n,
1022 u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%p1%dd,
1024 Entries may continue onto multiple lines by placing white
1025 space at the beginning of each line except the first.
1026 Comments may be included on lines beginning with ``#''.
1027 Capabilities in <EM>terminfo</EM> are of three types: Boolean capa-
1028 bilities which indicate that the terminal has some partic-
1029 ular feature, numeric capabilities giving the size of the
1030 terminal or the size of particular delays, and string
1031 capabilities, which give a sequence which can be used to
1032 perform particular terminal operations.
1035 <STRONG>Types</STRONG> <STRONG>of</STRONG> <STRONG>Capabilities</STRONG>
1036 All capabilities have names. For instance, the fact that
1037 ANSI-standard terminals have <EM>automatic</EM> <EM>margins</EM> (i.e., an
1038 automatic return and line-feed when the end of a line is
1039 reached) is indicated by the capability <STRONG>am</STRONG>. Hence the
1040 description of ansi includes <STRONG>am</STRONG>. Numeric capabilities are
1041 followed by the character `#' and then a positive value.
1042 Thus <STRONG>cols</STRONG>, which indicates the number of columns the ter-
1043 minal has, gives the value `80' for ansi. Values for
1044 numeric capabilities may be specified in decimal, octal or
1045 hexadecimal, using the C programming language conventions
1046 (e.g., 255, 0377 and 0xff or 0xFF).
1048 Finally, string valued capabilities, such as <STRONG>el</STRONG> (clear to
1049 end of line sequence) are given by the two-character code,
1050 an `=', and then a string ending at the next following
1053 A number of escape sequences are provided in the string
1054 valued capabilities for easy encoding of characters there.
1055 Both <STRONG>\E</STRONG> and <STRONG>\e</STRONG> map to an ESCAPE character, <STRONG>^x</STRONG> maps to a
1056 control-x for any appropriate x, and the sequences <STRONG>\n</STRONG> <STRONG>\l</STRONG>
1057 <STRONG>\r</STRONG> <STRONG>\t</STRONG> <STRONG>\b</STRONG> <STRONG>\f</STRONG> <STRONG>\s</STRONG> give a newline, line-feed, return, tab,
1058 backspace, form-feed, and space. Other escapes include <STRONG>\^</STRONG>
1059 for <STRONG>^</STRONG>, <STRONG>\\</STRONG> for <STRONG>\</STRONG>, <STRONG>\</STRONG>, for comma, <STRONG>\:</STRONG> for <STRONG>:</STRONG>, and <STRONG>\0</STRONG> for null.
1060 (<STRONG>\0</STRONG> will produce \200, which does not terminate a string
1061 but behaves as a null character on most terminals, provid-
1062 ing CS7 is specified. See <STRONG><A HREF="stty.1.html">stty(1)</A></STRONG>.) Finally, characters
1063 may be given as three octal digits after a <STRONG>\</STRONG>.
1065 A delay in milliseconds may appear anywhere in a string
1066 capability, enclosed in $<..> brackets, as in <STRONG>el</STRONG>=\EK$<5>,
1067 and padding characters are supplied by <EM>tputs</EM> to provide
1068 this delay. The delay must be a number with at most one
1069 decimal place of precision; it may be followed by suffixes
1070 `*' or '/' or both. A `*' indicates that the padding
1071 required is proportional to the number of lines affected
1072 by the operation, and the amount given is the per-
1073 affected-unit padding required. (In the case of insert
1074 character, the factor is still the number of <EM>lines</EM>
1075 affected.) Normally, padding is advisory if the device
1076 has the <STRONG>xon</STRONG> capability; it is used for cost computation
1077 but does not trigger delays. A `/' suffix indicates that
1078 the padding is mandatory and forces a delay of the given
1079 number of milliseconds even on devices for which <STRONG>xon</STRONG> is
1080 present to indicate flow control.
1082 Sometimes individual capabilities must be commented out.
1083 To do this, put a period before the capability name. For
1084 example, see the second <STRONG>ind</STRONG> in the example above.
1086 <STRONG>Fetching</STRONG> <STRONG>Compiled</STRONG> <STRONG>Descriptions</STRONG>
1087 If the environment variable TERMINFO is set, it is inter-
1088 preted as the pathname of a directory containing the com-
1089 piled description you are working on. Only that directory
1092 If TERMINFO is not set, the <STRONG>ncurses</STRONG> version of the ter-
1093 minfo reader code will instead look in the directory
1094 <STRONG>$HOME/.terminfo</STRONG> for a compiled description. If it fails
1095 to find one there, and the environment variable TER-
1096 MINFO_DIRS is set, it will interpret the contents of that
1097 variable as a list of colon- separated directories to be
1098 searched (an empty entry is interpreted as a command to
1099 search <EM>/usr/share/terminfo</EM>). If no description is found
1100 in any of the TERMINFO_DIRS directories, the fetch fails.
1102 If neither TERMINFO nor TERMINFO_DIRS is set, the last
1103 place tried will be the system terminfo directory,
1104 <EM>/usr/share/terminfo</EM>.
1106 (Neither the <STRONG>$HOME/.terminfo</STRONG> lookups nor TERMINFO_DIRS
1107 extensions are supported under stock System V ter-
1111 <STRONG>Preparing</STRONG> <STRONG>Descriptions</STRONG>
1112 We now outline how to prepare descriptions of terminals.
1113 The most effective way to prepare a terminal description
1114 is by imitating the description of a similar terminal in
1115 <EM>terminfo</EM> and to build up a description gradually, using
1116 partial descriptions with <EM>vi</EM> or some other screen-oriented
1117 program to check that they are correct. Be aware that a
1118 very unusual terminal may expose deficiencies in the abil-
1119 ity of the <EM>terminfo</EM> file to describe it or bugs in the
1120 screen-handling code of the test program.
1122 To get the padding for insert line right (if the terminal
1123 manufacturer did not document it) a severe test is to edit
1124 a large file at 9600 baud, delete 16 or so lines from the
1125 middle of the screen, then hit the `u' key several times
1126 quickly. If the terminal messes up, more padding is usu-
1127 ally needed. A similar test can be used for insert char-
1131 <STRONG>Basic</STRONG> <STRONG>Capabilities</STRONG>
1132 The number of columns on each line for the terminal is
1133 given by the <STRONG>cols</STRONG> numeric capability. If the terminal is
1134 a CRT, then the number of lines on the screen is given by
1135 the <STRONG>lines</STRONG> capability. If the terminal wraps around to the
1136 beginning of the next line when it reaches the right mar-
1137 gin, then it should have the <STRONG>am</STRONG> capability. If the termi-
1138 nal can clear its screen, leaving the cursor in the home
1139 position, then this is given by the <STRONG>clear</STRONG> string
1140 capability. If the terminal overstrikes (rather than
1141 clearing a position when a character is struck over) then
1142 it should have the <STRONG>os</STRONG> capability. If the terminal is a
1143 printing terminal, with no soft copy unit, give it both <STRONG>hc</STRONG>
1144 and <STRONG>os</STRONG>. (<STRONG>os</STRONG> applies to storage scope terminals, such as
1145 TEKTRONIX 4010 series, as well as hard copy and APL termi-
1146 nals.) If there is a code to move the cursor to the left
1147 edge of the current row, give this as <STRONG>cr</STRONG>. (Normally this
1148 will be carriage return, control M.) If there is a code
1149 to produce an audible signal (bell, beep, etc) give this
1150 as <STRONG>bel</STRONG>.
1152 If there is a code to move the cursor one position to the
1153 left (such as backspace) that capability should be given
1154 as <STRONG>cub1</STRONG>. Similarly, codes to move to the right, up, and
1155 down should be given as <STRONG>cuf1</STRONG>, <STRONG>cuu1</STRONG>, and <STRONG>cud1</STRONG>. These local
1156 cursor motions should not alter the text they pass over,
1157 for example, you would not normally use `<STRONG>cuf1</STRONG>= ' because
1158 the space would erase the character moved over.
1160 A very important point here is that the local cursor
1161 motions encoded in <EM>terminfo</EM> are undefined at the left and
1162 top edges of a CRT terminal. Programs should never
1163 attempt to backspace around the left edge, unless <STRONG>bw</STRONG> is
1164 given, and never attempt to go up locally off the top. In
1165 order to scroll text up, a program will go to the bottom
1166 left corner of the screen and send the <STRONG>ind</STRONG> (index) string.
1168 To scroll text down, a program goes to the top left corner
1169 of the screen and sends the <STRONG>ri</STRONG> (reverse index) string.
1170 The strings <STRONG>ind</STRONG> and <STRONG>ri</STRONG> are undefined when not on their
1171 respective corners of the screen.
1173 Parameterized versions of the scrolling sequences are <STRONG>indn</STRONG>
1174 and <STRONG>rin</STRONG> which have the same semantics as <STRONG>ind</STRONG> and <STRONG>ri</STRONG> except
1175 that they take one parameter, and scroll that many lines.
1176 They are also undefined except at the appropriate edge of
1179 The <STRONG>am</STRONG> capability tells whether the cursor sticks at the
1180 right edge of the screen when text is output, but this
1181 does not necessarily apply to a <STRONG>cuf1</STRONG> from the last column.
1182 The only local motion which is defined from the left edge
1183 is if <STRONG>bw</STRONG> is given, then a <STRONG>cub1</STRONG> from the left edge will
1184 move to the right edge of the previous row. If <STRONG>bw</STRONG> is not
1185 given, the effect is undefined. This is useful for draw-
1186 ing a box around the edge of the screen, for example. If
1187 the terminal has switch selectable automatic margins, the
1188 <EM>terminfo</EM> file usually assumes that this is on; i.e., <STRONG>am</STRONG>.
1189 If the terminal has a command which moves to the first
1190 column of the next line, that command can be given as <STRONG>nel</STRONG>
1191 (newline). It does not matter if the command clears the
1192 remainder of the current line, so if the terminal has no
1193 <STRONG>cr</STRONG> and <STRONG>lf</STRONG> it may still be possible to craft a working <STRONG>nel</STRONG>
1194 out of one or both of them.
1196 These capabilities suffice to describe hard-copy and
1197 "glass-tty" terminals. Thus the model 33 teletype is
1200 33|tty33|tty|model 33 teletype,
1201 bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,
1203 while the Lear Siegler ADM-3 is described as
1206 am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
1210 <STRONG>Parameterized</STRONG> <STRONG>Strings</STRONG>
1211 Cursor addressing and other strings requiring parameters
1212 in the terminal are described by a parameterized string
1213 capability, with <STRONG><A HREF="printf.3S.html">printf(3S)</A></STRONG> like escapes <STRONG>%x</STRONG> in it. For
1214 example, to address the cursor, the <STRONG>cup</STRONG> capability is
1215 given, using two parameters: the row and column to address
1216 to. (Rows and columns are numbered from zero and refer to
1217 the physical screen visible to the user, not to any unseen
1218 memory.) If the terminal has memory relative cursor
1219 addressing, that can be indicated by <STRONG>mrcup</STRONG>.
1221 The parameter mechanism uses a stack and special <STRONG>%</STRONG> codes
1222 to manipulate it. Typically a sequence will push one of
1223 the parameters onto the stack and then print it in some
1224 format. Often more complex operations are necessary.
1226 The <STRONG>%</STRONG> encodings have the following meanings:
1229 %<EM>[[</EM>:<EM>]flags][width[.precision]][</EM>doxXs<EM>]</EM>
1230 as in <STRONG>printf</STRONG>, flags are [-+#] and space
1231 %c print pop() like %c in printf()
1232 %s print pop() like %s in printf()
1234 %p[1-9] push <EM>i</EM>'th parm
1235 %P[a-z] set dynamic variable [a-z] to pop()
1236 %g[a-z] get dynamic variable [a-z] and push it
1237 %P[A-Z] set static variable [a-z] to pop()
1238 %g[A-Z] get static variable [a-z] and push it
1239 %'<EM>c</EM>' char constant <EM>c</EM>
1240 %{<EM>nn</EM>} integer constant <EM>nn</EM>
1244 arithmetic (%m is mod): push(pop() op pop())
1245 %& %| %^ bit operations: push(pop() op pop())
1246 %= %> %< logical operations: push(pop() op pop())
1247 %A, %O logical and & or operations (for conditionals)
1248 %! %~ unary operations push(op pop())
1249 %i add 1 to first two parameters (for ANSI terminals)
1251 %? expr %t thenpart %e elsepart %;
1252 if-then-else, %e elsepart is optional.
1253 else-if's are possible a la Algol 68:
1254 %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e %;
1255 ci are conditions, bi are bodies.
1257 Binary operations are in postfix form with the operands in
1258 the usual order. That is, to get x-5 one would use
1259 "%gx%{5}%-". %P and %g variables are persistent across
1260 escape-string evaluations.
1262 Consider the HP2645, which, to get to row 3 and column 12,
1263 needs to be sent \E&a12c03Y padded for 6 milliseconds.
1264 Note that the order of the rows and columns is inverted
1265 here, and that the row and column are printed as two dig-
1266 its. Thus its <STRONG>cup</STRONG> capability is "cup=6\E&%p2%2dc%p1%2dY".
1268 The Microterm ACT-IV needs the current row and column sent
1269 preceded by a <STRONG>^T</STRONG>, with the row and column simply encoded
1270 in binary, "cup=^T%p1%c%p2%c". Terminals which use "%c"
1271 need to be able to backspace the cursor (<STRONG>cub1</STRONG>), and to
1272 move the cursor up one line on the screen (<STRONG>cuu1</STRONG>). This is
1273 necessary because it is not always safe to transmit <STRONG>\n</STRONG> <STRONG>^D</STRONG>
1274 and <STRONG>\r</STRONG>, as the system may change or discard them. (The
1275 library routines dealing with terminfo set tty modes so
1276 that tabs are never expanded, so \t is safe to send. This
1277 turns out to be essential for the Ann Arbor 4080.)
1279 A final example is the LSI ADM-3a, which uses row and col-
1280 umn offset by a blank character, thus "cup=\E=%p1%'
1281 '%+%c%p2%' '%+%c". After sending `\E=', this pushes the
1282 first parameter, pushes the ASCII value for a space (32),
1283 adds them (pushing the sum on the stack in place of the
1284 two previous values) and outputs that value as a charac-
1285 ter. Then the same is done for the second parameter.
1286 More complex arithmetic is possible using the stack.
1289 <STRONG>Cursor</STRONG> <STRONG>Motions</STRONG>
1290 If the terminal has a fast way to home the cursor (to very
1291 upper left corner of screen) then this can be given as
1292 <STRONG>home</STRONG>; similarly a fast way of getting to the lower left-
1293 hand corner can be given as <STRONG>ll</STRONG>; this may involve going up
1294 with <STRONG>cuu1</STRONG> from the home position, but a program should
1295 never do this itself (unless <STRONG>ll</STRONG> does) because it can make
1296 no assumption about the effect of moving up from the home
1297 position. Note that the home position is the same as
1298 addressing to (0,0): to the top left corner of the screen,
1299 not of memory. (Thus, the \EH sequence on HP terminals
1300 cannot be used for <STRONG>home</STRONG>.)
1302 If the terminal has row or column absolute cursor address-
1303 ing, these can be given as single parameter capabilities
1304 <STRONG>hpa</STRONG> (horizontal position absolute) and <STRONG>vpa</STRONG> (vertical posi-
1305 tion absolute). Sometimes these are shorter than the more
1306 general two parameter sequence (as with the hp2645) and
1307 can be used in preference to <STRONG>cup</STRONG>. If there are parameter-
1308 ized local motions (e.g., move <EM>n</EM> spaces to the right)
1309 these can be given as <STRONG>cud</STRONG>, <STRONG>cub</STRONG>, <STRONG>cuf</STRONG>, and <STRONG>cuu</STRONG> with a single
1310 parameter indicating how many spaces to move. These are
1311 primarily useful if the terminal does not have <STRONG>cup</STRONG>, such
1312 as the TEKTRONIX 4025.
1314 If the terminal needs to be in a special mode when running
1315 a program that uses these capabilities, the codes to enter
1316 and exit this mode can be given as <STRONG>smcup</STRONG> and <STRONG>rmcup</STRONG>. This
1317 arises, for example, from terminals like the Concept with
1318 more than one page of memory. If the terminal has only
1319 memory relative cursor addressing and not screen relative
1320 cursor addressing, a one screen-sized window must be fixed
1321 into the terminal for cursor addressing to work properly.
1322 This is also used for the TEKTRONIX 4025, where <STRONG>smcup</STRONG> sets
1323 the command character to be the one used by terminfo. If
1324 the <STRONG>smcup</STRONG> sequence will not restore the screen after an
1325 <STRONG>rmcup</STRONG> sequence is output (to the state prior to outputting
1326 <STRONG>rmcup</STRONG>), specify <STRONG>nrrmc</STRONG>.
1329 <STRONG>Area</STRONG> <STRONG>Clears</STRONG>
1330 If the terminal can clear from the current position to the
1331 end of the line, leaving the cursor where it is, this
1332 should be given as <STRONG>el</STRONG>. If the terminal can clear from the
1333 beginning of the line to the current position inclusive,
1334 leaving the cursor where it is, this should be given as
1335 <STRONG>el1</STRONG>. If the terminal can clear from the current position
1336 to the end of the display, then this should be given as
1337 <STRONG>ed</STRONG>. <STRONG>Ed</STRONG> is only defined from the first column of a line.
1338 (Thus, it can be simulated by a request to delete a large
1339 number of lines, if a true <STRONG>ed</STRONG> is not available.)
1342 <STRONG>Insert/delete</STRONG> <STRONG>line</STRONG> <STRONG>and</STRONG> <STRONG>vertical</STRONG> <STRONG>motions</STRONG>
1343 If the terminal can open a new blank line before the line
1344 where the cursor is, this should be given as <STRONG>il1</STRONG>; this is
1345 done only from the first position of a line. The cursor
1346 must then appear on the newly blank line. If the terminal
1347 can delete the line which the cursor is on, then this
1348 should be given as <STRONG>dl1</STRONG>; this is done only from the first
1349 position on the line to be deleted. Versions of <STRONG>il1</STRONG> and
1350 <STRONG>dl1</STRONG> which take a single parameter and insert or delete
1351 that many lines can be given as <STRONG>il</STRONG> and <STRONG>dl</STRONG>.
1353 If the terminal has a settable scrolling region (like the
1354 vt100) the command to set this can be described with the
1355 <STRONG>csr</STRONG> capability, which takes two parameters: the top and
1356 bottom lines of the scrolling region. The cursor position
1357 is, alas, undefined after using this command.
1359 It is possible to get the effect of insert or delete line
1360 using <STRONG>csr</STRONG> on a properly chosen region; the <STRONG>sc</STRONG> and <STRONG>rc</STRONG> (save
1361 and restore cursor) commands may be useful for ensuring
1362 that your synthesized insert/delete string does not move
1363 the cursor. (Note that the <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> library does this
1364 synthesis automatically, so you need not compose
1365 insert/delete strings for an entry with <STRONG>csr</STRONG>).
1367 Yet another way to construct insert and delete might be to
1368 use a combination of index with the memory-lock feature
1369 found on some terminals (like the HP-700/90 series, which
1370 however also has insert/delete).
1372 Inserting lines at the top or bottom of the screen can
1373 also be done using <STRONG>ri</STRONG> or <STRONG>ind</STRONG> on many terminals without a
1374 true insert/delete line, and is often faster even on ter-
1375 minals with those features.
1377 The boolean <STRONG>non_dest_scroll_region</STRONG> should be set if each
1378 scrolling window is effectively a view port on a screen-
1379 sized canvas. To test for this capability, create a
1380 scrolling region in the middle of the screen, write some-
1381 thing to the bottom line, move the cursor to the top of
1382 the region, and do <STRONG>ri</STRONG> followed by <STRONG>dl1</STRONG> or <STRONG>ind</STRONG>. If the data
1383 scrolled off the bottom of the region by the <STRONG>ri</STRONG> re-
1384 appears, then scrolling is non-destructive. System V and
1385 XSI Curses expect that <STRONG>ind</STRONG>, <STRONG>ri</STRONG>, <STRONG>indn</STRONG>, and <STRONG>rin</STRONG> will simu-
1386 late destructive scrolling; their documentation cautions
1387 you not to define <STRONG>csr</STRONG> unless this is true. This <STRONG>curses</STRONG>
1388 implementation is more liberal and will do explicit erases
1389 after scrolling if <STRONG>ndstr</STRONG> is defined.
1391 If the terminal has the ability to define a window as part
1392 of memory, which all commands affect, it should be given
1393 as the parameterized string <STRONG>wind</STRONG>. The four parameters are
1394 the starting and ending lines in memory and the starting
1395 and ending columns in memory, in that order.
1397 If the terminal can retain display memory above, then the
1398 <STRONG>da</STRONG> capability should be given; if display memory can be
1399 retained below, then <STRONG>db</STRONG> should be given. These indicate
1400 that deleting a line or scrolling may bring non-blank
1401 lines up from below or that scrolling back with <STRONG>ri</STRONG> may
1402 bring down non-blank lines.
1405 <STRONG>Insert/Delete</STRONG> <STRONG>Character</STRONG>
1406 There are two basic kinds of intelligent terminals with
1407 respect to insert/delete character which can be described
1408 using <EM>terminfo.</EM> The most common insert/delete character
1409 operations affect only the characters on the current line
1410 and shift characters off the end of the line rigidly.
1411 Other terminals, such as the Concept 100 and the Perkin
1412 Elmer Owl, make a distinction between typed and untyped
1413 blanks on the screen, shifting upon an insert or delete
1414 only to an untyped blank on the screen which is either
1415 eliminated, or expanded to two untyped blanks. You can
1416 determine the kind of terminal you have by clearing the
1417 screen and then typing text separated by cursor motions.
1418 Type "abc def" using local cursor motions (not spaces)
1419 between the "abc" and the "def". Then position the cursor
1420 before the "abc" and put the terminal in insert mode. If
1421 typing characters causes the rest of the line to shift
1422 rigidly and characters to fall off the end, then your ter-
1423 minal does not distinguish between blanks and untyped
1424 positions. If the "abc" shifts over to the "def" which
1425 then move together around the end of the current line and
1426 onto the next as you insert, you have the second type of
1427 terminal, and should give the capability <STRONG>in</STRONG>, which stands
1428 for "insert null". While these are two logically separate
1429 attributes (one line versus multi-line insert mode, and
1430 special treatment of untyped spaces) we have seen no ter-
1431 minals whose insert mode cannot be described with the sin-
1434 Terminfo can describe both terminals which have an insert
1435 mode, and terminals which send a simple sequence to open a
1436 blank position on the current line. Give as <STRONG>smir</STRONG> the
1437 sequence to get into insert mode. Give as <STRONG>rmir</STRONG> the
1438 sequence to leave insert mode. Now give as <STRONG>ich1</STRONG> any
1439 sequence needed to be sent just before sending the charac-
1440 ter to be inserted. Most terminals with a true insert
1441 mode will not give <STRONG>ich1</STRONG>; terminals which send a sequence
1442 to open a screen position should give it here.
1444 If your terminal has both, insert mode is usually prefer-
1445 able to <STRONG>ich1</STRONG>. Technically, you should not give both
1446 unless the terminal actually requires both to be used in
1447 combination. Accordingly, some non-curses applications
1448 get confused if both are present; the symptom is doubled
1449 characters in an update using insert. This requirement is
1450 now rare; most <STRONG>ich</STRONG> sequences do not require previous smir,
1451 and most smir insert modes do not require <STRONG>ich1</STRONG> before each
1452 character. Therefore, the new <STRONG>curses</STRONG> actually assumes
1453 this is the case and uses either <STRONG>rmir</STRONG>/<STRONG>smir</STRONG> or <STRONG>ich</STRONG>/<STRONG>ich1</STRONG> as
1454 appropriate (but not both). If you have to write an entry
1455 to be used under new curses for a terminal old enough to
1456 need both, include the <STRONG>rmir</STRONG>/<STRONG>smir</STRONG> sequences in <STRONG>ich1</STRONG>.
1458 If post insert padding is needed, give this as a number of
1459 milliseconds in <STRONG>ip</STRONG> (a string option). Any other sequence
1460 which may need to be sent after an insert of a single
1461 character may also be given in <STRONG>ip</STRONG>. If your terminal needs
1462 both to be placed into an `insert mode' and a special code
1463 to precede each inserted character, then both <STRONG>smir</STRONG>/<STRONG>rmir</STRONG>
1464 and <STRONG>ich1</STRONG> can be given, and both will be used. The <STRONG>ich</STRONG>
1465 capability, with one parameter, <EM>n</EM>, will repeat the effects
1466 of <STRONG>ich1</STRONG> <EM>n</EM> times.
1468 If padding is necessary between characters typed while not
1469 in insert mode, give this as a number of milliseconds
1470 padding in <STRONG>rmp</STRONG>.
1472 It is occasionally necessary to move around while in
1473 insert mode to delete characters on the same line (e.g.,
1474 if there is a tab after the insertion position). If your
1475 terminal allows motion while in insert mode you can give
1476 the capability <STRONG>mir</STRONG> to speed up inserting in this case.
1477 Omitting <STRONG>mir</STRONG> will affect only speed. Some terminals
1478 (notably Datamedia's) must not have <STRONG>mir</STRONG> because of the way
1479 their insert mode works.
1481 Finally, you can specify <STRONG>dch1</STRONG> to delete a single charac-
1482 ter, <STRONG>dch</STRONG> with one parameter, <EM>n</EM>, to delete <EM>n</EM> <EM>characters,</EM>
1483 and delete mode by giving <STRONG>smdc</STRONG> and <STRONG>rmdc</STRONG> to enter and exit
1484 delete mode (any mode the terminal needs to be placed in
1485 for <STRONG>dch1</STRONG> to work).
1487 A command to erase <EM>n</EM> characters (equivalent to outputting
1488 <EM>n</EM> blanks without moving the cursor) can be given as <STRONG>ech</STRONG>
1492 <STRONG>Highlighting,</STRONG> <STRONG>Underlining,</STRONG> <STRONG>and</STRONG> <STRONG>Visible</STRONG> <STRONG>Bells</STRONG>
1493 If your terminal has one or more kinds of display
1494 attributes, these can be represented in a number of dif-
1495 ferent ways. You should choose one display form as <EM>stand-</EM>
1496 <EM>out</EM> <EM>mode</EM>, representing a good, high contrast, easy-on-the-
1497 eyes, format for highlighting error messages and other
1498 attention getters. (If you have a choice, reverse video
1499 plus half-bright is good, or reverse video alone.) The
1500 sequences to enter and exit standout mode are given as
1501 <STRONG>smso</STRONG> and <STRONG>rmso</STRONG>, respectively. If the code to change into
1502 or out of standout mode leaves one or even two blank
1503 spaces on the screen, as the TVI 912 and Teleray 1061 do,
1504 then <STRONG>xmc</STRONG> should be given to tell how many spaces are left.
1506 Codes to begin underlining and end underlining can be
1507 given as <STRONG>smul</STRONG> and <STRONG>rmul</STRONG> respectively. If the terminal has
1508 a code to underline the current character and move the
1509 cursor one space to the right, such as the Microterm Mime,
1510 this can be given as <STRONG>uc</STRONG>.
1512 Other capabilities to enter various highlighting modes
1513 include <STRONG>blink</STRONG> (blinking) <STRONG>bold</STRONG> (bold or extra bright) <STRONG>dim</STRONG>
1514 (dim or half-bright) <STRONG>invis</STRONG> (blanking or invisible text)
1515 <STRONG>prot</STRONG> (protected) <STRONG>rev</STRONG> (reverse video) <STRONG>sgr0</STRONG> (turn off <EM>all</EM>
1516 attribute modes) <STRONG>smacs</STRONG> (enter alternate character set
1517 mode) and <STRONG>rmacs</STRONG> (exit alternate character set mode).
1518 Turning on any of these modes singly may or may not turn
1521 If there is a sequence to set arbitrary combinations of
1522 modes, this should be given as <STRONG>sgr</STRONG> (set attributes), tak-
1523 ing 9 parameters. Each parameter is either 0 or nonzero,
1524 as the corresponding attribute is on or off. The 9 param-
1525 eters are, in order: standout, underline, reverse, blink,
1526 dim, bold, blank, protect, alternate character set. Not
1527 all modes need be supported by <STRONG>sgr</STRONG>, only those for which
1528 corresponding separate attribute commands exist.
1530 For example, the DEC vt220 supports most of the modes:
1532 <STRONG>tparm</STRONG> <STRONG>parameter</STRONG> <STRONG>attribute</STRONG> <STRONG>escape</STRONG> <STRONG>sequence</STRONG>
1535 p1 standout \E[0;1;7m
1536 p2 underline \E[0;4m
1539 p5 dim not available
1543 p9 altcharset ^O (off) ^N (on)
1545 We begin each escape sequence by turning off any existing
1546 modes, since there is no quick way to determine whether
1547 they are active. Standout is set up to be the combination
1548 of reverse and bold. The vt220 terminal has a protect
1549 mode, though it is not commonly used in sgr because it
1550 protects characters on the screen from the host's era-
1551 sures. The altcharset mode also is different in that it
1552 is either ^O or ^N, depending on whether it is off or on.
1553 If all modes are turned on, the resulting sequence is
1556 Some sequences are common to different modes. For exam-
1557 ple, ;7 is output when either p1 or p3 is true, that is,
1558 if either standout or reverse modes are turned on.
1560 Writing out the above sequences, along with their depen-
1563 <STRONG>sequence</STRONG> <STRONG>when</STRONG> <STRONG>to</STRONG> <STRONG>output</STRONG> <STRONG>terminfo</STRONG> <STRONG>translation</STRONG>
1566 ;1 if p1 or p6 %?%p1%p6%|%t;1%;
1567 ;4 if p2 %?%p2%|%t;4%;
1568 ;5 if p4 %?%p4%|%t;5%;
1569 ;7 if p1 or p3 %?%p1%p3%|%t;7%;
1570 ;8 if p7 %?%p7%|%t;8%;
1573 ^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%;
1575 Putting this all together into the sgr sequence gives:
1577 sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;
1578 %?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
1580 Remember that if you specify sgr, you must also specify
1583 Terminals with the ``magic cookie'' glitch (<STRONG>xmc</STRONG>) deposit
1584 special ``cookies'' when they receive mode-setting
1585 sequences, which affect the display algorithm rather than
1586 having extra bits for each character. Some terminals,
1587 such as the HP 2621, automatically leave standout mode
1588 when they move to a new line or the cursor is addressed.
1589 Programs using standout mode should exit standout mode
1590 before moving the cursor or sending a newline, unless the
1591 <STRONG>msgr</STRONG> capability, asserting that it is safe to move in
1592 standout mode, is present.
1594 If the terminal has a way of flashing the screen to indi-
1595 cate an error quietly (a bell replacement) then this can
1596 be given as <STRONG>flash</STRONG>; it must not move the cursor.
1598 If the cursor needs to be made more visible than normal
1599 when it is not on the bottom line (to make, for example, a
1600 non-blinking underline into an easier to find block or
1601 blinking underline) give this sequence as <STRONG>cvvis</STRONG>. If there
1602 is a way to make the cursor completely invisible, give
1603 that as <STRONG>civis</STRONG>. The capability <STRONG>cnorm</STRONG> should be given which
1604 undoes the effects of both of these modes.
1606 If your terminal correctly generates underlined characters
1607 (with no special codes needed) even though it does not
1608 overstrike, then you should give the capability <STRONG>ul</STRONG>. If a
1609 character overstriking another leaves both characters on
1610 the screen, specify the capability <STRONG>os</STRONG>. If overstrikes are
1611 erasable with a blank, then this should be indicated by
1612 giving <STRONG>eo</STRONG>.
1615 <STRONG>Keypad</STRONG> <STRONG>and</STRONG> <STRONG>Function</STRONG> <STRONG>Keys</STRONG>
1616 If the terminal has a keypad that transmits codes when the
1617 keys are pressed, this information can be given. Note
1618 that it is not possible to handle terminals where the key-
1619 pad only works in local (this applies, for example, to the
1620 unshifted HP 2621 keys). If the keypad can be set to
1621 transmit or not transmit, give these codes as <STRONG>smkx</STRONG> and
1622 <STRONG>rmkx</STRONG>. Otherwise the keypad is assumed to always transmit.
1623 The codes sent by the left arrow, right arrow, up arrow,
1624 down arrow, and home keys can be given as <STRONG>kcub1,</STRONG> <STRONG>kcuf1,</STRONG>
1625 <STRONG>kcuu1,</STRONG> <STRONG>kcud1,</STRONG> and <STRONG>khome</STRONG> respectively. If there are
1626 function keys such as f0, f1, ..., f10, the codes they
1627 send can be given as <STRONG>kf0,</STRONG> <STRONG>kf1,</STRONG> <STRONG>...,</STRONG> <STRONG>kf10</STRONG>. If these keys
1628 have labels other than the default f0 through f10, the
1629 labels can be given as <STRONG>lf0,</STRONG> <STRONG>lf1,</STRONG> <STRONG>...,</STRONG> <STRONG>lf10</STRONG>. The codes
1630 transmitted by certain other special keys can be given:
1631 <STRONG>kll</STRONG> (home down), <STRONG>kbs</STRONG> (backspace), <STRONG>ktbc</STRONG> (clear all tabs),
1632 <STRONG>kctab</STRONG> (clear the tab stop in this column), <STRONG>kclr</STRONG> (clear
1633 screen or erase key), <STRONG>kdch1</STRONG> (delete character), <STRONG>kdl1</STRONG>
1634 (delete line), <STRONG>krmir</STRONG> (exit insert mode), <STRONG>kel</STRONG> (clear to end
1635 of line), <STRONG>ked</STRONG> (clear to end of screen), <STRONG>kich1</STRONG> (insert
1636 character or enter insert mode), <STRONG>kil1</STRONG> (insert line), <STRONG>knp</STRONG>
1637 (next page), <STRONG>kpp</STRONG> (previous page), <STRONG>kind</STRONG> (scroll for-
1638 ward/down), <STRONG>kri</STRONG> (scroll backward/up), <STRONG>khts</STRONG> (set a tab stop
1639 in this column). In addition, if the keypad has a 3 by 3
1640 array of keys including the four arrow keys, the other
1641 five keys can be given as <STRONG>ka1</STRONG>, <STRONG>ka3</STRONG>, <STRONG>kb2</STRONG>, <STRONG>kc1</STRONG>, and <STRONG>kc3</STRONG>.
1642 These keys are useful when the effects of a 3 by 3 direc-
1643 tional pad are needed.
1645 Strings to program function keys can be given as <STRONG>pfkey</STRONG>,
1646 <STRONG>pfloc</STRONG>, and <STRONG>pfx</STRONG>. A string to program screen labels should
1647 be specified as <STRONG>pln</STRONG>. Each of these strings takes two
1648 parameters: the function key number to program (from 0 to
1649 10) and the string to program it with. Function key num-
1650 bers out of this range may program undefined keys in a
1651 terminal dependent manner. The difference between the
1652 capabilities is that <STRONG>pfkey</STRONG> causes pressing the given key
1653 to be the same as the user typing the given string; <STRONG>pfloc</STRONG>
1654 causes the string to be executed by the terminal in local;
1655 and <STRONG>pfx</STRONG> causes the string to be transmitted to the com-
1658 The capabilities <STRONG>nlab</STRONG>, <STRONG>lw</STRONG> and <STRONG>lh</STRONG> define the number of pro-
1659 grammable screen labels and their width and height. If
1660 there are commands to turn the labels on and off, give
1661 them in <STRONG>smln</STRONG> and <STRONG>rmln</STRONG>. <STRONG>smln</STRONG> is normally output after one
1662 or more pln sequences to make sure that the change becomes
1666 <STRONG>Tabs</STRONG> <STRONG>and</STRONG> <STRONG>Initialization</STRONG>
1667 If the terminal has hardware tabs, the command to advance
1668 to the next tab stop can be given as <STRONG>ht</STRONG> (usually control
1669 I). A ``back-tab'' command which moves leftward to the
1670 preceding tab stop can be given as <STRONG>cbt</STRONG>. By convention, if
1671 the teletype modes indicate that tabs are being expanded
1672 by the computer rather than being sent to the terminal,
1673 programs should not use <STRONG>ht</STRONG> or <STRONG>cbt</STRONG> even if they are pre-
1674 sent, since the user may not have the tab stops properly
1675 set. If the terminal has hardware tabs which are ini-
1676 tially set every <EM>n</EM> spaces when the terminal is powered up,
1677 the numeric parameter <STRONG>it</STRONG> is given, showing the number of
1678 spaces the tabs are set to. This is normally used by the
1679 <EM>tset</EM> command to determine whether to set the mode for
1680 hardware tab expansion, and whether to set the tab stops.
1681 If the terminal has tab stops that can be saved in non-
1682 volatile memory, the terminfo description can assume that
1683 they are properly set.
1685 Other capabilities include <STRONG>is1</STRONG>, <STRONG>is2</STRONG>, and <STRONG>is3</STRONG>, initializa-
1686 tion strings for the terminal, <STRONG>iprog</STRONG>, the path name of a
1687 program to be run to initialize the terminal, and <STRONG>if</STRONG>, the
1688 name of a file containing long initialization strings.
1689 These strings are expected to set the terminal into modes
1690 consistent with the rest of the terminfo description.
1691 They are normally sent to the terminal, by the <EM>init</EM> option
1692 of the <EM>tput</EM> program, each time the user logs in. They
1693 will be printed in the following order: run the program
1694 <STRONG>iprog</STRONG>; output <STRONG>is1</STRONG>; <STRONG>is2</STRONG>; set the margins using <STRONG>mgc</STRONG>, <STRONG>smgl</STRONG>
1695 and <STRONG>smgr</STRONG>; set tabs using <STRONG>tbc</STRONG> and <STRONG>hts</STRONG>; print the file <STRONG>if</STRONG>;
1696 and finally output <STRONG>is3</STRONG>.
1698 Most initialization is done with <STRONG>is2</STRONG>. Special terminal
1699 modes can be set up without duplicating strings by putting
1700 the common sequences in <STRONG>is2</STRONG> and special cases in <STRONG>is1</STRONG> and
1701 <STRONG>is3</STRONG>. A pair of sequences that does a harder reset from a
1702 totally unknown state can be analogously given as <STRONG>rs1</STRONG>,
1703 <STRONG>rs2</STRONG>, <STRONG>rf</STRONG>, and <STRONG>rs3</STRONG>, analogous to <STRONG>is2</STRONG> and <STRONG>if</STRONG>. These strings
1704 are output by the <EM>reset</EM> program, which is used when the
1705 terminal gets into a wedged state. Commands are normally
1706 placed in <STRONG>rs1</STRONG>, <STRONG>rs2</STRONG> <STRONG>rs3</STRONG> and <STRONG>rf</STRONG> only if they produce annoy-
1707 ing effects on the screen and are not necessary when log-
1708 ging in. For example, the command to set the vt100 into
1709 80-column mode would normally be part of <STRONG>is2</STRONG>, but it
1710 causes an annoying glitch of the screen and is not nor-
1711 mally needed since the terminal is usually already in 80
1714 If there are commands to set and clear tab stops, they can
1715 be given as <STRONG>tbc</STRONG> (clear all tab stops) and <STRONG>hts</STRONG> (set a tab
1716 stop in the current column of every row). If a more com-
1717 plex sequence is needed to set the tabs than can be
1718 described by this, the sequence can be placed in <STRONG>is2</STRONG> or
1719 <STRONG>if</STRONG>.
1721 <STRONG>Delays</STRONG> <STRONG>and</STRONG> <STRONG>Padding</STRONG>
1722 Many older and slower terminals don't support either
1723 XON/XOFF or DTR handshaking, including hard copy terminals
1724 and some very archaic CRTs (including, for example, DEC
1725 VT100s). These may require padding characters after cer-
1726 tain cursor motions and screen changes.
1728 If the terminal uses xon/xoff handshaking for flow control
1729 (that is, it automatically emits ^S back to the host when
1730 its input buffers are close to full), set <STRONG>xon</STRONG>. This capa-
1731 bility suppresses the emission of padding. You can also
1732 set it for memory-mapped console devices effectively that
1733 don't have a speed limit. Padding information should
1734 still be included so that routines can make better deci-
1735 sions about relative costs, but actual pad characters will
1738 If <STRONG>pb</STRONG> (padding baud rate) is given, padding is suppressed
1739 at baud rates below the value of <STRONG>pb</STRONG>. If the entry has no
1740 padding baud rate, then whether padding is emitted or not
1741 is completely controlled by <STRONG>xon</STRONG>.
1743 If the terminal requires other than a null (zero) charac-
1744 ter as a pad, then this can be given as <STRONG>pad</STRONG>. Only the
1745 first character of the <STRONG>pad</STRONG> string is used.
1748 <STRONG>Status</STRONG> <STRONG>Lines</STRONG>
1749 Some terminals have an extra `status line' which is not
1750 normally used by software (and thus not counted in the
1751 terminal's <STRONG>lines</STRONG> capability).
1753 The simplest case is a status line which is cursor-
1754 addressable but not part of the main scrolling region on
1755 the screen; the Heathkit H19 has a status line of this
1756 kind, as would a 24-line VT100 with a 23-line scrolling
1757 region set up on initialization. This situation is indi-
1758 cated by the <STRONG>hs</STRONG> capability.
1760 Some terminals with status lines need special sequences to
1761 access the status line. These may be expressed as a
1762 string with single parameter <STRONG>tsl</STRONG> which takes the cursor to
1763 a given zero-origin column on the status line. The capa-
1764 bility <STRONG>fsl</STRONG> must return to the main-screen cursor positions
1765 before the last <STRONG>tsl</STRONG>. You may need to embed the string
1766 values of <STRONG>sc</STRONG> (save cursor) and <STRONG>rc</STRONG> (restore cursor) in <STRONG>tsl</STRONG>
1767 and <STRONG>fsl</STRONG> to accomplish this.
1769 The status line is normally assumed to be the same width
1770 as the width of the terminal. If this is untrue, you can
1771 specify it with the numeric capability <STRONG>wsl</STRONG>.
1773 A command to erase or blank the status line may be speci-
1774 fied as <STRONG>dsl</STRONG>.
1776 The boolean capability <STRONG>eslok</STRONG> specifies that escape
1777 sequences, tabs, etc., work ordinarily in the status line.
1779 The <STRONG>ncurses</STRONG> implementation does not yet use any of these
1780 capabilities. They are documented here in case they ever
1784 <STRONG>Line</STRONG> <STRONG>Graphics</STRONG>
1785 Many terminals have alternate character sets useful for
1786 forms-drawing. Terminfo and <STRONG>curses</STRONG> build in support for
1787 the drawing characters supported by the VT100, with some
1788 characters from the AT&T 4410v1 added. This alternate
1789 character set may be specified by the <STRONG>acsc</STRONG> capability.
1791 <STRONG>Glyph</STRONG> <STRONG>ACS</STRONG> <STRONG>Ascii</STRONG> <STRONG>VT100</STRONG>
1792 <STRONG>Name</STRONG> <STRONG>Name</STRONG> <STRONG>Default</STRONG> <STRONG>Name</STRONG>
1793 UK pound sign ACS_STERLING f }
1794 arrow pointing down ACS_DARROW v .
1795 arrow pointing left ACS_LARROW < ,
1796 arrow pointing right ACS_RARROW > +
1797 arrow pointing up ACS_UARROW ^ -
1798 board of squares ACS_BOARD # h
1799 bullet ACS_BULLET o ~
1800 checker board (stipple) ACS_CKBOARD : a
1801 degree symbol ACS_DEGREE \ f
1802 diamond ACS_DIAMOND + `
1803 greater-than-or-equal-to ACS_GEQUAL > z
1805 horizontal line ACS_HLINE - q
1806 lantern symbol ACS_LANTERN # i
1807 large plus or crossover ACS_PLUS + n
1808 less-than-or-equal-to ACS_LEQUAL < y
1809 lower left corner ACS_LLCORNER + m
1810 lower right corner ACS_LRCORNER + j
1811 not-equal ACS_NEQUAL ! |
1812 plus/minus ACS_PLMINUS # g
1813 scan line 1 ACS_S1 ~ o
1814 scan line 3 ACS_S3 - p
1815 scan line 7 ACS_S7 - r
1816 scan line 9 ACS_S9 _ s
1817 solid square block ACS_BLOCK # 0
1818 tee pointing down ACS_TTEE + w
1819 tee pointing left ACS_RTEE + u
1820 tee pointing right ACS_LTEE + t
1821 tee pointing up ACS_BTEE + v
1822 upper left corner ACS_ULCORNER + l
1823 upper right corner ACS_URCORNER + k
1824 vertical line ACS_VLINE | x
1826 The best way to define a new device's graphics set is to
1827 add a column to a copy of this table for your terminal,
1828 giving the character which (when emitted between
1829 <STRONG>smacs</STRONG>/<STRONG>rmacs</STRONG> switches) will be rendered as the correspond-
1830 ing graphic. Then read off the VT100/your terminal char-
1831 acter pairs right to left in sequence; these become the
1835 <STRONG>Color</STRONG> <STRONG>Handling</STRONG>
1836 Most color terminals are either `Tektronix-like' or `HP-
1837 like'. Tektronix-like terminals have a predefined set of
1838 N colors (where N usually 8), and can set character-cell
1839 foreground and background characters independently, mixing
1840 them into N * N color-pairs. On HP-like terminals, the
1841 use must set each color pair up separately (foreground and
1842 background are not independently settable). Up to M
1843 color-pairs may be set up from 2*M different colors.
1844 ANSI-compatible terminals are Tektronix-like.
1846 Some basic color capabilities are independent of the color
1847 method. The numeric capabilities <STRONG>colors</STRONG> and <STRONG>pairs</STRONG> specify
1848 the maximum numbers of colors and color-pairs that can be
1849 displayed simultaneously. The <STRONG>op</STRONG> (original pair) string
1850 resets foreground and background colors to their default
1851 values for the terminal. The <STRONG>oc</STRONG> string resets all colors
1852 or color-pairs to their default values for the terminal.
1853 Some terminals (including many PC terminal emulators)
1854 erase screen areas with the current background color
1855 rather than the power-up default background; these should
1856 have the boolean capability <STRONG>bce</STRONG>.
1858 To change the current foreground or background color on a
1859 Tektronix-type terminal, use <STRONG>setaf</STRONG> (set ANSI foreground)
1860 and <STRONG>setab</STRONG> (set ANSI background) or <STRONG>setf</STRONG> (set foreground)
1861 and <STRONG>setb</STRONG> (set background). These take one parameter, the
1862 color number. The SVr4 documentation describes only
1863 <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>; the XPG4 draft says that "If the terminal
1864 supports ANSI escape sequences to set background and fore-
1865 ground, they should be coded as <STRONG>setaf</STRONG> and <STRONG>setab</STRONG>, respec-
1866 tively. If the terminal supports other escape sequences
1867 to set background and foreground, they should be coded as
1868 <STRONG>setf</STRONG> and <STRONG>setb</STRONG>, respectively. The <EM>vidputs()</EM> function and
1869 the refresh functions use <STRONG>setaf</STRONG> and <STRONG>setab</STRONG> if they are
1872 The <STRONG>setaf</STRONG>/<STRONG>setab</STRONG> and <STRONG>setf</STRONG>/<STRONG>setb</STRONG> capabilities take a single
1873 numeric argument each. Argument values 0-7 are portably
1874 defined as follows (the middle column is the symbolic
1875 #define available in the header for the <STRONG>curses</STRONG> or <STRONG>ncurses</STRONG>
1876 libraries). The terminal hardware is free to map these as
1877 it likes, but the RGB values indicate normal locations in
1880 <STRONG>Color</STRONG> <STRONG>#define</STRONG> <STRONG>Value</STRONG> <STRONG>RGB</STRONG>
1881 black <STRONG>COLOR_BLACK</STRONG> 0 0, 0, 0
1882 red <STRONG>COLOR_RED</STRONG> 1 max,0,0
1883 green <STRONG>COLOR_GREEN</STRONG> 2 0,max,0
1884 yellow <STRONG>COLOR_YELLOW</STRONG> 3 max,max,0
1885 blue <STRONG>COLOR_BLUE</STRONG> 4 0,0,max
1886 magenta <STRONG>COLOR_MAGENTA</STRONG> 5 max,0,max
1887 cyan <STRONG>COLOR_CYAN</STRONG> 6 0,max,max
1888 white <STRONG>COLOR_WHITE</STRONG> 7 max,max,max
1890 On an HP-like terminal, use <STRONG>scp</STRONG> with a color-pair number
1891 parameter to set which color pair is current.
1893 On a Tektronix-like terminal, the capability <STRONG>ccc</STRONG> may be
1894 present to indicate that colors can be modified. If so,
1895 the <STRONG>initc</STRONG> capability will take a color number (0 to <STRONG>colors</STRONG>
1896 - 1)and three more parameters which describe the color.
1897 These three parameters default to being interpreted as RGB
1898 (Red, Green, Blue) values. If the boolean capability <STRONG>hls</STRONG>
1899 is present, they are instead as HLS (Hue, Lightness, Satu-
1900 ration) indices. The ranges are terminal-dependent.
1902 On an HP-like terminal, <STRONG>initp</STRONG> may give a capability for
1903 changing a color-pair value. It will take seven parame-
1904 ters; a color-pair number (0 to <STRONG>max_pairs</STRONG> - 1), and two
1905 triples describing first background and then foreground
1906 colors. These parameters must be (Red, Green, Blue) or
1907 (Hue, Lightness, Saturation) depending on <STRONG>hls</STRONG>.
1909 On some color terminals, colors collide with highlights.
1910 You can register these collisions with the <STRONG>ncv</STRONG> capability.
1911 This is a bit-mask of attributes not to be used when col-
1912 ors are enabled. The correspondence with the attributes
1913 understood by <STRONG>curses</STRONG> is as follows:
1915 <STRONG>Attribute</STRONG> <STRONG>Bit</STRONG> <STRONG>Decimal</STRONG>
1926 For example, on many IBM PC consoles, the underline
1927 attribute collides with the foreground color blue and is
1928 not available in color mode. These should have an <STRONG>ncv</STRONG>
1931 SVr4 curses does nothing with <STRONG>ncv</STRONG>, ncurses recognizes it
1932 and optimizes the output in favor of colors.
1935 <STRONG>Miscellaneous</STRONG>
1936 If the terminal requires other than a null (zero) charac-
1937 ter as a pad, then this can be given as pad. Only the
1938 first character of the pad string is used. If the termi-
1939 nal does not have a pad character, specify npc. Note that
1940 ncurses implements the termcap-compatible <STRONG>PC</STRONG> variable;
1941 though the application may set this value to something
1942 other than a null, ncurses will test <STRONG>npc</STRONG> first and use
1943 napms if the terminal has no pad character.
1945 If the terminal can move up or down half a line, this can
1946 be indicated with <STRONG>hu</STRONG> (half-line up) and <STRONG>hd</STRONG> (half-line
1947 down). This is primarily useful for superscripts and sub-
1948 scripts on hard-copy terminals. If a hard-copy terminal
1949 can eject to the next page (form feed), give this as <STRONG>ff</STRONG>
1950 (usually control L).
1952 If there is a command to repeat a given character a given
1953 number of times (to save time transmitting a large number
1954 of identical characters) this can be indicated with the
1955 parameterized string <STRONG>rep</STRONG>. The first parameter is the
1956 character to be repeated and the second is the number of
1957 times to repeat it. Thus, tparm(repeat_char, 'x', 10) is
1958 the same as `xxxxxxxxxx'.
1960 If the terminal has a settable command character, such as
1961 the TEKTRONIX 4025, this can be indicated with <STRONG>cmdch</STRONG>. A
1962 prototype command character is chosen which is used in all
1963 capabilities. This character is given in the <STRONG>cmdch</STRONG> capa-
1964 bility to identify it. The following convention is sup-
1965 ported on some UNIX systems: The environment is to be
1966 searched for a <STRONG>CC</STRONG> variable, and if found, all occurrences
1967 of the prototype character are replaced with the character
1968 in the environment variable.
1970 Terminal descriptions that do not represent a specific
1971 kind of known terminal, such as <EM>switch</EM>, <EM>dialup</EM>, <EM>patch</EM>, and
1972 <EM>network</EM>, should include the <STRONG>gn</STRONG> (generic) capability so
1973 that programs can complain that they do not know how to
1974 talk to the terminal. (This capability does not apply to
1975 <EM>virtual</EM> terminal descriptions for which the escape
1976 sequences are known.)
1978 If the terminal has a ``meta key'' which acts as a shift
1979 key, setting the 8th bit of any character transmitted,
1980 this fact can be indicated with <STRONG>km</STRONG>. Otherwise, software
1981 will assume that the 8th bit is parity and it will usually
1982 be cleared. If strings exist to turn this ``meta mode''
1983 on and off, they can be given as <STRONG>smm</STRONG> and <STRONG>rmm</STRONG>.
1985 If the terminal has more lines of memory than will fit on
1986 the screen at once, the number of lines of memory can be
1987 indicated with <STRONG>lm</STRONG>. A value of <STRONG>lm</STRONG>#0 indicates that the
1988 number of lines is not fixed, but that there is still more
1989 memory than fits on the screen.
1991 If the terminal is one of those supported by the UNIX vir-
1992 tual terminal protocol, the terminal number can be given
1993 as <STRONG>vt</STRONG>.
1995 Media copy strings which control an auxiliary printer con-
1996 nected to the terminal can be given as <STRONG>mc0</STRONG>: print the con-
1997 tents of the screen, <STRONG>mc4</STRONG>: turn off the printer, and <STRONG>mc5</STRONG>:
1998 turn on the printer. When the printer is on, all text
1999 sent to the terminal will be sent to the printer. It is
2000 undefined whether the text is also displayed on the termi-
2001 nal screen when the printer is on. A variation <STRONG>mc5p</STRONG> takes
2002 one parameter, and leaves the printer on for as many char-
2003 acters as the value of the parameter, then turns the
2004 printer off. The parameter should not exceed 255. All
2005 text, including <STRONG>mc4</STRONG>, is transparently passed to the
2006 printer while an <STRONG>mc5p</STRONG> is in effect.
2009 <STRONG>Glitches</STRONG> <STRONG>and</STRONG> <STRONG>Braindamage</STRONG>
2010 Hazeltine terminals, which do not allow `~' characters to
2011 be displayed should indicate <STRONG>hz</STRONG>.
2013 Terminals which ignore a line-feed immediately after an <STRONG>am</STRONG>
2014 wrap, such as the Concept and vt100, should indicate <STRONG>xenl</STRONG>.
2016 If <STRONG>el</STRONG> is required to get rid of standout (instead of
2017 merely writing normal text on top of it), <STRONG>xhp</STRONG> should be
2020 Teleray terminals, where tabs turn all characters moved
2021 over to blanks, should indicate <STRONG>xt</STRONG> (destructive tabs).
2022 Note: the variable indicating this is now
2023 `dest_tabs_magic_smso'; in older versions, it was tel-
2024 eray_glitch. This glitch is also taken to mean that it is
2025 not possible to position the cursor on top of a ``magic
2026 cookie'', that to erase standout mode it is instead neces-
2027 sary to use delete and insert line. The ncurses implemen-
2028 tation ignores this glitch.
2030 The Beehive Superbee, which is unable to correctly trans-
2031 mit the escape or control C characters, has <STRONG>xsb</STRONG>, indicat-
2032 ing that the f1 key is used for escape and f2 for control
2033 C. (Only certain Superbees have this problem, depending
2034 on the ROM.) Note that in older terminfo versions, this
2035 capability was called `beehive_glitch'; it is now
2038 Other specific terminal problems may be corrected by
2039 adding more capabilities of the form <STRONG>x</STRONG><EM>x</EM>.
2042 <STRONG>Similar</STRONG> <STRONG>Terminals</STRONG>
2043 If there are two very similar terminals, one (the variant)
2044 can be defined as being just like the other (the base)
2045 with certain exceptions. In the definition of the vari-
2046 ant, the string capability <STRONG>use</STRONG> can be given with the name
2047 of the base terminal. The capabilities given before <STRONG>use</STRONG>
2048 override those in the base type named by <STRONG>use</STRONG>. If there
2049 are multiple <STRONG>use</STRONG> capabilities, they are merged in reverse
2050 order. That is, the rightmost <STRONG>use</STRONG> reference is processed
2051 first, then the one to its left, and so forth. Capabili-
2052 ties given explicitly in the entry override those brought
2053 in by <STRONG>use</STRONG> references.
2055 A capability can be canceled by placing <STRONG>xx@</STRONG> to the left of
2056 the use reference that imports it, where <EM>xx</EM> is the capa-
2057 bility. For example, the entry
2058 2621-nl, smkx@, rmkx@, use=2621,
2060 defines a 2621-nl that does not have the <STRONG>smkx</STRONG> or <STRONG>rmkx</STRONG>
2061 capabilities, and hence does not turn on the function key
2062 labels when in visual mode. This is useful for different
2063 modes for a terminal, or for different user preferences.
2066 <STRONG>Pitfalls</STRONG> <STRONG>of</STRONG> <STRONG>Long</STRONG> <STRONG>Entries</STRONG>
2067 Long terminfo entries are unlikely to be a problem; to
2068 date, no entry has even approached terminfo's 4K string-
2069 table maximum. Unfortunately, the termcap translations
2070 are much more strictly limited (to 1K), thus termcap
2071 translations of long terminfo entries can cause problems.
2073 The man pages for 4.3BSD and older versions of tgetent()
2074 instruct the user to allocate a 1K buffer for the termcap
2075 entry. The entry gets null-terminated by the termcap
2076 library, so that makes the maximum safe length for a term-
2077 cap entry 1k-1 (1023) bytes. Depending on what the appli-
2078 cation and the termcap library being used does, and where
2079 in the termcap file the terminal type that tgetent() is
2080 searching for is, several bad things can happen.
2082 Some termcap libraries print a warning message or exit if
2083 they find an entry that's longer than 1023 bytes; others
2084 don't; others truncate the entries to 1023 bytes. Some
2085 application programs allocate more than the recommended 1K
2086 for the termcap entry; others don't.
2088 Each termcap entry has two important sizes associated with
2089 it: before "tc" expansion, and after "tc" expansion. "tc"
2090 is the capability that tacks on another termcap entry to
2091 the end of the current one, to add on its capabilities.
2092 If a termcap entry doesn't use the "tc" capability, then
2093 of course the two lengths are the same.
2095 The "before tc expansion" length is the most important
2096 one, because it affects more than just users of that par-
2097 ticular terminal. This is the length of the entry as it
2098 exists in /etc/termcap, minus the backslash-newline pairs,
2099 which tgetent() strips out while reading it. Some termcap
2100 libraries strip off the final newline, too (GNU termcap
2101 does not). Now suppose:
2103 * a termcap entry before expansion is more than 1023
2106 * and the application has only allocated a 1k buffer,
2108 * and the termcap library (like the one in BSD/OS 1.1
2109 and GNU) reads the whole entry into the buffer, no
2110 matter what its length, to see if it's the entry it
2113 * and tgetent() is searching for a terminal type that
2114 either is the long entry, appears in the termcap file
2115 after the long entry, or doesn't appear in the file
2116 at all (so that tgetent() has to search the whole
2119 Then tgetent() will overwrite memory, perhaps its stack,
2120 and probably core dump the program. Programs like telnet
2121 are particularly vulnerable; modern telnets pass along
2122 values like the terminal type automatically. The results
2123 are almost as undesirable with a termcap library, like
2124 SunOS 4.1.3 and Ultrix 4.4, that prints warning messages
2125 when it reads an overly long termcap entry. If a termcap
2126 library truncates long entries, like OSF/1 3.0, it is
2127 immune to dying here but will return incorrect data for
2130 The "after tc expansion" length will have a similar effect
2131 to the above, but only for people who actually set TERM to
2132 that terminal type, since tgetent() only does "tc" expan-
2133 sion once it's found the terminal type it was looking for,
2134 not while searching.
2136 In summary, a termcap entry that is longer than 1023 bytes
2137 can cause, on various combinations of termcap libraries
2138 and applications, a core dump, warnings, or incorrect
2139 operation. If it's too long even before "tc" expansion,
2140 it will have this effect even for users of some other ter-
2141 minal types and users whose TERM variable does not have a
2144 When in -C (translate to termcap) mode, the <STRONG>ncurses</STRONG> imple-
2145 mentation of <STRONG><A HREF="tic.1.html">tic(1)</A></STRONG> issues warning messages when the pre-
2146 tc length of a termcap translation is too long. The -c
2147 (check) option also checks resolved (after tc expansion)
2150 <STRONG>Binary</STRONG> <STRONG>Compatibility</STRONG>
2151 It is not wise to count on portability of binary terminfo
2152 entries between commercial UNIX versions. The problem is
2153 that there are at least two versions of terminfo (under
2154 HP-UX and AIX) which diverged from System V terminfo after
2155 SVr1, and have added extension capabilities to the string
2156 table that (in the binary format) collide with System V
2157 and XSI Curses extensions.
2161 <H2>EXTENSIONS</H2><PRE>
2162 Some SVr4 <STRONG>curses</STRONG> implementations, and all previous to
2163 SVr4, don't interpret the %A and %O operators in parameter
2166 SVr4/XPG4 do not specify whether <STRONG>msgr</STRONG> licenses movement
2167 while in an alternate-character-set mode (such modes may,
2168 among other things, map CR and NL to characters that don't
2169 trigger local motions). The <STRONG>ncurses</STRONG> implementation
2170 ignores <STRONG>msgr</STRONG> in <STRONG>ALTCHARSET</STRONG> mode. This raises the possi-
2171 bility that an XPG4 implementation making the opposite
2172 interpretation may need terminfo entries made for <STRONG>ncurses</STRONG>
2173 to have <STRONG>msgr</STRONG> turned off.
2175 The <STRONG>ncurses</STRONG> library handles insert-character and insert-
2176 character modes in a slightly non-standard way to get bet-
2177 ter update efficiency. See the <STRONG>Insert/Delete</STRONG> <STRONG>Character</STRONG>
2180 The parameter substitutions for <STRONG>set_clock</STRONG> and <STRONG>dis-</STRONG>
2181 <STRONG>play_clock</STRONG> are not documented in SVr4 or the XSI Curses
2182 standard. They are deduced from the documentation for the
2183 AT&T 505 terminal.
2185 Be careful assigning the <STRONG>kmous</STRONG> capability. The <STRONG>ncurses</STRONG>
2186 wants to interpret it as <STRONG>KEY_MOUSE</STRONG>, for use by terminals
2187 and emulators like xterm that can return mouse-tracking
2188 information in the keyboard-input stream.
2190 Different commercial ports of terminfo and curses support
2191 different subsets of the XSI Curses standard and (in some
2192 cases) different extension sets. Here is a summary, accu-
2193 rate as of October 1995:
2195 <STRONG>SVR4,</STRONG> <STRONG>Solaris,</STRONG> <STRONG>ncurses</STRONG> -- These support all SVr4 capabili-
2198 <STRONG>SGI</STRONG> -- Supports the SVr4 set, adds one undocumented
2199 extended string capability (<STRONG>set_pglen</STRONG>).
2201 <STRONG>SVr1,</STRONG> <STRONG>Ultrix</STRONG> -- These support a restricted subset of ter-
2202 minfo capabilities. The booleans end with <STRONG>xon_xoff</STRONG>; the
2203 numerics with <STRONG>width_status_line</STRONG>; and the strings with
2204 <STRONG>prtr_non</STRONG>.
2206 <STRONG>HP/UX</STRONG> -- Supports the SVr1 subset, plus the SVr[234]
2207 numerics <STRONG>num_labels</STRONG>, <STRONG>label_height</STRONG>, <STRONG>label_width</STRONG>, plus func-
2208 tion keys 11 through 63, plus <STRONG>plab_norm</STRONG>, <STRONG>label_on</STRONG>, and
2209 <STRONG>label_off</STRONG>, plus some incompatible extensions in the string
2212 <STRONG>AIX</STRONG> -- Supports the SVr1 subset, plus function keys 11
2213 through 63, plus a number of incompatible string table
2216 <STRONG>OSF</STRONG> -- Supports both the SVr4 set and the AIX extensions.
2221 /usr/share/terminfo/?/* files containing terminal
2227 <H2>SEE ALSO</H2><PRE>
2228 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="printf.3S.html">printf(3S)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.
2232 <H2>AUTHORS</H2><PRE>
2233 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
2234 Based on pcurses by Pavel Curtis.
2286 Man(1) output converted with
2287 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>