/*
* Allocate space for primary (outside) content
*/
- if ((ct = (CT) calloc (1, sizeof(*ct))) == NULL)
+ if ((ct = (CT) mh_xcalloc (1, sizeof(*ct))) == NULL)
adios (NULL, "out of memory");
/*
ct->c_type = CT_MULTIPART;
ct->c_subtype = MULTI_MIXED;
- if ((m = (struct multipart *) calloc (1, sizeof(*m))) == NULL)
+ if ((m = (struct multipart *) mh_xcalloc (1, sizeof(*m))) == NULL)
adios (NULL, "out of memory");
ct->c_ctparams = (void *) m;
pp = &m->mp_parts;
if (!p)
continue;
- if ((part = (struct part *) calloc (1, sizeof(*part))) == NULL)
+ if ((part = (struct part *) mh_xcalloc (1, sizeof(*part))) == NULL)
adios (NULL, "out of memory");
*pp = part;
pp = &part->mp_next;
adios("reading", "Unable to open %s for", at_entry->filename);
}
- if ((p = (CT) calloc (1, sizeof(*p))) == NULL)
+ if ((p = (CT) mh_xcalloc (1, sizeof(*p))) == NULL)
adios(NULL, "out of memory");
init_decoded_content(p, infile);
setup_attach_content(p, at_entry->filename);
- if ((part = (struct part *) calloc (1, sizeof(*part))) == NULL)
+ if ((part = (struct part *) mh_xcalloc (1, sizeof(*part))) == NULL)
adios (NULL, "out of memory");
*pp = part;
pp = &part->mp_next;
struct part *part;
struct text *t;
- if ((p = (CT) calloc (1, sizeof(*p))) == NULL)
+ if ((p = (CT) mh_xcalloc (1, sizeof(*p))) == NULL)
adios(NULL, "out of memory");
init_decoded_content(p, infile);
p->c_begin = ftell(in);
p->c_end = ftell(in);
- if ((t = (struct text *) calloc (1, sizeof (*t))) == NULL)
+ if ((t = (struct text *) mh_xcalloc (1, sizeof (*t))) == NULL)
adios (NULL, "out of memory");
t->tx_charset = CHARSET_SPECIFIED;
p->c_ctparams = t;
- if ((part = (struct part *) calloc (1, sizeof(*part))) == NULL)
+ if ((part = (struct part *) mh_xcalloc (1, sizeof(*part))) == NULL)
adios (NULL, "out of memory");
*pp = part;
part->mp_part = p;
}
/* allocate basic Content structure */
- if ((ct = (CT) calloc (1, sizeof(*ct))) == NULL)
+ if ((ct = (CT) mh_xcalloc (1, sizeof(*ct))) == NULL)
adios (NULL, "out of memory");
*ctp = ct;
* reference, we need to create another Content structure
* for the message/external-body to wrap it in.
*/
- if ((ct = (CT) calloc (1, sizeof(*ct))) == NULL)
+ if ((ct = (CT) mh_xcalloc (1, sizeof(*ct))) == NULL)
adios (NULL, "out of memory");
init_decoded_content(ct, infilename);
*ctp = ct;
ct->c_type = CT_MESSAGE;
ct->c_subtype = MESSAGE_EXTERNAL;
- if ((e = (struct exbody *) calloc (1, sizeof(*e))) == NULL)
+ if ((e = (struct exbody *) mh_xcalloc (1, sizeof(*e))) == NULL)
adios (NULL, "out of memory");
ct->c_ctparams = (void *) e;
ct->c_type = CT_MULTIPART;
ct->c_subtype = MULTI_DIGEST;
- if ((m = (struct multipart *) calloc (1, sizeof(*m))) == NULL)
+ if ((m = (struct multipart *) mh_xcalloc (1, sizeof(*m))) == NULL)
adios (NULL, "out of memory");
ct->c_ctparams = (void *) m;
pp = &m->mp_parts;
CT p;
CE pe;
- if ((p = (CT) calloc (1, sizeof(*p))) == NULL)
+ if ((p = (CT) mh_xcalloc (1, sizeof(*p))) == NULL)
adios (NULL, "out of memory");
init_decoded_content (p, infilename);
pe = &p->c_cefile;
if (listsw && stat (pe->ce_file, &st) != NOTOK)
p->c_end = (long) st.st_size;
- if ((part = (struct part *) calloc (1, sizeof(*part))) == NULL)
+ if ((part = (struct part *) mh_xcalloc (1, sizeof(*part))) == NULL)
adios (NULL, "out of memory");
*pp = part;
pp = &part->mp_next;
ct->c_type = CT_MULTIPART;
ct->c_subtype = vrsn;
- if ((m = (struct multipart *) calloc (1, sizeof(*m))) == NULL)
+ if ((m = (struct multipart *) mh_xcalloc (1, sizeof(*m))) == NULL)
adios (NULL, "out of memory");
ct->c_ctparams = (void *) m;
if (!p)
continue;
- if ((part = (struct part *) calloc (1, sizeof(*part))) == NULL)
+ if ((part = (struct part *) mh_xcalloc (1, sizeof(*part))) == NULL)
adios (NULL, "out of memory");
*pp = part;
pp = &part->mp_next;