chunk stuff moved to superclass (did not need positioning)
authorClaus Gittinger <cg@exept.de>
Wed, 03 Mar 2004 22:11:13 +0100
changeset 8053 4d37ece7b9f7
parent 8052 4ca96b117b21
child 8054 7f31b0651027
chunk stuff moved to superclass (did not need positioning)
PositionableStream.st
--- a/PositionableStream.st	Wed Mar 03 22:10:11 2004 +0100
+++ b/PositionableStream.st	Wed Mar 03 22:11:13 2004 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -220,109 +222,6 @@
     writeLimit := aNumber
 ! !
 
-!PositionableStream methodsFor:'chunk input/output'!
-
-nextChunkPut:aString
-    "put aString as a chunk onto the receiver;
-     double all exclamation marks except within primitives and append a 
-     single delimiting exclamation mark at the end.
-     This modification of the chunk format (not doubling exclas in primitive code)
-     was done to have primitive code more readable and easier be edited in the fileBrowser
-     or other editors.
-     Its no incompatibility, since inline primitives are an ST/X special
-     and code containing ST/X primitives cannot be loaded into other smalltalks anyway."
-
-    self nextPutAllAsChunk:aString.
-    self nextPut:(self class chunkSeparator)
-
-    "Modified: 9.12.1995 / 15:56:54 / cg"
-!
-
-nextPutAllAsChunk:aString
-    "put aString as a chunk onto the receiver;
-     double all exclamation marks except within primitives.
-     This modification of the chunk format (not doubling exclas in primitive code)
-     was done to have primitive code more readable and easier be edited in the fileBrowser
-     or other editors.
-     Its no incompatibility, since inline primitives are an ST/X special
-     and code containing ST/X primitives cannot be loaded into other smalltalks anyway."
-
-    |sep stopChars inPrimitive character
-     index    "{ Class:SmallInteger }"
-     endIndex "{ Class:SmallInteger }"
-     stop     "{ Class:SmallInteger }"
-     next     "{ Class:SmallInteger }"|
-
-    endIndex := aString size.
-    endIndex == 0 ifTrue:[^ self].
-
-    sep := self class chunkSeparator.
-    stopChars := '{}' copyWith:sep.
-
-    inPrimitive := false.
-    index := 1.
-    stop := endIndex + 1.
-
-    [index <= endIndex] whileTrue:[
-	"
-	 find position of next interesting character; 
-	 output stuff up to that one in one piece
-	"
-	next := aString indexOfAny:stopChars startingAt:index ifAbsent:stop.
-
-	((index == 1) and:[next == stop]) ifTrue:[
-	    self nextPutAll:aString
-	] ifFalse:[
-	    self nextPutAll:aString startingAt:index to:(next - 1)
-	].
-
-	index := next.
-	(index <= endIndex) ifTrue:[
-	    character := aString at:index.
-
-	    (character == ${ ) ifTrue:[
-		"/ starts a primitive
-		((index > 1) and:[(aString at:index-1) == $%]) ifTrue:[
-		    inPrimitive := true
-		]
-	    ] ifFalse:[
-		"/ ends a primitive
-		(character == $} ) ifTrue:[
-		    ((index > 1) and:[(aString at:index-1) == $%]) ifTrue:[
-			inPrimitive := false
-		    ]
-		] ifFalse:[
-		    "/
-		    "/ exclas have to be doubled - except if within a primitive
-		    "/
-		    inPrimitive ifFalse:[
-			(character == sep) ifTrue:[
-			    self nextPut:sep
-			]
-		    ]
-		]
-	    ].
-
-	    self nextPut:character.
-	    index := index + 1.
-	].
-    ].
-    (aString endsWith:Character cr) ifFalse:[
-	self cr.
-    ].
-
-    "Modified: / 21.4.1998 / 17:22:47 / cg"
-    "/ foo
-!
-
-nextPutChunkSeparator
-    "append a chunk separator character"
-
-    self nextPut:(self class chunkSeparator)
-
-    "Created: 13.9.1995 / 17:39:26 / claus"
-! !
-
 !PositionableStream methodsFor:'fileIn'!
 
 askForDebug:message
@@ -1214,7 +1113,7 @@
 !PositionableStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.137 2003-11-11 08:39:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.138 2004-03-03 21:11:13 cg Exp $'
 ! !
 
 PositionableStream initialize!