1 ;;;; -*- Mode: 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 (defpackage :iolib.asdf
58 (:import-from
:asdf
#:defsystem
#:find-system
59 #:oos
#:operate
#:perform
60 #:test-op
#:load-op
#:compile-op
63 (:export
#:muffled-source-file
#:iolib-source-file
))
65 (flet ((gather-external-symbols (&rest packages
)
67 (with-package-iterator (iterator packages
:external
)
68 (loop (multiple-value-bind (morep symbol
) (iterator)
69 (unless morep
(return))
70 (pushnew (intern (string symbol
) :iolib.base
)
73 (export (gather-external-symbols :common-lisp
:alexandria
:iolib.base
)
77 ;;;-------------------------------------------------------------------------
78 ;;; GRAY stream symbols
79 ;;;-------------------------------------------------------------------------
82 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
83 (require :gray-streams
))
86 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
87 (unless (fboundp 'stream
:stream-write-string
)
88 (require "streamc.fasl")))
90 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
91 (defvar *gray-stream-symbols
*
92 '(#:fundamental-stream
#:fundamental-input-stream
93 #:fundamental-output-stream
#:fundamental-character-stream
94 #:fundamental-binary-stream
#:fundamental-character-input-stream
95 #:fundamental-character-output-stream
96 #:fundamental-binary-input-stream
97 #:fundamental-binary-output-stream
#:stream-read-char
98 #:stream-unread-char
#:stream-read-char-no-hang
99 #:stream-peek-char
#:stream-listen
#:stream-read-line
100 #:stream-clear-input
#:stream-write-char
#:stream-line-column
101 #:stream-start-line-p
#:stream-write-string
#:stream-terpri
102 #:stream-fresh-line
#:stream-finish-output
#:stream-force-output
103 #:stream-clear-output
#:stream-advance-to-column
104 #:stream-read-byte
#:stream-write-byte
))
106 (defparameter *gray-stream-package
*
109 #+(or clisp ecl
) :gray
110 #+(or ccl openmcl
) :ccl
113 #-
(or allegro cmu scl clisp ecl ccl openmcl lispworks sbcl
)
114 (error "Your CL implementation isn't supported.")))
116 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
117 (import (mapcar #'(lambda (s) (intern (string s
) *gray-stream-package
*))
118 *gray-stream-symbols
*)
120 (export (mapcar (lambda (s) (intern (string s
) :iolib.base
))
121 (list* '#:trivial-gray-stream-mixin
122 '#:stream-read-sequence
123 '#:stream-write-sequence
124 '#:stream-file-position
125 *gray-stream-symbols
*))