]> diplodocus.org Git - nmh/blobdiff - uip/mhbuildsbr.c
inc/test-eom-align: Replace case on $MBOX_TYPE with interpolation.
[nmh] / uip / mhbuildsbr.c
index 7c0e79412f507c777a20b45616d0817c3a8407f6..ba96ac44811bc27d4cd8b5e5d0d68ad3a0b4eca5 100644 (file)
 #include <h/fmt_scan.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/fmt_scan.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "h/mhcachesbr.h"
 #include "mhmisc.h"
 #include <h/utils.h>
 #include "h/mhcachesbr.h"
 #include "mhmisc.h"
-#include "../sbr/m_mktemp.h"
-#include "../sbr/message_id.h"
-#include "../sbr/mime_type.h"
+#include "sbr/m_mktemp.h"
+#include "sbr/message_id.h"
+#include "sbr/mime_type.h"
 #include "mhfree.h"
 #include "mhshowsbr.h"
 
 #include "mhfree.h"
 #include "mhshowsbr.h"
 
@@ -445,7 +446,7 @@ finish_field:
         CT *ctp;
         convert_list *next;
 
         CT *ctp;
         convert_list *next;
 
-        done = freects_done;
+        set_done(freects_done);
 
         /* In case there are multiple calls that land here, prevent leak. */
         for (ctp = cts; ctp && *ctp; ++ctp) { free_content (*ctp); }
 
         /* In case there are multiple calls that land here, prevent leak. */
         for (ctp = cts; ctp && *ctp; ++ctp) { free_content (*ctp); }
@@ -1221,7 +1222,7 @@ compose_content (CT ct, int verbose)
     default:
        if (!ce->ce_file) {
            pid_t child_id;
     default:
        if (!ce->ce_file) {
            pid_t child_id;
-           int i, xstdout, len, buflen;
+           int xstdout, len, buflen;
            char *bp, *cp;
            char *vec[4], buffer[BUFSIZ];
            FILE *out;
            char *bp, *cp;
            char *vec[4], buffer[BUFSIZ];
            FILE *out;
@@ -1321,8 +1322,7 @@ raw:
            if ((out = fopen (ce->ce_file, "w")) == NULL)
                adios (ce->ce_file, "unable to open for writing");
 
            if ((out = fopen (ce->ce_file, "w")) == NULL)
                adios (ce->ce_file, "unable to open for writing");
 
-           for (i = 0; (child_id = fork()) == NOTOK && i > 5; i++)
-               sleep (5);
+           child_id = fork();
            switch (child_id) {
            case NOTOK:
                adios ("fork", "unable to fork");
            switch (child_id) {
            case NOTOK:
                adios ("fork", "unable to fork");
@@ -1335,7 +1335,7 @@ raw:
                execvp ("/bin/sh", vec);
                fprintf (stderr, "unable to exec ");
                perror ("/bin/sh");
                execvp ("/bin/sh", vec);
                fprintf (stderr, "unable to exec ");
                perror ("/bin/sh");
-               _exit (-1);
+               _exit(1);
                /* NOTREACHED */
 
            default:
                /* NOTREACHED */
 
            default:
@@ -1621,7 +1621,7 @@ scan_content (CT ct, size_t maxunencoded)
         }
     }
 
         }
     }
 
-    return (boundaryclash ? NOTOK : OK);
+    return boundaryclash ? NOTOK : OK;
 }
 
 
 }
 
 
@@ -1745,7 +1745,7 @@ build_headers (CT ct, int header_encoding)
        np = output_params(len, ct->c_dispo_first, NULL, 0);
        vp = add(np, vp);
        vp = add("\n", vp);
        np = output_params(len, ct->c_dispo_first, NULL, 0);
        vp = add(np, vp);
        vp = add("\n", vp);
-        mh_xfree(np);
+        free(np);
        add_header (ct, mh_xstrdup(DISPO_FIELD), vp);
     }
 
        add_header (ct, mh_xstrdup(DISPO_FIELD), vp);
     }
 
@@ -2018,7 +2018,7 @@ setup_attach_content(CT ct, char *filename)
 
     for (pm = ct->c_ctinfo.ci_first_pm; pm; pm = pm->pm_next) {
        if (strcasecmp(pm->pm_name, "name") == 0) {
 
     for (pm = ct->c_ctinfo.ci_first_pm; pm; pm = pm->pm_next) {
        if (strcasecmp(pm->pm_name, "name") == 0) {
-            mh_xfree(pm->pm_value);
+            free(pm->pm_value);
            pm->pm_value = mh_xstrdup(simplename);
            break;
        }
            pm->pm_value = mh_xstrdup(simplename);
            break;
        }