TERMCAP
D5|dt80|dmdt80|dm80|datamedia dt80/1:\
is=\E<\E[2J\E[H\E[?1;3;5;6;9l\E[?7;8h:\
am:bs:cd=\E[J:co#80:li#24:ce=\E[K:cl=\E[2J\E[H:\
cm=%i\E[%d;%dH:ho=\E[H:nd=\E[C:\
so=\E[7m:se=\E[m:\
up=\E[A:us=\E[4m:ue=\E[m:\
vb=\E[?5h\E[?5l:\
vs=\E[1;2;3;4q\E[?4l:ve=\E[0q\E[?4h:\
kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:\
sr=\EM:\
k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
ks=\E=:ke=\E>:
TERMCAP2
D5|dt80|dmdt80|dm80|datamedia dt80/1:\
is=\E<\E[2J\E[H\E[?1;3;5;6;9l\E[?7;8h:\
am:bs:cd=\E[J:co#80:li#24:ce=\E[K:cl=\E[2J\E[H:\
cm=%i\E[%d;%dH:ho=\E[H:nd=\E[C:\
so=\E[7m:se=\E[m:\
up=\E[A:us=\E[4m:ue=\E[m:\
vb=\E[?5h\E[?5l:\
vs=\E[1;2;3;4q\E[?4l:ve=\E[0q\E[?4h:\
kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:\
sr=\EM:\
k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
ks=\E=:ke=\E>:
LNEXT
ONELCLEAN
UTERMINAL
TERMINAL
NEXT
$V1$
HILINE
PAUSE
q - to quit, <CR> - to continue
GO
The /etc/termcap file is a database
of terminal capabilities which
permits one to write terminal-
independent code for all the
terminals whose capabilities
are defined in this file on
your system.
Let us take a look at one of many
termcap entries by looking at
/etc/termcap with cat.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type cat /etc/termcap
Please type cat /etc/termcap
You will be helped this time!
FORGET1
cat /etc/termcap
Observe the result above:
Above, you see a typical terminal
definition entry as specified in the
/etc/termcap file. D5 as well as
all the character sequences
separated by | up to and including
datamedia represent the terminal
type.
D5|dt80|dmdt80|dm80|datamedia dt80/1:\
Note the capabilities: cl is the
terminal clear sequence, cm is the
cursor addressing sequence, so is the
standout (reverse video) begin se-
quence, while se is the standout end
sequence, (see the UNIX reference
manual termcap entry for details).
Once the TERM variable is set
correctly to the terminal whose
control sequences are defined in
the /etc/termcap file, all
your programs then may access these
control sequences.