]> diplodocus.org Git - nmh/blobdiff - uip/mhshowsbr.c
nmh_init(): Replace integer parameter with two bools.
[nmh] / uip / mhshowsbr.c
index f0b5ef4e877d53a7762afbcc9eda570733d11390..5d664090a839edebd8f7794a380687e729f5b46f 100644 (file)
@@ -14,6 +14,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/fmt_scan.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "mhmisc.h"
 #include "mhshowsbr.h"
@@ -100,7 +101,7 @@ show_all_messages(CT *cts, int concat, int textonly, int inlineonly)
      * for showing headers of MIME messages.
      */
     if (!formsw)
-       formsw = getcpy (etcpath ("mhl.headers"));
+       formsw = mh_xstrdup(etcpath("mhl.headers"));
 
     /*
      * Compile the content marker and header format lines
@@ -431,7 +432,7 @@ show_content_aux2 (CT ct, int alternate, char *cracked, char *buffer,
        }
 
        while ((cc = read(fd, readbuf, sizeof(readbuf))) > 0) {
-           if ((ssize_t) fwrite(readbuf, sizeof(char), cc, stdout) < cc) {
+           if ((ssize_t) fwrite(readbuf, 1, cc, stdout) < cc) {
                advise ("putline", "fwrite");
            }
            lastchar = readbuf[cc - 1];
@@ -1083,7 +1084,7 @@ convert_charset (CT ct, char *dest_charset, int *message_mods) {
         }
 
         if ((tempfile = m_mktemp2 (NULL, invo_name, &fd, NULL)) == NULL) {
-            adios (NULL, "unable to create temporary file in %s",
+            die("unable to create temporary file in %s",
                    get_temp_dir());
         }
         dest = mh_xstrdup(tempfile);