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
)
39 (with-package-iterator (iterator packages
:external
)
40 (loop (multiple-value-bind (morep symbol
) (iterator)
41 (unless morep
(return))
42 (pushnew (intern (string symbol
) :iolib.base
)
45 (export (gather-external-symbols :common-lisp
:alexandria
:iolib.base
)
49 ;;;-------------------------------------------------------------------------
50 ;;; GRAY stream symbols
51 ;;;-------------------------------------------------------------------------
54 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
55 (require :gray-streams
))
58 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
59 (unless (fboundp 'stream
:stream-write-string
)
60 (require "streamc.fasl")))
62 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
63 (defvar *gray-stream-symbols
*
64 '(#:fundamental-stream
#:fundamental-input-stream
65 #:fundamental-output-stream
#:fundamental-character-stream
66 #:fundamental-binary-stream
#:fundamental-character-input-stream
67 #:fundamental-character-output-stream
68 #:fundamental-binary-input-stream
69 #:fundamental-binary-output-stream
#:stream-read-char
70 #:stream-unread-char
#:stream-read-char-no-hang
71 #:stream-peek-char
#:stream-listen
#:stream-read-line
72 #:stream-clear-input
#:stream-write-char
#:stream-line-column
73 #:stream-start-line-p
#:stream-write-string
#:stream-terpri
74 #:stream-fresh-line
#:stream-finish-output
#:stream-force-output
75 #:stream-clear-output
#:stream-advance-to-column
76 #:stream-read-byte
#:stream-write-byte
))
78 (defparameter *gray-stream-package
*
83 #+(or ccl openmcl
) :ccl
86 #-
(or allegro cmu clisp ecl ccl openmcl lispworks sbcl
)
87 (error "Your CL implementation isn't supported.")))
89 (import (mapcar #'(lambda (s) (find-symbol (string s
) *gray-stream-package
*))
90 *gray-stream-symbols
*)
93 (export (mapcar (lambda (s) (intern (string s
) :iolib.base
))
94 (list* '#:trivial-gray-stream-mixin
95 '#:stream-read-sequence
96 '#:stream-write-sequence
97 '#:stream-file-position
98 *gray-stream-symbols
*))