Include trivial-gray-streams.
[iolib.git] / io.streams / gray / pkgdcl.lisp
blob1dd7e8190b042cbc538fc4cce685c8f0d3ef531f
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Package definition.
4 ;;;
6 (in-package :common-lisp-user)
8 (defpackage :io.streams
9 (:use :iolib.base :cffi)
10 (:export
11 ;; Classes
12 #:dual-channel-fd-mixin
13 #:dual-channel-gray-stream
14 #:dual-channel-single-fd-mixin
15 #:dual-channel-single-fd-gray-stream
17 ;; Types
18 #:sb16
19 #:sb32
20 #:sb8
21 #:ub16
22 #:ub16-sarray
23 #:ub32
24 #:ub8
25 #:ub8-sarray
26 #:ub8-vector
28 ;; Accessors
29 #:external-format-of
30 #:fd-non-blocking
31 #:fd-of
32 #:input-fd-non-blocking
33 #:input-fd-of
34 #:output-fd-non-blocking
35 #:output-fd-of
36 #:read-buffer-size
37 #:read-buffer-empty-p
38 #:write-buffer-size
39 #:write-buffer-empty-p
41 #:read-sequence*
42 #:write-sequence*
43 #:drain-input-buffer
46 #+cmu
47 (eval-when (:compile-toplevel :load-toplevel :execute)
48 (require :gray-streams))
50 #+allegro
51 (eval-when (:compile-toplevel :load-toplevel :execute)
52 (unless (fboundp 'stream:stream-write-string)
53 (require "streamc.fasl")))
55 (defvar *gray-stream-symbols*
56 '(#:fundamental-stream #:fundamental-input-stream
57 #:fundamental-output-stream #:fundamental-character-stream
58 #:fundamental-binary-stream #:fundamental-character-input-stream
59 #:fundamental-character-output-stream
60 #:fundamental-binary-input-stream
61 #:fundamental-binary-output-stream #:stream-read-char
62 #:stream-unread-char #:stream-read-char-no-hang
63 #:stream-peek-char #:stream-listen #:stream-read-line
64 #:stream-clear-input #:stream-write-char #:stream-line-column
65 #:stream-start-line-p #:stream-write-string #:stream-terpri
66 #:stream-fresh-line #:stream-finish-output #:stream-force-output
67 #:stream-clear-output #:stream-advance-to-column
68 #:stream-read-byte #:stream-write-byte))
70 (defparameter *gray-stream-package*
71 #+allegro :excl
72 #+cmu :ext
73 #+clisp :gray
74 #+ecl :gray
75 #+(or ccl openmcl) :ccl
76 #+lispworks :stream
77 #+sbcl :sb-gray
78 #-(or allegro cmu clisp ecl ccl openmcl lispworks sbcl)
79 (error "Your CL implementation isn't supported."))
81 (import (mapcar #'(lambda (s) (find-symbol (string s) *gray-stream-package*))
82 *gray-stream-symbols*)
83 :io.streams)