static void
register_for_removal(const char *pathname) {
if (exit_filelist == NULL) exit_filelist = svector_create(20);
- (void) svector_push_back(exit_filelist, add(pathname, NULL));
+ (void) svector_push_back(exit_filelist, mh_xstrdup(pathname));
}
/*
struct mailname *mp = getm (name, NULL, 0, NULL, 0);
if (mp && mp->m_ingrp) {
- char *gname = add (mp->m_gname, NULL);
+ char *gname = mh_xstrdup(FENDNULL(mp->m_gname));
/* FIXME: gname must be true; add() never returns NULL.
* Is some other test required? */
/* allocate the content structure */
NEW0(ct);
ct->c_fp = in;
- ct->c_file = add (file, NULL);
+ ct->c_file = mh_xstrdup(FENDNULL(file));
ct->c_begin = ftell (ct->c_fp) + 1;
/*
char c, *cp, *dp;
char *vrsn;
- vrsn = add (hp->value, NULL);
+ vrsn = mh_xstrdup(FENDNULL(hp->value));
/* Now, cleanup this field */
cp = vrsn;
}
/* get copy of this field */
- ct->c_celine = cp = add (hp->value, NULL);
+ ct->c_celine = cp = mh_xstrdup(FENDNULL(hp->value));
while (isspace ((unsigned char) *cp))
cp++;
goto next_header;
}
- ep = cp = add (hp->value, NULL); /* get a copy */
+ ep = cp = mh_xstrdup(FENDNULL(hp->value)); /* get a copy */
while (isspace ((unsigned char) *cp))
cp++;
ci = &ct->c_ctinfo;
/* store copy of Content-Type line */
- cp = ct->c_ctline = add (cp, NULL);
+ cp = ct->c_ctline = mh_xstrdup(FENDNULL(cp));
while (isspace ((unsigned char) *cp)) /* trim leading spaces */
cp++;
* time.
*/
- dispoheader = cp = add(cp, NULL);
+ dispoheader = cp = mh_xstrdup(FENDNULL(cp));
while (isspace ((unsigned char) *cp)) /* trim leading spaces */
cp++;
/* scan for parameters "id", "number", and "total" */
for (pm = ci->ci_first_pm; pm; pm = pm->pm_next) {
if (!strcasecmp (pm->pm_name, "id")) {
- p->pm_partid = add (pm->pm_value, NULL);
+ p->pm_partid = mh_xstrdup(FENDNULL(pm->pm_value));
continue;
}
if (!strcasecmp (pm->pm_name, "number")) {