Restrict most genio exports. A couple of renames.
authorChris Hanson <org/chris-hanson/cph>
Wed, 25 Jan 2017 04:25:23 +0000 (20:25 -0800)
committerChris Hanson <org/chris-hanson/cph>
Wed, 25 Jan 2017 04:25:23 +0000 (20:25 -0800)
src/runtime/genio.scm
src/runtime/runtime.pkg
src/runtime/ttyio.scm

index 1195b53e2faa0ec0ad2e2bedccb35e9d0f5ef5b3..6d18b42fd8948485b23dd973c334cff961b09ca9 100644 (file)
@@ -610,11 +610,11 @@ USA.
 (define (input-buffer-at-eof? ib)
   (binary-input-port-at-eof? (input-buffer-binary-port ib)))
 \f
-(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))
index 1add920e41038b641818346b5565aac00b504837..903edae91362ae2e9935e7fe9fb0c7ab18aecd94 100644 (file)
@@ -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")
index 54f44ad69ed2d8a42426375e0d7b11732f321005..ca76881b4e40ed84626499a9f4810f6c68cd0a18 100644 (file)
@@ -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)))