]> diplodocus.org Git - nmh/blobdiff - uip/whom.c
test/inc/test-eom-align: Fix tests; they've never worked.
[nmh] / uip / whom.c
index 688950c9d7a5b63ac1dc2d9a0ace9e41d7aff667..efa74c63d0a1fd6555f1db3cb3499b3c6453782b 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * whom.c -- report to whom a message would be sent
+/* whom.c -- report to whom a message would be sent
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -8,7 +6,10 @@
  */
 
 #include <h/mh.h>
+#include <h/utils.h>
 #include <h/signals.h>
+#include "../sbr/m_maildir.h"
+#include "../sbr/m_mktemp.h"
 
 #ifndef CYRUS_SASL
 # define SASLminc(a) (a)
@@ -150,7 +151,7 @@ main (int argc, char **argv)
     if ((cp = context_find ("Aliasfile"))) {
        char *dp = NULL;
 
-       for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) {
+       for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) {
            vec[vecp++] = "-alias";
            vec[vecp++] = *ap;
        }
@@ -181,7 +182,8 @@ main (int argc, char **argv)
 
     switch (distsw ? child_id : OK) {
        case NOTOK:
-           advise (NULL, "unable to fork, so checking directly...");
+           inform("unable to fork, so checking directly...");
+           /* FALLTHRU */
        case OK:
            execvp (postproc, vec);
            fprintf (stderr, "unable to exec ");