]> diplodocus.org Git - nmh/blobdiff - sbr/discard.c
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / sbr / discard.c
index dbe309d770599efe95db1a349e909d3250de67ba..83b0bfbc0c5ee9d420f96fbbc9b636130ed7ccfb 100644 (file)
 
 #include <termios.h>
 
 
 #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)
 
 void
 discard (FILE *io)
@@ -27,15 +20,7 @@ discard (FILE *io)
 
     tcflush (fileno(io), TCOFLUSH);
 
 
     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
+    /* There used to be an fpurge() here on some platforms, stdio
+       hackery on others.  But it didn't seem necessary. */
 }
 
 }