X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpost.c;h=6429cb4a14cf87b52e582b7cba2f3f67a0cb5979;hb=a2469f5ecbca3a179251ac9b777b561bc5245d4c;hp=87e31e8f60c348cebdcb204cc87dc67f686ec1ea;hpb=da304a48a24d7cc7fafae13c994d94ad3d6483f2;p=mmh diff --git a/uip/post.c b/uip/post.c index 87e31e8..6429cb4 100644 --- a/uip/post.c +++ b/uip/post.c @@ -2,8 +2,6 @@ /* * post.c -- enter messages into the mail transport system * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -148,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 } }; @@ -539,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) @@ -1311,16 +1325,13 @@ make_bcc_file (int dashstuff) static int find_prefix (void) { - int len, result; + int result = OK; unsigned char buffer[BUFSIZ]; FILE *in; if ((in = fopen (tmpfil, "r")) == NULL) adios (tmpfil, "unable to re-open"); - len = strlen (prefix); - - result = OK; while (fgets (buffer, sizeof(buffer) - 1, in)) if (buffer[0] == '-' && buffer[1] == '-') { unsigned char *cp; @@ -1600,13 +1611,9 @@ do_text (char *file, int fd) * SIGNAL HANDLING */ -static RETSIGTYPE +static void sigser (int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL (i, SIG_IGN); -#endif - unlink (tmpfil); if (msgflags & MINV) unlink (bccfil);