X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpost.c;h=ffd460e497cb132f53d2286e3194d0ee170a3d82;hb=8563731b02ce9d750806f6b1769af8b399d964e8;hp=4602dc012679099f4fdde512bd792f500cb71b81;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/uip/post.c b/uip/post.c index 4602dc0..ffd460e 100644 --- a/uip/post.c +++ b/uip/post.c @@ -20,6 +20,17 @@ #include #include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef TM_IN_SYS_TIME +# include +# else +# include +# endif +#endif + #ifdef MMDFMTS # include # include @@ -632,7 +643,7 @@ main (int argc, char **argv) if (verbose) printf (partno ? "Partial Message #%s Processed\n" : "Message Processed\n", partno); - done (0); + return done (0); } @@ -690,7 +701,7 @@ putfmt (char *name, char *str, FILE *out) if ((cp = strrchr(str, '\n'))) *cp = 0; - for (cp = pp = str; cp = strchr(pp, ','); pp = cp) { + for (cp = pp = str; (cp = strchr(pp, ',')); pp = cp) { *cp++ = 0; insert_fcc (hdr, pp); } @@ -704,7 +715,7 @@ putfmt (char *name, char *str, FILE *out) } tmpaddrs.m_next = NULL; - for (count = 0; cp = getname (str); count++) + for (count = 0; (cp = getname (str)); count++) if ((mp = getm (cp, NULL, 0, AD_HOST, NULL))) { if (tmpaddrs.m_next) np->m_next = mp; @@ -916,7 +927,7 @@ putadr (char *name, char *aka, struct mailname *mp, FILE *out, unsigned int flag if (mp->m_mbox == NULL || ((flags & HTRY) && !insert (mp))) return 0; - if (!fill_in && (flags & (HBCC | HDCC)) || mp->m_ingrp) + if ((!fill_in && (flags & (HBCC | HDCC))) || mp->m_ingrp) return 1; if (!nameoutput) { @@ -938,13 +949,14 @@ putadr (char *name, char *aka, struct mailname *mp, FILE *out, unsigned int flag } len = strlen (cp); - if (linepos != nameoutput) + if (linepos != nameoutput) { if (len + linepos + 2 > outputlinelen) fprintf (out, ",\n%*s", linepos = nameoutput, ""); else { fputs (", ", out); linepos += 2; } + } fputs (cp, out); linepos += len; @@ -972,7 +984,7 @@ putgrp (char *name, char *group, FILE *out, unsigned int flags) cp = fill_in ? group : concat (group, ";", NULL); len = strlen (cp); - if (linepos > nameoutput) + if (linepos > nameoutput) { if (len + linepos + 2 > outputlinelen) { fprintf (out, ",\n%*s", nameoutput, ""); linepos = nameoutput; @@ -981,6 +993,7 @@ putgrp (char *name, char *group, FILE *out, unsigned int flags) fputs (", ", out); linepos += 2; } + } fputs (cp, out); linepos += len;