X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fflist.c;h=31d01c1ac2dbb8f20487790a3f5172a426156d10;hb=a7771fd2e83d64228fb675749fc936151249dbd3;hp=d2a0490338c4edb55d5ad2094572c336a60da2be;hpb=682962d94b21e120c78a52a8bdcb6aa994330a14;p=mmh diff --git a/uip/flist.c b/uip/flist.c index d2a0490..31d01c1 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -242,26 +242,28 @@ main(int argc, char **argv) nmhdir = toabsdir("+"); /* - ** If we didn't specify any sequences, we search - ** for the "Unseen-Sequence" profile entry and use - ** all the sequences defined there. We check to - ** make sure that the Unseen-Sequence entry doesn't - ** contain more than NUMATTRS sequences. + ** If no sequences specified, we use the `unseen' sequence(s) + ** We check to make sure that the Unseen-Sequence entry doesn't + ** contain too many sequences. */ if (numsequences == 0) { - if ((cp = context_find(usequence)) && *cp) { - char **ap, *dp; + char **ap, *dp; - dp = getcpy(cp); - ap = brkstring(dp, " ", "\n"); - for (; ap && *ap; ap++) { - if (numsequences >= NUMATTRS) - adios(NULL, "too many sequences (more than %d) in %s profile entry", NUMATTRS, usequence); - else - sequencesToDo[numsequences++] = *ap; + if ((cp = context_find(usequence))) { + if (!*cp) { + adios(NULL, "profile entry %s set, but empty, and no sequence given", usequence); } } else { - adios(NULL, "no sequence specified or %s profile entry found", usequence); + cp = seq_unseen; /* use default */ + } + dp = getcpy(cp); + ap = brkstring(dp, " ", "\n"); + for (; ap && *ap; ap++) { + if (numsequences >= NUMATTRS) { + adios(NULL, "too many sequences (more than %d) in %s profile entry", NUMATTRS, usequence); + } else { + sequencesToDo[numsequences++] = *ap; + } } }