X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhbuildsbr.c;h=fb2d451b2135b77975bc5b4415cc1e32d7496655;hp=08975511451bde866e7956e526157afb419bd60d;hb=4885712264980e6cbc2039f9158027bee9213475;hpb=d057cb7218d8e5a6b30f38a863b73b7d562bf9d0 diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 0897551..fb2d451 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -3,6 +3,10 @@ * mhbuildsbr.c -- routines to expand/translate MIME composition files * * $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. */ /* @@ -19,18 +23,27 @@ #include #include #include -#include -#include +#include +#include #include #include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef TM_IN_SYS_TIME +# include +# else +# include +# endif +#endif + #ifdef HAVE_SYS_WAIT_H # include #endif -extern int errno; - extern int debugsw; extern int verbosw; @@ -227,8 +240,7 @@ pidcheck (int status) fflush (stdout); fflush (stderr); - done (1); - /* NOTREACHED */ + return done (1); } @@ -2662,7 +2674,7 @@ losing_ftp: goto losing_ftp; #endif - if (cachefile[0]) + if (cachefile[0]) { if (caching) chmod (cachefile, cachetype ? m_gmprot () : 0444); else { @@ -2676,7 +2688,7 @@ losing_ftp: fseek (gp, 0L, SEEK_SET); - while ((cc = fread (buffer, sizeof(*buffer), sizeof(buffer), gp)) + while ((cc= fread (buffer, sizeof(*buffer), sizeof(buffer), gp)) > 0) fwrite (buffer, sizeof(*buffer), cc, fp); fflush (fp); @@ -2694,6 +2706,7 @@ losing_ftp: } umask (mask); } + } fseek (ce->ce_fp, 0L, SEEK_SET); *file = ce->ce_file; @@ -3159,11 +3172,12 @@ use_forw: /* search the arguments for a folder name */ for (ap = arguments; *ap; ap++) { cp = *ap; - if (*cp == '+' || *cp == '@') + if (*cp == '+' || *cp == '@') { if (folder) adios (NULL, "only one folder per #forw directive"); else folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF); + } } /* else, use the current folder */