X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=uip%2Fmhbuildsbr.c;h=83a18b5fe621a95e6f78fff575b06069ceb89f53;hb=1bb1f6c3f38b05060bf699ea2743f7386889bf63;hp=fb2d451b2135b77975bc5b4415cc1e32d7496655;hpb=4885712264980e6cbc2039f9158027bee9213475;p=mmh diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index fb2d451..83a18b5 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef TIME_WITH_SYS_TIME # include @@ -50,6 +51,7 @@ extern int verbosw; extern int ebcdicsw; extern int listsw; extern int rfc934sw; +extern int contentidsw; extern int endian; /* mhmisc.c */ @@ -785,8 +787,7 @@ add_header (CT ct, char *name, char *value) HF hp; /* allocate header field structure */ - if (!(hp = malloc (sizeof(*hp)))) - adios (NULL, "out of memory"); + hp = mh_xmalloc (sizeof(*hp)); /* link data into header structure */ hp->name = name; @@ -1553,8 +1554,7 @@ invalid_param: goto no_body; } - if ((e->eb_body = bp = malloc ((unsigned) size)) == NULL) - adios (NULL, "out of memory"); + e->eb_body = bp = mh_xmalloc ((unsigned) size); fseek (p->c_fp, p->c_begin, SEEK_SET); while (size > 0) switch (cc = fread (bp, sizeof(*bp), size, p->c_fp)) { @@ -3933,9 +3933,9 @@ build_headers (CT ct) add_header (ct, np, vp); /* - * output the Content-ID + * output the Content-ID, unless disabled by -nocontentid */ - if (ct->c_id) { + if (contentidsw && ct->c_id) { np = add (ID_FIELD, NULL); vp = concat (" ", ct->c_id, NULL); add_header (ct, np, vp);