This interface is CLISP-specific and now obsolete. Please use the Gray streams interface instead.
Generic streams are user programmable streams. The programmer interface:
(gstream:make-generic-stream
controller
)
(gstream:generic-stream-controller
stream
)
gstream:make-generic-stream
.
(gstream:generic-stream-p
stream
)
T
if it is, NIL
otherwise.
In order to specify the behavior of a generic stream, the user
must define CLOS methods on the following CLOS generic
functions. The function gstream:generic-stream-
corresponds to the Common Lisp function x
.
They all take a controller and some number of arguments.x
(gstream:generic-stream-read-char
controller
)
NIL
at
end of file. Takes one argument, the controller object.
(gstream:generic-stream-peek-char
controller
)
NIL
at end of file. A
second value indicates whether the side effects associated with
consuming the character were executed: T
means that a full
READ-CHAR
was done, NIL
means that no side effects were done.
Takes one argument, the controller object.
(gstream:generic-stream-read-byte
controller
)
NIL
at end
of file. Takes one argument, the controller object.
(gstream:generic-stream-read-char-will-hang-p
controller
)
NIL
if
gstream:generic-stream-read-char
and
gstream:generic-stream-peek-char
will certainly
return immediately. Otherwise it returns true.
(gstream:generic-stream-write-char
controller
char
)
(gstream:generic-stream-write-byte
controller
by
)
(gstream:generic-stream-write-string
controller
string
start
length
)
string
starting from
start
of length length
.
The first argument is the controller object.
(gstream:generic-stream-clear-input
controller
)
(gstream:generic-stream-clear-output
controller
)
(gstream:generic-stream-finish-output
controller
)
(gstream:generic-stream-force-output
controller
)
(gstream:generic-stream-close
controller
)
These notes document CLISP version 2.49.93+ | Last modified: 2018-02-19 |