summaryrefslogtreecommitdiff
path: root/contrib/sendmail/src/mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/src/mime.c')
-rw-r--r--contrib/sendmail/src/mime.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/contrib/sendmail/src/mime.c b/contrib/sendmail/src/mime.c
index a1429cb950d04..11a141e4f8a3d 100644
--- a/contrib/sendmail/src/mime.c
+++ b/contrib/sendmail/src/mime.c
@@ -14,7 +14,7 @@
# include <string.h>
#ifndef lint
-static char sccsid[] = "@(#)mime.c 8.70 (Berkeley) 11/10/1998";
+static char sccsid[] = "@(#)mime.c 8.66 (Berkeley) 5/19/98";
#endif /* not lint */
/*
@@ -225,8 +225,7 @@ mime8to7(mci, header, e, boundaries, flags)
** Do a recursive descent into the message.
*/
- if (strcasecmp(type, "multipart") == 0 &&
- (!bitset(M87F_NO8BIT, flags) || bitset(M87F_NO8TO7, flags)))
+ if (strcasecmp(type, "multipart") == 0 && !bitset(M87F_NO8BIT, flags))
{
int blen;
@@ -380,7 +379,7 @@ mime8to7(mci, header, e, boundaries, flags)
*/
sectionsize = sectionhighbits = 0;
- if (!bitset(M87F_NO8BIT|M87F_NO8TO7, flags))
+ if (!bitset(M87F_NO8BIT, flags))
{
/* remember where we were */
offset = ftell(e->e_dfp);
@@ -442,13 +441,8 @@ mime8to7(mci, header, e, boundaries, flags)
if (sectionhighbits == 0)
{
/* no encoding necessary */
- if (cte != NULL && bitset(MCIF_INMIME, mci->mci_flags))
+ if (cte != NULL)
{
- /*
- ** Skip _unless_ in MIME mode; see putheader() for the
- ** counterpart where this is skipped _if_ in MIME mode.
- */
-
snprintf(buf, sizeof buf,
"Content-Transfer-Encoding: %.200s", cte);
putline(buf, mci);
@@ -668,22 +662,15 @@ mime_getchar(fp, boundaries, btp)
static bool atbol = TRUE; /* at beginning of line */
static int bt = MBT_SYNTAX; /* boundary type of next EOF */
static u_char buf[128]; /* need not be a full line */
- int start = 0; /* indicates position of - in buffer */
- if (buflen == 1 && *bp == '\n')
- {
- /* last \n in buffer may be part of next MIME boundary */
- c = *bp;
- }
- else if (buflen > 0)
+ if (buflen > 0)
{
buflen--;
return *bp++;
}
- else
- c = getc(fp);
bp = buf;
buflen = 0;
+ c = getc(fp);
if (c == '\n')
{
/* might be part of a MIME boundary */
@@ -695,7 +682,6 @@ mime_getchar(fp, boundaries, btp)
ungetc(c, fp);
return c;
}
- start = 1;
}
if (c != EOF)
*bp++ = c;
@@ -724,7 +710,7 @@ mime_getchar(fp, boundaries, btp)
*bp++ = c;
}
*bp = '\0';
- bt = mimeboundary((char *) &buf[start], boundaries);
+ bt = mimeboundary((char *) &buf[1], boundaries);
switch (bt)
{
case MBT_FINAL: