X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpackf.c;h=f9d02e8f5da56de4520a2aaf2c86eb23281bcc30;hb=2823e13f67239db7deb7274f3a47bfbff56c7c64;hp=23ee33543ad7b860b223392343590aa7d1fdbfec;hpb=39d862d5f0ba0258707ef5a74cff63243f58e425;p=mmh diff --git a/uip/packf.c b/uip/packf.c index 23ee335..f9d02e8 100644 --- a/uip/packf.c +++ b/uip/packf.c @@ -14,7 +14,7 @@ static struct swit switches[] = { #define VERSIONSW 0 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 1 { "help", 0 }, { NULL, 0 } @@ -30,9 +30,7 @@ main(int argc, char **argv) struct msgs_array msgs = { 0, 0, NULL }; struct msgs *mp; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -49,17 +47,17 @@ main(int argc, char **argv) switch (smatch(++cp, switches)) { case AMBIGSW: ambigsw(cp, switches); - done(1); + exit(1); case UNKWNSW: adios(NULL, "-%s unknown", cp); case HELPSW: snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name); print_help(buf, switches, 1); - done(1); + exit(0); case VERSIONSW: print_version(invo_name); - done(1); + exit(0); } } if (*cp == '+' || *cp == '@') { @@ -92,7 +90,7 @@ main(int argc, char **argv) /* parse all the message ranges/sequences and set SELECTED */ for (msgnum = 0; msgnum < msgs.size; msgnum++) if (!m_convert(mp, msgs.msgs[msgnum])) - done(1); + exit(1); seq_setprev(mp); /* set the previous-sequence */ /* copy all the SELECTED messages to stdout */ @@ -115,6 +113,5 @@ main(int argc, char **argv) seq_save(mp); context_save(); folder_free(mp); - done(0); - return 1; + return 0; }