3 * discard.c -- discard output on a file pointer
24 # define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp))
31 #ifndef HAVE_TERMIOS_H
43 tcflush (fileno(io), TCOFLUSH);
46 if (ioctl (fileno(io), TCGETA, &tio) != -1)
47 ioctl (fileno(io), TCSETA, &tio);
49 if (ioctl (fileno(io), TIOCGETP, (char *) &tio) != -1)
50 ioctl (fileno(io), TIOCSETP, (char *) &tio);
58 io->_IO_write_ptr = io->_IO_write_base;
60 if ((io->_ptr = io->_base))