From: Chris Hanson Date: Thu, 5 Dec 2019 06:09:49 +0000 (-0800) Subject: Eliminate use of ascii-range->char-set. X-Git-Tag: mit-scheme-pucked-10.1.20~10^2~3 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0ec5b988497ff5fba53f5ed7c0f2de9345b3bc5d;p=mit-scheme.git Eliminate use of ascii-range->char-set. --- diff --git a/src/compiler/machines/C/cout.scm b/src/compiler/machines/C/cout.scm index 4e9ce2bba..ae0974500 100644 --- a/src/compiler/machines/C/cout.scm +++ b/src/compiler/machines/C/cout.scm @@ -591,7 +591,7 @@ USA. (char-set-union ;; Not char-set:not-graphic (char-set-invert - (char-set-intersection char-set:graphic (ascii-range->char-set 0 #x7f))) + (char-set-intersection char-set:graphic (ucs-range->char-set 0 #x7f))) (char-set #\\ #\" #\? (integer->char #xA0)))) (define char-set:C-named-chars diff --git a/src/compiler/machines/C/cutl.scm b/src/compiler/machines/C/cutl.scm index be23d5530..b48f292f8 100644 --- a/src/compiler/machines/C/cutl.scm +++ b/src/compiler/machines/C/cutl.scm @@ -381,8 +381,8 @@ USA. #t)))) (define c:decimal-chars - (ascii-range->char-set (char->integer #\0) - (+ (char->integer #\9) 1))) + (ucs-range->char-set (char->integer #\0) + (+ (char->integer #\9) 1))) (define (c:type type) (or (and (symbol? type) @@ -464,12 +464,12 @@ USA. #t)))) (define c:identifier-chars - (char-set-union (ascii-range->char-set (char->integer #\A) - (+ (char->integer #\Z) 1)) - (ascii-range->char-set (char->integer #\a) - (+ (char->integer #\z) 1)) - (ascii-range->char-set (char->integer #\0) - (+ (char->integer #\9) 1)) + (char-set-union (ucs-range->char-set (char->integer #\A) + (+ (char->integer #\Z) 1)) + (ucs-range->char-set (char->integer #\a) + (+ (char->integer #\z) 1)) + (ucs-range->char-set (char->integer #\0) + (+ (char->integer #\9) 1)) (char-set #\_))) (define (c:%parenthesized? e) diff --git a/src/edwin/dired.scm b/src/edwin/dired.scm index 922acc1ed..8fcaf1abe 100644 --- a/src/edwin/dired.scm +++ b/src/edwin/dired.scm @@ -798,7 +798,7 @@ Actions controlled by variables list-directory-brief-switches (define directory-listing-before-filename-regexp (let* ((l (char-set-union char-set:alphabetic - (ascii-range->char-set #x80 #x100))) + (ucs-range->char-set #x80 #x100))) (l? (rexp-optional l)) (l-or-quote (char-set-union l (char-set #\'))) (digit (string->char-set "0123456789")) diff --git a/src/edwin/dosfile.scm b/src/edwin/dosfile.scm index 02835fbb0..084a91d72 100644 --- a/src/edwin/dosfile.scm +++ b/src/edwin/dosfile.scm @@ -397,10 +397,10 @@ Switches may be concatenated, e.g. `-lt' is equivalent to `-l -t'." (char-set-union (string->char-set "\"/:<>\\|") (string->char-set "*?")))) (set! char-set:valid-hpfs - (char-set-difference (ascii-range->char-set #x21 #x7F) + (char-set-difference (ucs-range->char-set #x21 #x7F) reserved-chars)) (set! char-set:valid-windows-long - (char-set-difference (ascii-range->char-set #x20 #x100) + (char-set-difference (ucs-range->char-set #x20 #x100) reserved-chars))) (define char-set:valid-fat diff --git a/src/edwin/modefs.scm b/src/edwin/modefs.scm index 6b9760a09..47a0fa7ad 100644 --- a/src/edwin/modefs.scm +++ b/src/edwin/modefs.scm @@ -48,7 +48,7 @@ Most other major modes are defined by comparison to this one.") ;; The extra range allows international keyboards to insert 8-bit characters (define char-set:self-insert-keys - (char-set-union char-set:printing (ascii-range->char-set 128 255))) + (char-set-union char-set:printing (ucs-range->char-set 128 255))) (define-key 'fundamental char-set:self-insert-keys 'self-insert-command) (define-key 'fundamental char-set:numeric 'auto-digit-argument) diff --git a/src/edwin/rcsparse.scm b/src/edwin/rcsparse.scm index 227b1d895..94feeb56e 100644 --- a/src/edwin/rcsparse.scm +++ b/src/edwin/rcsparse.scm @@ -368,8 +368,8 @@ USA. (define parse-word (let ((delimiters (char-set-invert - (char-set-union (ascii-range->char-set #o010 #o016) - (ascii-range->char-set #o040 #o041))))) + (char-set-union (ucs-range->char-set #o010 #o016) + (ucs-range->char-set #o040 #o041))))) (lambda (port) (input-port/discard-chars port delimiters) (let ((char (input-port/peek-char port))) @@ -401,8 +401,8 @@ USA. (let ((delimiters (char-set-invert (char-set-difference - (char-set-union (ascii-range->char-set #o041 #o177) - (ascii-range->char-set #o240 #o400)) + (char-set-union (ucs-range->char-set #o041 #o177) + (ucs-range->char-set #o240 #o400)) (char-set #\$ #\, #\. #\: #\; #\@))))) (lambda (port) (make-rcs-id (input-port/read-string port delimiters))))) diff --git a/src/edwin/rfc822.scm b/src/edwin/rfc822.scm index 67e132e7e..3031c56fe 100644 --- a/src/edwin/rfc822.scm +++ b/src/edwin/rfc822.scm @@ -29,7 +29,7 @@ USA. (declare (usual-integrations)) (define rfc822:char-set:header-constituents - (char-set-difference (ascii-range->char-set 33 127) + (char-set-difference (ucs-range->char-set 33 127) (char-set #\:))) (define rfc822:char-set:not-header-constituents @@ -385,7 +385,7 @@ USA. (define (rfc822:string-tokenizer special-chars keep-whitespace?) (let ((atom-chars - (char-set-difference (ascii-range->char-set #x21 #x7F) + (char-set-difference (ucs-range->char-set #x21 #x7F) special-chars))) (define (special-char? char) (char-in-set? char special-chars)) (define (atom-char? char) (char-in-set? char atom-chars)) diff --git a/src/edwin/sendmail.scm b/src/edwin/sendmail.scm index c658af9a9..24208233e 100644 --- a/src/edwin/sendmail.scm +++ b/src/edwin/sendmail.scm @@ -1375,7 +1375,7 @@ the user from the mailer." (loop ls))))))) (define char-set:printable-7bit - (char-set-union (ascii-range->char-set #x20 #x7F) + (char-set-union (ucs-range->char-set #x20 #x7F) (char-set #\tab #\page #\linefeed))) (define char-set:non-printable-7bit diff --git a/src/edwin/syntax.scm b/src/edwin/syntax.scm index 90c2e365d..87bb7d5bb 100644 --- a/src/edwin/syntax.scm +++ b/src/edwin/syntax.scm @@ -32,8 +32,8 @@ USA. (define (modify-syntax-entries! syntax-table cl ch string) (set-char-syntax! syntax-table - (ascii-range->char-set (char->integer cl) - (char->integer ch)) + (ucs-range->char-set (char->integer cl) + (char->integer ch)) string)) (define (group-syntax-table-entries group) diff --git a/src/imail/imap-syntax.scm b/src/imail/imap-syntax.scm index 598e767e4..6f1b62913 100644 --- a/src/imail/imap-syntax.scm +++ b/src/imail/imap-syntax.scm @@ -29,10 +29,10 @@ USA. (declare (usual-integrations)) (define imap:char-set:char - (ascii-range->char-set #x01 #x80)) + (ucs-range->char-set #x01 #x80)) (define imap:char-set:ctl - (char-set-union (ascii-range->char-set #x00 #x20) + (char-set-union (ucs-range->char-set #x00 #x20) (char-set #\rubout))) (define imap:char-set:list-wildcards diff --git a/src/runtime/http-syntax.scm b/src/runtime/http-syntax.scm index 6d81be9bc..1f5c834cc 100644 --- a/src/runtime/http-syntax.scm +++ b/src/runtime/http-syntax.scm @@ -953,8 +953,8 @@ USA. (char-set-difference char-set:http-text (char-set #\"))) (define-deferred char-set:alpha - (char-set-union (ascii-range->char-set #x41 #x5B) - (ascii-range->char-set #x61 #x7B))) + (char-set-union (ucs-range->char-set #x41 #x5B) + (ucs-range->char-set #x61 #x7B))) (define-tokenizer-state tokenize (eof done) diff --git a/src/runtime/mime-codec.scm b/src/runtime/mime-codec.scm index eb407da50..d2b38b646 100644 --- a/src/runtime/mime-codec.scm +++ b/src/runtime/mime-codec.scm @@ -327,7 +327,7 @@ USA. (define char-set:qp-encoded (char-set-invert - (char-set-union (char-set-difference (ascii-range->char-set #x21 #x7F) + (char-set-union (char-set-difference (ucs-range->char-set #x21 #x7F) (char-set #\=)) (char-set #\space #\tab)))) diff --git a/src/runtime/sfile.scm b/src/runtime/sfile.scm index da100090f..b182630b5 100644 --- a/src/runtime/sfile.scm +++ b/src/runtime/sfile.scm @@ -345,7 +345,7 @@ USA. top-level-mime-types)) (set! unusual-interned-mime-types (make-equal-hash-table)) (set! char-set:mime-token - (char-set-difference (ascii-range->char-set #x21 #x7F) + (char-set-difference (ucs-range->char-set #x21 #x7F) (string->char-set "()<>@,;:\\\"/[]?="))) (set! local-type-map (make-string-hash-table)) (associate-pathname-type-with-mime-type "scm" diff --git a/src/xml/rdf-nt.scm b/src/xml/rdf-nt.scm index bb859d389..fa486307f 100644 --- a/src/xml/rdf-nt.scm +++ b/src/xml/rdf-nt.scm @@ -96,11 +96,11 @@ USA. (define match-bnode-name (let* ((name-head - (char-set-union (ascii-range->char-set #x41 #x5B) - (ascii-range->char-set #x61 #x7B))) + (char-set-union (ucs-range->char-set #x41 #x5B) + (ucs-range->char-set #x61 #x7B))) (name-tail (char-set-union name-head - (ascii-range->char-set #x30 #x3A)))) + (ucs-range->char-set #x30 #x3A)))) (*matcher (seq (char-set name-head) (* (char-set name-tail)))))) @@ -175,11 +175,11 @@ USA. (char-set #\space #\tab)) (define char-set:character - (ascii-range->char-set #x20 #x7F)) + (ucs-range->char-set #x20 #x7F)) (define char-set:hex - (char-set-union (ascii-range->char-set #x30 #x3A) - (ascii-range->char-set #x41 #x47))) + (char-set-union (ucs-range->char-set #x30 #x3A) + (ucs-range->char-set #x41 #x47))) (define char-set:unescaped (char-set-difference char-set:character (char-set #\" #\\))) diff --git a/src/xml/rdf-struct.scm b/src/xml/rdf-struct.scm index 87e063681..6426beea4 100644 --- a/src/xml/rdf-struct.scm +++ b/src/xml/rdf-struct.scm @@ -175,7 +175,7 @@ USA. (unhash-object (vector-ref v 0))))) (define parse-bnode - (let ((digits (ascii-range->char-set #x30 #x3A))) + (let ((digits (ucs-range->char-set #x30 #x3A))) (*parser (seq (noise "_:B") (map (lambda (s) (string->number s 10 #t)) @@ -238,10 +238,10 @@ USA. (*match-symbol match-language object))) (define match-language - (let* ((language-head (ascii-range->char-set #x61 #x7B)) + (let* ((language-head (ucs-range->char-set #x61 #x7B)) (language-tail (char-set-union language-head - (ascii-range->char-set #x30 #x3A)))) + (ucs-range->char-set #x30 #x3A)))) (*matcher (seq (+ (char-set language-head)) (* (seq #\- (+ (char-set language-tail)))))))) diff --git a/src/xml/xml-rpc.scm b/src/xml/xml-rpc.scm index cad22ac4f..30f62b2c7 100644 --- a/src/xml/xml-rpc.scm +++ b/src/xml/xml-rpc.scm @@ -93,12 +93,12 @@ USA. (string-every (char-set-predicate char-set:method-name) string))) (define char-set:method-name - (char-set-union (ascii-range->char-set (char->integer #\a) - (fix:+ (char->integer #\z) 1)) - (ascii-range->char-set (char->integer #\A) - (fix:+ (char->integer #\Z) 1)) - (ascii-range->char-set (char->integer #\0) - (fix:+ (char->integer #\9) 1)) + (char-set-union (ucs-range->char-set (char->integer #\a) + (fix:+ (char->integer #\z) 1)) + (ucs-range->char-set (char->integer #\A) + (fix:+ (char->integer #\Z) 1)) + (ucs-range->char-set (char->integer #\0) + (fix:+ (char->integer #\9) 1)) (char-set #\_ #\. #\: #\/))) (define (xml-rpc:parse-response document)