(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))
(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")
(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))
(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)))