Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: how to set number of lines Message-ID: <2218@auspex.auspex.com> Date: 11 Jul 89 18:56:01 GMT References: <163@jma.UUCP> <216000017@s.cs.uiuc.edu> <1040@kuling.UUCP> <2216@auspex.auspex.com> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 16 >The above works for HP-UX and probably for Sys V. I am not sure whether >BSD supports LINES and COLUMNS. It doesn't, but in 4.3BSD and later, it doesn't need to; there's an "ioctl" that programs use to get the size of the display, and both "rlogin" and "xterm" are supposed to use another "ioctl" to set the tty driver's notion of the size (it works fine on the machines I've used). The "curses" library uses that "ioctl", so if it yields non-zero sizes they override whatever is in the "termcap" entry; the "termcap" library doesn't, though, so programs have to do it themselves (although on SunOS the "termcap" library *does* use it so programs shouldn't have to do it themselves). "vi" is one program that does it itself. LINES and COLUMNS are in the S5 "curses"/"terminfo" library; I presume said library will be updated in S5R4 to support the aforementioned "ioctl" (since S5R4 will support it).