From edc8d4615f73003ef06c644373763c345f1872c6 Mon Sep 17 00:00:00 2001 From: David Levine Date: Wed, 4 Jan 2012 21:05:45 -0600 Subject: [PATCH] Feed fileproc and mhlproc from rcvdist, send, whatnow, and whom to post. --- man/mh-profile.man | 10 +++------- uip/post.c | 16 ++++++++++++++++ uip/rcvdist.c | 4 ++++ uip/send.c | 10 ++++++++++ uip/whatnowsbr.c | 10 ++++++++++ uip/whom.c | 3 +++ 6 files changed, 46 insertions(+), 7 deletions(-) diff --git a/man/mh-profile.man b/man/mh-profile.man index cd47524..40b56c7 100644 --- a/man/mh-profile.man +++ b/man/mh-profile.man @@ -366,7 +366,7 @@ to process drafts which are MIME composition files. .RS 5 This program is used to refile or link a message to another folder. It is used by -.B post +.B send to file a copy of a message into a folder given by a \*(lqFcc:\*(rq field. It is used by the draft folder facility in .BR comp , @@ -453,14 +453,10 @@ message that you are forwarding, or to which you are replying. When the .B \-filter option is given to -.B send -or -.BR post , +.BR send , the .I mhlproc -is used by -.B post -to filter the copy of the message +is used to filter the copy of the message that is sent to \*(lqBcc:\*(rq recipients. .RE .PP diff --git a/uip/post.c b/uip/post.c index cd96ed7..419b86c 100644 --- a/uip/post.c +++ b/uip/post.c @@ -146,6 +146,10 @@ static struct swit switches[] = { { "port server port name/number", 4 }, #define TLSSW 41 { "tls", TLSminc(-3) }, +#define FILEPROCSW 42 + { "fileproc", -4 }, +#define MHLPROCSW 43 + { "mhlproc", -3 }, { NULL, 0 } }; @@ -537,6 +541,18 @@ main (int argc, char **argv) case TLSSW: tls++; continue; + + case FILEPROCSW: + if (!(cp = *argp++) || *cp == '-') + adios (NULL, "missing argument to %s", argp[-2]); + fileproc = cp; + continue; + + case MHLPROCSW: + if (!(cp = *argp++) || *cp == '-') + adios (NULL, "missing argument to %s", argp[-2]); + mhlproc = cp; + continue; } } if (msg) diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 9038d5f..edbf65f 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -114,6 +114,10 @@ main (int argc, char **argv) vec[0] = r1bindex (postproc, '/'); vec[vecp++] = "-dist"; vec[vecp++] = drft; + if ((cp = context_find ("mhlproc"))) { + vec[vecp++] = "-mhlproc"; + vec[vecp++] = cp; + } vec[vecp] = NULL; for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) diff --git a/uip/send.c b/uip/send.c index d06b6c4..9d634ed 100644 --- a/uip/send.c +++ b/uip/send.c @@ -171,6 +171,16 @@ main (int argc, char **argv) vec[vecp++] = "-library"; vec[vecp++] = getcpy (m_maildir ("")); + if ((cp = context_find ("fileproc"))) { + vec[vecp++] = "-fileproc"; + vec[vecp++] = cp; + } + + if ((cp = context_find ("mhlproc"))) { + vec[vecp++] = "-mhlproc"; + vec[vecp++] = cp; + } + while ((cp = *argp++)) { if (*cp == '-') { switch (smatch (++cp, switches)) { diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 6541b42..ad7570a 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -1157,6 +1157,16 @@ sendit (char *sp, char **arg, char *file, int pushed) vec[vecp++] = "-library"; vec[vecp++] = getcpy (m_maildir ("")); + if ((cp = context_find ("fileproc"))) { + vec[vecp++] = "-fileproc"; + vec[vecp++] = cp; + } + + if ((cp = context_find ("mhlproc"))) { + vec[vecp++] = "-mhlproc"; + vec[vecp++] = cp; + } + while ((cp = *argp++)) { if (*cp == '-') { switch (smatch (++cp, sendswitches)) { diff --git a/uip/whom.c b/uip/whom.c index ddf99ef..d6bb32a 100644 --- a/uip/whom.c +++ b/uip/whom.c @@ -88,6 +88,9 @@ main (int argc, char **argv) vec[vecp++] = "-library"; vec[vecp++] = getcpy (m_maildir ("")); + /* Don't need to feed fileproc or mhlproc to post because + it doesn't used them when used for whom. */ + while ((cp = *argp++)) { if (*cp == '-') { switch (smatch (++cp, switches)) { -- 1.7.10.4