MultiReadStream.st
changeset 2654 b6e04b9a3500
parent 2463 cbb5fd7ae437
child 2655 2cb26ee25173
--- a/MultiReadStream.st	Mon Sep 26 11:52:45 2011 +0200
+++ b/MultiReadStream.st	Mon Sep 26 17:26:51 2011 +0200
@@ -105,15 +105,36 @@
     "/ thats depatable !!
     "/ the code below only makes sense, if we see the multiStream as some kind of
     "/ macro-expanding c-define stream
+
+    streamStack isEmptyOrNil ifTrue:[
+        ^ self pastEndRead
+    ].
     ^ streamStack first position
 
     "Created: / 21-05-2010 / 14:52:40 / cg"
 !
 
+position0Based
+    "/ thats depatable !!
+    "/ the code below only makes sense, if we see the multiStream as some kind of
+    "/ macro-expanding c-define stream
+
+    streamStack isEmptyOrNil ifTrue:[
+        ^ self pastEndRead
+    ].
+    ^ streamStack first position0Based
+
+    "Created: / 21-05-2010 / 14:52:40 / cg"
+!
+
 position1Based
     "/ thats depatable !!
     "/ the code below only makes sense, if we see the multiStream as some kind of
     "/ macro-expanding c-define stream
+
+    streamStack isEmptyOrNil ifTrue:[
+        ^ self pastEndRead
+    ].
     ^ streamStack first position1Based
 
     "Created: / 21-05-2010 / 14:52:40 / cg"
@@ -145,5 +166,5 @@
 !MultiReadStream class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/MultiReadStream.st,v 1.3 2010-07-11 17:21:36 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/MultiReadStream.st,v 1.4 2011-09-26 15:26:51 stefan Exp $'
 ! !