#FEATURE
class: ReadEvalPrintLoop
changed:
#errorStream
#inputStream
#outputStream
redirectable as per thread
--- a/ReadEvalPrintLoop.st Sun Mar 20 10:52:54 2016 +0100
+++ b/ReadEvalPrintLoop.st Sun Mar 20 10:54:07 2016 +0100
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libbasic' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#ReadEvalPrintLoop
instanceVariableNames:'inputStream outputStream errorStream compiler prompt
doChunkFormat traceFlag timingFlag printFlag exitAction
@@ -92,9 +94,10 @@
errorStream
"return the current error stream"
- ^ errorStream ? Stderr
+ errorStream notNil ifTrue:[^ errorStream].
+ ^ Processor activeProcess stderr
- "Created: / 07-12-2006 / 19:11:56 / cg"
+ "Created: / 07-12-2006 / 19:12:27 / cg"
!
input:aStream
@@ -108,7 +111,8 @@
inputStream
"get the current input stream"
- ^ inputStream ? Stdin
+ inputStream notNil ifTrue:[^ inputStream].
+ ^ Processor activeProcess stdin
"Created: / 07-12-2006 / 19:12:13 / cg"
!
@@ -122,9 +126,10 @@
!
outputStream
- "return the current outpt stream"
+ "return the current output stream"
- ^ outputStream ? Stdout
+ outputStream notNil ifTrue:[^ outputStream].
+ ^ Processor activeProcess stdout
"Created: / 07-12-2006 / 19:12:27 / cg"
!
@@ -594,9 +599,10 @@
!ReadEvalPrintLoop class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.54 2014-06-10 10:41:05 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.54 2014-06-10 10:41:05 cg Exp $'
+ ^ '$Header$'
! !
+