X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frcvdist.c;h=53d74552f2068c97279fe0de07f8c6a805a2b40e;hp=89ed0299c37959254bf38b3d08486f20881ad1c8;hb=ced6090a330d3d83d0bce709f756aa3d7d65fea4;hpb=337338b404931f06f0db2119c9e145e8ca5a9860 diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 89ed029..53d7455 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -1,10 +1,10 @@ /* - * rcvdist.c -- asynchronously redistribute messages - * - * 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. - */ +** rcvdist.c -- asynchronously redistribute messages +** +** 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. +*/ #include #include @@ -28,8 +28,8 @@ static char drft[BUFSIZ] = ""; static char tmpfil[BUFSIZ] = ""; /* - * prototypes - */ +** prototypes +*/ static void rcvdistout (FILE *, char *, char *); static void unlink_done (int) NORETURN; @@ -69,9 +69,7 @@ main (int argc, char **argv) continue; case HELPSW: - snprintf (buf, sizeof(buf), - "%s [switches] [switches for postproc] address ...", - invo_name); + snprintf (buf, sizeof(buf), "%s [switches] [switches for postproc] address ...", invo_name); print_help (buf, switches, 1); done (1); case VERSIONSW: @@ -88,8 +86,7 @@ main (int argc, char **argv) } if (addrs == NULL) - adios (NULL, "usage: %s [switches] [switches for postproc] address ...", - invo_name); + adios (NULL, "usage: %s [switches] [switches for postproc] address ...", invo_name); umask (~m_gmprot ()); @@ -180,9 +177,12 @@ rcvdistout (FILE *inb, char *form, char *addrs) cp = new_fs (form ? form : rcvdistcomps, NULL, NULL); format_len = strlen (cp); ncomps = fmt_compile (cp, &fmt) + 1; - if (!(nxtbuf = compbuffers = (char **) calloc ((size_t) ncomps, sizeof(char *)))) + if (!(nxtbuf = compbuffers = + (char **) calloc ((size_t) ncomps, sizeof(char *)))) adios (NULL, "unable to allocate component buffers"); - if (!(savecomp = used_buf = (struct comp **) calloc ((size_t) (ncomps + 1), sizeof(struct comp *)))) + if (!(savecomp = used_buf = + (struct comp **) calloc ((size_t) (ncomps + 1), + sizeof(struct comp *)))) adios (NULL, "unable to allocate component buffer stack"); savecomp += ncomps + 1; *--savecomp = 0; @@ -220,8 +220,7 @@ rcvdistout (FILE *inb, char *form, char *addrs) if (cptr->c_type & CT_ADDR) { cp[i] = 0; cp = add (",\n\t", cp); - } - else + } else cp = add ("\t", cp); } cptr->c_text = add (tmpbuf, cp); @@ -264,7 +263,8 @@ finished: ; fclose (out); free (scanl); - for (nxtbuf = compbuffers, i = ncomps; (cptr = *savecomp++); nxtbuf++, i--) + for (nxtbuf = compbuffers, i = ncomps; (cptr = *savecomp++); + nxtbuf++, i--) free (cptr->c_text); while (i-- > 0) free (*nxtbuf++);