int n = 0;
/* split the fields */
- tmparray = brkstring(getcpy(++parptr), ",",
+ tmparray = brkstring(mh_xstrdup(++parptr), ",",
NULL);
/*
** copy pointers to split fields
if (!c1->c_fstr && global.c_fstr) {
if ((c1->c_flags & DATEFMT) &&
(global.c_flags & DATEFMT)) {
- c1->c_fstr = getcpy(global.c_fstr);
+ c1->c_fstr = mh_xstrdup(global.c_fstr);
} else if ((c1->c_flags & ADDRFMT) &&
(global.c_flags & ADDRFMT)) {
- c1->c_fstr = getcpy(global.c_fstr);
+ c1->c_fstr = mh_xstrdup(global.c_fstr);
}
}
continue;
cp = concat("=", cp, NULL);
fmtstr = new_fs(cp, NULL);
mh_free0(&cp);
- c1->c_fstr = getcpy(fmtstr);
+ c1->c_fstr = mh_xstrdup(fmtstr);
c1->c_flags |= FORMAT;
return 0;
}
char *fmtstr;
fmtstr = new_fs("=%(decode{text})", NULL);
- c1->c_fstr = getcpy(fmtstr);
+ c1->c_fstr = mh_xstrdup(fmtstr);
c1->c_flags |= FORMAT;
return 0;
}
}
c = *parptr;
*parptr = 0;
- *s = getcpy(cp);
+ *s = mh_xstrdup(cp);
if ((*parptr = c) == '"')
parptr++;
return 0;
fmt_scan(c1->c_fmt, buffer, sizeof(buffer) - 1, dat);
/* Don't need to append a newline, dctime() already did */
- c2->c_text = getcpy(buffer);
+ c2->c_text = mh_xstrdup(buffer);
mh_free0(&ap);
return;
p = mh_xcalloc(1, sizeof(*p));
if ((mp = getm(cp, NULL, 0, AD_NAME, error)) == NULL) {
- p->pq_text = getcpy(cp);
- p->pq_error = getcpy(error);
+ p->pq_text = mh_xstrdup(cp);
+ p->pq_error = mh_xstrdup(error);
} else {
- p->pq_text = getcpy(mp->m_text);
+ p->pq_text = mh_xstrdup(mp->m_text);
mnfree(mp);
}
q = (q->pq_next = p);
c1 = mh_xcalloc(1, sizeof(*c1));
c1->c_flags = flags & ~INIT;
- if ((c1->c_name = name ? getcpy(name) : NULL))
+ if ((c1->c_name = name ? mh_xstrdup(name) : NULL))
c1->c_flags |= mcomp_flags(c1->c_name);
- c1->c_text = text ? getcpy(text) : NULL;
+ c1->c_text = text ? mh_xstrdup(text) : NULL;
if (flags & INIT) {
if (global.c_ovtxt)
- c1->c_ovtxt = getcpy(global.c_ovtxt);
+ c1->c_ovtxt = mh_xstrdup(global.c_ovtxt);
c1->c_offset = global.c_offset;
c1->c_ovoff = global. c_ovoff;
c1->c_width = 0;