X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fcomp.c;h=f867593251fb3d2a1b5838d4f3c76a2b77c6c12b;hb=8ab7ca4f2b4caa1f1ed2859d7d911513a7b2b2a2;hp=5c088a83fc4fa32955e75b70e045ecd9263e3500;hpb=75fca31a5b9d5c1a99c74ab14c94438d8852fba9;p=mmh diff --git a/uip/comp.c b/uip/comp.c index 5c088a8..f867593 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -18,11 +18,11 @@ static struct swit switches[] = { #define USESW 2 { "use", 0 }, #define NUSESW 3 - { "nouse", 0 }, + { "nouse", 2 }, #define WHATSW 4 { "whatnowproc program", 0 }, #define VERSIONSW 5 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 6 { "help", 0 }, { NULL, 0 } @@ -41,10 +41,7 @@ main(int argc, char **argv) struct msgs *mp = NULL; char *fmtstr; - -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -58,17 +55,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] [msg] [switches]", invo_name); print_help(buf, switches, 1); - done(1); + exit(0); case VERSIONSW: print_version(invo_name); - done(1); + exit(0); case EDITRSW: if (!(ed = *argp++) || *ed == '-') @@ -135,7 +133,8 @@ main(int argc, char **argv) adios(NULL, "no messages in %s", folder); /* parse the message range/sequence/name and set SELECTED */ if (!m_convert(mp, msg)) - done(1); + /* sysexits.h EX_USAGE */ + exit(1); seq_setprev(mp); /* set the previous-sequence */ if (mp->numsel > 1) adios(NULL, "only one message at a time!"); @@ -165,6 +164,6 @@ main(int argc, char **argv) context_save(); what_now(ed, use, drft, NULL, 0, NULLMP, NULL, cwd); - done(1); + /* sysexits.h EX_SOFTWARE */ return 1; }