From: Chris Hanson Date: Mon, 9 Dec 2019 09:31:35 +0000 (-0800) Subject: Carefully fix problems caused by changing char-set:graphic. X-Git-Tag: mit-scheme-pucked-10.1.20~10^2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2d14fb1425ad8612358387ec5e5fc45ca27e8741;p=mit-scheme.git Carefully fix problems caused by changing char-set:graphic. --- diff --git a/src/compiler/machines/C/cout.scm b/src/compiler/machines/C/cout.scm index ae0974500..07de698dc 100644 --- a/src/compiler/machines/C/cout.scm +++ b/src/compiler/machines/C/cout.scm @@ -589,9 +589,7 @@ USA. (define char-set:C-string-quoted (char-set-union - ;; Not char-set:not-graphic - (char-set-invert - (char-set-intersection char-set:graphic (ucs-range->char-set 0 #x7f))) + (char-set-invert (ucs-range->char-set #x20 #x7F)) (char-set #\\ #\" #\? (integer->char #xA0)))) (define char-set:C-named-chars diff --git a/src/edwin/adapters.scm b/src/edwin/adapters.scm index aca5e3e61..520c6c8d2 100644 --- a/src/edwin/adapters.scm +++ b/src/edwin/adapters.scm @@ -57,4 +57,8 @@ USA. (call-with-file-adapter call-with-input-file)) (define edwin:call-with-output-file - (call-with-file-adapter call-with-output-file)) \ No newline at end of file + (call-with-file-adapter call-with-output-file)) + +(define char-set:graphic + (char-set-union (ucs-range->char-set #x20 #x7F) + (ucs-range->char-set #xA0 #x100))) \ No newline at end of file diff --git a/src/edwin/edwin.pkg b/src/edwin/edwin.pkg index 3c5a0fda9..979571b10 100644 --- a/src/edwin/edwin.pkg +++ b/src/edwin/edwin.pkg @@ -157,7 +157,8 @@ USA. (export (edwin) (call-with-append-file edwin:call-with-append-file) (call-with-input-file edwin:call-with-input-file) - (call-with-output-file edwin:call-with-output-file))) + (call-with-output-file edwin:call-with-output-file) + char-set:graphic)) (define-package (edwin string) (files "string") diff --git a/src/edwin/modefs.scm b/src/edwin/modefs.scm index 47a0fa7ad..8558ef9ae 100644 --- a/src/edwin/modefs.scm +++ b/src/edwin/modefs.scm @@ -48,7 +48,8 @@ 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 (ucs-range->char-set 128 255))) + (char-set-union (ucs-range->char-set #x20 #x7F) + (ucs-range->char-set #x80 #xFF))) (define-key 'fundamental char-set:self-insert-keys 'self-insert-command) (define-key 'fundamental char-set:numeric 'auto-digit-argument) diff --git a/tests/runtime/test-mime-codec.scm b/tests/runtime/test-mime-codec.scm index 76320d119..307676696 100644 --- a/tests/runtime/test-mime-codec.scm +++ b/tests/runtime/test-mime-codec.scm @@ -71,9 +71,10 @@ USA. (builder 'immutable))) (define text-characters - (list->string - (append '(#\tab #\newline) - (char-set-members char-set:graphic)))) + (char-set->string + (char-set-union (ucs-range->char-set #x20 #x7F) + (ucs-range->char-set #xA0 #x100) + (char-set #\tab #\newline)))) (define (test-codec n-packets packet-length text? filename binary-codec? encode:initialize encode:finalize encode:update