how to set number of lines

Guy Harris guy at auspex.auspex.com
Sat Jul 15 05:06:18 AEST 1989


 >1. No X-windows -> no resize command -> eval `resize` ->
 >   eval resize: command not found -> failure.
 >
 >2. The BSD I work on does _not_ support LINES and COLUMNS, as I found out to
 >   my dismay when they first moved me here. (4.3BSD on a Vax-780). I don't
 >   think SunOS does either.

The S5-environment "curses"/"terminfo" under SunOS does, but the
BSD-environment "termcap" doesn't and neither does "vi".

However, under most BSD-flavored systems (at least 4.3-based ones and
4.2-based ones that have picked up the TIOC[GS]WINSZ "ioctl"s),

	stty rows <# of rows> cols <# of columns>

should work (it may not be documented under SunOS prior to 4.0, but as I
remember it was there since 3.2).

S5-flavored systems (at least S5R2-or-later based ones) should have
LINES and COLUMNS; with any luck, future S5-flavored systems such as
S5R4, and possibly even some present S5-flavored systems, support or
will support the "ioctl"s mentioned above, as well as "stty rows
<# rows> cols <# columns>". 

In any case, rewhacking the TERMCAP environment variable, as I think
"resize" does, is basically a kludge to get around the lack of the
aforementioned "ioctl"s and/or LINES/COLUMNS environment variables.



More information about the Comp.unix.questions mailing list