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
*
22 #:return
* #:lambda
* #:defun
#:defmethod
23 #:defmacro
#:define-compiler-macro
29 #:deprecation-warning-function-name
30 #:deprecation-warning-type
31 #:deprecation-warning-reason
34 #:enable-reader-macro
#:enable-reader-macro
*
35 #:disable-reader-macro
#:disable-reader-macro
*
37 #:split-sequence
#:split-sequence-if
#:split-sequence-if-not
39 #:function-name
#:function-name-p
42 #:multiple-value-case
#:flags-case
44 #:decode-timeout
#:normalize-timeout
#:clamp-timeout
))
46 (flet ((gather-external-symbols (&rest packages
)
48 (with-package-iterator (iterator packages
:external
)
49 (loop (multiple-value-bind (morep symbol
) (iterator)
50 (unless morep
(return))
51 (pushnew (intern (string symbol
) :iolib.base
)
54 (export (gather-external-symbols :common-lisp
:alexandria
:iolib.base
)
58 ;;;-------------------------------------------------------------------------
59 ;;; GRAY stream symbols
60 ;;;-------------------------------------------------------------------------
63 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
64 (require :gray-streams
))
67 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
68 (unless (fboundp 'stream
:stream-write-string
)
69 (require "streamc.fasl")))
71 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
72 (defvar *gray-stream-symbols
*
73 '(#:fundamental-stream
#:fundamental-input-stream
74 #:fundamental-output-stream
#:fundamental-character-stream
75 #:fundamental-binary-stream
#:fundamental-character-input-stream
76 #:fundamental-character-output-stream
77 #:fundamental-binary-input-stream
78 #:fundamental-binary-output-stream
#:stream-read-char
79 #:stream-unread-char
#:stream-read-char-no-hang
80 #:stream-peek-char
#:stream-listen
#:stream-read-line
81 #:stream-clear-input
#:stream-write-char
#:stream-line-column
82 #:stream-start-line-p
#:stream-write-string
#:stream-terpri
83 #:stream-fresh-line
#:stream-finish-output
#:stream-force-output
84 #:stream-clear-output
#:stream-advance-to-column
85 #:stream-read-byte
#:stream-write-byte
))
87 (defparameter *gray-stream-package
*
90 #+(or clisp ecl
) :gray
91 #+(or ccl openmcl
) :ccl
94 #-
(or allegro cmu scl clisp ecl ccl openmcl lispworks sbcl
)
95 (error "Your CL implementation isn't supported.")))
97 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
98 (import (mapcar #'(lambda (s) (intern (string s
) *gray-stream-package
*))
99 *gray-stream-symbols
*)
101 (export (mapcar (lambda (s) (intern (string s
) :iolib.base
))
102 (list* '#:trivial-gray-stream-mixin
103 '#:stream-read-sequence
104 '#:stream-write-sequence
105 '#:stream-file-position
106 *gray-stream-symbols
*))