summaryrefslogtreecommitdiff
path: root/src/ctype/iswcntrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctype/iswcntrl.c')
-rw-r--r--src/ctype/iswcntrl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ctype/iswcntrl.c b/src/ctype/iswcntrl.c
new file mode 100644
index 00000000..93942b08
--- /dev/null
+++ b/src/ctype/iswcntrl.c
@@ -0,0 +1,10 @@
+#include <wchar.h>
+#include <wctype.h>
+
+int iswcntrl(wint_t wc)
+{
+ return (unsigned)wc < 32
+ || (unsigned)(wc-0x7f) < 33
+ || (unsigned)(wc-0x2028) < 2
+ || (unsigned)(wc-0xfff9) < 3;
+}