X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsortm.c;h=734b63b9ecb9e8cacf37269aa72aba5a59d4999a;hp=4cd999d8f3d2234dba9156601752ac9f07048c21;hb=2abb9a7cfb0930e27062088734d306e7d78e4cc2;hpb=5f2b39344cca1086c975d47b730929d8f1904214 diff --git a/uip/sortm.c b/uip/sortm.c index 4cd999d..734b63b 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -9,6 +9,14 @@ #include #include #include +#include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +# include +#endif static struct swit switches[] = { #define DATESW 0 @@ -73,9 +81,7 @@ main(int argc, char **argv) struct msgs *mp; struct smsg **dlist; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -92,17 +98,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); case DATESW: if (datesw) @@ -181,7 +187,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 */ if ((nmsgs = read_hdrs(mp, datesw)) <= 0) @@ -276,8 +282,7 @@ main(int argc, char **argv) seq_save(mp); /* synchronize message sequences */ context_save(); /* save the context file */ folder_free(mp); /* free folder/message structure */ - done(0); - return 1; + return 0; } static int