Replaced mkinstalldirs with `mkdir -p'.
[mmh] / uip / mhbuild.c
index e1ca05f..63d7be2 100644 (file)
@@ -12,7 +12,6 @@
 #include <h/md5.h>
 #include <errno.h>
 #include <signal.h>
-#include <h/mts.h>
 #include <h/tws.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
@@ -130,7 +129,7 @@ main(int argc, char **argv)
 #ifdef LOCALE
        setlocale(LC_ALL, "");
 #endif
-       invo_name = r1bindex(argv[0], '/');
+       invo_name = mhbasename(argv[0]);
 
        /* read user profile/context */
        context_read();
@@ -252,7 +251,7 @@ main(int argc, char **argv)
 
        set_endian();
 
-       if ((cp = getenv("MM_NOASK")) && !strcmp(cp, "1"))
+       if ((cp = getenv("MM_NOASK")) && strcmp(cp, "1")==0)
                listsw  = 0;
 
        /*
@@ -283,7 +282,7 @@ main(int argc, char **argv)
        /* Check for private cache location */
        if (!(cache_private = context_find(nmhprivcache)))
                cache_private = ".cache";
-       cache_private = getcpy(m_maildir(cache_private));
+       cache_private = getcpy(toabsdir(cache_private));
 
        /*
        ** Check for storage directory.  If defined, we
@@ -293,10 +292,7 @@ main(int argc, char **argv)
        if ((cp = context_find(nmhstorage)) && *cp)
                tmp = concat(cp, "/", invo_name, NULL);
        else
-               tmp = add(m_maildir(invo_name), NULL);
-
-       if (!context_find("path"))
-               free(path("./", TFOLDER));
+               tmp = getcpy(toabsdir(invo_name));
 
        /* Check if we have a file to process */
        if (!compfile)