1BSD/man5/ttycap.5

.th TTYCAP V 11/16/77
.sh NAME
ttycap \- tty capability data base
.sh DESCRIPTION
The
.it ttycap
data base gives capabilities of terminals.
Used with
.it ttytype
and
.it htmp
it allows the use of special terminal features and the adaptation
of programs to their input/output environment.
The
.it ttycap
file is organized in a manner similar to
.it passwd.
Each line in the file gives a terminal, and then information as to capabilities
of that terminal, in fields separated by `:' characters.
.s3
The first field gives the two character terminal code used in
.it ttytype
to describe the terminal, and then a series of one or more names
for this terminal separated by `|' characters.
For example, the entry for an
\s-2LSI-ADM3A\s0
might be:
.s3
.dt
	ca\||\|adm3a\||\|3a:0:0:li#24:co#80:cl=^z:nd=^l:up=^k:am:bs:ca
.s3
Here the internal code for this terminal is seen to be `ca',
and it is known as an
`adm3a' or a `3a'.
The next two fields give the modes which are to be set and cleared respectively
to return the terminal to a `standard' form.
The rest of the fields are indicated by a two-character code,
and are of three kinds: numeric valued, string valued, and yes/no
capabilities.
Numeric valued parameters are given with an `#' and the value,
e.g. `li#24'.
The numeric valued paramters are:
.s3
.dt
	li	number of lines (on a \s-2CRT\s0 screen)
.br
	co	number of columns
.s3
String valued parameters are given with an `=' and then a string
up to a `:'.
The following escapes are recognized in the string:
.s3
.nf
	^\fIl\fR	with \fIl\fR a lower case letter gives control-\fIl\fR
	\e^	gives ^
	\e:	gives :
	\eE	gives an \s-2ESCAPE\s0
	\e\e	gives a backslash `\e'
	\e\fInnn\fR	gives character with octal representation \fInnn\fR
	\en	gives a newline
	\er	gives a carriage return
	\et	gives a tab
	\eb	gives a backspace
.fi
.s3
In addition, if any line in the file ends with a backslash, then that
newline is ignored, effectively continuing the line onto the next.
String valued options are:
.s3
.dt
	cl	clear screen sequence
.br
	hd	half-line down sequence
.br
	ho	home sequence
.br
	hu	half-line up sequence
.br
	is	initialization sequence (set tabs, etc.)
.br
	if	file name containing initialization sequence
.br
	nd	non-destructive space sequence
.br
	up	up-line (reverse line feed sequence)
.br
	al	add new blank line where cursor is (open)
.br
	dl	delete the line where the cursor is (close)
.br
	ce	clear to end of line
.br
	cd	clear to end of display
.br
	gu	garbage may come up from below when we \fIdl\fR
.s3
Finally, the following capabilities are recognized:
.s3
	it	intelligent terminal
.br
	ca	cursor addressible
.br
	pt	plotting terminal
.br
	am	automatic margins (auto-new-line)
.br
	bs	backspace capability
.br
	os	overstrike capability
.br
	pa	all characters will print
.br
	pt	tabs will print
.s3
The set of routines in
.it ttycap
(VII)
may be used to conveniently deal with the
.it ttycap
data.
.sh LIMITATIONS
A maximum of 512 characters in a single terminal entry are allowed.
.sh FILES
/etc/ttycap	capability file
.br
/etc/ttytype	terminal type file
.sh SEE\ ALSO
htmp (V), ttytype (V), sethome (VI), ttytype (VI), htmp (VII), ttycap (VII), typeof (VII)
.sh AUTHOR
William Joy
.sh BUGS
Cursor addressing information should be encoded in a string valued
.it ca
option.