]> diplodocus.org Git - nmh/blobdiff - sbr/trimcpy.c
When output_content() outputs a non-MIME message with no body,
[nmh] / sbr / trimcpy.c
index d13554850c9e0939807bad6c79d11e0400e2f9fb..3a2fbd763fb991b633b9b29136d4f251bd305cf6 100644 (file)
@@ -4,7 +4,9 @@
  *           -- replace internal whitespace with spaces,
  *           -- then return a copy.
  *
- * $Id$
+ * 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>
@@ -16,12 +18,12 @@ trimcpy (char *cp)
     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;
@@ -29,7 +31,7 @@ trimcpy (char *cp)
 
     /* replace remaining whitespace with spaces */
     for (sp = cp; *sp; sp++) {
-       if (isspace(*sp))
+       if (isspace((unsigned char) *sp))
            *sp = ' ';
     }