about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--include/ctype.h7
-rw-r--r--src/ctype/isspace.c1
-rw-r--r--src/locale/pleval.c8
3 files changed, 7 insertions, 9 deletions
diff --git a/include/ctype.h b/include/ctype.h
index 8f0d1687..a6f44df2 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -22,13 +22,18 @@ int   isxdigit(int);
 int   tolower(int);
 int   toupper(int);
 
+static __inline int __isspace(int _c)
+{
+	return _c == ' ' || (unsigned)_c-'\t' < 5;
+}
+
 #define isalpha(a) ((((unsigned)(a)|32)-'a') < 26)
 #define isdigit(a) (((unsigned)(a)-'0') < 10)
 #define islower(a) (((unsigned)(a)-'a') < 26)
 #define isupper(a) (((unsigned)(a)-'A') < 26)
 #define isprint(a) (((unsigned)(a)-0x20) < 0x5f)
 #define isgraph(a) (((unsigned)(a)-0x21) < 0x5e)
-
+#define isspace(a) __isspace(a)
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
diff --git a/src/ctype/isspace.c b/src/ctype/isspace.c
index 7dff20d0..231e9079 100644
--- a/src/ctype/isspace.c
+++ b/src/ctype/isspace.c
@@ -1,5 +1,6 @@
 #include <ctype.h>
 #include "libc.h"
+#undef isspace
 
 int isspace(int c)
 {
diff --git a/src/locale/pleval.c b/src/locale/pleval.c
index 961dabc0..d60058da 100644
--- a/src/locale/pleval.c
+++ b/src/locale/pleval.c
@@ -28,14 +28,6 @@ struct st {
 	int op;
 };
 
-/* TODO: this should go into ctypes.h */
-#undef isspace
-#define isspace(a) __isspace(a)
-static __inline int __isspace(int _c)
-{
-	return _c == ' ' || (unsigned)_c-'\t' < 5;
-}
-
 static const char *skipspace(const char *s)
 {
 	while (isspace(*s)) s++;