X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fterminfo.5.html;h=56b6b3979d7ebabfb3cc8681e58ec8802578a2a3;hp=0a503be34a520e9c91b6b525f299328ec7aa7ea9;hb=3ec8f79f3ceda990461c80de2f96d66b886e00d5;hpb=a8987e73ec254703634802b4f7ee30d3a485524d diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html index 0a503be3..56b6b397 100644 --- a/doc/html/man/terminfo.5.html +++ b/doc/html/man/terminfo.5.html @@ -6,7 +6,7 @@ * Note: this must be run through tbl before nroff. * The magic cookie on the first line triggers this under some man programs. **************************************************************************** - * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,24 +32,30 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: terminfo.head,v 1.10 2002/08/17 23:37:10 tom Exp @ + * @Id: terminfo.head,v 1.15 2006/12/24 18:04:42 tom Exp @ * Head of terminfo man page ends here - * @Id: terminfo.tail,v 1.38 2003/01/05 22:47:05 tom Exp @ + * @Id: terminfo.tail,v 1.47 2006/12/24 18:14:22 tom Exp @ * Beginning of terminfo.tail file + * This file is part of ncurses. + * See "terminfo.head" for copyright. + *.in -2 + *.in +2 + *.in -2 + *.in +2 *.TH -->
--TERMINFO(5) File Formats TERMINFO(5) +terminfo(5) File Formats terminfo(5) @@ -71,31 +77,43 @@ libraries such as curses(3x). Terminfo describes termi- nals by giving a set of capabilities which they have, by specifying how to perform screen operations, and by speci- - fying padding requirements and initialization sequences. + fying padding requirements and initialization sequences. + This describes ncurses version 5.6 (patch 20070303). Entries in terminfo consist of a sequence of `,' separated fields (embedded commas may be escaped with a backslash or - notated as \054). White space after the `,' separator is - ignored. The first entry for each terminal gives the - names which are known for the terminal, separated by `|' - characters. The first name given is the most common - abbreviation for the terminal, the last name given should - be a long name fully identifying the terminal, and all - others are understood as synonyms for the terminal name. + notated as \054). White space after the `,' separator is + ignored. The first entry for each terminal gives the + names which are known for the terminal, separated by `|' + characters. The first name given is the most common + abbreviation for the terminal, the last name given should + be a long name fully identifying the terminal, and all + others are understood as synonyms for the terminal name. All names but the last should be in lower case and contain - no blanks; the last name may well contain upper case and + no blanks; the last name may well contain upper case and blanks for readability. + Lines beginning with a `#' in the first column are treated + as comments. While comment lines are legal at any point, + the output of captoinfo and infotocap (aliases for tic) + will move comments so they occur only between entries. + + Newlines and leading tabs may be used for formatting + entries for readability. These are removed from parsed + entries. The infocmp -f option relies on this to format + if-then-else expressions: the result can be read by tic. + Terminal names (except for the last, verbose entry) should be chosen using the following conventions. The particular - piece of hardware making up the terminal should have a - root name, thus ``hp2621''. This name should not contain + piece of hardware making up the terminal should have a + root name, thus ``hp2621''. This name should not contain hyphens. Modes that the hardware can be in, or user pref- - erences, should be indicated by appending a hyphen and a - mode suffix. Thus, a vt100 in 132 column mode would be + erences, should be indicated by appending a hyphen and a + mode suffix. Thus, a vt100 in 132 column mode would be vt100-w. The following suffixes should be used where pos- sible: + Suffix Meaning Example -nn Number of lines on the screen aaa-60 -np Number of pages of memory c100-4p @@ -108,47 +126,48 @@ -ns No status line hp2626-ns -rv Reverse video c100-rv -s Enable status line vt100-s + -vb Use visible bell instead of beep wy370-vb -w Wide mode (> 80 columns, usually 132) vt100-w - For more on terminal naming conventions, see the term(7) + For more on terminal naming conventions, see the term(7) manual page. Capabilities - The following is a complete table of the capabilities - included in a terminfo description block and available to + The following is a complete table of the capabilities + included in a terminfo description block and available to terminfo-using code. In each line of the table, - The variable is the name by which the programmer (at the + The variable is the name by which the programmer (at the terminfo level) accesses the capability. - The capname is the short name used in the text of the - database, and is used by a person updating the database. - Whenever possible, capnames are chosen to be the same as + The capname is the short name used in the text of the + database, and is used by a person updating the database. + Whenever possible, capnames are chosen to be the same as or similar to the ANSI X3.64-1979 standard (now superseded - by ECMA-48, which uses identical or very similar names). + by ECMA-48, which uses identical or very similar names). Semantics are also intended to match those of the specifi- cation. - The termcap code is the old termcap capability name (some + The termcap code is the old termcap capability name (some capabilities are new, and have names which termcap did not originate). - Capability names have no hard length limit, but an infor- - mal limit of 5 characters has been adopted to keep them - short and to allow the tabs in the source file Caps to + Capability names have no hard length limit, but an infor- + mal limit of 5 characters has been adopted to keep them + short and to allow the tabs in the source file Caps to line up nicely. - Finally, the description field attempts to convey the - semantics of the capability. You may find some codes in + Finally, the description field attempts to convey the + semantics of the capability. You may find some codes in the description field: (P) indicates that padding may be specified - #[1-9] in the description field indicates that the string + #[1-9] in the description field indicates that the string is passed through tparm with parms as given (#i). - (P*) indicates that padding may vary in proportion to + (P*) indicates that padding may vary in proportion to the number of lines affected (#i) indicates the ith parameter. @@ -156,6 +175,7 @@ These are the boolean capabilities: + Variable Cap- TCap Description Booleans name Code auto_left_margin bw bw cub1 wraps from col- @@ -171,6 +191,8 @@ by overwriting (hp) col_addr_glitch xhpa YA only positive motion for hpa/mhpa caps + + cpi_changes_res cpix YF changing character pitch changes reso- lution @@ -186,7 +208,6 @@ strikes with a blank generic_type gn gn generic line type hard_copy hc hc hardcopy terminal - hard_cursor chts HC cursor is hard to see has_meta_key km km Has a meta key @@ -236,6 +257,8 @@ on the status line tilde_glitch hz hz cannot print ~'s (hazeltine) + + transparent_underline ul ul underline character overstrikes xon_xoff xon xo terminal uses @@ -243,6 +266,7 @@ These are the numeric capabilities: + Variable Cap- TCap Description Numeric name Code columns cols co number of columns in @@ -252,7 +276,6 @@ label_height lh lh rows in each label label_width lw lw columns in each label - lines lines li number of lines on screen or page lines_of_memory lm lm lines of memory if > @@ -282,10 +305,11 @@ width_status_line wsl ws number of columns in status line - The following numeric capabilities are present in the - SVr4.0 term structure, but are not yet documented in the + The following numeric capabilities are present in the + SVr4.0 term structure, but are not yet documented in the man page. They came in with SVr4's printer support. + Variable Cap- TCap Description Numeric name Code bit_image_entwining bitwin Yo number of passes for @@ -300,6 +324,7 @@ dot_horz_spacing spinh Yc spacing of dots hor- izontally in dots per inch + dot_vert_spacing spinv Yb spacing of pins ver- tically in pins per inch @@ -316,9 +341,6 @@ output_res_char orc Yi horizontal resolu- tion in units per line - - - output_res_horz_inch orhi Yk horizontal resolu- tion in units per inch @@ -334,6 +356,7 @@ These are the string capabilities: + Variable Cap- TCap Description String name Code acs_chars acsc ac graphics charset @@ -366,6 +389,8 @@ home cursor (P*) clr_bol el1 cb Clear to beginning of line + + clr_eol el ce clear to end of line (P) clr_eos ed cd clear to end of @@ -384,7 +409,6 @@ cup) cursor_invisible civis vi make cursor invisi- ble - cursor_left cub1 le move left one space cursor_mem_address mrcup CM memory relative cur- sor addressing, move @@ -432,6 +456,7 @@ enter_italics_mode sitm ZH Enter italic mode enter_leftward_mode slm ZI Start leftward car- riage motion + enter_micro_mode smicm ZJ Start micro-motion mode enter_near_letter_quality snlq ZK Enter NLQ mode @@ -450,7 +475,6 @@ enter_subscript_mode ssubm ZN Enter subscript mode enter_superscript_mode ssupm ZO Enter superscript mode - enter_underline_mode smul us begin underline mode enter_upward_mode sum ZP Start upward car- riage motion @@ -498,6 +522,7 @@ string init_2string is2 is initialization string + init_3string is3 i3 initialization string init_file if if name of initializa- @@ -515,8 +540,6 @@ insert_padding ip ip insert padding after inserted character key_a1 ka1 K1 upper left of keypad - - key_a3 ka3 K3 upper right of key- pad key_b2 kb2 K2 center of keypad @@ -565,6 +588,7 @@ key_f22 kf22 FC F22 function key key_f23 kf23 FD F23 function key key_f24 kf24 FE F24 function key + key_f25 kf25 FF F25 function key key_f26 kf26 FG F26 function key key_f27 kf27 FH F27 function key @@ -582,7 +606,6 @@ key_f38 kf38 FS F38 function key key_f39 kf39 FT F39 function key key_f4 kf4 k4 F4 function key - key_f40 kf40 FU F40 function key key_f41 kf41 FV F41 function key key_f42 kf42 FW F42 function key @@ -631,6 +654,7 @@ key_previous kprv %8 previous key key_print kprt %9 print key key_redo krdo %0 redo key + key_reference kref &1 reference key key_refresh krfr &2 refresh key key_replace krpl &3 replace key @@ -648,7 +672,6 @@ key_sdl kDL *5 shifted delete-line key key_select kslt *6 select key - key_send kEND *7 shifted end key key_seol kEOL *8 shifted clear-to- end-of-line key @@ -696,6 +719,8 @@ key f3 if not f3 lab_f4 lf4 l4 label on function key f4 if not f4 + + lab_f5 lf5 l5 label on function key f5 if not f5 lab_f6 lf6 l6 label on function @@ -714,7 +739,6 @@ (8th-bit on) micro_column_address mhpa ZY Like column_address in micro mode - micro_down mcud1 ZZ Like cursor_down in micro mode micro_left mcub1 Za Like cursor_left in @@ -761,6 +785,8 @@ in micro mode pkey_key pfkey pk program function key #1 to type string #2 + + pkey_local pfloc pl program function key #1 to execute string #2 @@ -779,8 +805,6 @@ quick_dial qdial QD dial number #1 with- out checking remove_clock rmclk RC remove clock - - repeat_char rep rp repeat char #1 #2 times (P*) req_for_input rfi RF send next input char @@ -828,6 +852,7 @@ umn set_right_margin_parm smgrp Zn Set right margin at column #1 + set_tab hts st set a tab in every row, current columns set_top_margin smgt Zo Set top margin at @@ -845,8 +870,6 @@ set stop_bit_image rbim Zs Stop printing bit image graphics - - stop_char_set_def rcsd Zt End definition of character set #1 subscript_characters subcs Zu List of subscript- @@ -881,10 +904,11 @@ zero_motion zerom Zx No motion for subse- quent character - The following string capabilities are present in the - SVr4.0 term structure, but were originally not documented + The following string capabilities are present in the + SVr4.0 term structure, but were originally not documented in the man page. + Variable Cap- TCap Description String name Code alt_scancode_esc scesa S8 Alternate escape @@ -894,6 +918,7 @@ of same row bit_image_newline binel Zz Move to next row of the bit image + bit_image_repeat birep Xy Repeat bit image cell #1 #2 times char_set_names csnm Zy Produce #1'th item @@ -911,8 +936,6 @@ port display_pc_char dispc S1 Display PC charac- ter #1 - - end_bit_image_region endbi Yy End a bit-image region enter_pc_charset_mode smpch S2 Enter PC character @@ -961,24 +984,24 @@ cap). set_page_length slines YZ Set page length to #1 lines + set_tb_margin smgtb MT Sets both top and bottom margins to #1, #2 - The XSI Curses standard added these. They are some - post-4.1 versions of System V curses, e.g., Solaris 2.5 - and IRIX 6.x. The ncurses termcap names for them are + The XSI Curses standard added these. They are some + post-4.1 versions of System V curses, e.g., Solaris 2.5 + and IRIX 6.x. The ncurses termcap names for them are invented; according to the XSI Curses standard, they have - no termcap names. If your compiled terminfo entries use - these, they may not be binary-compatible with System V + no termcap names. If your compiled terminfo entries use + these, they may not be binary-compatible with System V terminfo entries after SVr4.1; beware! + Variable Cap- TCap Description String name Code enter_horizontal_hl_mode ehhlm Xh Enter horizontal highlight mode - - enter_left_hl_mode elhlm Xl Enter left highlight mode enter_low_hl_mode elohlm Xo Enter low highlight @@ -996,10 +1019,9 @@ to #1 hundredth of an inch - A Sample Entry The following entry, describing an ANSI-standard terminal, - is representative of what a terminfo entry for a modern + is representative of what a terminfo entry for a modern terminal typically looks like. ansi|ansi/pc-term compatible with color, @@ -1023,208 +1045,208 @@ sgr0=\E[0;10m, tbc=\E[2g, u6=\E[%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%p1%dd, - Entries may continue onto multiple lines by placing white - space at the beginning of each line except the first. - Comments may be included on lines beginning with ``#''. + Entries may continue onto multiple lines by placing white + space at the beginning of each line except the first. + Comments may be included on lines beginning with ``#''. Capabilities in terminfo are of three types: Boolean capa- bilities which indicate that the terminal has some partic- - ular feature, numeric capabilities giving the size of the - terminal or the size of particular delays, and string - capabilities, which give a sequence which can be used to + ular feature, numeric capabilities giving the size of the + terminal or the size of particular delays, and string + capabilities, which give a sequence which can be used to perform particular terminal operations. Types of Capabilities - All capabilities have names. For instance, the fact that - ANSI-standard terminals have automatic margins (i.e., an - automatic return and line-feed when the end of a line is - reached) is indicated by the capability am. Hence the + All capabilities have names. For instance, the fact that + ANSI-standard terminals have automatic margins (i.e., an + automatic return and line-feed when the end of a line is + reached) is indicated by the capability am. Hence the description of ansi includes am. Numeric capabilities are - followed by the character `#' and then a positive value. - Thus cols, which indicates the number of columns the ter- - minal has, gives the value `80' for ansi. Values for + followed by the character `#' and then a positive value. + Thus cols, which indicates the number of columns the ter- + minal has, gives the value `80' for ansi. Values for numeric capabilities may be specified in decimal, octal or - hexadecimal, using the C programming language conventions + hexadecimal, using the C programming language conventions (e.g., 255, 0377 and 0xff or 0xFF). - Finally, string valued capabilities, such as el (clear to + Finally, string valued capabilities, such as el (clear to end of line sequence) are given by the two-character code, - an `=', and then a string ending at the next following + an `=', and then a string ending at the next following `,'. - A number of escape sequences are provided in the string + A number of escape sequences are provided in the string valued capabilities for easy encoding of characters there. - Both \E and \e map to an ESCAPE character, ^x maps to a - control-x for any appropriate x, and the sequences \n \l - \r \t \b \f \s give a newline, line-feed, return, tab, + Both \E and \e map to an ESCAPE character, ^x maps to a + control-x for any appropriate x, and the sequences \n \l + \r \t \b \f \s give a newline, line-feed, return, tab, backspace, form-feed, and space. Other escapes include \^ - for ^, \\ for \, \, for comma, \: for :, and \0 for null. - (\0 will produce \200, which does not terminate a string + for ^, \\ for \, \, for comma, \: for :, and \0 for null. + (\0 will produce \200, which does not terminate a string but behaves as a null character on most terminals, provid- - ing CS7 is specified. See stty(1).) Finally, characters + ing CS7 is specified. See stty(1).) Finally, characters may be given as three octal digits after a \. - A delay in milliseconds may appear anywhere in a string - capability, enclosed in $<..> brackets, as in el=\EK$<5>, - and padding characters are supplied by tputs to provide - this delay. The delay must be a number with at most one + A delay in milliseconds may appear anywhere in a string + capability, enclosed in $<..> brackets, as in el=\EK$<5>, + and padding characters are supplied by tputs to provide + this delay. The delay must be a number with at most one decimal place of precision; it may be followed by suffixes - `*' or '/' or both. A `*' indicates that the padding - required is proportional to the number of lines affected - by the operation, and the amount given is the per- - affected-unit padding required. (In the case of insert + `*' or '/' or both. A `*' indicates that the padding + required is proportional to the number of lines affected + by the operation, and the amount given is the per- + affected-unit padding required. (In the case of insert character, the factor is still the number of lines - affected.) Normally, padding is advisory if the device - has the xon capability; it is used for cost computation - but does not trigger delays. A `/' suffix indicates that - the padding is mandatory and forces a delay of the given - number of milliseconds even on devices for which xon is + affected.) Normally, padding is advisory if the device + has the xon capability; it is used for cost computation + but does not trigger delays. A `/' suffix indicates that + the padding is mandatory and forces a delay of the given + number of milliseconds even on devices for which xon is present to indicate flow control. - Sometimes individual capabilities must be commented out. - To do this, put a period before the capability name. For + Sometimes individual capabilities must be commented out. + To do this, put a period before the capability name. For example, see the second ind in the example above. Fetching Compiled Descriptions - If the environment variable TERMINFO is set, it is inter- - preted as the pathname of a directory containing the com- + If the environment variable TERMINFO is set, it is inter- + preted as the pathname of a directory containing the com- piled description you are working on. Only that directory is searched. - If TERMINFO is not set, the ncurses version of the ter- - minfo reader code will instead look in the directory - $HOME/.terminfo for a compiled description. If it fails - to find one there, and the environment variable TER- - MINFO_DIRS is set, it will interpret the contents of that - variable as a list of colon- separated directories to be - searched (an empty entry is interpreted as a command to - search /usr/share/terminfo). If no description is found - in any of the TERMINFO_DIRS directories, the fetch fails. - - If neither TERMINFO nor TERMINFO_DIRS is set, the last - place tried will be the system terminfo directory, + If TERMINFO is not set, the ncurses version of the ter- + minfo reader code will instead look in the directory + $HOME/.terminfo for a compiled description. If it fails + to find one there, and the environment variable TER- + MINFO_DIRS is set, it will interpret the contents of that + variable as a list of colon- separated directories to be + searched (an empty entry is interpreted as a command to + search /usr/share/terminfo). If no description is found + in any of the TERMINFO_DIRS directories, the fetch fails. + + If neither TERMINFO nor TERMINFO_DIRS is set, the last + place tried will be the system terminfo directory, /usr/share/terminfo. - (Neither the $HOME/.terminfo lookups nor TERMINFO_DIRS - extensions are supported under stock System V ter- + (Neither the $HOME/.terminfo lookups nor TERMINFO_DIRS + extensions are supported under stock System V ter- minfo/curses.) Preparing Descriptions - We now outline how to prepare descriptions of terminals. - The most effective way to prepare a terminal description - is by imitating the description of a similar terminal in - terminfo and to build up a description gradually, using + We now outline how to prepare descriptions of terminals. + The most effective way to prepare a terminal description + is by imitating the description of a similar terminal in + terminfo and to build up a description gradually, using partial descriptions with vi or some other screen-oriented - program to check that they are correct. Be aware that a + program to check that they are correct. Be aware that a very unusual terminal may expose deficiencies in the abil- - ity of the terminfo file to describe it or bugs in the + ity of the terminfo file to describe it or bugs in the screen-handling code of the test program. - To get the padding for insert line right (if the terminal + To get the padding for insert line right (if the terminal manufacturer did not document it) a severe test is to edit - a large file at 9600 baud, delete 16 or so lines from the - middle of the screen, then hit the `u' key several times - quickly. If the terminal messes up, more padding is usu- - ally needed. A similar test can be used for insert char- + a large file at 9600 baud, delete 16 or so lines from the + middle of the screen, then hit the `u' key several times + quickly. If the terminal messes up, more padding is usu- + ally needed. A similar test can be used for insert char- acter. Basic Capabilities - The number of columns on each line for the terminal is - given by the cols numeric capability. If the terminal is - a CRT, then the number of lines on the screen is given by + The number of columns on each line for the terminal is + given by the cols numeric capability. If the terminal is + a CRT, then the number of lines on the screen is given by the lines capability. If the terminal wraps around to the - beginning of the next line when it reaches the right mar- + beginning of the next line when it reaches the right mar- gin, then it should have the am capability. If the termi- - nal can clear its screen, leaving the cursor in the home - position, then this is given by the clear string capabil- - ity. If the terminal overstrikes (rather than clearing a - position when a character is struck over) then it should - have the os capability. If the terminal is a printing - terminal, with no soft copy unit, give it both hc and os. - (os applies to storage scope terminals, such as TEKTRONIX - 4010 series, as well as hard copy and APL terminals.) If + nal can clear its screen, leaving the cursor in the home + position, then this is given by the clear string capabil- + ity. If the terminal overstrikes (rather than clearing a + position when a character is struck over) then it should + have the os capability. If the terminal is a printing + terminal, with no soft copy unit, give it both hc and os. + (os applies to storage scope terminals, such as TEKTRONIX + 4010 series, as well as hard copy and APL terminals.) If there is a code to move the cursor to the left edge of the current row, give this as cr. (Normally this will be car- - riage return, control M.) If there is a code to produce + riage return, control M.) If there is a code to produce an audible signal (bell, beep, etc) give this as bel. - If there is a code to move the cursor one position to the - left (such as backspace) that capability should be given - as cub1. Similarly, codes to move to the right, up, and + If there is a code to move the cursor one position to the + left (such as backspace) that capability should be given + as cub1. Similarly, codes to move to the right, up, and down should be given as cuf1, cuu1, and cud1. These local - cursor motions should not alter the text they pass over, - for example, you would not normally use `cuf1= ' because + cursor motions should not alter the text they pass over, + for example, you would not normally use `cuf1= ' because the space would erase the character moved over. - A very important point here is that the local cursor - motions encoded in terminfo are undefined at the left and - top edges of a CRT terminal. Programs should never - attempt to backspace around the left edge, unless bw is + A very important point here is that the local cursor + motions encoded in terminfo are undefined at the left and + top edges of a CRT terminal. Programs should never + attempt to backspace around the left edge, unless bw is given, and never attempt to go up locally off the top. In - order to scroll text up, a program will go to the bottom + order to scroll text up, a program will go to the bottom left corner of the screen and send the ind (index) string. To scroll text down, a program goes to the top left corner - of the screen and sends the ri (reverse index) string. - The strings ind and ri are undefined when not on their + of the screen and sends the ri (reverse index) string. + The strings ind and ri are undefined when not on their respective corners of the screen. Parameterized versions of the scrolling sequences are indn and rin which have the same semantics as ind and ri except - that they take one parameter, and scroll that many lines. - They are also undefined except at the appropriate edge of + that they take one parameter, and scroll that many lines. + They are also undefined except at the appropriate edge of the screen. - The am capability tells whether the cursor sticks at the - right edge of the screen when text is output, but this + The am capability tells whether the cursor sticks at the + right edge of the screen when text is output, but this does not necessarily apply to a cuf1 from the last column. - The only local motion which is defined from the left edge - is if bw is given, then a cub1 from the left edge will - move to the right edge of the previous row. If bw is not - given, the effect is undefined. This is useful for draw- - ing a box around the edge of the screen, for example. If - the terminal has switch selectable automatic margins, the - terminfo file usually assumes that this is on; i.e., am. - If the terminal has a command which moves to the first - column of the next line, that command can be given as nel - (newline). It does not matter if the command clears the - remainder of the current line, so if the terminal has no - cr and lf it may still be possible to craft a working nel + The only local motion which is defined from the left edge + is if bw is given, then a cub1 from the left edge will + move to the right edge of the previous row. If bw is not + given, the effect is undefined. This is useful for draw- + ing a box around the edge of the screen, for example. If + the terminal has switch selectable automatic margins, the + terminfo file usually assumes that this is on; i.e., am. + If the terminal has a command which moves to the first + column of the next line, that command can be given as nel + (newline). It does not matter if the command clears the + remainder of the current line, so if the terminal has no + cr and lf it may still be possible to craft a working nel out of one or both of them. These capabilities suffice to describe hard-copy and - "glass-tty" terminals. Thus the model 33 teletype is + "glass-tty" terminals. Thus the model 33 teletype is described as - 33|tty33|tty|model 33 teletype, - bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os, + 33|tty33|tty|model 33 teletype, + bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os, while the Lear Siegler ADM-3 is described as - adm3|3|lsi adm3, - am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J, - ind=^J, lines#24, + adm3|3|lsi adm3, + am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J, + ind=^J, lines#24, Parameterized Strings - Cursor addressing and other strings requiring parameters - in the terminal are described by a parameterized string - capability, with printf(3S) like escapes %x in it. For - example, to address the cursor, the cup capability is + Cursor addressing and other strings requiring parameters + in the terminal are described by a parameterized string + capability, with printf(3) like escapes %x in it. For + example, to address the cursor, the cup capability is given, using two parameters: the row and column to address to. (Rows and columns are numbered from zero and refer to the physical screen visible to the user, not to any unseen - memory.) If the terminal has memory relative cursor + memory.) If the terminal has memory relative cursor addressing, that can be indicated by mrcup. - The parameter mechanism uses a stack and special % codes - to manipulate it. Typically a sequence will push one of - the parameters onto the stack and then print it in some - format. Print (e.g., "%d") is a special case. Other - operations, including "%t" pop their operand from the + The parameter mechanism uses a stack and special % codes + to manipulate it. Typically a sequence will push one of + the parameters onto the stack and then print it in some + format. Print (e.g., "%d") is a special case. Other + operations, including "%t" pop their operand from the stack. It is noted that more complex operations are often necessary, e.g., in the sgr string. @@ -1255,11 +1277,11 @@ %g[A-Z] get static variable [a-z] and push it - The terms "static" and "dynamic" are misleading. - Historically, these are simply two different sets of - variables, whose values are not reset between calls - to tparm. However, that fact is not documented in - other implementations. Relying on it will adversely + The terms "static" and "dynamic" are misleading. + Historically, these are simply two different sets of + variables, whose values are not reset between calls + to tparm. However, that fact is not documented in + other implementations. Relying on it will adversely impact portability to other implementations. %'c' char constant c @@ -1273,24 +1295,38 @@ arithmetic (%m is mod): push(pop() op pop()) %& %| %^ - bit operations: push(pop() op pop()) + bit operations (AND, OR and exclusive-OR): push(pop() + op pop()) %= %> %< logical operations: push(pop() op pop()) %A, %O - logical and & or operations (for conditionals) + logical AND and OR operations (for conditionals) %! %~ - unary operations push(op pop()) + unary operations (logical and bit complement): + push(op pop()) %i add 1 to first two parameters (for ANSI terminals) %? expr %t thenpart %e elsepart %; - if-then-else, %e elsepart is optional. else-if's are - possible a la Algol 68: + This forms an if-then-else. The %e elsepart is + optional. Usually the %? expr part pushes a value + onto the stack, and %t pops it from the stack, test- + ing if it is nonzero (true). If it is zero (false), + control passes to the %e (else) part. + + It is possible to form else-if's a la Algol 68: %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e %; - ci are conditions, bi are bodies. + + where ci are conditions, bi are bodies. + + Use the -f option of tic or infocmp to see the struc- + ture of if-the-else's. Some strings, e.g., sgr can + be very complicated when written on one line. The -f + option splits the string into lines with the parts + indented. Binary operations are in postfix form with the operands in the usual order. That is, to get x-5 one would use @@ -1567,12 +1603,12 @@ For example, the DEC vt220 supports most of the modes: + tparm parameter attribute escape sequence none none \E[0m p1 standout \E[0;1;7m p2 underline \E[0;4m - p3 reverse \E[0;7m p4 blink \E[0;5m p5 dim not available @@ -1599,6 +1635,7 @@ Writing out the above sequences, along with their depen- dencies yields + sequence when to output terminfo translation \E[0 always \E[0 @@ -1607,6 +1644,7 @@ ;5 if p4 %?%p4%|%t;5%; ;7 if p1 or p3 %?%p1%p3%|%t;7%; ;8 if p7 %?%p7%|%t;8%; + m always m ^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%; @@ -1616,7 +1654,13 @@ %?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, Remember that if you specify sgr, you must also specify - sgr0. + sgr0. Also, some implementations rely on sgr being given + if sgr0 is, Not all terminfo entries necessarily have an + sgr string, however. Many terminfo entries are derived + from termcap entries which have no sgr string. The only + drawback to adding an sgr string is that termcap also + assumes that sgr0 does not exit alternate character set + mode. Terminals with the ``magic cookie'' glitch (xmc) deposit special ``cookies'' when they receive mode-setting @@ -1707,13 +1751,13 @@ preceding tab stop can be given as cbt. By convention, if the teletype modes indicate that tabs are being expanded by the computer rather than being sent to the terminal, - programs should not use ht or cbt even if they are pre- - sent, since the user may not have the tab stops properly - set. If the terminal has hardware tabs which are ini- - tially set every n spaces when the terminal is powered up, - the numeric parameter it is given, showing the number of - spaces the tabs are set to. This is normally used by the - tset command to determine whether to set the mode for + programs should not use ht or cbt even if they are + present, since the user may not have the tab stops prop- + erly set. If the terminal has hardware tabs which are + initially set every n spaces when the terminal is powered + up, the numeric parameter it is given, showing the number + of spaces the tabs are set to. This is normally used by + the tset command to determine whether to set the mode for hardware tab expansion, and whether to set the tab stops. If the terminal has tab stops that can be saved in non- volatile memory, the terminfo description can assume that @@ -1727,26 +1771,49 @@ consistent with the rest of the terminfo description. They are normally sent to the terminal, by the init option of the tput program, each time the user logs in. They - will be printed in the following order: run the program - iprog; output is1; is2; set the margins using mgc, smgl - and smgr; set tabs using tbc and hts; print the file if; - and finally output is3. + will be printed in the following order: + + run the program + iprog + + output is1 is2 + + set the margins using + mgc, smgl and smgr + + set tabs using + tbc and hts + + print the file + if + + and finally + output is3. - Most initialization is done with is2. Special terminal + Most initialization is done with is2. Special terminal modes can be set up without duplicating strings by putting - the common sequences in is2 and special cases in is1 and - is3. A pair of sequences that does a harder reset from a - totally unknown state can be analogously given as rs1, - rs2, rf, and rs3, analogous to is2 and if. These strings - are output by the reset program, which is used when the - terminal gets into a wedged state. Commands are normally - placed in rs1, rs2 rs3 and rf only if they produce annoy- - ing effects on the screen and are not necessary when log- - ging in. For example, the command to set the vt100 into - 80-column mode would normally be part of is2, but it - causes an annoying glitch of the screen and is not nor- - mally needed since the terminal is usually already in 80 - column mode. + the common sequences in is2 and special cases in is1 and + is3. + + A set of sequences that does a harder reset from a totally + unknown state can be given as rs1, rs2, rf and rs3, analo- + gous to is1 , is2 , if and is3 respectively. These + strings are output by the reset program, which is used + when the terminal gets into a wedged state. Commands are + normally placed in rs1, rs2 rs3 and rf only if they pro- + duce annoying effects on the screen and are not necessary + when logging in. For example, the command to set the + vt100 into 80-column mode would normally be part of is2, + but it causes an annoying glitch of the screen and is not + normally needed since the terminal is usually already in + 80 column mode. + + The reset program writes strings including iprog, etc., in + the same order as the init program, using rs1, etc., + instead of is1, etc. If any of rs1, rs2, rs3, or rf reset + capability strings are missing, the reset program falls + back upon the corresponding initialization capability + string. If there are commands to set and clear tab stops, they can be given as tbc (clear all tab stops) and hts (set a tab @@ -1756,7 +1823,7 @@ if. Delays and Padding - Many older and slower terminals don't support either + Many older and slower terminals do not support either XON/XOFF or DTR handshaking, including hard copy terminals and some very archaic CRTs (including, for example, DEC VT100s). These may require padding characters after cer- @@ -1767,7 +1834,7 @@ its input buffers are close to full), set xon. This capa- bility suppresses the emission of padding. You can also set it for memory-mapped console devices effectively that - don't have a speed limit. Padding information should + do not have a speed limit. Padding information should still be included so that routines can make better deci- sions about relative costs, but actual pad characters will not be transmitted. @@ -1777,9 +1844,9 @@ padding baud rate, then whether padding is emitted or not is completely controlled by xon. - If the terminal requires other than a null (zero) charac- - ter as a pad, then this can be given as pad. Only the - first character of the pad string is used. + If the terminal requires other than a null (zero) + character as a pad, then this can be given as pad. Only + the first character of the pad string is used. Status Lines @@ -1825,6 +1892,7 @@ characters from the AT&T 4410v1 added. This alternate character set may be specified by the acsc capability. + Glyph ACS Ascii VT100 Name Name Default Name UK pound sign ACS_STERLING f } @@ -1836,7 +1904,6 @@ bullet ACS_BULLET o ~ checker board (stipple) ACS_CKBOARD : a degree symbol ACS_DEGREE \ f - diamond ACS_DIAMOND + ` greater-than-or-equal-to ACS_GEQUAL > z greek pi ACS_PI * { @@ -1844,6 +1911,7 @@ lantern symbol ACS_LANTERN # i large plus or crossover ACS_PLUS + n less-than-or-equal-to ACS_LEQUAL < y + lower left corner ACS_LLCORNER + m lower right corner ACS_LRCORNER + j not-equal ACS_NEQUAL ! | @@ -1915,6 +1983,7 @@ these as it likes, but the RGB values indicate normal locations in color space. + Color #define Value RGB black COLOR_BLACK 0 0, 0, 0 red COLOR_RED 1 max,0,0 @@ -1927,6 +1996,7 @@ The argument values of setf/setb historically correspond to a different mapping, i.e., + Color #define Value RGB black COLOR_BLACK 0 0, 0, 0 blue COLOR_BLUE 1 0,0,max @@ -1965,16 +2035,17 @@ ors are enabled. The correspondence with the attributes understood by curses is as follows: + Attribute Bit Decimal A_STANDOUT 0 1 A_UNDERLINE 1 2 - A_REVERSE 2 4 A_BLINK 3 8 A_DIM 4 16 A_BOLD 5 32 A_INVIS 6 64 A_PROTECT 7 128 + A_ALTCHARSET 8 256 For example, on many IBM PC consoles, the underline @@ -2120,38 +2191,39 @@ Pitfalls of Long Entries Long terminfo entries are unlikely to be a problem; to - date, no entry has even approached terminfo's 4K string- - table maximum. Unfortunately, the termcap translations - are much more strictly limited (to 1K), thus termcap - translations of long terminfo entries can cause problems. - - The man pages for 4.3BSD and older versions of tgetent() - instruct the user to allocate a 1K buffer for the termcap - entry. The entry gets null-terminated by the termcap - library, so that makes the maximum safe length for a term- - cap entry 1k-1 (1023) bytes. Depending on what the appli- - cation and the termcap library being used does, and where - in the termcap file the terminal type that tgetent() is - searching for is, several bad things can happen. + date, no entry has even approached terminfo's 4096-byte + string-table maximum. Unfortunately, the termcap transla- + tions are much more strictly limited (to 1023 bytes), thus + termcap translations of long terminfo entries can cause + problems. + + The man pages for 4.3BSD and older versions of tgetent() + instruct the user to allocate a 1024-byte buffer for the + termcap entry. The entry gets null-terminated by the + termcap library, so that makes the maximum safe length for + a termcap entry 1k-1 (1023) bytes. Depending on what the + application and the termcap library being used does, and + where in the termcap file the terminal type that tgetent() + is searching for is, several bad things can happen. Some termcap libraries print a warning message or exit if they find an entry that's longer than 1023 bytes; others - don't; others truncate the entries to 1023 bytes. Some + do not; others truncate the entries to 1023 bytes. Some application programs allocate more than the recommended 1K - for the termcap entry; others don't. + for the termcap entry; others do not. Each termcap entry has two important sizes associated with it: before "tc" expansion, and after "tc" expansion. "tc" is the capability that tacks on another termcap entry to the end of the current one, to add on its capabilities. - If a termcap entry doesn't use the "tc" capability, then + If a termcap entry does not use the "tc" capability, then of course the two lengths are the same. The "before tc expansion" length is the most important one, because it affects more than just users of that par- ticular terminal. This is the length of the entry as it exists in /etc/termcap, minus the backslash-newline pairs, - which tgetent() strips out while reading it. Some termcap + which tgetent() strips out while reading it. Some termcap libraries strip off the final newline, too (GNU termcap does not). Now suppose: @@ -2165,13 +2237,13 @@ matter what its length, to see if it's the entry it wants, - * and tgetent() is searching for a terminal type that + * and tgetent() is searching for a terminal type that either is the long entry, appears in the termcap file - after the long entry, or doesn't appear in the file - at all (so that tgetent() has to search the whole + after the long entry, or does not appear in the file + at all (so that tgetent() has to search the whole termcap file). - Then tgetent() will overwrite memory, perhaps its stack, + Then tgetent() will overwrite memory, perhaps its stack, and probably core dump the program. Programs like telnet are particularly vulnerable; modern telnets pass along values like the terminal type automatically. The results @@ -2184,7 +2256,7 @@ The "after tc expansion" length will have a similar effect to the above, but only for people who actually set TERM to - that terminal type, since tgetent() only does "tc" expan- + that terminal type, since tgetent() only does "tc" expan- sion once it's found the terminal type it was looking for, not while searching. @@ -2197,7 +2269,7 @@ termcap entry. When in -C (translate to termcap) mode, the ncurses imple- - mentation of tic(1) issues warning messages when the pre- + mentation of tic(1m) issues warning messages when the pre- tc length of a termcap translation is too long. The -c (check) option also checks resolved (after tc expansion) lengths. @@ -2215,13 +2287,13 @@
Some SVr4 curses implementations, and all previous to - SVr4, don't interpret the %A and %O operators in parameter - strings. + SVr4, do not interpret the %A and %O operators in parame- + ter strings. SVr4/XPG4 do not specify whether msgr licenses movement while in an alternate-character-set mode (such modes may, - among other things, map CR and NL to characters that don't - trigger local motions). The ncurses implementation + among other things, map CR and NL to characters that do + not trigger local motions). The ncurses implementation ignores msgr in ALTCHARSET mode. This raises the possi- bility that an XPG4 implementation making the opposite interpretation may need terminfo entries made for ncurses @@ -2279,7 +2351,7 @@
- tic(1m), curses(3x), printf(3S), term(5). + tic(1m), infocmp(1m), curses(3x), printf(3), term(5).@@ -2289,7 +2361,7 @@ - TERMINFO(5) + terminfo(5)