terminfo, termcap, etc
Chris Torek
chris at umcp-cs.UUCP
Wed May 21 16:13:27 AEST 1986
In article <162 at njitcccc.UUCP> ken at njitcccc.UUCP (Kenneth Ng) writes:
>In article <299 at enmasse.UUCP>, keith at enmasse.UUCP (Keith Crews) writes:
>>While we are on the subject of terminfo, does anyone know of a
>>documented list of terminfo entries that are sufficient to allow
>>curses to work properly, if not optimally, in all cases? [KC]
>I have found that the minimal requirements are (I think): col
>and row numbers, clear screen, cursor addressing, and indexing.
>By indexing Un*x means the control sequence to scroll the screen
>up a line. [KN]
Actually, at least under 4BSD, vi requires:
1) cursor motion, including EITHER:
a) up and left and absolute, OR
b) up, down, left, and right
2) clear screen
3) screen size (`co#' and `li#')
4BSD vi assumes a line feed from the last line will force a scroll.
I once worked with a terminal emulator for which this was not true;
it was rather painful. (Adding `ns', `terminal is a CRT but cannot
scroll', makes vi use open mode: workable but unpleasant.)
4BSD curses may have a different set of minimums; at any rate I
remember *something* needed a clear-to-end-of-line as well.
Also, some attributes may force others to be required. For example,
`db' implies a need for `cd=', though vi will iterate `ce=' if it
must. (It may even use blanks if necessary; I have never tried it.)
Moreover, some attributes (e.g., `am') will cause what look like
random trouble if they are specified incorrectly. If you want
instead to know which capabilites are *examined*, well, again,
that depends on the program.
My own termcap Emacs screen driver has similar (though not quite
identical) requirements as vi; but it currently *uses* all of these:
Strings (`cl='):
al bc cd ce cl ch cm cr cv dc dl dm ds ed ei ho ic im ip
pc ll nd nl se so ta te ti ue up us vb ve vs
Numerics (`co#'):
co li sg tw ug
Flags (`am'):
MT am bs db hz in km mi ms nc nn rn ul xn xs xt
(Alas, it is missing the new AL, DL, etc. entries; nor will it use
`cs='. `rn', `nn', `tw#', and `ds=' are locals.)
I just found vi's strings and flags too:
al bc bt cd ce cl cm cr cs dc dl dm do ed ei k0 k1 k2 k3 k4
k5 k6 k7 k8 k9 ho ic im ip kd ke kh kl kr ks ku ll nd nl pc
rc sc se sf so sr ta te ti up vb vs ve AL DL UP DO LE RI
and
am bs da db eo hc hz in mi nc ns os ul xb xn xt xx
respectively.
>But of course the manual does not say what the minimal requirements
>are, I guess they just assume you can read minds.
I seem to recall seeing a list of requirements somewhere. Perhaps
it was in a bit of source code. The real problem, though, is that
the `minimal' set depends upon the program, and could change between
system releases; and writing a complete description is always
sufficient, if time-consuming.
[And a bit off the beaten track---in fact in .signature territory:]
>Vulcan jealousy: "I fail to see the logic in prefering Stan over me"
Actually, it was `Stonn'; I am not sure about the rest of the quote.
But I do recall this (probably inexactly): `You may find that *having*
something is not quite so pleasing a thing as *wanting* it.'
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.unix.wizards
mailing list