From 06e5589b5ec3b2cd6c78c127bd46e0e0a0e26fdc Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 10 Feb 2017 22:06:34 -0800 Subject: [PATCH] Fix char-ascii? to be 7-bit instead of 8. Also create char-8-bit?. --- src/runtime/char.scm | 7 +++++-- src/runtime/runtime.pkg | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/runtime/char.scm b/src/runtime/char.scm index fa8ce869d..d24e855e7 100644 --- a/src/runtime/char.scm +++ b/src/runtime/char.scm @@ -78,14 +78,17 @@ USA. (define (8-bit-char? object) (and (char? object) - (fix:< (char->integer object) #x100))) + (char-8-bit? object))) + +(define-integrable (char-8-bit? char) + (fix:< (char->integer char) #x100)) (define (ascii-char? object) (and (char? object) (char-ascii? object))) (define-integrable (char-ascii? char) - (fix:< (char->integer char) #x100)) + (fix:< (char->integer char) #x80)) (define (char=? x y) (fix:= (char->integer x) (char->integer y))) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 16a20778c..a06f8a547 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1335,6 +1335,7 @@ USA. ;; END deprecated bindings 8-bit-char? ascii-char? + char-8-bit? char->digit char->integer char->name -- 2.25.1