X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhmail.c;h=eea92b72115f86d1a42172d4bc948cbc9204fa1f;hp=e79d874beb6222b209c0d707085b22b25feb1428;hb=2abb9a7cfb0930e27062088734d306e7d78e4cc2;hpb=965fe13d3f17c03059f172d4b6df0e53d0240433 diff --git a/uip/mhmail.c b/uip/mhmail.c index e79d874..eea92b7 100644 --- a/uip/mhmail.c +++ b/uip/mhmail.c @@ -11,7 +11,9 @@ #include #include #include - +#include +#include +#include static struct swit switches[] = { #define BODYSW 0 @@ -65,7 +67,8 @@ 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); @@ -74,10 +77,10 @@ main(int argc, char **argv) "%s addrs... [switches]", invo_name); print_help(buf, switches, 0); - done(1); + exit(0); case VERSIONSW: print_version(invo_name); - done(1); + exit(0); case FROMSW: if (!(from = *argp++) || *from == '-') @@ -168,7 +171,8 @@ main(int argc, char **argv) if (in == -1 || out == -1) { fprintf(stderr, "Letter left at %s.\n", tmpfil); - done(status ? 1 : 0); + /* sysexits.h exit-status from spost */ + exit(status ? 1 : 0); } cpydata(in, out, tmpfil, "dead.letter"); close(in); @@ -176,8 +180,8 @@ main(int argc, char **argv) fprintf(stderr, "Letter saved in dead.letter\n"); } unlink(tmpfil); - done(status ? 1 : 0); - return 0; /* dead code to satisfy the compiler */ + /* sysexits.h exit status from spost */ + exit(status ? 1 : 0); } @@ -185,6 +189,6 @@ static void intrser(int i) { unlink(tmpfil); - done(i != 0 ? 1 : 0); + exit(i != 0 ? 1 : 0); }