(none)
authorclaus
Wed, 15 Feb 1995 11:25:20 +0100
changeset 252 cf6eef7703ad
parent 251 e8c6965f2d64
child 253 30daee717a53
(none)
Make.proto
Process.st
ReadStr.st
ReadStream.st
SeqColl.st
SequenceableCollection.st
Set.st
SmallInt.st
SmallInteger.st
String.st
Symbol.st
SysDict.st
Unix.st
WeakIdSet.st
WeakIdentitySet.st
WriteStr.st
WriteStream.st
--- a/Make.proto	Wed Feb 15 11:24:35 1995 +0100
+++ b/Make.proto	Wed Feb 15 11:25:20 1995 +0100
@@ -1,4 +1,4 @@
-# $Header: /cvs/stx/stx/libbasic/Make.proto,v 1.21 1995-02-11 16:42:24 claus Exp $
+# $Header: /cvs/stx/stx/libbasic/Make.proto,v 1.22 1995-02-15 10:25:20 claus Exp $
 #
 # -------------- no need to change anything below ----------
 
@@ -55,7 +55,7 @@
 	      Delay.$(O)                                  \
 	      Exception.$(O)                              \
 	      ExecFunc.$(O)                               \
-		ExecCode.$(O)                             \
+		CompCode.$(O)                             \
 		  Block.$(O)                              \
 		    CheapBlk.$(O)                         \
 		  Method.$(O)                             \
@@ -195,10 +195,10 @@
 Context.$(O):      Context.st $(OBJECT)
 BContext.$(O):     BContext.st $(I)/Context.H $(OBJECT)
 ExecFunc.$(O):     ExecFunc.st $(OBJECT)
-ExecCode.$(O):     ExecCode.st $(I)/ExecFunc.H $(OBJECT)
-Method.$(O):       Method.st $(I)/ExecCode.H $(I)/ExecFunc.H $(OBJECT)
-Block.$(O):        Block.st $(I)/ExecCode.H $(I)/ExecFunc.H $(OBJECT)
-CheapBlk.$(O):     CheapBlk.st $(I)/Block.H $(I)/ExecCode.H $(I)/ExecFunc.H $(OBJECT)
+CompCode.$(O):     CompCode.st $(I)/ExecFunc.H $(OBJECT)
+Method.$(O):       Method.st $(I)/CompCode.H $(I)/ExecFunc.H $(OBJECT)
+Block.$(O):        Block.st $(I)/CompCode.H $(I)/ExecFunc.H $(OBJECT)
+CheapBlk.$(O):     CheapBlk.st $(I)/Block.H $(I)/CompCode.H $(I)/ExecFunc.H $(OBJECT)
 BlckContext.$(O):  BlckContext.st $(OBJECT)
 
 Signal.$(O):       Signal.st $(OBJECT)
--- a/Process.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/Process.st	Wed Feb 15 11:25:20 1995 +0100
@@ -24,7 +24,7 @@
 COPYRIGHT (c) 1992 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Process.st,v 1.19 1995-02-02 12:25:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Process.st,v 1.20 1995-02-15 10:24:43 claus Exp $
 '!
 
 !Process class methodsFor:'documentation'!
@@ -45,7 +45,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Process.st,v 1.19 1995-02-02 12:25:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Process.st,v 1.20 1995-02-15 10:24:43 claus Exp $
 "
 !
 
@@ -372,7 +372,7 @@
     extern OBJ __threadContext();
     OBJ i;
 
-    if (_isSmallInteger(i = _INST(id))) {
+    if (__isSmallInteger(i = _INST(id))) {
 	RETURN (__threadContext(_intVal(i)));
     }
 %}.
@@ -388,7 +388,7 @@
     extern int __threadMaxStackSize();
     OBJ i;
 
-    if (_isSmallInteger(i = _INST(id))) {
+    if (__isSmallInteger(i = _INST(id))) {
 	RETURN( _MKSMALLINT(__threadMaxStackSize(_intVal(i))) );
     }
 %}.
@@ -405,8 +405,8 @@
     extern int __threadSetMaxStackSize();
     OBJ i;
 
-    if (_isSmallInteger(i = _INST(id)) 
-     && _isSmallInteger(limit) ) {
+    if (__isSmallInteger(i = _INST(id)) 
+     && __isSmallInteger(limit) ) {
 	RETURN ( _MKSMALLINT(__threadSetMaxStackSize(_intVal(i), _intVal(limit))) );
     }
 %}.
@@ -423,7 +423,7 @@
     extern int __threadUsedStackSize();
     OBJ i;
 
-    if (_isSmallInteger(i = _INST(id))) {
+    if (__isSmallInteger(i = _INST(id))) {
 	RETURN( _MKSMALLINT(__threadUsedStackSize(_intVal(i))) );
     }
 %}.
@@ -438,7 +438,7 @@
     extern int __threadTotalStackSize();
     OBJ i;
 
-    if (_isSmallInteger(i = _INST(id))) {
+    if (__isSmallInteger(i = _INST(id))) {
 	RETURN( _MKSMALLINT(__threadTotalStackSize(_intVal(i))) );
     }
 %}.
@@ -453,7 +453,7 @@
     extern int __threadTotalStackSize();
     OBJ i;
 
-    if (_isSmallInteger(i = _INST(id))) {
+    if (__isSmallInteger(i = _INST(id))) {
 	RETURN( _MKSMALLINT(__threadStackSegments(_intVal(i))) );
     }
 %}.
--- a/ReadStr.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/ReadStr.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/ReadStr.st,v 1.10 1994-11-17 14:17:59 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ReadStr.st,v 1.11 1995-02-15 10:24:48 claus Exp $
 '!
 
 !ReadStream class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/ReadStr.st,v 1.10 1994-11-17 14:17:59 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ReadStr.st,v 1.11 1995-02-15 10:24:48 claus Exp $
 "
 !
 
@@ -74,16 +74,17 @@
     REGISTER int pos;
     unsigned ch;
     OBJ coll;
-    OBJ cls;
+    OBJ cls, p, l;
     extern OBJ ByteArray;
 
     coll = _INST(collection);
