author | james |
Wed, 09 Apr 2003 14:29:15 +0200 | |
changeset 7182 | 42dce0ee1b98 |
parent 6843 | ef53f65b7364 |
child 7241 | 06359d192b65 |
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 |
4467 | 141 |
"skip count bytes/characters, return the receiver" |
613 | 142 |
|
143 |
"dont know how to unread ..." |
|
144 |
numberToSkip < 0 ifTrue:[ |
|
4467 | 145 |
PositionErrorSignal raiseRequest. |
146 |
^ self |
|
88 | 147 |
]. |
613 | 148 |
numberToSkip timesRepeat:self next |
4467 | 149 |
|
150 |
"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
|
151 |
! |
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 |
skipThroughAll:aCollection |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
154 |
"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
|
155 |
return nil if not found, the receiver otherwise. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
156 |
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
|
157 |
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
|
158 |
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
|
159 |
the redefinition from PositionableStream" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
160 |
|
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
161 |
|buffer l first idx| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
162 |
|
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
163 |
l := aCollection size. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
164 |
first := aCollection at:1. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
165 |
[self atEnd] whileFalse:[ |
3808
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
166 |
buffer isNil ifTrue:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
167 |
buffer := self nextAvailable:l. |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
168 |
]. |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
169 |
buffer = aCollection ifTrue:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
170 |
^ self |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
171 |
]. |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
172 |
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
|
173 |
idx == 0 ifTrue:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
174 |
buffer := nil |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
175 |
] ifFalse:[ |
5a7866138026
set eolMode of stderr & stdout to #crlf under win32
Claus Gittinger <cg@exept.de>
parents:
3173
diff
changeset
|
176 |
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
|
177 |
] |
3173
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
178 |
]. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
179 |
^ nil |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
180 |
|
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 |
|s| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
183 |
s := ReadStream on:'12345678901234567890'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
184 |
s skipThroughAll:'901'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
185 |
s upToEnd |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
186 |
" |
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 |
|s| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
189 |
s := ReadStream on:'12345678901234567890'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
190 |
s skipThroughAll:'1234'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
191 |
s upToEnd |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
192 |
" |
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 |
|s| |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
195 |
s := ReadStream on:'12345678901234567890'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
196 |
s skipThroughAll:'999'. |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
197 |
s atEnd |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
198 |
" |
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 |
"Modified: / 11.1.1997 / 19:09:06 / cg" |
664f2ffa7493
Redefine #skipThroughAll: to not use #position.
Stefan Vogel <sv@exept.de>
parents:
2965
diff
changeset
|
201 |
"Created: / 15.1.1998 / 23:33:37 / stefan" |
1 | 202 |
! ! |
203 |
||
177 | 204 |
!NonPositionableExternalStream methodsFor:'printing & storing'! |
205 |
||
206 |
printOn:aStream |
|
2965 | 207 |
"{ Pragma: +optSpace }" |
208 |
||
4392 | 209 |
"append a user printed representation of the receiver to aStream. |
210 |
The format is suitable for a human - not meant to be read back." |
|
177 | 211 |
|
2965 | 212 |
|myName| |
213 |
||
177 | 214 |
self == Stdin ifTrue:[ |
4392 | 215 |
myName := 'Stdin'. |
2965 | 216 |
] ifFalse:[ |
4392 | 217 |
self == Stdout ifTrue:[ |
218 |
myName := 'Stdout'. |
|
219 |
] ifFalse:[ |
|
220 |
self == Stderr ifTrue:[ |
|
221 |
myName := 'Stderr'. |
|
222 |
] |
|
223 |
] |
|
177 | 224 |
]. |
2965 | 225 |
|
226 |
myName notNil ifTrue:[ |
|
4392 | 227 |
aStream nextPutAll:myName. |
228 |
^ self |
|
177 | 229 |
]. |
230 |
super printOn:aStream |
|
231 |
! |
|
232 |
||
233 |
storeOn:aStream |
|
2965 | 234 |
"{ Pragma: +optSpace }" |
235 |
||
213 | 236 |
"append a printed representation of the receiver on aStream, from |
237 |
which the receiver can be reconstructed." |
|
177 | 238 |
|
239 |
((self == Stdin) |
|
240 |
or:[self == Stdout |
|
241 |
or:[self == Stderr]]) ifTrue:[ |
|
242 |
^ self printOn:aStream |
|
243 |
]. |
|
244 |
super storeOn:aStream |
|
245 |
! ! |
|
246 |
||
613 | 247 |
!NonPositionableExternalStream methodsFor:'private'! |
360 | 248 |
|
5407 | 249 |
handleForStderr |
250 |
"{ Pragma: +optSpace }" |
|
251 |
||
252 |
"return a stderr handle" |
|
253 |
||
254 |
%{ |
|
255 |
RETURN ( __MKOBJ(stderr) ); |
|
256 |
%} |
|
257 |
! |
|
258 |
||
259 |
handleForStdin |
|
260 |
"{ Pragma: +optSpace }" |
|
261 |
||
262 |
"return a stdin handle" |
|
263 |
||
264 |
%{ |
|
265 |
RETURN ( __MKOBJ(stdin) ); |
|
266 |
%} |
|
267 |
! |
|
268 |
||
269 |
handleForStdout |
|
270 |
"{ Pragma: +optSpace }" |
|
271 |
||
272 |
"return a stdout handle" |
|
273 |
||
274 |
%{ |
|
275 |
RETURN ( __MKOBJ(stdout) ); |
|
276 |
%} |
|
277 |
! |
|
278 |
||
613 | 279 |
initializeForStderr |
2965 | 280 |
"{ Pragma: +optSpace }" |
281 |
||
613 | 282 |
"setup for writing to stderr" |
269 | 283 |
|
613 | 284 |
mode := #readwrite. |
285 |
buffered := false. |
|
5407 | 286 |
filePointer := self handleForStderr. |
287 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
288 |
eolMode := #crlf |
|
289 |
] |
|
613 | 290 |
! |
1 | 291 |
|
292 |
initializeForStdin |
|
2965 | 293 |
"{ Pragma: +optSpace }" |
294 |
||
44 | 295 |
"setup for reading stdin" |
296 |
||
1 | 297 |
mode := #readonly. |
6843
ef53f65b7364
stdout/err must not be buffered (sending prompts without NL)
Claus Gittinger <cg@exept.de>
parents:
5918
diff
changeset
|
298 |
"/ buffered := true. |
ef53f65b7364
stdout/err must not be buffered (sending prompts without NL)
Claus Gittinger <cg@exept.de>
parents:
5918
diff
changeset
|
299 |
buffered := false. |
5407 | 300 |
filePointer := self handleForStdin. |
1 | 301 |
! |
302 |
||
303 |
initializeForStdout |
|
2965 | 304 |
"{ Pragma: +optSpace }" |
305 |
||
44 | 306 |
"setup for writing to stdout" |
307 |
||
1 | 308 |
mode := #readwrite. |
10 | 309 |
buffered := false. |
5407 | 310 |
filePointer := self handleForStdout. |
311 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
312 |
eolMode := #crlf |
|
313 |
] |
|
1 | 314 |
! |
315 |
||
316 |
reOpen |
|
2965 | 317 |
"{ Pragma: +optSpace }" |
318 |
||
44 | 319 |
"reopen the stream after an image restart. |
320 |
If I am one of the standard streams, reopen is easy" |
|
1 | 321 |
|
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
322 |
(self == StdInStream) ifTrue:[ |
177 | 323 |
^ self initializeForStdin |
1 | 324 |
]. |
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
325 |
(self == StdOutStream) ifTrue:[ |
177 | 326 |
^ self initializeForStdout |
1 | 327 |
]. |
477
8710aba7876b
oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents:
475
diff
changeset
|
328 |
(self == StdErrorStream) ifTrue:[ |
177 | 329 |
^ self initializeForStderr |
1 | 330 |
]. |
331 |
^ super reOpen |
|
332 |
! ! |
|
613 | 333 |
|
334 |
!NonPositionableExternalStream methodsFor:'queries'! |
|
335 |
||
5851
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
336 |
atEnd |
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
337 |
"return true, if position is at end" |
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
338 |
|
5918 | 339 |
(self == StdInStream) ifTrue:[ |
340 |
OperatingSystem hasConsole ifFalse:[ |
|
341 |
^ true |
|
342 |
] |
|
343 |
]. |
|
344 |
||
5851
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
345 |
"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
|
346 |
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
|
347 |
|
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
348 |
self readWait. |
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
349 |
^ super atEnd. |
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
350 |
! |
6823cc642d60
only do readWait for pipes and sockets.
Claus Gittinger <cg@exept.de>
parents:
5407
diff
changeset
|
351 |
|
4962
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
352 |
current |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
353 |
"for compatibility with Transcript - allow Transcript current, |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
354 |
even if redirected to the standardError" |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
355 |
|
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
356 |
self == Transcript ifTrue:[ |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
357 |
^ self |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
358 |
]. |
0023029d2522
allow Transcript current if Transcript is stdErr
Stefan Vogel <sv@exept.de>
parents:
4559
diff
changeset
|
359 |
^ super current |
5407 | 360 |
! |
361 |
||
362 |
isPositionable |
|
363 |
"return true, if the stream supports positioning (this one is not)" |
|
364 |
||
365 |
^ false |
|
613 | 366 |
! ! |
367 |
||
1295 | 368 |
!NonPositionableExternalStream class methodsFor:'documentation'! |
369 |
||
370 |
version |
|
6843
ef53f65b7364
stdout/err must not be buffered (sending prompts without NL)
Claus Gittinger <cg@exept.de>
parents:
5918
diff
changeset
|
371 |
^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.42 2002-11-11 09:29:46 cg Exp $' |
1295 | 372 |
! ! |