X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fscan.c;h=478e4a6965bae6d0504ee61d4f8e2b35eab666ad;hb=dba36faad141d652c7b84d26295537c76fd2b5be;hp=69c2da97a13b4eeb9ff4176f6f34396ba4198b76;hpb=5b792c4424571f05bc2008e3109797d18d7d00d1;p=mmh diff --git a/uip/scan.c b/uip/scan.c index 69c2da9..478e4a6 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -204,7 +204,7 @@ main(int argc, char **argv) */ if (!msgs.size) - app_msgarg(&msgs, "all"); + app_msgarg(&msgs, seq_all); if (!folder) folder = getcurfol(); maildir = toabsdir(folder); @@ -231,20 +231,23 @@ main(int argc, char **argv) context_save(); /* save the context file */ /* - ** Get the sequence number for each sequence - ** specified by Unseen-Sequence + ** Get the sequence number for each `unseen' sequence */ - if ((cp = context_find(usequence)) && *cp) { + if (!(cp = context_find(usequence))) { + cp = seq_unseen; /* use default, if not set */ + } + if (*cp) { char **ap, *dp; dp = getcpy(cp); ap = brkstring(dp, " ", "\n"); - for (i = 0; ap && *ap; i++, ap++) + for (i = 0; ap && *ap; i++, ap++) { seqnum[i] = seq_getnum(mp, *ap); - + } num_unseen_seq = i; - if (dp) + if (dp) { free(dp); + } } ontty = isatty(fileno(stdout));