X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fscan.c;h=ba90e4010ee23851abf6bfb1aa0730b40dd9dfe5;hb=b5e6b7321a4aa439a32ae448e43343568fa13cbe;hp=ef13e39c29fada81f4e8513f311ab6c6b1cdf212;hpb=51d0e643f8daeb2db8de0a3d31d7d7f038b48380;p=mmh diff --git a/uip/scan.c b/uip/scan.c index ef13e39..ba90e40 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -19,9 +19,9 @@ static struct swit switches[] = { #define WIDTHSW 1 { "width columns", 0 }, #define FILESW 2 - { "file file", 4 }, + { "file file", 0 }, #define VERSIONSW 3 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 4 { "help", 0 }, { NULL, 0 } @@ -36,14 +36,12 @@ main(int argc, char **argv) int seqnum[NUMATTRS], unseen, num_unseen_seq = 0; char *cp, *maildir, *file = NULL, *folder = NULL; char *form = NULL, buf[BUFSIZ]; - char **argp, *nfs, **arguments; + char **argp, *fmtstr, **arguments; struct msgs_array msgs = { 0, 0, NULL }; struct msgs *mp; FILE *in; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -106,7 +104,7 @@ main(int argc, char **argv) /* ** Get new format string. Must be before chdir(). */ - nfs = new_fs(form, FORMAT); + fmtstr = new_fs(form, FORMAT); /* ** We are scanning a maildrop file @@ -125,9 +123,9 @@ main(int argc, char **argv) adios(file, "unable to open"); } - m_unknown(in); + thisisanmbox(in); for (msgnum = 1; ; ++msgnum) { - state = scan(in, msgnum, -1, nfs, width, 0, 0, 1); + state = scan(in, msgnum, SCN_MBOX, fmtstr, width, 0, 0); if (state != SCNMSG) break; } @@ -205,9 +203,8 @@ main(int argc, char **argv) } } - switch (state = scan(in, msgnum, 0, nfs, width, - msgnum == mp->curmsg, unseen, - 1)) { + switch (state = scan(in, msgnum, SCN_FOLD, fmtstr, + width, msgnum==mp->curmsg, unseen)) { case SCNMSG: case SCNERR: break;