X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fscan.c;h=ea05cd2b930f31e445994952cd19b9f799536d38;hb=c2360569e1d8d3678e294eb7c1354cb8bf7501c1;hp=69c2da97a13b4eeb9ff4176f6f34396ba4198b76;hpb=909cdf33782fb9803b8e18f7f378bfcec21e4b15;p=mmh diff --git a/uip/scan.c b/uip/scan.c index 69c2da9..ea05cd2 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -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));