X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fforw.c;h=91ce04a8a29f074191885e060bfc753fea883745;hp=57e508f026096be7756354fa6b39198523107007;hb=2abb9a7cfb0930e27062088734d306e7d78e4cc2;hpb=1e42112bb983f886f389b1fa3ef4d90a4dad4f91 diff --git a/uip/forw.c b/uip/forw.c index 57e508f..91ce04a 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -11,7 +11,8 @@ #include #include #include - +#include +#include #define IFORMAT "digest-issue-%s" #define VFORMAT "digest-volume-%s" @@ -82,17 +83,18 @@ main(int argc, char **argv) switch (smatch(++cp, switches)) { case AMBIGSW: ambigsw(cp, switches); - done(1); + /* sysexits.h EX_USAGE */ + exit(1); case UNKWNSW: adios(NULL, "-%s unknown", cp); case HELPSW: snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name); print_help(buf, switches, 1); - done(1); + exit(0); case VERSIONSW: print_version(invo_name); - done(1); + exit(0); case ANNOSW: anot++; @@ -189,9 +191,12 @@ main(int argc, char **argv) adios(NULL, "no messages in %s", folder); /* parse all the message ranges/sequences and set SELECTED */ - for (msgnum = 0; msgnum < msgp; msgnum++) - if (!m_convert(mp, msgs[msgnum])) - done(1); + for (msgnum = 0; msgnum < msgp; msgnum++) { + if (!m_convert(mp, msgs[msgnum])) { + /* sysexits.h EX_USAGE */ + exit(1); + } + } seq_setprev(mp); /* set the previous sequence */ if ((out = creat(drft, m_gmprot())) == NOTOK) @@ -242,10 +247,10 @@ main(int argc, char **argv) context_save(); /* save the context file */ if (buildsw) - done(0); + exit(0); what_now(ed, NOUSE, drft, NULL, 0, mp, anot ? "Forwarded" : NULL, cwd); - done(1); + /* sysexits.h EX_SOFTWARE */ return 1; }