Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!acorn!camcon!igp From: igp@camcon.co.uk (Ian Phillipps) Newsgroups: comp.windows.x Subject: How Sun's vi tells the window size Keywords: xterm vi Message-ID: <4056@titan.camcon.co.uk> Date: 12 Oct 89 10:56:20 GMT References: <253@zeek.UUCP> <17994@pasteur.Berkeley.EDU> Organization: Cambridge Consultants Ltd., Cambridge, UK Lines: 21 Followups-To: alt.sys.sun I apologise that this has little to do with X, but there have been some offbeam comments about how vi tells window sizes on Suns. I must admit we don't have source to vi here, but the info in termcap(3) is pretty explicit: Tgetent extracts the entry for terminal name into the bp buffer, with the current size of the tty (usually a window). This allows pre-SunWindows programs to run in a window of arbitrary size. I.e. tgetent is kludged, so that all programs using it, or curses, will know what size window they started out with. The :co and :li numbers are ignored, so don't have to be changed. They usually say 34x80, which is the default startup size (and the size of the boot-time sun screen). BTW, One of the upgrades promised for SVR4 is a vi that knows about SIGWINCH. -- UUCP: igp@camcon.co.uk | Cambridge Consultants Ltd | Ian Phillipps or: igp@camcon.uucp | Science Park, Milton Road |----------------- Phone: +44 223 420024 | Cambridge CB4 4DW, England |