Moved GRAY-STREAM implementation to the new IO.STREAMS package.
[iolib.git] / io.streams / pkgdcl.lisp
blobf9b89426f06f010e5366b6cc887e346c0c67326a
1 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
3 ;; Copyright (C) 2006, 2007 Stelian Ionescu
4 ;;
5 ;; This code is free software; you can redistribute it and/or
6 ;; modify it under the terms of the version 2.1 of
7 ;; the GNU Lesser General Public License as published by
8 ;; the Free Software Foundation, as clarified by the
9 ;; preamble found here:
10 ;; http://opensource.franz.com/preamble.html
12 ;; This program is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU Lesser General
18 ;; Public License along with this library; if not, write to the
19 ;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 ;; Boston, MA 02110-1301, USA
22 (in-package :common-lisp-user)
24 #-(or sbcl cmu openmcl clisp allegro lispworks)
25 (error "Your CL implementation is not suported.")
27 (macrolet ((def-my-package (&rest methods)
28 `(defpackage :io.streams
29 (:use #:common-lisp #:cffi #:iolib-utils
30 #:io.encodings)
31 #+(or sbcl cmu openmcl clisp allegro)
32 (:import-from #+sbcl #:sb-gray
33 #+cmu #:ext
34 #+openmcl #:ccl
35 #+clisp #:gray
36 #+allegro #:excl
37 #+lispworks #:stream
38 ,@methods)
39 (:export ,@methods
40 #:ub8 #:ub16 #:ub32 #:sb8 #:sb16 #:sb32
41 #:ub8-sarray #:ub8-vector #:ub16-sarray
42 #:external-format-of
43 #:dual-channel-fd-stream-mixin
44 #:input-fd #:input-fd-of
45 #:output-fd #:output-fd-of
46 #:dual-channel-single-fd-stream-mixin
47 #:fd-of))))
48 (def-my-package
49 #:fundamental-binary-input-stream #:fundamental-binary-output-stream
50 #:fundamental-character-input-stream #:fundamental-character-output-stream
51 #:stream-clear-input #:stream-clear-output
52 #:stream-finish-output #:stream-force-output
53 #:stream-read-byte #:stream-write-byte
54 #:stream-peek-char #:stream-read-char #:stream-read-char-no-hang
55 #:stream-unread-char #:stream-read-line #:stream-listen
56 #-(or clisp openmcl) #:stream-read-sequence
57 #+openmcl #:stream-read-vector
58 #+clisp #:stream-read-char-sequence #+clisp #:stream-read-byte-sequence
59 #-(or clisp openmcl) #:stream-write-sequence
60 #+openmcl #:stream-write-vector
61 #+clisp #:stream-write-char-sequence #+clisp #:stream-write-byte-sequence
62 #:stream-fresh-line #:stream-start-line-p
63 #:stream-terpri #:stream-write-char #:stream-write-string))