-
-/*
- * trimcpy.c -- strip leading and trailing whitespace,
+/* trimcpy.c -- strip leading and trailing whitespace,
* -- replace internal whitespace with spaces,
* -- then return a copy.
*
}
/* now return a copy */
- return getcpy(cp);
+ return mh_xstrdup(cp);
}
/* skip over leading whitespace */
while (isspace ((unsigned char) *sp)) ++sp;
- dp = add (sp, NULL);
+ dp = mh_xstrdup(sp);
/* start at the end and zap trailing whitespace */
for (cp = dp + strlen (dp) - 1;