Rearranged whitespace (and comments) in all the code!
[mmh] / sbr / trimcpy.c
index b640ea6..f24563c 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * trimcpy.c -- strip leading and trailing whitespace,
  *           -- replace internal whitespace with spaces,
 char *
 trimcpy (unsigned char *cp)
 {
-    unsigned char *sp;
-
-    /* skip over leading whitespace */
-    while (isspace(*cp))
-       cp++;
-
-    /* start at the end and zap trailing whitespace */
-    for (sp = cp + strlen(cp) - 1; sp >= cp; sp--) {
-       if (isspace(*sp))
-           *sp = '\0';
-       else
-           break;
-    }
-
-    /* replace remaining whitespace with spaces */
-    for (sp = cp; *sp; sp++) {
-       if (isspace(*sp))
-           *sp = ' ';
-    }
-
-    /* now return a copy */
-    return getcpy(cp);
+       unsigned char *sp;
+
+       /* skip over leading whitespace */
+       while (isspace(*cp))
+               cp++;
+
+       /* start at the end and zap trailing whitespace */
+       for (sp = cp + strlen(cp) - 1; sp >= cp; sp--) {
+               if (isspace(*sp))
+                       *sp = '\0';
+               else
+                       break;
+       }
+
+       /* replace remaining whitespace with spaces */
+       for (sp = cp; *sp; sp++) {
+               if (isspace(*sp))
+                       *sp = ' ';
+       }
+
+       /* now return a copy */
+       return getcpy(cp);
 }