X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhshowsbr.c;h=13a65e40cdc222934fe963d669a7a46f511c49ec;hp=3bcf84f937417c80fa20571eaec1d0b68f9df281;hb=0da86af19c369b20713d0cedf7b0b3319560f69e;hpb=7ca05c3df912f540c1f25b3be4d1733f5a3ad1b4 diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 3bcf84f..13a65e4 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); } } @@ -312,9 +319,8 @@ show_content_aux(CT ct, int alternate, char *cp, char *cracked) case 'c': /* insert charset */ - if (ct->c_charset) { - strncpy(bp, ct->c_charset, buflen); - } + strncpy(bp, ct->c_charset ? ct->c_charset : + "US-ASCII", buflen); break; case 'd': @@ -513,7 +519,8 @@ 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 (!check_charset(ct->c_charset, strlen(ct->c_charset))) { + if (ct->c_charset && !check_charset(ct->c_charset, + strlen(ct->c_charset))) { snprintf(buffer, sizeof(buffer), "%%liconv -f '%s'", ct->c_charset); } else { @@ -714,9 +721,8 @@ show_multi_aux(CT ct, int alternate, char *cp) case 'c': /* insert charset */ - if (ct->c_charset) { - strncpy(bp, ct->c_charset, buflen); - } + strncpy(bp, ct->c_charset ? ct->c_charset : + "US-ASCII", buflen); break; case 'd':