]> diplodocus.org Git - nmh/blobdiff - uip/mhn.c
SPECS: Use `command-line interface' in one-line summary.
[nmh] / uip / mhn.c
index 4a3b33a769f117d2881753fcc28e04ab0c9dc307..a5b4a2746417894a551e3a1dffdc093dc8eac5e5 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -15,6 +15,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/mhcachesbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "mhmisc.h"
 #include "sbr/m_maildir.h"
@@ -118,7 +119,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 1)) { return 1; }
 
-    done=freects_done;
+    set_done(freects_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
@@ -247,7 +248,7 @@ do_cache:
                if (!(cp = *argp++) || *cp == '-')
                    adios (NULL, "missing argument to %s", argp[-2]);
                 free(formsw);
-               formsw = getcpy (etcpath (cp));
+               formsw = mh_xstrdup(etcpath(cp));
                continue;
 
            /*
@@ -333,7 +334,7 @@ do_cache:
     /* Check for private cache location */
     if (!(cache_private = context_find (nmhprivcache)))
        cache_private = ".cache";
-    cache_private = getcpy (m_maildir (cache_private));
+    cache_private = mh_xstrdup(m_maildir(cache_private));
 
     /*
      * Cache the current directory before we do any chdirs()'s.
@@ -370,7 +371,7 @@ do_cache:
 
        execvp ("mhbuild", vec);
        fprintf (stderr, "unable to exec ");
-       _exit (-1);
+       _exit(1);
     }
 
     /*
@@ -397,7 +398,7 @@ do_cache:
 
        execvp ("mhbuild", vec);
        fprintf (stderr, "unable to exec ");
-       _exit (-1);
+       _exit(1);
     }
 
     if (file && msgs.size)