X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fburst.c;h=21b218ba72e2a151211312227df9fac34d9704b7;hb=d254c5e2ad008f26d5fda43c3f24f0a711c7e851;hp=8d6e69b454363112c6802fb3e33f4b46148c54b1;hpb=32b2354dbaf4bf934936eb5b102a4a3d2fdd209a;p=mmh diff --git a/uip/burst.c b/uip/burst.c index 8d6e69b..21b218b 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -7,12 +7,15 @@ */ #include +#include +#include +#include static struct swit switches[] = { #define VERBSW 0 { "verbose", 0 }, #define NVERBSW 1 - { "noverbose", 0 }, + { "noverbose", 2 }, #define VERSIONSW 2 { "Version", 0 }, #define HELPSW 3 @@ -45,9 +48,7 @@ main(int argc, char **argv) struct smsg *smsgs; struct msgs *mp; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -61,17 +62,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\n", 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); case VERBSW: verbosw++; @@ -111,7 +113,8 @@ main(int argc, char **argv) /* parse all the message ranges/sequences and set SELECTED */ for (msgnum = 0; msgnum < msgp; msgnum++) if (!m_convert(mp, msgs[msgnum])) - done(1); + /* sysexits.h EX_USAGE */ + exit(1); seq_setprev(mp); /* set the previous-sequence */ smsgs = (struct smsg *) @@ -150,8 +153,7 @@ main(int argc, char **argv) seq_save(mp); context_save(); folder_free(mp); - done(0); - return 1; + return 0; }