X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c2191f6961409263271aaeb0f9685e10492389a8..ec18722d02bd307bd09f30715dc8ba4e1b8a6716:/sbr/discard.c diff --git a/sbr/discard.c b/sbr/discard.c index a1efa488..a77240b7 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -1,6 +1,4 @@ - -/* - * discard.c -- discard output on a file pointer +/* discard.c -- discard output on a file pointer * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -11,24 +9,9 @@ #include - void discard (FILE *io) { - if (io == NULL) - return; - - tcflush (fileno(io), TCOFLUSH); - -#if defined(_FSTDIO) || defined(__DragonFly__) - fpurge (io); -#else -# ifdef LINUX_STDIO - io->_IO_write_ptr = io->_IO_write_base; -# else - if ((io->_ptr = io->_base)) - io->_cnt = 0; -# endif -#endif + if (io) + tcflush (fileno(io), TCOFLUSH); } -