]> diplodocus.org Git - nmh/blobdiff - uip/scan.c
Replace strlen("foo") with LEN("foo").
[nmh] / uip / scan.c
index c775db505597cee20eb9fd47317a8549660bcf8a..d9d8ca9d5e44c5f899b9c50aee1c1a340638d1d9 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * scan.c -- display a one-line "scan" listing of folder or messages
+/* scan.c -- display a one-line "scan" listing of folder or messages
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -13,6 +11,7 @@
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/utils.h>
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/utils.h>
+#include "../sbr/m_maildir.h"
 
 #define SCAN_SWITCHES \
     X("clear", 0, CLRSW) \
 
 #define SCAN_SWITCHES \
     X("clear", 0, CLRSW) \
@@ -127,10 +126,9 @@ main (int argc, char **argv)
        if (*cp == '+' || *cp == '@') {
            if (folder)
                adios (NULL, "only one folder at a time!");
        if (*cp == '+' || *cp == '@') {
            if (folder)
                adios (NULL, "only one folder at a time!");
-           else
-               folder = pluspath (cp);
+            folder = pluspath (cp);
        } else
        } else
-               app_msgarg(&msgs, cp);
+            app_msgarg(&msgs, cp);
     }
 
     if (!context_find ("path"))
     }
 
     if (!context_find ("path"))
@@ -222,8 +220,7 @@ main (int argc, char **argv)
            ivector_push_back (seqnum, seq_getnum (mp, *ap));
 
        num_unseen_seq = i;
            ivector_push_back (seqnum, seq_getnum (mp, *ap));
 
        num_unseen_seq = i;
-       if (dp)
-           free(dp);
+        mh_xfree(dp);
     }
 
     ontty = isatty (fileno (stdout));
     }
 
     ontty = isatty (fileno (stdout));
@@ -267,7 +264,7 @@ main (int argc, char **argv)
                    adios (NULL, "scan() botch (%d)", state);
 
                case SCNEOF: 
                    adios (NULL, "scan() botch (%d)", state);
 
                case SCNEOF: 
-                   advise (NULL, "message %d: empty", msgnum);
+                   inform("message %d: empty", msgnum);
                    break;
            }
            charstring_free (scanl);
                    break;
            }
            charstring_free (scanl);