X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fdp.c;h=b6efbe842d9d48b2ad651bb396281791a0f0faef;hb=d254c5e2ad008f26d5fda43c3f24f0a711c7e851;hp=1a91678f402d5afc2f0ae9a173dfa0c13e757065;hpb=ccf4f175ef4c4e7522f9510a4a1149c15d810dd9;p=mmh diff --git a/uip/dp.c b/uip/dp.c index 1a91678..b6efbe8 100644 --- a/uip/dp.c +++ b/uip/dp.c @@ -9,6 +9,7 @@ #include #include #include +#include #define NDATES 100 @@ -56,17 +57,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 [switches] dates ...", 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 == '-') @@ -101,8 +103,7 @@ main(int argc, char **argv) status += process(dates[datep]); context_save(); /* save the context file */ - done(status); - return 1; + return status; }