X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fburst.c;h=89aeac26b55a47c8df46cd90ae9763639b49cf9d;hb=c16dc1b7987ffd6e7dde224192862691515a09ec;hp=15756d30354cb26fae511fccb4917a38570b6afe;hpb=38615191e71744b066425e0c44412b62dbe49cc2;p=mmh diff --git a/uip/burst.c b/uip/burst.c index 15756d3..89aeac2 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -2,8 +2,6 @@ /* * burst.c -- explode digests into individual messages * - * $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. @@ -269,7 +267,8 @@ burst (struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst, if ((in = fopen (msgnam = m_name (msgnum), "r")) == NULL) adios (msgnam, "unable to read message"); - mode = fstat (fileno(in), &st) != NOTOK ? (st.st_mode & 0777) : m_gmprot(); + mode = + fstat (fileno(in), &st) != NOTOK ? (int) (st.st_mode & 0777) : m_gmprot(); mp = *mpp; /* @@ -347,12 +346,11 @@ burst (struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst, i = inplace ? msgnum + numburst : mp->hghmsg; for (j = numburst; j >= (inplace ? 0 : 1); i--, j--) { strncpy (f1, m_name (i), sizeof(f1)); - strncpy (f2, m_scratch ("", invo_name), sizeof(f2)); + strncpy (f2, m_mktemp(invo_name, NULL, &out), sizeof(f2)); + if (verbosw && i != msgnum) printf ("message %d of digest %d becomes message %d\n", j, msgnum, i); - if ((out = fopen (f2, "w")) == NULL) - adios (f2, "unable to write message"); chmod (f2, mode); fseek (in, smsgs[j].s_start, SEEK_SET); cpybrst (in, out, msgnam, f2,