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