X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/8a14191c0a0ad15bb8f35b49748c75c1e0a8c2f4..d60c3eab53ca38c4f3bd88b0cc5fda86a527514f:/uip/mhshowsbr.c diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 3db2348f..2ef4734a 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -1,6 +1,4 @@ - -/* - * mhshowsbr.c -- routines to display the contents of MIME messages +/* mhshowsbr.c -- routines to display the contents of MIME messages * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -370,7 +368,7 @@ show_content_aux (CT ct, int alternate, char *cp, char *cracked, struct format * return NOTOK; } else { char *charset = content_charset (ct); - admonish (NULL, "unable to convert character set%s%s from %s", + inform("unable to convert character set%s%s from %s, continuing...", ct->c_partno ? " of part " : "", ct->c_partno ? ct->c_partno : "", charset); @@ -385,7 +383,7 @@ show_content_aux (CT ct, int alternate, char *cp, char *cracked, struct format * if (parse_display_string (ct, cp, &xstdin, &xlist, file, buffer, sizeof(buffer) - 1, 0)) { - admonish (NULL, "Buffer overflow constructing show command!\n"); + inform("Buffer overflow constructing show command, continuing..."); return NOTOK; } @@ -720,7 +718,7 @@ show_multi_aux (CT ct, int alternate, char *cp, struct format *fmt) if (parse_display_string (ct, cp, &xstdin, &xlist, file, buffer, sizeof(buffer) - 1, 1)) { - admonish (NULL, "Buffer overflow constructing show command!\n"); + inform("Buffer overflow constructing show command, continuing..."); return NOTOK; } @@ -943,8 +941,7 @@ parse_display_string (CT ct, char *cp, int *xstdin, int *xlist, /* This will get confused if there are multiple %{}'s, but its real purpose is to avoid doing bad things above if a closing brace wasn't found. */ - admonish(NULL, - "no closing brace for display string escape %s", + inform("no closing brace for display string escape %s, continuing...", cp); } break; @@ -993,8 +990,8 @@ parse_display_string (CT ct, char *cp, int *xstdin, int *xlist, quote. */ memmove (pp, pp-1, len+1); *(pp++-1) = '\\'; - buflen -= 1; - bp += 1; + buflen--; + bp++; } } /* If pp is still set, that means we ran out of space. */ @@ -1179,11 +1176,10 @@ iconv_start: inform("convert_charset: errno = %d", errno); status = NOTOK; break; - } else { - if (write (fd, dest_buffer, outbytes_before - outbytes) - < 0) { - advise (dest, "write"); - } + } + + if (write (fd, dest_buffer, outbytes_before - outbytes) < 0) { + advise (dest, "write"); } }