author | Stefan Vogel <sv@exept.de> |
Thu, 28 Oct 1999 01:58:45 +0200 | |
changeset 4962 | 0023029d2522 |
parent 4559 | 7b454e1d1265 |
child 5407 | d6729266a95b |
permissions | -rw-r--r-- |
1 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
177 | 3 |
All Rights Reserved |
1 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
1344
32a51164b237
No longer a subclass of UnboundedExternalStream, now subclass of ExternalStream.
Stefan Vogel <sv@exept.de>
parents:
1295
diff
changeset
|
13 |
ExternalStream subclass:#NonPositionableExternalStream |
1295 | 14 |
instanceVariableNames:'' |
15 |
classVariableNames:'StdInStream StdOutStream StdErrorStream' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Streams-External' |
|
1 | 18 |
! |
19 |
||
613 | 20 |
!NonPositionableExternalStream primitiveDefinitions! |
21 |
%{ |
|
2896 | 22 |
|
613 | 23 |
#include <stdio.h> |
24 |
#define _STDIO_H_INCLUDED_ |
|
3956
51f1a9a4d63f
changes for egcs (stdio uses __new / utsname)
Claus Gittinger <cg@exept.de>
parents:
3808
diff
changeset
|
25 |
|
613 | 26 |
%} |
27 |
||
28 |
! ! |
|
29 |
||
88 | 30 |
!NonPositionableExternalStream class methodsFor:'documentation'! |
31 |
||
32 |
copyright |
|
33 |
" |
|
34 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
177 | 35 |
All Rights Reserved |
88 | 36 |
|
37 |
This software is furnished under a license and may be used |
|
38 |
only in accordance with the terms of that license and with the |
|
39 |
inclusion of the above copyright notice. This software may not |
|
40 |
be provided or otherwise made available to, or used by, any |
|
41 |
other person. No title to or ownership of the software is |
|
42 |
hereby transferred. |
|
43 |
" |
|
44 |
! |
|
45 |
||
46 |
documentation |
|
47 |
" |
|
48 |
This class provides common protocol for all non-positionable, |
|
49 |
external streams. Concrete subclasses are terminal streams, pipe streams, |
|
50 |
PrinterStreams, Sockets etc. |
|
51 |
||
52 |
There are three special instances of this class, representing stdin, |
|
53 |
stdout and stderr of the smalltalk/X process (see Unix manuals, if you |
|
177 | 54 |
dont know what those are used for). These special streams are bound to |
55 |
to globals Stdin, Stdout and Stderr at early initialization time |
|
56 |
(see Smalltalk>>initializeStandardStreams). |
|
159 | 57 |
|
58 |
The name of this class is a historical leftover - it should be called |
|
59 |
'TTYStream' or similar. |
|
1295 | 60 |
|
61 |
[author:] |
|
3808
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
62 |
Claus Gittinger |
88 | 63 |
" |
216 | 64 |
! ! |
65 |
||
1 | 66 |
!NonPositionableExternalStream class methodsFor:'instance creation'! |
67 |
||
613 | 68 |
forStderr |
2965 | 69 |
"{ Pragma: +optSpace }" |
70 |
||
613 | 71 |
"return a NonPositionableExternalStream object for writing to |
72 |
Unixes standard error output file descriptor" |
|
73 |
||
74 |
StdErrorStream isNil ifTrue:[ |
|
75 |
StdErrorStream := self basicNew initializeForStderr |
|
76 |
]. |
|
77 |
^ StdErrorStream |
|
78 |
! |
|
79 |
||
1 | 80 |
forStdin |
2965 | 81 |
"{ Pragma: +optSpace }" |
82 |
||
44 | 83 |
"return a NonPositionableExternalStream object for reading from |
84 |
Unixes standard input file descriptor" |
|
85 |
||
88 | 86 |
StdInStream isNil ifTrue:[ |
177 | 87 |
StdInStream := self basicNew initializeForStdin |
88 | 88 |
]. |
89 |
^ StdInStream |
|
1 | 90 |
! |
91 |
||
92 |
forStdout |
|
2965 | 93 |
"{ Pragma: +optSpace }" |
94 |
||
44 | 95 |
"return a NonPositionableExternalStream object for writing to |
96 |
Unixes standard output file descriptor" |
|
97 |
||
88 | 98 |
StdOutStream isNil ifTrue:[ |
177 | 99 |
StdOutStream := self basicNew initializeForStdout |
88 | 100 |
]. |
101 |
^ StdOutStream |
|
613 | 102 |
! ! |
103 |
||
104 |
!NonPositionableExternalStream methodsFor:'error handling'! |
|
105 |
||
106 |
positionError |
|
2965 | 107 |
"{ Pragma: +optSpace }" |
108 |
||
613 | 109 |
"notify that this stream has no concept of a position" |
110 |
||
4559 | 111 |
^ PositionErrorSignal raiseRequestWith:self |
112 |
||
113 |
" |
|
114 |
Stderr positionError |
|
115 |
" |
|
613 | 116 |
! ! |
117 |
||
118 |
!NonPositionableExternalStream methodsFor:'positioning'! |
|
119 |
||
120 |
position |
|
2965 | 121 |
"{ Pragma: +optSpace }" |
122 |
||
613 | 123 |
"catch position - there is none here" |
124 |
||
125 |
^ self positionError |
|
1 | 126 |
! |
127 |
||
613 | 128 |
position:aPosition |
2965 | 129 |
"{ Pragma: +optSpace }" |
130 |
||
613 | 131 |
"catch position - there is none here" |
132 |
||
133 |
^ self positionError |
|
134 |
! |
|
44 | 135 |
|
613 | 136 |
skip:numberToSkip |
4467 | 137 |
"skip count bytes/characters, return the receiver" |
613 | 138 |
|
139 |
"dont know how to unread ..." |
|
140 |
numberToSkip < 0 ifTrue:[ |
|
4467 | 141 |
PositionErrorSignal raiseRequest. |
142 |
^ self |
|
88 | 143 |
]. |
613 | 144 |
numberToSkip timesRepeat:self next |
4467 | 145 |
|
146 |
"Modified: / 30.7.1999 / 12:42:12 / cg" |
|
3173
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
147 |
! |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
148 |
|
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
149 |
skipThroughAll:aCollection |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
150 |
"skip for and through the sequence given by the argument, aCollection; |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
151 |
return nil if not found, the receiver otherwise. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
152 |
On a successful match, the next read will return elements after aCollection; |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
153 |
if no match was found, the receiver will be positioned at the end. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
154 |
Redefined to be the same as Stream>>#skipThroughAll, to undo |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
155 |
the redefinition from PositionableStream" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
156 |
|
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
157 |
|buffer l first idx| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
158 |
|
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
159 |
l := aCollection size. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
160 |
first := aCollection at:1. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
161 |
[self atEnd] whileFalse:[ |
3808
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
162 |
buffer isNil ifTrue:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
163 |
buffer := self nextAvailable:l. |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
164 |
]. |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
165 |
buffer = aCollection ifTrue:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
166 |
^ self |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
167 |
]. |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
168 |
idx := buffer indexOf:first startingAt:2. |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
169 |
idx == 0 ifTrue:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
170 |
buffer := nil |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
171 |
] ifFalse:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
172 |
buffer := (buffer copyFrom:idx) , (self nextAvailable:(idx - 1)) |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
173 |
] |
3173
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
174 |
]. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
175 |
^ nil |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
176 |
|
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
177 |
" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
178 |
|s| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
179 |
s := ReadStream on:'12345678901234567890'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
180 |
s skipThroughAll:'901'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
181 |
s upToEnd |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
182 |
" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
183 |
" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
184 |
|s| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
185 |
s := ReadStream on:'12345678901234567890'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
186 |
s skipThroughAll:'1234'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
187 |
s upToEnd |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
188 |
" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
189 |
" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
190 |
|s| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
191 |
s := ReadStream on:'12345678901234567890'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
192 |
s skipThroughAll:'999'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
193 |
s atEnd |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
194 |
" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
195 |
|
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
196 |
"Modified: / 11.1.1997 / 19:09:06 / cg" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
197 |
"Created: / 15.1.1998 / 23:33:37 / stefan" |
1 | 198 |
! ! |
199 |
||
177 | 200 |
!NonPositionableExternalStream methodsFor:'printing & storing'! |
201 |
||
202 |
printOn:aStream |
|
2965 | 203 |
"{ Pragma: +optSpace }" |
204 |
||
4392 | 205 |
"append a user printed representation of the receiver to aStream. |
206 |
The format is suitable for a human - not meant to be read back." |
|
177 | 207 |
|
2965 | 208 |
|myName| |
209 |
||
177 | 210 |
self == Stdin ifTrue:[ |
4392 | 211 |
myName := 'Stdin'. |
2965 | 212 |
] ifFalse:[ |
4392 | 213 |
self == Stdout ifTrue:[ |
214 |
myName := 'Stdout'. |
|
215 |
] ifFalse:[ |
|
216 |
self == Stderr ifTrue:[ |
|
217 |
myName := 'Stderr'. |
|
218 |
] |
|
219 |
] |
|
177 | 220 |
]. |
2965 | 221 |
|
222 |
myName notNil ifTrue:[ |
|
4392 | 223 |
aStream nextPutAll:myName. |
224 |
^ self |
|
177 | 225 |
]. |
226 |
super printOn:aStream |
|
227 |
! |
|
228 |
||
229 |
storeOn:aStream |
|
2965 | 230 |
"{ Pragma: +optSpace }" |
231 |
||
213 | 232 |
"append a printed representation of the receiver on aStream, from |
233 |
which the receiver can be reconstructed." |
|
177 | 234 |
|
235 |
((self == Stdin) |
|
236 |
or:[self == Stdout |
|
237 |
or:[self == Stderr]]) ifTrue:[ |
|
238 |
^ self printOn:aStream |
|
239 |
]. |
|
240 |
super storeOn:aStream |
|
241 |
! ! |
|
242 |
||
613 | 243 |
!NonPositionableExternalStream methodsFor:'private'! |
360 | 244 |
|
613 | 245 |
initializeForStderr |
2965 | 246 |
"{ Pragma: +optSpace }" |
247 |
||
613 | 248 |
"setup for writing to stderr" |
269 | 249 |
|
613 | 250 |
mode := #readwrite. |
251 |
buffered := false. |
|
252 |
%{ |
|
253 |
OBJ fp; |
|
269 | 254 |
|
1133 | 255 |
__INST(filePointer) = fp = __MKOBJ(stderr); __STORE(self, fp); |
3808
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
256 |
#ifdef WIN32 |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
257 |
__INST(eolMode) = @symbol(crlf); |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
258 |
#else |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
259 |
# ifdef xxx__VMS__ /* XXX: to be tested */ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
260 |
__INST(eolMode) = @symbol(cr); |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
261 |
# endif |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
262 |
#endif |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
263 |
|
613 | 264 |
%} |
265 |
! |
|
1 | 266 |
|
267 |
initializeForStdin |
|
2965 | 268 |
"{ Pragma: +optSpace }" |
269 |
||
44 | 270 |
"setup for reading stdin" |
271 |
||
1 | 272 |
mode := #readonly. |
10 | 273 |
buffered := true. |
1 | 274 |
%{ |
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
275 |
OBJ fp; |
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
276 |
|
1133 | 277 |
__INST(filePointer) = fp = __MKOBJ(stdin); __STORE(self, fp); |
1 | 278 |
%} |
279 |
! |
|
280 |
||
281 |
initializeForStdout |
|
2965 | 282 |
"{ Pragma: +optSpace }" |
283 |
||
44 | 284 |
"setup for writing to stdout" |
285 |
||
1 | 286 |
mode := #readwrite. |
10 | 287 |
buffered := false. |
1 | 288 |
%{ |
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
289 |
OBJ fp; |
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
290 |
|
1133 | 291 |
__INST(filePointer) = fp = __MKOBJ(stdout); __STORE(self, fp); |
3808
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
292 |
#ifdef WIN32 |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
293 |
__INST(eolMode) = @symbol(crlf); |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
294 |
#else |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
295 |
# ifdef xxx__VMS__ /* XXX: to be tested */ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
296 |
__INST(eolMode) = @symbol(cr); |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
297 |
# endif |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
298 |
#endif |
1 | 299 |
%} |
300 |
! |
|
301 |
||
302 |
reOpen |
|
2965 | 303 |
"{ Pragma: +optSpace }" |
304 |
||
44 | 305 |
"reopen the stream after an image restart. |
306 |
If I am one of the standard streams, reopen is easy" |
|
1 | 307 |
|
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
308 |
(self == StdInStream) ifTrue:[ |
177 | 309 |
^ self initializeForStdin |
1 | 310 |
]. |
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
311 |
(self == StdOutStream) ifTrue:[ |
177 | 312 |
^ self initializeForStdout |
1 | 313 |
]. |
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
314 |
(self == StdErrorStream) ifTrue:[ |
177 | 315 |
^ self initializeForStderr |
1 | 316 |
]. |
317 |
^ super reOpen |
|
318 |
! ! |
|
613 | 319 |
|
320 |
!NonPositionableExternalStream methodsFor:'queries'! |
|
321 |
||
322 |
isPositionable |
|
323 |
"return true, if the stream supports positioning (this one is not)" |
|
324 |
||
325 |
^ false |
|
4962
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
326 |
! |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
327 |
|
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
328 |
current |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
329 |
"for compatibility with Transcript - allow Transcript current, |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
330 |
even if redirected to the standardError" |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
331 |
|
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
332 |
self == Transcript ifTrue:[ |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
333 |
^ self |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
334 |
]. |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
335 |
^ super current |
613 | 336 |
! ! |
337 |
||
1295 | 338 |
!NonPositionableExternalStream class methodsFor:'documentation'! |
339 |
||
340 |
version |
|
4962
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
341 |
^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.38 1999-10-27 23:58:45 stefan Exp $' |
1295 | 342 |
! ! |