X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpick.c;h=fb631112f09b2f645055b1e8e6c2767ef113fca4;hb=a6f717992d5588898c37711aa1895dbb11016e1c;hp=7aa4870010d7eb01ba19cb544caf443a8407dc30;hpb=1ae9fa8a84998e44e0234543162e257815d7e972;p=mmh diff --git a/uip/pick.c b/uip/pick.c index 7aa4870..fb63111 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -2,8 +2,6 @@ /* * pick.c -- search for messages by content * - * $Id$ - * * This code is Copyright (c) 2002, 2008, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -73,7 +71,8 @@ static void putzero_done (int) NORETURN; int main (int argc, char **argv) { - int publicsw = -1, zerosw = 1, seqp = 0, vecp = 0; + int publicsw = -1, zerosw = 1, vecp = 0; + size_t seqp = 0; int lo, hi, msgnum; char *maildir, *folder = NULL, buf[100]; char *cp, **argp, **arguments; @@ -114,11 +113,11 @@ main (int argc, char **argv) invo_name); print_help (buf, switches, 1); listsw = 0; /* HACK */ - done (1); + done (0); case VERSIONSW: print_version(invo_name); listsw = 0; /* HACK */ - done (1); + done (0); case CCSW: case DATESW: @@ -153,6 +152,10 @@ main (int argc, char **argv) /* check if too many sequences specified */ if (seqp >= NUMATTRS) adios (NULL, "too many sequences (more than %d) specified", NUMATTRS); + + if (!seq_nameok (cp)) + done (1); + seqs[seqp++] = cp; continue; case PUBLSW: