setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
- /* foil search of user profile/context */
- if (context_foil(NULL) == -1)
- done(1);
-
/* Without arguments, exit. */
if (argc == 1) {
adios(NULL, "no interactive mail shell. Use inc/scan/show instead.");
}
+ context_read();
+
arguments = getarguments(invo_name, argc, argv, 0);
argp = arguments;
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
- done(1);
+ /* sysexits.h EX_USAGE */
+ exit(1);
case UNKWNSW:
adios(NULL, "-%s unknown", cp);
"%s addrs... [switches]",
invo_name);
print_help(buf, switches, 0);
- done(1);
+ exit(0);
case VERSIONSW:
print_version(invo_name);
- done(1);
+ exit(0);
case FROMSW:
if (!(from = *argp++) || *from == '-')
if (in == -1 || out == -1) {
fprintf(stderr, "Letter left at %s.\n",
tmpfil);
- done(status ? 1 : 0);
+ /* sysexits.h exit-status from spost */
+ exit(status ? 1 : 0);
}
cpydata(in, out, tmpfil, "dead.letter");
close(in);
fprintf(stderr, "Letter saved in dead.letter\n");
}
unlink(tmpfil);
- done(status ? 1 : 0);
+ /* sysexits.h exit status from spost */
+ exit(status ? 1 : 0);
}
return 0; /* dead code to satisfy the compiler */
intrser(int i)
{
unlink(tmpfil);
- done(i != 0 ? 1 : 0);
+ exit(i != 0 ? 1 : 0);
}