⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 termcap.5

📁 Unix操作系统minix 2.0源码
💻 5
📖 第 1 页 / 共 4 页
字号:
     Other capabilities include is, an initialization string for the terminal,
     and if, the name of a file containing long initialization strings.  These
     strings are expected to set the terminal into modes consistent  with  the
     rest  of the termcap description.  They are normally sent to the terminal
     by the tset program each time the user logs in.  They will be printed  in
     the  following  order:  is; setting tabs using ct and st; and finally if.
     (Terminfo uses i1-i2 instead of is and runs the program iP and prints  i3
     after the other initializations.)  A pair of sequences that does a harder
     reset from a totally unknown state can be analogously given as rs and if.
     These  strings  are  output  by the reset program, which is used when the
     terminal gets into a wedged state.  (Terminfo uses r1-r3 instead of  rs.)
     Commands  are  normally placed in rs and rf only if they produce 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 is, but it causes an annoying glitch of the screen and is  not
     normally needed since the terminal is usually already in 80-column mode.

     If the terminal has hardware tabs, the command to advance to the next tab
     stop  can  be  given as ta (usually ^I).  A "backtab" command which moves
     leftward to the previous tab stop can be given as bt.  By convention,  if
     the  terminal  driver modes indicate that tab stops are being expanded by
     the computer rather than being sent to the terminal, programs should  not
     use  ta  or  bt even if they are present, since the user may not have the
     tab stops properly set.  If the  terminal  has  hardware  tabs  that  are


BSD                             1 November 1985                             14



TERMCAP(5)                Minix Programmer's Manual                 TERMCAP(5)


     initially set every n positions when the terminal is powered up, then the
     numeric  parameter  it  is given, showing the number of positions between
     tab stops.  This is normally  used  by  the  tset  command  to  determine
     whether to set the driver mode for hardware tab expansion, and whether to
     set the tab stops.  If the terminal has tab stops that can  be  saved  in
     nonvolatile  memory,  the  termcap  description  can assume that they are
     properly set.

     If there are commands to set and clear tab stops, they can be given as ct
     (clear  all  tab  stops)  and st (set a tab stop in the current column of
     every row).  If a more complex sequence is needed to set  the  tabs  than
     can be described by this, the sequence can be placed in is or if.

     Delays

     Certain capabilities control padding in the terminal driver.   These  are
     primarily  needed  by hardcopy terminals and are used by the tset program
     to set terminal driver  modes  appropriately.   Delays  embedded  in  the
     capabilities cr, sf, le, ff, and ta will cause the appropriate delay bits
     to be set in the terminal driver.  If pb (padding baud  rate)  is  given,
     these  values  can  be  ignored at baud rates below the value of pb.  For
     4.2BSD tset, the delays are given as numeric capabilities dC, dN, dB, dF,
     and dT instead.

     Miscellaneous

     If the terminal requires other than a NUL (zero) character as a pad, this
     can be given as pc.  Only the first character of the pc string is used.

     If the terminal has commands to save and  restore  the  position  of  the
     cursor, give them as sc and rc.

     If the terminal has an extra "status line" that is not normally  used  by
     software, this fact can be indicated.  If the status line is viewed as an
     extra line below the bottom line, then the capability hs should be given.
     Special strings to go to a position in the status line and to return from
     the status line can be given as ts and fs.  (fs  must  leave  the  cursor
     position  in  the same place that it was before ts.  If necessary, the sc
     and rc strings can be included in ts and fs to  get  this  effect.)   The
     capability  ts  takes  one  parameter,  which is the column number of the
     status line to which the cursor is to be moved.  If escape sequences  and
     other  special  commands  such  as tab work while in the status line, the
     flag es can be given.  A string  that  turns  off  the  status  line  (or
     otherwise erases its contents) should be given as ds.  The status line is
     normally assumed to be the same width as the rest of  the  screen,  i.e.,
     co.   If  the  status  line  is  a  different width (possibly because the
     terminal does not allow an entire line to be loaded), then its  width  in
     columns can be indicated with the numeric parameter ws.




BSD                             1 November 1985                             15



