]> diplodocus.org Git - nmh/blobdiff - sbr/trimcpy.c
Document argsplit changes in mh-profile man page.
[nmh] / sbr / trimcpy.c
index b640ea6f2bcbe7faebb6b131de2d51fad1a2e4fb..3a2fbd763fb991b633b9b29136d4f251bd305cf6 100644 (file)
 
 
 char *
-trimcpy (unsigned char *cp)
+trimcpy (char *cp)
 {
-    unsigned char *sp;
+    char *sp;
 
     /* skip over leading whitespace */
-    while (isspace(*cp))
+    while (isspace((unsigned char) *cp))
        cp++;
 
     /* start at the end and zap trailing whitespace */
     for (sp = cp + strlen(cp) - 1; sp >= cp; sp--) {
-       if (isspace(*sp))
+       if (isspace((unsigned char) *sp))
            *sp = '\0';
        else
            break;
@@ -31,7 +31,7 @@ trimcpy (unsigned char *cp)
 
     /* replace remaining whitespace with spaces */
     for (sp = cp; *sp; sp++) {
-       if (isspace(*sp))
+       if (isspace((unsigned char) *sp))
            *sp = ' ';
     }