summaryrefslogtreecommitdiff
path: root/LibC/ctype.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-25 10:05:32 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-25 10:05:32 +0100
commit0b957ed2b1cd6b4949c93c5b39b64b0caf060c12 (patch)
tree4d3f45be6beead20518cd93ad3080ec24bda66c0 /LibC/ctype.h
parent93c0dfd1d7b97bff8caaec761aecca4a929c3412 (diff)
downloadserenity-0b957ed2b1cd6b4949c93c5b39b64b0caf060c12.zip
Some compat work towards making GCC's libstdc++ build.
Diffstat (limited to 'LibC/ctype.h')
-rw-r--r--LibC/ctype.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/LibC/ctype.h b/LibC/ctype.h
index cfd0cbefec..c1282644bd 100644
--- a/LibC/ctype.h
+++ b/LibC/ctype.h
@@ -75,6 +75,11 @@ ALWAYS_INLINE int __isxdigit(int c)
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
}
+ALWAYS_INLINE int __isgraph(int c)
+{
+ return __isalnum(c) || __ispunct(c);
+}
+
#ifdef __cplusplus
#define __CTYPE_FUNC(name) static inline int name(int c) { return __ ## name(c); }
@@ -91,6 +96,7 @@ __CTYPE_FUNC(isalpha)
__CTYPE_FUNC(isalnum)
__CTYPE_FUNC(iscntrl)
__CTYPE_FUNC(isxdigit)
+__CTYPE_FUNC(isgraph)
#else
#define isascii(c) __isascii(c)
#define isspace(c) __isspace(c)
@@ -105,6 +111,7 @@ __CTYPE_FUNC(isxdigit)
#define isalnum(c) __isalnum(c)
#define iscntrl(c) __iscntrl(c)
#define isxdigit(c) __isxdigit(c)
+#define isgraph(c) __isgraph(c)
#endif
__END_DECLS