]> diplodocus.org Git - nmh/blobdiff - sbr/discard.c
crawl_folders.h: Base header on implementation.
[nmh] / sbr / discard.c
index 83b0bfbc0c5ee9d420f96fbbc9b636130ed7ccfb..c030d4237a70c12fe7aebdf55c8f8a952262e7e0 100644 (file)
@@ -1,26 +1,18 @@
-
-/*
- * 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
  * complete copyright information.
  */
 
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "discard.h"
 
 #include <termios.h>
 
 
 #include <termios.h>
 
-
 void
 discard (FILE *io)
 {
 void
 discard (FILE *io)
 {
-    if (io == NULL)
-       return;
-
-    tcflush (fileno(io), TCOFLUSH);
-
-    /* There used to be an fpurge() here on some platforms, stdio
-       hackery on others.  But it didn't seem necessary. */
+    if (io)
+        tcflush (fileno(io), TCOFLUSH);
 }
 }
-