last rewrite in rfc822parse.c
[apps/madmutt.git] / lib-mime / rfc822parse.c
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;
 }