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
)
17 #:return
* #:lambda
* #:defun
#:defmethod
18 #:defmacro
#:define-compiler-macro
22 #:deprecation-warning-function-name
23 #:deprecation-warning-type
24 #:deprecation-warning-reason
27 #:enable-reader-macro
#:enable-reader-macro
*
28 #:disable-reader-macro
#:disable-reader-macro
*
30 #:split-sequence
#:split-sequence-if
#:split-sequence-if-not
32 #:function-name
#:function-name-p
35 #:multiple-value-case
#:flags-case
37 #:decode-timeout
#:normalize-timeout
#:clamp-timeout
))
39 (flet ((gather-external-symbols (&rest packages
)
41 (with-package-iterator (iterator packages
:external
)
42 (loop (multiple-value-bind (morep symbol
) (iterator)
43 (unless morep
(return))
44 (pushnew (intern (string symbol
) :iolib.base
)
47 (export (gather-external-symbols :common-lisp
:alexandria
:iolib.base
)
51 ;;;-------------------------------------------------------------------------
52 ;;; GRAY stream symbols
53 ;;;-------------------------------------------------------------------------
56 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
57 (require :gray-streams
))
60 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
61 (unless (fboundp 'stream
:stream-write-string
)
62 (require "streamc.fasl")))
64 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
65 (defvar *gray-stream-symbols
*
66 '(#:fundamental-stream
#:fundamental-input-stream
67 #:fundamental-output-stream
#:fundamental-character-stream
68 #:fundamental-binary-stream
#:fundamental-character-input-stream
69 #:fundamental-character-output-stream
70 #:fundamental-binary-input-stream
71 #:fundamental-binary-output-stream
#:stream-read-char
72 #:stream-unread-char
#:stream-read-char-no-hang
73 #:stream-peek-char
#:stream-listen
#:stream-read-line
74 #:stream-clear-input
#:stream-write-char
#:stream-line-column
75 #:stream-start-line-p
#:stream-write-string
#:stream-terpri
76 #:stream-fresh-line
#:stream-finish-output
#:stream-force-output
77 #:stream-clear-output
#:stream-advance-to-column
78 #:stream-read-byte
#:stream-write-byte
))
80 (defparameter *gray-stream-package
*
85 #+(or ccl openmcl
) :ccl
88 #-
(or allegro cmu clisp ecl ccl openmcl lispworks sbcl
)
89 (error "Your CL implementation isn't supported.")))
91 (import (mapcar #'(lambda (s) (find-symbol (string s
) *gray-stream-package
*))
92 *gray-stream-symbols
*)
95 (export (mapcar (lambda (s) (intern (string s
) :iolib.base
))
96 (list* '#:trivial-gray-stream-mixin
97 '#:stream-read-sequence
98 '#:stream-write-sequence
99 '#:stream-file-position
100 *gray-stream-symbols
*))