From: Chris Hanson Date: Sat, 11 Feb 2017 23:42:52 +0000 (-0800) Subject: Rename port/char-set to textual-port-char-set. X-Git-Tag: mit-scheme-pucked-9.2.12~220^2~132 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9da847b94292367f0cd8512d2cb418c90025a7e2;p=mit-scheme.git Rename port/char-set to textual-port-char-set. Make it work on all textual ports and default to iso-8859-1. --- diff --git a/src/runtime/port.scm b/src/runtime/port.scm index 02a9705f6..a186d94e7 100644 --- a/src/runtime/port.scm +++ b/src/runtime/port.scm @@ -547,17 +547,18 @@ USA. (if tport (output-port/discretionary-flush tport)))) +(define (textual-port-char-set port) + (let ((operation (textual-port-operation port 'CHAR-SET))) + (if operation + (operation port) + char-set:iso-8859-1))) + (define (port/supports-coding? port) (let ((operation (textual-port-operation port 'SUPPORTS-CODING?))) (if operation (operation port) #f))) -(define (port/char-set port) - ((or (textual-port-operation port 'CHAR-SET) - (error:bad-range-argument port 'PORT/CHAR-SET)) - port)) - (define (port/coding port) ((or (textual-port-operation port 'CODING) (error:bad-range-argument port 'PORT/CODING)) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index e001f5868..368b78dfd 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -2399,6 +2399,21 @@ USA. (files "genio") (parent (runtime)) (export () + char-set:iso-8859-1 + char-set:iso-8859-10 + char-set:iso-8859-11 + char-set:iso-8859-13 + char-set:iso-8859-14 + char-set:iso-8859-15 + char-set:iso-8859-16 + char-set:iso-8859-2 + char-set:iso-8859-3 + char-set:iso-8859-4 + char-set:iso-8859-5 + char-set:iso-8859-6 + char-set:iso-8859-7 + char-set:iso-8859-8 + char-set:iso-8859-9 known-input-port-coding? known-input-port-codings known-output-port-coding? @@ -2769,7 +2784,6 @@ USA. output-port-terminal-mode output-port? port-property - port/char-set port/coding port/known-coding? port/known-codings @@ -2789,6 +2803,7 @@ USA. textual-i/o-port? textual-input-port? textual-output-port? + textual-port-char-set textual-port-open? textual-port-operation textual-port-operation-names