| 6 |
details. |
details. |
| 7 |
|
|
| 8 |
MIME functions |
MIME functions |
| 9 |
$Id: mime.c,v 1.3 2002/08/03 17:08:02 weaselp Exp $ */ |
$Id: mime.c,v 1.4 2002/10/09 20:53:29 weaselp Exp $ */ |
| 10 |
|
|
| 11 |
|
|
| 12 |
#include "mix3.h" |
#include "mix3.h" |
| 104 |
l++; |
l++; |
| 105 |
} |
} |
| 106 |
} else { |
} else { |
| 107 |
buf_appendc(out, c); |
buf_appendc(out, c); |
| 108 |
l++; |
l++; |
| 109 |
} |
} |
| 110 |
} |
} |
| 247 |
addprintable(out, c); |
addprintable(out, c); |
| 248 |
} else if (line->data[i + 1] == '\0') { |
} else if (line->data[i + 1] == '\0') { |
| 249 |
softbreak = 1; |
softbreak = 1; |
| 250 |
break; |
break; |
| 251 |
} |
} |
| 252 |
} else |
} else |
| 253 |
addprintable(out, line->data[i]); |
addprintable(out, line->data[i]); |
| 365 |
/* copy over headers without decoding */ |
/* copy over headers without decoding */ |
| 366 |
while (buf_getheader(msg, field, content) == 0) { |
while (buf_getheader(msg, field, content) == 0) { |
| 367 |
if (bufieq(field, "content-transfer-encoding") |
if (bufieq(field, "content-transfer-encoding") |
| 368 |
&& bufieq(content, "quoted-printable")) { |
&& bufieq(content, "quoted-printable")) { |
| 369 |
continue; /* no longer quoted-printable */ |
continue; /* no longer quoted-printable */ |
| 370 |
} else { |
} else { |
| 371 |
buf_appendheader(out, field, content); |
buf_appendheader(out, field, content); |
| 421 |
if (bufieq(field, "content-type")) { |
if (bufieq(field, "content-type")) { |
| 422 |
get_type(content, type, subtype); |
get_type(content, type, subtype); |
| 423 |
if (bufieq(type, "multipart")) |
if (bufieq(type, "multipart")) |
| 424 |
get_parameter(content, "boundary", mboundary); |
get_parameter(content, "boundary", mboundary); |
| 425 |
if (bufieq(type, "multipart") && bufieq(subtype, "encrypted")) { |
if (bufieq(type, "multipart") && bufieq(subtype, "encrypted")) { |
| 426 |
get_parameter(content, "protocol", line); |
get_parameter(content, "protocol", line); |
| 427 |
if (bufieq(line, "application/pgp-encrypted")) |
if (bufieq(line, "application/pgp-encrypted")) |
| 615 |
get_type(content, type, subtype); |
get_type(content, type, subtype); |
| 616 |
if (bufieq(type, "multipart") && bufieq(subtype, "mixed")) { |
if (bufieq(type, "multipart") && bufieq(subtype, "mixed")) { |
| 617 |
multipart = 1; |
multipart = 1; |
| 618 |
get_parameter(content, "boundary", mboundary); |
get_parameter(content, "boundary", mboundary); |
| 619 |
} |
} |
| 620 |
} |
} |
| 621 |
if (bufileft(field, "content-")) |
if (bufileft(field, "content-")) |
| 717 |
if (bufieq(field, "content-type")) { |
if (bufieq(field, "content-type")) { |
| 718 |
get_type(content, line, tmp); |
get_type(content, line, tmp); |
| 719 |
if (bufieq(line, "multipart")) |
if (bufieq(line, "multipart")) |
| 720 |
get_parameter(content, "boundary", mboundary); |
get_parameter(content, "boundary", mboundary); |
| 721 |
} |
} |
| 722 |
} |
} |
| 723 |
|
|