last rewrite in rfc822parse.c
authorPierre Habouzit <madcoder@debian.org>
Wed, 8 Nov 2006 01:08:00 +0000 (02:08 +0100)
committerPierre Habouzit <madcoder@debian.org>
Wed, 8 Nov 2006 01:08:00 +0000 (02:08 +0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
lib-mime/mime.h
lib-mime/rfc822parse.c
protos.h

index 8c0d3b8..30e5453 100644 (file)
@@ -68,8 +68,8 @@ BODY *mutt_parse_messageRFC822(FILE *, BODY *);
 BODY *mutt_parse_multipart(FILE *, const char *, off_t, int);
 LIST **mutt_parse_rfc822_line(ENVELOPE *, HEADER *, char *line, char *p,
                               short weed, short do_2047, LIST **);
-
 ENVELOPE *mutt_read_rfc822_header(FILE *, HEADER *, short, short);
+int mutt_count_body_parts (HEADER *hdr, int flags);
 
 /*** addresses ***/
 
index ceef3cc..ff8d822 100644 (file)
@@ -1203,8 +1203,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 +1258,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;
 }
index ee55845..8148476 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -104,7 +104,6 @@ void mutt_block_signals (void);
 void mutt_block_signals_system (void);
 int mutt_bounce_message (FILE * fp, HEADER *, address_t *);
 void mutt_canonical_charset (char *, size_t, const char *);
-int mutt_count_body_parts (HEADER *hdr, int flags);
 void mutt_check_rescore (CONTEXT *);
 void mutt_clear_error (void);
 void mutt_default_save (char *, size_t, HEADER *);