Skip to content

Commit 10d0138

Browse files
committed
add more context to identify when we're parsing message/rfc822 attachments
1 parent 70c5a3d commit 10d0138

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/hypermail.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ struct body {
235235
char parsedheader; /* this header line has been parsed once */
236236
char attached; /* part of attachment */
237237
char attachment_links; /* part of generated links to attachments */
238+
char attachment_rfc822; /* first line of a message/rfc822 attachment */
238239
char demimed; /* if this is a header, this is set to TRUE if
239240
it has passed the decoderfc2047() function */
240241
int format_flowed; /* TRUE if this a text/plain f=f line */
@@ -334,8 +335,10 @@ struct attach {
334335
#define BODY_ATTACHED (1<<3) /* this line was attached */
335336
#define BODY_ATTACHMENT_LINKS (1<<4) /* this line is part of the generated links
336337
** to attachments */
337-
#define BODY_FORMAT_FLOWED (1<<5) /* this line is format-flowed */
338-
#define BODY_DEL_SSQ (1<<6) /* remove both space stuffing and
338+
#define BODY_ATTACHMENT_RFC822 (1<<5) /* this line is the beginning of an message/rfc822
339+
** attachment */
340+
#define BODY_FORMAT_FLOWED (1<<6) /* this line is format-flowed */
341+
#define BODY_DEL_SSQ (1<<7) /* remove both space stuffing and
339342
* quotes where applicable for f=f */
340343

341344

src/parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ int parsemail(char *mbox, /* file name */
22572257
*/
22582258
bp = addbody(bp, &lp,
22592259
"<p><strong>attached mail follows:</strong></p><hr />",
2260-
BODY_HTMLIZED | bodyflags);
2260+
BODY_ATTACHMENT_RFC822 | BODY_HTMLIZED | bodyflags);
22612261
bodyflags |= BODY_ATTACHED;
22622262
/* @@ should it be 1 or 2 ?? should we use another method? */
22632263
#if 0

0 commit comments

Comments
 (0)