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
)
15 #:return
* #:lambda
* #:defun
#:defmethod
16 #:defmacro
#:define-compiler-macro
20 #:deprecation-warning-function-name
21 #:deprecation-warning-type
22 #:deprecation-warning-reason
25 #:enable-reader-macro
#:enable-reader-macro
*
26 #:disable-reader-macro
#:disable-reader-macro
*
28 #:split-sequence
#:split-sequence-if
#:split-sequence-if-not
30 #:function-name
#:function-name-p
33 #:multiple-value-case
#:flags-case
35 #:decode-timeout
#:normalize-timeout
#:clamp-timeout
))
37 (flet ((gather-external-symbols (&rest packages
)
38 (let ((symbols (make-hash-table :test
#'eq
)))
39 (with-package-iterator (iterator packages
:external
)
40 (loop (multiple-value-bind (morep symbol
) (iterator)
41 (unless morep
(return))
42 (setf (gethash (alexandria:ensure-symbol symbol
:iolib.base
) symbols
) t
))))
43 (alexandria:hash-table-keys symbols
))))
44 (export (gather-external-symbols :common-lisp
:alexandria
:iolib.base
)
48 ;;;-------------------------------------------------------------------------
49 ;;; GRAY stream symbols
50 ;;;-------------------------------------------------------------------------
53 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
54 (require :gray-streams
))
57 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
58 (unless (fboundp 'stream
:stream-write-string
)
59 (require "streamc.fasl")))
61 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
62 (defvar *gray-stream-symbols
*
63 '(#:fundamental-stream
#:fundamental-input-stream
64 #:fundamental-output-stream
#:fundamental-character-stream
65 #:fundamental-binary-stream
#:fundamental-character-input-stream
66 #:fundamental-character-output-stream
67 #:fundamental-binary-input-stream
68 #:fundamental-binary-output-stream
#:stream-read-char
69 #:stream-unread-char
#:stream-read-char-no-hang
70 #:stream-peek-char
#:stream-listen
#:stream-read-line
71 #:stream-clear-input
#:stream-write-char
#:stream-line-column
72 #:stream-start-line-p
#:stream-write-string
#:stream-terpri
73 #:stream-fresh-line
#:stream-finish-output
#:stream-force-output
74 #:stream-clear-output
#:stream-advance-to-column
75 #:stream-read-byte
#:stream-write-byte
))
77 (defparameter *gray-stream-package
*
82 #+(or ccl openmcl
) :ccl
85 #-
(or allegro cmu clisp ecl ccl openmcl lispworks sbcl
)
86 (error "Your CL implementation isn't supported.")))
88 (import (mapcar #'(lambda (s) (find-symbol (string s
) *gray-stream-package
*))
89 *gray-stream-symbols
*)
92 (export (mapcar (lambda (s) (alexandria:ensure-symbol s
:iolib.base
))
93 (list* '#:trivial-gray-stream-mixin
94 '#:stream-read-sequence
95 '#:stream-write-sequence
96 '#:stream-file-position
97 *gray-stream-symbols
*))