]> diplodocus.org Git - nmh/blobdiff - uip/mhbuildsbr.c
docs/FAQ: Replace suggestion of NOMHNPROC with -nocheckmime.
[nmh] / uip / mhbuildsbr.c
index 5607be1786ddf50ee5b7dfeaea0c81b659fde5ef..623f474a40a501b4a8e4f94256c5f621bd659e6c 100644 (file)
@@ -343,7 +343,7 @@ finish_field:
 
        case BODY:
            fseek (in, (long) (-strlen (buf)), SEEK_CUR);
-           /* fall through */
+           /* FALLTHRU */
        case FILEEOF:
            break;
 
@@ -405,7 +405,7 @@ finish_field:
        CT p;
 
        if (user_content (in, buf, &p, infile) == DONE) {
-           admonish (NULL, "ignoring spurious #end");
+           inform("ignoring spurious #end, continuing...");
            continue;
        }
        if (!p)
@@ -809,7 +809,7 @@ rock_and_roll:
                ct->c_encoding = CE_7BIT;
                goto call_init;
            }
-           /* else fall... */
+           /* FALLTHRU */
        case CT_MULTIPART:
            adios (NULL, "it doesn't make sense to define an in-line %s content",
                   ct->c_type == CT_MESSAGE ? "message" : "multipart");
@@ -993,7 +993,7 @@ use_forw:
 
        /* else, use the current folder */
        if (!folder)
-           folder = add (getfolder (1), NULL);
+           folder = mh_xstrdup(getfolder(1));
 
        if (!(mp = folder_read (folder, 0)))
            adios (NULL, "unable to read folder %s", folder);
@@ -1123,7 +1123,7 @@ use_forw:
            pp = &part->mp_next;
            part->mp_part = p;
        }
-       admonish (NULL, "premature end-of-file, missing #end");
+       inform("premature end-of-file, missing #end, continuing...");
        return OK;
     }
 
@@ -1288,7 +1288,7 @@ compose_content (CT ct, int verbose)
                    case 'F':
                        /* %f, and stdout is not-redirected */
                        xstdout = 1;
-                       /* and fall... */
+                       /* FALLTHRU */
 
                    case 'f':
                        /*
@@ -1725,9 +1725,11 @@ build_headers (CT ct, int header_encoding)
     add_header (ct, np, vp);
 
     /*
-     * output the Content-ID, unless disabled by -nocontentid
+     * output the Content-ID, unless disabled by -nocontentid.  Note that
+     * RFC 2045 always requires a Content-ID header for message/external-body
+     * entities.
      */
-    if (contentidsw && ct->c_id) {
+    if ((contentidsw || ct->c_ctexbody) && ct->c_id) {
        np = mh_xstrdup(ID_FIELD);
        vp = concat (" ", ct->c_id, NULL);
        add_header (ct, np, vp);
@@ -2015,7 +2017,7 @@ setup_attach_content(CT ct, char *filename)
        if (strcasecmp(ct->c_ctinfo.ci_subtype, "external-body") == 0)
            adios(NULL, "external-body messages must be specified "
                "by mhbuild directives");
-       /* Fall through */
+       /* FALLTHRU */
 
     default:
        /*
@@ -2067,13 +2069,13 @@ set_disposition (CT ct) {
 
         if (cp  &&  strcasecmp (cp, "attachment")  &&
             strcasecmp (cp, "inline")) {
-            admonish (NULL, "configuration problem: %s-disposition-%s%s%s "
-                      "specifies '%s' but only 'attachment' and 'inline' are "
-                      "allowed", invo_name,
-                      ct->c_ctinfo.ci_type,
-                      ct->c_ctinfo.ci_subtype ? "/" : "",
-                      ct->c_ctinfo.ci_subtype ? ct->c_ctinfo.ci_subtype : "",
-                      cp);
+            inform("configuration problem: %s-disposition-%s%s%s specifies "
+               "'%s' but only 'attachment' and 'inline' are allowed, "
+               "continuing...", invo_name,
+               ct->c_ctinfo.ci_type,
+               ct->c_ctinfo.ci_subtype ? "/" : "",
+               ct->c_ctinfo.ci_subtype ? ct->c_ctinfo.ci_subtype : "",
+               cp);
         }
 
         if (!cp)
@@ -2246,7 +2248,7 @@ expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m,
 
     if ((status = show_content_aux (ct, 0, convert_command, NULL, NULL)) !=
         OK) {
-        admonish (NULL, "store of %s content failed", type);
+        inform("store of %s content failed, continuing...", type);
     }
     free (convert_command);
 
@@ -2256,9 +2258,8 @@ expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m,
 
     if (extract_headers (reply_ct, reply_file, &reply_fp) == NOTOK) {
         free (reply_file);
-        admonish (NULL,
-                  "failed to extract headers from convert output in %s",
-                  reply_file);
+        inform("failed to extract headers from convert output in %s, "
+           "continuing...", reply_file);
         return;
     }
 
@@ -2269,7 +2270,7 @@ expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m,
         if ((fd = open (reply_file, O_RDONLY)) == NOTOK  ||
             scan_input (fd, &eightbit) == NOTOK) {
             free (reply_file);
-            admonish (NULL, "failed to read %s", reply_file);
+            inform("failed to read %s, continuing...", reply_file);
             return;
         } 
         (void) close (fd);
@@ -2438,7 +2439,7 @@ extract_headers (CT ct, char *reply_file, FILE **reply_fp) {
         n = strlen (buffer);
 
         if (get_ctinfo (buffer + 14, ct, 0) != OK) {
-            admonish (NULL, "unable to get content info for reply");
+            inform("unable to get content info for reply, continuing...");
             goto failed_to_extract_ct;
         }