]> diplodocus.org Git - nmh/blobdiff - uip/rmf.c
Display the command when reporting timing.
[nmh] / uip / rmf.c
index a99b53cf5ea05ba9fb00b38403f034fa5a62737d..724bd26fcf9590c0d613a763af23a261f5faa898 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
@@ -39,7 +40,7 @@ main (int argc, char **argv)
     char buf[BUFSIZ], **argp, **arguments;
     char *fp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
@@ -51,7 +52,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
@@ -72,10 +73,10 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
-           adios (NULL, "usage: %s [+folder] [switches]", invo_name);
+           die("usage: %s [+folder] [switches]", invo_name);
        }
     }
 
@@ -87,7 +88,7 @@ main (int argc, char **argv)
     }
     fp = m_mailpath(folder);
     if (!strcmp(fp, pwd()))
-       adios (NULL, "sorry, you can't remove the current working directory");
+       die("sorry, you can't remove the current working directory");
     free(fp);
 
     if (interactive == -1)
@@ -153,7 +154,7 @@ rmf (char *folder)
     }
 
     if ((dd = opendir (".")) == NULL)
-       adios (NULL, "unable to read folder +%s", folder);
+       die("unable to read folder +%s", folder);
     others = 0;
 
     /*