X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fscan.c;h=0c172685860b59a074bdea2faa3788165da7bcd2;hb=5b92ee6942b9b466914f5faa5fa4c00a2ebc6d35;hp=1b58eb5b563c692c020e6c1df50a7b2491970637;hpb=e57b17343dcb3ff373ef4dd089fbe778f0c7c270;p=mmh diff --git a/uip/scan.c b/uip/scan.c index 1b58eb5..0c17268 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -31,13 +31,12 @@ static struct swit switches[] = { int main(int argc, char **argv) { - int ontty; int width = 0; int i, state, msgnum; 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; @@ -107,7 +106,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 @@ -128,9 +127,8 @@ main(int argc, char **argv) m_unknown(in); for (msgnum = 1; ; ++msgnum) { - state = scan(in, msgnum, -1, nfs, width, 0, 0, - NULL, 0L, 1); - if (state != SCNMSG && state != SCNENC) + state = scan(in, msgnum, -1, fmtstr, width, 0, 0); + if (state != SCNMSG) break; } fclose(in); @@ -188,8 +186,6 @@ main(int argc, char **argv) } } - ontty = isatty(fileno(stdout)); - for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) { if (is_selected(mp, msgnum)) { if ((in = fopen(cp = m_name(msgnum), "r")) == NULL) { @@ -209,11 +205,9 @@ main(int argc, char **argv) } } - switch (state = scan(in, msgnum, 0, nfs, width, - msgnum == mp->curmsg, unseen, - folder, 0L, 1)) { + switch (state = scan(in, msgnum, 0, fmtstr, width, + msgnum == mp->curmsg, unseen)) { case SCNMSG: - case SCNENC: case SCNERR: break; @@ -225,8 +219,6 @@ main(int argc, char **argv) break; } fclose(in); - if (ontty) - fflush(stdout); } }