X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Ffmtdump.c;h=dd5dbcb1e38a219f650e2a5412796544505ead1a;hp=b59cf5c79645b7b4de8b3ee64b46dcb09217b9f3;hb=fede6e42d81ce34fd5c1bbe7fb2757b281c2573a;hpb=002555d3d68d553044facbe4fad7bd008a42ac5e diff --git a/uip/fmtdump.c b/uip/fmtdump.c index b59cf5c..dd5dbcb 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -15,7 +15,7 @@ static struct swit switches[] = { #define FORMSW 0 { "form formatfile", 0 }, #define VERSIONSW 1 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 2 { "help", 0 }, { NULL, 0 } @@ -46,9 +46,7 @@ main(int argc, char **argv) char buf[BUFSIZ], *fmtstr, **argp, **arguments; struct format *fmt; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -62,7 +60,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); @@ -70,10 +69,10 @@ main(int argc, char **argv) snprintf(buf, sizeof(buf), "%s [switches]", 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 == '-') @@ -96,8 +95,7 @@ main(int argc, char **argv) fmt_compile(fmtstr, &fmt); fmt_dump(fmt); - done(0); - return 1; + return 0; } static void