mhshow: Add header and separation when displaying multiple messages.
[mmh] / uip / mhshowsbr.c
index 4f67d32..13a65e4 100644 (file)
@@ -85,9 +85,16 @@ show_all_messages(CT *cts)
        for (ctp = cts; *ctp; ctp++) {
                ct = *ctp;
 
-               /* if top-level type is ok, then display message */
-               if (type_ok(ct, 1))
-                       show_single_message(ct, formsw);
+               if (!type_ok(ct, 1)) {  /* top-level type */
+                       continue;
+               }
+               if (cts[1]) {
+                       if (ctp != cts) {
+                               printf("\n\n");
+                       }
+                       printf(">>> Message %s\n\n", ct->c_file);
+               }
+               show_single_message(ct, formsw);
        }
 }