X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fburst.c;h=d0d06b6db0216a15e6e571f57d3990348f0680fb;hp=66831c1b6ae0b758584cc0b0f9d929db31fa51b3;hb=d5b5e6e4813b7fd77dc1664df4304537f3002cf3;hpb=5b792c4424571f05bc2008e3109797d18d7d00d1 diff --git a/uip/burst.c b/uip/burst.c index 66831c1..d0d06b6 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -114,7 +114,7 @@ main(int argc, char **argv) } if (!msgp) - msgs[msgp++] = "cur"; + msgs[msgp++] = seq_cur; if (!folder) folder = getcurfol(); maildir = toabsdir(folder); @@ -216,11 +216,13 @@ find_delim(int msgnum, struct smsg *smsgs) for (c = 0; fgets(buffer, sizeof(buffer), in); c = buffer[0]) { if (strncmp(buffer, delim3, ld3) == 0 - && (msgp == 1 || c == '\n') - && ((cc = peekc(in)) == '\n' || - cc == EOF)) - break; - else + && (msgp == 1 || c == '\n')) { + cc = getc(in); + ungetc(cc, in); + if (cc == '\n' || cc == EOF) { + break; + } + } else pos += (long) strlen(buffer); } @@ -229,13 +231,6 @@ find_delim(int msgnum, struct smsg *smsgs) smsgs[msgp++].s_stop = (c == '\n' && wasdlm) ? pos - 1 : pos; if (feof(in)) { -#if 0 - if (wasdlm) { - smsgs[msgp - 1].s_stop -= - ((long) strlen(buffer) + 1); - msgp++; /* fake "End of XXX Digest" */ - } -#endif break; } pos += (long) strlen(buffer); @@ -265,7 +260,7 @@ burst(struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst, adios(msgnam, "unable to read message"); mode = fstat(fileno(in), &st) != NOTOK ? - (st.st_mode & 0777) : m_gmprot(); + (int)(st.st_mode & 0777) : m_gmprot(); mp = *mpp; /*