Replace done with exit at uip
[mmh] / uip / mhmail.c
index 7e170a8..46b16fd 100644 (file)
@@ -66,7 +66,8 @@ main(int argc, char **argv)
                        switch (smatch(++cp, switches)) {
                        case AMBIGSW:
                                ambigsw(cp, switches);
-                               done(1);
+                               /* sysexits.h EX_USAGE */
+                               exit(1);
                        case UNKWNSW:
                                adios(NULL, "-%s unknown", cp);
 
@@ -75,10 +76,10 @@ main(int argc, char **argv)
                                                "%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 == '-')
@@ -182,7 +183,8 @@ main(int argc, char **argv)
                        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);
@@ -190,7 +192,8 @@ main(int argc, char **argv)
                        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 */
@@ -201,6 +204,6 @@ static void
 intrser(int i)
 {
        unlink(tmpfil);
-       done(i != 0 ? 1 : 0);
+       exit(i != 0 ? 1 : 0);
 }