mshow: render_mime: don't print any MIME structure markers with -N.

Reported by Larry Hynes.
pull/115/head
Leah Neukirchen 6 years ago
parent 32144a2eaa
commit 6c6055b78b

@ -210,6 +210,7 @@ render_mime(int depth, struct message *msg, char *body, size_t bodylen)
char *charset = 0, *cs, *cse;
if (blaze822_mime_parameter(ct, "charset", &cs, &cse)) {
charset = strndup(cs, cse-cs);
if (!Nflag)
printf(" charset=\"%s\"", charset);
setenv("PIPE_CHARSET", charset, 1);
free(charset);
@ -244,6 +245,7 @@ render_mime(int depth, struct message *msg, char *body, size_t bodylen)
} else if (e >= 65 && e <= 80) { // choose N-64th part
struct message *imsg = 0;
int n = e - 64;
if (!Nflag)
printf(" selector=\"%s\" part=%d ---\n", cmd, n);
while (blaze822_multipart(msg, &imsg)) {
if (--n == 0)
@ -251,6 +253,7 @@ render_mime(int depth, struct message *msg, char *body, size_t bodylen)
}
blaze822_free(imsg);
} else {
if (!Nflag)
printf(" filter=\"%s\" FAILED status=%d", cmd, e);
free(output);
goto nofilter;

Loading…
Cancel
Save