3 * discard.c -- discard output on a file pointer
7 * This code is Copyright (c) 2002, by the authors of nmh. See the
8 * COPYRIGHT file in the root directory of the nmh distribution for
9 * complete copyright information.
28 # define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp))
35 #ifndef HAVE_TERMIOS_H
47 tcflush (fileno(io), TCOFLUSH);
50 if (ioctl (fileno(io), TCGETA, &tio) != -1)
51 ioctl (fileno(io), TCSETA, &tio);
53 if (ioctl (fileno(io), TIOCGETP, (char *) &tio) != -1)
54 ioctl (fileno(io), TIOCSETP, (char *) &tio);
62 io->_IO_write_ptr = io->_IO_write_base;
64 if ((io->_ptr = io->_base))