[net.info-terms] Termcap Standardization

robin@medstar.UUCP (Robin Cutshaw) (08/15/85)

I have been working on a set of programs that make heavy use of function keys
and cursor motion keys if they are available.  Using the termlib stuff for
termcap is proving to be useless.

  It seems that function key definitions (k0-k9) are used differently for
various terminals.  Some entries use k0 for function key #1 and k9 for
function key #10 (e.g. visual, tvi920, altos), whereas some use k1 for
key #1 and k0 for key #10 (most others).  Also, some terminals with more
than 10 function keys use kA, kB, etc. while some use k10, k11, k12, etc.
There seems to be no way to get them all covered!

  The line drawing character set definitions are equally confused.  Many
termcap entries just don't define characters that are there at all, and
some leave out entries like GC, GL, and GR.  Many terminals that have the
single line drawing character set also have the double line and double-single
line sets also, but there is no definition mechanism in termcap.

  In general, there are many ommisions and errors in the termcap database.  I
thought about using the termcap compare program posted not too long ago, but
this doesn't help others who might like to use my programs.

PROPOSAL :

  A standard termcap from a single source with version support and terminal
entry submission and screening.  This doesn't have to break anything already
there, it would just standardize for everyone (app developers and end users)
a database that is well defined and supposedly correct.  Granted, this would
be a monumental task at first, but as standard termcaps settled down it
wouldn't be to difficult.

  It doesn't seem to be an impossible task.  Does terminfo have such problems?

-- 
----
Robin Cutshaw
uucp:   ...!{akgua,gatech}!medstar!robin

karl@vrdxhq.UUCP (Karl Nyberg) (08/16/85)

I had a recent opportunity to try chasing down a standard TERMINFO
database, and got pointed to attunix!terminfo.  Apparently someone
there (I forget his name at the moment) is responsible for maintaining
a capabilities database, and, I would suppose, the corresponding
database(s) for terminals.
-- 
-- Karl
--

DDN: 	nyberg@eclb, nyberg@utexas-20, Nyberg@mit-multics
UUCP:	...!{rlgvax, seismo, trwatf, umcp-cs}!vrdxhq!karl

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (08/16/85)

>   It seems that function key definitions (k0-k9) are used differently for
> various terminals.  Some entries use k0 for function key #1 and k9 for
> function key #10 (e.g. visual, tvi920, altos), whereas some use k1 for
> key #1 and k0 for key #10 (most others).  Also, some terminals with more
> than 10 function keys use kA, kB, etc. while some use k10, k11, k12, etc.

k10.. definitely will not work; termcap capability names are limited to two
characters.  Many of the two-letter combinations starting with k are
already reserved for other keys (kb = backspace, etc.).  The first function
key should be "k0" but as you note many termcaps start at "k1".  You can
overcome this in your application by trying to get strings for k0..k9
and corresponding labels l0..l9, using whatever you found rather than
making any assumptions about them.

>   The line drawing character set definitions are equally confused.

There are no standard line-drawing capabilities in termcap or terminfo.
(There is no support for graphics, either.  This is by design.)

>   In general, there are many ommisions and errors in the termcap database.

Yes, indeed.  (Spelling errors, too.)

>   A standard termcap from a single source with version support and terminal
> entry submission and screening.  This doesn't have to break anything already
> there, it would just standardize for everyone (app developers and end users)
> a database that is well defined and supposedly correct.  Granted, this would
> be a monumental task at first, but as standard termcaps settled down it
> wouldn't be to difficult.

You could send your contributions to Berkeley or to me at BRL so that
future shipments of our systems would include your entries.  Remember
that this is all volunteer labor.

> Does terminfo have such problems?

The only reason terminfo is in better overall shape is that it is
relatively new and was provided by a single source.

peter@baylor.UUCP (Peter da Silva) (08/18/85)

>   It seems that function key definitions (k0-k9) are used differently for
> various terminals.  Some entries use k0 for function key #1 and k9 for
> function key #10 (e.g. visual, tvi920, altos), whereas some use k1 for
> key #1 and k0 for key #10 (most others).  Also, some terminals with more
> than 10 function keys use kA, kB, etc. while some use k10, k11, k12, etc.
> There seems to be no way to get them all covered!

