X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mime%2Frfc822parse.c;h=35df8d16b76140b8e872068d4c9fc06652ae5303;hp=ceef3cc66c18fc198ca9282634f82df03b2715f5;hb=b98a7ae42f4b22221cf6ba32bf6f29431a07b604;hpb=00d4a666e4714da960fd0305fb52eb58fadcb2b6 diff --git a/lib-mime/rfc822parse.c b/lib-mime/rfc822parse.c index ceef3cc..35df8d1 100644 --- a/lib-mime/rfc822parse.c +++ b/lib-mime/rfc822parse.c @@ -1062,7 +1062,6 @@ LIST **mutt_parse_rfc822_line(ENVELOPE *e, HEADER *hdr, char *line, char *p, (*user_hdrs)->data = m_strdup(line); if (do_2047) rfc2047_decode(&(*user_hdrs)->data); - (*user_hdrs)->next = mutt_new_list(); return &(*user_hdrs)->next; } @@ -1203,8 +1202,6 @@ static int count_body_parts_check(LIST **checklist, BODY *b) return 0; } -/* -------------------- XXX: MC READ MARK ------------- */ - static int count_body_parts (BODY *body, int flags) { int count = 0; @@ -1260,17 +1257,20 @@ static int count_body_parts (BODY *body, int flags) return count; } -int mutt_count_body_parts (HEADER *hdr, int flags) { - if (!option (OPTCOUNTATTACH)) - return (0); - if (hdr->attach_valid && !(flags & M_PARTS_RECOUNT)) - return hdr->attach_total; +int mutt_count_body_parts(HEADER *hdr, int flags) +{ + if (!option(OPTCOUNTATTACH)) + return 0; + + if (hdr->attach_valid && !(flags & M_PARTS_RECOUNT)) + return hdr->attach_total; - if (AttachAllow || AttachExclude || InlineAllow || InlineExclude) - hdr->attach_total = count_body_parts(hdr->content, flags | M_PARTS_TOPLEVEL); - else - hdr->attach_total = 0; + if (AttachAllow || AttachExclude || InlineAllow || InlineExclude) + hdr->attach_total = count_body_parts(hdr->content, + flags | M_PARTS_TOPLEVEL); + else + hdr->attach_total = 0; - hdr->attach_valid = 1; - return hdr->attach_total; + hdr->attach_valid = 1; + return hdr->attach_total; }