how to set number of lines

Guy Harris guy at auspex.auspex.com
Wed Jul 12 04:56:01 AEST 1989


>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).



More information about the Comp.unix.questions mailing list