1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
3 ;;; --- Package definition.
6 (in-package :common-lisp-user
)
8 (defpackage :iolib.base
9 (:use
#:common-lisp
:alexandria
)
10 (:shadow
#:defun
#:defmethod
#:defmacro
#:define-compiler-macro
#:defconstant
)
14 #:subtype-error
#:subtype-error-datum
#:subtype-error-expected-supertype
17 #:debug-only
#:debug-only
*
18 #:production-only
#:production-only
*
21 #:character-designator
22 #:sb8
#:sb16
#:sb32
#:sb64
23 #:ub8
#:ub16
#:ub32
#:ub64
24 #:ub8-sarray
#:ub16-sarray
#:ub32-sarray
#:ub64-sarray
25 #:ub8-vector
#:ub16-vector
#:ub32-vector
#:ub64-vector
27 #:return
* #:lambda
* #:defun
#:defmethod
28 #:defmacro
#:define-compiler-macro
35 #:deprecation-warning-function-name
36 #:deprecation-warning-type
37 #:deprecation-warning-reason
40 #:enable-reader-macro
#:enable-reader-macro
*
41 #:disable-reader-macro
#:disable-reader-macro
*
42 #:define-literal-reader
43 #:unknown-literal-syntax
#:unknown-literal-syntax-name
45 #:split-sequence
#:split-sequence-if
#:split-sequence-if-not
47 #:function-name
#:function-name-p
48 #:check-bounds
#:join
#:shrink-vector
50 #:multiple-value-case
#:flags-case
52 #:timeout-designator
#:positive-timeout-designator
53 #:decode-timeout
#:normalize-timeout
#:clamp-timeout
56 (flet ((gather-external-symbols (&rest packages
)
58 (with-package-iterator (iterator packages
:external
)
59 (loop (multiple-value-bind (morep symbol
) (iterator)
60 (unless morep
(return))
61 (pushnew (intern (string symbol
) :iolib.base
)
64 (export (gather-external-symbols :common-lisp
:alexandria
:iolib.base
)
68 ;;;-------------------------------------------------------------------------
69 ;;; GRAY stream symbols
70 ;;;-------------------------------------------------------------------------
73 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
74 (require :gray-streams
))
77 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
78 (unless (fboundp 'stream
:stream-write-string
)
79 (require "streamc.fasl")))
81 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
82 (defvar *gray-stream-symbols
*
83 '(#:fundamental-stream
#:fundamental-input-stream
84 #:fundamental-output-stream
#:fundamental-character-stream
85 #:fundamental-binary-stream
#:fundamental-character-input-stream
86 #:fundamental-character-output-stream
87 #:fundamental-binary-input-stream
88 #:fundamental-binary-output-stream
#:stream-read-char
89 #:stream-unread-char
#:stream-read-char-no-hang
90 #:stream-peek-char
#:stream-listen
#:stream-read-line
91 #:stream-clear-input
#:stream-write-char
#:stream-line-column
92 #:stream-start-line-p
#:stream-write-string
#:stream-terpri
93 #:stream-fresh-line
#:stream-finish-output
#:stream-force-output
94 #:stream-clear-output
#:stream-advance-to-column
95 #:stream-read-byte
#:stream-write-byte
))
97 (defparameter *gray-stream-package
*
100 #+(or clisp ecl
) :gray
101 #+(or ccl openmcl
) :ccl
104 #-
(or allegro cmu scl clisp ecl ccl openmcl lispworks sbcl
)
105 (error "Your CL implementation isn't supported.")))
107 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
108 (import (mapcar #'(lambda (s) (intern (string s
) *gray-stream-package
*))
109 *gray-stream-symbols
*)
111 (export (mapcar (lambda (s) (intern (string s
) :iolib.base
))
112 (list* '#:trivial-gray-stream-mixin
113 '#:stream-read-sequence
114 '#:stream-write-sequence
115 '#:stream-file-position
116 *gray-stream-symbols
*))