[comp.windows.x] How Sun's vi tells the window size

igp@camcon.co.uk (Ian Phillipps) (10/12/89)

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 |