.
authorclaus
Wed, 03 May 1995 01:55:59 +0200
changeset 333 18e7d5971e16
parent 332 3326b1c813c8
child 334 885080385f59
.
ArrColl.st
ArrayedCollection.st
Character.st
Class.st
Date.st
--- a/ArrColl.st	Tue May 02 20:16:56 1995 +0200
+++ b/ArrColl.st	Wed May 03 01:55:59 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/ArrColl.st,v 1.16 1995-03-08 23:36:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ArrColl.st,v 1.17 1995-05-02 23:55:26 claus Exp $
 '!
 
 !ArrayedCollection class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/ArrColl.st,v 1.16 1995-03-08 23:36:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ArrColl.st,v 1.17 1995-05-02 23:55:26 claus Exp $
 "
 !
 
@@ -256,9 +256,7 @@
 	^ self
     ].
 
-    aStream nextPutAll:'(('.
-    aStream nextPutAll:self class name.
-    aStream nextPutAll:' new:'.
+    aStream nextPutAll:'(('; nextPutAll:self class name; nextPutAll:' new:'.
     self size printOn:aStream.
     aStream nextPutAll:')'.
     index := 1.
--- a/ArrayedCollection.st	Tue May 02 20:16:56 1995 +0200
+++ b/ArrayedCollection.st	Wed May 03 01:55:59 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.16 1995-03-08 23:36:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.17 1995-05-02 23:55:26 claus Exp $
 '!
 
 !ArrayedCollection class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.16 1995-03-08 23:36:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.17 1995-05-02 23:55:26 claus Exp $
 "
 !
 
@@ -256,9 +256,7 @@
 	^ self
     ].
 
-    aStream nextPutAll:'(('.
-    aStream nextPutAll:self class name.
-    aStream nextPutAll:' new:'.
+    aStream nextPutAll:'(('; nextPutAll:self class name; nextPutAll:' new:'.
     self size printOn:aStream.
     aStream nextPutAll:')'.
     index := 1.
--- a/Character.st	Tue May 02 20:16:56 1995 +0200
+++ b/Character.st	Wed May 03 01:55:59 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Character.st,v 1.17 1995-05-01 21:28:36 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Character.st,v 1.18 1995-05-02 23:55:39 claus Exp $
 '!
 
 !Character class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Character.st,v 1.17 1995-05-01 21:28:36 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Character.st,v 1.18 1995-05-02 23:55:39 claus Exp $
 "
 !
 
@@ -745,24 +745,27 @@
 storeOn:aStream
     "store myself on aStream"
 
