X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3b6170b27ba8fedbb4d67d2842bfaa38d4417962..ab2c72d2f25e801aebf4cae0e0b8128b288ac5c5:/uip/mhn.c diff --git a/uip/mhn.c b/uip/mhn.c index 811a4ac9..a5b4a274 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -15,6 +15,7 @@ #include #include #include +#include "h/done.h" #include #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; @@ -246,8 +247,8 @@ do_cache: case FORMSW: if (!(cp = *argp++) || *cp == '-') adios (NULL, "missing argument to %s", argp[-2]); - mh_xfree(formsw); - formsw = getcpy (etcpath (cp)); + free(formsw); + 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)