chibi-scheme/lib/chibi/io.sld
Alex Shinn 8b5eb68238 File descriptors maintain a reference count of ports open on them
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.
2014-02-20 22:32:50 +09:00

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