K10 is not a valid TERMCAP feild name. KA is key 10. If you find a K10 in
the entry you'ld do well to get it changed, as it will break many a program,
not mine, but many others.

>   The line drawing character set definitions are equally confused.  Many
> termcap entries just don't define characters that are there at all, and
> some leave out entries like GC, GL, and GR.  Many terminals that have the

Terminal graphics are really outside the scope of Termcap. Terminfo can
probably handle them, but Termcap was never designed to deal with anything
but BL through TILDE.

>   In general, there are many ommisions and errors in the termcap database.  I
> thought about using the termcap compare program posted not too long ago, but
> this doesn't help others who might like to use my programs.

If people find your programs useful they will be able to set up their own
TERMCAP file to deal with them: "setenv TERMCAP $HOME/termcap". It is probably
inadvisable to require graphics character sets in a termcap program, as many
terminals don't support them... certainly damn few terminal emulators do.

Or you could go with curses/terminfo... speaking of which: does anybody nearby
baylor or hyd-ptd have the PD curses/terminfo source lying around?
-- 
	Peter da Silva (the mad Australian werewolf)
		UUCP: ...!shell!neuro1!{hyd-ptd,baylor,datafac}!peter
		MCI: PDASILVA; CIS: 70216,1076

naiman@pegasus.UUCP (Ephrayim J. Naiman) (08/28/85)

<munch, munch>

>>   The line drawing character set definitions are equally confused.

> There are no standard line-drawing capabilities in termcap or terminfo.
> (There is no support for graphics, either.  This is by design.)

I think System V release 3 curses will have part of the line drawing set
supported.
-- 

==> Ephrayim J. Naiman @ AT&T Information Systems Laboratories (201) 576-6259
Paths: [ihnp4, allegra, mtuxo, maxvax, cbosgd, lzmi, ...]!pegasus!naiman

lmc@denelcor.UUCP (Lyle McElhaney) (08/30/85)

> >   The line drawing character set definitions are equally confused.  Many
> > termcap entries just don't define characters that are there at all, and
> > some leave out entries like GC, GL, and GR.  Many terminals that have the
> 
> Terminal graphics are really outside the scope of Termcap. Terminfo can
> probably handle them, but Termcap was never designed to deal with anything
> but BL through TILDE.
>                                It is probably
> inadvisable to require graphics character sets in a termcap program, as many
> terminals don't support them... certainly damn few terminal emulators do.

Well, its true that termcap was designed before the line drawing character
sets were commonly available on terminals, but it doesn't seem too hard to
get them into use through termcap. The set of caps that I use in my work
with the Rand editor are:

	Gs - turn on line-drawing mode  Ge - turn it off
	Tl - Upper left corner          Tr - top right corner
	Bl - Bottom left corner         Br - bottom right corner
	Vl - vertical line              Hl - horizontal line
	Lj - left join                  Rj - right join
	Tj - top join                   Bj - bottom join
	Cj - center join (cross)        Xc - some other distinct line-drawing
						mode character

(Most of this was posted a long time back by eric@aerospace - credit where
due.) This works well on vt100 types, freedom 100's, and every other line-
drawing set I've seen (except the ADM 11 - would you believe magic cookies
in the line-drawing stuff?).

Note, this is not a general purpose graphics interface - just horizontal
and vertical lines with corners and joins, for drawing windows. Its well
within the capabilities of the design of termcap.

A general question on the termcap function tputs: what is the easiest way
to defeat the delay feature (avoiding the delays that are represented
by the numbers on the front of the cap)? If the terminal is running in
cbreak mode, the delays aren't needed (assuming some flow control mechanism
alive in cbreak mode).

It is unfortunate that there is no single authority on termcap as there is
on terminfo (although Doug Gwynn does fill that function as well as it can
be filled in the chaos).  Adding caps (like the line-drawing set above) is
purely ad-hoc; no where exists where they (or any reasonable facsimile)
are accepted and made "standard", so termcap entries containing them are
also non-standard, and aren't acceptable in general.  Since there are no
entries published with them, everyone invents their own,.....and so on.