summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 11ad76b5..38837e43 100644
--- a/lib.c
+++ b/lib.c
@@ -5897,7 +5897,13 @@ val chr_isascii(val ch)
val chr_iscntrl(val ch)
{
- return tnil(iswcntrl(c_chr(ch)));
+ wchar_t c = c_chr(ch);
+ switch ((c >> 5)) {
+ case 0: case 4:
+ return t;
+ default:
+ return tnil(c == 0x7F);
+ }
}
val chr_isdigit(val ch)