summaryrefslogtreecommitdiff
path: root/lib/libc/ctype/iscntrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/ctype/iscntrl.c')
-rw-r--r--lib/libc/ctype/iscntrl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/ctype/iscntrl.c b/lib/libc/ctype/iscntrl.c
new file mode 100644
index 00000000..6d4ff5a8
--- /dev/null
+++ b/lib/libc/ctype/iscntrl.c
@@ -0,0 +1,8 @@
+#include <libc.h>
+
+int iscntrl(int c)
+{
+ return (unsigned)c < 0x20 || c == 0x7f;
+}
+
+weak_reference(iscntrl, iscntrl_l);