TERMCAP(5)                Minix Programmer's Manual                 TERMCAP(5)


     If the terminal can move up or down half a line, this  can  be  indicated
     with hu (half-line up) and hd (half-line down).  This is primarily useful
     for superscripts and subscripts on hardcopy  terminals.   If  a  hardcopy
     terminal can eject to the next page (form feed), give this as ff (usually
     ^L).

     If there is a command to repeat a given character a given number of times
     (to  save time transmitting a large number of identical characters), this
     can be indicated with the parameterized string rp.  The  first  parameter
     is  the character to be repeated and the second is the number of times to
     repeat it.  (This is a terminfo feature that is unlikely to be  supported
     by a program that uses termcap.)

     If the terminal has a settable command character, such as  the  Tektronix
     4025,  this  can  be indicated with CC.  A prototype command character is
     chosen which is used in all capabilities.  This character is given in the
     CC  capability  to identify it.  The following convention is supported on
     some UNIX systems:  The environment is to be searched for a CC  variable,
     and  if found, all occurrences of the prototype character are replaced by
     the  character  in  the  environment  variable.   This  use  of  the   CC
     environment variable is a very bad idea, as it conflicts with make(1).

     Terminal descriptions that do not represent  a  specific  kind  of  known
     terminal,  such as switch, dialup, patch, and network, should include the
     gn (generic) capability so that programs can complain that  they  do  not
     know  how  to  talk  to the terminal.  (This capability does not apply to
     virtual terminal descriptions for which the escape sequences are known.)

     If the terminal uses xoff/xon (DC3/DC1)  handshaking  for  flow  control,
     give  xo.   Padding information should still be included so that routines
     can make better decisions about costs, but actual pad characters will not
     be transmitted.

     If the terminal has a "meta key" which acts as a shift key,  setting  the
     8th  bit  of  any  character transmitted, then this fact can be indicated
     with km.  Otherwise, software will assume that the 8th bit is parity  and
     it will usually be cleared.  If strings exist to turn this "meta mode" on
     and off, they can be given as mm and mo.

     If the terminal has more lines of memory than will fit on the  screen  at
     once,  the  number  of  lines  of  memory  can  be indicated with lm.  An
     explicit value of 0 indicates that the number of lines is not fixed,  but
     that there is still more memory than fits on the screen.

     If the terminal is one of those supported  by  the  UNIX  system  virtual
     terminal protocol, the terminal number can be given as vt.

     Media copy strings which control an auxiliary printer  connected  to  the
     terminal can be given as ps:  print the contents of the screen; pf:  turn
     off the printer; and po:  turn on the printer.  When the printer  is  on,


BSD                             1 November 1985                             16



TERMCAP(5)                Minix Programmer's Manual                 TERMCAP(5)


     all text sent to the terminal  will  be  sent  to  the  printer.   It  is
     undefined  whether the text is also displayed on the terminal screen when
     the printer is on.  A variation pO takes one  parameter  and  leaves  the
     printer  on  for  as  many characters as the value of the parameter, then
     turns the printer off.  The parameter should not exceed 255.   All  text,
     including  pf,  is  transparently  passed  to  the printer while pO is in
     effect.

     Strings to program function keys can be given as pk, pl, and px.  Each of
     these  strings  takes  two parameters: the function key number to program
     (from 0 to 9) and the string to program it with.   Function  key  numbers
     out  of  this  range  may  program undefined keys in a terminal-dependent
     manner.  The differences  among  the  capabilities  are  that  pk  causes
     pressing  the  given  key  to  be  the  same as the user typing the given
     string; pl causes the string to be executed  by  the  terminal  in  local
     mode;  and  px  causes  the  string  to  be  transmitted to the computer.
     Unfortunately, due to lack of  a  definition  for  string  parameters  in
     termcap, only terminfo supports these capabilities.

     Glitches and Braindamage

     Hazeltine terminals, which do not allow `~' characters to  be  displayed,
     should indicate hz.

     The nc capability, now obsolete, formerly indicated Datamedia  terminals,
     which echo \r \n for carriage return then ignore a following linefeed.

     Terminals that ignore a linefeed immediately after an am  wrap,  such  as
     the Concept, should indicate xn.

     If ce is required to get rid  of  standout  (instead  of  merely  writing
     normal text on top of it), xs should be given.

     Teleray terminals, where tabs turn all characters moved over  to  blanks,
     should indicate xt (destructive tabs).  This glitch is also taken to mean
     that it is not possible to  position  the  cursor  on  top  of  a  "magic
     cookie",  and  that  to erase standout mode it is necessary to use delete
     and insert line.

     The Beehive Superbee, which is unable to correctly transmit the ESC or ^C
     characters, has xb, indicating that the "f1" key is used for ESC and "f2"
     for ^C.  (Only certain Superbees have  this  problem,  depending  on  the
     ROM.)

     Other  specific  terminal  problems  may  be  corrected  by  adding  more
     capabilities of the form xx.






BSD                             1 November 1985                             17



TERMCAP(5)                Minix Programmer's Manual                 TERMCAP(5)


     Similar Terminals

     If there are two very similar terminals, one can be defined as being just
     like  the other with certain exceptions.  The string capability tc can be
     given with the name of the similar terminal.   This  capability  must  be
     last,  and  the combined length of the entries must not exceed 1024.  The
     capabilities given before tc override those in the terminal type  invoked
     by tc.  A capability can be canceled by placing xx@ to the left of the tc
     invocation, where xx is the capability.  For example, the entry

             hn|2621-nl:ks@:ke@:tc=2621:

     defines a "2621-nl" that does not have the ks or ke  capabilities,  hence
     does  not  turn  on the function key labels when in visual mode.  This is
     useful for  different  modes  for  a  terminal,  or  for  different  user
     preferences.

AUTHOR
     William Joy
     Mark Horton added underlining and keypad support

FILES

     /etc/termcap   file  containing  terminal  descriptions  /usr/etc/termcap
                    file containing more terminal descriptions (Minix-vmd)

SEE ALSO
     elvis(1), more(1), termcap(3), printf(3).

CAVEATS AND BUGS
     Lines and columns are now stored by the kernel as well as in the  termcap
     entry.   Most  programs  now  use  the  kernel information primarily; the
     information in this file is used only if the kernel  does  not  have  any
     information.

     Not all programs support all entries.

     The Minix termcap(3)  does  not  understand  everything  described  here,
     unlike the one Minix-vmd uses.













BSD                             1 November 1985                             18

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -