From: Chris Hanson Date: Wed, 8 Feb 2017 04:39:08 +0000 (-0800) Subject: Implement char-general-category. X-Git-Tag: mit-scheme-pucked-9.2.12~220^2~164 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8a9bc0c4305c55a259f5d6db8ba2f0317b0821ae;p=mit-scheme.git Implement char-general-category. --- diff --git a/src/runtime/char.scm b/src/runtime/char.scm index 79074aca9..860a65819 100644 --- a/src/runtime/char.scm +++ b/src/runtime/char.scm @@ -393,6 +393,10 @@ USA. (guarantee unicode-scalar-value? sv caller) (integer->char sv)) +(define (char-general-category char) + (guarantee unicode-char? char 'char-general-category) + (ucd-gc-value (char->integer char))) + (define-integrable (utf16-surrogate? cp) (fix:= #xD800 (fix:and #xF800 cp))) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 3b3d38161..534d86517 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1357,6 +1357,7 @@ USA. char-code char-code-limit char-downcase + char-general-category char-integer-limit char-upcase char-utf16-byte-length