0.8.8.16:
[sbcl/lichteblau.git] / contrib / sb-simple-streams / direct.lisp
blob2babb720f4f3d61e03674ba567344045cb8423c0
1 ;;; -*- lisp -*-
2 ;;;
3 ;;; **********************************************************************
4 ;;; This code was written by Paul Foley and has been placed in the public
5 ;;; domain.
6 ;;;
8 ;;; Sbcl port by Rudi Schlatte.
10 (in-package "SB-SIMPLE-STREAMS")
12 ;;;
13 ;;; **********************************************************************
14 ;;;
15 ;;; Direct-Simple-Stream and Buffer-(Input|Output)-Simple-Stream
17 (def-stream-class direct-simple-stream (single-channel-simple-stream)
18 ())
20 (def-stream-class buffer-input-simple-stream (direct-simple-stream)
21 ())
23 (def-stream-class buffer-output-simple-stream (direct-simple-stream)
24 ((out-buffer :initform nil :type (or simple-stream-buffer null))
25 (outpos :initform 0 :type fixnum)
26 (max-out-pos :initform 0 :type fixnum)))
28 (defmethod device-file-length ((stream direct-simple-stream))
29 ;; return buffer length
32 (defmethod device-open ((stream buffer-input-simple-stream) options)
33 #| do something |#
34 stream)
36 (defmethod device-open ((stream buffer-output-simple-stream) options)
37 #| do something |#
38 stream)