mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
They can be close()d explicitly with close-file-descriptor, and will close() on gc, but only explicitly closing the last port on them will close the fileno. Notably needed for network sockets where we open separate input and output ports on the same socket.
18 lines
824 B
Scheme
18 lines
824 B
Scheme
|
|
(define-library (chibi io)
|
|
(export read-string read-string! read-line write-line
|
|
port-fold port-fold-right port-map
|
|
port->list port->string-list port->sexp-list port->string
|
|
file-position set-file-position! seek/set seek/cur seek/end
|
|
make-custom-input-port make-custom-output-port
|
|
make-null-output-port make-null-input-port
|
|
make-broadcast-port make-concatenated-port
|
|
make-generated-input-port make-filtered-output-port
|
|
make-filtered-input-port string-count-chars
|
|
open-input-bytevector open-output-bytevector get-output-bytevector
|
|
string->utf8 utf8->string
|
|
write-string write-u8 read-u8 peek-u8 send-file
|
|
is-a-socket?)
|
|
(import (chibi) (chibi ast))
|
|
(include-shared "io/io")
|
|
(include "io/io.scm"))
|