Replace done with exit at uip
[mmh] / uip / sortm.c
index ed09181..0230495 100644 (file)
@@ -90,17 +90,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 DATESW:
                                if (datesw)
@@ -179,7 +179,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 */
 
        if ((nmsgs = read_hdrs(mp, datesw)) <= 0)
@@ -274,8 +274,7 @@ main(int argc, char **argv)
        seq_save(mp);  /* synchronize message sequences */
        context_save();  /* save the context file */
        folder_free(mp);  /* free folder/message structure */
-       done(0);
-       return 1;
+       return 0;
 }
 
 static int