1 /* discard.c - discard output on a file pointer */
3 static char ident[] = "@(#)$Id: discard.c,v 1.7 1993/02/26 21:56:04 jromine Exp $";
14 #include <sys/types.h>
17 #include <sys/ioctl.h>
38 tcflush (fileno (io), TCOFLUSH);
41 if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK)
42 (void) ioctl (fileno (io), TIOCSETP, (char *) &sg);
44 if (ioctl (fileno (io), TCGETA, &sg) != NOTOK)
45 (void) ioctl (fileno (io), TCSETA, &sg);
52 if (io -> _ptr = io -> _base)