FILE *in, *out;
char *tfile = NULL;
-#ifdef LOCALE
setlocale(LC_ALL, "");
-#endif
invo_name = mhbasename(argv[0]);
/* read user profile/context */
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
- done(1);
+ exit(1);
case UNKWNSW:
adios(NULL, "-%s unknown", cp);
"%s [switches] file",
invo_name);
print_help(buffer, switches, 1);
- done(1);
+ exit(0);
case VERSIONSW:
print_version(invo_name);
- done(1);
+ exit(0);
case PREPSW:
prepend++;
if (i == -1) {
abort:
unlink(tmpfil);
- done(1);
+ /* sysexits.h EX_DATAERR */
+ exit(1);
}
if (i || (field[0]!='\n' && field[0]!='\0')) {
fprintf(out, "%s:", name);
unlink(tmpfil);
context_save(); /* save the context file */
- done(0);
- return 1;
+ return 0;
}