X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhshowsbr.c;h=9b7e7b0556e7bc3810ba169a9c4e8b0fc85f3f8e;hp=4f67d32586d15aa353a3a72172dc1a87b841c096;hb=8d77b48284c58c135a6b2787e721597346ab056d;hpb=2017eab468c8506da64eacc01d829c2b946e5faa diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 4f67d32..9b7e7b0 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -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); } } @@ -226,13 +233,13 @@ show_content(CT ct, int alternate) CI ci = &ct->c_ctinfo; /* Check for mhshow-show-type/subtype */ - snprintf(buffer, sizeof(buffer), "%s-show-%s/%s", - invo_name, ci->ci_type, ci->ci_subtype); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s/%s", + ci->ci_type, ci->ci_subtype); if ((cp = context_find(buffer)) && *cp != '\0') return show_content_aux(ct, alternate, cp, NULL); /* Check for mhshow-show-type */ - snprintf(buffer, sizeof(buffer), "%s-show-%s", invo_name, ci->ci_type); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s", ci->ci_type); if ((cp = context_find(buffer)) && *cp != '\0') return show_content_aux(ct, alternate, cp, NULL); @@ -497,13 +504,13 @@ show_text(CT ct, int alternate) CI ci = &ct->c_ctinfo; /* Check for mhshow-show-type/subtype */ - snprintf(buffer, sizeof(buffer), "%s-show-%s/%s", - invo_name, ci->ci_type, ci->ci_subtype); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s/%s", + ci->ci_type, ci->ci_subtype); if ((cp = context_find(buffer)) && *cp != '\0') return show_content_aux(ct, alternate, cp, NULL); /* Check for mhshow-show-type */ - snprintf(buffer, sizeof(buffer), "%s-show-%s", invo_name, ci->ci_type); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s", ci->ci_type); if ((cp = context_find(buffer)) && *cp != '\0') return show_content_aux(ct, alternate, cp, NULL); @@ -512,15 +519,14 @@ show_text(CT ct, int alternate) ** if it is not a text part of a multipart/alternative */ if (!alternate || ct->c_subtype == TEXT_PLAIN) { - if (ct->c_charset && !check_charset(ct->c_charset, - strlen(ct->c_charset))) { + if (ct->c_charset && !is_native_charset(ct->c_charset)) { snprintf(buffer, sizeof(buffer), "%%liconv -f '%s'", ct->c_charset); } else { snprintf(buffer, sizeof(buffer), "%%lcat"); } - cp = (ct->c_showproc = getcpy(buffer)); - return show_content_aux(ct, alternate, cp, NULL); + ct->c_showproc = getcpy(buffer); + return show_content_aux(ct, alternate, ct->c_showproc, NULL); } return NOTOK; @@ -538,13 +544,13 @@ show_multi(CT ct, int alternate) CI ci = &ct->c_ctinfo; /* Check for mhshow-show-type/subtype */ - snprintf(buffer, sizeof(buffer), "%s-show-%s/%s", - invo_name, ci->ci_type, ci->ci_subtype); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s/%s", + ci->ci_type, ci->ci_subtype); if ((cp = context_find(buffer)) && *cp != '\0') return show_multi_aux(ct, alternate, cp); /* Check for mhshow-show-type */ - snprintf(buffer, sizeof(buffer), "%s-show-%s", invo_name, ci->ci_type); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s", ci->ci_type); if ((cp = context_find(buffer)) && *cp != '\0') return show_multi_aux(ct, alternate, cp); @@ -843,13 +849,13 @@ show_message_rfc822(CT ct, int alternate) CI ci = &ct->c_ctinfo; /* Check for mhshow-show-type/subtype */ - snprintf(buffer, sizeof(buffer), "%s-show-%s/%s", - invo_name, ci->ci_type, ci->ci_subtype); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s/%s", + ci->ci_type, ci->ci_subtype); if ((cp = context_find(buffer)) && *cp != '\0') return show_content_aux(ct, alternate, cp, NULL); /* Check for mhshow-show-type */ - snprintf(buffer, sizeof(buffer), "%s-show-%s", invo_name, ci->ci_type); + snprintf(buffer, sizeof(buffer), "mhshow-show-%s", ci->ci_type); if ((cp = context_find(buffer)) && *cp != '\0') return show_content_aux(ct, alternate, cp, NULL);