]> diplodocus.org Git - nmh/blobdiff - uip/scan.c
Support for sequence file locking in inc(1).
[nmh] / uip / scan.c
index e1b9a16576f32d64bea5b4a2b7ac7ffcb699031a..2996a2b5fc7bb2c86cdcc8ec41b042dd41b506c9 100644 (file)
@@ -175,13 +175,14 @@ main (int argc, char **argv)
            printf ("FOLDER %s\t%s\n", file, dtimenow (1));
        }
 
            printf ("FOLDER %s\t%s\n", file, dtimenow (1));
        }
 
-       m_unknown (in);
+       scan_detect_mbox_style (in);
        for (msgnum = 1; ; ++msgnum) {
            state = scan (in, msgnum, -1, nfs, width, 0, 0,
                    hdrflag ? file : NULL, 0L, 1);
            if (state != SCNMSG && state != SCNENC)
                break;
        }
        for (msgnum = 1; ; ++msgnum) {
            state = scan (in, msgnum, -1, nfs, width, 0, 0,
                    hdrflag ? file : NULL, 0L, 1);
            if (state != SCNMSG && state != SCNENC)
                break;
        }
+       scan_finished ();
        fclose (in);
        done (0);
     }
        fclose (in);
        done (0);
     }
@@ -200,7 +201,7 @@ main (int argc, char **argv)
        adios (maildir, "unable to change directory to");
 
     /* read folder and create message structure */
        adios (maildir, "unable to change directory to");
 
     /* read folder and create message structure */
-    if (!(mp = folder_read (folder)))
+    if (!(mp = folder_read (folder, 1)))
        adios (NULL, "unable to read folder %s", folder);
 
     /* check for empty folder */
        adios (NULL, "unable to read folder %s", folder);
 
     /* check for empty folder */
@@ -276,6 +277,7 @@ main (int argc, char **argv)
                    advise (NULL, "message %d: empty", msgnum);
                    break;
            }
                    advise (NULL, "message %d: empty", msgnum);
                    break;
            }
+           scan_finished ();
            hdrflag = 0;
            fclose (in);
            if (ontty)
            hdrflag = 0;
            fclose (in);
            if (ontty)