]> diplodocus.org Git - nmh/blobdiff - sbr/discard.c
docs/FAQ: Replace suggestion of NOMHNPROC with -nocheckmime.
[nmh] / sbr / discard.c
index a1efa4882aadc9e70297dc167a904c6f898a2f68..7f65affc9fe619fa50f93e678740dbe519259dbb 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * discard.c -- discard output on a file pointer
  *
 
 #include <termios.h>
 
-
 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);
 }
-