|
|
coherent
termcap Technical Information termcap
Terminal description language
termcap is a language for describing terminals and their
capabilities. Terminal descriptions are collected in the file
/etc/termcap and are read by ttggeetteenntt and its related programs to
ensure that output to a particular terminal is in a format that
that terminal can understand.
A terminal description written in tteerrmmccaapp consists of a series of
fields, which are separated from each other by colons `:'. Every
line in the description, with the exception of the last line,
must end in a backslash `\'. Tab characters are ignored. Lines
that begin with a `#' are comments. A tteerrmmccaapp description must
not exceed 1,024 characters.
The first field names the terminal. Several different names may
be used, each separated by a vertical bar `|'; each name given,
however, must be unique within the file /eettcc/tteerrmmccaapp. By conven-
tion, the first listed must be two characters long. The second
name is the name by which the terminal is most commonly known;
this name may contain no blanks in it. Other versions of the
name may follow. By convention, the last version is the full
name of the terminal; here, spaces may be used for legibility.
Any of these may be used to name your terminal to the COHERENT
system. For example, the name field for the VT-100 terminal is
as follows:
d1|vt100|vt-100|pt100|pt-100|dec vt100:\
Note that the names are separated by vertical bars `|', that the
field ends with a colon, and that the line ends with a backslash.
Using any of these names in an eexxppoorrtt command will make the cor-
rect terminal description available to programs that need to use
it.
The remaining fields in the entry describe the capabilities of
the terminal. Each capability field consists of a two-letter
code, and may include additional information. There are three
types of capability:
_B_o_o_l_e_a_n
This indicates whether or not a terminal has a specific fea-
ture. If the field is present, the terminal is assumed to
have the feature; if it is absend, the terminal is assumed
not to have that feature. For example, the field
aamm:
is present, tteerrmmccaapp assumes that the terminal has automatic
margins, whereas if that field is not present, the program
using termcap assumes that the terminal does not have them.
COHERENT Lexicon Page 1
termcap Technical Information termcap
_N_u_m_e_r_i_c
This gives the size of some aspect of the terminal. Numeric
capability fields have the capability code, followed by a
`#' and a number. For example, the entry
ccoo#8800:
means that the terminal screen is 80 columns wide.
_S_t_r_i_n_g _c_a_p_a_b_i_l_i_t_i_e_s
These give a sequence of characters that trigger a terminal
operation. These fields consist of the capability code, an
equal sign `=', and the string.
Strings often include escape sequences. A ``\EE'' indicates
an <EESSCC> character; a control character is indicated with a
carat `^' plus the appropriate letter; and the sequences \bb,
\ff, \nn, \rr, and \tt are, respectively, backspace, formfeed,
newline, <rreettuurrnn>, and tab.
An integer or an integer followed by an asterisk in the
string (e.g., `_i_n_t*') indicates that execution of the func-
tion should be delayed by _i_n_t milliseconds; this delay is
termed _p_a_d_d_i_n_g. Thus, deletion on lines on the Microterm
Mime-2A is coded as:
dl=20*^W:
ddll is the capability code for _d_e_l_e_t_e, the equal sign intro-
duces the deletion sequence, 2200* indicates that each line
deletion should be delayed by 20 milliseconds, and ^WW in-
dicates that the line-deletion code on the Mime-2A is <ccttrrll-
WW>.
The asterisk indicates that the padding required is propor-
tional to the number of lines affected by the operation. In
the above example, the deletion of four lines on the Mime-2A
generates a total of 80 milliseconds of padding; if no as-
terisk were present, however, the padding would be only 20
milliseconds, no matter how many lines were deleted. Also,
when an asterisk is used, the number may be given to one
decimal place, to show tenths of a millisecond of padding.
Note that with string capabilities, characters may be given
as a backslash followed by the three octal digits of the
character's ASCII code. Thus, a colon in a capability field
may be given by \007722. To put a null character into the
string, use \220000, because termcap strips the high bit from
each character.
Finally, the literal characters `^' and `\' are given by
``\^'' and ``\\''.
COHERENT Lexicon Page 2
termcap Technical Information termcap
***** Capability Codes *****
The following table lists tteerrmmccaapp's capability codes. TTyyppee in-
dicates whether the code is boolean, numeric, or string; an am-
persand `&' indicates that this capability may include padding,
and an ampersand plus an asterisk ``&*'' indicates that it may be
used with the asterisk padding function described above.
_N_a_m_e _T_y_p_e _D_e_f_i_n_i_t_i_o_n
aaee string& End alternate set of characters
aall string&* Add blank line
aamm boolean Automatic margins
aass string& Start alternate set of characters
bbcc string Backspace character, if not ^HH
bbss boolean Backspace character is ^HH
bbtt string& Backtab
bbww boolean Backspace wraps from column 0
to last column
CCCC string Command character in prototype
if it can be set at terminal
ccdd string&* Clear to end of display
ccee string& Clear line
cchh string& Horizontal cursor motion
ccll string&* Clear screen
ccmm string& Cursor motion, both vertical and
horizontal
ccoo number& Number of columns
ccrr string&* <rreettuurrnn>; default ^MM
ccss string& Change scrolling region (DEC
VT100 only); resembles ccmm
ccvv string& Vertical cursor motion
ddaa boolean& Display above may be retained
ddBB number Milliseconds of delay needed by bbss
ddbb boolean Display below may be retained
ddCC number Milliseconds of delay needed by ccrr
ddcc string&* Delete a character
ddFF number Milliseconds of delay needed byffff
ddll string&* Delete a line
ddmm string Enter delete mode
ddNN number Milliseconds of delay needed by nnll
ddoo string Move down one line
ddTT number Milliseconds of delay needed by tab
eedd string Leave delete mode
eeii string Leave insert mode; use :eeii=:
if this string is the same as iicc
eeoo string Erase overstrikes with a blank
ffff string&* Eject hardcopy terminal page;
default ^LL
hhcc boolean Hardcopy terminal
hhdd string Move half-line down, i.e., forward
1/2 line feed)
hhoo string Move cursor to home position; use
if ccmm is not set
hhuu string Move half-line up, i.e., reverse
COHERENT Lexicon Page 3
termcap Technical Information termcap
1/2 line feed
hhzz string Cannot print tilde `~' (Hazeltine
terminals only)
iicc string& Insert a character
iiff string Name of the file that contains iiss
iimm string Begin insert mode; use :iimm=:
if iicc has not been set
iinn boolean Nulls are distinguished in display
iipp string&* Insert padding after each
character listed
iiss string Initialize terminal
kk00-kk99 string Codes sent by function keys 0-9
kkbb string Code sent by backspace key
kkdd string Code sent by down-arrow key
kkee string Leave ``keypad transmit'' mode
kkhh string Code sent by home key
kkll string Code sent by left-arrow key
kknn number No. of function keys; default is 10
kkoo string Entries for for all other
non-function keys
kkrr string Code sent by right-arrow key
kkss string Begin ``keypad transmit'' mode
kkuu string Code sent by up-arrow key
ll00-ll99 string Function keys labels if not f0-f9
llii number Number of lines
llll string Move cursor to first column of
last line; use if ccmm is not set
mmii boolean Cursor may be safely moved while
in insert mode
mmll string Turn on memory lock for area of
screen above cursor
mmss boolean Cursor may be safely moved while
in standout or underline mode
mmuu string Turn off memory lock
nncc boolean <rreettuurrnn> does not work
nndd string Move cursor right non-destructively
nnll string&* Newline character; default is \nn. _O_b_s_o_l_e_t_e
nnss boolean Terminal is CRT, but does not scroll
ooss boolean Terminal can overstrike
ppcc string Pad character any character other than null
pptt boolean Terminal's tabs set by hardware;
may need to be set with iiss
ssee string Exit standout mode
ssff string& Scroll forward
ssgg number Blank characters left by ssoo or ssee
ssoo string Enter standout mode
ssrr string& Reverse scroll
ttaa string& Tab character other than ^II,
or used with character padding
ttcc string Similar terminal--must be
last field in entry
ttee string End a program that uses ccmm
ttii string Begin a program that uses ccmm
uucc string Underscore character and skip it
uuee string Leave underscore mode
COHERENT Lexicon Page 4
termcap Technical Information termcap
uugg number Blank characters left by uuss or uuee
uull boolean Terminal underlines but does not overstrike
uupp string Move up one line
uuss string Begin underscore mode
vvbb string Visible bell; may not move cursor
vvee string Exit open/visual mode
vvss string Begin open/visual mode
xxbb boolean Beehive terminal (f1=<eesscc>,
f2=<ccrrttll-CC>)
xxnn boolean Newline is ignored after wrap
xxrr boolean <rreettuurrnn> behaves like ccee \rr \nn
xxss boolean Standout mode is not erased by writing over it
xxtt boolean Tabs are destructive
The following is the tteerrmmccaapp description of the Zenith Z-19 ter-
minal. The meaning of each field will be described:
kb|h19|heath|h19b|heathkit|heath-19|z19|zenith|heathkit h19:\
:al=1*\EL:am:bs:cd=\EJ:ce=\EK:cl=\EE:cm=\EY%+ %+ :\
:co#80:dc=\EN:dl=1*\EM:do=\EB:ei=\EO:ho=\EH:\
:im=\E@:li#24:mi:nd=\EC:as=\EF:ae=\EG:ms:pt:\
:sr=\EI:se=\Eq:so=\Ep:up=\EA:vs=\Ex4:ve=\Ey4:\
:kb=^h:ku=\EA:kd=\EB:kl=\ED:kr=\EC:kh=\EH:kn#8:\
:k1=\ES:k2=\ET:k3=\EU:k4=\EV:k5=\EW:\
:l6=blue:l7=red:l8=white:k6=\EP:k7=\EQ:k8=\ER:
The first field, which occupies line 1, gives the various aliases
for this terminal. The Heathkit H-19, which appears most
prominently, was the home-kit version of the commercially sold Z-
19. The remaining fields mean the following:
:aall=11*\EELL: <eesscc>LL adds new blank line; use
one millisecond for each line added
:aamm: Terminal has automatic margins
:bbss: Backspace character is <ccttrrll>-HH (the default)
:ccdd=\EEJJ: <eesscc>JJ clears to end of display
:ccee=\EEKK: <eesscc>KK clears to end of line
:ccll=\EEEE: <eesscc>EE clears screen
:ccmm=\EEYY%+ %+ :Cursor motion (described later)
:ccoo#8800: Screen has 80 columns
:ddcc=\EENN:\ <eesscc>NN deletes a character
(backslash indicates end of a line)
:ddll=11*\EEMM: <eesscc>MM deletes a line
:ddoo=\EEBB: <eesscc>BB moves cursor down one line
:eeii=\EEOO: <eesscc>OO exits from insert mode
:hhoo=\EEHH: <eesscc>HH moves cursor to home position
:iimm=\EE@: <eesscc>@ begins insert mode (note that
iicc is set)
:llii#2244: Terminal has 24 lines
:mmii: Cursor may be moved safely while terminal
is in insert mode
:nndd=\EECC: <eesscc>CC moves cursor right non-destructively
:aass=\EEFF: <eesscc>FF begins set of alternate characters
COHERENT Lexicon Page 5
termcap Technical Information termcap
:aaee=\EEGG:\ <eesscc>GG ends set of alternate characters
:mmss: Cursor may be moved safely while terminal
is in standout and underline mode
:pptt: Terminal has hardware tabs
:ssrr=\EEII: <eesscc>II reverse-scrolls the screen
:ssee=\EEqq: <eesscc>qq exits standout mode
:ssoo=\EEpp: <eesscc>pp begins standout mode
:uupp=\EEAA: <eesscc>AA moves the cursor up one line
:vvss=\EExx44: <eesscc>xx begins visual mode; insert
4 milliseconds of padding
when visual mode is begun
:vvee=\EEyy44:\ <eesscc>yy ends visual mode; insert
4 milliseconds of padding when visual
mode is ended
:kkbb=^hh: Backspace key sends <CCttrrll>-HH
:kkuu=\EEAA: Up-arrow key sends <eesscc>AA
:kkdd=\EEBB: Down-arrow key sends <eesscc>BB
:kkll=\EEDD: Left-arrow key sends <eesscc>DD
:kkrr=\EECC: Right-arrow key sends <eesscc>CC
:kkhh=\EEHH: Home key sends <eesscc>HH
:kknn#88:\ There are eight other keys on the
keyboard
:kk11=\EESS: Other key 1 sends <eesscc>SS
:kk22=\EETT: Other key 2 sends <eesscc>TT
:kk33=\EEUU: Other key 3 sends <eesscc>UU
:kk44=\EEVV: Other key 4 sends <eesscc>VV
:kk55=\EEWW:\ Other key 5 sends <eesscc>WW
:ll66=bblluuee: Other key 6 is labeled ``blue''
:ll77=rreedd: Other key 7 is labeled ``red''
:ll88=wwhhiittee: Other key 8 is labeled ``white''
:kk66=\EEPP: Other key 6 sends <eesscc>PP
:kk77=\EEQQ: Other key 7 sends <eesscc>QQ
:kk88=\EERR: Other key 8 sends <eesscc>RR
Note that the last field did _n_o_t end with a backslash; this in-
dicated to the COHERENT system that the tteerrmmccaapp description was
finished.
A terminal description does not have to be nearly so detailed.
If you wish to use a new terminal, first check the following
table to see if it already appears by tteerrmmccaapp. If it does not,
check the terminal's documentation to see if it mimics a terminal
that is already in /eettcc/tteerrmmccaapp, and use that description,
modifying it if necessary and changing the name to suit your ter-
minal. If you must create an entirely new description, first
prepare a skeleton file that contains the following basic
elements: number of lines, number of columns, backspace, cursor
motion, line delete, clear screen, move cursor to home position,
newline, move cursor up a line, and non-destructive right space.
For example, the following is the tteerrmmccaapp description for the
Lear-Siegler ADM-3A terminal:
COHERENT Lexicon Page 6
termcap Technical Information termcap
la|adm3a|3a|lsi adm3a:\
:am:bs:cd=^W:ce=^X:cm=\E=%+ %+ :cl=^Z:co#80:ho=^^:li#24:\
:nd=^L:up=^K:
Once you have installed and debugged the skeleton description,
add details gradually until every feature of the terminal is
described.
***** Cursor Motion *****
The cursor motion characteristic contains pprriinnttff-like escape se-
quences not used elsewhere. These encode the line and column
positions of the cursor, whereas other characters are passed un-
changed. If the ccmm string is considered as a function, then its
arguments are the line and the column to which the cursor is to
move; the % codes have the following meanings:
%dd Decimal number, as in printf. The origin is 0.
%22 Two-digit decimal number. The same as %22dd in printf.
%33 Three-digit decimal number. The same as %33dd in printf.
%. Single byte. The same as %cc in printf.
%+_n Add n to the current position value. n may be either a num-
ber or a character.
%>_n_m If the current position value is greater than _n+_m; then
there is no output.
%rr Reverse order of line and column, giving column first and
then line. No output.
%ii Increment line and column.
%% Give a % sign in the string.
%nn Exclusive or line and column with 0140 (Datamedia 2500 ter-
minal only).
%BB Binary coded decimal (16 * (_n/10))+(_n%10). No output.
%DD Reverse coding (_n-(22*(_n%1166)). No output (Delta Data ter-
minal only).
To send the cursor to line 3, column 12 on the Hewlett-Packard
2645, the terminal must be sent <eesscc>&aa1122cc0033YY padded for 6
milliseconds. Note that the column is given first and then the
line, and that the line and column are given as two digits each.
Thus, the cm capability for the Hewlett-Packard 2645 is given by:
COHERENT Lexicon Page 7
termcap Technical Information termcap
:cm=6\E&%r%2c%2Y:
The Microterm ACT-IV needs the current position sent preceded by
a <CCttrrll-TT>, with the line and column encoded in binary:
:cm=^T%.%.:
Terminals that use %. must be able to backspace the cursor (bbss or
bbcc) and to move the cursor up one line on the screen (uupp). This
is because transmitting \tt, \nn, \rr, or <ccttrrll-DD> may have undesir-
able consequences or be ignored by the system.
***** Similar Terminals *****
If your system uses two similar terminals, one can be defined as
resembling the other, with certain exceptions. The code tc names
the similar terminal. This field must be last in the tteerrmmccaapp
entry, and the combined length of the two entries cannot exceed
1,024 characters. Capabilities given first over-ride those in
the similar terminal, and capabilities in the similar terminal
can be cancelled by xxxx@ where xx is the capability. For example,
the entry
hn|2621nl|HP 2621nl:ks@:ke@:tc=2621
defines a Hewlett-Packard 2621 terminal that does not have the ks
and ke capabilities, and thus cannot turn on the function keys
when in visual mode.
***** Initialization *****
A terminal initialization string may be given with the is
capability; if the string is too long, it may be read from a file
given by the if code. Usually, these strings set the tabs on a
terminal with settable tabs. If both is and if are given, is
will be printed first to clear the tabs, then the tabs will be
set from the file specified by if. The Hewlett-Packard 2626 has:
:is=\E&j@\r\E3\r:if=/usr/lib/tabset/stdcrt:
***** Terminals Supported *****
The following table lists the terminals described in
/eettcc/tteerrmmccaapp, and an abbreviated name for each.
_N_a_m_e _T_e_r_m_i_n_a_l
aacctt55 Microterm Act V
COHERENT Lexicon Page 8
termcap Technical Information termcap
aaddmm33aa Lear-Siegler ADM3A
aaddmm3311 Lear-Siegler ADM31
aannssiippcc AT COHERENT console
ccoohhiibbmm PC COHERENT console
ddooss DOS 3.1 ANSI.SIS
hh11551100 Hazeltine 1510
hh1199 Heathkit H-19
hh1199aa Heathkit H-19 in ANSI
mmiimmee11 Microterm Mime1
mmiimmee22aa Microterm Mime2a
mmiimmee33aa Microterm Mime3a
qqvvtt110022 Qume QVT-102
qquummee55 Qume Sprint 5
ttvvii991122 Televideo 920
ttvvii992200 Televideo 920
ttvvii992255 Televideo 925
vvtt5522 DEC VT-52
vvtt110000 DEC VT-100
vvtt110000nn DEC VT-100 without initialization
vvtt110000ss DEC VT-100, 132 columns, 14 lines
vvtt110000ww DEC VT-100, 132 columns, 24 lines
wwyy5500 Wyse 50
***** Files *****
/eettcc/tteerrmmccaapp
***** See Also *****
modemcap, technical information, terminal-independent operations
COHERENT Lexicon Page 9
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.