+
+/*
+ * Trim whitespace off both ends of a string.
+ */
+char *strtrim(save)
+ register char *save;
+{
+ register char *t, *s;
+
+ s = save;
+ while (isspace(*s)) s++;
+ /* skip to end of string */
+ if (*s == '\0') {
+ *save = '\0';
+ return(save);
+ }
+
+ for (t = s; *t; t++) continue;
+ while (t > s) {
+ --t;
+ if (!isspace(*t)) {
+ t++;
+ break;
+ }
+ }
+ *t = '\0';
+ return s;
+}
+
+
+