remove longjmp in signalhandler of prompter
[mmh] / uip / inc.c
index 159e010..8a05c6a 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -119,7 +119,7 @@ static FILE *in;
 /*
 ** prototypes
 */
-static void inc_done();
+void inc_done();
 
 
 int
@@ -143,7 +143,9 @@ main(int argc, char **argv)
        /* copy of mail directory because the static gets overwritten */
        char *maildir_copy = NULL;
 
-       atexit(inc_done);
+       if (atexit(inc_done) != 0) {
+               adios(NULL, "atexit failed");
+       }
 
 /*
 ** absolutely the first thing we do is save our privileges,
@@ -290,7 +292,7 @@ main(int argc, char **argv)
        if ((maildir_copy = strdup(maildir)) == NULL)
                adios(maildir, "error allocating memory to copy maildir");
 
-       create_folder(maildir, noisy ? 0 : 1, done);
+       create_folder(maildir, noisy ? 0 : 1, exit);
 
        if (chdir(maildir) == NOTOK)
                adios(maildir, "unable to change directory to");
@@ -484,7 +486,7 @@ main(int argc, char **argv)
        return 0;
 }
 
-static void
+void
 inc_done()
 {
        if (locked) {