X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpost.c;h=20482282fa0c0e6f86074244368b0e78d8877fc3;hb=3a84d814004fd4557bf4f44952648e9e69bd22a8;hp=87e31e8f60c348cebdcb204cc87dc67f686ec1ea;hpb=da304a48a24d7cc7fafae13c994d94ad3d6483f2;p=mmh diff --git a/uip/post.c b/uip/post.c index 87e31e8..2048228 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. @@ -25,16 +23,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include #ifdef SMTPMTS # include @@ -148,6 +140,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 +535,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 +1319,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,12 +1605,10 @@ do_text (char *file, int fd) * SIGNAL HANDLING */ -static RETSIGTYPE +static void sigser (int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL (i, SIG_IGN); -#endif + NMH_UNUSED (i); unlink (tmpfil); if (msgflags & MINV)