core: Add isspace to ctype.h
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 10 Apr 2011 16:38:45 +0000 (09:38 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 12 Apr 2011 21:41:06 +0000 (14:41 -0700)
This is needed for the http file downloader.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
core/include/ctype.h

index 5c6d4cb..6c7f57f 100644 (file)
@@ -22,4 +22,17 @@ static inline int tolower(int c)
     return c;
 }
 
+static inline int isspace(int ch)
+{
+    int space = 0;
+    if ((ch == ' ') ||
+       (ch == '\f') ||
+       (ch == '\n') ||
+       (ch == '\r') ||
+       (ch == '\t') ||
+       (ch == '\v'))
+       space = 1;
+    return space;
+}
+
 #endif /* CTYPE_H */