-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packages.lisp
252 lines (219 loc) · 8.4 KB
/
packages.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
(in-package #:cl-user)
#+(and (or ecl clasp) (not gray-streams-module))
(eval-when (:compile-toplevel :load-toplevel :execute)
(gray::redefine-cl-functions))
(eval-when (:compile-toplevel :load-toplevel :execute)
#+clisp
(pushnew :gray-streams-element-type/setf *features*)
#+abcl
(when (fboundp '(setf gray-streams::gray-stream-element-type))
(pushnew :gray-streams-element-type/setf *features*))
#+clasp
(when (fboundp '(setf gray:stream-element-type))
(pushnew :gray-streams-element-type/setf *features*))
#+cmucl
(when (fboundp '(setf stream-element-type))
(pushnew :gray-streams-element-type/setf *features*))
#+(or abcl ccl clasp ecl lispworks mezzano mkcl sicl)
(pushnew :gray-streams-streamp *features*)
#+(or abcl allegro ccl clasp cmucl ecl lispworks mezzano mkcl sbcl sicl)
(pushnew :gray-streams-input-stream-p *features*)
#+(or abcl allegro ccl clasp cmucl ecl lispworks mezzano mkcl sbcl sicl)
(pushnew :gray-streams-output-stream-p *features*)
#+ccl
(pushnew :gray-streams-pathname *features*)
#+(or clasp cmucl)
(when (typep (fdefinition 'cl:pathname) 'generic-function)
(pushnew :gray-streams-pathname *features*))
#+(or clasp cmucl)
(when (typep (fdefinition 'cl:truename) 'generic-function)
(pushnew :gray-streams-truename *features*))
#+abcl
(when (find-symbol (string '#:gray-pathname) '#:gray-streams)
(pushnew :gray-streams-pathname *features*)
(pushnew :gray-streams-truename *features*))
#+(or abcl allegro ccl clasp clisp cmucl ecl genera lispworks mezzano mkcl sicl sbcl)
(pushnew :gray-streams-sequence *features*)
#+(or abcl allegro clasp cmucl ecl genera mezzano mkcl sicl sbcl)
(pushnew :gray-streams-sequence/optional *features*)
#+(or ccl lispworks)
(pushnew :gray-streams-sequence/required *features*)
#+clisp
(pushnew :gray-streams-sequence/key *features*)
#+(or abcl allegro ccl clasp clisp cmucl ecl genera lispworks mezzano mkcl sicl sbcl)
(pushnew :gray-streams-file-position *features*)
#+(or abcl allegro ccl clasp ecl mezzano mkcl sicl sbcl)
(pushnew :gray-streams-file-position/optional *features*)
#+clisp
(pushnew :gray-streams-file-position/required *features*)
#+(or cmucl genera lispworks)
(pushnew :gray-streams-file-position/get *features*)
#+(or cmucl genera lispworks)
(pushnew :gray-streams-file-position/setf *features*)
#+(or abcl clasp cmucl ecl)
(when (find-symbol (string '#:stream-file-length)
#+abcl '#:gray-streams
#+cmucl '#:ext
#+(or clasp ecl) '#:gray)
(pushnew :gray-streams-file-length *features*)
(pushnew :gray-streams-file-length/get *features*))
#+(or ccl mezzano sicl)
(pushnew :gray-streams-file-length *features*)
#+ccl
(pushnew :gray-streams-file-length/optional *features*)
#+(or mezzano sicl)
(pushnew :gray-streams-file-length/get *features*)
#+abcl
(when (find-symbol (string '#:gray-stream-external-format)
'#:gray-streams)
(pushnew :gray-streams-external-format *features*)
(pushnew :gray-streams-external-format/setf *features*))
#+(or ccl clasp)
(progn
(pushnew :gray-streams-external-format *features*)
(pushnew :gray-streams-external-format/setf *features*))
#+abcl
(when (find-symbol (string '#:gray-interactive-stream-p)
'#:gray-streams)
(pushnew :gray-streams-interactive *features*))
#+(or ccl clasp ecl mezzano mkcl sbcl sicl)
(pushnew :gray-streams-interactive *features*)
#+cmucl
(when (typep (fdefinition 'cl:interactive-stream-p) 'generic-function)
(pushnew :gray-streams-interactive *features*))
#+(or abcl ecl)
(when (find-symbol (string '#:stream-line-length)
#+abcl '#:gray-streams
#+ecl '#:gray)
(pushnew :gray-streams-line-length *features*))
#+(or ccl clasp cmucl mezzano lispworks sbcl sicl)
(pushnew :gray-streams-line-length *features*))
(defpackage #:nontrivial-gray-streams
(:use #:common-lisp)
(:nicknames :ngray)
#+(or ccl clasp ecl mkcl)
(:shadow #+(or clasp ecl mkcl)
#:interactive-stream-p
#+ccl
#:pathname)
(:import-from #+abcl #:gray-streams
#+allegro #:excl
#+ccl #:ccl
#+clasp #:gray
#+clisp #:gray
#+cmucl #:ext
#+ecl #:gray
#+genera #:gray-streams
#+lispworks #:stream
#+mezzano #:mezzano.gray
#+mkcl #:gray
#+sicl #:cyclosis
#+sbcl #:sb-gray
#:fundamental-binary-input-stream
#:fundamental-binary-output-stream
#:fundamental-binary-stream
#:fundamental-character-input-stream
#:fundamental-character-output-stream
#:fundamental-character-stream
#:fundamental-input-stream
#:fundamental-output-stream
#:fundamental-stream
#:stream-advance-to-column
#:stream-clear-input
#:stream-clear-output
#+gray-streams-external-format
#:stream-external-format
#+(and gray-streams-file-length
(not ccl))
#:stream-file-length
#+(and gray-streams-file-position
(not (or ccl clisp)))
#:stream-file-position
#+ccl
#:stream-filename
#:stream-finish-output
#:stream-force-output
#:stream-fresh-line
#+(or clasp ecl mkcl)
#:stream-interactive-p
#+ccl
#:stream-length
#:stream-line-column
#+gray-streams-line-length
#:stream-line-length
#:stream-listen
#+lispworks
#:stream-output-width
#:stream-peek-char
#+(or ccl clisp)
#:stream-position
#:stream-read-byte
#:stream-read-char
#:stream-read-char-no-hang
#:stream-read-line
#+(and gray-streams-sequence (not ccl))
#:stream-read-sequence
#+ccl
#:stream-read-vector
#:stream-start-line-p
#:stream-terpri
#:stream-unread-char
#:stream-write-byte
#:stream-write-char
#+(and gray-streams-sequence (not ccl))
#:stream-write-sequence
#+ccl
#:stream-write-vector
#:stream-write-string)
(:export #:close
#:fundamental-binary-input-stream
#:fundamental-binary-output-stream
#:fundamental-binary-stream
#:fundamental-character-input-stream
#:fundamental-character-output-stream
#:fundamental-character-stream
#:fundamental-input-stream
#:fundamental-output-stream
#:fundamental-stream
#:input-stream-p
#:open-stream-p
#:output-stream-p
#+gray-streams-pathname
#:pathname
#:stream-advance-to-column
#:stream-clear-input
#:stream-clear-output
#:stream-element-type
#+gray-streams-external-format
#:stream-external-format
#+gray-streams-file-length
#:stream-file-length
#+gray-streams-file-position
#:stream-file-position
#:stream-finish-output
#:stream-force-output
#:stream-fresh-line
#+gray-streams-interactive
#:interactive-stream-p
#:stream-line-column
#+gray-streams-line-length
#:stream-line-length
#:stream-listen
#:stream-peek-char
#:stream-read-byte
#:stream-read-char
#:stream-read-char-no-hang
#:stream-read-line
#+gray-streams-sequence
#:stream-read-sequence
#:stream-start-line-p
#:stream-terpri
#:stream-unread-char
#:stream-write-byte
#:stream-write-char
#+gray-streams-sequence
#:stream-write-sequence
#:stream-write-string
#:streamp
#+gray-streams-truename
#:truename))