This is a new entry to internationalize the console. It needs to be 8 bit clean so that ISO 8859 characters can be displayed without
the window system. cons8:\
:p8:lm=\r\nh login\72 :sp9600: Fixed speed entries
The std.NNN names are known to the special case portselector code in getty, however they can
be assigned to any table desired. The NNN−baud names are known to the special case
autobaud code in getty, and likewise can be assigned to any table desired hopefully the same speed.
a\std.110\110−baud:\
:nd1:cd1:uc:sp110: .....
..... 2\std.9600\9600−baud:\
:sp9600: Dial in rotary tables, speed selection via break
d1200\Dial−1200:\ :nx=d150:fd1:sp1200:
Odd special case terminals .....
.....
This file is a kind of simplified database that describes terminal lines. There is a default terminal class, default, which is used to set global defaults for all classes; it is read first, and then the entries
for the selected class are read and they override particular settings. The file layout and the syntax and meaning of individual fields in the file are the same as in the termcap database, a description
of which follows.
11.1.1.2 The BSD termcap Database
UNIX programs are written to be independent of the characteristics of any particular kind of terminal; they call a standard manipulation library, which is then responsible for interfacing to actual
terminals. Such libraries serve to map general terminal characteristics and functions to the specific character sequences required to perform them on any specific terminal.
While the actual terminals are indicated in the terminal line configuration file ttys, or ttytab, or by users who indicate what kind of terminal they are using by setting TERM environment variable, the
terminal definitions are stored in a separate database on the system. For the BSD terminal subsystem, the database is known as the termcap database this stands for terminal capabilities,
and it is contained in the huge ASCII file etctermcap. The etctermcap file contains a large number of entries that fully describe different terminals. It is important to notice that only terminals described
in the termcap database can be implemented; otherwise the system does not know how to handle terminals that are not described.
Some third−party software, and sometimes even a part of the system software, is based on the termcap terminal capability database. This software requires an appropriate termcap file, even
when running on the System V UNIX platforms that provide a different kind of terminal capability database known as terminfo. This is sufficient reason for some System V UNIX flavors to include
254
ls −l etc | grep termcap Solaris
lrwxrwxrwx 1 root root 24 May 28 1998 termcap − .. usrsharelibtermcap
Similarly, Linux provides an updated etctermcap file; even the getty program uses this file i.e., the termcap terminal database, while other screen−based programs use the terminfo terminal
database. For example, on Red Hat Linux Rel. 5.2 Apollo:
ls −l etc | grep term
−rw−r−−r−− 1 root root 434898 Sep 10 1998 termcap
In both cases, the etctermcap file includes a complete parallel terminal database both platforms, Solaris and Linux, resemble System V−flavored UNIX in this area, so the primary terminal database
is terminfo.
For a better idea of what the termcap database looks like, here is a part of it:
cat etctermcap
−−−−−−−−−−−−−−−−−−− Termcap source file termcap.src 1.33 SMI; from UCB 5.28
Please mail changes to arpanet: termcapberkeley ….
…. Mu\sun\Sun Microsystems Workstation console:\
This is a console
:am:bs:km:mi:ms:pt:li 34:co 80:cl= L:cm=\E[id;dH:\ :ce=\E[K:cd=\E[J:\
:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:rs=\E[s:\ :md=\E[1m:mr=\E[7m:me=\E[m:\
:al=\E[L:dl=\E[M:im=:ei=:ic=\E[:dc=\E[P:\ :AL=\E[dL:DL=\E[dM:IC=\E[d:DC=\E[dP:\
:up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\ :k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\
:k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z:
…. ….
This file describes capabilities of various terminals, as needed by software such as screen editors. It does not attempt to describe
printing terminals very well, nor graphics terminals. Someday . See termcap5 in the Unix Programmers Manual for documentation.
Conventions: First entry is two chars, first char is manufacturer, second char is canonical name for model or mode.
Third entry is the one the editor will print with set command. Last entry is verbose description.
Others are mnemonic synonyms for the terminal. Terminal naming conventions:
Terminal names look like manufacturer model − modesoptions Certain abbreviations e.g. c100 for concept100 are also allowed
for upward compatibility. The part to the left of the dash, if a dash is present, describes the particular hardware of the terminal.
The part to the right can be used for flags indicating special ROMs, extra memory, particular terminal modes, or user preferences.
All names are always in lower case, for consistency in typing.
255
These are DEC terminals
Note that xn glitch in vt100 is not quite the same as concept, since the cursor is left in a different position while in the weird state
concept at beginning of next line, vt100 at end of this line so all versions of vi before 3.7 dont handle xn right on vt100.
I assume you have smooth scroll off or are at a slow enough baud rate that it doesnt matter 1200? or less. Also this assumes
that you set auto−nl to on, if you set it off use vt100−nam below. Since there are two things here called vt100, the installer can make
a local decision to make either one standard vt100 by including it in the list of terminals in reorder, since the first vt100 in
etctermcap is the one that it will find. The choice is between nam no automatic margins and am automatic margins, as determined
by the wrapline switch group 3 2. I personally recommend turning on the bit and using vt100−am, since having stuff hammer on the right
margin is sort of hard to read. However, the xn glitch does not occur if you turn the bit off.
I am unsure about the padding requirements listed here. I have heard a claim that the vt100 needs no padding. Its possible that it needs
padding only if the xonxoff switch is off. For UNIX, this switch should probably be on.
The vt100 uses rs and rf rather than isctst because the tab settings are in non−volatile memory and dont need to be reset upon login.
You can type reset to get them set. d0\vt100\vt100−am\vt100am \dec vt100:\
:do=J:co80:li 24:cl=50\E[;H\E[2J:sf=5\ED:\ :le=H:bs:am:cm=5\E[id;dH:nd=2\E[C:up=2\E[A:\
:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
:rf=usrsharelibtabsetvt100:\ :rs=\E\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E:\
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=H:\ :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt3:xn:\
:sc=\E7:rc=\E8:cs=\E[id;dr:
dp\vt100−np\vt100 with no padding for psl games:\
256
d1\vt100−nam\vt100nam\vt100 wno am:\ :am:xn:\
:is=\E\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E:\ :tc=vt100−am:
…. ….
END OF TERMCAP −−−−−−−−−−−−−−−−−−−−−−−−
Only part of the etctermcap file is presented. We have focused on the entries for DEC VT100 type terminals, as they are very common VT100 is presented in bold. The termcap entries are very
similar to the printcap entries which present in many cases simplified versions of termcap entries.
The first line in the entry is a series of names and aliases for the terminal; any of them if they do not contain spaces could be used as the value of the TERM environment variable. The remainder of
the entry is a colon−separated series of capability codes and values. There are several kinds of capabilities:
Data about the terminal — For example, the am code says that the terminal can automatically wrap long output strings onto multiple lines on the terminal screen. Some
other codes describe how many columns the terminal screen has 80, or how many lines it has 24, and so on.
•
The sequence of characters to send to the terminal to get it to perform some action — The codes indicate what ESCAPE sequence is required to perform some action on the terminal,
for example, to move the cursor to some position the ESCAPE character is abbreviated \E. •
The sequence of characters emitted when a special key is pressed — These codes hold the sequence for the special keys on the terminal the ESCAPE character is abbreviated \E.
• There are three types of capability:
Boolean capabilities — Consist of a capability name with no argument; for example, the aforementioned am for automatic wrapping
1. Numeric capabilities — Consist of a capability name, a sharp sign , and a number; for
example, co80 says that the terminal has 80 columns
2. String capabilities — Consist of a capability name, an equal sign =, and a string a
command sequence; for example, up=K specifies that the sequence CTRL−K will move the cursor up one line
3.
Once a terminal is described in the termcap database, each time a reference is made to the terminal, the system addresses the database, searches for a corresponding entry, and learns about
its capabilities. The local environment variable TERMCAP can be introduced and set to the values of the terminal capabilities to make this process faster, so the repeated browsing of the termcap
database can be skipped.
11.1.2 System V Terminal Subsystem