Add %(unmailto) format function for List-Post headers
[mmh] / sbr / trimcpy.c
index f24563c..ffa6b57 100644 (file)
@@ -1,18 +1,20 @@
 /*
- * trimcpy.c -- strip leading and trailing whitespace,
- *           -- replace internal whitespace with spaces,
- *           -- then return a copy.
- *
- * This code is Copyright (c) 2002, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** trimcpy.c -- strip leading and trailing whitespace,
+**           -- replace internal whitespace with spaces,
+**           -- then return a copy.
+**
+** This code is Copyright (c) 2002, by the authors of nmh.  See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
 
 #include <h/mh.h>
+#include <h/utils.h>
+#include <ctype.h>
 
 
 char *
-trimcpy (unsigned char *cp)
+trimcpy(unsigned char *cp)
 {
        unsigned char *sp;
 
@@ -35,5 +37,5 @@ trimcpy (unsigned char *cp)
        }
 
        /* now return a copy */
-       return getcpy(cp);
+       return mh_xstrdup(cp);
 }