Index: trunk/psphot/src/psLine.c
===================================================================
--- trunk/psphot/src/psLine.c	(revision 5980)
+++ trunk/psphot/src/psLine.c	(revision 6311)
@@ -47,2 +47,20 @@
 }
 
+#ifndef whitespace
+#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
+#endif
+
+/* Strip whitespace from the start and end of STRING. */
+int psStringStrip (char *string) {
+
+  int i;
+
+  if (string == (char *) NULL) return (FALSE);
+
+  for (i = 0; whitespace (string[i]); i++);
+  if (i) memmove (string, string + i, strlen(string+i)+1);
+  for (i = strlen (string) - 1; (i > 0) && whitespace (string[i]); i--);
+  string[++i] = 0;
+  return (i);
+
+}
