X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/efa36b8cb2aae4cf57dde5118888ae2d4f78e2cd..5ed8cd671b27e1388c0c7e881805775a8e5b353a:/uip/whom.c diff --git a/uip/whom.c b/uip/whom.c index b1e8b1ed..efa74c63 100644 --- a/uip/whom.c +++ b/uip/whom.c @@ -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 +#include #include +#include "../sbr/m_maildir.h" +#include "../sbr/m_mktemp.h" #ifndef CYRUS_SASL # define SASLminc(a) (a) @@ -63,7 +64,7 @@ main (int argc, char **argv) char *msg = NULL, **ap, **argp, backup[BUFSIZ]; char buf[BUFSIZ], **arguments, *vec[MAXARGS]; - if (nmh_init(argv[0], 1)) { return 1; } + if (nmh_init(argv[0], 2)) { return 1; } arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -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 ");