+    |special|
+
     (asciivalue between:33 and:127) ifFalse:[
 	(self == Character space) ifTrue:[
-	    aStream nextPutAll:'(Character space)'.
-	    ^ self
+	    special := '(Character space)'
+	] ifFalse:[
+	    (self == Character cr) ifTrue:[
+	        special := '(Character cr)'.
+	    ] ifFalse:[
+		(self == Character tab) ifTrue:[
+	            special := '(Character tab)'.
+		]
+	    ]
 	].
-	(self == Character cr) ifTrue:[
-	    aStream nextPutAll:'(Character cr)'.
+	special notNil ifTrue:[
+	    aStream nextPutAll:special.
 	    ^ self
 	].
-	(self == Character tab) ifTrue:[
-	    aStream nextPutAll:'(Character tab)'.
-	    ^ self
-	].
-	aStream nextPutAll:'(Character value:'.
-	aStream nextPutAll:(asciivalue printString).
-	aStream nextPutAll:')'
+	aStream nextPutAll:'(Character value:'; 
+		nextPutAll:(asciivalue printString); nextPutAll:')'
     ] ifTrue:[
-	aStream nextPut:$$.
-	aStream nextPut:self
+	aStream nextPut:$$; nextPut:self
     ]
 ! !
--- a/Class.st	Tue May 02 20:16:56 1995 +0200
+++ b/Class.st	Wed May 03 01:55:59 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Class.st,v 1.40 1995-05-01 21:28:45 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Class.st,v 1.41 1995-05-02 23:55:45 claus Exp $
 '!
 
 !Class class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Class.st,v 1.40 1995-05-01 21:28:45 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Class.st,v 1.41 1995-05-02 23:55:45 claus Exp $
 "
 !
 
@@ -1581,15 +1581,15 @@
 fileOutCommentOn:aStream
     "append an expression on aStream, which defines my comment"
 
-    |comment|
-
-    aStream nextPutAll:name.
-    aStream nextPutAll:' comment:'.
+    |comment s|
+
+    aStream nextPutAll:name; nextPutAll:' comment:'.
     (comment := self comment) isNil ifTrue:[
-	aStream nextPutAll:''''''
+	s := ''''''
     ] ifFalse:[
-	aStream nextPutAll:(comment storeString)
+	s := comment storeString
     ].
+    aStream nextPutAll:s
     aStream cr
 !
 
@@ -1664,10 +1664,11 @@
     aStream crTab.
     aStream nextPutAll:' category:'.
     category isNil ifTrue:[
-	aStream nextPutAll:''''''
+	s := ''''''
     ] ifFalse:[
-	aStream nextPutAll:(category asString storeString)
+	s := category asString storeString
     ].
+    aStream nextPutAll:s.
     aStream cr
 !
 
@@ -1682,8 +1683,7 @@
     "
     (s := self primitiveDefinitionsString) notNil ifTrue:[
 	aStream nextPut:sep; 
-		nextPutAll:name;
-		nextPutAll:' primitiveDefinitions';
+		nextPutAll:name; nextPutAll:' primitiveDefinitions';
 		nextPut:sep;
 		cr.
 	aStream nextPutAll:s.
@@ -1691,8 +1691,7 @@
     ].
     (s := self primitiveVariablesString) notNil ifTrue:[
 	aStream nextPut:sep; 
-		nextPutAll:name;
-		nextPutAll:' primitiveVariables';
+		nextPutAll:name; nextPutAll:' primitiveVariables';
 		nextPut:sep;
 		cr.
 	aStream nextPutAll:s.
@@ -1715,8 +1714,7 @@
     (s := self primitiveFunctionsString) notNil ifTrue:[
 	sep := aStream class chunkSeparator.
 	aStream nextPut:sep; 
-		nextPutAll:name;
-		nextPutAll:' primitiveFunctions';
+		nextPutAll:name; nextPutAll:' primitiveFunctions';
 		nextPut:sep;
 		cr.
 	aStream nextPutAll:s.
@@ -1733,14 +1731,12 @@
 
     "mhmh - good idea; saw this in SmallDraw sourcecode ..."
 
-    aStream cr; cr.
-    aStream nextPut:(Character doubleQuote); cr.
+    aStream cr; cr; nextPut:(Character doubleQuote); cr.
     aStream space; 
 	    nextPutAll:'The following class instance variables are inherited by this class:';
 	    cr; cr.
     self allSuperclassesDo:[:aSuperClass |
-	aStream tab; nextPutAll:aSuperClass name; 
-		nextPutAll:' - '.
+	aStream tab; nextPutAll:aSuperClass name; nextPutAll:' - '.
 	aStream nextPutAll:(aSuperClass class instanceVariableString); cr.
     ].
     aStream nextPut:(Character doubleQuote); cr.
@@ -1766,8 +1762,7 @@
 	    aCategory notNil ifTrue:[
 		aStream nextPutAll:aCategory
 	    ].
-	    aStream nextPut:$'. aStream nextPut:sep. aStream cr.
-	    aStream cr.
+	    aStream nextPut:$'; nextPut:sep; cr; cr.
 	    count := 1.
 	    methodArray do:[:aMethod |
 		(aCategory = aMethod category) ifTrue:[
@@ -1778,8 +1773,7 @@
 			aStream nextChunkPut:(aMethod source).
 		    ].
 		    (count ~~ nMethods) ifTrue:[
-			aStream cr.
-			aStream cr
+			aStream cr; cr
 		    ].
 		    count := count + 1
 		]
@@ -1805,10 +1799,7 @@
 	cat notNil ifTrue:[
 	    aStream nextPutAll:cat
 	].
-	aStream nextPut:$'.
-	aStream nextPut:sep.
-	aStream cr.
-	aStream cr.
+	aStream nextPut:$'; nextPut:sep; cr; cr.
 	source := aMethod source.
 	source isNil ifTrue:[
 	    FileOutErrorSignal 
@@ -1863,36 +1854,31 @@
     "
     aStream nextPutAll:(Smalltalk timeStamp).
     aStream nextPut:sep. 
-    aStream cr.
-    aStream cr.
+    aStream cr; cr.
 
     "
      then the definition
     "
     self fileOutDefinitionOn:aStream.
     aStream nextPut:sep. 
-    aStream cr.
-    aStream cr.
+    aStream cr; cr.
     "
      optional classInstanceVariables
     "
     self class instanceVariableString isBlank ifFalse:[
 	self fileOutClassInstVarDefinitionOn:aStream.
 	aStream nextPut:sep. 
-	aStream cr.
-	aStream cr
+	aStream cr; cr
     ].
 
     "
      a comment - if any
     "
     (comment := self comment) notNil ifTrue:[
-	aStream nextPutAll:name.
-	aStream nextPutAll:' comment:'.
+	aStream nextPutAll:name; nextPutAll:' comment:'.
 	aStream nextPutAll:(comment storeString).
 	aStream nextPut:sep.
-	aStream cr.
-	aStream cr
+	aStream cr; cr
     ].
 
     "
@@ -2107,8 +2093,7 @@
      otherwise my name without -class followed by space-class"
 
     self isMeta ifTrue:[
-	aStream nextPutAll:(name copyTo:(name size - 5)).
-	aStream nextPutAll:' class'
+	aStream nextPutAll:(name copyTo:(name size - 5)); nextPutAll:' class'
     ] ifFalse:[
 	name printOn:aStream
     ]
@@ -2187,8 +2172,7 @@
 	indent := (superclass printHierarchyAnswerIndentOn:aStream) + 2
     ].
     aStream spaces:indent.
-    aStream nextPutAll:name.
-    aStream nextPutAll:' ('.
+    aStream nextPutAll:name; nextPutAll:' ('.
     self printInstVarNamesOn:aStream indent:(indent + name size + 2).
     aStream nextPutAll:')'.
     aStream cr.
@@ -2200,11 +2184,7 @@
      recursively calls itself to print subclasses. 
      Can be used to print hierarchy on the printer."
 
-    aStream spaces:indent.
-    aStream bold.
-    aStream nextPutAll:name.
-    aStream normal.
-    aStream nextPutAll:' ('.
+    aStream spaces:indent; bold; nextPutAll:name; normal; nextPutAll:' ('.
     self printInstVarNamesOn:aStream indent:(indent + name size + 2).
     aStream nextPutAll:')'.
     aStream cr.
@@ -2222,20 +2202,16 @@
 printOutDefinitionOn:aPrintStream
     "print out my definition"
 
-    |comment|
-
-    aPrintStream nextPutAll:'class                '.
-    aPrintStream bold.
-    aPrintStream nextPutAll:name.
-    aPrintStream normal.
-    aPrintStream cr. 
-
+    |comment s|
+
+    aPrintStream nextPutAll:'class                '; bold; nextPutAll:name; normal; cr. 
     aPrintStream nextPutAll:'superclass           '.
     superclass isNil ifTrue:[
-	aPrintStream nextPutAll:'Object'
+	s := 'Object'
     ] ifFalse:[
-	aPrintStream nextPutAll:(superclass name)
+	s := superclass name
     ].
+    aPrintStream nextPutAll:s.
     aPrintStream cr. 
 
     aPrintStream nextPutAll:'instance Variables   '.
@@ -2247,19 +2223,12 @@
     aPrintStream cr.
 
     category notNil ifTrue:[
-	aPrintStream nextPutAll:'category             '.
-	aPrintStream nextPutAll:(category printString).
+	aPrintStream nextPutAll:'category             '; nextPutAll:(category printString).
 	aPrintStream cr
     ].
 
     (comment := self comment) notNil ifTrue:[
-	aPrintStream cr.
-	aPrintStream nextPutAll:'comment:'.
-	aPrintStream cr.
-	aPrintStream italic.
-	aPrintStream nextPutAll:comment.
-	aPrintStream normal.
-	aPrintStream cr
+	aPrintStream cr; nextPutAll:'comment:'; cr; italic; nextPutAll:comment; normal; cr
     ]
 !
 
@@ -2346,13 +2315,11 @@
 	     aPrintStream italic.
 	     aPrintStream nextPutAll:aCategory.
 	     aPrintStream normal.
-	     aPrintStream cr.
-	     aPrintStream cr.
+	     aPrintStream cr; cr.
 	     methodArray do:[:aMethod |
 		 (aCategory = aMethod category) ifTrue:[
 		     self printOutSource:(aMethod source) on:aPrintStream.
-		     aPrintStream cr.
-		     aPrintStream cr
+		     aPrintStream cr; cr
 		 ]
 	     ].
 	     aPrintStream cr
@@ -2364,12 +2331,13 @@
     "print out all methods on aPrintStream which should be a printStream"
 
     |collectionOfCategories|
+
     self printOutDefinitionOn:aPrintStream.
     aPrintStream cr.
     collectionOfCategories := self class categories.
     collectionOfCategories notNil ifTrue:[
 	aPrintStream nextPutAll:'class protocol'.
-	aPrintStream cr. aPrintStream cr.
+	aPrintStream cr; cr.
 	collectionOfCategories do:[:aCategory |
 	    self class printOutCategory:aCategory on:aPrintStream
 	]
@@ -2377,7 +2345,7 @@
     collectionOfCategories := self categories.
     collectionOfCategories notNil ifTrue:[
 	aPrintStream nextPutAll:'instance protocol'.
-	aPrintStream cr. aPrintStream cr.
+	aPrintStream cr; cr.
 	collectionOfCategories do:[:aCategory |
 	    self printOutCategory:aCategory on:aPrintStream
 	]
@@ -2398,14 +2366,12 @@
 	    aPrintStream italic.
 	    aPrintStream nextPutAll:aCategory.
 	    aPrintStream normal.
-	    aPrintStream cr.
-	    aPrintStream cr.
+	    aPrintStream cr; cr.
 	    methodArray do:[:aMethod |
 		(aCategory = aMethod category) ifTrue:[
 		    self printOutSourceProtocol:aMethod
 					     on:aPrintStream.
-		    aPrintStream cr.
-		    aPrintStream cr
+		    aPrintStream cr; cr
 		]
 	    ].
 	    aPrintStream cr
@@ -2420,7 +2386,7 @@
     collectionOfCategories := self class categories.
     collectionOfCategories notNil ifTrue:[
 	aPrintStream nextPutAll:'class protocol'.
-	aPrintStream cr. aPrintStream cr.
+	aPrintStream cr; cr.
 	collectionOfCategories do:[:aCategory |
 	    self class printOutCategoryProtocol:aCategory on:aPrintStream
 	]
@@ -2428,7 +2394,7 @@
     collectionOfCategories := self categories.
     collectionOfCategories notNil ifTrue:[
 	aPrintStream nextPutAll:'instance protocol'.
-	aPrintStream cr. aPrintStream cr.
+	aPrintStream cr; cr.
 	collectionOfCategories do:[:aCategory |
 	    self printOutCategoryProtocol:aCategory on:aPrintStream
 	]
--- a/Date.st	Tue May 02 20:16:56 1995 +0200
+++ b/Date.st	Wed May 03 01:55:59 1995 +0200
@@ -22,7 +22,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Date.st,v 1.19 1995-05-01 21:29:12 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Date.st,v 1.20 1995-05-02 23:55:59 claus Exp $
 '!
 
 !Date class methodsFor:'documentation'!
@@ -43,7 +43,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Date.st,v 1.19 1995-05-01 21:29:12 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Date.st,v 1.20 1995-05-02 23:55:59 claus Exp $
 "
 !
 
@@ -1055,8 +1055,7 @@
     "append a representation to aStream, from which the receiver
      can be reconstructed"
 
-    aStream nextPutAll:'('.
-    aStream nextPutAll:'Date day:'.
+    aStream nextPutAll:'('; nextPutAll:'Date day:'.
     self day printOn:aStream.
     aStream nextPutAll:' month:'.
     self month printOn:aStream.
@@ -1064,7 +1063,9 @@
     self year printOn:aStream.
     aStream nextPutAll:')'
 
-    "Date today storeOn:Transcript"
+    "
+     Date today storeOn:Transcript
+    "
 !
 
 printOn:aStream
@@ -1076,6 +1077,8 @@
     aStream nextPutAll:'-'.
     self year printOn:aStream
 
-    "Date today printOn:Transcript"
+    "
+     Date today printOn:Transcript
+    "
     "Date today printNL"
 ! !