projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace done with exit at uip
[mmh]
/
uip
/
mhmail.c
diff --git
a/uip/mhmail.c
b/uip/mhmail.c
index
b3a9acb
..
46b16fd
100644
(file)
--- a/
uip/mhmail.c
+++ b/
uip/mhmail.c
@@
-51,15
+51,13
@@
main(int argc, char **argv)
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
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.");
}
/* 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;
arguments = getarguments(invo_name, argc, argv, 0);
argp = arguments;
@@
-68,7
+66,8
@@
main(int argc, char **argv)
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
- done(1);
+ /* sysexits.h EX_USAGE */
+ exit(1);
case UNKWNSW:
adios(NULL, "-%s unknown", cp);
case UNKWNSW:
adios(NULL, "-%s unknown", cp);
@@
-77,10
+76,10
@@
main(int argc, char **argv)
"%s addrs... [switches]",
invo_name);
print_help(buf, switches, 0);
"%s addrs... [switches]",
invo_name);
print_help(buf, switches, 0);
- done(1);
+ exit(0);
case VERSIONSW:
print_version(invo_name);
case VERSIONSW:
print_version(invo_name);
- done(1);
+ exit(0);
case FROMSW:
if (!(from = *argp++) || *from == '-')
case FROMSW:
if (!(from = *argp++) || *from == '-')
@@
-184,7
+183,8
@@
main(int argc, char **argv)
if (in == -1 || out == -1) {
fprintf(stderr, "Letter left at %s.\n",
tmpfil);
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);
}
cpydata(in, out, tmpfil, "dead.letter");
close(in);
@@
-192,7
+192,8
@@
main(int argc, char **argv)
fprintf(stderr, "Letter saved in dead.letter\n");
}
unlink(tmpfil);
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 */
}
return 0; /* dead code to satisfy the compiler */
@@
-203,6
+204,6
@@
static void
intrser(int i)
{
unlink(tmpfil);
intrser(int i)
{
unlink(tmpfil);
- done(i != 0 ? 1 : 0);
+ exit(i != 0 ? 1 : 0);
}
}