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