Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!mcsun!ukc!dcl-cs!gdt!gdr!exspes From: exspes@gdr.bath.ac.uk (P E Smee) Newsgroups: comp.unix.wizards Subject: How does vi know? Message-ID: <1989Oct25.095349.22098@gdt.bath.ac.uk> Date: 25 Oct 89 09:53:49 GMT Reply-To: exspes@gdr.bath.ac.uk (P E Smee) Organization: University of Bristol c/o University of Bath Lines: 22 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@uk.ac.bristol Computer Centre | BITNET: Smee%uk.ac.bristol@ukacrl.bitnet University of Bristol | Internet: Smee%uk.ac.bristol@nsfnet-relay.ac.uk (Phone: +44 272 303132) | UUCP: ...!mcvax!ukc!gdr.bath.ac.uk!exspes