wsh window size code
Phil Ronzone
pkr at sgi.com
Fri Apr 19 05:04:45 AEST 1991
In article <1991Apr18.183945.21088 at odin.corp.sgi.com> msc at sgi.com writes:
>I will admit that the TIOCGETWINSZ ioctl is not clearly documented. However
>most of the rest of this stuff is documented in the terminfo/curses man pages.
>
>--
>From the TARDIS of Mark Callow
>msc at ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
>"Spirits of genius are always opposed by mediocre minds" - Albert Einstein
int lines;
int columns;
status = ioctl(fileno(stdin),TIOCGWINSZ,&ws);
if (status != 0)
{
rpterr(1,1,fn,"Bad return from ioctl(,TIOCGWINSZ,) of %d",status);
return(1);
}
columns = ws.ws_col;
lines = ws.ws_row;
--
Philip K. Ronzone pkr at sgi.com
Silicon Graphics, Inc. MS 9U-500 work (415) 335-1511
2011 N. Shoreline Blvd., Mountain View, CA 94039 fax (415) 969-2314
...................................."Why, you little ........", Homer Simpson
More information about the Comp.sys.sgi
mailing list