-    if (_isNonNilObject(coll)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    p = _INST(position);
+    l = _INST(readLimit);
 
-	pos = _intVal(_INST(position));
-	if (pos > _intVal(_INST(readLimit))) {
+    if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	if (pos > _intVal(l)) {
 	    RETURN ( nil );
 	}
 
@@ -123,15 +124,16 @@
 
     REGISTER int pos;
     unsigned ch;
-    OBJ coll;
+    OBJ coll, p, l;
 
     coll = _INST(collection);
-    if (_isNonNilObject(coll)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    p = _INST(position);
+    l = _INST(readLimit);
 
-	pos = _intVal(_INST(position));
-	if (pos > _intVal(_INST(readLimit))) {
+    if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	if (pos > _intVal(l)) {
 	    RETURN ( nil );
 	}
 	if (pos > 0) {
@@ -172,17 +174,18 @@
      - tuned for speed on String-Streams for faster scanning"
 
 %{  /* NOCONTEXT */
-    OBJ coll;
+    OBJ coll, l, p;
 
     coll = _INST(collection);
-    if (__isString(coll)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
 	REGISTER int pos;
 	unsigned ch;
 
-	pos = _intVal(_INST(position));
-	if (pos > _intVal(_INST(readLimit))) {
+	pos = _intVal(p);
+	if (pos > _intVal(l)) {
 	    RETURN ( nil );
 	}
 	if ((pos > 0) && (pos <= _stringSize(coll))) {
@@ -213,16 +216,20 @@
     REGISTER unsigned char *cp;
     REGISTER unsigned ch;
     int val = 0;
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
-	pos = _intVal(_INST(position));
-	limit = _intVal(_INST(readLimit));
-	sz = _qSize(_INST(collection)) - OHDR_SIZE;
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+    
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	limit = _intVal(l);
+	sz = _qSize(coll) - OHDR_SIZE;
 	if (sz < limit)
 	    limit = sz; 
-	cp = _stringVal(_INST(collection)) + pos - 1;
+	cp = _stringVal(coll) + pos - 1;
 
 	for (;;) {
 	    if (pos > limit) break;
@@ -254,6 +261,10 @@
 !
 
 nextWord
+    ^ self nextAlphaNumericWord
+!
+
+nextAlphaNumericWord
     "read the next word (i.e. up to non letter-or-digit).
      return a string containing those characters.
      - tuned for speed on String-Streams for faster scanning"
@@ -265,16 +276,20 @@
     char buffer[256];
     REGISTER unsigned char *cp;
     REGISTER unsigned ch;
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
-	pos = _intVal(_INST(position));
-	limit = _intVal(_INST(readLimit));
-	sz = _qSize(_INST(collection)) - OHDR_SIZE;
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+    
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	limit = _intVal(l);
+	sz = _qSize(coll) - OHDR_SIZE;
 	if (sz < limit)
 	    limit = sz; 
-	cp = _stringVal(_INST(collection)) + pos - 1;
+	cp = _stringVal(coll) + pos - 1;
 
 	for (;;) {
 	    if (pos > limit) break;
@@ -311,7 +326,7 @@
     }
 %}
 .
-    ^ super nextWord
+    ^ super nextAlphaNumericWord
 !
 
 nextSymbol
@@ -324,16 +339,20 @@
     char buffer[256];
     REGISTER unsigned char *cp;
     REGISTER unsigned ch;
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
-	pos = _intVal(_INST(position));
-	limit = _intVal(_INST(readLimit));
-	sz = _qSize(_INST(collection)) - OHDR_SIZE;
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	limit = _intVal(l);
+	sz = _qSize(coll) - OHDR_SIZE;
 	if (sz < limit)
 	    limit = sz; 
-	cp = _stringVal(_INST(collection)) + pos - 1;
+	cp = _stringVal(coll) + pos - 1;
 
 	len = 0;
 	for (;;) {
@@ -370,24 +389,26 @@
      - reimplemented for speed on String-Streams for faster scanning"
 
 %{  /* NOCONTEXT */
-    OBJ coll;
+    OBJ coll, p, l;
 
     coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
     if (__isString(coll)
      && __isCharacter(anObject)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+     && __bothSmallInteger(p, l)) {
 	REGISTER unsigned char *chars;
 	REGISTER int pos, limit;
 	unsigned ch;
 	int sz;
 
-	pos = _intVal(_INST(position));
+	pos = _intVal(p);
 	if (pos <= 0) {
 	    RETURN ( nil );
 	}
 
-	limit = _intVal(_INST(readLimit));
+	limit = _intVal(l);
 	sz = _stringSize(coll);
 	if (limit > sz) limit = sz;
 
@@ -416,25 +437,28 @@
      - reimplemented for speed on String-Streams for faster scanning"
 
 %{  /* NOCONTEXT */
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
 	REGISTER unsigned char *chars;
 	REGISTER unsigned ch;
 	REGISTER int pos;
 	int limit;
 
-	pos = _intVal(_INST(position));
+	pos = _intVal(p);
 	if (pos <= 0) {
 	    RETURN ( nil );
 	}
 
-	limit = _intVal(_INST(readLimit));
-	if (limit > (_qSize(_INST(collection)) - OHDR_SIZE))
-	    limit = _qSize(_INST(collection)) - OHDR_SIZE;
+	limit = _intVal(l);
+	if (limit > (_qSize(coll) - OHDR_SIZE))
+	    limit = _qSize(coll) - OHDR_SIZE;
 
-	chars = (unsigned char *)(_stringVal(_INST(collection)) + pos - 1);
+	chars = (unsigned char *)(_stringVal(coll) + pos - 1);
 	while (pos <= limit) {
 	    ch = *chars++;
 	    if ((ch != ' ') && (ch != '\t') && (ch != '\r')
@@ -459,24 +483,28 @@
 
 %{  /* NOCONTEXT */
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    OBJ coll, p, l;
+
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
 	REGISTER unsigned char *chars;
 	REGISTER unsigned ch;
 	REGISTER int pos;
 	int limit;
 
-	pos = _intVal(_INST(position));
+	pos = _intVal(p);
 	if (pos <= 0) {
 	    RETURN ( nil );
 	}
 
-	limit = _intVal(_INST(readLimit));
-	if (limit > (_qSize(_INST(collection)) - OHDR_SIZE))
-	    limit = _qSize(_INST(collection)) - OHDR_SIZE;
+	limit = _intVal(l);
+	if (limit > (_qSize(coll) - OHDR_SIZE))
+	    limit = _qSize(coll) - OHDR_SIZE;
 
-	chars = (unsigned char *)(_stringVal(_INST(collection)) + pos - 1);
+	chars = (unsigned char *)(_stringVal(coll) + pos - 1);
 	while (pos <= limit) {
 	    ch = *chars++;
 	    if ((ch != ' ') && (ch != '\t') && (ch != '\r') && (ch != 0x0B)) {
--- a/ReadStream.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/ReadStream.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.10 1994-11-17 14:17:59 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.11 1995-02-15 10:24:48 claus Exp $
 '!
 
 !ReadStream class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.10 1994-11-17 14:17:59 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.11 1995-02-15 10:24:48 claus Exp $
 "
 !
 
@@ -74,16 +74,17 @@
     REGISTER int pos;
     unsigned ch;
     OBJ coll;
-    OBJ cls;
+    OBJ cls, p, l;
     extern OBJ ByteArray;
 
     coll = _INST(collection);
-    if (_isNonNilObject(coll)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    p = _INST(position);
+    l = _INST(readLimit);
 
-	pos = _intVal(_INST(position));
-	if (pos > _intVal(_INST(readLimit))) {
+    if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	if (pos > _intVal(l)) {
 	    RETURN ( nil );
 	}
 
@@ -123,15 +124,16 @@
 
     REGISTER int pos;
     unsigned ch;
-    OBJ coll;
+    OBJ coll, p, l;
 
     coll = _INST(collection);
-    if (_isNonNilObject(coll)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    p = _INST(position);
+    l = _INST(readLimit);
 
-	pos = _intVal(_INST(position));
-	if (pos > _intVal(_INST(readLimit))) {
+    if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	if (pos > _intVal(l)) {
 	    RETURN ( nil );
 	}
 	if (pos > 0) {
@@ -172,17 +174,18 @@
      - tuned for speed on String-Streams for faster scanning"
 
 %{  /* NOCONTEXT */
-    OBJ coll;
+    OBJ coll, l, p;
 
     coll = _INST(collection);
-    if (__isString(coll)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
 	REGISTER int pos;
 	unsigned ch;
 
-	pos = _intVal(_INST(position));
-	if (pos > _intVal(_INST(readLimit))) {
+	pos = _intVal(p);
+	if (pos > _intVal(l)) {
 	    RETURN ( nil );
 	}
 	if ((pos > 0) && (pos <= _stringSize(coll))) {
@@ -213,16 +216,20 @@
     REGISTER unsigned char *cp;
     REGISTER unsigned ch;
     int val = 0;
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
-	pos = _intVal(_INST(position));
-	limit = _intVal(_INST(readLimit));
-	sz = _qSize(_INST(collection)) - OHDR_SIZE;
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+    
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	limit = _intVal(l);
+	sz = _qSize(coll) - OHDR_SIZE;
 	if (sz < limit)
 	    limit = sz; 
-	cp = _stringVal(_INST(collection)) + pos - 1;
+	cp = _stringVal(coll) + pos - 1;
 
 	for (;;) {
 	    if (pos > limit) break;
@@ -254,6 +261,10 @@
 !
 
 nextWord
+    ^ self nextAlphaNumericWord
+!
+
+nextAlphaNumericWord
     "read the next word (i.e. up to non letter-or-digit).
      return a string containing those characters.
      - tuned for speed on String-Streams for faster scanning"
@@ -265,16 +276,20 @@
     char buffer[256];
     REGISTER unsigned char *cp;
     REGISTER unsigned ch;
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
-	pos = _intVal(_INST(position));
-	limit = _intVal(_INST(readLimit));
-	sz = _qSize(_INST(collection)) - OHDR_SIZE;
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+    
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	limit = _intVal(l);
+	sz = _qSize(coll) - OHDR_SIZE;
 	if (sz < limit)
 	    limit = sz; 
-	cp = _stringVal(_INST(collection)) + pos - 1;
+	cp = _stringVal(coll) + pos - 1;
 
 	for (;;) {
 	    if (pos > limit) break;
@@ -311,7 +326,7 @@
     }
 %}
 .
-    ^ super nextWord
+    ^ super nextAlphaNumericWord
 !
 
 nextSymbol
@@ -324,16 +339,20 @@
     char buffer[256];
     REGISTER unsigned char *cp;
     REGISTER unsigned ch;
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
-	pos = _intVal(_INST(position));
-	limit = _intVal(_INST(readLimit));
-	sz = _qSize(_INST(collection)) - OHDR_SIZE;
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
+
+	pos = _intVal(p);
+	limit = _intVal(l);
+	sz = _qSize(coll) - OHDR_SIZE;
 	if (sz < limit)
 	    limit = sz; 
-	cp = _stringVal(_INST(collection)) + pos - 1;
+	cp = _stringVal(coll) + pos - 1;
 
 	len = 0;
 	for (;;) {
@@ -370,24 +389,26 @@
      - reimplemented for speed on String-Streams for faster scanning"
 
 %{  /* NOCONTEXT */
-    OBJ coll;
+    OBJ coll, p, l;
 
     coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
     if (__isString(coll)
      && __isCharacter(anObject)
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+     && __bothSmallInteger(p, l)) {
 	REGISTER unsigned char *chars;
 	REGISTER int pos, limit;
 	unsigned ch;
 	int sz;
 
-	pos = _intVal(_INST(position));
+	pos = _intVal(p);
 	if (pos <= 0) {
 	    RETURN ( nil );
 	}
 
-	limit = _intVal(_INST(readLimit));
+	limit = _intVal(l);
 	sz = _stringSize(coll);
 	if (limit > sz) limit = sz;
 
@@ -416,25 +437,28 @@
      - reimplemented for speed on String-Streams for faster scanning"
 
 %{  /* NOCONTEXT */
+    OBJ coll, p, l;
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
 	REGISTER unsigned char *chars;
 	REGISTER unsigned ch;
 	REGISTER int pos;
 	int limit;
 
-	pos = _intVal(_INST(position));
+	pos = _intVal(p);
 	if (pos <= 0) {
 	    RETURN ( nil );
 	}
 
-	limit = _intVal(_INST(readLimit));
-	if (limit > (_qSize(_INST(collection)) - OHDR_SIZE))
-	    limit = _qSize(_INST(collection)) - OHDR_SIZE;
+	limit = _intVal(l);
+	if (limit > (_qSize(coll) - OHDR_SIZE))
+	    limit = _qSize(coll) - OHDR_SIZE;
 
-	chars = (unsigned char *)(_stringVal(_INST(collection)) + pos - 1);
+	chars = (unsigned char *)(_stringVal(coll) + pos - 1);
 	while (pos <= limit) {
 	    ch = *chars++;
 	    if ((ch != ' ') && (ch != '\t') && (ch != '\r')
@@ -459,24 +483,28 @@
 
 %{  /* NOCONTEXT */
 
-    if (__isString(_INST(collection))
-     && _isSmallInteger(_INST(position))
-     && _isSmallInteger(_INST(readLimit))) {
+    OBJ coll, p, l;
+
+    coll = _INST(collection);
+    p = _INST(position);
+    l = _INST(readLimit);
+
+    if (__isString(coll) && __bothSmallInteger(p, l)) {
 	REGISTER unsigned char *chars;
 	REGISTER unsigned ch;
 	REGISTER int pos;
 	int limit;
 
-	pos = _intVal(_INST(position));
+	pos = _intVal(p);
 	if (pos <= 0) {
 	    RETURN ( nil );
 	}
 
-	limit = _intVal(_INST(readLimit));
-	if (limit > (_qSize(_INST(collection)) - OHDR_SIZE))
-	    limit = _qSize(_INST(collection)) - OHDR_SIZE;
+	limit = _intVal(l);
+	if (limit > (_qSize(coll) - OHDR_SIZE))
+	    limit = _qSize(coll) - OHDR_SIZE;
 
-	chars = (unsigned char *)(_stringVal(_INST(collection)) + pos - 1);
+	chars = (unsigned char *)(_stringVal(coll) + pos - 1);
 	while (pos <= limit) {
 	    ch = *chars++;
 	    if ((ch != ' ') && (ch != '\t') && (ch != '\r') && (ch != 0x0B)) {
--- a/SeqColl.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/SeqColl.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/SeqColl.st,v 1.19 1995-02-11 14:08:54 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/SeqColl.st,v 1.20 1995-02-15 10:24:52 claus Exp $
 '!
 
 !SequenceableCollection class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/SeqColl.st,v 1.19 1995-02-11 14:08:54 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/SeqColl.st,v 1.20 1995-02-15 10:24:52 claus Exp $
 "
 !
 
@@ -268,8 +268,7 @@
     otherSize := aCollection size.
     newSize := mySize + otherSize.
 
-    newCollection := self copyEmpty:newSize.
-    newCollection grow:newSize.   "must grow, otherwise replace fails"
+    newCollection := self copyEmptyAndGrow:newSize.   "must grow, otherwise replace fails"
 
     newCollection replaceFrom:1 to:mySize with:self startingAt:1.
     dstIndex := mySize + 1.
@@ -311,7 +310,7 @@
 
     mySize := self size.
     newSize := mySize + 1.
-    newCollection := (self copyEmpty:newSize) grow:newSize.
+    newCollection := self copyEmptyAndGrow:newSize.
     newCollection replaceFrom:1 to:mySize with:self startingAt:1.
     newCollection at:newSize put:newElement.
     ^newCollection
@@ -335,7 +334,7 @@
     (skipIndex == 0) ifTrue:[^ self copy].
 
     sz := self size - 1.
-    copy := (self copyEmpty:sz) grow:sz.
+    copy := self copyEmptyAndGrow:sz.
     copy replaceFrom:1 to:(skipIndex - 1) with:self startingAt:1.
     copy replaceFrom:skipIndex to:sz with:self startingAt:(skipIndex + 1).
     ^ copy
@@ -363,7 +362,7 @@
     n == 0 ifTrue:[^ self copy].
 
     sz := self size.
-    copy := (self copyEmpty:(sz - n)) grow:(sz - n).
+    copy := self copyEmptyAndGrow:(sz - n).
 
     srcIndex := 1.
     dstIndex := 1.
@@ -403,7 +402,7 @@
     |copy sz|
 
     sz := self size - 1.
-    copy := (self copyEmpty:sz) grow:sz.
+    copy := self copyEmptyAndGrow:sz.
     copy replaceFrom:1 
 		  to:(omitIndex - 1) 
 		with:self 
@@ -427,7 +426,7 @@
     |newCollection newSize|
 
     newSize := stop - start + 1.
-    newCollection := (self copyEmpty:newSize) grow:newSize.
+    newCollection := self copyEmptyAndGrow:newSize.
     newCollection replaceFrom:1 to:newSize with:self startingAt:start.
     ^ newCollection
 
@@ -548,7 +547,7 @@
 
     replSize := aCollection size.
     sz := self size - (endIndex - startIndex + 1) + replSize.
-    newColl := (self copyEmpty:sz) grow:sz.
+    newColl := self copyEmptyAndGrow:sz.
     newColl replaceFrom:1 to:(startIndex - 1) with:self.
     newColl replaceFrom:startIndex with:aCollection.
     newColl replaceFrom:(startIndex + replSize) with:self startingAt:(endIndex + 1).
@@ -1085,6 +1084,30 @@
     "
 !
 
+indexOf:elementToFind replaceWith:replacement startingAt:start stoppingAt:stop
+    "search for the first occurence of elementToFind starting at start,
+     stopping the search at stop. If found, replace the element by replacement
+     and return the index.
+     If not found, return 0."
+
+    |idx|
+
+    idx := self indexOf:elementToFind startingAt:start.
+    ((idx > 0) and:[idx <= stop]) ifTrue:[
+	self at:idx put:replacement.
+	^ idx
+    ].
+    ^ 0
+
+    "
+     |a|
+
+     a := #(10 20 30 40 50 60 70).
+     (a indexOf:30 replaceWith:nil startingAt:1 stoppingAt:7) printNL.
+     a printNL.
+    "
+!
+
 identityIndexOf:anElement
     "search the collection for anElement using identity compare (i.e. ==);
      if found, return the index otherwise return 0."
@@ -1637,7 +1660,7 @@
      sz  "{ Class:SmallInteger }"|
 
     sz := self size.
-    newCollection := (self copyEmpty:sz) grow:sz.
+    newCollection := self copyEmptyAndGrow:sz.
     1 to:sz do:[:index |
 	newCollection at:index put:(aBlock value:(self at:index)).
     ].
@@ -1658,7 +1681,7 @@
      idx  "{ Class:SmallInteger }"|
 
     sz := stop - start + 1.
-    newCollection := (self copyEmpty:sz) grow:sz.
+    newCollection := self copyEmptyAndGrow:sz.
     idx := 1.
     start to:stop do:[:index |
 	newCollection at:idx put:(aBlock value:(self at:index)).
@@ -1690,7 +1713,7 @@
     ].
     1 to:sz do:[:index |
 	element := self at:index.
-        (aBlock value:element) ifTrue:[
+	(aBlock value:element) ifTrue:[
 	    newColl add:element
 	].
     ].
--- a/SequenceableCollection.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/SequenceableCollection.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.19 1995-02-11 14:08:54 claus Exp $
+$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.20 1995-02-15 10:24:52 claus Exp $
 '!
 
 !SequenceableCollection class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.19 1995-02-11 14:08:54 claus Exp $
+$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.20 1995-02-15 10:24:52 claus Exp $
 "
 !
 
@@ -268,8 +268,7 @@
     otherSize := aCollection size.
     newSize := mySize + otherSize.
 
-    newCollection := self copyEmpty:newSize.
-    newCollection grow:newSize.   "must grow, otherwise replace fails"
+    newCollection := self copyEmptyAndGrow:newSize.   "must grow, otherwise replace fails"
 
     newCollection replaceFrom:1 to:mySize with:self startingAt:1.
     dstIndex := mySize + 1.
@@ -311,7 +310,7 @@
 
     mySize := self size.
     newSize := mySize + 1.
-    newCollection := (self copyEmpty:newSize) grow:newSize.
+    newCollection := self copyEmptyAndGrow:newSize.
     newCollection replaceFrom:1 to:mySize with:self startingAt:1.
     newCollection at:newSize put:newElement.
     ^newCollection
@@ -335,7 +334,7 @@
     (skipIndex == 0) ifTrue:[^ self copy].
 
     sz := self size - 1.
-    copy := (self copyEmpty:sz) grow:sz.
+    copy := self copyEmptyAndGrow:sz.
     copy replaceFrom:1 to:(skipIndex - 1) with:self startingAt:1.
     copy replaceFrom:skipIndex to:sz with:self startingAt:(skipIndex + 1).
     ^ copy
@@ -363,7 +362,7 @@
     n == 0 ifTrue:[^ self copy].
 
     sz := self size.
-    copy := (self copyEmpty:(sz - n)) grow:(sz - n).
+    copy := self copyEmptyAndGrow:(sz - n).
 
     srcIndex := 1.
     dstIndex := 1.
@@ -403,7 +402,7 @@
     |copy sz|
 
     sz := self size - 1.
-    copy := (self copyEmpty:sz) grow:sz.
+    copy := self copyEmptyAndGrow:sz.
     copy replaceFrom:1 
 		  to:(omitIndex - 1) 
 		with:self 
@@ -427,7 +426,7 @@
     |newCollection newSize|
 
     newSize := stop - start + 1.
-    newCollection := (self copyEmpty:newSize) grow:newSize.
+    newCollection := self copyEmptyAndGrow:newSize.
     newCollection replaceFrom:1 to:newSize with:self startingAt:start.
     ^ newCollection
 
@@ -548,7 +547,7 @@
 
     replSize := aCollection size.
     sz := self size - (endIndex - startIndex + 1) + replSize.
-    newColl := (self copyEmpty:sz) grow:sz.
+    newColl := self copyEmptyAndGrow:sz.
     newColl replaceFrom:1 to:(startIndex - 1) with:self.
     newColl replaceFrom:startIndex with:aCollection.
     newColl replaceFrom:(startIndex + replSize) with:self startingAt:(endIndex + 1).
@@ -1085,6 +1084,30 @@
     "
 !
 
+indexOf:elementToFind replaceWith:replacement startingAt:start stoppingAt:stop
+    "search for the first occurence of elementToFind starting at start,
+     stopping the search at stop. If found, replace the element by replacement
+     and return the index.
+     If not found, return 0."
+
+    |idx|
+
+    idx := self indexOf:elementToFind startingAt:start.
+    ((idx > 0) and:[idx <= stop]) ifTrue:[
+	self at:idx put:replacement.
+	^ idx
+    ].
+    ^ 0
+
+    "
+     |a|
+
+     a := #(10 20 30 40 50 60 70).
+     (a indexOf:30 replaceWith:nil startingAt:1 stoppingAt:7) printNL.
+     a printNL.
+    "
+!
+
 identityIndexOf:anElement
     "search the collection for anElement using identity compare (i.e. ==);
      if found, return the index otherwise return 0."
@@ -1637,7 +1660,7 @@
      sz  "{ Class:SmallInteger }"|
 
     sz := self size.
-    newCollection := (self copyEmpty:sz) grow:sz.
+    newCollection := self copyEmptyAndGrow:sz.
     1 to:sz do:[:index |
 	newCollection at:index put:(aBlock value:(self at:index)).
     ].
@@ -1658,7 +1681,7 @@
      idx  "{ Class:SmallInteger }"|
 
     sz := stop - start + 1.
-    newCollection := (self copyEmpty:sz) grow:sz.
+    newCollection := self copyEmptyAndGrow:sz.
     idx := 1.
     start to:stop do:[:index |
 	newCollection at:idx put:(aBlock value:(self at:index)).
@@ -1690,7 +1713,7 @@
     ].
     1 to:sz do:[:index |
 	element := self at:index.
-        (aBlock value:element) ifTrue:[
+	(aBlock value:element) ifTrue:[
 	    newColl add:element
 	].
     ].
--- a/Set.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/Set.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Set.st,v 1.13 1994-10-10 00:28:14 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Set.st,v 1.14 1995-02-15 10:24:56 claus Exp $
 '!
 
 !Set class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Set.st,v 1.13 1994-10-10 00:28:14 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Set.st,v 1.14 1995-02-15 10:24:56 claus Exp $
 "
 !
 
@@ -106,6 +106,28 @@
     ^ self basicNew setTally:(anInteger * 4 // 3)
 ! !
 
+!Set class methodsFor:'queries'!
+
+goodSizeFrom:arg 
+    "return a good array size for the given argument.
+     Returns the next prime after arg, since prime sizes are good for hashing."
+
+    arg <= 11 ifTrue:[^ 11].
+
+    "
+     mhmh - this returns good numbers for collections with up-to about
+     500k elements; if you have bigger ones, add some more primes here ...
+    "
+    arg <= 524288 ifTrue:[
+	   "2  4  8  16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288"
+	^ #(11 11 11 17 37 67 131 257 521 1031 2053 4099 8209 16411 32771 65537 131101 262147 524309) at:(arg highBit)
+    ].
+    "
+     make it odd - at least
+    "
+    ^ arg bitOr:1
+! !
+
 !Set methodsFor:'copying'!
 
 postCopy
@@ -137,7 +159,7 @@
 !
 
 emptyCheck
-    "check if set has become too empty (after a remove)
+    "check if the receiver has become too empty (after a remove)
      - shrink if filled less than 12.5%"
 
     |sz      "{Class: SmallInteger}"
@@ -152,32 +174,12 @@
     ]
 !
 
-goodSizeFor:arg
-    "return a good array size for the given argument.
-     Returns the next prime after arg, since prime sizes are good for hashing."
-
-    arg <= 11 ifTrue:[^ 11].
-
-    "
-     mhmh - this returns good numbers for collections with up-to about
-     500k elements; if you have bigger ones, add some more primes here ...
-    "
-    arg <= 524288 ifTrue:[
-	   "2  4  8  16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288"
-	^ #(11 11 11 17 37 67 131 257 521 1031 2053 4099 8209 16411 32771 65537 131101 262147 524309) at:(arg highBit)
-    ].
-    "
-     make it odd - at least
-    "
-    ^ arg bitOr:1
-!
-
 setTally:count
     "initialize the contents array (for at least count slots) 
      and set tally to zero.
      The size is increased to the next prime for better hashing behavior."
 
-    keyArray := self keyContainerOfSize:(self goodSizeFor:count). 
+    keyArray := self keyContainerOfSize:(self class goodSizeFrom:count). 
     tally := 0
 !
 
@@ -280,12 +282,15 @@
      empty set)."
 
     |elem oldKeyArray newKeyArray deletedEntry
-     oldSize "{ Class:SmallInteger }"|
+     containerSize oldSize "{ Class:SmallInteger }"|
 
     oldKeyArray := keyArray.
-    keyArray := newKeyArray := self keyContainerOfSize:(self goodSizeFor:newSize). 
+    oldSize := oldKeyArray size.
+    containerSize := (self class goodSizeFrom:newSize).
+    containerSize == oldSize ifTrue:[^ self].
 
-    oldSize := oldKeyArray size.
+    keyArray := newKeyArray := self keyContainerOfSize:containerSize. 
+
     deletedEntry := DeletedEntry.
     1 to:oldSize do:[:srcIndex |
 	elem := oldKeyArray basicAt:srcIndex.
@@ -431,7 +436,7 @@
     keyArray basicAt:index put:nil.
     tally := tally - 1.
     tally == 0 ifTrue:[
-	keyArray := self keyContainerOfSize:(self goodSizeFor:0). 
+	keyArray := self keyContainerOfSize:(self class goodSizeFrom:0). 
     ] ifFalse:[
 	index == keyArray basicSize ifTrue:[
 	    next := 1
--- a/SmallInt.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/SmallInt.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.20 1995-02-05 21:34:09 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.21 1995-02-15 10:24:58 claus Exp $
 '!
 
 !SmallInteger class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.20 1995-02-05 21:34:09 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.21 1995-02-15 10:24:58 claus Exp $
 "
 !
 
@@ -252,7 +252,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) < _intVal(aNumber)) ? true : false );
 #else
@@ -274,7 +274,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) > _intVal(aNumber)) ? true : false );
 #else
@@ -295,7 +295,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) >= _intVal(aNumber)) ? true : false );
 #else
@@ -316,7 +316,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) <= _intVal(aNumber)) ? true : false );
 #else
@@ -344,7 +344,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	if (_intVal(self) < _intVal(aNumber)) {
 #else
@@ -372,7 +372,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	if (_intVal(self) > _intVal(aNumber)) {
 #else
@@ -467,7 +467,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(min) && _isSmallInteger(max)) {
+    if (__bothSmallInteger(min, max)) {
 	REGISTER INT selfVal;
 
 	selfVal = _intVal(self);
@@ -519,7 +519,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef _ADD_IO_IO
 	RETURN ( _ADD_IO_IO(self, aNumber) );
 #else
@@ -551,7 +551,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef _SUB_IO_IO
 	RETURN ( _SUB_IO_IO(self, aNumber) );
 #else
@@ -604,7 +604,7 @@
 # endif
 #endif
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	myValue = _intVal(self);
 	otherValue = _intVal(aNumber);
 #if defined(_LONGLONG)
@@ -747,7 +747,7 @@
     INT me, t, val;
     double dval;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	val = _intVal(aNumber);
 	if (val != 0) {
 	    me = _intVal(self);
@@ -799,7 +799,7 @@
 %{  /* NOCONTEXT */
     INT val;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	val = _intVal(aNumber);
 	if (val != 0) {
 	    RETURN ( _MKSMALLINT(_intVal(self) / val) );
@@ -810,10 +810,10 @@
 	    INT num, den;
 
 	    t = _FractionInstPtr(aNumber)->f_numerator;
-	    if (_isSmallInteger(t)) {
+	    if (__isSmallInteger(t)) {
 		num = _intVal(t);
 		t = _FractionInstPtr(aNumber)->f_denominator;
-		if (_isSmallInteger(t)) {
+		if (__isSmallInteger(t)) {
 		    den = _intVal(t);
 		    RETURN ( _MKSMALLINT(_intVal(self) * den / num ));
 		}
@@ -835,7 +835,7 @@
 %{  /* NOCONTEXT */
     INT mySelf, val;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	mySelf = _intVal(self);
 	if (mySelf < 0) mySelf = -mySelf;
 	val = _intVal(aNumber);
@@ -902,7 +902,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	RETURN ( _MKSMALLINT((_intVal(self) * _intVal(aNumber)) & 0x7FFFFFFF) );
     }
 %}
@@ -920,7 +920,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	RETURN ( _MKSMALLINT((_intVal(self) + _intVal(aNumber)) & 0x7FFFFFFF) );
     }
 %}
@@ -938,7 +938,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	RETURN ( _MKSMALLINT((_intVal(self) - _intVal(aNumber)) & 0x7FFFFFFF) );
     }
 %}
@@ -1081,7 +1081,7 @@
 
     INT bits, count;
 
-    if (_isSmallInteger(shiftCount)) {
+    if (__isSmallInteger(shiftCount)) {
 	count = _intVal(shiftCount);
 	bits = _intVal(self);
 	if (count > 0) {
@@ -1154,7 +1154,7 @@
 %{  /* NOCONTEXT */
 
     /* oring the tags doesn't change it */
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	RETURN ( ((OBJ) ((INT)self | (INT)anInteger)) );
     }
 %}
@@ -1170,7 +1170,7 @@
 %{  /* NOCONTEXT */
 
     /* anding the tags doesn't change it */
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	RETURN ( ((OBJ) ((INT)self & (INT)anInteger)) );
     }
 %}
@@ -1186,7 +1186,7 @@
 %{  /* NOCONTEXT */
 
     /* xoring the tags turns it off - or it in again */
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	RETURN ( (OBJ)( ((INT)self ^ (INT)anInteger) | TAG_INT) );
     }
 %}
@@ -1210,7 +1210,7 @@
 %{  /* NOCONTEXT */
 
     /* and all bits except tag */
-    if (_isSmallInteger(aMask)) {
+    if (__isSmallInteger(aMask)) {
 	RETURN ( ((INT)self & ((INT)aMask & ~TAG_MASK)) ? true : false );
     }
 %}
@@ -1233,7 +1233,7 @@
 
     INT val;
 
-    if (_isSmallInteger(index)) {
+    if (__isSmallInteger(index)) {
 	val = _intVal(self);
 	if (val < 0)
 	    val = -val;
@@ -1278,7 +1278,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	INT orgArg, ttt, selfInt, temp;
 
 	ttt = orgArg = _intVal(anInteger);
@@ -1400,7 +1400,7 @@
     static struct inlineCache blockVal = __ILC1(0);
     REGISTER OBJ rHome;
 
-    if (_isSmallInteger(stop)) {
+    if (__isSmallInteger(stop)) {
 	tmp = _intVal(self);
 	final = _intVal(stop);
 	if (__isBlockLike(aBlock)
@@ -1473,8 +1473,7 @@
     static struct inlineCache blockVal = __ILC1(0);
     REGISTER OBJ rHome;
 
-    if (_isSmallInteger(incr)
-     && _isSmallInteger(stop)) {
+    if (__bothSmallInteger(incr, stop)) {
 	tmp = _intVal(self);
 	final = _intVal(stop);
 	step = _intVal(incr);
@@ -1675,7 +1674,7 @@
     OBJ newString;
     int sz;
 
-    if (_isSmallInteger(radix)) {
+    if (__isSmallInteger(radix)) {
 	switch (_intVal(radix)) {
 	    case 10:
 		format = "%d";
--- a/SmallInteger.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/SmallInteger.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.20 1995-02-05 21:34:09 claus Exp $
+$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.21 1995-02-15 10:24:58 claus Exp $
 '!
 
 !SmallInteger class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.20 1995-02-05 21:34:09 claus Exp $
+$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.21 1995-02-15 10:24:58 claus Exp $
 "
 !
 
@@ -252,7 +252,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) < _intVal(aNumber)) ? true : false );
 #else
@@ -274,7 +274,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) > _intVal(aNumber)) ? true : false );
 #else
@@ -295,7 +295,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) >= _intVal(aNumber)) ? true : false );
 #else
@@ -316,7 +316,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	RETURN ( (_intVal(self) <= _intVal(aNumber)) ? true : false );
 #else
@@ -344,7 +344,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	if (_intVal(self) < _intVal(aNumber)) {
 #else
@@ -372,7 +372,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef POSITIVE_ADDRESSES
 	if (_intVal(self) > _intVal(aNumber)) {
 #else
@@ -467,7 +467,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(min) && _isSmallInteger(max)) {
+    if (__bothSmallInteger(min, max)) {
 	REGISTER INT selfVal;
 
 	selfVal = _intVal(self);
@@ -519,7 +519,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef _ADD_IO_IO
 	RETURN ( _ADD_IO_IO(self, aNumber) );
 #else
@@ -551,7 +551,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 #ifdef _SUB_IO_IO
 	RETURN ( _SUB_IO_IO(self, aNumber) );
 #else
@@ -604,7 +604,7 @@
 # endif
 #endif
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	myValue = _intVal(self);
 	otherValue = _intVal(aNumber);
 #if defined(_LONGLONG)
@@ -747,7 +747,7 @@
     INT me, t, val;
     double dval;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	val = _intVal(aNumber);
 	if (val != 0) {
 	    me = _intVal(self);
@@ -799,7 +799,7 @@
 %{  /* NOCONTEXT */
     INT val;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	val = _intVal(aNumber);
 	if (val != 0) {
 	    RETURN ( _MKSMALLINT(_intVal(self) / val) );
@@ -810,10 +810,10 @@
 	    INT num, den;
 
 	    t = _FractionInstPtr(aNumber)->f_numerator;
-	    if (_isSmallInteger(t)) {
+	    if (__isSmallInteger(t)) {
 		num = _intVal(t);
 		t = _FractionInstPtr(aNumber)->f_denominator;
-		if (_isSmallInteger(t)) {
+		if (__isSmallInteger(t)) {
 		    den = _intVal(t);
 		    RETURN ( _MKSMALLINT(_intVal(self) * den / num ));
 		}
@@ -835,7 +835,7 @@
 %{  /* NOCONTEXT */
     INT mySelf, val;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	mySelf = _intVal(self);
 	if (mySelf < 0) mySelf = -mySelf;
 	val = _intVal(aNumber);
@@ -902,7 +902,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	RETURN ( _MKSMALLINT((_intVal(self) * _intVal(aNumber)) & 0x7FFFFFFF) );
     }
 %}
@@ -920,7 +920,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	RETURN ( _MKSMALLINT((_intVal(self) + _intVal(aNumber)) & 0x7FFFFFFF) );
     }
 %}
@@ -938,7 +938,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	RETURN ( _MKSMALLINT((_intVal(self) - _intVal(aNumber)) & 0x7FFFFFFF) );
     }
 %}
@@ -1081,7 +1081,7 @@
 
     INT bits, count;
 
-    if (_isSmallInteger(shiftCount)) {
+    if (__isSmallInteger(shiftCount)) {
 	count = _intVal(shiftCount);
 	bits = _intVal(self);
 	if (count > 0) {
@@ -1154,7 +1154,7 @@
 %{  /* NOCONTEXT */
 
     /* oring the tags doesn't change it */
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	RETURN ( ((OBJ) ((INT)self | (INT)anInteger)) );
     }
 %}
@@ -1170,7 +1170,7 @@
 %{  /* NOCONTEXT */
 
     /* anding the tags doesn't change it */
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	RETURN ( ((OBJ) ((INT)self & (INT)anInteger)) );
     }
 %}
@@ -1186,7 +1186,7 @@
 %{  /* NOCONTEXT */
 
     /* xoring the tags turns it off - or it in again */
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	RETURN ( (OBJ)( ((INT)self ^ (INT)anInteger) | TAG_INT) );
     }
 %}
@@ -1210,7 +1210,7 @@
 %{  /* NOCONTEXT */
 
     /* and all bits except tag */
-    if (_isSmallInteger(aMask)) {
+    if (__isSmallInteger(aMask)) {
 	RETURN ( ((INT)self & ((INT)aMask & ~TAG_MASK)) ? true : false );
     }
 %}
@@ -1233,7 +1233,7 @@
 
     INT val;
 
-    if (_isSmallInteger(index)) {
+    if (__isSmallInteger(index)) {
 	val = _intVal(self);
 	if (val < 0)
 	    val = -val;
@@ -1278,7 +1278,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	INT orgArg, ttt, selfInt, temp;
 
 	ttt = orgArg = _intVal(anInteger);
@@ -1400,7 +1400,7 @@
     static struct inlineCache blockVal = __ILC1(0);
     REGISTER OBJ rHome;
 
-    if (_isSmallInteger(stop)) {
+    if (__isSmallInteger(stop)) {
 	tmp = _intVal(self);
 	final = _intVal(stop);
 	if (__isBlockLike(aBlock)
@@ -1473,8 +1473,7 @@
     static struct inlineCache blockVal = __ILC1(0);
     REGISTER OBJ rHome;
 
-    if (_isSmallInteger(incr)
-     && _isSmallInteger(stop)) {
+    if (__bothSmallInteger(incr, stop)) {
 	tmp = _intVal(self);
 	final = _intVal(stop);
 	step = _intVal(incr);
@@ -1675,7 +1674,7 @@
     OBJ newString;
     int sz;
 
-    if (_isSmallInteger(radix)) {
+    if (__isSmallInteger(radix)) {
 	switch (_intVal(radix)) {
 	    case 10:
 		format = "%d";
--- a/String.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/String.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/String.st,v 1.24 1995-02-11 14:09:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/String.st,v 1.25 1995-02-15 10:25:02 claus Exp $
 '!
 
 !String class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/String.st,v 1.24 1995-02-11 14:09:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/String.st,v 1.25 1995-02-15 10:25:02 claus Exp $
 "
 !
 
@@ -102,7 +102,7 @@
     int nInstVars, instsize;
     extern OBJ new();
 
-    if (_isSmallInteger(anInteger)) {
+    if (__isSmallInteger(anInteger)) {
 	len = _intVal(anInteger);
 	if (len >= 0) {
 	    if (self == String) {
@@ -224,7 +224,7 @@
     int len;
     OBJ cls;
 
-    if (_isSmallInteger(index)) {
+    if (__isSmallInteger(index)) {
 	indx = _intVal(index);
 	cls = _qClass(self);
 	if (cls != String)
@@ -252,7 +252,7 @@
 	value = _intVal(_characterVal(aCharacter));
 	if ((value > 0) 
 	 && (value <= 255)
-	 && _isSmallInteger(index)) {
+	 && __isSmallInteger(index)) {
 	    indx = _intVal(index);
 	    cls = _qClass(self);
 	    if (cls != String)
@@ -805,7 +805,7 @@
     int len;
     OBJ cls;
 
-    if (_isSmallInteger(start)) {
+    if (__isSmallInteger(start)) {
 	if (__isCharacter(aCharacter)) {
 	    byteValue = _intVal(_characterVal(aCharacter));
 	    index = _intVal(start);
@@ -1030,8 +1030,8 @@
 
     if ((__isString(self) || __isSymbol(self))
      && (__isString(aString) || __isSymbol(aString))
-     && _isSmallInteger(insrtWeight) && _isSmallInteger(caseWeight)
-     && _isSmallInteger(substWeight) && _isSmallInteger(deleteWeight)) {
+     && __bothSmallInteger(insrtWeight, caseWeight)
+     && __bothSmallInteger(substWeight, deleteWeight)) {
 	iW = _intVal(insrtWeight);
 	cW = _intVal(caseWeight);
 	sW = _intVal(substWeight);
@@ -1418,7 +1418,7 @@
     int len, sz, index1, index2;
     OBJ newString;
 
-    if (_isSmallInteger(start) && _isSmallInteger(stop)) {
+    if (__bothSmallInteger(start, stop)) {
 	len = _stringSize(self);
 	index1 = _intVal(start);
 	index2 = _intVal(stop);
@@ -1482,7 +1482,7 @@
     int len, index1, sz;
     OBJ newString;
 
-    if (_isSmallInteger(start)) {
+    if (__isSmallInteger(start)) {
 	len = _stringSize(self);
 	index1 = _intVal(start);
 	if (index1 > 0) {
@@ -1544,8 +1544,7 @@
 
     if ((__isString(aString) || __isSymbol(aString))
      && __isString(self)
-     && _isSmallInteger(start)
-     && _isSmallInteger(stop)) {
+     && __bothSmallInteger(start, stop)) {
 	len = _stringSize(self);
 	index1 = _intVal(start);
 	index2 = _intVal(stop);
--- a/Symbol.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/Symbol.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Symbol.st,v 1.14 1994-11-17 14:18:13 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Symbol.st,v 1.15 1995-02-15 10:25:05 claus Exp $
 '!
 
 !Symbol class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Symbol.st,v 1.14 1994-11-17 14:18:13 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Symbol.st,v 1.15 1995-02-15 10:25:05 claus Exp $
 "
 !
 
@@ -159,6 +159,12 @@
      uninterned - allow change
     "
     ^ super basicAt:index put:something
+!
+
+byteAt:index put:value
+    "report an error if interned - interned symbols may not be changed."
+
+    ^ self basicAt:index put:(value asCharacter)
 ! !
 
 !Symbol methodsFor:'copying'!
--- a/SysDict.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/SysDict.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1994 by Claus Gittinger
              All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/SysDict.st,v 1.3 1994-08-05 01:02:51 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/SysDict.st,v 1.4 1995-02-15 10:25:07 claus Exp $
 '!
 
 !SystemDictionary class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/SysDict.st,v 1.3 1994-08-05 01:02:51 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/SysDict.st,v 1.4 1995-02-15 10:25:07 claus Exp $
 "
 !
 
@@ -71,7 +71,7 @@
 %{  /* NOCONTEXT */
     extern OBJ _SYSDICT_GET();
 
-    if (_isSmallInteger(_INST(sysId))) {
+    if (__isSmallInteger(_INST(sysId))) {
         RETURN ( _SYSDICT_GET(_intVal(_INST(sysId)), aKey) );
     }
 %}.
@@ -96,7 +96,7 @@
     "store the argument aValue under aKey, which must be some kind of symbol."
 
 %{  /* NOCONTEXT */
-    if (_isSmallInteger(_INST(sysId))) {
+    if (__isSmallInteger(_INST(sysId))) {
         _SYSDICT_SET(_intVal(_INST(sysId)), aKey, aValue, (OBJ *)0);
         RETURN (aValue);
     }
@@ -113,7 +113,7 @@
 %{  /* NOCONTEXT */
     extern OBJ _SYSDICT_REMOVE();
 
-    if (_isSmallInteger(_INST(sysId))) {
+    if (__isSmallInteger(_INST(sysId))) {
         RETURN ( _SYSDICT_REMOVE(_intVal(_INST(sysId)), aKey) );
     }
 %}.
@@ -129,7 +129,7 @@
 %{  /* NOCONTEXT */
     extern OBJ _SYSDICT_KEYKNOWN();
 
-    if (_isSmallInteger(_INST(sysId))) {
+    if (__isSmallInteger(_INST(sysId))) {
         RETURN ( _SYSDICT_KEYKNOWN(_intVal(_INST(sysId)), aKey) );
     }
 %}.
@@ -203,7 +203,7 @@
 do:aBlock
     "evaluate the argument, aBlock for all values in the dictionary"
 %{
-    if (_isSmallInteger(_INST(sysId))) {
+    if (__isSmallInteger(_INST(sysId))) {
         _SYSDICT_DO(_intVal(_INST(sysId)), &aBlock COMMA_CON);
     }
 %}.
@@ -220,7 +220,7 @@
 allKeysDo:aBlock
     "evaluate the argument, aBlock for all keys in the dictionary"
 %{
-    if (_isSmallInteger(_INST(sysId))) {
+    if (__isSmallInteger(_INST(sysId))) {
         _SYSDICT_KEYSDO(_intVal(_INST(sysId)), &aBlock COMMA_CON);
     }
 %}.
@@ -264,7 +264,7 @@
 %{  /* NOCONTEXT */
     extern OBJ _SYSDICT_GETCELL();
 
-    if (_isSmallInteger(_INST(sysId))) {
+    if (__isSmallInteger(_INST(sysId))) {
         RETURN ( _SYSDICT_GETCELL(_intVal(_INST(sysId)), aKey) );
     }
 %}.
--- a/Unix.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/Unix.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.27 1995-02-11 14:09:09 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.28 1995-02-15 10:25:09 claus Exp $
 '!
 
 !OperatingSystem primitiveDefinitions!
@@ -155,7 +155,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.27 1995-02-11 14:09:09 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.28 1995-02-15 10:25:09 claus Exp $
 "
 !
 
@@ -224,7 +224,7 @@
      returning an exit-code to the parent unix process."
 
 %{  /* NOCONTEXT */
-    if (! _isSmallInteger(exitCode))
+    if (! __isSmallInteger(exitCode))
 	exit(1);
     mainExit(_intVal(exitCode));
 %}
@@ -595,6 +595,10 @@
      RETURN ( _MKSMALLINT(255) );
 #   endif
 
+#   ifdef realIX
+      RETURN ( _MKSMALLINT(127) );
+#   endif
+
 #   ifdef SYSV
       RETURN ( _MKSMALLINT(14) );
 #   endif
@@ -702,7 +706,7 @@
 #ifndef transputer
     struct passwd *p;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	p = getpwuid(_intVal(aNumber));
 	if (p) {
 	    RETURN ( _MKSTRING(p->pw_name COMMA_CON) );
@@ -728,7 +732,7 @@
 #ifndef transputer
     struct group *g;
 
-    if (_isSmallInteger(aNumber)) {
+    if (__isSmallInteger(aNumber)) {
 	g = getgrgid(_intVal(aNumber));
 	if (g) {
 	    RETURN ( _MKSTRING(g->gr_name COMMA_CON) );
@@ -817,7 +821,7 @@
     char *msg = "unknown error";
     char buffer[50];
 
-    if (_isSmallInteger(errNr)) {
+    if (__isSmallInteger(errNr)) {
 	switch (_intVal(errNr)) {
 	    /*
 	     * POSIX errnos - these should be defined
@@ -1620,7 +1624,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(signalNumber)) {
+    if (__isSmallInteger(signalNumber)) {
 	signal(_intVal(signalNumber), SIG_IGN);
 	RETURN (self);
     }
@@ -1651,7 +1655,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(signalNumber)) {
+    if (__isSmallInteger(signalNumber)) {
 	signal(_intVal(signalNumber), SIG_DFL);
 	RETURN (self);
     }
@@ -1725,7 +1729,7 @@
     struct sigaction act, oldAct;
 #endif
 
-    if (_isSmallInteger(signalNumber)
+    if (__isSmallInteger(signalNumber)
      && ((sigNr = _intVal(signalNumber)) > 0)
      &&  (sigNr <= SIG_LIMIT)) {
 	/*
@@ -1867,7 +1871,7 @@
 
 #if defined(F_GETFL) && defined(F_SETFL)
 # if defined(FASYNC)
-    if (_isSmallInteger(fd)) {
+    if (__isSmallInteger(fd)) {
 	if (firstCall) {
 	    firstCall = 0;
 #  ifdef SIGIO
@@ -1913,7 +1917,7 @@
 
 #if defined(F_GETFL) && defined(F_SETFL)
 # if defined(FASYNC)
-    if (_isSmallInteger(fd)) {
+    if (__isSmallInteger(fd)) {
 	f = _intVal(fd);
 	flags = fcntl(f, F_GETFL, 0);
 	/*
@@ -2255,8 +2259,7 @@
     struct tm *tmPtr;
     long t;
 
-    if (_isSmallInteger(low) 
-     && _isSmallInteger(hi)) {
+    if (__bothSmallInteger(low, hi)) {
 	t = (_intVal(hi) << 16) | _intVal(low);
 	tmPtr = localtime(&t);
 	hours = _MKSMALLINT(tmPtr->tm_hour);
@@ -2293,15 +2296,16 @@
     struct tm tm;
     long t;
 
-    if (_isSmallInteger(y) && _isSmallInteger(m) && _isSmallInteger(d)
-     && _isSmallInteger(h) && _isSmallInteger(min) && _isSmallInteger(s)) {
-	tm.tm_hour = _intVal(h);
-	tm.tm_min = _intVal(min);
-	tm.tm_sec = _intVal(s);
-
-	tm.tm_year = _intVal(y) - 1900;
-	tm.tm_mon = _intVal(m) - 1;
-	tm.tm_mday = _intVal(d);
+    if (__bothSmallInteger(y, m) 
+     && __bothSmallInteger(d, h)
+     && __bothSmallInteger(min, s)) {
+	tm.tm_hour = __intVal(h);
+	tm.tm_min = __intVal(min);
+	tm.tm_sec = __intVal(s);
+
+	tm.tm_year = __intVal(y) - 1900;
+	tm.tm_mon = __intVal(m) - 1;
+	tm.tm_mday = __intVal(d);
 	tm.tm_isdst = -1;
 
 	t = mktime(&tm);
@@ -2461,7 +2465,7 @@
 
 %{  /* NOCONTEXT */
 
-    if (_isSmallInteger(numberOfSeconds)) {
+    if (__isSmallInteger(numberOfSeconds)) {
 	sleep(_intVal(numberOfSeconds));
 	RETURN ( self );
     }
@@ -2491,7 +2495,7 @@
 
 #if defined(F_GETFL) && defined(F_SETFL)
 # if defined(FNDELAY)
-    if (_isSmallInteger(fd)) {
+    if (__isSmallInteger(fd)) {
 	flags = fcntl(_intVal(fd), F_GETFL, 0);
 	if (aBoolean == true) {
 	    ret = fcntl(_intVal(fd), F_SETFL, flags & ~FNDELAY);
@@ -2614,7 +2618,7 @@
     OBJ fd, retFd;
     int ret;
 
-    if (_isSmallInteger(millis)) {
+    if (__isSmallInteger(millis)) {
 	FD_ZERO(&rset);
 	FD_ZERO(&wset);
 	FD_ZERO(&eset);
@@ -3265,7 +3269,7 @@
 %{  /* NOCONTEXT */
     int ret;
 
-    if (__isString(aPathName) && _isSmallInteger(modeBits)) {
+    if (__isString(aPathName) && __isSmallInteger(modeBits)) {
 	do {
 	    ret = chmod((char *)_stringVal(aPathName), _intVal(modeBits));
 	} while (ret < 0 && errno == EINTR);
--- a/WeakIdSet.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/WeakIdSet.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.5 1995-02-02 12:23:05 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.6 1995-02-15 10:25:16 claus Exp $
 '!
 
 !WeakIdentitySet class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.5 1995-02-02 12:23:05 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.6 1995-02-15 10:25:16 claus Exp $
 "
 !
 
@@ -61,9 +61,9 @@
     ^ self new:1
 ! !
 
-!WeakIdentitySet methodsFor:'private'!
+!WeakIdentitySet class methodsFor:'queries'!
 
-goodSizeFor:arg
+goodSizeFrom:arg
     "return a good array size for the given argument.
      Since WeakIdentitySets are mostly used for dependency management, we typically
      have only one element in the set. Therefore use exact size for small sets
@@ -73,8 +73,10 @@
 	arg < 1 ifTrue:[^ 1].
 	^ arg.
     ].
-    ^ super goodSizeFor:arg
-!
+    ^ super goodSizeFrom:arg
+! !
+
+!WeakIdentitySet methodsFor:'private'!
 
 keyContainerOfSize:n
     "return a container for keys and values of size n.
--- a/WeakIdentitySet.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/WeakIdentitySet.st	Wed Feb 15 11:25:20 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/WeakIdentitySet.st,v 1.5 1995-02-02 12:23:05 claus Exp $
+$Header: /cvs/stx/stx/libbasic/WeakIdentitySet.st,v 1.6 1995-02-15 10:25:16 claus Exp $
 '!
 
 !WeakIdentitySet class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/WeakIdentitySet.st,v 1.5 1995-02-02 12:23:05 claus Exp $
+$Header: /cvs/stx/stx/libbasic/WeakIdentitySet.st,v 1.6 1995-02-15 10:25:16 claus Exp $
 "
 !
 
@@ -61,9 +61,9 @@
     ^ self new:1
 ! !
 
-!WeakIdentitySet methodsFor:'private'!
+!WeakIdentitySet class methodsFor:'queries'!
 
-goodSizeFor:arg
+goodSizeFrom:arg
     "return a good array size for the given argument.
      Since WeakIdentitySets are mostly used for dependency management, we typically
      have only one element in the set. Therefore use exact size for small sets
@@ -73,8 +73,10 @@
 	arg < 1 ifTrue:[^ 1].
 	^ arg.
     ].
-    ^ super goodSizeFor:arg
-!
+    ^ super goodSizeFrom:arg
+! !
+
+!WeakIdentitySet methodsFor:'private'!
 
 keyContainerOfSize:n
     "return a container for keys and values of size n.
--- a/WriteStr.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/WriteStr.st	Wed Feb 15 11:25:20 1995 +0100
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -19,9 +19,9 @@
 
 WriteStream comment:'
 COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/WriteStr.st,v 1.10 1994-08-05 01:03:08 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/WriteStr.st,v 1.11 1995-02-15 10:25:17 claus Exp $
 '!
 
 !WriteStream class methodsFor:'documentation'!
@@ -29,7 +29,7 @@
 copyright
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/WriteStr.st,v 1.10 1994-08-05 01:03:08 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/WriteStr.st,v 1.11 1995-02-15 10:25:17 claus Exp $
 "
 !
 
@@ -83,11 +83,11 @@
     "return the current contents (a collection) of the stream"
 
     collection size == (position - 1) ifFalse:[
-        collection isFixedSize ifTrue:[
-            collection := collection copyFrom:1 to:(position - 1)
-        ] ifFalse:[
-            collection grow:(position - 1)
-        ]
+	collection isFixedSize ifTrue:[
+	    collection := collection copyFrom:1 to:(position - 1)
+	] ifFalse:[
+	    collection grow:(position - 1)
+	]
     ].
     ^ collection
 !
@@ -125,62 +125,63 @@
     REGISTER int pos;
     unsigned ch;
     OBJ coll;
-    OBJ t;
+    OBJ p, l;
 
     coll = _INST(collection);
-    if (_isNonNilObject(coll)
-     && _isSmallInteger(t = _INST(position))) {
+    p = _INST(position);
+    l = _INST(writeLimit);
 
-        pos = _intVal(t);
+    if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
 
-        if (_isSmallInteger(t = _INST(writeLimit)) 
-         && (pos <= _intVal(t)) && (pos > 0)) {
-            OBJ cls;
+	pos = _intVal(p);
 
-            cls = _qClass(coll);
+	if ((pos <= _intVal(l)) && (pos > 0)) {
+	    OBJ cls;
+
+	    cls = _qClass(coll);
 #ifdef NOTDEF
-            if (cls == String) {
-                if (__isCharacter(anObject) 
-                 && (pos <= _stringSize(coll))) {
-                    _StringInstPtr(coll)->s_element[pos-1] = _intVal(_characterVal(anObject));
-                    _INST(position) = _MKSMALLINT(pos + 1);
-                    if (_isSmallInteger(_INST(readLimit))
-                     && (pos >= _intVal(_INST(readLimit)))) {
-                        _INST(readLimit) = _MKSMALLINT(pos + 1);
-                    }
-                    RETURN ( anObject );
-                }
-            } else 
+	    if (cls == String) {
+		if (__isCharacter(anObject) 
+		 && (pos <= _stringSize(coll))) {
+		    _StringInstPtr(coll)->s_element[pos-1] = _intVal(_characterVal(anObject));
+		    _INST(position) = _MKSMALLINT(pos + 1);
+		    if (__isSmallInteger(_INST(readLimit))
+		     && (pos >= _intVal(_INST(readLimit)))) {
+			_INST(readLimit) = _MKSMALLINT(pos + 1);
+		    }
+		    RETURN ( anObject );
+		}
+	    } else 
 #endif
-            if (cls == ByteArray) {
-                if (_isSmallInteger(anObject) 
-                 && ((ch = _intVal(anObject)) >= 0)
-                 && (ch <= 255)
-                 && (pos <= _byteArraySize(coll))) {
-                    _ByteArrayInstPtr(coll)->ba_element[pos-1] = ch;
-                    _INST(position) = _MKSMALLINT(pos + 1);
-                    if (_isSmallInteger(_INST(readLimit))
-                     && (pos >= _intVal(_INST(readLimit)))) {
-                        _INST(readLimit) = _MKSMALLINT(pos + 1);
-                    }
-                    RETURN ( anObject );
-                }
+	    if (cls == ByteArray) {
+		if (__isSmallInteger(anObject) 
+		 && ((ch = _intVal(anObject)) >= 0)
+		 && (ch <= 255)
+		 && (pos <= _byteArraySize(coll))) {
+		    _ByteArrayInstPtr(coll)->ba_element[pos-1] = ch;
+		    _INST(position) = _MKSMALLINT(pos + 1);
+		    if (__isSmallInteger(_INST(readLimit))
+		     && (pos >= _intVal(_INST(readLimit)))) {
+			_INST(readLimit) = _MKSMALLINT(pos + 1);
+		    }
+		    RETURN ( anObject );
+		}
 #ifdef NOTDEF
-            } else 
-            if (cls == Array) {
-                if (pos <= _arraySize(coll)) {
-                     _ArrayInstPtr(coll)->a_element[pos-1] = anObject;
-                    __STORE(coll, anObject);
-                    _INST(position) = _MKSMALLINT(pos + 1);
-                    if (_isSmallInteger(_INST(readLimit))
-                     && (pos >= _intVal(_INST(readLimit)))) {
-                        _INST(readLimit) = _MKSMALLINT(pos + 1);
-                    }
-                    RETURN ( anObject );
-                }
+	    } else 
+	    if (cls == Array) {
+		if (pos <= _arraySize(coll)) {
+		     _ArrayInstPtr(coll)->a_element[pos-1] = anObject;
+		    __STORE(coll, anObject);
+		    _INST(position) = _MKSMALLINT(pos + 1);
+		    if (__isSmallInteger(_INST(readLimit))
+		     && (pos >= _intVal(_INST(readLimit)))) {
+			_INST(readLimit) = _MKSMALLINT(pos + 1);
+		    }
+		    RETURN ( anObject );
+		}
 #endif
-            }
-        }
+	    }
+	}
     }
 #endif
 
@@ -201,15 +202,15 @@
     |final|
 
     collection isNil ifTrue:[
-        count timesRepeat:[
-            self nextPut:anObject
-        ].
-        ^ self
+	count timesRepeat:[
+	    self nextPut:anObject
+	].
+	^ self
     ].
 
     final := position + count - 1.
     (final > collection size) ifTrue:[
-        self growCollection:final
+	self growCollection:final
     ].
     collection atAll:(position to:final) put:anObject.
 
@@ -226,21 +227,21 @@
     |nMore final|
 
     collection isNil ifTrue:[
-        aCollection do:[:element |
-            self nextPut:element
-        ].
-        ^ self
+	aCollection do:[:element |
+	    self nextPut:element
+	].
+	^ self
     ].
 
     nMore := aCollection size.
     final := position + nMore - 1.
     (final > collection size) ifTrue:[
-        self growCollection:final
+	self growCollection:final
     ].
     collection replaceFrom:position
-                        to:final
-                      with:aCollection 
-                startingAt:1.
+			to:final
+		      with:aCollection 
+		startingAt:1.
 
     position := position + nMore.
     (position > readLimit) ifTrue:[readLimit := position - 1].
@@ -272,42 +273,46 @@
 !WriteStream methodsFor:'private'!
 
 growCollection
+    self growCollection:10
+
+"/    |oldSize newSize newColl|
+
+"/    oldSize := collection size.
+"/    (oldSize == 0) ifTrue:[
+"/        newSize := 10
+"/  ] ifFalse:[
+"/      newSize := oldSize * 2
+"/  ].
+"/  collection isFixedSize ifTrue:[
+"/      newColl := collection species new:newSize.
+"/      newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
+"/      collection := newColl
+"/  ] ifFalse:[
+"/      collection grow:newSize.
+"/  ].
+"/  writeLimit := newSize
+!
+
+growCollection:minNewSize
+    "grow the streamed collection to at least minNewSize"
+
     |oldSize newSize newColl|
 
     oldSize := collection size.
     (oldSize == 0) ifTrue:[
-        newSize := 10
+	newSize := minNewSize
     ] ifFalse:[
-        newSize := oldSize * 2
+	newSize := oldSize * 2.
+	[newSize < minNewSize] whileTrue:[
+	    newSize := newSize * 2
+	]
     ].
     collection isFixedSize ifTrue:[
-        newColl := collection species new:newSize.
-        newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
-        collection := newColl
+	newColl := collection species new:newSize.
+	newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
+	collection := newColl
     ] ifFalse:[
-        collection grow:newSize.
-    ].
-    writeLimit := newSize
-!
-
-growCollection:minNewSize
-    |oldSize newSize newColl|
-
-    oldSize := collection size.
-    (oldSize == 0) ifTrue:[
-        newSize := minNewSize
-    ] ifFalse:[
-        newSize := oldSize * 2.
-        [newSize < minNewSize] whileTrue:[
-            newSize := newSize * 2
-        ]
-    ].
-    collection isFixedSize ifTrue:[
-        newColl := collection species new:newSize.
-        newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
-        collection := newColl
-    ] ifFalse:[
-        collection grow:newSize
+	collection grow:newSize
     ].
     writeLimit := newSize
 ! !
--- a/WriteStream.st	Wed Feb 15 11:24:35 1995 +0100
+++ b/WriteStream.st	Wed Feb 15 11:25:20 1995 +0100
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -19,9 +19,9 @@
 
 WriteStream comment:'
 COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.10 1994-08-05 01:03:08 claus Exp $
+$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.11 1995-02-15 10:25:17 claus Exp $
 '!
 
 !WriteStream class methodsFor:'documentation'!
@@ -29,7 +29,7 @@
 copyright
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.10 1994-08-05 01:03:08 claus Exp $
+$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.11 1995-02-15 10:25:17 claus Exp $
 "
 !
 
@@ -83,11 +83,11 @@
     "return the current contents (a collection) of the stream"
 
     collection size == (position - 1) ifFalse:[
-        collection isFixedSize ifTrue:[
-            collection := collection copyFrom:1 to:(position - 1)
-        ] ifFalse:[
-            collection grow:(position - 1)
-        ]
+	collection isFixedSize ifTrue:[
+	    collection := collection copyFrom:1 to:(position - 1)
+	] ifFalse:[
+	    collection grow:(position - 1)
+	]
     ].
     ^ collection
 !
@@ -125,62 +125,63 @@
     REGISTER int pos;
     unsigned ch;
     OBJ coll;
-    OBJ t;
+    OBJ p, l;
 
     coll = _INST(collection);
-    if (_isNonNilObject(coll)
-     && _isSmallInteger(t = _INST(position))) {
+    p = _INST(position);
+    l = _INST(writeLimit);
 
-        pos = _intVal(t);
+    if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
 
-        if (_isSmallInteger(t = _INST(writeLimit)) 
-         && (pos <= _intVal(t)) && (pos > 0)) {
-            OBJ cls;
+	pos = _intVal(p);
 
-            cls = _qClass(coll);
+	if ((pos <= _intVal(l)) && (pos > 0)) {
+	    OBJ cls;
+
+	    cls = _qClass(coll);
 #ifdef NOTDEF
-            if (cls == String) {
-                if (__isCharacter(anObject) 
-                 && (pos <= _stringSize(coll))) {
-                    _StringInstPtr(coll)->s_element[pos-1] = _intVal(_characterVal(anObject));
-                    _INST(position) = _MKSMALLINT(pos + 1);
-                    if (_isSmallInteger(_INST(readLimit))
-                     && (pos >= _intVal(_INST(readLimit)))) {
-                        _INST(readLimit) = _MKSMALLINT(pos + 1);
-                    }
-                    RETURN ( anObject );
-                }
-            } else 
+	    if (cls == String) {
+		if (__isCharacter(anObject) 
+		 && (pos <= _stringSize(coll))) {
+		    _StringInstPtr(coll)->s_element[pos-1] = _intVal(_characterVal(anObject));
+		    _INST(position) = _MKSMALLINT(pos + 1);
+		    if (__isSmallInteger(_INST(readLimit))
+		     && (pos >= _intVal(_INST(readLimit)))) {
+			_INST(readLimit) = _MKSMALLINT(pos + 1);
+		    }
+		    RETURN ( anObject );
+		}
+	    } else 
 #endif
-            if (cls == ByteArray) {
-                if (_isSmallInteger(anObject) 
-                 && ((ch = _intVal(anObject)) >= 0)
-                 && (ch <= 255)
-                 && (pos <= _byteArraySize(coll))) {
-                    _ByteArrayInstPtr(coll)->ba_element[pos-1] = ch;
-                    _INST(position) = _MKSMALLINT(pos + 1);
-                    if (_isSmallInteger(_INST(readLimit))
-                     && (pos >= _intVal(_INST(readLimit)))) {
-                        _INST(readLimit) = _MKSMALLINT(pos + 1);
-                    }
-                    RETURN ( anObject );
-                }
+	    if (cls == ByteArray) {
+		if (__isSmallInteger(anObject) 
+		 && ((ch = _intVal(anObject)) >= 0)
+		 && (ch <= 255)
+		 && (pos <= _byteArraySize(coll))) {
+		    _ByteArrayInstPtr(coll)->ba_element[pos-1] = ch;
+		    _INST(position) = _MKSMALLINT(pos + 1);
+		    if (__isSmallInteger(_INST(readLimit))
+		     && (pos >= _intVal(_INST(readLimit)))) {
+			_INST(readLimit) = _MKSMALLINT(pos + 1);
+		    }
+		    RETURN ( anObject );
+		}
 #ifdef NOTDEF
-            } else 
-            if (cls == Array) {
-                if (pos <= _arraySize(coll)) {
-                     _ArrayInstPtr(coll)->a_element[pos-1] = anObject;
-                    __STORE(coll, anObject);
-                    _INST(position) = _MKSMALLINT(pos + 1);
-                    if (_isSmallInteger(_INST(readLimit))
-                     && (pos >= _intVal(_INST(readLimit)))) {
-                        _INST(readLimit) = _MKSMALLINT(pos + 1);
-                    }
-                    RETURN ( anObject );
-                }
+	    } else 
+	    if (cls == Array) {
+		if (pos <= _arraySize(coll)) {
+		     _ArrayInstPtr(coll)->a_element[pos-1] = anObject;
+		    __STORE(coll, anObject);
+		    _INST(position) = _MKSMALLINT(pos + 1);
+		    if (__isSmallInteger(_INST(readLimit))
+		     && (pos >= _intVal(_INST(readLimit)))) {
+			_INST(readLimit) = _MKSMALLINT(pos + 1);
+		    }
+		    RETURN ( anObject );
+		}
 #endif
-            }
-        }
+	    }
+	}
     }
 #endif
 
@@ -201,15 +202,15 @@
     |final|
 
     collection isNil ifTrue:[
-        count timesRepeat:[
-            self nextPut:anObject
-        ].
-        ^ self
+	count timesRepeat:[
+	    self nextPut:anObject
+	].
+	^ self
     ].
 
     final := position + count - 1.
     (final > collection size) ifTrue:[
-        self growCollection:final
+	self growCollection:final
     ].
     collection atAll:(position to:final) put:anObject.
 
@@ -226,21 +227,21 @@
     |nMore final|
 
     collection isNil ifTrue:[
-        aCollection do:[:element |
-            self nextPut:element
-        ].
-        ^ self
+	aCollection do:[:element |
+	    self nextPut:element
+	].
+	^ self
     ].
 
     nMore := aCollection size.
     final := position + nMore - 1.
     (final > collection size) ifTrue:[
-        self growCollection:final
+	self growCollection:final
     ].
     collection replaceFrom:position
-                        to:final
-                      with:aCollection 
-                startingAt:1.
+			to:final
+		      with:aCollection 
+		startingAt:1.
 
     position := position + nMore.
     (position > readLimit) ifTrue:[readLimit := position - 1].
@@ -272,42 +273,46 @@
 !WriteStream methodsFor:'private'!
 
 growCollection
+    self growCollection:10
+
+"/    |oldSize newSize newColl|
+
+"/    oldSize := collection size.
+"/    (oldSize == 0) ifTrue:[
+"/        newSize := 10
+"/  ] ifFalse:[
+"/      newSize := oldSize * 2
+"/  ].
+"/  collection isFixedSize ifTrue:[
+"/      newColl := collection species new:newSize.
+"/      newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
+"/      collection := newColl
+"/  ] ifFalse:[
+"/      collection grow:newSize.
+"/  ].
+"/  writeLimit := newSize
+!
+
+growCollection:minNewSize
+    "grow the streamed collection to at least minNewSize"
+
     |oldSize newSize newColl|
 
     oldSize := collection size.
     (oldSize == 0) ifTrue:[
-        newSize := 10
+	newSize := minNewSize
     ] ifFalse:[
-        newSize := oldSize * 2
+	newSize := oldSize * 2.
+	[newSize < minNewSize] whileTrue:[
+	    newSize := newSize * 2
+	]
     ].
     collection isFixedSize ifTrue:[
-        newColl := collection species new:newSize.
-        newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
-        collection := newColl
+	newColl := collection species new:newSize.
+	newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
+	collection := newColl
     ] ifFalse:[
-        collection grow:newSize.
-    ].
-    writeLimit := newSize
-!
-
-growCollection:minNewSize
-    |oldSize newSize newColl|
-
-    oldSize := collection size.
-    (oldSize == 0) ifTrue:[
-        newSize := minNewSize
-    ] ifFalse:[
-        newSize := oldSize * 2.
-        [newSize < minNewSize] whileTrue:[
-            newSize := newSize * 2
-        ]
-    ].
-    collection isFixedSize ifTrue:[
-        newColl := collection species new:newSize.
-        newColl replaceFrom:1 to:oldSize with:collection startingAt:1.
-        collection := newColl
-    ] ifFalse:[
-        collection grow:newSize
+	collection grow:newSize
     ].
     writeLimit := newSize
 ! !