X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fap.c;h=a74eb961c9240b9e0c1b670b4f4f0bfdd1c19692;hb=d254c5e2ad008f26d5fda43c3f24f0a711c7e851;hp=9f8e6f0ff67dd7f078e9e2b552f3a2ebebb820b0;hpb=5f2b39344cca1086c975d47b730929d8f1904214;p=mmh diff --git a/uip/ap.c b/uip/ap.c index 9f8e6f0..a74eb96 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -9,6 +9,7 @@ #include #include #include +#include #define NADDRS 100 @@ -47,9 +48,7 @@ main(int argc, char **argv) char buf[BUFSIZ], **argp; char **arguments, *addrs[NADDRS]; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -63,7 +62,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); @@ -71,10 +71,10 @@ main(int argc, char **argv) case HELPSW: snprintf(buf, sizeof(buf), "%s [switches] addrs ...", invo_name); print_help(buf, switches, 1); - done(1); + exit(0); case VERSIONSW: print_version(invo_name); - done(1); + exit(0); case FORMSW: if (!(form = *argp++) || *form == '-') @@ -114,7 +114,7 @@ main(int argc, char **argv) for (addrp = 0; addrs[addrp]; addrp++) status += process(addrs[addrp], normalize); - done(status); + exit(status); return 1; }