]> diplodocus.org Git - nmh/blobdiff - sbr/trimcpy.c
inc/test-eom-align: Create test mboxes in less steps.
[nmh] / sbr / trimcpy.c
index 7a2ac03abecf05f4553a7511cb39393b7287b300..625c26c0ac0e022fff023db542293c05517fbd03 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * trimcpy.c -- strip leading and trailing whitespace,
+/* trimcpy.c -- strip leading and trailing whitespace,
  *           -- replace internal whitespace with spaces,
  *           -- then return a copy.
  *
@@ -37,7 +35,7 @@ trimcpy (char *cp)
     }
 
     /* now return a copy */
-    return getcpy(cp);
+    return mh_xstrdup(cp);
 }
 
 
@@ -58,7 +56,7 @@ cpytrim (const char *sp) {
     /* 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;