]> diplodocus.org Git - nmh/blobdiff - uip/mhshowsbr.c
Cleaned up a bit, mostly in comments for each function.
[nmh] / uip / mhshowsbr.c
index 02b3641261f22f2244ae021b7431c259a31f9a00..f410d1a41d7916d6418653774e980f1b1fb9609d 100644 (file)
@@ -126,11 +126,12 @@ show_all_messages (CT *cts, int concatsw, int textonly, int inlineonly)
        ct = *ctp;
 
        /* if top-level type is ok, then display message */
-       if (type_ok (ct, 1))
+       if (type_ok (ct, 1)) {
            if (headersw) output_header(ct, hfmt);
 
            show_single_message (ct, formsw, concatsw, textonly, inlineonly,
                                 mfmt);
+       }
     }
 
     free_markercomps();
@@ -1152,7 +1153,9 @@ iconv_start:
                    }
                    if (errno == EINVAL) {
                        /* middle of multi-byte sequence */
-                       write (fd, dest_buffer, outbytes_before - outbytes);
+                       if (write (fd, dest_buffer, outbytes_before - outbytes) < 0) {
+                           advise (dest, "write");
+                       }
                        fseeko (*fp, -inbytes, SEEK_CUR);
                        if (end > 0) bytes_to_read += inbytes;
                        /* advise(NULL, "convert_charset: EINVAL"); */