]> diplodocus.org Git - nmh/blobdiff - sbr/discard.c
h/nmh.h: Remove unused NLENGTH(dirent) macro.
[nmh] / sbr / discard.c
index a1efa48..7f65aff 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);
 }
-