TIOCGWINSZ on SCO UNIX 3.2
Steve Fullerton
scf at statware.UUCP
Thu Nov 29 06:03:23 AEST 1990
I have been trying to get the following code to work for SCO UNIX:
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/ptem.h>
main()
{
struct winsize xwin;
if (ioctl(0, TIOCGWINSZ, &xwin) == 0)
printf("Window size: %d x %d\n",xwin.ws_row,xwin.ws_col);
else
printf("errno = %d\n",errno);
}
So far all I get is an errno of 22. This code works fine on many other
systems (different include files though) such as Sun, HP, IBM RS/6000,
DG AViiON, etc. If anyone has managed to get this call to work for
SCO UNIX, I would appreciate learning how. BTW, I have SCO UNIX System V/386
3.2 Version 2.0.
--
Steve Fullerton Statware, Inc.
scf%statware.uucp at cs.orst.edu 260 SW Madison Ave, Suite 109
orstcs!statware!scf Corvallis, OR 97333
503/753-5382
More information about the Comp.unix.sysv386
mailing list