[bug #4302] errno is not always an extern int
[mmh] / uip / scan.c
index 1f9b8c0..02621dc 100644 (file)
@@ -3,12 +3,17 @@
  * scan.c -- display a one-line "scan" listing of folder or messages
  *
  * $Id$
+ *
+ * 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/fmt_scan.h>
 #include <h/scansbr.h>
-#include <zotnet/tws/tws.h>
+#include <h/tws.h>
+#include <h/mts.h>
 #include <errno.h>
 
 /*
@@ -42,11 +47,10 @@ static struct swit switches[] = {
 #define VERSIONSW 10
     { "version", 0 },
 #define        HELPSW  11
-    { "help", 4 },
+    { "help", 0 },
     { NULL, 0 }
 };
 
-extern int errno;
 
 /*
  * global for sbr/formatsbr.c - yech!
@@ -315,7 +319,7 @@ main (int argc, char **argv)
 
            switch (state = scan (in, msgnum, 0, nfs, width,
                        msgnum == mp->curmsg, unseen,
-                       hdrflag ? folder : NULL, 0L, 1)) {
+                       folder, 0L, 1)) {
                case SCNMSG: 
                case SCNENC: 
                case SCNERR: 
@@ -347,5 +351,5 @@ main (int argc, char **argv)
     if (clearflag)
        clear_screen ();
 
-    done (0);
+    return done (0);
 }