X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/bfad64befb4d6696fdfb63b119666eec4bac6fb3..8664e81329d0811d0b0f35521a850b74ac276da3:/uip/scan.c diff --git a/uip/scan.c b/uip/scan.c index b22297f8..06b12c62 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -51,6 +51,8 @@ static struct swit switches[] = { extern struct msgs *fmt_current_folder; #endif +extern m_getfld_state_t gstate; + /* * prototypes */ @@ -184,19 +186,19 @@ main (int argc, char **argv) adios (file, "unable to open"); } -#ifndef JLR if (hdrflag) { printf ("FOLDER %s\t%s\n", file, dtimenow (1)); } -#endif /* JLR */ - m_unknown (in); + m_getfld_state_init (&gstate); + m_unknown (gstate, 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; } + m_getfld_state_destroy (&gstate); fclose (in); done (0); } @@ -265,11 +267,9 @@ main (int argc, char **argv) continue; } -#ifndef JLR if (hdrflag) { printf ("FOLDER %s\t%s\n", folder, dtimenow(1)); } -#endif /* JLR */ /* * Check if message is in any sequence given @@ -283,6 +283,7 @@ main (int argc, char **argv) } } + m_getfld_state_init (&gstate); switch (state = scan (in, msgnum, 0, nfs, width, msgnum == mp->curmsg, unseen, folder, 0L, 1)) { @@ -298,12 +299,14 @@ main (int argc, char **argv) advise (NULL, "message %d: empty", msgnum); break; } + m_getfld_state_destroy (&gstate); hdrflag = 0; fclose (in); if (ontty) fflush (stdout); } } + m_getfld_state_destroy (&gstate); #ifdef LBL seq_save (mp); /* because formatsbr might have made changes */