]> diplodocus.org Git - nmh/blobdiff - sbr/discard.c
sbr/mts.c: Make MMDF's delimeters fixed at compile time.
[nmh] / sbr / discard.c
index dbe309d770599efe95db1a349e909d3250de67ba..a77240b71b17ac5538e4dafa0b41a85296071860 100644 (file)
@@ -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,31 +9,9 @@
 
 #include <termios.h>
 
-#ifdef SCO_5_STDIO
-# define _ptr  __ptr
-# define _cnt  __cnt
-# define _base __base
-# define _filbuf(fp)  ((fp)->__cnt = 0, __filbuf(fp))
-#endif
-
-
 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);
 }
-