mshow: use return value 62 for raw output of filters

E.g. for elinks -dump -dump-color-mode 3
pull/72/head
Leah Neukirchen 7 years ago
parent 6718576b9f
commit 4edca0ec3a

@ -217,11 +217,14 @@ render_mime(int depth, struct message *msg, char *body, size_t bodylen)
size_t outlen;
int e = filter(body, bodylen, cmd, &output, &outlen);
if (e == 0) { // replace output
if (e == 0 || e == 62) { // replace output (62 == raw)
if (!Nflag)
printf(" render=\"%s\" ---\n", cmd);
if (outlen) {
print_ascii(output, outlen);
if (e == 0)
print_ascii(output, outlen);
else
return fwrite(output, 1, outlen, stdout);
if (output[outlen-1] != '\n')
putchar('\n');
}

Loading…
Cancel
Save