How does vi know?

P E Smee exspes at gdr.bath.ac.uk
Wed Oct 25 19:53:49 AEST 1989


Vi 'knows' whether you are on a screen terminal or a (paper or glass) tty,
and comes up differently depending.  Question is, how does it know?  I've
more or less decided (by experimenting with elm and vi) that curses
alone is not sufficient to answer the question.  I've done a 'strings vi'
and determined that vi does *not* contain a coded-in list of terminal
types.

I surmise that vi checks for the presence or absence of certain particular
termcap capabilities using one of the tget* functions.  Is this right?
If so, which particular termcap capabilities does it check?  If not,
what *does* it do?  (Owing to our Unix root's interpretation of our
license, he won't let me look at our src dirs.  Not even if I promise
not to give him any IBM CMS source in return.  On the one small Unix on
which I am root, we don't have a source licence.  Sigh.)

Replies by email would be fine, to save general net bandwidth.    

-- 
 Paul Smee               |    JANET: Smee at uk.ac.bristol
 Computer Centre         |   BITNET: Smee%uk.ac.bristol at ukacrl.bitnet
 University of Bristol   | Internet: Smee%uk.ac.bristol at nsfnet-relay.ac.uk
 (Phone: +44 272 303132) |     UUCP: ...!mcvax!ukc!gdr.bath.ac.uk!exspes



More information about the Comp.unix.wizards mailing list