X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fdist.c;h=9ecfea17e0e5246c1a8658e7330204babae086ef;hp=27be4a54731131e2ee663a5b6ef735675d4dd1fd;hb=5b792c4424571f05bc2008e3109797d18d7d00d1;hpb=8e5be81f784682822f5e868c1bf3c8624682bd23 diff --git a/uip/dist.c b/uip/dist.c index 27be4a5..9ecfea1 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -64,63 +64,67 @@ main(int argc, char **argv) while ((cp = *argp++)) { if (*cp == '-') { switch (smatch(++cp, switches)) { - case AMBIGSW: - ambigsw(cp, switches); - done(1); - case UNKWNSW: - adios(NULL, "-%s unknown", cp); - - case HELPSW: - snprintf(buf, sizeof(buf), "%s [+folder] [msg] [switches]", invo_name); - print_help(buf, switches, 1); - done(1); - case VERSIONSW: - print_version(invo_name); - done(1); - - case ANNOSW: - anot++; - continue; - case NANNOSW: - anot = 0; - continue; - - case EDITRSW: - if (!(ed = *argp++) || *ed == '-') - adios(NULL, "missing argument to %s", argp[-2]); - nedit = 0; - continue; - case NEDITSW: - nedit++; - continue; - - case WHATSW: - if (!(whatnowproc = *argp++) || *whatnowproc == '-') - adios(NULL, "missing argument to %s", argp[-2]); - nwhat = 0; - continue; - case NWHATSW: - nwhat++; - continue; - - case FILESW: - if (file) - adios(NULL, "only one file at a time!"); - if (!(cp = *argp++) || *cp == '-') - adios(NULL, "missing argument to %s", argp[-2]); - file = getcpy(expanddir(cp)); - continue; - case FORMSW: - if (!(form = *argp++) || *form == '-') - adios(NULL, "missing argument to %s", argp[-2]); - continue; - - case INPLSW: - inplace++; - continue; - case NINPLSW: - inplace = 0; - continue; + case AMBIGSW: + ambigsw(cp, switches); + done(1); + case UNKWNSW: + adios(NULL, "-%s unknown", cp); + + case HELPSW: + snprintf(buf, sizeof(buf), "%s [+folder] [msg] [switches]", invo_name); + print_help(buf, switches, 1); + done(1); + case VERSIONSW: + print_version(invo_name); + done(1); + + case ANNOSW: + anot++; + continue; + case NANNOSW: + anot = 0; + continue; + + case EDITRSW: + if (!(ed = *argp++) || *ed == '-') + adios(NULL, "missing argument to %s", + argp[-2]); + nedit = 0; + continue; + case NEDITSW: + nedit++; + continue; + + case WHATSW: + if (!(whatnowproc = *argp++) || *whatnowproc == '-') + adios(NULL, "missing argument to %s", + argp[-2]); + nwhat = 0; + continue; + case NWHATSW: + nwhat++; + continue; + + case FILESW: + if (file) + adios(NULL, "only one file at a time!"); + if (!(cp = *argp++) || *cp == '-') + adios(NULL, "missing argument to %s", + argp[-2]); + file = getcpy(expanddir(cp)); + continue; + case FORMSW: + if (!(form = *argp++) || *form == '-') + adios(NULL, "missing argument to %s", + argp[-2]); + continue; + + case INPLSW: + inplace++; + continue; + case NINPLSW: + inplace = 0; + continue; } } if (*cp == '+' || *cp == '@') {