[net.followup] ANSI 3.64 termcap entry

mark@cbosgd.UUCP (Mark Horton) (07/28/84)

I'd like to make a few comments on the offered 3.64 entry.

For the most part it correctly identifies the termcap subset of 3.64.
However, there are a few mistakes.  cs is a vt100 extension, 3.64 doesn't
have it.  Ditto for the four pf keys k1-k4.  (In fact 3.64 doesn't say
anything about arrow keys either but almost everybody has them.)  The
padding on al/dl is probably wrong for most terminals - since every 3.64
terminal I've ever seen supports Xon/Xoff this doesn't matter (unless you
use EMACS, in which case it must be carefully timed for your terminal.)
The ; and 2 in cl aren't needed.

I'd also like to point out the shortcomings in assuming that this will
work for every 3.64 terminal.  3.64 doesn't specify many important things;
for example "am" is a guess on the part of the author, so is the 24x80
assumption.  (The Ann Arbor Ambassador and Guru support 3.64 and also
support lots of screen sizes.)  And nobody implements full 3.64, since
there is lots of weird stuff in there for typesetters (like italics) and
some things that nobody implements (like both bold and dim highlighting).
Everybody does a subset, and nobody does the same subset.  The vt100 is
an ANSI 3.64 terminal (DEC was heavily involved with the standard) but
is missing al, dl, ic, im, ei.  Some terminals have only ic, others have
only insert mode, others have both.  Many vt100 clones use nonstandard
insert/delete line sequences (the Falco, for instance.)

This entry goes by fairly old documentation (in all fairness, it's based
on the most recent termcap-based documentation) so many new additions
that appeared in termcap just before I went to terminfo, such as parameterized
cursor motions and inserts/deletes, aren't mentioned.

The answer to the question about the alternate character set is that it has
been undefined until recently.  (It was put in for APL but that never made
it into the mainstream.)  Recently terminfo has standardized on a small subset
of the VT100 alternate char set (the line drawing characters) since these
seem to be catching on.  There is another capability to enable the ACS (the
VT100 needs \E(0 or some such thing) and a mapping capability to enable
terminals with different character set mappings (like HP) to work.

I'll enclose the terminfo description for ANSI 3.64 for reference.

# # ANSI - standards and other nonexistent terminals emulated in software.
#	@(#)ansi.ti	1.7 (MRH) 9/8/83
#
# This category is used for terminals people "make up" in software
# that do not represent a particular piece of hardware.  This includes
# standards, such as the ANSI standard, as well as emulator programs
# that accept a particular set of escape sequences.
#
# ANSI capabilities are broken up into pieces, so that a terminal
# implementing some ANSI subset can use many of them.
ansi+local,
	cud=\E[%p1%dB, cub=\E[%p1%dD, cuf=\E[%p1%dC, cuu=\E[%p1%dA,
ansi+local1,
	cud1=^J, cub1=^H, cuf1=\E[C, cuu1=\E[A,
ansi+tabs,
	ht=^I, cbt=\E[Z, hts=\EH, tbc=\E[2g,
ansi+inittabs,
	it#8, use=ansi+tabs,
ansi+erase,
	ed=\E[J, el=\E[K, clear=\E[H\E[J,
ansi+rca,
	hpa=\E[%i%p1%dG, vpa=\E[%i%p1%dd,
ansi+cup,
	cup=\E[%i%p1%d;%p2%dH, home=\E[H,
ansi+rep,
	rep=%p1%c\E[%p2%{1}%-%db,
ansi+idl,
	dl=\E[%p1%dM, il=\E[%p1%dL,
ansi+idl1,
	dl1=\E[M, il1=\E[L,
ansi+idc,
	dch1=\E[P, ich=\E[%p1%d@, ich1=\E[@, smir=\E6, rmir=\E6,
ansi+arrows,
	kcuu1=\E[A, kcud1=\E[B, kcub1=\E[D, kcuf1=\E[C, khome=\E[H, kbs=^H,
ansi+sgr|ansi graphic renditions,
	rev=\E[7m, blink=\E[5m, invis=\E[8m, sgr0=\E[0m,
ansi+sgrso|ansi standout only,
	rmso=\E[m, smso=\E[7m,
ansi+sgrul|ansi underline only,
	rmul=\E[m, smul=\E[4m,
ansi+sgrbold|ansi graphic renditions; assuming terminal has bold; not dim,
	bold=\E[1m,
	sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
	use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul,
ansi+sgrdim|ansi graphic renditions; assuming terminal has dim; not bold,
	dim=\E[2m,
	sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p5%t2;%;m,
	use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul,
ansi+pp|ansi printer port,
	mc4=\E[4i, mc5=\E[5i, mc0=\E[0i,
# ANSI is a vanilla ANSI terminal.  This is assumed to implement all the
# normal ANSI stuff with no extensions.  It assumes insert/delete line/char
# is there, so it won't work with vt100 clones.  It assumes video
# attributes for bold, blink, underline, and reverse, which won't
# matter much if the terminal can't do some of those.  Padding is
# assumed to be zero, which shouldn't hurt since xon/xoff is assumed.
# We assume a 24x80 screen.  This entry was derived from the Ann Arbor
# Ambassador, and is untested.
ansi|generic ansi standard terminal,
	use=vanilla, am, cols#80, lines#24, xon,
	use=ansi+cup, use=ansi+rca,
	use=ansi+erase,
	use=ansi+tabs,
	use=ansi+local1, use=ansi+local,
	use=ansi+idc, use=ansi+idl1, use=ansi+idl,
	use=ansi+rep,
	use=ansi+sgrbold, use=ansi+arrows,
# Bare minimum ANSI terminal.  This should work on anything, but beware
# of screen size problems and memory relative cursor addressing.
minansi|minimum ansi standard terminal,
	am, xon, use=vanilla, cols#80, lines#24,
	use=ansi+cup, use=ansi+erase,
# This terminal type is for ANSI terminals with ONLY memory relative cursor
# addressing and more than one page of memory.  It uses local motions
# instead of direct cursor addressing, and makes almost no assumptions.
# It does assume auto margins, no padding and/or xon/xoff, and a 24x80 screen.
mransi|mem rel cup ansi,
	am, use=vanilla, cols#80, lines#24, xon,
	use=ansi+erase, use=ansi+local1,
# Columbus UNIX virtual terminal.  This terminal also appears in UNIX 4.0
# and successors as line discipline 1 (?), but is undocumented and does
# not really work quite right.
virtual|cbunix|cb-unix|cb-unix virtual terminal,
	cr=^M, cud1=^J, ind=^J, bel=^G, cols#80, lines#24, am, clear=\EJ,
	cub1=^H, cup=\EG%p2%c%p1%c, cuf1=\EC, cuu1=\EA, el=\EK,
	ed=\EL, il1=\EP, dl1=\EN, ich1=\EO, dch1=\EM, lm#0, da, db,
	kcub1=\ED, kcuf1=\EC, kcuu1=\EA, kcud1=\EB, khome=\EE,
	smso=\Ea\004, rmso=\Eb\004, smul=\Ea\001, rmul=\Eb\001,
# This terminal is based on virtual but cleans up a few problems with
# control characters in parameter strings.  It is implemented in
# mrh's window manager.
pty|4bsd pty terminal,
	smso=\Ea$, rmso=\Eb$, smul=\Ea!, rmul=\Eb!,
	cup=\EG%p1%' '%+%c%p2%' '%+%c, use=virtual,
# A dumb terminal with 1 line which is a fake status line.
# This is useful to run sysline in in a multi-window environment.
1line|one line window,
	cr=^M, ind=^J, cols#80, lines#1, am, ht=^I, cub1=^H,
	hs, tsl=\n, fsl=, dsl=,
# 1linepty is like 1line but the 1 line window is smarter,
# with standout, cursor addressing, and clear to eol.
1linepty|1 line window in a pty,
	smso=\Ea$, rmso=\Eb$, smul=\Ea!, rmul=\Eb!,
	cup=\EG%p1%' '%+%c%p2%' '%+%c, tsl=\r\EK\EG %p2%' '%+%c,
	eslok, use=1line,
#
# Generic "terminals".  These are used to label tty lines when you don't
# know what kind of terminal is on it.  The characteristics of an unknown
# terminal are the lowest common denominator - they look about like a ti 700.
vanilla,
	bel=^G, cr=^M, cud1=^J, ind=^J,
dumb,
	am, cols#80, use=vanilla,
unknown,
	gn, use=dumb,
arpanet|network|net,
	use=unknown,
bussiplexer,
	use=unknown,
datakit,
	use=unknown,
dialup,
	use=unknown,
ethernet,
	use=unknown,
plugboard|patch|patchboard,
	use=unknown,
switch|intelligent switch,
	use=unknown,