X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fscan.c;h=29aea6560c786761cae1b561f289a7ca03cda223;hb=2823e13f67239db7deb7274f3a47bfbff56c7c64;hp=5cdd5b9665e1990a2189f9b133bb2ecbeef0800c;hpb=611d68d19204d7cbf5bd585391249cb5bafca846;p=mmh diff --git a/uip/scan.c b/uip/scan.c index 5cdd5b9..29aea65 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -19,9 +19,9 @@ static struct swit switches[] = { #define WIDTHSW 1 { "width columns", 0 }, #define FILESW 2 - { "file file", 4 }, + { "file file", 0 }, #define VERSIONSW 3 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 4 { "help", 0 }, { NULL, 0 } @@ -41,9 +41,7 @@ main(int argc, char **argv) struct msgs *mp; FILE *in; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -60,17 +58,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 FORMSW: if (!(form = *argp++) || *form == '-') @@ -132,7 +130,7 @@ main(int argc, char **argv) break; } fclose(in); - done(0); + exit(0); } /* @@ -159,7 +157,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 */ context_replace(curfolder, folder); /* update current folder */ @@ -224,6 +222,5 @@ main(int argc, char **argv) folder_free(mp); /* free folder/message structure */ - done(0); - return 1; + return 0; }