X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ae6d25b39b09560916481983b30d3b09ccf9390e..02b04f3b19b8bd69ae292eeb2c2d7eec410506f2:/sbr/discard.c diff --git a/sbr/discard.c b/sbr/discard.c index a1efa488..7f65affc 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -1,4 +1,3 @@ - /* * discard.c -- discard output on a file pointer * @@ -11,24 +10,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); } -