From: Chris Hanson Date: Wed, 25 Jan 2017 04:25:23 +0000 (-0800) Subject: Restrict most genio exports. A couple of renames. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~87 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c54147b779d498c90ccf008d574d5cc0dd703fa6;p=mit-scheme.git Restrict most genio exports. A couple of renames. --- diff --git a/src/runtime/genio.scm b/src/runtime/genio.scm index 1195b53e2..6d18b42fd 100644 --- a/src/runtime/genio.scm +++ b/src/runtime/genio.scm @@ -610,11 +610,11 @@ USA. (define (input-buffer-at-eof? ib) (binary-input-port-at-eof? (input-buffer-binary-port ib))) -(define (generic-input-port-buffer-contents port) +(define (generic-io/buffer-contents port) (binary-input-port-buffer-contents (input-buffer-binary-port (port-input-buffer port)))) -(define (set-generic-input-port-buffer-contents! port contents) +(define (generic-io/set-buffer-contents port contents) (set-binary-input-port-buffer-contents! (input-buffer-binary-port (port-input-buffer port)) contents)) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 1add920e4..903edae91 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -2288,30 +2288,39 @@ USA. (files "genio") (parent (runtime)) (export () + known-input-port-coding? + known-input-port-codings + known-output-port-coding? + known-output-port-codings + primary-input-port-codings + primary-output-port-codings) + (export (runtime console-i/o-port) generic-i/o-port-accessor - generic-i/o-port-modifier generic-i/o-port-type + generic-io/buffer-contents generic-io/char-ready? - generic-io/close-input - generic-io/close-output generic-io/flush-output generic-io/peek-char generic-io/read-char + generic-io/set-buffer-contents generic-io/unread-char - known-input-port-coding? - known-input-port-codings - known-output-port-coding? - known-output-port-codings make-generic-i/o-port - primary-input-port-codings - primary-output-port-codings) - (export (runtime console-i/o-port) - generic-input-port-buffer-contents - make-gstate - set-generic-input-port-buffer-contents!) + make-gstate) (export (runtime file-i/o-port) - generic-i/o-port->binary-port) - (initialization (initialize-package!))) + generic-i/o-port->binary-port + generic-i/o-port-type + make-generic-i/o-port) + (export (runtime socket) + generic-i/o-port-type + generic-io/close-input + generic-io/close-output + make-generic-i/o-port) + (export (runtime string-i/o-port) + generic-i/o-port-accessor + generic-i/o-port-type + make-generic-i/o-port) + (export (runtime subprocess) + make-generic-i/o-port)) (define-package (runtime gensym) (files "gensym") diff --git a/src/runtime/ttyio.scm b/src/runtime/ttyio.scm index 54f44ad69..ca76881b4 100644 --- a/src/runtime/ttyio.scm +++ b/src/runtime/ttyio.scm @@ -65,7 +65,7 @@ USA. (define (save-console-input) ((ucode-primitive reload-save-string 1) - (generic-input-port-buffer-contents console-input-port))) + (generic-io/buffer-contents console-input-port))) (define (reset-console) (let ((input-channel (tty-input-channel)) @@ -74,7 +74,7 @@ USA. (make-cstate input-channel output-channel)) (let ((contents ((ucode-primitive reload-retrieve-string 0)))) (if contents - (set-generic-input-port-buffer-contents! the-console-port contents))) + (generic-io/set-buffer-contents the-console-port contents))) (set-channel-port! input-channel the-console-port) (set-channel-port! output-channel the-console-port)))