Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 05 Aug 2015 22:44:27 +0100
branchjv
changeset 18678 a9b30d72dff9
parent 18677 1cb0a8a0b66b (current diff)
parent 18667 ed22f49c33f1 (diff)
child 18679 882c5a65fae3
Merge
Array.st
ByteArray.st
Character.st
CharacterArray.st
Collection.st
ExternalBytes.st
ExternalStream.st
FileStream.st
Filename.st
String.st
UninterpretedBytes.st
--- a/Array.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/Array.st	Wed Aug 05 22:44:27 2015 +0100
@@ -327,17 +327,19 @@
 	indx = __intVal(index) - 1;
 	slf = self;
 	cls = __qClass(slf);
+	cls = __qClass(slf);
 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
 	if (cls == Array) {
 	    fetch:
 	    if ((unsigned INT)indx < (unsigned INT)nIndex) {
-	        RETURN ( __InstPtr(slf)->i_instvars[indx] );
+		RETURN ( __InstPtr(slf)->i_instvars[indx] );
 	    }
 	    goto badIndex;
 	}
-	if (indx < 0) goto badIndex;
-	indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);	
-	goto fetch;
+	if (indx >= 0) {
+	    indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
+	    goto fetch;
+	}
     }
 badIndex: ;
 #endif /* not SCHTEAM */
@@ -371,19 +373,21 @@
 	indx = __intVal(index) - 1;
 	slf = self;
         cls = __qClass(slf);
+	cls = __qClass(slf);
 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
 	if (cls == Array) {
 	    store:
-            if ((unsigned INT)indx < (unsigned INT)nIndex) {
-	        __InstPtr(slf)->i_instvars[indx] = anObject;
-	        __STORE(slf, anObject);
-	        RETURN ( anObject );
+	    if ((unsigned INT)indx < (unsigned INT)nIndex) {
+		__InstPtr(slf)->i_instvars[indx] = anObject;
+		__STORE(slf, anObject);
+		RETURN ( anObject );
 	    }
 	    goto badIndex;
 	}
-	if (indx < 0) goto badIndex;
-	indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);	
-	goto store;
+	if (indx >= 0) {
+	    indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
+	    goto store;
+	}
     }
 badIndex: ;
 #endif /* not SCHTEAM */
@@ -1625,138 +1629,138 @@
     OBJ myClass;
 
     if (
-        (__ClassInstPtr((myClass = __qClass(self)))->c_ninstvars == __mkSmallInteger(0))
+	(__ClassInstPtr((myClass = __qClass(self)))->c_ninstvars == __mkSmallInteger(0))
      && __isNonNilObject(aCollection)
      && (((t = __qClass(aCollection)) == Array) || (t == myClass))
      && __bothSmallInteger(start, stop)
      && __isSmallInteger(repStart)
     ) {
-        startIndex = __intVal(start) - 1;
-        if (startIndex >= 0) {
-            nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
-            stopIndex = __intVal(stop) - 1;
-            count = stopIndex - startIndex + 1;
+	startIndex = __intVal(start) - 1;
+	if (startIndex >= 0) {
+	    nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
+	    stopIndex = __intVal(stop) - 1;
+	    count = stopIndex - startIndex + 1;
 
-            if ((count > 0) && (stopIndex < nIndex)) {
-                repStartIndex = __intVal(repStart) - 1;
-                if (repStartIndex >= 0) {
-                    repNIndex = __BYTES2OBJS__(__qSize(aCollection)-OHDR_SIZE);
-                    repStopIndex = repStartIndex + (stopIndex - startIndex);
-                    if (repStopIndex < repNIndex) {
-                        src = &(__InstPtr(aCollection)->i_instvars[repStartIndex]);
-                        dst = &(__InstPtr(self)->i_instvars[startIndex]);
-                        if (aCollection == self) {
-                            /*
-                             * no need to check stores if copying
-                             * from myself
-                             */
+	    if ((count > 0) && (stopIndex < nIndex)) {
+		repStartIndex = __intVal(repStart) - 1;
+		if (repStartIndex >= 0) {
+		    repNIndex = __BYTES2OBJS__(__qSize(aCollection)-OHDR_SIZE);
+		    repStopIndex = repStartIndex + (stopIndex - startIndex);
+		    if (repStopIndex < repNIndex) {
+			src = &(__InstPtr(aCollection)->i_instvars[repStartIndex]);
+			dst = &(__InstPtr(self)->i_instvars[startIndex]);
+			if (aCollection == self) {
+			    /*
+			     * no need to check stores if copying
+			     * from myself
+			     */
 
-                            /*
-                             * take care of overlapping copy
-                             * do not depend on memset being smart enough
-                             * (some are not ;-)
-                             */
-                            if (src < dst) {
-                                /* must do a reverse copy */
-                                src += count;
-                                dst += count;
+			    /*
+			     * take care of overlapping copy
+			     * do not depend on memset being smart enough
+			     * (some are not ;-)
+			     */
+			    if (src < dst) {
+				/* must do a reverse copy */
+				src += count;
+				dst += count;
 #ifdef __UNROLL_LOOPS__
-                                while (count > 8) {
-                                    dst[-1] = src[-1];
-                                    dst[-2] = src[-2];
-                                    dst[-3] = src[-3];
-                                    dst[-4] = src[-4];
-                                    dst[-5] = src[-5];
-                                    dst[-6] = src[-6];
-                                    dst[-7] = src[-7];
-                                    dst[-8] = src[-8];
-                                    dst -= 8; src -= 8;
-                                    count -= 8;
-                                }
+				while (count > 8) {
+				    dst[-1] = src[-1];
+				    dst[-2] = src[-2];
+				    dst[-3] = src[-3];
+				    dst[-4] = src[-4];
+				    dst[-5] = src[-5];
+				    dst[-6] = src[-6];
+				    dst[-7] = src[-7];
+				    dst[-8] = src[-8];
+				    dst -= 8; src -= 8;
+				    count -= 8;
+				}
 #endif
-                                while (count-- > 0) {
-                                    *--dst = *--src;
-                                }
-                                RETURN ( self );
-                            }
+				while (count-- > 0) {
+				    *--dst = *--src;
+				}
+				RETURN ( self );
+			    }
 #ifdef SOFTWARE_PIPELINE
-                            {
-                                /*
-                                 * the loop below fetches one longWord behind
-                                 * this should not be a problem
-                                 */
-                                OBJ t1 = src[0];
-                                count--;
-                                if (count) {
-                                    dst++; src++;
-                                    do {
-                                        dst[-1] = t1;
-                                        t1 = src[0];
-                                        src++;
-                                        dst++;
-                                    } while (count--);
-                                } else {
-                                    dst[0] = t1;
-                                }
-                            }
+			    {
+				/*
+				 * the loop below fetches one longWord behind
+				 * this should not be a problem
+				 */
+				OBJ t1 = src[0];
+				count--;
+				if (count) {
+				    dst++; src++;
+				    do {
+					dst[-1] = t1;
+					t1 = src[0];
+					src++;
+					dst++;
+				    } while (count--);
+				} else {
+				    dst[0] = t1;
+				}
+			    }
 #else
 
 # ifdef bcopy4
-                            bcopy4(src, dst, count);
+			    bcopy4(src, dst, count);
 # else
 #  ifdef FAST_MEMCPY
-                            memcpy(dst, src, __OBJS2BYTES__(count));
+			    memcpy(dst, src, __OBJS2BYTES__(count));
 #  else
 #   ifdef __UNROLL_LOOPS__
-                            while (count >= 8) {
-                                dst[0] = src[0];
-                                dst[1] = src[1];
-                                dst[2] = src[2];
-                                dst[3] = src[3];
-                                dst[4] = src[4];
-                                dst[5] = src[5];
-                                dst[6] = src[6];
-                                dst[7] = src[7];
-                                dst += 8; src += 8;
-                                count -= 8;
-                            }
+			    while (count >= 8) {
+				dst[0] = src[0];
+				dst[1] = src[1];
+				dst[2] = src[2];
+				dst[3] = src[3];
+				dst[4] = src[4];
+				dst[5] = src[5];
+				dst[6] = src[6];
+				dst[7] = src[7];
+				dst += 8; src += 8;
+				count -= 8;
+			    }
 #   endif
-                            while (count--) {
-                                *dst++ = *src++;
-                            }
+			    while (count--) {
+				*dst++ = *src++;
+			    }
 #  endif
 # endif
 #endif
-                        } else {
-                            REGISTER int spc = __qSpace(self);
+			} else {
+			    REGISTER int spc = __qSpace(self);
 #ifdef __UNROLL_LOOPS__
-                            while (count >= 8) {
-                                t = src[0]; dst[0] = t; __STORE_SPC(self, t, spc);
-                                t = src[1]; dst[1] = t; __STORE_SPC(self, t, spc);
-                                t = src[2]; dst[2] = t; __STORE_SPC(self, t, spc);
-                                t = src[3]; dst[3] = t; __STORE_SPC(self, t, spc);
-                                t = src[4]; dst[4] = t; __STORE_SPC(self, t, spc);
-                                t = src[5]; dst[5] = t; __STORE_SPC(self, t, spc);
-                                t = src[6]; dst[6] = t; __STORE_SPC(self, t, spc);
-                                t = src[7]; dst[7] = t; __STORE_SPC(self, t, spc);
-                                count -= 8; src += 8; dst += 8;
-                            }
+			    while (count >= 8) {
+				t = src[0]; dst[0] = t; __STORE_SPC(self, t, spc);
+				t = src[1]; dst[1] = t; __STORE_SPC(self, t, spc);
+				t = src[2]; dst[2] = t; __STORE_SPC(self, t, spc);
+				t = src[3]; dst[3] = t; __STORE_SPC(self, t, spc);
+				t = src[4]; dst[4] = t; __STORE_SPC(self, t, spc);
+				t = src[5]; dst[5] = t; __STORE_SPC(self, t, spc);
+				t = src[6]; dst[6] = t; __STORE_SPC(self, t, spc);
+				t = src[7]; dst[7] = t; __STORE_SPC(self, t, spc);
+				count -= 8; src += 8; dst += 8;
+			    }
 #endif
-                            while (count-- > 0) {
-                                t = *src++;
-                                *dst++ = t;
-                                __STORE_SPC(self, t, spc);
-                            }
-                        }
-                        RETURN ( self );
-                    }
-                }
-            }
+			    while (count-- > 0) {
+				t = *src++;
+				*dst++ = t;
+				__STORE_SPC(self, t, spc);
+			    }
+			}
+			RETURN ( self );
+		    }
+		}
+	    }
 
-            if (count == 0) {
-                RETURN ( self );
-            }
-        }
+	    if (count == 0) {
+		RETURN ( self );
+	    }
+	}
     }
 %}.
     ^ super replaceFrom:start to:stop with:aCollection startingAt:repStart
@@ -2696,4 +2700,3 @@
 version_CVS
     ^ '$Header$'
 ! !
-
--- a/ByteArray.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/ByteArray.st	Wed Aug 05 22:44:27 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -166,7 +164,6 @@
 ! !
 
 
-
 !ByteArray class methodsFor:'queries'!
 
 elementByteSize
@@ -187,7 +184,6 @@
     "Modified: 23.4.1996 / 15:56:25 / cg"
 ! !
 
-
 !ByteArray methodsFor:'Compatibility-Squeak'!
 
 bitXor:aByteArray
@@ -200,16 +196,16 @@
     size := self size.
     size1 := aByteArray size.
     size1 < size ifTrue:[
-        size := size1.
+	size := size1.
     ].
 
     ^ self copy
-        bitXorBytesFrom:1 to:size with:aByteArray startingAt:1;
-        yourself.
+	bitXorBytesFrom:1 to:size with:aByteArray startingAt:1;
+	yourself.
 
     "
-        #[0 1 2 3 4] bitXor:#[0 1 2 3 4]
-        #[0 1 2 3 4] bitXor:#[0 1 2 3]
+	#[0 1 2 3 4] bitXor:#[0 1 2 3 4]
+	#[0 1 2 3 4] bitXor:#[0 1 2 3]
     "
 ! !
 
@@ -1064,9 +1060,9 @@
     ^ self asIntegerMSB:true
 
     "
-        #[ 2 ] asInteger hexPrintString
-        #[ 16r1 16r2 ] asInteger hexPrintString
-        #[4 0 0 0 0 0 0 0] asInteger hexPrintString
+	#[ 2 ] asInteger hexPrintString
+	#[ 16r1 16r2 ] asInteger hexPrintString
+	#[4 0 0 0 0 0 0 0] asInteger hexPrintString
     "
 !
 
@@ -1077,10 +1073,10 @@
     ^ (LargeInteger digitBytes:self MSB:isMSBFirst) compressed
 
     "
-        (#[ 2 ] asIntegerMSB:true) hexPrintString
-        (#[ 16r1 16r2 ] asIntegerMSB:true) hexPrintString
-        (#[ 16r1 16r2 ] asIntegerMSB:false) hexPrintString
-        (#[4 0 0 0 0 0 0 0] asIntegerMSB:true) hexPrintString
+	(#[ 2 ] asIntegerMSB:true) hexPrintString
+	(#[ 16r1 16r2 ] asIntegerMSB:true) hexPrintString
+	(#[ 16r1 16r2 ] asIntegerMSB:false) hexPrintString
+	(#[4 0 0 0 0 0 0 0] asIntegerMSB:true) hexPrintString
     "
 !
 
@@ -1109,44 +1105,44 @@
     stop := self size.
 
     stop > 100 ifTrue:[
-        "/ cg:
-        "/ initial lineBreak
-        outStream cr.
+	"/ cg:
+	"/ initial lineBreak
+	outStream cr.
     ].
     cpl := 0.
 
     [index <= stop] whileTrue:[
-        "take 3 source bytes"
-        n := (self at:index) bitShift:16.
-        (index < stop) ifTrue:[
-            nextIndex := index + 1.
-            n := n bitOr:((self at:nextIndex) bitShift:8).
-            (nextIndex < stop) ifTrue:[
-                n := n bitOr:(self at:(index + 2)).
-            ].
-        ].
-        index := index + 3.
-
-        "took me a while to find that one out ..."
-        n := n bitXor:16r820820.
-
-        outStream nextPut:(Character value:((n bitShift:-18) bitAnd:16r3F) + 32).
-        outStream nextPut:(Character value:((n bitShift:-12) bitAnd:16r3F) + 32).
-        outStream nextPut:(Character value:((n bitShift:-6) bitAnd:16r3F) + 32).
-        outStream nextPut:(Character value:(n bitAnd:16r3F) + 32).
-
-        "/ cg:
-        "/ lineBreak after every 120 characters
-        "/ fromPackedString will ignore those
-        cpl := cpl + 4.
-        cpl >= 120 ifTrue:[
-            outStream cr.
-            cpl := 0.
-        ].
+	"take 3 source bytes"
+	n := (self at:index) bitShift:16.
+	(index < stop) ifTrue:[
+	    nextIndex := index + 1.
+	    n := n bitOr:((self at:nextIndex) bitShift:8).
+	    (nextIndex < stop) ifTrue:[
+		n := n bitOr:(self at:(index + 2)).
+	    ].
+	].
+	index := index + 3.
+
+	"took me a while to find that one out ..."
+	n := n bitXor:16r820820.
+
+	outStream nextPut:(Character value:((n bitShift:-18) bitAnd:16r3F) + 32).
+	outStream nextPut:(Character value:((n bitShift:-12) bitAnd:16r3F) + 32).
+	outStream nextPut:(Character value:((n bitShift:-6) bitAnd:16r3F) + 32).
+	outStream nextPut:(Character value:(n bitAnd:16r3F) + 32).
+
+	"/ cg:
+	"/ lineBreak after every 120 characters
+	"/ fromPackedString will ignore those
+	cpl := cpl + 4.
+	cpl >= 120 ifTrue:[
+	    outStream cr.
+	    cpl := 0.
+	].
     ].
     (mod := stop \\ 3) ~~ 0 ifTrue:[
-        outStream backStep.
-        outStream nextPut:(Character value:(mod + 96)).
+	outStream backStep.
+	outStream nextPut:(Character value:(mod + 96)).
     ].
     ^ outStream contents
 
@@ -1537,12 +1533,12 @@
      of some logical operation, as specified by the ruleSymbol.
      SourceBytes are fetched starting at sourceOffset.
      Valid rule symbols are:
-        #copy    - trivial;  same as replaceBytesFrom:to:with:startingAt:
-        #bitXor: - xoring;   byte[dI] = byte[dI] bitXor:(srcByte[sI])
-        #bitAnd: - anding;   byte[dI] = byte[dI] bitAnd:(srcByte[sI])
-        #bitOr:  - oring;    byte[dI] = byte[dI] bitOr:(srcByte[sI])
-        #+       - adding;   byte[dI] = (byte[dI] + (srcByte[sI])) mod: 256
-        #-       - subtract; byte[dI] = (byte[dI] - (srcByte[sI])) mod: 256
+	#copy    - trivial;  same as replaceBytesFrom:to:with:startingAt:
+	#bitXor: - xoring;   byte[dI] = byte[dI] bitXor:(srcByte[sI])
+	#bitAnd: - anding;   byte[dI] = byte[dI] bitAnd:(srcByte[sI])
+	#bitOr:  - oring;    byte[dI] = byte[dI] bitOr:(srcByte[sI])
+	#+       - adding;   byte[dI] = (byte[dI] + (srcByte[sI])) mod: 256
+	#-       - subtract; byte[dI] = (byte[dI] - (srcByte[sI])) mod: 256
      Warning: this is a destructive operation - elements in the receiver are overwritten.
     "
 
@@ -1554,139 +1550,139 @@
      && __isSmallInteger(dstStart)
      && __isSmallInteger(dstEnd)
      && __isSmallInteger(sourceStart)) {
-        unsigned char *srcP = __ByteArrayInstPtr(sourceBytes)->ba_element;
-        unsigned char *dstP = __ByteArrayInstPtr(self)->ba_element;
-        int srcLen = __byteArraySize(sourceBytes);
-        int dstLen = __byteArraySize(self);
-        int __srcStart = __intVal(sourceStart);
-        int __dstStart = __intVal(dstStart);
-        int count = __intVal(dstEnd) - __dstStart + 1;
-
-        if ((__dstStart >= 1)
-         && (__srcStart >= 1)
-         && ((__dstStart + count - 1) <= dstLen)
-         && ((__srcStart + count - 1) <= srcLen)) {
-            srcP += __srcStart - 1;
-            dstP += __dstStart - 1;
+	unsigned char *srcP = __ByteArrayInstPtr(sourceBytes)->ba_element;
+	unsigned char *dstP = __ByteArrayInstPtr(self)->ba_element;
+	int srcLen = __byteArraySize(sourceBytes);
+	int dstLen = __byteArraySize(self);
+	int __srcStart = __intVal(sourceStart);
+	int __dstStart = __intVal(dstStart);
+	int count = __intVal(dstEnd) - __dstStart + 1;
+
+	if ((__dstStart >= 1)
+	 && (__srcStart >= 1)
+	 && ((__dstStart + count - 1) <= dstLen)
+	 && ((__srcStart + count - 1) <= srcLen)) {
+	    srcP += __srcStart - 1;
+	    dstP += __dstStart - 1;
 
 #define OP_LOOP_BYTES(OP) \
     while (count >= 4) {                                             \
-        (dstP[0]) OP (srcP[0]);                                      \
-        (dstP[1]) OP (srcP[1]);                                      \
-        (dstP[2]) OP (srcP[2]);                                      \
-        (dstP[3]) OP (srcP[3]);                                      \
-        srcP += 4;                                                   \
-        dstP += 4;                                                   \
-        count -= 4;                                                  \
+	(dstP[0]) OP (srcP[0]);                                      \
+	(dstP[1]) OP (srcP[1]);                                      \
+	(dstP[2]) OP (srcP[2]);                                      \
+	(dstP[3]) OP (srcP[3]);                                      \
+	srcP += 4;                                                   \
+	dstP += 4;                                                   \
+	count -= 4;                                                  \
     }                                                                \
     while (count > 0) {                                              \
-        *dstP OP (*srcP);                                            \
-        srcP++;                                                      \
-        dstP++;                                                      \
-        count--;                                                     \
+	*dstP OP (*srcP);                                            \
+	srcP++;                                                      \
+	dstP++;                                                      \
+	count--;                                                     \
     }
 
 #define OP_LOOP(OP) \
     while (count >= 16) {                                            \
-        ((unsigned int *)dstP)[0] OP (((unsigned int *)srcP)[0]);    \
-        ((unsigned int *)dstP)[1] OP (((unsigned int *)srcP)[1]);    \
-        ((unsigned int *)dstP)[2] OP (((unsigned int *)srcP)[2]);    \
-        ((unsigned int *)dstP)[3] OP (((unsigned int *)srcP)[3]);    \
-        srcP += 16;                                                  \
-        dstP += 16;                                                  \
-        count -= 16;                                                 \
+	((unsigned int *)dstP)[0] OP (((unsigned int *)srcP)[0]);    \
+	((unsigned int *)dstP)[1] OP (((unsigned int *)srcP)[1]);    \
+	((unsigned int *)dstP)[2] OP (((unsigned int *)srcP)[2]);    \
+	((unsigned int *)dstP)[3] OP (((unsigned int *)srcP)[3]);    \
+	srcP += 16;                                                  \
+	dstP += 16;                                                  \
+	count -= 16;                                                 \
     }                                                                \
     while (count >= 4) {                                             \
-        ((unsigned int *)dstP)[0] OP (((unsigned int *)srcP)[0]);    \
-        srcP += 4;                                                   \
-        dstP += 4;                                                   \
-        count -= 4;                                                  \
+	((unsigned int *)dstP)[0] OP (((unsigned int *)srcP)[0]);    \
+	srcP += 4;                                                   \
+	dstP += 4;                                                   \
+	count -= 4;                                                  \
     }                                                                \
     while (count > 0) {                                              \
-        *dstP OP (*srcP);                                            \
-        srcP++;                                                      \
-        dstP++;                                                      \
-        count--;                                                     \
+	*dstP OP (*srcP);                                            \
+	srcP++;                                                      \
+	dstP++;                                                      \
+	count--;                                                     \
     }
 
 
-            if (ruleSymbol == @symbol(bitXor:)) {
-                OP_LOOP( ^= )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitXorNot:)) {
-                OP_LOOP( ^=~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitAnd:)) {
-                OP_LOOP( &= )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitAndNot:)) {
-                OP_LOOP( &=~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitOr:)) {
-                OP_LOOP( |= )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitOrNot:)) {
-                OP_LOOP( |=~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(copy)) {
-                OP_LOOP( = )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(copyNot)) {
-                OP_LOOP( =~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(+)) {
-                OP_LOOP_BYTES( += )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(-)) {
-                OP_LOOP_BYTES( -= )
-                RETURN (self);
-            }
-        }
+	    if (ruleSymbol == @symbol(bitXor:)) {
+		OP_LOOP( ^= )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitXorNot:)) {
+		OP_LOOP( ^=~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitAnd:)) {
+		OP_LOOP( &= )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitAndNot:)) {
+		OP_LOOP( &=~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitOr:)) {
+		OP_LOOP( |= )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitOrNot:)) {
+		OP_LOOP( |=~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(copy)) {
+		OP_LOOP( = )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(copyNot)) {
+		OP_LOOP( =~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(+)) {
+		OP_LOOP_BYTES( += )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(-)) {
+		OP_LOOP_BYTES( -= )
+		RETURN (self);
+	    }
+	}
     }
 #undef OP_LOOP_BYTES
 #undef OP_LOOP
 
 %}.
     ruleSymbol == #copy ifTrue:[
-        self replaceFrom:dstStart to:dstEnd with:sourceBytes startingAt:sourceStart.
-        ^ self
+	self replaceFrom:dstStart to:dstEnd with:sourceBytes startingAt:sourceStart.
+	^ self
     ].
 
     srcIdx := sourceStart.
     dstStart to:dstEnd do:[:dstIdx |
-        self at:dstIdx put:((self at:dstIdx) perform:ruleSymbol with:(sourceBytes at:srcIdx)).
-        srcIdx := srcIdx + 1.
+	self at:dstIdx put:((self at:dstIdx) perform:ruleSymbol with:(sourceBytes at:srcIdx)).
+	srcIdx := srcIdx + 1.
     ].
 
     "
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:3 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#bitXor:
+	bitBlitBytesFrom:1 to:3 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#bitXor:
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#bitXor:
+	bitBlitBytesFrom:1 to:8 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#bitXor:
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 with:#[1 1 1 1 1 1 1 1] startingAt:1 rule:#bitAnd:
+	bitBlitBytesFrom:1 to:8 with:#[1 1 1 1 1 1 1 1] startingAt:1 rule:#bitAnd:
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#+
+	bitBlitBytesFrom:1 to:8 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#+
      #[255 0 0 0 0 0 0 0]
-        bitBlitBytesFrom:1 to:8 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#+
+	bitBlitBytesFrom:1 to:8 with:#[1 2 3 4 5 6 7 8] startingAt:1 rule:#+
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:4 with:#[1 1 1 1 1 1 1 1] startingAt:1 rule:#+
+	bitBlitBytesFrom:1 to:4 with:#[1 1 1 1 1 1 1 1] startingAt:1 rule:#+
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:4 with:#[1 1 1 1 2 2 2 2] startingAt:5 rule:#+
+	bitBlitBytesFrom:1 to:4 with:#[1 1 1 1 2 2 2 2] startingAt:5 rule:#+
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:4 with:#[1 1 1 1 2 2 2 2] startingAt:5 rule:#copyNot
+	bitBlitBytesFrom:1 to:4 with:#[1 1 1 1 2 2 2 2] startingAt:5 rule:#copyNot
 
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 with:(1 to:8) startingAt:1 rule:#+
+	bitBlitBytesFrom:1 to:8 with:(1 to:8) startingAt:1 rule:#+
     "
 !
 
@@ -1695,12 +1691,12 @@
      Bytes in the receiver from dstStart to dstEnd are destructively replaced by the result
      of some logical operation, as specified by the ruleSymbol.
      Valid rule symbols are:
-        #copy    - trivial;  same as from:to:put:
-        #bitXor: - xoring;   byte[dI] = byte[dI] bitXor:sourceConst
-        #bitAnd: - anding;   byte[dI] = byte[dI] bitAnd:sourceConst
-        #bitOr:  - oring;    byte[dI] = byte[dI] bitOr:sourceConst
-        #+       - adding;   byte[dI] = (byte[dI] + sourceConst) mod: 256
-        #-       - subtract; byte[dI] = (byte[dI] - sourceConst) mod: 256
+	#copy    - trivial;  same as from:to:put:
+	#bitXor: - xoring;   byte[dI] = byte[dI] bitXor:sourceConst
+	#bitAnd: - anding;   byte[dI] = byte[dI] bitAnd:sourceConst
+	#bitOr:  - oring;    byte[dI] = byte[dI] bitOr:sourceConst
+	#+       - adding;   byte[dI] = (byte[dI] + sourceConst) mod: 256
+	#-       - subtract; byte[dI] = (byte[dI] - sourceConst) mod: 256
      Warning: this is a destructive operation - elements in the receiver are overwritten.
     "
 
@@ -1711,132 +1707,132 @@
      && __isSmallInteger(dstStart)
      && __isSmallInteger(dstEnd)
      && __isSmallInteger(sourceByte)) {
-        unsigned char srcByte = __intVal(sourceByte);
-        unsigned srcWord;
-        unsigned char *dstP = __ByteArrayInstPtr(self)->ba_element;
-        int dstLen = __byteArraySize(self);
-        int __dstStart = __intVal(dstStart);
-        int count = __intVal(dstEnd) - __dstStart + 1;
-
-        srcWord = (srcByte << 8) | srcByte;
-        srcWord = (srcWord << 16) | srcWord;
-        if ((__dstStart >= 1)
-         && ((__dstStart + count - 1) <= dstLen)) {
-            dstP += __dstStart - 1;
+	unsigned char srcByte = __intVal(sourceByte);
+	unsigned srcWord;
+	unsigned char *dstP = __ByteArrayInstPtr(self)->ba_element;
+	int dstLen = __byteArraySize(self);
+	int __dstStart = __intVal(dstStart);
+	int count = __intVal(dstEnd) - __dstStart + 1;
+
+	srcWord = (srcByte << 8) | srcByte;
+	srcWord = (srcWord << 16) | srcWord;
+	if ((__dstStart >= 1)
+	 && ((__dstStart + count - 1) <= dstLen)) {
+	    dstP += __dstStart - 1;
 
 #define OP_LOOP_BYTES(OP) \
     while (count >= 4) {                         \
-        dstP[0] OP srcByte;                      \
-        dstP[1] OP srcByte;                      \
-        dstP[2] OP srcByte;                      \
-        dstP[3] OP srcByte;                      \
-        dstP += 4;                               \
-        count -= 4;                              \
+	dstP[0] OP srcByte;                      \
+	dstP[1] OP srcByte;                      \
+	dstP[2] OP srcByte;                      \
+	dstP[3] OP srcByte;                      \
+	dstP += 4;                               \
+	count -= 4;                              \
     }                                            \
     while (count > 0) {                          \
-        *dstP OP srcByte;                        \
-        dstP++;                                  \
-        count--;                                 \
+	*dstP OP srcByte;                        \
+	dstP++;                                  \
+	count--;                                 \
     }
 
 #define OP_LOOP_INT32(OP) \
     while (count >= 16) {                        \
-        ((unsigned int *)dstP)[0] OP srcWord;    \
-        ((unsigned int *)dstP)[1] OP srcWord;    \
-        ((unsigned int *)dstP)[2] OP srcWord;    \
-        ((unsigned int *)dstP)[3] OP srcWord;    \
-        dstP += 16;                              \
-        count -= 16;                             \
+	((unsigned int *)dstP)[0] OP srcWord;    \
+	((unsigned int *)dstP)[1] OP srcWord;    \
+	((unsigned int *)dstP)[2] OP srcWord;    \
+	((unsigned int *)dstP)[3] OP srcWord;    \
+	dstP += 16;                              \
+	count -= 16;                             \
     }                                            \
 
 #define OP_LOOP(OP) \
     OP_LOOP_INT32(OP)                            \
     while (count >= 4) {                         \
-        ((unsigned int *)dstP)[0] OP srcWord;    \
-        dstP += 4;                               \
-        count -= 4;                              \
+	((unsigned int *)dstP)[0] OP srcWord;    \
+	dstP += 4;                               \
+	count -= 4;                              \
     }                                            \
     while (count > 0) {                          \
-        *dstP OP srcByte;                        \
-        dstP++;                                  \
-        count--;                                 \
+	*dstP OP srcByte;                        \
+	dstP++;                                  \
+	count--;                                 \
     }
 
 
-            if (ruleSymbol == @symbol(bitXor:)) {
-                OP_LOOP( ^= )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitXorNot:)) {
-                OP_LOOP( ^=~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitAnd:)) {
-                OP_LOOP( &= )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitAndNot:)) {
-                OP_LOOP( &=~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitOr:)) {
-                OP_LOOP( |= )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(bitOrNot:)) {
-                OP_LOOP( |=~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(copy)) {
-                OP_LOOP( = )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(copyNot)) {
-                OP_LOOP( =~ )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(+)) {
-                OP_LOOP_BYTES( += )
-                RETURN (self);
-            }
-            if (ruleSymbol == @symbol(-)) {
-                OP_LOOP_BYTES( -= )
-                RETURN (self);
-            }
-        }
+	    if (ruleSymbol == @symbol(bitXor:)) {
+		OP_LOOP( ^= )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitXorNot:)) {
+		OP_LOOP( ^=~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitAnd:)) {
+		OP_LOOP( &= )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitAndNot:)) {
+		OP_LOOP( &=~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitOr:)) {
+		OP_LOOP( |= )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(bitOrNot:)) {
+		OP_LOOP( |=~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(copy)) {
+		OP_LOOP( = )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(copyNot)) {
+		OP_LOOP( =~ )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(+)) {
+		OP_LOOP_BYTES( += )
+		RETURN (self);
+	    }
+	    if (ruleSymbol == @symbol(-)) {
+		OP_LOOP_BYTES( -= )
+		RETURN (self);
+	    }
+	}
     }
 #undef OP_LOOP_BYTES
 #undef OP_LOOP
 %}.
     ruleSymbol == #copy ifTrue:[
-        self from:dstStart to:dstEnd put:sourceByte.
-        ^ self
+	self from:dstStart to:dstEnd put:sourceByte.
+	^ self
     ].
 
     dstStart to:dstEnd do:[:dstIdx |
-        self at:dstIdx put:((self at:dstIdx) perform:ruleSymbol with:sourceByte).
+	self at:dstIdx put:((self at:dstIdx) perform:ruleSymbol with:sourceByte).
     ].
 
     "
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:3 withConstant:1 rule:#bitXor:
+	bitBlitBytesFrom:1 to:3 withConstant:1 rule:#bitXor:
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 withConstant:1 rule:#bitXor:
+	bitBlitBytesFrom:1 to:8 withConstant:1 rule:#bitXor:
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 withConstant:1 rule:#bitAnd:
+	bitBlitBytesFrom:1 to:8 withConstant:1 rule:#bitAnd:
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 withConstant:1 rule:#+
+	bitBlitBytesFrom:1 to:8 withConstant:1 rule:#+
      #[255 0 0 0 0 0 0 0]
-        bitBlitBytesFrom:1 to:8 withConstant:1 rule:#+
+	bitBlitBytesFrom:1 to:8 withConstant:1 rule:#+
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:4 withConstant:1 rule:#+
+	bitBlitBytesFrom:1 to:4 withConstant:1 rule:#+
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:4 withConstant:1 rule:#-
+	bitBlitBytesFrom:1 to:4 withConstant:1 rule:#-
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:4 withConstant:1 rule:#copyNot
+	bitBlitBytesFrom:1 to:4 withConstant:1 rule:#copyNot
 
      #[1 2 3 4 5 6 7 8]
-        bitBlitBytesFrom:1 to:8 withConstant:1 rule:#+
+	bitBlitBytesFrom:1 to:8 withConstant:1 rule:#+
     "
 !
 
@@ -2156,10 +2152,10 @@
 	    }
 	    RETURN ( self );
 	}
-	console_printf("expandPixels: buffer size: self:%d expect at least:%d\n",
-		__byteArraySize(self), srcBytes);
-	console_printf("expandPixels: buffer size: arg:%d expect at least:%d\n",
-		__byteArraySize(aByteArray), dstBytes);
+	console_printf("expandPixels: buffer size: self:%"_ld_" expect at least:%"_ld_"\n",
+		(INT)(__byteArraySize(self)), (INT)srcBytes);
+	console_printf("expandPixels: buffer size: arg:%"_ld_" expect at least:%"_ld_"\n",
+		(INT)(__byteArraySize(aByteArray)), (INT)dstBytes);
     }
     console_printf("expandPixels: invalid args\n");
 
@@ -2220,30 +2216,30 @@
     REGISTER int cnt;
 
     if (__qClass(self) == @global(ByteArray)) {
-        cnt = __byteArraySize(self);
-        dst = __ByteArrayInstPtr(self)->ba_element;
-        if (((INT)dst & (sizeof(long)-1)) == 0) { // aligned
-            ldst = (unsigned long *)dst;
-            while (cnt >= (sizeof(long))*4) {
-                ldst[0] = ~(ldst[0]);
-                ldst[1] = ~(ldst[1]);
-                ldst[2] = ~(ldst[2]);
-                ldst[3] = ~(ldst[3]);
-                ldst += 4;
-                cnt -= (sizeof(long))*4;
-            }
-            while (cnt >= sizeof(long)) {
-                *ldst = ~(*ldst);
-                ldst++;
-                cnt -= sizeof(long);
-            }
-            dst = (unsigned char *)ldst;
-        }
-        while (cnt--) {
-            *dst = ~(*dst);
-            dst++;
-        }
-        RETURN ( self );
+	cnt = __byteArraySize(self);
+	dst = __ByteArrayInstPtr(self)->ba_element;
+	if (((INT)dst & (sizeof(long)-1)) == 0) { // aligned
+	    ldst = (unsigned long *)dst;
+	    while (cnt >= (sizeof(long))*4) {
+		ldst[0] = ~(ldst[0]);
+		ldst[1] = ~(ldst[1]);
+		ldst[2] = ~(ldst[2]);
+		ldst[3] = ~(ldst[3]);
+		ldst += 4;
+		cnt -= (sizeof(long))*4;
+	    }
+	    while (cnt >= sizeof(long)) {
+		*ldst = ~(*ldst);
+		ldst++;
+		cnt -= sizeof(long);
+	    }
+	    dst = (unsigned char *)ldst;
+	}
+	while (cnt--) {
+	    *dst = ~(*dst);
+	    dst++;
+	}
+	RETURN ( self );
     }
 %}.
     self bitBlitBytesFrom:1 to:self size withConstant:16rFF rule:#bitXor:
@@ -2251,13 +2247,13 @@
     "
      #[1 2 3 4 5 6 7 8 9 10] copy invert
      #[1 2 3 4 5 6 7 8 9 10] copy
-        bitBlitBytesFrom:1 to:10 withConstant:16rFF rule:#bitXor:
+	bitBlitBytesFrom:1 to:10 withConstant:16rFF rule:#bitXor:
 
      |l|
-     l := ByteArray fromHexString:'0102030405060708090a0b0c0d0e0f1112131415161718191a1b1c1d1e1f'. 
+     l := ByteArray fromHexString:'0102030405060708090a0b0c0d0e0f1112131415161718191a1b1c1d1e1f'.
      Time millisecondsToRun:[
-        1000000 timesRepeat:[ l invert ].
-     ]  
+	1000000 timesRepeat:[ l invert ].
+     ]
     "
 !
 
@@ -2418,7 +2414,7 @@
 
 swapBytes
     "swap bytes inplace -
-     Expects that the receiver has an even number of bytes; 
+     Expects that the receiver has an even number of bytes;
      if not, only the pairs excluding the last byte are swapped.
      written as a primitive for speed on image grabbing (if display order is different)."
 
@@ -2429,32 +2425,32 @@
     REGISTER unsigned t;
 
     if (__qClass(self) == @global(ByteArray)) {
-        cnt = __byteArraySize(self);
-        cnt = cnt & ~1; /* make it even */
-        p = __ByteArrayInstPtr(self)->ba_element;
-
-        while (cnt >= sizeof(INT)) {
-            unsigned INT i = ((unsigned INT *)p)[0];
+	cnt = __byteArraySize(self);
+	cnt = cnt & ~1; /* make it even */
+	p = __ByteArrayInstPtr(self)->ba_element;
+
+	while (cnt >= sizeof(INT)) {
+	    unsigned INT i = ((unsigned INT *)p)[0];
 
 #if __POINTER_SIZE__ == 8
-            i = ((i>>8) & 0x00FF00FF00FF00FF) | ((i & 0x00FF00FF00FF00FF) << 8);
+	    i = ((i>>8) & 0x00FF00FF00FF00FF) | ((i & 0x00FF00FF00FF00FF) << 8);
 #else
-            i = ((i>>8) & 0x00FF00FF) | ((i & 0x00FF00FF) << 8);
+	    i = ((i>>8) & 0x00FF00FF) | ((i & 0x00FF00FF) << 8);
 #endif /* __POINTER_SIZE__ */
-            ((unsigned INT *)p)[0] = i;
-            p += sizeof(INT);
-            cnt -= sizeof(INT);
-        }
-        while (cnt > 0) {
-            unsigned short s;
-
-            s = ((unsigned short *)p)[0];
-            s = (s >> 8) | (s << 8);
-            ((unsigned short *)p)[0] = s;
-            p += 2;
-            cnt -= 2;
-        }
-        RETURN ( self );
+	    ((unsigned INT *)p)[0] = i;
+	    p += sizeof(INT);
+	    cnt -= sizeof(INT);
+	}
+	while (cnt > 0) {
+	    unsigned short s;
+
+	    s = ((unsigned short *)p)[0];
+	    s = (s >> 8) | (s << 8);
+	    ((unsigned short *)p)[0] = s;
+	    p += 2;
+	    cnt -= 2;
+	}
+	RETURN ( self );
     }
 %}.
     ^ super swapBytes "/ rubbish - there is no one currenly
@@ -2462,7 +2458,7 @@
     "
      #[1 2 3 4 5 6 7 8 9 10] copy swapBytes     -> #[2 1 4 3 6 5 8 7 10 9]
      #[1 2 3 4 5 6 7 8 9 10 11] copy swapBytes  -> #[2 1 4 3 6 5 8 7 10 9 11]
-     #[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18] copy swapBytes   
+     #[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18] copy swapBytes
     "
 !
 
@@ -2477,16 +2473,16 @@
     unsigned int t;
 
     if (__qClass(self) == @global(ByteArray) && __bothSmallInteger(i1, i2)) {
-        __i1 = __intVal(i1) - 1;
-        __i2 = __intVal(i2) - 1;
-        sz = __byteArraySize(self);
-        p = __ByteArrayInstPtr(self)->ba_element;
-        if (__i1 < sz && __i2 < sz) {
-            t = p[__i1];
-            p[__i1] = p[__i2];
-            p[__i2] = t;
-        }
-        RETURN ( self );
+	__i1 = __intVal(i1) - 1;
+	__i2 = __intVal(i2) - 1;
+	sz = __byteArraySize(self);
+	p = __ByteArrayInstPtr(self)->ba_element;
+	if (__i1 < sz && __i2 < sz) {
+	    t = p[__i1];
+	    p[__i1] = p[__i2];
+	    p[__i2] = t;
+	}
+	RETURN ( self );
     }
 %}.
     ^ super swapIndex:i1 and:i2 "/ rubbish - there is no one currently
@@ -2598,8 +2594,8 @@
 
     cls := self class.
     ((cls == ByteArray or:[cls == ImmutableByteArray]) and:[aGCOrStream isStream]) ifTrue:[
-        self storeOn:aGCOrStream.
-        ^ self
+	self storeOn:aGCOrStream.
+	^ self
     ].
     ^ super displayOn:aGCOrStream
 
@@ -2607,81 +2603,6 @@
     "Modified: 22.4.1996 / 12:54:06 / cg"
 !
 
-hexPrintOn:aStream
-    "print as hex string, eg: 'FF0243'.
-     This string can be used in #fromHexString: to recreate the byteArray"
-
-    self do:[:byte|
-	byte printOn:aStream base:16 size:2 fill:$0.
-    ].
-
-    "
-      #[1 2 3 4 10 17] hexPrintOn:Transcript
-    "
-
-    "
-     |s|
-     s := String streamContents:[:s | #[1 2 3 4 10 17] hexPrintOn:s].
-     ByteArray fromHexString:s
-    "
-!
-
-hexPrintOn:aStream withSeparator:aSeparatorStringOrCharacter
-    "print as hex string, eg: 'FF:02:43'"
-
-    self do:[:byte|
-	byte printOn:aStream base:16 size:2 fill:$0.
-    ] separatedBy:[
-	aSeparatorStringOrCharacter printOn:aStream
-    ].
-
-    "
-      #[1 2 3 4 10 17] hexPrintOn:Transcript withSeparator:$:
-    "
-!
-
-hexPrintString
-    "print as hex string, eg: 'FF0243'.
-     This string can be used in #fromHexString: to recreate the byteArray"
-
-    |s|
-
-    s := '' writeStream.
-    self do:[:byteOrCharacter |
-	|byte|
-	byte := byteOrCharacter isCharacter
-		    ifTrue:[byteOrCharacter codePoint]
-		    ifFalse:[byteOrCharacter].
-	byte printOn:s base:16 size:2 fill:$0.
-    ].
-    ^ s contents.
-
-    "
-      #[1 2 3 4 10 17] hexPrintString
-    "
-
-    "
-     ByteArray fromHexString:#[1 2 3 4 10 17] hexPrintString
-    "
-
-    "Modified: / 03-07-2010 / 01:59:19 / cg"
-!
-
-hexPrintStringWithSeparator:aSeparatorStringOrCharacter
-    "print as hex string, eg: 'FF:02:43'."
-
-    |s|
-
-    s := '' writeStream.
-    self hexPrintOn:s withSeparator:aSeparatorStringOrCharacter.
-    ^ s contents.
-
-    "
-      #[1 2 3 4 10 17] hexPrintStringWithSeparator:$:
-      #[1 2 3 4 10 17] hexPrintStringWithSeparator:Character space
-    "
-!
-
 printOn:aStream
     "append a printed representation to aStream"
 
@@ -2802,22 +2723,22 @@
     REGISTER unsigned char *endP;
 
     if (__isByteArrayLike(self)) {
-        cp = &(__ByteArrayInstPtr(self)->ba_element[0]);
-        endP = cp + __byteArraySize(self);
+	cp = &(__ByteArrayInstPtr(self)->ba_element[0]);
+	endP = cp + __byteArraySize(self);
 #if __POINTER_SIZE__ == 8
-        while (cp+8 < endP) {
-            if ( ((unsigned INT *)cp)[0] & 0x8080808080808080) RETURN( true );
-            cp += 8;
-        }
+	while (cp+8 < endP) {
+	    if ( ((unsigned INT *)cp)[0] & 0x8080808080808080) RETURN( true );
+	    cp += 8;
+	}
 #endif
-        while (cp+4 < endP) {
-            if ( ((unsigned int *)cp)[0] & 0x80808080) RETURN( true );
-            cp += 4;
-        }
-        while (cp < endP) {
-            if (*cp++ & 0x80) RETURN( true );
-        }
-        RETURN ( false );
+	while (cp+4 < endP) {
+	    if ( ((unsigned int *)cp)[0] & 0x80808080) RETURN( true );
+	    cp += 4;
+	}
+	while (cp < endP) {
+	    if (*cp++ & 0x80) RETURN( true );
+	}
+	RETURN ( false );
     }
 %}
 .
@@ -2841,22 +2762,22 @@
     int len;
 
     if (__isByteArrayLike(self)) {
-        max = 0;
-        index = 0;
-        len = __qSize(self) - OHDR_SIZE;
-        cp = &(__ByteArrayInstPtr(self)->ba_element[0]);
-
-        while (++index <= len) {
-            unsigned int byte;
-
-            byte = *cp;
-            cp++;
-            if (byte > max) {
-                max = byte;
-                if (byte == 255) break;
-            }
-        }
-        RETURN ( __mkSmallInteger(max) );
+	max = 0;
+	index = 0;
+	len = __qSize(self) - OHDR_SIZE;
+	cp = &(__ByteArrayInstPtr(self)->ba_element[0]);
+
+	while (++index <= len) {
+	    unsigned int byte;
+
+	    byte = *cp;
+	    cp++;
+	    if (byte > max) {
+		max = byte;
+		if (byte == 255) break;
+	    }
+	}
+	RETURN ( __mkSmallInteger(max) );
     }
 %}.
     ^ super max
@@ -2993,7 +2914,6 @@
     "
 ! !
 
-
 !ByteArray methodsFor:'searching'!
 
 indexOf:aByte startingAt:start
@@ -3010,46 +2930,46 @@
     OBJ cls;
 
     if (__isSmallInteger(aByte) &&__isBytes(self)) {
-        byteValue = __intVal(aByte);
-
-        if (byteValue & ~0xFF /* i.e. (byteValue < 0) || (byteValue > 255) */) {
-            /*
-             * searching for something which cannot be found
-             */
-            RETURN ( __mkSmallInteger(0) );
-        }
-
-        if (__isSmallInteger(start)) {
-            index = __intVal(start);
-            len = __byteArraySize(self);
-            cp = __ByteArrayInstPtr(self)->ba_element;
-            if ((cls = __qClass(self)) != @global(ByteArray)) {
-                int nInst;
-
-                nInst = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-                cp += nInst;
-                len -= nInst;
-            }
-            cp += index - 1;
+	byteValue = __intVal(aByte);
+
+	if (byteValue & ~0xFF /* i.e. (byteValue < 0) || (byteValue > 255) */) {
+	    /*
+	     * searching for something which cannot be found
+	     */
+	    RETURN ( __mkSmallInteger(0) );
+	}
+
+	if (__isSmallInteger(start)) {
+	    index = __intVal(start);
+	    len = __byteArraySize(self);
+	    cp = __ByteArrayInstPtr(self)->ba_element;
+	    if ((cls = __qClass(self)) != @global(ByteArray)) {
+		int nInst;
+
+		nInst = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+		cp += nInst;
+		len -= nInst;
+	    }
+	    cp += index - 1;
 #ifdef __UNROLL_LOOPS__
-            while ((index+4) < len) {
-                if (cp[0] == byteValue) { RETURN ( __mkSmallInteger(index) ); }
-                if (cp[1] == byteValue) { RETURN ( __mkSmallInteger(index+1) ); }
-                if (cp[2] == byteValue) { RETURN ( __mkSmallInteger(index+2) ); }
-                if (cp[3] == byteValue) { RETURN ( __mkSmallInteger(index+3) ); }
-                index += 4;
-                cp += 4;
-            }
+	    while ((index+4) < len) {
+		if (cp[0] == byteValue) { RETURN ( __mkSmallInteger(index) ); }
+		if (cp[1] == byteValue) { RETURN ( __mkSmallInteger(index+1) ); }
+		if (cp[2] == byteValue) { RETURN ( __mkSmallInteger(index+2) ); }
+		if (cp[3] == byteValue) { RETURN ( __mkSmallInteger(index+3) ); }
+		index += 4;
+		cp += 4;
+	    }
 #endif
-            while (index <= len) {
-                if (*cp == byteValue) {
-                    RETURN ( __mkSmallInteger(index) );
-                }
-                index++;
-                cp++;
-            }
-            RETURN ( __mkSmallInteger(0) );
-        }
+	    while (index <= len) {
+		if (*cp == byteValue) {
+		    RETURN ( __mkSmallInteger(index) );
+		}
+		index++;
+		cp++;
+	    }
+	    RETURN ( __mkSmallInteger(0) );
+	}
     }
 %}.
     ^ super indexOf:aByte startingAt:start
@@ -3059,7 +2979,6 @@
     "
 ! !
 
-
 !ByteArray methodsFor:'testing'!
 
 isByteArray
--- a/Character.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/Character.st	Wed Aug 05 22:44:27 2015 +0100
@@ -201,85 +201,85 @@
     c1 := aStream next.
     codePoint := c1 codePoint.
     codePoint <= 16r7F ifTrue:[
-        "/ 0xxxxxxx - 7 bits
-        ^ c1 asCharacter.
+	"/ 0xxxxxxx - 7 bits
+	^ c1 asCharacter.
     ].
 
     (codePoint bitAnd:2r11000000) == 2r10000000 ifTrue:[
-        "/ out of sync (got an intermediate character)
-        InvalidEncodingError raiseRequestWith:codePoint errorString:' - out of sync'.
-        ^ c1 asCharacter.
+	"/ out of sync (got an intermediate character)
+	InvalidEncodingError raiseRequestWith:codePoint errorString:' - out of sync'.
+	^ c1 asCharacter.
     ].
 
     fetchNext := [  |code|
-                    code := aStream next codePoint.
-                    (code bitAnd:2r11000000) == 2r10000000 ifFalse:[
-                        "/ followup chars must have 2r10 in high bits
-                        InvalidEncodingError raiseRequestWith:code.
-                        ^ c1 asCharacter.
-                    ].
-                    code bitAnd:16r3F
-                 ].
+		    code := aStream next codePoint.
+		    (code bitAnd:2r11000000) == 2r10000000 ifFalse:[
+			"/ followup chars must have 2r10 in high bits
+			InvalidEncodingError raiseRequestWith:code.
+			^ c1 asCharacter.
+		    ].
+		    code bitAnd:16r3F
+		 ].
 
     (codePoint bitAnd:2r11100000) == 2r11000000 ifTrue:[
-        "/ 110xxxxx 10xxxxxx - 11 bits
-        codePoint := codePoint bitAnd:16r1F.
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint <= 16r7F ifTrue:[
-            InvalidEncodingError raiseRequestWith:codePoint.
-        ].
-        ^ Character codePoint:codePoint
+	"/ 110xxxxx 10xxxxxx - 11 bits
+	codePoint := codePoint bitAnd:16r1F.
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint <= 16r7F ifTrue:[
+	    InvalidEncodingError raiseRequestWith:codePoint.
+	].
+	^ Character codePoint:codePoint
     ].
     (codePoint bitAnd:2r11110000) == 2r11100000 ifTrue:[
-        "/ 1110xxxx 10xxxxxx 10xxxxxx - 16 bits
-        codePoint := codePoint bitAnd:16r0F.
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint <= 16r7FF ifTrue:[
-            InvalidEncodingError raiseRequestWith:codePoint.
-        ].
-        ^ Character codePoint:codePoint
+	"/ 1110xxxx 10xxxxxx 10xxxxxx - 16 bits
+	codePoint := codePoint bitAnd:16r0F.
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint <= 16r7FF ifTrue:[
+	    InvalidEncodingError raiseRequestWith:codePoint.
+	].
+	^ Character codePoint:codePoint
     ].
 
     (codePoint bitAnd:2r11111000) == 2r11110000 ifTrue:[
-        "/ 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - 21 bits
-        codePoint := codePoint bitAnd:16r07.
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint <= 16rFFFF ifTrue:[
-            InvalidEncodingError raiseRequestWith:codePoint.
-        ].
-        ^ Character codePoint:codePoint
+	"/ 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - 21 bits
+	codePoint := codePoint bitAnd:16r07.
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint <= 16rFFFF ifTrue:[
+	    InvalidEncodingError raiseRequestWith:codePoint.
+	].
+	^ Character codePoint:codePoint
     ].
 
     (codePoint bitAnd:2r11111100) == 2r11111000 ifTrue:[
-        "/ 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - 26 bits
-        codePoint := codePoint bitAnd:16r03.
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
-        codePoint <= 16r1FFFFF ifTrue:[
-            InvalidEncodingError raiseRequestWith:codePoint.
-        ].
-        ^ Character codePoint:codePoint
+	"/ 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - 26 bits
+	codePoint := codePoint bitAnd:16r03.
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint := (codePoint bitShift:6) bitOr:(fetchNext value).
+	codePoint <= 16r1FFFFF ifTrue:[
+	    InvalidEncodingError raiseRequestWith:codePoint.
+	].
+	^ Character codePoint:codePoint
     ].
 
     (codePoint bitAnd:2r11111110) == 2r11111100 ifTrue:[
-        "/ 1111110x ... 10xxxxxx - any number of bits
-        codePoint := codePoint bitAnd:16r01.
-
-        c2 := aStream peek.
-        [c2 notNil and:[(c2 codePoint bitAnd:2r11000000) == 2r10000000]] whileTrue:[
-            codePoint := (codePoint bitShift:6) bitOr:(c2 codePoint bitAnd:16r3F).
-            aStream next.
-            c2 := aStream peek.
-        ].
-        codePoint <= 16r3FFFFFF ifTrue:[
-            InvalidEncodingError raiseRequestWith:codePoint.
-        ].
-        ^ Character codePoint:codePoint
+	"/ 1111110x ... 10xxxxxx - any number of bits
+	codePoint := codePoint bitAnd:16r01.
+
+	c2 := aStream peek.
+	[c2 notNil and:[(c2 codePoint bitAnd:2r11000000) == 2r10000000]] whileTrue:[
+	    codePoint := (codePoint bitShift:6) bitOr:(c2 codePoint bitAnd:16r3F).
+	    aStream next.
+	    c2 := aStream peek.
+	].
+	codePoint <= 16r3FFFFFF ifTrue:[
+	    InvalidEncodingError raiseRequestWith:codePoint.
+	].
+	^ Character codePoint:codePoint
     ].
 
     InvalidEncodingError raiseRequestWith:codePoint.
@@ -295,12 +295,12 @@
       |utf8Encoding original readBack|
 
       1 to:16rFFFF do:[:codePoint |
-        original := Character value:codePoint.
-        utf8Encoding := original utf8Encoded.
-        readBack := Character utf8DecodeFrom:(utf8Encoding readStream).
-        readBack codePoint = codePoint ifFalse:[
-            self halt
-        ]
+	original := Character value:codePoint.
+	utf8Encoding := original utf8Encoded.
+	readBack := Character utf8DecodeFrom:(utf8Encoding readStream).
+	readBack codePoint = codePoint ifFalse:[
+	    self halt
+	]
       ]
     "
 !
@@ -1726,15 +1726,15 @@
 characterSize
     "return the number of bits I require for storage.
      Protocol compatibility with CharacterArray."
-    
+
     asciivalue <= 16r80 ifTrue:[
-        ^ 7
+	^ 7
     ].
     asciivalue <= 16rFF ifTrue:[
-        ^ 8
+	^ 8
     ].
     asciivalue <= 16rFFFF ifTrue:[
-        ^ 16
+	^ 16
     ].
     ^ 32
 !
@@ -1914,198 +1914,200 @@
 %{  /* NOCONTEXT */
 
     REGISTER unsigned INT val;
+    REGISTER unsigned int lowByte;
 #define TRUE_IF_ODD(x)      ((x & 1) ? true : false)
 #define TRUE_IF_EVEN(x)     ((x & 1) ? false : true)
 
     /* because used so often, this is open coded, instead of table driven */
     val = __intVal(__INST(asciivalue));
+    lowByte = val & 0xFF;
 
     /* the most likely case here, outside the switch */
     if (val <= 0xFF) {
-	if ((unsigned INT)(val - 'a') <= ('z' - 'a')) {
+	if ((unsigned)(lowByte - 'a') <= ('z' - 'a')) {
 	    RETURN ( true );
 	}
 
 	/* iso8859 puts national lower case characters at e0 .. ff */
-	if ((val >= 0xDF) && (val <= 0xFF)) {
-	    if (val != 0xF7) {
+	if ((lowByte >= 0xDF) && (lowByte <= 0xFF)) {
+	    if (lowByte != 0xF7) {
 		RETURN(true);
 	    }
 	}
-	if (val == 0xAA) RETURN(true);     /* FEMININE ORDINAL INDICATOR (high a-underline) */
-	if (val == 0xB5) RETURN(true);     /* MICRO SIGN */
-	if (val == 0xBA) RETURN(true);     /* MASCULINE ORDINAL INDICATOR (high o-underline) */
+	if (lowByte == 0xAA) RETURN(true);     /* FEMININE ORDINAL INDICATOR (high a-underline) */
+	if (lowByte == 0xB5) RETURN(true);     /* MICRO SIGN */
+	if (lowByte == 0xBA) RETURN(true);     /* MASCULINE ORDINAL INDICATOR (high o-underline) */
 	RETURN (false);
     }
 
     switch (val >> 8) {
 	case 0x01:
-	    if (val <= 0x0137) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val <= 0x0148) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val <= 0x0178) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val <= 0x017E) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val <= 0x0180) { RETURN (true); }
-	    if (val < 0x01CD) {
-		if (val == 0x0181) { RETURN (false); }
-		if (val <= 0x0185) {
-		    RETURN (TRUE_IF_ODD(val));
+	    if (lowByte <= 0x37) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte <= 0x48) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte <= 0x78) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte <= 0x7E) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte <= 0x80) { RETURN (true); }
+	    if (lowByte < 0xCD) {
+		if (lowByte == 0x81) { RETURN (false); }
+		if (lowByte <= 0x85) {
+		    RETURN (TRUE_IF_ODD(lowByte));
 		}
-		if (val == 0x0188) { RETURN (true); }
-		if (val == 0x018C) { RETURN (true); }
-		if (val == 0x018D) { RETURN (true); }
-		if (val == 0x0192) { RETURN (true); }
-		if (val == 0x0195) { RETURN (true); }
-		if (val == 0x0199) { RETURN (true); }
-		if (val == 0x019A) { RETURN (true); }
-		if (val == 0x019B) { RETURN (true); }
-		if (val == 0x019E) { RETURN (true); }
-		if (val <= 0x01A0) { RETURN (false); }
-		if (val <= 0x01A6) { RETURN (TRUE_IF_ODD(val)); }
-		if (val <= 0x01AA) { RETURN (TRUE_IF_EVEN(val)); }
-		if (val <= 0x01AE) { RETURN (TRUE_IF_ODD(val)); }
-		if (val == 0x01B2) { RETURN (false); }
-		if (val <= 0x01B6) { RETURN (TRUE_IF_EVEN(val)); }
-		if (val == 0x01B9) { RETURN (true); }
-		if (val == 0x01BA) { RETURN (true); }
-		if (val == 0x01BD) { RETURN (true); }
-		if (val == 0x01BE) { RETURN (true); }
-		if (val == 0x01BF) { RETURN (true); }
-		if (val == 0x01C6) { RETURN (true); }
-		if (val == 0x01C9) { RETURN (true); }
-		if (val == 0x01CC) { RETURN (true); }
+		if (lowByte == 0x88) { RETURN (true); }
+		if (lowByte == 0x8C) { RETURN (true); }
+		if (lowByte == 0x8D) { RETURN (true); }
+		if (lowByte == 0x92) { RETURN (true); }
+		if (lowByte == 0x95) { RETURN (true); }
+		if (lowByte == 0x99) { RETURN (true); }
+		if (lowByte == 0x9A) { RETURN (true); }
+		if (lowByte == 0x9B) { RETURN (true); }
+		if (lowByte == 0x9E) { RETURN (true); }
+		if (lowByte <= 0xA0) { RETURN (false); }
+		if (lowByte <= 0xA6) { RETURN (TRUE_IF_ODD(lowByte)); }
+		if (lowByte <= 0xAA) { RETURN (TRUE_IF_EVEN(lowByte)); }
+		if (lowByte <= 0xAE) { RETURN (TRUE_IF_ODD(lowByte)); }
+		if (lowByte == 0xB2) { RETURN (false); }
+		if (lowByte <= 0xB6) { RETURN (TRUE_IF_EVEN(lowByte)); }
+		if (lowByte == 0xB9) { RETURN (true); }
+		if (lowByte == 0xBA) { RETURN (true); }
+		if (lowByte == 0xBD) { RETURN (true); }
+		if (lowByte == 0xBE) { RETURN (true); }
+		if (lowByte == 0xBF) { RETURN (true); }
+		if (lowByte == 0xC6) { RETURN (true); }
+		if (lowByte == 0xC9) { RETURN (true); }
+		if (lowByte == 0xCC) { RETURN (true); }
 		RETURN (false);
 	    }
-	    if (val <= 0x01DC) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val <= 0x01EF) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val == 0x01F0) { RETURN (true); }
-	    if (val == 0x01F1) { RETURN (false); }
-	    if (val == 0x01F2) { RETURN (false); }
-	    if (val == 0x01F3) { RETURN (true); }
-	    if (val <= 0x01F6) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val == 0x01F7) { RETURN (false); }
-	    RETURN (TRUE_IF_ODD(val));
+	    if (lowByte <= 0xDC) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte <= 0xEF) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte == 0xF0) { RETURN (true); }
+	    if (lowByte == 0xF1) { RETURN (false); }
+	    if (lowByte == 0xF2) { RETURN (false); }
+	    if (lowByte == 0xF3) { RETURN (true); }
+	    if (lowByte <= 0xF6) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte == 0xF7) { RETURN (false); }
+	    RETURN (TRUE_IF_ODD(lowByte));
 
 	case 0x02:
-	    if (val <= 0x0233) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val <= 0x0236) { RETURN (true); }
-	    if (val < 0x0250) { RETURN (false); }
-	    if (val < 0x02B0) { RETURN (true); }
+	    if (lowByte <= 0x33) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte <= 0x36) { RETURN (true); }
+	    if (lowByte < 0x50) { RETURN (false); }
+	    if (lowByte < 0xB0) { RETURN (true); }
 	    RETURN (false);
 
 
 	case 0x03:
-	    if (val == 0x0390) { RETURN (true); }
-	    if (val <= 0x03AB) { RETURN (false); }
-	    if (val <= 0x03D1) { RETURN (true); }
-	    if (val == 0x03D5) { RETURN (true); }
-	    if (val == 0x03D6) { RETURN (true); }
-	    if (val < 0x03D7) { RETURN (false); }
-	    if (val <= 0x03EF) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val <= 0x03F3) { RETURN (true); }
-	    if (val == 0x03F5) { RETURN (true); }
+	    if (lowByte == 0x90) { RETURN (true); }
+	    if (lowByte <= 0xAB) { RETURN (false); }
+	    if (lowByte <= 0xD1) { RETURN (true); }
+	    if (lowByte == 0xD5) { RETURN (true); }
+	    if (lowByte == 0xD6) { RETURN (true); }
+	    if (lowByte < 0xD7) { RETURN (false); }
+	    if (lowByte <= 0xEF) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte <= 0xF3) { RETURN (true); }
+	    if (lowByte == 0xF5) { RETURN (true); }
 #ifndef UNICODE_3_2
-	    if (val == 0x03F8) { RETURN (true); }
-	    if (val == 0x03FB) { RETURN (true); }
+	    if (lowByte == 0xF8) { RETURN (true); }
+	    if (lowByte == 0xFB) { RETURN (true); }
 #endif
 	    RETURN (false);
 
 	case 0x04:
-	    if (val <= 0x042F) { RETURN (false); }
-	    if (val <= 0x045F) { RETURN (true); }
-	    if (val <= 0x0481) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val < 0x048A) { RETURN (false); }
-	    if (val <= 0x04C0) { RETURN (TRUE_IF_ODD(val)); }
+	    if (lowByte <= 0x2F) { RETURN (false); }
+	    if (lowByte <= 0x5F) { RETURN (true); }
+	    if (lowByte <= 0x81) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte < 0x8A) { RETURN (false); }
+	    if (lowByte <= 0xC0) { RETURN (TRUE_IF_ODD(lowByte)); }
 #ifdef UNICODE_3_2
-	    if (val == 0x04C5) { RETURN (true); }
+	    if (lowByte == 0xC5) { RETURN (true); }
 #endif
 #ifdef UNICODE_3_2
-	    if (val <= 0x04C8) { RETURN (TRUE_IF_EVEN(val)); }
+	    if (lowByte <= 0xC8) { RETURN (TRUE_IF_EVEN(lowByte)); }
 #else
-	    if (val <= 0x04CA) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val == 0x04CD) { RETURN (false); }
-	    if (val == 0x04CE) { RETURN (true); }
+	    if (lowByte <= 0xCA) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte == 0xCD) { RETURN (false); }
+	    if (lowByte == 0xCE) { RETURN (true); }
 #endif
-	    if (val == 0x04CB) { RETURN (false); }
-	    if (val == 0x04CC) { RETURN (true); }
-	    RETURN (TRUE_IF_ODD(val));
+	    if (lowByte == 0xCB) { RETURN (false); }
+	    if (lowByte == 0xCC) { RETURN (true); }
+	    RETURN (TRUE_IF_ODD(lowByte));
 
 	case 0x05:
-	    if (val <= 0x050F) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val < 0x0561) { RETURN (false); }
-	    if (val <= 0x0587) { RETURN (true); }
+	    if (lowByte <= 0x0F) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte < 0x61) { RETURN (false); }
+	    if (lowByte <= 0x87) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x1D:
 #ifndef UNICODE_3_2
-	    if (val <= 0x1D2B) { RETURN (true); }
-	    if (val <= 0x1D61) { RETURN (false); }
-	    if (val <= 0x1D70) { RETURN (true); }
+	    if (lowByte <= 0x2B) { RETURN (true); }
+	    if (lowByte <= 0x61) { RETURN (false); }
+	    if (lowByte <= 0x70) { RETURN (true); }
 #endif
 	    RETURN (false);
 
 	case 0x1E:
-	    if (val < 0x1E96) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val <= 0x1E9F) { RETURN (true); }
-	    RETURN (TRUE_IF_ODD(val));
+	    if (lowByte < 0x96) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte <= 0x9F) { RETURN (true); }
+	    RETURN (TRUE_IF_ODD(lowByte));
 
 	case 0x1F:
-	    if (val <= 0x1F6F) {
-		if (val & 0x0008) { RETURN (false); }
+	    if (lowByte <= 0x6F) {
+		if (lowByte & 0x0008) { RETURN (false); }
 		RETURN (true);
 	    }
-	    if (val <= 0x1F87) { RETURN (true); }
-	    if (val < 0x1FB8) {
-		if (val & 0x0008) { RETURN (false); }
+	    if (lowByte <= 0x87) { RETURN (true); }
+	    if (lowByte < 0xB8) {
+		if (lowByte & 0x0008) { RETURN (false); }
 		RETURN (true);
 	    }
-	    if (val == 0x1FBE) { RETURN (true); }
-	    if (val == 0x1FD4) { RETURN (false); }
-	    if (val == 0x1FC5) { RETURN (false); }
-	    if (val == 0x1FD5) { RETURN (false); }
-	    if (val == 0x1FC1) { RETURN (false); }
-	    if (val == 0x1FF1) { RETURN (false); }
-	    if (val == 0x1FC0) { RETURN (false); }
-	    if (val == 0x1FF0) { RETURN (false); }
-	    if (((val & 0x000F) >= 0x0000) && ((val & 0x000F) <= 0x0007)) { RETURN (true); }
+	    if (lowByte == 0xBE) { RETURN (true); }
+	    if (lowByte == 0xD4) { RETURN (false); }
+	    if (lowByte == 0xC5) { RETURN (false); }
+	    if (lowByte == 0xD5) { RETURN (false); }
+	    if (lowByte == 0xC1) { RETURN (false); }
+	    if (lowByte == 0xF1) { RETURN (false); }
+	    if (lowByte == 0xC0) { RETURN (false); }
+	    if (lowByte == 0xF0) { RETURN (false); }
+	    if (((lowByte & 0x000F) >= 0x0000) && ((lowByte & 0x000F) <= 0x0007)) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x20:
 #ifndef UNICODE_3_2
-	    if (val == 0x2071) { RETURN (true); }
+	    if (lowByte == 0x71) { RETURN (true); }
 #endif
-	    if (val == 0x207F) { RETURN (true); }
+	    if (lowByte == 0x7F) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x21:
-	    if (val == 0x210A) { RETURN (true); }
-	    if (val < 0x210E) { RETURN (false); }
-	    if (val <= 0x210F) { RETURN (true); }
-	    if (val == 0x2113) { RETURN (true); }
-	    if (val == 0x212F) { RETURN (true); }
-	    if (val == 0x2134) { RETURN (true); }
-	    if (val == 0x2139) { RETURN (true); }
+	    if (lowByte == 0x0A) { RETURN (true); }
+	    if (lowByte < 0x0E) { RETURN (false); }
+	    if (lowByte <= 0x0F) { RETURN (true); }
+	    if (lowByte == 0x13) { RETURN (true); }
+	    if (lowByte == 0x2F) { RETURN (true); }
+	    if (lowByte == 0x34) { RETURN (true); }
+	    if (lowByte == 0x39) { RETURN (true); }
 #ifndef UNICODE_3_2
-	    if (val == 0x213D) { RETURN (true); }
-	    if (val <= 0x2145) { RETURN (false); }
-	    if (val <= 0x2149) { RETURN (true); }
+	    if (lowByte == 0x3D) { RETURN (true); }
+	    if (lowByte <= 0x45) { RETURN (false); }
+	    if (lowByte <= 0x49) { RETURN (true); }
 #endif
 	    RETURN (false);
 
 	case 0xFB:
-	    if (val <= 0xFB1C) { RETURN (true); }
+	    if (lowByte <= 0x1C) { RETURN (true); }
 	    RETURN (false);
 
 	case 0xFF:
-	    if ((val >= 0xFF41) && (val <= 0xFF5A)) { RETURN (true); }
+	    if ((lowByte >= 0x41) && (lowByte <= 0x5A)) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x104:
-	    if (val <= 0x10427) { RETURN (false); }
-	    if (val <= 0x1044D) { RETURN (true); }
+	    if (lowByte <= 0x27) { RETURN (false); }
+	    if (lowByte <= 0x4D) { RETURN (true); }
 #ifdef UNICODE_3_2
-	    if (val <= 0x1044D) { RETURN (true); }
+	    if (lowByte <= 0x4D) { RETURN (true); }
 #else
-	    if (val <= 0x1044F) { RETURN (true); }
+	    if (lowByte <= 0x4F) { RETURN (true); }
 #endif
 	    RETURN (false);
 
@@ -2126,11 +2128,11 @@
 
 #ifdef UNICODE_4
 	case 0x1D7:
-	    if (val <= 0x1D71b) { RETURN (true); }
-	    if (val <= 0x1D735) { RETURN (false); }
-	    if (val <= 0x1D755) { RETURN (true); }
-	    if (val <= 0x1D76f) { RETURN (false); }
-	    if (val <= 0x1D78F) { RETURN (true); }
+	    if (lowByte <= 0x1b) { RETURN (true); }
+	    if (lowByte <= 0x35) { RETURN (false); }
+	    if (lowByte <= 0x55) { RETURN (true); }
+	    if (lowByte <= 0x6f) { RETURN (false); }
+	    if (lowByte <= 0x8F) { RETURN (true); }
 
 	    RETURN (false);
 #endif
@@ -2200,17 +2202,19 @@
 
     /* because used so often, this is open coded, instead of table driven */
     REGISTER unsigned INT val;
+    REGISTER int lowByte;
 
     val = __intVal(__INST(asciivalue));
+    lowByte = val & 0xFF;
 
     /* the most likely case here, outside the switch */
     if (val <= 0xFF) {
-	if ((unsigned INT)(val - 'A') <= ('Z' - 'A')) {
+	if ((unsigned int)(lowByte - 'A') <= ('Z' - 'A')) {
 	    RETURN ( true );
 	}
 	/* iso8859 puts national upper case characters at c0 .. df */
-	if ((val >= 0xC0) && (val <= 0xDE)) {
-	    if (val != 0xD7) {
+	if ((lowByte >= 0xC0) && (lowByte <= 0xDE)) {
+	    if (lowByte != 0xD7) {
 		RETURN(true);
 	    }
 	}
@@ -2219,164 +2223,164 @@
 
     switch (val >> 8) {
 	case 0x01:
-	    if (val <= 0x0137) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val <= 0x0148) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val <= 0x0178) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val <= 0x017E) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val < 0x01CD) {
-		if (val == 0x0180) { RETURN (false); }
-		if (val == 0x0181) { RETURN (true); }
-		if (val <= 0x0186) {
-		    RETURN (TRUE_IF_EVEN(val));
+	    if (lowByte <= 0x37) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte <= 0x48) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte <= 0x78) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte <= 0x7E) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte < 0xCD) {
+		if (lowByte == 0x80) { RETURN (false); }
+		if (lowByte == 0x81) { RETURN (true); }
+		if (lowByte <= 0x86) {
+		    RETURN (TRUE_IF_EVEN(lowByte));
 		}
-		if (val <= 0x0189) {
-		    RETURN (TRUE_IF_ODD(val));
+		if (lowByte <= 0x89) {
+		    RETURN (TRUE_IF_ODD(lowByte));
 		}
-		if (val <= 0x018B) { RETURN (true); }
-		if (val <= 0x018D) { RETURN (false); }
-		if (val <= 0x0191) { RETURN (true); }
-		if (val == 0x0193) { RETURN (true); }
-		if (val == 0x0194) { RETURN (true); }
-		if (val == 0x0196) { RETURN (true); }
-		if (val == 0x0197) { RETURN (true); }
-		if (val == 0x0198) { RETURN (true); }
-		if (val == 0x019C) { RETURN (true); }
-		if (val == 0x019D) { RETURN (true); }
-		if (val == 0x019F) { RETURN (true); }
-		if (val < 0x01A0) { RETURN (false); }
-		if (val <= 0x01A6) { RETURN (TRUE_IF_EVEN(val)); }
-		if (val <= 0x01AA) { RETURN (TRUE_IF_ODD(val)); }
-		if (val <= 0x01AE) { RETURN (TRUE_IF_EVEN(val)); }
-		if (val == 0x01B2) { RETURN (true); }
-		if (val <= 0x01B7) { RETURN (TRUE_IF_ODD(val)); }
-		if (val == 0x01B8) { RETURN (true); }
-		if (val == 0x01BC) { RETURN (true); }
-		if (val == 0x01C4) { RETURN (true); }
-		if (val == 0x01C7) { RETURN (true); }
+		if (lowByte <= 0x8B) { RETURN (true); }
+		if (lowByte <= 0x8D) { RETURN (false); }
+		if (lowByte <= 0x91) { RETURN (true); }
+		if (lowByte == 0x93) { RETURN (true); }
+		if (lowByte == 0x94) { RETURN (true); }
+		if (lowByte == 0x96) { RETURN (true); }
+		if (lowByte == 0x97) { RETURN (true); }
+		if (lowByte == 0x98) { RETURN (true); }
+		if (lowByte == 0x9C) { RETURN (true); }
+		if (lowByte == 0x9D) { RETURN (true); }
+		if (lowByte == 0x9F) { RETURN (true); }
+		if (lowByte < 0xA0) { RETURN (false); }
+		if (lowByte <= 0xA6) { RETURN (TRUE_IF_EVEN(lowByte)); }
+		if (lowByte <= 0xAA) { RETURN (TRUE_IF_ODD(lowByte)); }
+		if (lowByte <= 0xAE) { RETURN (TRUE_IF_EVEN(lowByte)); }
+		if (lowByte == 0xB2) { RETURN (true); }
+		if (lowByte <= 0xB7) { RETURN (TRUE_IF_ODD(lowByte)); }
+		if (lowByte == 0xB8) { RETURN (true); }
+		if (lowByte == 0xBC) { RETURN (true); }
+		if (lowByte == 0xC4) { RETURN (true); }
+		if (lowByte == 0xC7) { RETURN (true); }
 #if 0
-		if (val == 0x01C8) { RETURN (true); }
+		if (lowByte == 0xC8) { RETURN (true); }
 #endif
-		if (val == 0x01CA) { RETURN (true); }
+		if (lowByte == 0xCA) { RETURN (true); }
 #if 0
-		if (val == 0x01CB) { RETURN (true); }
+		if (lowByte == 0xCB) { RETURN (true); }
 #endif
 		RETURN (false);         /* WRONG !!! */
 	    }
-	    if (val <= 0x01DC) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val <= 0x01EF) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val == 0x01F0) { RETURN (false); }
-	    if (val == 0x01F1) { RETURN (true); }
-	    if (val == 0x01F2) { RETURN (false); }
-	    if (val == 0x01F3) { RETURN (false); }
-	    if (val == 0x01F4) { RETURN (true); }
-	    if (val == 0x01F5) { RETURN (false); }
-	    if (val == 0x01F6) { RETURN (true); }
-	    if (val == 0x01F7) { RETURN (true); }
-	    RETURN (TRUE_IF_EVEN(val));
+	    if (lowByte <= 0xDC) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte <= 0xEF) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte == 0xF0) { RETURN (false); }
+	    if (lowByte == 0xF1) { RETURN (true); }
+	    if (lowByte == 0xF2) { RETURN (false); }
+	    if (lowByte == 0xF3) { RETURN (false); }
+	    if (lowByte == 0xF4) { RETURN (true); }
+	    if (lowByte == 0xF5) { RETURN (false); }
+	    if (lowByte == 0xF6) { RETURN (true); }
+	    if (lowByte == 0xF7) { RETURN (true); }
+	    RETURN (TRUE_IF_EVEN(lowByte));
 
 	case 0x02:
-	    if (val <= 0x0233) { RETURN (TRUE_IF_EVEN(val)); }
+	    if (lowByte <= 0x33) { RETURN (TRUE_IF_EVEN(lowByte)); }
 	    RETURN (false);
 
 	case 0x03:
-	    if (val < 0x0386) { RETURN (false); }
-	    if (val == 0x0387) { RETURN (false); }
-	    if (val == 0x0390) { RETURN (false); }
-	    if (val <= 0x03AB) { RETURN (true); }
-	    if (val <= 0x03D1) { RETURN (false); }
-	    if (val <= 0x03D4) { RETURN (true); }
-	    if (val <= 0x03D7) { RETURN (false); }
-	    if (val <= 0x03EF) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val == 0x03F4) { RETURN (true); }
+	    if (lowByte < 0x86) { RETURN (false); }
+	    if (lowByte == 0x87) { RETURN (false); }
+	    if (lowByte == 0x90) { RETURN (false); }
+	    if (lowByte <= 0xAB) { RETURN (true); }
+	    if (lowByte <= 0xD1) { RETURN (false); }
+	    if (lowByte <= 0xD4) { RETURN (true); }
+	    if (lowByte <= 0xD7) { RETURN (false); }
+	    if (lowByte <= 0xEF) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte == 0xF4) { RETURN (true); }
 #ifndef UNICODE_3_2
-	    if (val == 0x03F7) { RETURN (true); }
-	    if (val == 0x03F9) { RETURN (true); }
-	    if (val == 0x03Fa) { RETURN (true); }
+	    if (lowByte == 0xF7) { RETURN (true); }
+	    if (lowByte == 0xF9) { RETURN (true); }
+	    if (lowByte == 0xFa) { RETURN (true); }
 #endif
 	    RETURN (false);
 
 	case 0x04:
-	    if (val <= 0x042F) { RETURN (true); }
-	    if (val <= 0x045F) { RETURN (false); }
-	    if (val <= 0x0481) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val < 0x048A) { RETURN (false); }
-	    if (val <= 0x04C0) { RETURN (TRUE_IF_EVEN(val)); }
+	    if (lowByte <= 0x2F) { RETURN (true); }
+	    if (lowByte <= 0x5F) { RETURN (false); }
+	    if (lowByte <= 0x81) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte < 0x8A) { RETURN (false); }
+	    if (lowByte <= 0xC0) { RETURN (TRUE_IF_EVEN(lowByte)); }
 #ifdef UNICODE_3_2
-	    if (val == 0x04C5) { RETURN (false); }
+	    if (lowByte == 0xC5) { RETURN (false); }
 #endif
 #ifdef UNICODE_3_2
-	    if (val <= 0x04C8) { RETURN (TRUE_IF_ODD(val)); }
+	    if (lowByte <= 0xC8) { RETURN (TRUE_IF_ODD(lowByte)); }
 #else
-	    if (val <= 0x04CA) { RETURN (TRUE_IF_ODD(val)); }
-	    if (val == 0x04CD) { RETURN (true); }
-	    if (val == 0x04CE) { RETURN (false); }
+	    if (lowByte <= 0xCA) { RETURN (TRUE_IF_ODD(lowByte)); }
+	    if (lowByte == 0xCD) { RETURN (true); }
+	    if (lowByte == 0xCE) { RETURN (false); }
 #endif
-	    if (val == 0x04CB) { RETURN (true); }
-	    if (val == 0x04CC) { RETURN (false); }
-	    RETURN (TRUE_IF_EVEN(val));
+	    if (lowByte == 0xCB) { RETURN (true); }
+	    if (lowByte == 0xCC) { RETURN (false); }
+	    RETURN (TRUE_IF_EVEN(lowByte));
 
 	case 0x05:
-	    if (val <= 0x050F) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val < 0x0531) { RETURN (false); }
-	    if (val <= 0x0556) { RETURN (true); }
+	    if (lowByte <= 0x0F) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte < 0x31) { RETURN (false); }
+	    if (lowByte <= 0x56) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x10:
-	    if (val < 0x10A0) { RETURN (false); }
-	    if (val <= 0x10CF) { RETURN (true); }
+	    if (lowByte < 0xA0) { RETURN (false); }
+	    if (lowByte <= 0xCF) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x1E:
-	    if (val < 0x1E96) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val < 0x1EA0) { RETURN (false); }
-	    RETURN (TRUE_IF_EVEN(val));
+	    if (lowByte < 0x96) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte < 0xA0) { RETURN (false); }
+	    RETURN (TRUE_IF_EVEN(lowByte));
 
 	case 0x1F:
-	    if (val <= 0x1F6F) {
-		if (val & 0x0008) { RETURN (true); }
+	    if (lowByte <= 0x6F) {
+		if (lowByte & 0x0008) { RETURN (true); }
 	    }
-	    if (val <= 0x1F87) { RETURN (false); }
-	    if (val < 0x1FB8) { RETURN (false); }
-	    if (val < 0x1FBC) { RETURN (true); }
-	    if (val == 0x1FEC) { RETURN (true); }
-	    if (((val & 0x000F) >= 0x0008) && ((val & 0x000F) <= 0x000B)) { RETURN (true); }
+	    if (lowByte <= 0x87) { RETURN (false); }
+	    if (lowByte < 0xB8) { RETURN (false); }
+	    if (lowByte < 0xBC) { RETURN (true); }
+	    if (lowByte == 0xEC) { RETURN (true); }
+	    if (((lowByte & 0x000F) >= 0x0008) && ((lowByte & 0x000F) <= 0x000B)) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x21:
-	    if (val == 0x2102) { RETURN (true); }
-	    if (val == 0x2107) { RETURN (true); }
-	    if (val < 0x210B) { RETURN (false); }
-	    if (val < 0x210E) { RETURN (true); }
-	    if (val == 0x2110) { RETURN (true); }
-	    if (val == 0x2111) { RETURN (true); }
-	    if (val == 0x2112) { RETURN (true); }
-	    if (val == 0x2115) { RETURN (true); }
-	    if (val == 0x2119) { RETURN (true); }
-	    if (val == 0x211A) { RETURN (true); }
-	    if (val == 0x211B) { RETURN (true); }
-	    if (val == 0x211C) { RETURN (true); }
-	    if (val == 0x211D) { RETURN (true); }
-	    if (val < 0x2124) { RETURN (false); }
-	    if (val <= 0x212A) { RETURN (TRUE_IF_EVEN(val)); }
-	    if (val == 0x212B) { RETURN (true); }
-	    if (val == 0x212C) { RETURN (true); }
-	    if (val == 0x212D) { RETURN (true); }
-	    if (val == 0x2130) { RETURN (true); }
-	    if (val == 0x2131) { RETURN (true); }
-	    if (val == 0x2133) { RETURN (true); }
+	    if (lowByte == 0x02) { RETURN (true); }
+	    if (lowByte == 0x07) { RETURN (true); }
+	    if (lowByte < 0x0B) { RETURN (false); }
+	    if (lowByte < 0x0E) { RETURN (true); }
+	    if (lowByte == 0x10) { RETURN (true); }
+	    if (lowByte == 0x11) { RETURN (true); }
+	    if (lowByte == 0x12) { RETURN (true); }
+	    if (lowByte == 0x15) { RETURN (true); }
+	    if (lowByte == 0x19) { RETURN (true); }
+	    if (lowByte == 0x1A) { RETURN (true); }
+	    if (lowByte == 0x1B) { RETURN (true); }
+	    if (lowByte == 0x1C) { RETURN (true); }
+	    if (lowByte == 0x1D) { RETURN (true); }
+	    if (lowByte < 0x24) { RETURN (false); }
+	    if (lowByte <= 0x2A) { RETURN (TRUE_IF_EVEN(lowByte)); }
+	    if (lowByte == 0x2B) { RETURN (true); }
+	    if (lowByte == 0x2C) { RETURN (true); }
+	    if (lowByte == 0x2D) { RETURN (true); }
+	    if (lowByte == 0x30) { RETURN (true); }
+	    if (lowByte == 0x31) { RETURN (true); }
+	    if (lowByte == 0x33) { RETURN (true); }
 #ifndef UNICODE_3_2
-	    if (val == 0x213E) { RETURN (true); }
-	    if (val == 0x213F) { RETURN (true); }
-	    if (val == 0x2145) { RETURN (true); }
+	    if (lowByte == 0x3E) { RETURN (true); }
+	    if (lowByte == 0x3F) { RETURN (true); }
+	    if (lowByte == 0x45) { RETURN (true); }
 #endif
 	    RETURN (false);
 
 	case 0xFF:
-	    if ((val >= 0xFF21) && (val <= 0xFF3A)) { RETURN (true); }
+	    if ((lowByte >= 0x21) && (lowByte <= 0x3A)) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x104:
-	    if (val <= 0x10427) { RETURN (true); }
+	    if (lowByte <= 0x27) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x1D4:
@@ -2834,7 +2838,7 @@
 	    RETURN (false);
 
 	case 0x1d:
-	    if (val = 0x1d00) { RETURN (true); }
+	    if (val == 0x1d00) { RETURN (true); }
 	    RETURN (false);
 
 	case 0x1e:
@@ -3056,4 +3060,3 @@
 version_CVS
     ^ '$Header$'
 ! !
-
--- a/CharacterArray.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/CharacterArray.st	Wed Aug 05 22:44:27 2015 +0100
@@ -360,7 +360,6 @@
     "
 ! !
 
-
 !CharacterArray class methodsFor:'pattern matching'!
 
 matchEscapeCharacter
@@ -766,7 +765,6 @@
     ^ Unicode32String
 ! !
 
-
 !CharacterArray methodsFor:'Compatibility-ANSI'!
 
 addLineDelimiters
@@ -3139,22 +3137,30 @@
 
     mySize := self size.
     mySize == 0 ifTrue:[^ self].
+
     newStr := self species new:mySize.
     bitsPerCharacter := newStr bitsPerCharacter.
 
+    "/ handle the very seldom case of an uppercase char which needs
+    "/ more bits in its lowercase variant 
+    "/ (there are only a few of them)
+
     1 to:mySize do:[:i |
-	c := (self at:i) asLowercase.
-	(c bitsPerCharacter > bitsPerCharacter
-	 and:[c stringSpecies ~= newStr stringSpecies]) ifTrue:[
-	    newStr := c stringSpecies fromString:newStr.
-	].
-	newStr at:i put:c
+        c := (self at:i) asLowercase.
+        (c bitsPerCharacter > bitsPerCharacter
+         and:[c stringSpecies ~= newStr stringSpecies]) ifTrue:[
+            newStr := c stringSpecies fromString:newStr.
+            bitsPerCharacter := newStr bitsPerCharacter.
+        ].
+        newStr at:i put:c
     ].
     ^ newStr
 
     "
      'HelloWorld' asLowercase
+     'HelloWorld' asUnicode16String asLowercase
      'HelloWorld' asLowercaseFirst
+     'HelloWorld' asUppercase
     "
 !
 
@@ -3376,15 +3382,16 @@
     bitsPerCharacter := newStr bitsPerCharacter.
 
     1 to:mySize do:[:i |
-	i == 1 ifTrue:[
-	    c := (self at:i) asTitlecase.
-	] ifFalse:[
-	    c := (self at:i) asLowercase.
-	].
-	c bitsPerCharacter > bitsPerCharacter ifTrue:[
-	    newStr := c stringSpecies fromString:newStr.
-	].
-	newStr at:i put:c
+        i == 1 ifTrue:[
+            c := (self at:i) asTitlecase.
+        ] ifFalse:[
+            c := (self at:i) asLowercase.
+        ].
+        c bitsPerCharacter > bitsPerCharacter ifTrue:[
+            newStr := c stringSpecies fromString:newStr.
+            bitsPerCharacter := newStr bitsPerCharacter.
+        ].
+        newStr at:i put:c
     ].
     ^ newStr
 
@@ -3546,12 +3553,17 @@
     newStr := self species new:mySize.
     bitsPerCharacter := newStr bitsPerCharacter.
 
+    "/ handle the very seldom case of a lowercase char which needs
+    "/ more bits in its uppercase variant 
+    "/ (there are only a few of them)
+
     1 to:mySize do:[:i |
-	c := (self at:i) asUppercase.
-	c bitsPerCharacter > bitsPerCharacter ifTrue:[
-	    newStr := c stringSpecies fromString:newStr.
-	].
-	newStr at:i put:c
+        c := (self at:i) asUppercase.
+        c bitsPerCharacter > bitsPerCharacter ifTrue:[
+            newStr := c stringSpecies fromString:newStr.
+            bitsPerCharacter := newStr bitsPerCharacter.
+        ].
+        newStr at:i put:c
     ].
     ^ newStr
 
@@ -3559,6 +3571,7 @@
      'helloWorld' asUppercase
      'helloWorld' asUppercaseFirst
      (Character value:16rB5) asString asUppercase   -- needs 16 bits !!
+     (Character value:16rFF) asString asUppercase   -- needs 16 bits !!
     "
 !
 
@@ -5446,18 +5459,18 @@
 !CharacterArray methodsFor:'queries'!
 
 bitsPerCharacter
-    "return the underlying strings bitsPerCharacter
+    "return the underlying string's bitsPerCharacter
      (i.e. is it a regular String or a TwoByteString)"
 
     |string max|
 
     (string := self string) ~~ self ifTrue:[
-	^ string bitsPerCharacter
+        ^ string bitsPerCharacter
     ].
 
     max := 8.
     self do:[:eachCharacter |
-	max := max max:(eachCharacter bitsPerCharacter)
+        max := max max:(eachCharacter bitsPerCharacter)
     ].
     ^ max
 
@@ -5739,7 +5752,6 @@
     "Modified: 17.4.1997 / 12:50:23 / cg"
 ! !
 
-
 !CharacterArray methodsFor:'special string converting'!
 
 asUnixFilenameString
@@ -6782,7 +6794,6 @@
     "
 ! !
 
-
 !CharacterArray methodsFor:'substring searching'!
 
 findRangeOfString:subString
--- a/Collection.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/Collection.st	Wed Aug 05 22:44:27 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
@@ -277,7 +275,6 @@
     ^ self newWithSize:n
 ! !
 
-
 !Collection class methodsFor:'Signal constants'!
 
 emptyCollectionSignal
@@ -528,7 +525,6 @@
     "Created: / 22-10-2008 / 21:29:27 / cg"
 ! !
 
-
 !Collection methodsFor:'accessing'!
 
 anElement
@@ -1954,19 +1950,25 @@
 
     |string 
      index "{ Class: SmallInteger }" 
-     char bitsPerCharacter|
+     char 
+     stringBitsPerCharacter "{ Class: SmallInteger }" 
+     charBitsPerCharacter "{ Class: SmallInteger }" 
+     |
 
     string := String new:(self size).
-    bitsPerCharacter := string bitsPerCharacter.
+    stringBitsPerCharacter := string bitsPerCharacter.
 
     index := 1.
     self do:[:each |
         char := each asCharacter.
-        char bitsPerCharacter > bitsPerCharacter ifTrue:[
-            char bitsPerCharacter == 16 ifTrue:[
+        charBitsPerCharacter := char bitsPerCharacter.
+        charBitsPerCharacter > stringBitsPerCharacter ifTrue:[
+            charBitsPerCharacter == 16 ifTrue:[
                 string := Unicode16String fromString:string.
+                stringBitsPerCharacter := 16.
             ] ifFalse:[
                 string := Unicode32String fromString:string.
+                stringBitsPerCharacter := 32.
             ].
         ].
         string at:index put:char.
@@ -4120,7 +4122,7 @@
     aStream nextPut:$)
 
     "
-     #(1 2 3 'hello' $a $ü) printOn:Transcript
+     #(1 2 3 'hello' $a $ü) printOn:Transcript
      (Array new:100000) printOn:Transcript
      (Array new:100000) printOn:Stdout          
      (Array new:100000) printString size 
@@ -5768,7 +5770,6 @@
     ^ aVisitor visitCollection:self with:aParameter
 ! !
 
-
 !Collection class methodsFor:'documentation'!
 
 version
--- a/ExternalBytes.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/ExternalBytes.st	Wed Aug 05 22:44:27 2015 +0100
@@ -142,6 +142,7 @@
 	return newPtr;
 }
 
+void
 __stx_free(ptr)
     char *ptr;
 {
@@ -153,6 +154,7 @@
 	free(ptr);
 }
 
+void
 __stx_mallocStatistics() {
 	struct mallocList *this;
 	int amount = 0;
@@ -422,8 +424,8 @@
      may change their address.
 
      DANGER ALERT: the memory is NOT automatically freed until it is either
-                   MANUALLY freed (see #free) or the returned externalBytes object
-                   is unprotected or the classes releaseAllMemory method is called."
+		   MANUALLY freed (see #free) or the returned externalBytes object
+		   is unprotected or the classes releaseAllMemory method is called."
 
     |newInst|
 
@@ -455,10 +457,10 @@
      Return a corresponding ExternalBytes object or raise MallocFailure (if malloc fails).
 
      DANGER ALERT: the memory block as allocated will be automatically freed
-                   as soon as the reference to the returned externalBytes object
-                   is gone (by the next garbage collect).
-                   If the memory has been passed to a C-function which
-                   remembers this pointer, bad things may happen ...."
+		   as soon as the reference to the returned externalBytes object
+		   is gone (by the next garbage collect).
+		   If the memory has been passed to a C-function which
+		   remembers this pointer, bad things may happen ...."
 
     |newInst|
 
@@ -568,8 +570,8 @@
 
 %{  /* NOCONTEXT */
     struct {
-        char c;
-        double d;
+	char c;
+	double d;
     } dummy;
     RETURN (__mkSmallInteger( (char *)&dummy.d - (char *)&dummy.c ));
 %}
@@ -592,8 +594,8 @@
 
 %{  /* NOCONTEXT */
     struct {
-        char c;
-        long l;
+	char c;
+	long l;
     } dummy;
     RETURN (__mkSmallInteger( (char *)&dummy.l - (char *)&dummy.c ));
 %}
@@ -658,7 +660,7 @@
     ^ nil
 
     "
-     ExternalBytes sizeofLongDouble 
+     ExternalBytes sizeofLongDouble
     "
 !
 
@@ -1151,24 +1153,24 @@
     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
     "/ ST/X (and some old ST80's) mean: draw-yourself on a GC.
     (aGCOrStream isStream) ifFalse:[
-        ^ super displayOn:aGCOrStream
+	^ super displayOn:aGCOrStream
     ].
 
     aGCOrStream nextPutAll:self className.
     addr := self address.
     addr isNil ifTrue:[
-        aGCOrStream nextPutAll:'[free]'.
+	aGCOrStream nextPutAll:'[free]'.
     ] ifFalse:[
-        size notNil ifTrue:[
-            aGCOrStream nextPutAll:'[sz:'.
-            size printOn:aGCOrStream.
-            aGCOrStream space.
-        ] ifFalse:[
-            aGCOrStream nextPut:$[.
-        ].
-        aGCOrStream nextPutAll:'at:'.
-        addr printOn:aGCOrStream base:16.
-        aGCOrStream nextPut:$].
+	size notNil ifTrue:[
+	    aGCOrStream nextPutAll:'[sz:'.
+	    size printOn:aGCOrStream.
+	    aGCOrStream space.
+	] ifFalse:[
+	    aGCOrStream nextPut:$[.
+	].
+	aGCOrStream nextPutAll:'at:'.
+	addr printOn:aGCOrStream base:16.
+	aGCOrStream nextPut:$].
     ].
 
     "Modified: / 24.2.2000 / 19:02:19 / cg"
@@ -1281,27 +1283,27 @@
      this should speedup class file reading considerably"
 
 %{  /* NOCONTEXT */
-    unsigned char *cp = __INST(address_);
+    unsigned char *cp = (unsigned char *)(__INST(address_));
     unsigned int size = __intVal(__INST(size));
     unsigned char *endP;
 
     if (cp == nil || size == 0) {
-        RETURN(false);
+	RETURN(false);
     }
 
     endP = cp + size;
 #if __POINTER_SIZE__ == 8
     while (cp+8 < endP) {
-        if ( ((unsigned INT *)cp)[0] & 0x8080808080808080) RETURN( true );
-        cp += 8;
+	if ( ((unsigned INT *)cp)[0] & 0x8080808080808080) RETURN( true );
+	cp += 8;
     }
 #endif
     while (cp+4 < endP) {
-        if ( ((unsigned int *)cp)[0] & 0x80808080) RETURN( true );
-        cp += 4;
+	if ( ((unsigned int *)cp)[0] & 0x80808080) RETURN( true );
+	cp += 4;
     }
     while (cp < endP) {
-        if (*cp++ & 0x80) RETURN( true );
+	if (*cp++ & 0x80) RETURN( true );
     }
     RETURN ( false );
 %}
@@ -1366,7 +1368,7 @@
     wasBlocked := OperatingSystem blockInterrupts.
 "/    AccessLock critical:[
     AllocatedInstances notNil ifTrue:[
-        AllocatedInstances remove:self ifAbsent:nil.
+	AllocatedInstances remove:self ifAbsent:nil.
     ].
 "/    ]
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
@@ -1388,32 +1390,32 @@
     char *__stx_realloc();
 
     if (__isSmallInteger(numberOfBytes)) {
-        nBytes = __smallIntegerVal(numberOfBytes);
-        if (nBytes > 0) {
-            prevSpace = (char *)__INST(address_);
-            if (prevSpace == (char *)nil)
-                prevSpace = 0;  /* allocate from scratch */
-            space = __stx_realloc(prevSpace, nBytes);
-            if (space) {
-                __INST(address_) = (OBJ)space;
-                __INST(size) = numberOfBytes;
-                if (space == prevSpace) {
-                    /* same address, no re-registration */
-                    RETURN(self);
-                }
-                mallocStatus = true;
-            } else {
-                mallocStatus = false;
-            }
-        }
+	nBytes = __smallIntegerVal(numberOfBytes);
+	if (nBytes > 0) {
+	    prevSpace = (char *)__INST(address_);
+	    if (prevSpace == (char *)nil)
+		prevSpace = 0;  /* allocate from scratch */
+	    space = __stx_realloc(prevSpace, nBytes);
+	    if (space) {
+		__INST(address_) = (OBJ)space;
+		__INST(size) = numberOfBytes;
+		if (space == prevSpace) {
+		    /* same address, no re-registration */
+		    RETURN(self);
+		}
+		mallocStatus = true;
+	    } else {
+		mallocStatus = false;
+	    }
+	}
     }
 %}.
     mallocStatus == true ifTrue:[
-        Lobby registerChange:self.
+	Lobby registerChange:self.
     ] ifFalse:[mallocStatus == false ifTrue:[
-        ^ MallocFailure raiseRequestWith:numberOfBytes.
+	^ MallocFailure raiseRequestWith:numberOfBytes.
     ] ifFalse:[
-        self primitiveFailed.
+	self primitiveFailed.
     ]].
 ! !
 
--- a/ExternalStream.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/ExternalStream.st	Wed Aug 05 22:44:27 2015 +0100
@@ -1500,7 +1500,7 @@
      To be called on exit of Smalltalk."
 
     Lobby do:[:eachFileStream |
-        eachFileStream close
+	eachFileStream close
     ].
 !
 
@@ -1585,7 +1585,7 @@
      This is invoked via the #earlyRestart change notification."
 
     Lobby do:[:eachFileStream |
-        eachFileStream reOpen
+	eachFileStream reOpen
     ].
 !
 
@@ -2108,12 +2108,13 @@
 
     if (_handle != nil) {
 	if ((__INST(handleType) == @symbol(fileHandle))
-	    || (__INST(handleType) == @symbol(socketHandle))) {
+	 || (__INST(handleType) == @symbol(socketHandle))) {
 	    RETURN (_handle);
-	} else if ((__INST(handleType) == nil)
-		     || (__INST(handleType) == @symbol(filePointer))
-		     || (__INST(handleType) == @symbol(socketFilePointer))
-		     || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	}
+	if ((__INST(handleType) == nil)
+	 || (__INST(handleType) == @symbol(filePointer))
+	 || (__INST(handleType) == @symbol(socketFilePointer))
+	 || (__INST(handleType) == @symbol(pipeFilePointer))) {
 #ifdef WIN32
 	    RETURN(__MKEXTERNALADDRESS(_get_osfhandle(fileno(__FILEVal(_handle)))));
 #else
@@ -2697,11 +2698,7 @@
 
     |error|
 %{
-    FILEPOINTER f;
-    int len, cnt, len1, _buffered;
     OBJ fp;
-    char *cp;
-    int o_offs;
 
     __INST(lastErrorNumber) = nil;
     if ((__INST(handleType) == nil)
@@ -2714,10 +2711,14 @@
 	    && (__INST(binary) != true)
 	    && __isStringLike(aString)
 	) {
-	    f = __FILEVal(fp);
-	    len = __stringSize(aString);
-
-	    if (_buffered = (__INST(buffered) == true)) {
+	    int _buffered = (__INST(buffered) == true);
+	    int len = __stringSize(aString);
+	    int cnt, len1;
+	    FILEPOINTER f = __FILEVal(fp);
+	    char *cp;
+	    int o_offs;
+
+	    if (_buffered) {
 		__WRITING__(f)
 	    }
 #if defined(WIN32) && !defined(__MINGW__)
@@ -3011,7 +3012,8 @@
 
     if (__INST(handleType) == @symbol(socketHandle)) {
 	fd = __FILEVal(fp);
-    } else if ((__INST(handleType) == nil)
+    } else
+	if ((__INST(handleType) == nil)
 	 || (__INST(handleType) == @symbol(filePointer))
 	 || (__INST(handleType) == @symbol(socketFilePointer))
 	 || (__INST(handleType) == @symbol(pipeFilePointer))) {
@@ -3090,8 +3092,12 @@
 	goto out;
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-	fd = __FILEVal(fp);
-    } else if ((__INST(handleType) == nil)
+	// syncing a socket to disk ?
+	error = @symbol(badHandleType);
+	goto out;
+	// fd = __FILEVal(fp);
+    } else
+	if ((__INST(handleType) == nil)
 	       || (__INST(handleType) == @symbol(filePointer))
 	       || (__INST(handleType) == @symbol(socketFilePointer))
 	       || (__INST(handleType) == @symbol(pipeFilePointer))) {
@@ -3155,8 +3161,12 @@
 	goto out;
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-	fd = __FILEVal(fp);
-    } else if ((__INST(handleType) == nil)
+	// syncing a socket to disk ?
+	error = @symbol(badHandleType);
+	goto out;
+	// fd = __FILEVal(fp);
+    } else
+	if ((__INST(handleType) == nil)
 	       || (__INST(handleType) == @symbol(filePointer))
 	       || (__INST(handleType) == @symbol(socketFilePointer))
 	       || (__INST(handleType) == @symbol(pipeFilePointer))) {
@@ -3237,8 +3247,12 @@
 	goto out;
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-	fd = __FILEVal(fp);
-    } else if ((__INST(handleType) == nil)
+	// cg: termina attributes of a socket?
+	error = @symbol(badHandleType);
+	goto out;
+	// fd = __FILEVal(fp);
+    } else
+	if ((__INST(handleType) == nil)
 	 || (__INST(handleType) == @symbol(filePointer))
 	 || (__INST(handleType) == @symbol(socketFilePointer))
 	 || (__INST(handleType) == @symbol(pipeFilePointer))) {
@@ -3268,25 +3282,25 @@
     ixon = t.c_iflag & IXON ? true : false;
     ixoff = t.c_iflag & IXOFF ? true : false;
     ixany = t.c_iflag & IXANY ? true : false;
-#ifdef IMAXBEL
+# ifdef IMAXBEL
     imaxbel = t.c_iflag & IMAXBEL ? true : false;
-#endif
-#ifdef IUCLC
+# endif
+# ifdef IUCLC
     iuclc = t.c_iflag & IUCLC ? true : false;
-#endif
+# endif
 
     opost = t.c_oflag & OPOST ? true : false;
     onlcr = t.c_oflag & ONLCR ? true : false;
-#ifdef OXTABS
+# ifdef OXTABS
     oxtabs = t.c_oflag & OXTABS ? true : false;
-#endif
-#ifdef ONOTEOT
+# endif
+# ifdef ONOTEOT
     onoteot = t.c_oflag & ONOTEOT ? true : false;
-#endif
+# endif
     ocrnl = t.c_oflag & OCRNL ? true : false;
-#ifdef OLCUC
+# ifdef OLCUC
     olcuc = t.c_oflag & OLCUC ? true : false;
-#endif
+# endif
     onocr = t.c_oflag & ONOCR ? true : false;
     onlret = t.c_oflag & ONLRET ? true : false;
 
@@ -3319,18 +3333,18 @@
     echoctl = t.c_lflag & ECHOCTL ? true : false;
     isig = t.c_lflag & ISIG ? true : false;
     icanon = t.c_lflag & ICANON ? true : false;
-#ifdef ALTWERASE
+# ifdef ALTWERASE
     altwerase = t.c_lflag & ALTWERASE ? true : false;
-#endif
-#ifdef IEXTEN
+# endif
+# ifdef IEXTEN
     iexten = t.c_lflag & IEXTEN ? true : false;
-#endif
-#ifdef EXTPROC
+# endif
+# ifdef EXTPROC
     extproc = t.c_lflag & EXTPROC ? true : false;
-#endif
-#ifdef TOSTOP
+# endif
+# ifdef TOSTOP
     tostop = t.c_lflag & TOSTOP ? true : false;
-#endif
+# endif
 
 #else
     error = @symbol(unsupportedOperation);
@@ -4171,10 +4185,7 @@
     |error|
 
 %{
-    FILEPOINTER f;
-    char c;
     OBJ fp;
-    int cnt, _buffered;
 
     __INST(lastErrorNumber) = nil;
     if ((__INST(handleType) == nil)
@@ -4183,13 +4194,16 @@
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
 	if (((fp = __INST(handle)) != nil)
-	    && (__INST(mode) != @symbol(readonly))
-	    && __isSmallInteger(aByteValue)
+	 && (__INST(mode) != @symbol(readonly))
+	 && __isSmallInteger(aByteValue)
 
 	) {
-	    c = __intVal(aByteValue);
-	    f = __FILEVal(fp);
-	    if (_buffered = (__INST(buffered) == true)) {
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    char c = __intVal(aByteValue);
+	    int cnt;
+
+	    if (_buffered) {
 		__WRITING__(f)
 	    }
 #if defined(WIN32) && !defined(__MINGW__)
@@ -4238,8 +4252,6 @@
 	char bytes[4];
 	int intVal;
     } u;
-    FILEPOINTER f;
-    int cnt, _buffered;
     OBJ fp;
 
     __INST(lastErrorNumber) = nil;
@@ -4247,6 +4259,7 @@
 	num = __intVal(aNumber);
     } else {
 #if __POINTER_SIZE__ == 8
+	// always more than 4-bytes
 	goto badArg;
 #else
 	num = __longIntVal(aNumber);
@@ -4270,6 +4283,10 @@
 	if (((fp = __INST(handle)) != nil)
 	 && (__INST(mode) != @symbol(readonly))
 	) {
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    int cnt;
+
 	    if (msbFlag == true) {
 #if defined(__MSBFIRST__)
 		u.intVal = num;
@@ -4290,8 +4307,7 @@
 #endif
 	    }
 
-	    f = __FILEVal(fp);
-	    if (_buffered = (__INST(buffered) == true)) {
+	    if (_buffered) {
 		__WRITING__(f)
 	    }
 	    __WRITEBYTES__(cnt, f, u.bytes, 4, _buffered, __INST(handleType));
@@ -4340,9 +4356,6 @@
 	char bytes[2];
 	short shortVal;
     } u;
-
-    FILEPOINTER f;
-    int cnt, _buffered;
     OBJ fp;
 
     __INST(lastErrorNumber) = nil;
@@ -4352,8 +4365,12 @@
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
 	if (((fp = __INST(handle)) != nil)
-	    && (__INST(mode) != @symbol(readonly))
+	 && (__INST(mode) != @symbol(readonly))
 	) {
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+	    int cnt;
+
 	    if (__isSmallInteger(anIntegerOrCharacter)) {
 		num = __intVal(anIntegerOrCharacter);
 	    } else if (__isCharacter(anIntegerOrCharacter)) {
@@ -4377,8 +4394,7 @@
 #endif
 	    }
 
-	    f = __FILEVal(fp);
-	    if (_buffered = (__INST(buffered) == true)) {
+	    if (_buffered) {
 		__WRITING__(f)
 	    }
 	    __WRITEBYTES__(cnt, f, u.bytes, 2, _buffered, __INST(handleType));
@@ -5317,10 +5333,8 @@
     "return true, if position is at end"
 
 %{
-    FILEPOINTER f;
     OBJ fp, pos, lim;
     char c;
-    int ret, _buffered;
 
     if (__INST(hitEOF) == true) {
 	RETURN (true);
@@ -5346,8 +5360,11 @@
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
 	if ((fp = __INST(handle)) != nil) {
-	    f = __FILEVal(fp);
-	    if (_buffered = (__INST(buffered) == true)) {
+	    int _buffered = (__INST(buffered) == true);
+	    int ret;
+	    FILEPOINTER f = __FILEVal(fp);
+
+	    if (_buffered) {
 		__READING__(f);
 	    } else {
 		if (__INST(readAhead) != nil) {
@@ -5618,24 +5635,24 @@
      reimplemented for speed"
 
 %{
-    FILEPOINTER f;
-    int len, cnt, _buffered;
-    OBJ fp;
-    char *cp;
-
     if ((__INST(handleType) == nil)
      || (__INST(handleType) == @symbol(filePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	OBJ fp;
+
 	__INST(lastErrorNumber) = nil;
 	if (((fp = __INST(handle)) != nil)
-	    && (__INST(mode) != @symbol(readonly))
-	    && (__INST(binary) != true)
+	 && (__INST(mode) != @symbol(readonly))
+	 && (__INST(binary) != true)
 	) {
-	    f = __FILEVal(fp);
-
-	    if (_buffered = (__INST(buffered) == true)) {
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+	    int len, cnt;
+	    char *cp;
+
+	    if (_buffered) {
 		__WRITING__(f)
 	    }
 	    {
@@ -5696,16 +5713,17 @@
     "write all buffered data - ignored if unbuffered"
 
 %{
-    OBJ fp;
-
     __INST(lastErrorNumber) = nil;
     if ((__INST(handleType) == nil)
      || (__INST(handleType) == @symbol(filePointer))
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	OBJ fp;
+	int _buffered = (__INST(buffered) == true);
+
 	if ((fp = __INST(handle)) != nil) {
 	    if (__INST(mode) != @symbol(readonly)) {
-		if (__INST(buffered) == true) {
+		if (_buffered) {
 		    FILEPOINTER f = __FILEVal(fp);
 #if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
@@ -5746,23 +5764,25 @@
 	return __c__._RETURN_self();
     }
 #else
-    FILEPOINTER f;
-    unsigned codePoint;
-    unsigned char c;
-    int cnt, _buffered;
-    OBJ fp;
-    char buff[2];
-    int nBytes = 1;
-
     __INST(lastErrorNumber) = nil;
     if ((__INST(handleType) == nil)
      || (__INST(handleType) == @symbol(filePointer))
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	OBJ fp;
+
 	if (((fp = __INST(handle)) != nil)
-	    && (__INST(mode) != @symbol(readonly))
+	 && (__INST(mode) != @symbol(readonly))
 	) {
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+	    unsigned codePoint;
+	    unsigned char c;
+	    int cnt;
+	    char buff[2];
+	    int nBytes = 1;
+
 	    if (__INST(binary) != true) {
 		if (__isCharacter(aCharacter)) {
 
@@ -5790,14 +5810,13 @@
 			    }
 			}
     doWrite:
-			f = __FILEVal(fp);
 			if (! f) {
 			    fprintf(stderr, "oops - fileHandle is NULL in nextPut:\n");
 			    __INST(handle) = nil;
 			    goto out;
 			}
 
-			if (_buffered = (__INST(buffered) == true)) {
+			if (_buffered) {
 			    __WRITING__(f)
 			}
 #if defined(WIN32) && !defined(__MINGW__)
@@ -5876,11 +5895,6 @@
 	return __c__._RETURN_self();
     }
 #else
-    FILEPOINTER f;
-    INT len, cnt;
-    OBJ fp;
-    int _buffered;
-    INT o_offs;
 
     __INST(lastErrorNumber) = nil;
 
@@ -5889,16 +5903,22 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	OBJ fp;
+
 	if (((fp = __INST(handle)) != nil)
 	    && (__INST(mode) != @symbol(readonly))
 	) {
-	    f = __FILEVal(fp);
+	    INT len, cnt;
+	    INT o_offs;
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+
 	    if (! f) {
 		fprintf(stderr, "oops - fileHandle is NULL in nextPutAll:\n");
 		__INST(handle) = nil;
 		goto out;
 	    }
-	    if (_buffered = (__INST(buffered) == true)) {
+	    if (_buffered) {
 		__WRITING__(f)
 	    }
 
@@ -6067,27 +6087,29 @@
      |error|
 
 %{
-    FILEPOINTER f;
-    int offs, len, cnt, iStart, iStop, _buffered;
-    OBJ fp;
-    int o_offs;
-
     __INST(lastErrorNumber) = nil;
     if ((__INST(handleType) == nil)
      || (__INST(handleType) == @symbol(filePointer))
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-	if (((fp = __INST(handle)) != nil)
-	    && (__INST(mode) != @symbol(readonly))
-	    && __bothSmallInteger(start, stop)
+	OBJ fp = __INST(handle);
+
+	if ((fp != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	 && __bothSmallInteger(start, stop)
 	) {
-	    f = __FILEVal(fp);
-	    if (_buffered = (__INST(buffered) == true)) {
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    int offs, len, cnt;
+	    int iStart = __intVal(start);
+	    int iStop = __intVal(stop);
+	    int o_offs;
+
+	    if (_buffered ) {
 		__WRITING__(f)
 	    }
-	    iStart = __intVal(start);
-	    iStop = __intVal(stop);
+
 	    if ((iStart < 1) || (iStop < iStart)) {
 		RETURN(self);
 	    }
@@ -6291,9 +6313,8 @@
 	return context._RETURN(count);
     }
 #else
-    FILEPOINTER f;
-    int cnt, len, offs, ret;
-    int objSize, nInstBytes, _buffered;
+    int ret;
+    int objSize, nInstBytes;
     char *extPtr;
     OBJ fp;
 
@@ -6307,9 +6328,10 @@
 	    && (__INST(mode) != @symbol(readonly))
 	    && __bothSmallInteger(count, start)
 	) {
-	    len = __intVal(count);
-	    offs = __intVal(start) - 1;
-	    f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    int len = __intVal(count);
+	    int offs = __intVal(start) - 1;
 
 	    if (__isExternalBytesLike(anObject)) {
 		OBJ sz;
@@ -6354,7 +6376,9 @@
 		objSize = __Size(anObject) - nInstBytes;
 	    }
 	    if ( (offs >= 0) && (len >= 0) && (objSize >= (len + offs)) ) {
-		if (_buffered = (__INST(buffered) == true)) {
+		int cnt;
+
+		if (_buffered) {
 		    __WRITING__(f)
 		}
 
@@ -6467,10 +6491,6 @@
 
     |error|
 %{
-    FILEPOINTER f;
-    unsigned codePoint;
-    unsigned char c;
-    int cnt, _buffered;
     OBJ fp;
 
     __INST(lastErrorNumber) = nil;
@@ -6480,22 +6500,28 @@
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
 	if (((fp = __INST(handle)) != nil)
-	    && (__INST(mode) != @symbol(readonly))
+	 && (__INST(mode) != @symbol(readonly))
 	) {
+	    unsigned char c;
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+
 	    if (__INST(binary) != true) {
 		if (__isCharacter(aCharacter)) {
-		    codePoint = __intVal(__characterVal(aCharacter));
+		    unsigned codePoint = __intVal(__characterVal(aCharacter));
+
 		    if (codePoint <= 0xFF) {
+			int cnt;
+
 			c = codePoint;
     doWrite:
-			f = __FILEVal(fp);
 			if (! f) {
 			    fprintf(stderr, "oops - fileHandle is NULL in nextPut:\n");
 			    __INST(handle) = nil;
 			    goto out;
 			}
 
-			if (_buffered = (__INST(buffered) == true)) {
+			if (_buffered) {
 			    __WRITING__(f)
 			}
 #if defined(WIN32) && !defined(__MINGW__)
--- a/FileStream.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/FileStream.st	Wed Aug 05 22:44:27 2015 +0100
@@ -235,18 +235,18 @@
     this and an error is raised, if a position: is attemted.
     I know, this is ugly, but what else could we do ?
     Late note: who cares for VMS these days?
-               (and how much useless effort has been put in the past,
-                to support lousy operating systems?)
+	       (and how much useless effort has been put in the past,
+		to support lousy operating systems?)
 
     [instance variables:]
-        pathName        <String>        the file's path (if known)
-        canPosition     <Boolean>       positionable - read above comment
+	pathName        <String>        the file's path (if known)
+	canPosition     <Boolean>       positionable - read above comment
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [see also:]
-        Filename DirectoryStream PipeStream Socket
+	Filename DirectoryStream PipeStream Socket
 "
 !
 
@@ -449,48 +449,48 @@
     |nameString random prevRandom prevNameString newTempFilename stream|
 
     [
-        prevRandom := random.
-        prevNameString := nameString.
+	prevRandom := random.
+	prevNameString := nameString.
 
-        "Use random numbers in order to improve the security
-         by making the generated names less predictable"
-        [
-            random := RandomGenerator new nextInteger.
-        ] doWhile:[random = prevRandom].
+	"Use random numbers in order to improve the security
+	 by making the generated names less predictable"
+	[
+	    random := RandomGenerator new nextInteger.
+	] doWhile:[random = prevRandom].
 
-        nameString := template bindWith:(OperatingSystem getProcessId) with:random.
+	nameString := template bindWith:(OperatingSystem getProcessId) with:random.
 
-        aDirectoryOrNil isNil ifTrue:[
-            newTempFilename := nameString.
-        ] ifFalse:[
-            newTempFilename := aDirectoryOrNil asFilename constructString:nameString.
-        ].
+	aDirectoryOrNil isNil ifTrue:[
+	    newTempFilename := nameString.
+	] ifFalse:[
+	    newTempFilename := aDirectoryOrNil asFilename constructString:nameString.
+	].
 
-        [
-            stream := self open:newTempFilename withMode:#(CREATE_NEW GENERIC_READ_WRITE).
-        ] on:OpenError do:[:ex|
-           ex errorCategory ~~ #existingReferentSignal ifTrue:[
-                "some fundamental error, raise exception"
-                ex reject.
-            ].
-            prevNameString = nameString ifTrue:[
-                "no more names - probably a bad template"
-                ex reject.
-            ].
-            "file exists, retry another one"
-        ].
+	[
+	    stream := self open:newTempFilename withMode:#(CREATE_NEW GENERIC_READ_WRITE).
+	] on:OpenError do:[:ex|
+	   ex errorCategory ~~ #existingReferentSignal ifTrue:[
+		"some fundamental error, raise exception"
+		ex reject.
+	    ].
+	    prevNameString = nameString ifTrue:[
+		"no more names - probably a bad template"
+		ex reject.
+	    ].
+	    "file exists, retry another one"
+	].
     ] doWhile:[
-        stream isNil and:[prevNameString ~= nameString]   "/ if namestring didn't change, the template is bad
+	stream isNil and:[prevNameString ~= nameString]   "/ if namestring didn't change, the template is bad
     ].
     ^ stream
 
     "temp files in '/tmp':
 
-        FileStream newTemporaryIn:'/tmp' asFilename nameTemplate:'foo%1_%2'
+	FileStream newTemporaryIn:'/tmp' asFilename nameTemplate:'foo%1_%2'
 
      This must fail on the second try:
-        FileStream newTemporaryIn:'/tmp' asFilename nameTemplate:'foo'
-        FileStream newTemporaryIn:'c:\temp' asFilename nameTemplate:'foo'
+	FileStream newTemporaryIn:'/tmp' asFilename nameTemplate:'foo'
+	FileStream newTemporaryIn:'c:\temp' asFilename nameTemplate:'foo'
     "
 
     "temp files somewhere
@@ -893,19 +893,19 @@
      Therefore, this method is reimplemented here (from ExternalStream)"
 
     outStream isExternalStream ifTrue:[
-        pos := self position.
-        n := self size - pos.
-        nWritten := OperatingSystem
-                        copyFromFd:self fileDescriptor
-                        toFd:outStream fileDescriptor
-                        startIndex:pos
-                        count:n.
-        nWritten > 0 ifTrue:[
-            self position:pos+nWritten.
-        ].
-        nWritten = n ifTrue:[
-            ^ self
-        ].
+	pos := self position.
+	n := self size - pos.
+	nWritten := OperatingSystem
+			copyFromFd:self fileDescriptor
+			toFd:outStream fileDescriptor
+			startIndex:pos
+			count:n.
+	nWritten > 0 ifTrue:[
+	    self position:pos+nWritten.
+	].
+	nWritten = n ifTrue:[
+	    ^ self
+	].
     ].
     ^ super copyToEndInto:outStream bufferSize:bufferSize.
 
@@ -936,35 +936,35 @@
     off_t truncateSize;
 
     if ((fp != nil) && (__INST(mode) != @symbol(readonly))) {
-        if (__isSmallInteger(newSize)) {
-            truncateSize = __intVal(newSize);
-            if (truncateSize < 0) {
-                goto getOutOfHere;
-            }
-        } else {
-            truncateSize = __signedLongIntVal(newSize);
-            if (truncateSize < 0) {
-                goto getOutOfHere;
-            }
-            if (truncateSize == 0) {
-                if (sizeof(truncateSize) == 8) {
-                    if (__signedLong64IntVal(newSize, &truncateSize) == 0 || truncateSize < 0) {
-                        goto getOutOfHere;
-                    }
-                } else {
-                    goto getOutOfHere;
-                }
-            }
-        }
+	if (__isSmallInteger(newSize)) {
+	    truncateSize = __intVal(newSize);
+	    if (truncateSize < 0) {
+		goto getOutOfHere;
+	    }
+	} else {
+	    truncateSize = __signedLongIntVal(newSize);
+	    if (truncateSize < 0) {
+		goto getOutOfHere;
+	    }
+	    if (truncateSize == 0) {
+		if (sizeof(truncateSize) == 8) {
+		    if (__signedLong64IntVal(newSize, &truncateSize) == 0 || truncateSize < 0) {
+			goto getOutOfHere;
+		    }
+		} else {
+		    goto getOutOfHere;
+		}
+	    }
+	}
 
-        f = __FILEVal(fp);
+	f = __FILEVal(fp);
 
-        if (__INST(buffered) == true) {
-            fflush(f);
-            fseek(f, 0L, SEEK_END); /* needed in stdio */
-        }
-        ftruncate(fileno(f), truncateSize);
-        RETURN (self);
+	if (__INST(buffered) == true) {
+	    fflush(f);
+	    fseek(f, 0L, SEEK_END); /* needed in stdio */
+	}
+	ftruncate(fileno(f), truncateSize);
+	RETURN (self);
     }
 getOutOfHere: ;
 #endif
@@ -972,7 +972,7 @@
     handle isNil ifTrue:[self errorNotOpen. ^ self].
     (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
     newSize < 0 ifTrue:[
-        self error:'wrong arg'.
+	self error:'wrong arg'.
     ].
     self errorUnsupportedOperation
 
@@ -986,7 +986,7 @@
      s close.
 
      Transcript showCR:(f fileSize).
-     f remove.   
+     f remove.
     "
 ! !
 
@@ -1001,40 +1001,40 @@
     off_t currentPosition;
 
     if (__INST(handle) != nil) {
-        do {
-            f = __FILEVal(__INST(handle));
+	do {
+	    f = __FILEVal(__INST(handle));
 #ifdef WIN32
-            __threadErrno = 0;
-            if (__INST(buffered) == true) {
+	    __threadErrno = 0;
+	    if (__INST(buffered) == true) {
 # if 0
-                currentPosition = STX_C_CALL1( "ftell", ftell, f);
+		currentPosition = STX_C_CALL1( "ftell", ftell, f);
 # else
-                currentPosition = ftell(f);
-                __threadErrno = errno;
+		currentPosition = ftell(f);
+		__threadErrno = errno;
 # endif
-            } else {
-                OBJ rA = __INST(readAhead);
-                off_t offs = 0;
+	    } else {
+		OBJ rA = __INST(readAhead);
+		off_t offs = 0;
 
-                if (rA != nil) {
-                    __INST(readAhead) = nil;
-                    offs = -1;
-                }
+		if (rA != nil) {
+		    __INST(readAhead) = nil;
+		    offs = -1;
+		}
 # if 0
-                currentPosition = STX_C_CALL3( "lseek", lseek, fileno(f), offs, SEEK_CUR);
+		currentPosition = STX_C_CALL3( "lseek", lseek, fileno(f), offs, SEEK_CUR);
 # else
-                currentPosition = lseek(fileno(f), offs, SEEK_CUR);
-                __threadErrno = errno;
+		currentPosition = lseek(fileno(f), offs, SEEK_CUR);
+		__threadErrno = errno;
 # endif
-            }
+	    }
 #else /* !WIN32 */
-            if (__INST(buffered) == true) {
+	    if (__INST(buffered) == true) {
 #ifdef _LFS_LARGEFILE
-                currentPosition = ftello(f);
+		currentPosition = ftello(f);
 #else
-                currentPosition = ftell(f);
+		currentPosition = ftell(f);
 #endif /* ! _LFS_LARGEFILE */
-            } else {
+	    } else {
 		if (sizeof(off_t) == 8) {
                     currentPosition = lseek64(fileno(f), (off_t)0, SEEK_CUR);
                 } else {
@@ -1042,24 +1042,24 @@
                 }
             }
 #endif /* !WIN32 */
-        } while ((currentPosition < 0) && (__threadErrno == EINTR));
+	} while ((currentPosition < 0) && (__threadErrno == EINTR));
 
-        if (currentPosition >= 0) {
-            OBJ rslt;
+	if (currentPosition >= 0) {
+	    OBJ rslt;
 
-            if (sizeof(currentPosition) == 8) {
-                rslt = __MKINT64 (&currentPosition);
-            } else {
-                rslt = __MKINT(currentPosition);
-            }
-            RETURN ( rslt );
-        }
-        error = __mkSmallInteger(__threadErrno);
+	    if (sizeof(currentPosition) == 8) {
+		rslt = __MKINT64 (&currentPosition);
+	    } else {
+		rslt = __MKINT(currentPosition);
+	    }
+	    RETURN ( rslt );
+	}
+	error = __mkSmallInteger(__threadErrno);
     }
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self ioError:error.
+	lastErrorNumber := error.
+	^ self ioError:error.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     ^ self primitiveFailed
@@ -1075,101 +1075,101 @@
     OBJ fp;
 
     if ((__INST(canPosition) != false) || (newPos == __mkSmallInteger(0))) {
-        if ((fp = __INST(handle)) != nil) {
+	if ((fp = __INST(handle)) != nil) {
 
 #if defined(_LFS_LARGE_FILE) && !defined(WIN32)
 # define FSEEK fseeko
-            off_t nP;
+	    off_t nP;
 #else
 #define FSEEK fseek
-            long nP;
+	    long nP;
 #endif
 
-            if (__isSmallInteger(newPos)) {
-                nP = __intVal(newPos);
-                if (nP < 0) {
-                    __INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
-                    goto getOutOfHere;
-                }
-            } else {
-                nP = __signedLongIntVal(newPos);
-                if (nP < 0) {
-                    __INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
-                    goto getOutOfHere;
-                }
-                if (nP == 0) {
-                    if (sizeof(nP) == 8) {
-                        if (__signedLong64IntVal(newPos, &nP) == 0 || nP < 0) {
-                            __INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
-                            goto getOutOfHere;
-                        }
-                    } else {
-                        __INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
-                        goto getOutOfHere;
-                    }
-                }
-            }
+	    if (__isSmallInteger(newPos)) {
+		nP = __intVal(newPos);
+		if (nP < 0) {
+		    __INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
+		    goto getOutOfHere;
+		}
+	    } else {
+		nP = __signedLongIntVal(newPos);
+		if (nP < 0) {
+		    __INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
+		    goto getOutOfHere;
+		}
+		if (nP == 0) {
+		    if (sizeof(nP) == 8) {
+			if (__signedLong64IntVal(newPos, &nP) == 0 || nP < 0) {
+			    __INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
+			    goto getOutOfHere;
+			}
+		    } else {
+			__INST(lastErrorNumber) = __mkSmallInteger(EINVAL);
+			goto getOutOfHere;
+		    }
+		}
+	    }
 
-            f = __FILEVal(fp);
+	    f = __FILEVal(fp);
 
-            do {
+	    do {
 #if defined(DO_WRAP_CALL_FSEEK)
-                __threadErrno = 0;
-                if (__INST(buffered) == true) {
-                    ret = STX_C_CALL3( "fseek", fseek, f, nP, SEEK_SET);
-                } else {
-                    __INST(readAhead) = nil;
-                    ret = STX_C_CALL3( "lseek", lseek, fileno(f), nP, SEEK_SET);
-                }
+		__threadErrno = 0;
+		if (__INST(buffered) == true) {
+		    ret = STX_C_CALL3( "fseek", fseek, f, nP, SEEK_SET);
+		} else {
+		    __INST(readAhead) = nil;
+		    ret = STX_C_CALL3( "lseek", lseek, fileno(f), nP, SEEK_SET);
+		}
 #else
-                if (__INST(buffered) == true) {
-                    ret = FSEEK(f, nP, SEEK_SET);
-                } else {
+		if (__INST(buffered) == true) {
+		    ret = FSEEK(f, nP, SEEK_SET);
+		} else {
  #if !defined(__BORLANDC__)                
                     if (sizeof(nP) == 8)
                         ret = lseek64(fileno(f), nP, SEEK_SET);
                     else
 #endif
-                        ret = lseek(fileno(f), nP, SEEK_SET);      
-                }
-                __threadErrno = errno;
+		    ret = lseek(fileno(f), nP, SEEK_SET);
+		}
+		__threadErrno = errno;
 #endif
-            } while ((ret < 0) && (__threadErrno == EINTR));
-            if (ret >= 0) {
-                __INST(position) = newPos; __STORE(self, newPos);
-                /*
-                 * just to make certain ...
-                 */
-                __INST(hitEOF) = false;
-                RETURN ( self );
-            }
-            error = __mkSmallInteger(__threadErrno);
-        }
+	    } while ((ret < 0) && (__threadErrno == EINTR));
+	    if (ret >= 0) {
+		__INST(position) = newPos; __STORE(self, newPos);
+		/*
+		 * just to make certain ...
+		 */
+		__INST(hitEOF) = false;
+		RETURN ( self );
+	    }
+	    error = __mkSmallInteger(__threadErrno);
+	}
     }
     getOutOfHere: ;
 #undef FSEEK
 %}.
     canPosition == false ifTrue:[
-        "/ position by rewinding & re-reading everything up-to
-        "/ that point.
-        ^ self slowPosition:newPos
+	"/ position by rewinding & re-reading everything up-to
+	"/ that point.
+	^ self slowPosition:newPos
     ].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        (OperatingSystem errorSymbolForNumber:error) == #EINVAL ifTrue:[
-            "/ invalid position
-            ^ self positionError.
-        ].
-        "/ assume I/O error
-        ^ self ioError:error.
+	lastErrorNumber := error.
+	(OperatingSystem errorSymbolForNumber:error) == #EINVAL ifTrue:[
+	    "/ invalid position
+	    ^ self positionError.
+	].
+	"/ assume I/O error
+	^ self ioError:error.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
 
     rslt := self positionFile:handle position:newPos.
     rslt >= 0 ifTrue:[
-        position := newPos.
+	position := newPos.
     ] ifFalse:[
-        hitEOF := true.
+	hitEOF := true.
     ]
 !
 
@@ -1201,43 +1201,43 @@
     off_t ret;
 
     if (__INST(handle) != nil) {
-        f = __FILEVal(__INST(handle));
-        __INST(position) = nil;    /* i.e. unknown */
-        do {
+	f = __FILEVal(__INST(handle));
+	__INST(position) = nil;    /* i.e. unknown */
+	do {
 #ifdef WIN32
-            __threadErrno = 0;
-            if (__INST(buffered) == true) {
-                ret = STX_C_CALL3( "fseek", fseek, f, 0L, SEEK_END);
-            } else {
-                __INST(readAhead) = nil;
-                ret = STX_C_CALL3( "lseek", lseek, fileno(f), 0L, SEEK_END);
-            }
+	    __threadErrno = 0;
+	    if (__INST(buffered) == true) {
+		ret = STX_C_CALL3( "fseek", fseek, f, 0L, SEEK_END);
+	    } else {
+		__INST(readAhead) = nil;
+		ret = STX_C_CALL3( "lseek", lseek, fileno(f), 0L, SEEK_END);
+	    }
 #else
-            if (__INST(buffered) == true) {
+	    if (__INST(buffered) == true) {
 #ifdef _LFS_LARGE_FILE
-                ret = fseeko(f, (off_t)0, SEEK_END);
+		ret = fseeko(f, (off_t)0, SEEK_END);
 #else
-                ret = fseek(f, 0L, SEEK_END);
+		ret = fseek(f, 0L, SEEK_END);
 #endif
-            } else {
+	    } else {
                 if (sizeof(off_t) == 8) {
                     ret = lseek64(fileno(f), (off_t)0, SEEK_END);
                 } else {
-                    ret = lseek(fileno(f), (off_t)0, SEEK_END);
+		ret = lseek(fileno(f), (off_t)0, SEEK_END);
                 }
-            }
+	    }
 #endif
-        } while ((ret < 0) && (__threadErrno == EINTR));
-        if (ret >= 0) {
-            RETURN ( self );
-        }
-        error = __mkSmallInteger(__threadErrno);
+	} while ((ret < 0) && (__threadErrno == EINTR));
+	if (ret >= 0) {
+	    RETURN ( self );
+	}
+	error = __mkSmallInteger(__threadErrno);
     }
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self ioError:error.
-        ^ self.    
+	lastErrorNumber := error.
+	self ioError:error.
+	^ self.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     ^ self primitiveFailed
@@ -1249,28 +1249,28 @@
      This is required to reposition nonPositionable streams, such
      as tape-streams or variable-record-RMS files under VMS.
      Caveat:
-         This should really be done transparently by the stdio library."
+	 This should really be done transparently by the stdio library."
 
     |buffer amount pos0Based|
 
     self isReadable ifFalse:[
-        "/ sorry
-        ^ self positionError
+	"/ sorry
+	^ self positionError
     ].
 
     buffer := ByteArray new:8*1024.
 
     (position isNil "/ i.e. unknown
     or:[newPos < (pos0Based := self position)]) ifTrue:[
-        self reset.
-        pos0Based := self position.
+	self reset.
+	pos0Based := self position.
     ].
     [pos0Based < newPos] whileTrue:[
-        amount := (buffer size) min:(newPos-pos0Based).
-        (self nextBytes:amount into:buffer startingAt:1) ~~ amount ifTrue:[
-            ^ self positionError
-        ].
-        pos0Based := self position.
+	amount := (buffer size) min:(newPos-pos0Based).
+	(self nextBytes:amount into:buffer startingAt:1) ~~ amount ifTrue:[
+	    ^ self positionError
+	].
+	pos0Based := self position.
     ].
     "/ ('FileStream [info]: slow position - please convert ''' , pathName printString , ''' to streamLF format') infoPrintCR.
 ! !
@@ -1362,369 +1362,369 @@
     int pass = 0;
 
     if (!__isNonNilObject(encodedPathName)
-        || !(__isStringLike(openmode) || __isArrayLike(openmode)))
-            goto badArgument;
+	|| !(__isStringLike(openmode) || __isArrayLike(openmode)))
+	    goto badArgument;
 
 retry:
 #ifdef __VMS__
       if (__isStringLike(encodedPathName)) {
-        do {
-            /*
-             * allow passing additional RMS arguments.
-             * stupid: DEC does not seem to offer an interface for passing a char **.
-             */
-            __threadErrno = 0;
+	do {
+	    /*
+	     * allow passing additional RMS arguments.
+	     * stupid: DEC does not seem to offer an interface for passing a char **.
+	     */
+	    __threadErrno = 0;
 
-            {
-                if (__isArray(attributeSpec)) {
-                    OBJ *ap = __ArrayInstPtr(attributeSpec)->a_element;
-                    int numAttrib = 0;
-                    int i;
+	    {
+		if (__isArray(attributeSpec)) {
+		    OBJ *ap = __ArrayInstPtr(attributeSpec)->a_element;
+		    int numAttrib = 0;
+		    int i;
 
-                    numAttrib = __arraySize(attributeSpec);
-                    for (i=0; i<numAttrib;i++) {
-                        if (! __isStringLike(ap[i])) {
-                            __threadErrno = EINVAL; /* invalid argument */
-                            goto getOutOfHere;
-                        }
-                    }
-                    switch (numAttrib) {
-                        case 0:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 1:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 2:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 3:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 4:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
-                                      __stringVal(ap[3]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 5:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
-                                      __stringVal(ap[3]), __stringVal(ap[4]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 6:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
-                                      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 7:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
-                                      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
-                                      __stringVal(ap[6]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 8:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
-                                      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
-                                      __stringVal(ap[6]), __stringVal(ap[7]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 9:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
-                                      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
-                                      __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        case 10:
-                            __BEGIN_INTERRUPTABLE__
-                            f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
-                                      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
-                                      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
-                                      __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8]),
-                                      __stringVal(ap[9]));
-                            __END_INTERRUPTABLE__
-                            break;
-                        default:
-                            __threadErrno = E2BIG; /* too many args */
-                            goto getOutOfHere;
-                    }
-                } else if (attributeSpec != nil) {
-                    __threadErrno = EINVAL; /* invalid argument */
-                    goto getOutOfHere;
-                } else {
-                    /*
-                     * create file as sequential streamLF by default.
-                     */
-                    __BEGIN_INTERRUPTABLE__
-                    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode), "rfm=stmlf");
-                    __END_INTERRUPTABLE__
-                }
-            }
-        } while ((f == NULL) && (__threadErrno == EINTR));
+		    numAttrib = __arraySize(attributeSpec);
+		    for (i=0; i<numAttrib;i++) {
+			if (! __isStringLike(ap[i])) {
+			    __threadErrno = EINVAL; /* invalid argument */
+			    goto getOutOfHere;
+			}
+		    }
+		    switch (numAttrib) {
+			case 0:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 1:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 2:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 3:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 4:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
+				      __stringVal(ap[3]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 5:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
+				      __stringVal(ap[3]), __stringVal(ap[4]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 6:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
+				      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 7:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
+				      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
+				      __stringVal(ap[6]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 8:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
+				      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
+				      __stringVal(ap[6]), __stringVal(ap[7]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 9:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
+				      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
+				      __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8]));
+			    __END_INTERRUPTABLE__
+			    break;
+			case 10:
+			    __BEGIN_INTERRUPTABLE__
+			    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode),
+				      __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]),
+				      __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]),
+				      __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8]),
+				      __stringVal(ap[9]));
+			    __END_INTERRUPTABLE__
+			    break;
+			default:
+			    __threadErrno = E2BIG; /* too many args */
+			    goto getOutOfHere;
+		    }
+		} else if (attributeSpec != nil) {
+		    __threadErrno = EINVAL; /* invalid argument */
+		    goto getOutOfHere;
+		} else {
+		    /*
+		     * create file as sequential streamLF by default.
+		     */
+		    __BEGIN_INTERRUPTABLE__
+		    f = fopen((char *)__stringVal(pathName), (char *)__stringVal(openmode), "rfm=stmlf");
+		    __END_INTERRUPTABLE__
+		}
+	    }
+	} while ((f == NULL) && (__threadErrno == EINTR));
       }
 #else /* not VMS */
 
 # ifdef WIN32
     {
-          DWORD share = 0, access = 0, create = 0, attr = 0;
-          char * __openmode;
-          HANDLE handle;
-          SECURITY_ATTRIBUTES sa;
+	  DWORD share = 0, access = 0, create = 0, attr = 0;
+	  char * __openmode;
+	  HANDLE handle;
+	  SECURITY_ATTRIBUTES sa;
 
-          if (__isStringLike(openmode)) {
-              share = FILE_SHARE_READ|FILE_SHARE_WRITE;
-              __openmode = __stringVal(openmode);
-              if (strcmp(__openmode, "rb") == 0) {
-                  access = GENERIC_READ;
-                  create = OPEN_EXISTING;
-              } else if (strcmp(__openmode, "rb+") == 0) {
-                  access = GENERIC_READ | GENERIC_WRITE;
-                  create = OPEN_EXISTING;
-              } else if (strcmp(__openmode, "wb") == 0) {
-                  access = GENERIC_WRITE;
-                  create = CREATE_ALWAYS;
-              } else if (strcmp(__openmode, "wb+") == 0) {
-                  access = GENERIC_READ | GENERIC_WRITE;
-                  create = CREATE_ALWAYS;
-              } else if (strcmp(__openmode, "ab") == 0) {
-                  access = FILE_APPEND_DATA|FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA|
-                                STANDARD_RIGHTS_WRITE|SYNCHRONIZE;
-                  create = OPEN_ALWAYS;
-              } else if (strcmp(__openmode, "ab+") == 0) {
-                  access = GENERIC_READ |FILE_APPEND_DATA|FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA|
-                                STANDARD_RIGHTS_WRITE|SYNCHRONIZE;
-                  create = OPEN_ALWAYS;
-              } else {
-                  console_fprintf(stderr, "Win32OS [warning]: unsupported open mode\n");
-              }
-          } else if (__isArrayLike(openmode)) {
-              OBJ *ap = __arrayVal(openmode);
-              int numAttrib = __arraySize(openmode);
-              int i;
+	  if (__isStringLike(openmode)) {
+	      share = FILE_SHARE_READ|FILE_SHARE_WRITE;
+	      __openmode = __stringVal(openmode);
+	      if (strcmp(__openmode, "rb") == 0) {
+		  access = GENERIC_READ;
+		  create = OPEN_EXISTING;
+	      } else if (strcmp(__openmode, "rb+") == 0) {
+		  access = GENERIC_READ | GENERIC_WRITE;
+		  create = OPEN_EXISTING;
+	      } else if (strcmp(__openmode, "wb") == 0) {
+		  access = GENERIC_WRITE;
+		  create = CREATE_ALWAYS;
+	      } else if (strcmp(__openmode, "wb+") == 0) {
+		  access = GENERIC_READ | GENERIC_WRITE;
+		  create = CREATE_ALWAYS;
+	      } else if (strcmp(__openmode, "ab") == 0) {
+		  access = FILE_APPEND_DATA|FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA|
+				STANDARD_RIGHTS_WRITE|SYNCHRONIZE;
+		  create = OPEN_ALWAYS;
+	      } else if (strcmp(__openmode, "ab+") == 0) {
+		  access = GENERIC_READ |FILE_APPEND_DATA|FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA|
+				STANDARD_RIGHTS_WRITE|SYNCHRONIZE;
+		  create = OPEN_ALWAYS;
+	      } else {
+		  console_fprintf(stderr, "Win32OS [warning]: unsupported open mode\n");
+	      }
+	  } else if (__isArrayLike(openmode)) {
+	      OBJ *ap = __arrayVal(openmode);
+	      int numAttrib = __arraySize(openmode);
+	      int i;
 
-              __openmode = "rb+";
+	      __openmode = "rb+";
 
-              for (i=0; i<numAttrib; i++) {
-                  OBJ attrSym = ap[i];
+	      for (i=0; i<numAttrib; i++) {
+		  OBJ attrSym = ap[i];
 
-                  if (attrSym == @symbol(FILE_SHARE_READ)) {
-                      share |= FILE_SHARE_READ;
-                  } else if (attrSym == @symbol(FILE_SHARE_WRITE)) {
-                      share |= FILE_SHARE_WRITE;
+		  if (attrSym == @symbol(FILE_SHARE_READ)) {
+		      share |= FILE_SHARE_READ;
+		  } else if (attrSym == @symbol(FILE_SHARE_WRITE)) {
+		      share |= FILE_SHARE_WRITE;
 
-                  } else if (attrSym == @symbol(GENERIC_READ)) {
-                      access |= GENERIC_READ;
-                  } else if (attrSym == @symbol(GENERIC_WRITE)) {
-                      access |= GENERIC_WRITE;
-                  } else if (attrSym == @symbol(GENERIC_READ_WRITE)) {
-                      access |= GENERIC_READ|GENERIC_WRITE;
+		  } else if (attrSym == @symbol(GENERIC_READ)) {
+		      access |= GENERIC_READ;
+		  } else if (attrSym == @symbol(GENERIC_WRITE)) {
+		      access |= GENERIC_WRITE;
+		  } else if (attrSym == @symbol(GENERIC_READ_WRITE)) {
+		      access |= GENERIC_READ|GENERIC_WRITE;
 
-                  } else if (attrSym == @symbol(CREATE_NEW)) {
-                      create |= CREATE_NEW;
-                  } else if (attrSym == @symbol(CREATE_ALWAYS)) {
-                      create |= CREATE_ALWAYS;
-                  } else if (attrSym == @symbol(OPEN_EXISTING)) {
-                      create |= OPEN_EXISTING;
-                  } else if (attrSym == @symbol(OPEN_ALWAYS)) {
-                      create |= OPEN_ALWAYS;
-                  } else if (attrSym == @symbol(TRUNCATE_EXISTING)) {
-                      create |= TRUNCATE_EXISTING;
+		  } else if (attrSym == @symbol(CREATE_NEW)) {
+		      create |= CREATE_NEW;
+		  } else if (attrSym == @symbol(CREATE_ALWAYS)) {
+		      create |= CREATE_ALWAYS;
+		  } else if (attrSym == @symbol(OPEN_EXISTING)) {
+		      create |= OPEN_EXISTING;
+		  } else if (attrSym == @symbol(OPEN_ALWAYS)) {
+		      create |= OPEN_ALWAYS;
+		  } else if (attrSym == @symbol(TRUNCATE_EXISTING)) {
+		      create |= TRUNCATE_EXISTING;
 
-                  } else if (attrSym == @symbol(FILE_ATTRIBUTE_HIDDEN)) {
-                      attr |= FILE_ATTRIBUTE_HIDDEN;
-                  } else if (attrSym == @symbol(FILE_ATTRIBUTE_READONLY)) {
-                      attr |= FILE_ATTRIBUTE_READONLY;
-                  } else if (attrSym == @symbol(FILE_FLAG_WRITE_THROUGH)) {
-                      attr |= FILE_FLAG_WRITE_THROUGH;
-                  } else if (attrSym == @symbol(FILE_FLAG_SEQUENTIAL_SCAN)) {
-                      attr |= FILE_FLAG_SEQUENTIAL_SCAN;
-                  } else if (attrSym == @symbol(FILE_FLAG_DELETE_ON_CLOSE)) {
-                      attr |= FILE_FLAG_DELETE_ON_CLOSE;
-                  } else if (!__isSymbol(attrSym) && __isStringLike(attrSym)) {
-                      __openmode = __stringVal(attrSym);
-                  } else {
-                      console_fprintf(stderr, "Win32OS [warning]: unsupported open mode\n");
-                  }
-              }
-          }
-          if (create == 0) {
+		  } else if (attrSym == @symbol(FILE_ATTRIBUTE_HIDDEN)) {
+		      attr |= FILE_ATTRIBUTE_HIDDEN;
+		  } else if (attrSym == @symbol(FILE_ATTRIBUTE_READONLY)) {
+		      attr |= FILE_ATTRIBUTE_READONLY;
+		  } else if (attrSym == @symbol(FILE_FLAG_WRITE_THROUGH)) {
+		      attr |= FILE_FLAG_WRITE_THROUGH;
+		  } else if (attrSym == @symbol(FILE_FLAG_SEQUENTIAL_SCAN)) {
+		      attr |= FILE_FLAG_SEQUENTIAL_SCAN;
+		  } else if (attrSym == @symbol(FILE_FLAG_DELETE_ON_CLOSE)) {
+		      attr |= FILE_FLAG_DELETE_ON_CLOSE;
+		  } else if (!__isSymbol(attrSym) && __isStringLike(attrSym)) {
+		      __openmode = __stringVal(attrSym);
+		  } else {
+		      console_fprintf(stderr, "Win32OS [warning]: unsupported open mode\n");
+		  }
+	      }
+	  }
+	  if (create == 0) {
 //              argumentError = @symbol(missingCreateMode);
-              goto badArgument;
-          }
-          if (attr == 0) {
-              attr = FILE_ATTRIBUTE_NORMAL;
-          }
+	      goto badArgument;
+	  }
+	  if (attr == 0) {
+	      attr = FILE_ATTRIBUTE_NORMAL;
+	  }
 
-          /*
-           * create security attributes - make handle inheritable by subprocesses
-           */
-          memset(&sa, 0, sizeof (sa));
-          sa.nLength = sizeof( sa );
-          // sa.bInheritHandle = TRUE;
-          sa.bInheritHandle = FALSE;
+	  /*
+	   * create security attributes - make handle inheritable by subprocesses
+	   */
+	  memset(&sa, 0, sizeof (sa));
+	  sa.nLength = sizeof( sa );
+	  // sa.bInheritHandle = TRUE;
+	  sa.bInheritHandle = FALSE;
 
-          if (__isStringLike(pathName)) {
-                char _aPathName[MAXPATHLEN];
+	  if (__isStringLike(pathName)) {
+		char _aPathName[MAXPATHLEN];
 
-                strncpy(_aPathName, __stringVal(pathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
-                do {
-                    __threadErrno = 0;
-                    handle = STX_API_NOINT_CALL7( "CreateFileA", CreateFileA, _aPathName, access, share, &sa, create, attr, 0 /* hTempl */);
-                    if (__threadErrno == EINTR) {
-                        handle = INVALID_HANDLE_VALUE;
-                    }
-                } while ((handle == INVALID_HANDLE_VALUE) && (__threadErrno == EINTR));
-          } else if (__isUnicode16String(pathName)) {
-                wchar_t _aPathName[MAXPATHLEN+1];
-                int i, l;
+		strncpy(_aPathName, __stringVal(pathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
+		do {
+		    __threadErrno = 0;
+		    handle = STX_API_NOINT_CALL7( "CreateFileA", CreateFileA, _aPathName, access, share, &sa, create, attr, 0 /* hTempl */);
+		    if (__threadErrno == EINTR) {
+			handle = INVALID_HANDLE_VALUE;
+		    }
+		} while ((handle == INVALID_HANDLE_VALUE) && (__threadErrno == EINTR));
+	  } else if (__isUnicode16String(pathName)) {
+		wchar_t _aPathName[MAXPATHLEN+1];
+		int i, l;
 
-                l = __unicode16StringSize(pathName);
-                if (l > MAXPATHLEN) l = MAXPATHLEN;
-                for (i=0; i<l; i++) {
-                    _aPathName[i] = __unicode16StringVal(pathName)[i];
-                }
-                _aPathName[i] = 0;
+		l = __unicode16StringSize(pathName);
+		if (l > MAXPATHLEN) l = MAXPATHLEN;
+		for (i=0; i<l; i++) {
+		    _aPathName[i] = __unicode16StringVal(pathName)[i];
+		}
+		_aPathName[i] = 0;
 
-                do {
-                    __threadErrno = 0;
-                    handle = STX_API_NOINT_CALL7( "CreateFileW", CreateFileW, _aPathName, access, share, &sa, create, attr, 0 /* hTempl */);
-                    if (__threadErrno == EINTR) {
-                        handle = INVALID_HANDLE_VALUE;
-                    }
-                } while ((handle == INVALID_HANDLE_VALUE) && (__threadErrno == EINTR));
-          }
-          if (handle != INVALID_HANDLE_VALUE) {
-              int fd;
-              extern void __stxWrapApiEnterCritical(), __stxWrapApiLeaveCritical();
+		do {
+		    __threadErrno = 0;
+		    handle = STX_API_NOINT_CALL7( "CreateFileW", CreateFileW, _aPathName, access, share, &sa, create, attr, 0 /* hTempl */);
+		    if (__threadErrno == EINTR) {
+			handle = INVALID_HANDLE_VALUE;
+		    }
+		} while ((handle == INVALID_HANDLE_VALUE) && (__threadErrno == EINTR));
+	  }
+	  if (handle != INVALID_HANDLE_VALUE) {
+	      int fd;
+	      extern void __stxWrapApiEnterCritical(), __stxWrapApiLeaveCritical();
 
-              __stxWrapApiEnterCritical();
-              fd = _open_osfhandle((long)handle, O_BINARY);
-              if (fd < 0) {
-                  if (__threadErrno == 0) {
-                      // no more file descriptors
-                      __threadErrno = EMFILE;
-                  }
-                  CloseHandle(handle);
-              } else {
-                  f = fdopen(fd, __openmode);
-              }
-              __stxWrapApiLeaveCritical();
-          }  else {
-            __threadErrno = __WIN32_ERR(GetLastError());
-          }
+	      __stxWrapApiEnterCritical();
+	      fd = _open_osfhandle((long)handle, O_BINARY);
+	      if (fd < 0) {
+		  if (__threadErrno == 0) {
+		      // no more file descriptors
+		      __threadErrno = EMFILE;
+		  }
+		  CloseHandle(handle);
+	      } else {
+		  f = fdopen(fd, __openmode);
+	      }
+	      __stxWrapApiLeaveCritical();
+	  }  else {
+	    __threadErrno = __WIN32_ERR(GetLastError());
+	  }
       }
 # else /* not WIN32 */
 
       if (__isStringLike(encodedPathName)) {
-          int accessMode = 0666;        // default access mode of fopen(), relies on umask()
-          int flags = 0;
-          int fd;
-          char * __openmode;
+	  int accessMode = 0666;        // default access mode of fopen(), relies on umask()
+	  int flags = 0;
+	  int fd;
+	  char * __openmode;
 
-          if (__isStringLike(openmode)) {
-              __openmode = __stringVal(openmode);
-              if (strcmp(__openmode, "r") == 0) {
-                  flags = O_RDONLY;
-              } else if (strcmp(__openmode, "r+") == 0) {
-                  flags = O_RDWR;
-              } else if (strcmp(__openmode, "w") == 0) {
-                  flags = O_WRONLY | O_CREAT | O_TRUNC;
-              } else if (strcmp(__openmode, "w+") == 0) {
-                  flags = O_RDWR | O_CREAT | O_TRUNC;
-              } else if (strcmp(__openmode, "a") == 0) {
-                  flags = O_WRONLY | O_CREAT | O_APPEND;
-              } else if (strcmp(__openmode, "a+") == 0) {
-                  flags = O_RDWR | O_CREAT| O_APPEND;
-              } else {
-                  console_fprintf(stderr, "UNIXOS [warning]: unsupported open mode\n");
-              }
-          } else if (__isArrayLike(openmode)) {
-              OBJ *ap = __arrayVal(openmode);
-              int numAttrib = __arraySize(openmode);
-              int i;
+	  if (__isStringLike(openmode)) {
+	      __openmode = __stringVal(openmode);
+	      if (strcmp(__openmode, "r") == 0) {
+		  flags = O_RDONLY;
+	      } else if (strcmp(__openmode, "r+") == 0) {
+		  flags = O_RDWR;
+	      } else if (strcmp(__openmode, "w") == 0) {
+		  flags = O_WRONLY | O_CREAT | O_TRUNC;
+	      } else if (strcmp(__openmode, "w+") == 0) {
+		  flags = O_RDWR | O_CREAT | O_TRUNC;
+	      } else if (strcmp(__openmode, "a") == 0) {
+		  flags = O_WRONLY | O_CREAT | O_APPEND;
+	      } else if (strcmp(__openmode, "a+") == 0) {
+		  flags = O_RDWR | O_CREAT| O_APPEND;
+	      } else {
+		  console_fprintf(stderr, "UNIXOS [warning]: unsupported open mode\n");
+	      }
+	  } else if (__isArrayLike(openmode)) {
+	      OBJ *ap = __arrayVal(openmode);
+	      int numAttrib = __arraySize(openmode);
+	      int i;
 
-              __openmode = "r+";
+	      __openmode = "r+";
 
-              for (i=0; i<numAttrib; i++) {
-                  OBJ attrSym = ap[i];
+	      for (i=0; i<numAttrib; i++) {
+		  OBJ attrSym = ap[i];
 
-                  if (attrSym == @symbol(FILE_SHARE_READ)) {
-                      // ignore
-                  } else if (attrSym == @symbol(FILE_SHARE_WRITE)) {
-                     // ignore
-                  } else if (attrSym == @symbol(GENERIC_READ)) {
-                      flags |= O_RDONLY;
-                  } else if (attrSym == @symbol(GENERIC_WRITE)) {
-                      flags |= O_WRONLY;
-                  } else if (attrSym == @symbol(GENERIC_READ_WRITE)) {
-                      flags |= O_RDWR;
+		  if (attrSym == @symbol(FILE_SHARE_READ)) {
+		      // ignore
+		  } else if (attrSym == @symbol(FILE_SHARE_WRITE)) {
+		     // ignore
+		  } else if (attrSym == @symbol(GENERIC_READ)) {
+		      flags |= O_RDONLY;
+		  } else if (attrSym == @symbol(GENERIC_WRITE)) {
+		      flags |= O_WRONLY;
+		  } else if (attrSym == @symbol(GENERIC_READ_WRITE)) {
+		      flags |= O_RDWR;
 
-                  } else if (attrSym == @symbol(CREATE_NEW)) {
-                      flags |= O_CREAT|O_EXCL;
-                      accessMode = 0600;     // simulate mkstemp()
-                  } else if (attrSym == @symbol(CREATE_ALWAYS)) {
-                      flags |= O_CREAT|O_TRUNC;
-                  } else if (attrSym == @symbol(OPEN_EXISTING)) {
-                      // nothing to be set
-                  } else if (attrSym == @symbol(OPEN_ALWAYS)) {
-                      flags |= O_CREAT;
-                  } else if (attrSym == @symbol(TRUNCATE_EXISTING)) {
-                      flags |= O_TRUNC;
+		  } else if (attrSym == @symbol(CREATE_NEW)) {
+		      flags |= O_CREAT|O_EXCL;
+		      accessMode = 0600;     // simulate mkstemp()
+		  } else if (attrSym == @symbol(CREATE_ALWAYS)) {
+		      flags |= O_CREAT|O_TRUNC;
+		  } else if (attrSym == @symbol(OPEN_EXISTING)) {
+		      // nothing to be set
+		  } else if (attrSym == @symbol(OPEN_ALWAYS)) {
+		      flags |= O_CREAT;
+		  } else if (attrSym == @symbol(TRUNCATE_EXISTING)) {
+		      flags |= O_TRUNC;
 
-                  } else if (attrSym == @symbol(FILE_ATTRIBUTE_HIDDEN)) {
-                      // ignore
-                  } else if (attrSym == @symbol(FILE_ATTRIBUTE_READONLY)) {
-                      accessMode &= 0444;
-                  } else if (attrSym == @symbol(FILE_FLAG_WRITE_THROUGH)) {
+		  } else if (attrSym == @symbol(FILE_ATTRIBUTE_HIDDEN)) {
+		      // ignore
+		  } else if (attrSym == @symbol(FILE_ATTRIBUTE_READONLY)) {
+		      accessMode &= 0444;
+		  } else if (attrSym == @symbol(FILE_FLAG_WRITE_THROUGH)) {
 #ifdef O_DIRECT
-                      flags |= O_DIRECT;
+		      flags |= O_DIRECT;
 #endif
-                  } else if (attrSym == @symbol(FILE_FLAG_SEQUENTIAL_SCAN)) {
-                      // ignore
-                  } else if (attrSym == @symbol(FILE_FLAG_DELETE_ON_CLOSE)) {
-                      // ignore;
-                  } else if (!__isSymbol(attrSym) && __isStringLike(attrSym)) {
-                      __openmode = __stringVal(attrSym);
-                  } else {
-                      console_fprintf(stderr, "UNIXOS [warning]: unsupported open mode\n");
-                  }
-              }
-          }
-          do {
-              __BEGIN_INTERRUPTABLE__
-              fd = open((char *) __stringVal(encodedPathName), flags, accessMode);
-              __END_INTERRUPTABLE__
-          } while ((fd < 0) && (__threadErrno == EINTR));
+		  } else if (attrSym == @symbol(FILE_FLAG_SEQUENTIAL_SCAN)) {
+		      // ignore
+		  } else if (attrSym == @symbol(FILE_FLAG_DELETE_ON_CLOSE)) {
+		      // ignore;
+		  } else if (!__isSymbol(attrSym) && __isStringLike(attrSym)) {
+		      __openmode = __stringVal(attrSym);
+		  } else {
+		      console_fprintf(stderr, "UNIXOS [warning]: unsupported open mode\n");
+		  }
+	      }
+	  }
+	  do {
+	      __BEGIN_INTERRUPTABLE__
+	      fd = open((char *) __stringVal(encodedPathName), flags, accessMode);
+	      __END_INTERRUPTABLE__
+	  } while ((fd < 0) && (__threadErrno == EINTR));
 
-          if (fd >= 0) {
-              __threadErrno = 0;
-              f = fdopen(fd, __openmode);
-              if (f == NULL) {
-                  close(fd);            // fdopen failed, close before retry.
-              }
-          }
+	  if (fd >= 0) {
+	      __threadErrno = 0;
+	      f = fdopen(fd, __openmode);
+	      if (f == NULL) {
+		  close(fd);            // fdopen failed, close before retry.
+	      }
+	  }
       }
 
 # endif /* not WIN32 */
@@ -1732,81 +1732,81 @@
 
 
     if (f == NULL) {
-        /*
-         * If no filedescriptors available, try to finalize
-         * possibly collected fd's and try again.
-         */
-        if ((__threadErrno == ENFILE || __threadErrno == EMFILE) && pass == 0) {
-            pass = 1;
-            __SSEND0(@global(ObjectMemory), @symbol(scavenge), 0);
-            __SSEND0(@global(ObjectMemory), @symbol(finalize), 0);
-            goto retry;
-        }
+	/*
+	 * If no filedescriptors available, try to finalize
+	 * possibly collected fd's and try again.
+	 */
+	if ((__threadErrno == ENFILE || __threadErrno == EMFILE) && pass == 0) {
+	    pass = 1;
+	    __SSEND0(@global(ObjectMemory), @symbol(scavenge), 0);
+	    __SSEND0(@global(ObjectMemory), @symbol(finalize), 0);
+	    goto retry;
+	}
     badArgument:
     getOutOfHere:
-        error = __mkSmallInteger(__threadErrno);
-        __INST(position) = nil;
+	error = __mkSmallInteger(__threadErrno);
+	__INST(position) = nil;
     } else {
 #ifdef __VMS__
-        /*
-         * check to see if this is positionable ...
-         */
-        __INST(canPosition) = false;
+	/*
+	 * check to see if this is positionable ...
+	 */
+	__INST(canPosition) = false;
 # ifndef _POSIX_C_SOURCE
-        {
-            struct stat statBuffer;
+	{
+	    struct stat statBuffer;
 
-            if (fstat(fileno(f), &statBuffer) >= 0) {
-                switch (statBuffer.st_fab_rfm) {
-                    case FAB$C_UDF: /* undefined (also stream binary)   */
-                    case FAB$C_VAR: /* variable length records          */
-                    case FAB$C_VFC: /* variable fixed control           */
-                    case FAB$C_STM: /* RMS-11 stream (valid only for sequen) */
-                    default:
-                        __INST(canPosition) = false;
-                        break;
+	    if (fstat(fileno(f), &statBuffer) >= 0) {
+		switch (statBuffer.st_fab_rfm) {
+		    case FAB$C_UDF: /* undefined (also stream binary)   */
+		    case FAB$C_VAR: /* variable length records          */
+		    case FAB$C_VFC: /* variable fixed control           */
+		    case FAB$C_STM: /* RMS-11 stream (valid only for sequen) */
+		    default:
+			__INST(canPosition) = false;
+			break;
 
-                    case FAB$C_FIX: /* fixed length records             */
-                    case FAB$C_STMLF: /* LF stream (valid only for sequential) */
-                    case FAB$C_STMCR: /* CR stream (valid only for sequential) */
-                        __INST(canPosition) = true;
-                        break;
-                }
-            }
-        }
+		    case FAB$C_FIX: /* fixed length records             */
+		    case FAB$C_STMLF: /* LF stream (valid only for sequential) */
+		    case FAB$C_STMCR: /* CR stream (valid only for sequential) */
+			__INST(canPosition) = true;
+			break;
+		}
+	    }
+	}
 # endif
 #else /* not VMS */
-        __INST(canPosition) = true;
+	__INST(canPosition) = true;
 #endif /* not VMS */
 
-        if (@global(FileOpenTrace) == true) {
-            console_fprintf(stderr, "fopen %s [FileStream] -> %x\n", __stringVal(pathName), f);
-        }
-        if (f != NULL) {
-            OBJ fp;
+	if (@global(FileOpenTrace) == true) {
+	    console_fprintf(stderr, "fopen %s [FileStream] -> %"_lx_"\n", __stringVal(pathName), (INT)f);
+	}
+	if (f != NULL) {
+	    OBJ fp;
 
-            wasBlocked = __BLOCKINTERRUPTS();
+	    wasBlocked = __BLOCKINTERRUPTS();
 #if 0
-            // The original code was:
-            __INST(handle) = fp = __MKEXTERNALADDRESS(f); __STORE(self, fp);
-            // but for that, gcc generates wrong code, which loads self (volatile) into
-            // a register (bp), then calls __MKEXTERNALADDRESS, then stores indirect bp.
-            // That is wrong if a scavenge occurs in __MKEXTERNALADDRESS, as bp is now still pointing to the old
-            // object.
+	    // The original code was:
+	    __INST(handle) = fp = __MKEXTERNALADDRESS(f); __STORE(self, fp);
+	    // but for that, gcc generates wrong code, which loads self (volatile) into
+	    // a register (bp), then calls __MKEXTERNALADDRESS, then stores indirect bp.
+	    // That is wrong if a scavenge occurs in __MKEXTERNALADDRESS, as bp is now still pointing to the old
+	    // object.
 #else
-            fp = __MKEXTERNALADDRESS(f);
-            __INST(handle) = fp;
-            __STORE(self, fp);
+	    fp = __MKEXTERNALADDRESS(f);
+	    __INST(handle) = fp;
+	    __STORE(self, fp);
 #endif
-        }
+	}
     }
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self openError:error.
+	lastErrorNumber := error.
+	^ self openError:error.
     ].
     handle isNil ifTrue:[
-        ^ self openError:0.
+	^ self openError:0.
     ].
 
     position := 0.
@@ -1886,12 +1886,12 @@
 
     handle := self openFile:pathName withMode:openmode attributes:attributeSpec.
     handle isNil ifTrue:[
-        "this happens, if proceeding from an OpenError raised in #openFile..."
-        ^ nil.
+	"this happens, if proceeding from an OpenError raised in #openFile..."
+	^ nil.
     ].
     position := 0.
     buffered isNil ifTrue:[
-        buffered := true.       "default is buffered"
+	buffered := true.       "default is buffered"
     ].
 !
 
@@ -2026,10 +2026,10 @@
     unsigned int size;
 
     if (__INST(handle) != nil) {
-        f = __FILEVal(__INST(handle));
-        if ((size = filesize(fileno(f))) >= 0) {
-            RETURN ( __MKUINT(size) );
-        }
+	f = __FILEVal(__INST(handle));
+	if ((size = filesize(fileno(f))) >= 0) {
+	    RETURN ( __MKUINT(size) );
+	}
     }
 #else
     struct stat buf;
@@ -2037,38 +2037,38 @@
     int fd;
 
     if (__INST(handle) != nil) {
-        f = __FILEVal(__INST(handle));
-        fd = fileno(f);
-        do {
-            ret = fstat(fd, &buf);
-        } while ((ret < 0) && (__threadErrno == EINTR));
-        if (ret >= 0) {
-            OBJ rslt;
+	f = __FILEVal(__INST(handle));
+	fd = fileno(f);
+	do {
+	    ret = fstat(fd, &buf);
+	} while ((ret < 0) && (__threadErrno == EINTR));
+	if (ret >= 0) {
+	    OBJ rslt;
 
-            if (sizeof(buf.st_size) == 8) {
-                rslt = __MKINT64(&buf.st_size);
-            } else {
-                rslt = __MKINT(buf.st_size);
-            }
-            RETURN(rslt);
-        }
-        error = __mkSmallInteger(__threadErrno);
+	    if (sizeof(buf.st_size) == 8) {
+		rslt = __MKINT64(&buf.st_size);
+	    } else {
+		rslt = __MKINT(buf.st_size);
+	    }
+	    RETURN(rslt);
+	}
+	error = __mkSmallInteger(__threadErrno);
     }
 #endif
 %}.
 
     "could add a fall-back here:
 
-        oldPosition := self position.
-        self setToEnd.
-        sz := self position.
-        self position:oldPosition.
-        ^ sz
+	oldPosition := self position.
+	self setToEnd.
+	sz := self position.
+	self position:oldPosition.
+	^ sz
     "
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self ioError:error.
-        ^ self.    
+	lastErrorNumber := error.
+	self ioError:error.
+	^ self.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     ^ self primitiveFailed
@@ -2119,11 +2119,11 @@
 !FileStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.180 2015-03-12 13:52:37 stefan Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.180 2015-03-12 13:52:37 stefan Exp $'
+    ^ '$Header$'
 ! !
 
 
--- a/Filename.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/Filename.st	Wed Aug 05 22:44:27 2015 +0100
@@ -2,7 +2,7 @@
 
 "
  COPYRIGHT (c) 1992 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
@@ -27,7 +27,7 @@
 copyright
 "
  COPYRIGHT (c) 1992 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
@@ -49,19 +49,19 @@
     for being correct or existing.
     Thus, it is possible to do queries such as:
 
-        '/fee/foo/foe' asFilename exists     
-        '/not_existing' asFilename isDirectory 
-        '/foo/bar' asFilename isReadable 
+	'/fee/foo/foe' asFilename exists
+	'/not_existing' asFilename isDirectory
+	'/foo/bar' asFilename isReadable
 
     (all of the above examples will probably return false on your machine ;-).
 
     examples:
 
-        'Makefile' asFilename readStream
-
-        'newFile' asFilename writeStream
-
-        Filename newTemporary writeStream
+	'Makefile' asFilename readStream
+
+	'newFile' asFilename writeStream
+
+	Filename newTemporary writeStream
 
     Beside lots of protocol to query for a files attributes, the class
     protocol offers methods for filename completion, to construct pathes
@@ -74,150 +74,150 @@
     class methods are delegated to concrete implementations in various subclasses like
     UnixFilename, PCFilename, ...
     The delegation is implemented in a way, so that some methods of
-    specific OS Filenames might be used, even if ST/X is currently running 
+    specific OS Filenames might be used, even if ST/X is currently running
     on a different OS (as long as the method does not depend on the OperatingSystem class).
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [see also:]
-        String
-        FileStream DirectoryStream PipeStream Socket
-        OperatingSystem
-        Date Time
+	String
+	FileStream DirectoryStream PipeStream Socket
+	OperatingSystem
+	Date Time
 "
 !
 
 examples
 "
     does a file/directory exist ?:
-                                                                        [exBegin]
-        |f|
-
-        f := 'foobar' asFilename.
-        ^ f exists  
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := 'foobar' asFilename.
+	^ f exists
+									[exEnd]
 
 
     is it a directory ?:
-                                                                        [exBegin]
-        |f|
-
-        f := '/tmp' asFilename.
-        ^ f isDirectory.   
-                                                                        [exEnd]
-
-        
+									[exBegin]
+	|f|
+
+	f := '/tmp' asFilename.
+	^ f isDirectory.
+									[exEnd]
+
+
     get the working directory:
-                                                                        [exBegin]
-        ^ Filename defaultDirectory
-                                                                        [exEnd]
-
-
-    get a files full pathname 
+									[exBegin]
+	^ Filename defaultDirectory
+									[exEnd]
+
+
+    get a files full pathname
     (caring for relative names or symbolic links):
-                                                                        [exBegin]
-        |f|
-
-        f := '..' asFilename.
-        ^ f pathName  
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := '..' asFilename.
+	^ f pathName
+									[exEnd]
 
 
     get a directories directory:
-                                                                        [exBegin]
-        |f|
-
-        f := Filename defaultDirectory.
-        ^ f directory 
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := Filename defaultDirectory.
+	^ f directory
+									[exEnd]
 
 
     get a files directory:
-                                                                        [exBegin]
-        |f|
-
-        f := './smalltalk' asFilename.
-        ^ f directory 
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := './smalltalk' asFilename.
+	^ f directory
+									[exEnd]
 
 
     getting access & modification times:
-                                                                        [exBegin]
-        |f|
-
-        f := '/tmp' asFilename.
-        ^ f dates
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := '/tmp' asFilename.
+	^ f dates
+									[exEnd]
 
     access time only:
-                                                                        [exBegin]
-        |f|
-
-        f := '/tmp' asFilename.
-        ^ f dates at:#accessed  
-                                                                        [exEnd]
-        
+									[exBegin]
+	|f|
+
+	f := '/tmp' asFilename.
+	^ f dates at:#accessed
+									[exEnd]
+
 
     getting all information on a file/directory:
-                                                                        [exBegin]
-        |f|
-
-        f := '/tmp' asFilename.
-        ^ f info
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := '/tmp' asFilename.
+	^ f info
+									[exEnd]
 
 
     getting a temporary file (unique name):
-                                                                        [exBegin]
-        |f|
-
-        f := Filename newTemporary.
-        ^ f    
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := Filename newTemporary.
+	^ f
+									[exEnd]
 
     creating, writing, reading and removing a temporary file:
-                                                                        [exBegin]
-        |f writeStream readStream|
-
-        f := Filename newTemporary.
-        writeStream := f writeStream.
-        writeStream nextPutAll:'hello world'.
-        writeStream cr.
-        writeStream close.
-
-        'contents (as seen by unix''s cat command:' printNL.
-        OperatingSystem executeCommand:('cat ' , f pathName).
-
-        readStream := f readStream.
-        Transcript showCR:'contents as seen by smalltalk:'.
-        Transcript showCR:(readStream upToEnd).
-        readStream close.
-
-        f delete.
-                                                                        [exEnd]
-        
+									[exBegin]
+	|f writeStream readStream|
+
+	f := Filename newTemporary.
+	writeStream := f writeStream.
+	writeStream nextPutAll:'hello world'.
+	writeStream cr.
+	writeStream close.
+
+	'contents (as seen by unix''s cat command:' printNL.
+	OperatingSystem executeCommand:('cat ' , f pathName).
+
+	readStream := f readStream.
+	Transcript showCR:'contents as seen by smalltalk:'.
+	Transcript showCR:(readStream upToEnd).
+	readStream close.
+
+	f delete.
+									[exEnd]
+
 
     getting a directories contents:
-                                                                        [exBegin]
-        |f files|
-
-        f := Filename currentDirectory.
-        files := f directoryContents.
-        Transcript showCR:'the files are:'.
-        Transcript showCR:(files printString).
-                                                                        [exEnd]
+									[exBegin]
+	|f files|
+
+	f := Filename currentDirectory.
+	files := f directoryContents.
+	Transcript showCR:'the files are:'.
+	Transcript showCR:(files printString).
+									[exEnd]
 
 
     editing a file:
-                                                                        [exBegin]
-        |f|
-
-        f := Filename newTemporary.
-        (f writeStream) nextPutAll:'hello world'; close.
-
-        f edit
-                                                                        [exEnd]
+									[exBegin]
+	|f|
+
+	f := Filename newTemporary.
+	(f writeStream) nextPutAll:'hello world'; close.
+
+	f edit
+									[exEnd]
 "
 ! !
 
@@ -227,7 +227,7 @@
     "initialize for the OS we are running on"
 
     ConcreteClass isNil ifTrue:[
-        self initializeConcreteClass
+	self initializeConcreteClass
     ].
 
     "
@@ -241,17 +241,17 @@
     "initialize for the OS we are running on"
 
     OperatingSystem isUNIXlike ifTrue:[
-        ConcreteClass := UnixFilename
+	ConcreteClass := UnixFilename
     ] ifFalse:[OperatingSystem isMSDOSlike ifTrue:[
-        ConcreteClass := PCFilename
+	ConcreteClass := PCFilename
     ] ifFalse:[OperatingSystem isVMSlike ifTrue:[
-        ConcreteClass := OpenVMSFilename
+	ConcreteClass := OpenVMSFilename
     ] ifFalse:[
-        self error:'Filename: unknown OperatingSystem when initializing concrete Filename class'.
+	self error:'Filename: unknown OperatingSystem when initializing concrete Filename class'.
     ]]].
 
     ConcreteClass isNil ifTrue:[
-        self error:'Filename: Missing concrete Filename class'.
+	self error:'Filename: Missing concrete Filename class'.
     ].
 
     "
@@ -288,14 +288,14 @@
     |exeName|
 
     Smalltalk isStandAloneApp ifTrue:[
-        exeName := OperatingSystem nameOfSTXExecutable.
+	exeName := OperatingSystem nameOfSTXExecutable.
     ] ifFalse:[
-        exeName := 'smalltalk'
+	exeName := 'smalltalk'
     ].
     ^ self applicationDataDirectoryFor:exeName
 
-    "                    
-     Filename applicationDataDirectory   
+    "
+     Filename applicationDataDirectory
     "
 !
 
@@ -310,18 +310,18 @@
 
     s := OperatingSystem getApplicationDataDirectoryFor:appName.
     s isNil ifTrue:[
-        ^ self homeDirectory
+	^ self homeDirectory
     ].
     dir := self named:s.
     dir exists ifFalse:[
-        dir makeDirectory
+	dir makeDirectory
     ].
     ^ dir
 
-    "                    
-     Filename applicationDataDirectoryFor:'smalltalk'        
-     Filename applicationDataDirectoryFor:'expecco'        
-      applicationDataDirectoryFor:'expecco'        
+    "
+     Filename applicationDataDirectoryFor:'smalltalk'
+     Filename applicationDataDirectoryFor:'expecco'
+      applicationDataDirectoryFor:'expecco'
     "
 
     "Created: / 29-07-2010 / 12:05:35 / sr"
@@ -333,7 +333,7 @@
     ^ self named:(OperatingSystem getCurrentDirectory).
 
     "
-     Filename currentDirectory 
+     Filename currentDirectory
     "
 !
 
@@ -343,7 +343,7 @@
     ^ self currentDirectory
 
     "
-     Filename defaultDirectory 
+     Filename defaultDirectory
     "
 !
 
@@ -354,25 +354,25 @@
      Use this for files which MUST remain the same (stx_sourceCache)"
 
     DefaultTempDirectory isNil ifTrue:[
-        self tempDirectory.  "/ actually sets DefaultTempDirectory as side effect
-        DefaultTempDirectory isNil ifTrue:[
-            DefaultTempDirectory := TempDirectory
-        ].
+	self tempDirectory.  "/ actually sets DefaultTempDirectory as side effect
+	DefaultTempDirectory isNil ifTrue:[
+	    DefaultTempDirectory := TempDirectory
+	].
     ].
 
     DefaultTempDirectory exists ifFalse:[
-        DefaultTempDirectory
-            makeDirectory; 
-            addAccessRights:#(readUser readGroup readOthers 
-                              writeUser writeGroup writeOthers
-                              executeUser executeGroup executeOthers
-                              removeOnlyByOwner).
+	DefaultTempDirectory
+	    makeDirectory;
+	    addAccessRights:#(readUser readGroup readOthers
+			      writeUser writeGroup writeOthers
+			      executeUser executeGroup executeOthers
+			      removeOnlyByOwner).
     ].
     ^ DefaultTempDirectory
 
     "
-     Filename tempDirectory           
-     Filename defaultTempDirectory           
+     Filename tempDirectory
+     Filename defaultTempDirectory
     "
 
     "Created: / 07-03-1996 / 14:51:18 / cg"
@@ -381,19 +381,19 @@
 
 desktopDirectory
     "return your desktop directory.
-     Under windows, thats the real desktop directory; 
+     Under windows, thats the real desktop directory;
      under other OperatingSystems, the home directory is returned."
 
     |s|
 
     s := OperatingSystem getDesktopDirectory.
     s isNil ifTrue:[
-        ^ self homeDirectory
+	^ self homeDirectory
     ].
     ^ self named:s
 
     "
-     Filename desktopDirectory        
+     Filename desktopDirectory
     "
 
     "Created: / 16-05-2007 / 13:18:34 / cg"
@@ -401,19 +401,19 @@
 
 documentsDirectory
     "return your documents directory.
-     Under windows, thats the real 'Documents' or 'My Documents'; 
+     Under windows, thats the real 'Documents' or 'My Documents';
      under other OperatingSystems, the home directory is returned."
 
     |s|
 
     s := OperatingSystem getDocumentsDirectory.
     s isNil ifTrue:[
-        ^ self homeDirectory
+	^ self homeDirectory
     ].
     ^ self named:s
 
     "
-     Filename documentsDirectory        
+     Filename documentsDirectory
     "
 
     "Created: / 16-05-2007 / 13:18:34 / cg"
@@ -433,48 +433,48 @@
      root directory (i.e. '/') an absolute path-filename is returned."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass fromComponents:aCollectionOfDirectoryNames
+	^ ConcreteClass fromComponents:aCollectionOfDirectoryNames
     ].
 
     ^ self named:(self nameFromComponents:aCollectionOfDirectoryNames)
 
     "
-     Filename fromComponents:#('/' 'foo' 'bar' 'baz')  
-     PCFilename fromComponents:#('/' 'foo' 'bar' 'baz')  
-     UnixFilename fromComponents:#('/' 'foo' 'bar' 'baz')  
+     Filename fromComponents:#('/' 'foo' 'bar' 'baz')
+     PCFilename fromComponents:#('/' 'foo' 'bar' 'baz')
+     UnixFilename fromComponents:#('/' 'foo' 'bar' 'baz')
      OpenVMSFilename fromComponents:#('foo' 'bar' 'baz')
 
-     Filename fromComponents:#('foo' 'bar' 'baz')  
-     Filename fromComponents:#('/')  
+     Filename fromComponents:#('foo' 'bar' 'baz')
+     Filename fromComponents:#('/')
 
      Filename fromComponents:
-         (Filename components:('.' asFilename pathName))
+	 (Filename components:('.' asFilename pathName))
 
      Filename fromComponents:
-         (Filename components:('.' asFilename name)) 
+	 (Filename components:('.' asFilename name))
     "
 
     "Modified: 8.9.1997 / 00:23:16 / cg"
 !
 
 fromUser
-    "show a box to enter a filename. 
+    "show a box to enter a filename.
      Return a filename instance or nil (if cancel was pressed)."
 
     |name|
 
-    name := Dialog 
-        requestFileName:'filename:' 
-        default:nil
-        fromDirectory:(FileSelectionBox lastFileSelectionDirectory).
+    name := Dialog
+	requestFileName:'filename:'
+	default:nil
+	fromDirectory:(FileSelectionBox lastFileSelectionDirectory).
 
     name notEmptyOrNil ifTrue:[
-        ^ self named:name
+	^ self named:name
     ].
     ^ nil
 
     "
-     Filename fromUser 
+     Filename fromUser
     "
 
     "Modified: 19.4.1996 / 13:57:44 / cg"
@@ -490,12 +490,12 @@
 
     s := OperatingSystem getHomeDirectory.
     s isNil ifTrue:[
-        ^ self defaultDirectory
+	^ self defaultDirectory
     ].
     ^ self named:s
 
     "
-     Filename homeDirectory        
+     Filename homeDirectory
     "
 
     "Modified: 8.9.1997 / 00:25:23 / cg"
@@ -506,7 +506,7 @@
      This is the same as 'aString asFilename'."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass named:aString
+	^ ConcreteClass named:aString
     ].
     ^ self basicNew setName:aString
 
@@ -522,7 +522,7 @@
      The filenames returned are '/tmp/stxtmp_xx_nn' where xx is our
      unix process id, and nn is a unique number, incremented with every
      call to this method.
-     If any of the environment variables ST_TMPDIR or TMPDIR is set, 
+     If any of the environment variables ST_TMPDIR or TMPDIR is set,
      its value defines the temp directory.
      Notice, that no file is created by this - only a unique name
      is generated.
@@ -536,8 +536,8 @@
     ^ self newTemporaryIn:(self tempDirectory)
 
     "
-     Filename newTemporary    
-     Filename newTemporary     
+     Filename newTemporary
+     Filename newTemporary
     "
 
     "Modified: 7.9.1995 / 10:48:31 / claus"
@@ -549,7 +549,7 @@
      The directories returned are '/tmp/stxtmp_xx_nn' where xx is our
      unix process id, and nn is a unique number, incremented with every
      call to this method.
-     If any of the environment variables ST_TMPDIR or TMPDIR is set, 
+     If any of the environment variables ST_TMPDIR or TMPDIR is set,
      its value defines the temp directory."
 
     ^ self newTemporaryDirectoryIn:(self tempDirectory)
@@ -561,14 +561,14 @@
      The directories returned are '/tmp/stxtmp_xx_nn' where xx is our
      unix process id, and nn is a unique number, incremented with every
      call to this method.
-     If any of the environment variables ST_TMPDIR or TMPDIR is set, 
+     If any of the environment variables ST_TMPDIR or TMPDIR is set,
      its value defines the temp directory."
 
     |tempdir|
 
     tempdir := self newTemporaryIn:aDirectoryOrNil.
     tempdir exists ifTrue:[
-        tempdir recursiveRemove.
+	tempdir recursiveRemove.
     ].
     tempdir makeDirectory.
     ^ tempdir
@@ -577,7 +577,7 @@
 newTemporaryIn:aDirectoryOrNil
     "return a new unique filename - use this for temporary files.
      The filenames returned are in aDirectoryPrefix and named 'stxtmp_xx_nn',
-     where xx is our unix process id, and nn is a unique number, incremented 
+     where xx is our unix process id, and nn is a unique number, incremented
      with every call to this method.
      Notice: only a unique filename object is created and returned - no physical
      file is created by this method (i.e. you have to send #writeStream or
@@ -590,24 +590,24 @@
 
     "temp files in '/tmp':
 
-     Filename newTemporary    
-    "
-
-    "temp files somewhere 
+     Filename newTemporary
+    "
+
+    "temp files somewhere
      (not recommended - use above since it can be controlled via shell variables):
 
-     UnixFilename newTemporaryIn:'/tmp'    
-     UnixFilename newTemporaryIn:'/tmp'  
-     UnixFilename newTemporaryIn:'/usr/tmp'    
-     UnixFilename newTemporaryIn:'/'  
+     UnixFilename newTemporaryIn:'/tmp'
+     UnixFilename newTemporaryIn:'/tmp'
+     UnixFilename newTemporaryIn:'/usr/tmp'
+     UnixFilename newTemporaryIn:'/'
     "
 
     "a local temp file:
 
-     Filename newTemporaryIn:''         
-     Filename newTemporaryIn:nil         
-     Filename newTemporaryIn:'.'         
-     Filename newTemporaryIn:('source' asFilename) 
+     Filename newTemporaryIn:''
+     Filename newTemporaryIn:nil
+     Filename newTemporaryIn:'.'
+     Filename newTemporaryIn:('source' asFilename)
     "
 
     "Modified: / 7.9.1995 / 10:48:31 / claus"
@@ -617,7 +617,7 @@
 newTemporaryIn:aDirectoryOrNil nameTemplate:template
     "return a new unique filename - use this for temporary files.
      The filenames returned are in aDirectoryOrNil and named after the given template,
-     in which %1 and %2 are expanded to the unix process id, and a unique number, incremented 
+     in which %1 and %2 are expanded to the unix process id, and a unique number, incremented
      with every call to this method respectively.
      Notice: only a unique filename object is created and returned - no physical
      file is created by this method (i.e. you have to send #writeStream or
@@ -629,52 +629,52 @@
     |nameString newTempFilename|
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass newTemporaryIn:aDirectoryOrNil nameTemplate:template
+	^ ConcreteClass newTemporaryIn:aDirectoryOrNil nameTemplate:template
     ].
 
     "although the above allows things to be redefined in concrete classes,
      the following should work on all systems ..."
 
     [
-        "Use random numbers in order to improve the security 
-         by making the generated names less predictable"
-        nameString := template bindWith:(OperatingSystem getProcessId) with:RandomGenerator new nextInteger.
-
-        aDirectoryOrNil isNil ifTrue:[
-            newTempFilename := self named:nameString
-        ] ifFalse:[
-            newTempFilename := aDirectoryOrNil asFilename construct:nameString
-        ]
+	"Use random numbers in order to improve the security
+	 by making the generated names less predictable"
+	nameString := template bindWith:(OperatingSystem getProcessId) with:RandomGenerator new nextInteger.
+
+	aDirectoryOrNil isNil ifTrue:[
+	    newTempFilename := self named:nameString
+	] ifFalse:[
+	    newTempFilename := aDirectoryOrNil asFilename construct:nameString
+	]
     ] doWhile:[
-        "care for existing leftOver tempFiles
-         from a previous boot of the OS
-         i.e. my pid could be the same as when executed
-         the last time before system reboot ...)"
-
-        newTempFilename exists
+	"care for existing leftOver tempFiles
+	 from a previous boot of the OS
+	 i.e. my pid could be the same as when executed
+	 the last time before system reboot ...)"
+
+	newTempFilename exists
     ].
     ^ newTempFilename
 
     "temp files in '/tmp':
 
-     Filename newTemporary    
-    "
-
-    "temp files somewhere 
+     Filename newTemporary
+    "
+
+    "temp files somewhere
      (not recommended - use above since it can be controlled via shell variables):
 
-     UnixFilename newTemporaryIn:'/tmp'     nameTemplate:'foo%1_%2'    
-     UnixFilename newTemporaryIn:'/tmp'     nameTemplate:'foo%1_%2'  
-     UnixFilename newTemporaryIn:'/usr/tmp' nameTemplate:'foo%1_%2'    
-     UnixFilename newTemporaryIn:'/'        nameTemplate:'foo%1_%2' 
+     UnixFilename newTemporaryIn:'/tmp'     nameTemplate:'foo%1_%2'
+     UnixFilename newTemporaryIn:'/tmp'     nameTemplate:'foo%1_%2'
+     UnixFilename newTemporaryIn:'/usr/tmp' nameTemplate:'foo%1_%2'
+     UnixFilename newTemporaryIn:'/'        nameTemplate:'foo%1_%2'
     "
 
     "a local temp file:
 
-     Filename newTemporaryIn:''             nameTemplate:'foo%1_%2' 
-     Filename newTemporaryIn:nil            nameTemplate:'foo%1_%2' 
-     Filename newTemporaryIn:'.'            nameTemplate:'foo%1_%2' 
-     Filename newTemporaryIn:('source' asFilename) nameTemplate:'foo%1_%2' 
+     Filename newTemporaryIn:''             nameTemplate:'foo%1_%2'
+     Filename newTemporaryIn:nil            nameTemplate:'foo%1_%2'
+     Filename newTemporaryIn:'.'            nameTemplate:'foo%1_%2'
+     Filename newTemporaryIn:('source' asFilename) nameTemplate:'foo%1_%2'
     "
 
     "Modified: / 07-09-1995 / 10:48:31 / claus"
@@ -689,7 +689,7 @@
 
     s := self nullFilename.
     s isNil ifTrue:[
-        ^ nil
+	^ nil
     ].
     ^ self named:s
 
@@ -704,34 +704,34 @@
 
 remoteHost:remoteHostString rootComponents:aCollectionOfDirectoryNames
     "create & return a new filename from components given in
-     aCollectionOfDirectoryNames on a host named remoteHostString. 
+     aCollectionOfDirectoryNames on a host named remoteHostString.
      An absolute network-filename is returned."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass remoteHost:remoteHostString 
-                        rootComponents:aCollectionOfDirectoryNames
+	^ ConcreteClass remoteHost:remoteHostString
+			rootComponents:aCollectionOfDirectoryNames
     ].
 
     remoteHostString notEmptyOrNil ifTrue:[
-        self error:'remote hosts are not supported by OS'
+	self error:'remote hosts are not supported by OS'
     ].
 
     ^ self rootComponents:aCollectionOfDirectoryNames
 
     "
-      'file:///tmp/test' asURI asFilename 
+      'file:///tmp/test' asURI asFilename
     "
 !
 
 rootComponents:aCollectionOfDirectoryNames
     "create & return a new filename from components given in
-     aCollectionOfDirectoryNames. 
+     aCollectionOfDirectoryNames.
      An absolute path-filename is returned."
 
     |sep s|
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass rootComponents:aCollectionOfDirectoryNames
+	^ ConcreteClass rootComponents:aCollectionOfDirectoryNames
     ].
 
     "/ fallBack - works on Unix & MSDOS
@@ -739,9 +739,9 @@
     sep := self separatorString.
     s := CharacterWriteStream new.
     aCollectionOfDirectoryNames do:[:component |
-        component ~= sep ifTrue:[
-            s nextPutAll:sep; nextPutAll:component
-        ]
+	component ~= sep ifTrue:[
+	    s nextPutAll:sep; nextPutAll:component
+	]
     ].
     s := s contents.
     s size == 0 ifTrue:[s := sep].
@@ -750,17 +750,17 @@
     "
      Filename rootComponents:#('/' 'foo' 'bar' 'baz')
 
-     Filename rootComponents:#('foo' 'bar' 'baz')  
-     PCFilename rootComponents:#('foo' 'bar' 'baz')  
-     UnixFilename rootComponents:#('foo' 'bar' 'baz')  
-
-     Filename rootComponents:#('/')  
+     Filename rootComponents:#('foo' 'bar' 'baz')
+     PCFilename rootComponents:#('foo' 'bar' 'baz')
+     UnixFilename rootComponents:#('foo' 'bar' 'baz')
+
+     Filename rootComponents:#('/')
 
      Filename rootComponents:
-         (Filename components:('.' asFilename pathName))
+	 (Filename components:('.' asFilename pathName))
 
      Filename rootComponents:
-         (Filename components:('.' asFilename name)) 
+	 (Filename components:('.' asFilename name))
     "
 
     "Modified: 8.9.1997 / 00:23:16 / cg"
@@ -770,7 +770,7 @@
     "return a filename for the root directory"
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass rootDirectory
+	^ ConcreteClass rootDirectory
     ].
 
     "/ fallBack - works on Unix & MSDOS (but not on VMS)
@@ -788,7 +788,7 @@
     "return a filename for the root directory on some volume"
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass rootDirectoryOnVolume:aVolumeName
+	^ ConcreteClass rootDirectoryOnVolume:aVolumeName
     ].
 
     "/ fallBack - works on Unix (not on MSDOS or VMS)
@@ -806,26 +806,26 @@
 tempDirectory
     "return the temp directory as a filename.
      If any of the environment variables STX_TMPDIR, ST_TMPDIR,
-     TMPDIR or TEMPDIR is set, its value defines the name, 
+     TMPDIR or TEMPDIR is set, its value defines the name,
      otherwise, '/tmp' is used. (at least on unix ...).
 
      Notice: do not hardcode '/tmp' into your programs - things may be
-             different on other operating systems. Also, the user may want to set the
-             TMPDIR environment variable to have her temp files somewhere else."
+	     different on other operating systems. Also, the user may want to set the
+	     TMPDIR environment variable to have her temp files somewhere else."
 
     |tempDir|
 
     TempDirectory isNil ifTrue:[
-        tempDir := self named:(self defaultTempDirectoryName pathName).
-        tempDir exists ifFalse:[
-            tempDir
-                makeDirectory; 
-                addAccessRights:#(readUser readGroup readOthers 
-                                  writeUser writeGroup writeOthers
-                                  executeUser executeGroup executeOthers
-                                  removeOnlyByOwner).
-        ].
-        TempDirectory := DefaultTempDirectory := tempDir construct:'stx_tmp'.
+	tempDir := self named:(self defaultTempDirectoryName pathName).
+	tempDir exists ifFalse:[
+	    tempDir
+		makeDirectory;
+		addAccessRights:#(readUser readGroup readOthers
+				  writeUser writeGroup writeOthers
+				  executeUser executeGroup executeOthers
+				  removeOnlyByOwner).
+	].
+	TempDirectory := DefaultTempDirectory := tempDir construct:'stx_tmp'.
     ].
 
     "Make sure, that the TempDirectory exists - it might have been removed
@@ -833,22 +833,22 @@
      Since it is shared between users, it must be accessable by all users."
 
     TempDirectory exists ifFalse:[
-        TempDirectory 
-            makeDirectory; 
-            addAccessRights:#(readUser readGroup readOthers 
-                              writeUser writeGroup writeOthers
-                              executeUser executeGroup executeOthers
-                              removeOnlyByOwner).
+	TempDirectory
+	    makeDirectory;
+	    addAccessRights:#(readUser readGroup readOthers
+			      writeUser writeGroup writeOthers
+			      executeUser executeGroup executeOthers
+			      removeOnlyByOwner).
     ].
     ^ TempDirectory
 
     "
-     Filename tempDirectory           
-     Filename tempDirectory pathName   
-     Filename tempDirectory exists    
-     Filename tempDirectory isWritable   
-     (Filename tempDirectory construct:'foo') makeDirectory   
-     (Filename tempDirectory construct:'foo') remove   
+     Filename tempDirectory
+     Filename tempDirectory pathName
+     Filename tempDirectory exists
+     Filename tempDirectory isWritable
+     (Filename tempDirectory construct:'foo') makeDirectory
+     (Filename tempDirectory construct:'foo') remove
     "
 
     "Created: / 07-03-1996 / 14:51:18 / cg"
@@ -864,8 +864,8 @@
     |temp|
 
     aFilename isNil ifTrue:[
-        TempDirectory := nil.
-        ^ self.
+	TempDirectory := nil.
+	^ self.
     ].
 
     temp := aFilename asFilename.
@@ -882,12 +882,12 @@
 
     s := OperatingSystem getTrashDirectory.
     s isNil ifTrue:[
-        ^ nil
+	^ nil
     ].
     ^ self named:s
 
     "
-     Filename desktopDirectory        
+     Filename desktopDirectory
     "
 
     "Created: / 16-05-2007 / 13:18:34 / cg"
@@ -928,13 +928,13 @@
      any of the TEMP-environment variables (see tempDirectory)."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass defaultTempDirectoryName
+	^ ConcreteClass defaultTempDirectoryName
     ].
 
     ^ '/tmp' asFilename
 
     "
-     Filename defaultTempDirectoryName           
+     Filename defaultTempDirectoryName
     "
 
     "Modified: 7.9.1995 / 10:48:31 / claus"
@@ -956,70 +956,70 @@
 !
 
 nameWithSpecialExpansions:aString
-    "return the nameString, expanding any OS specific macros. 
+    "return the nameString, expanding any OS specific macros.
      Here, a ~/ or ~user/ prefix is expanded to the users home dir (as in csh)"
 
     |dir user cutIdx idx userInfo|
 
     (aString startsWith:'~') ifFalse:[
-        ^ aString.
+	^ aString.
     ].
 
     aString size > 1 ifTrue:[
-        idx := aString indexOf:self separator.
-        idx == 0 ifTrue:[
-            "aString is '~user'"
-            user := aString copyFrom:2.
-            cutIdx := aString size + 1.
-        ] ifFalse:[
-            "aString is '~user/something'"
-            user := aString copyFrom:2 to:(idx - 1).
-            cutIdx := idx.
-        ].
-        user notEmpty ifTrue:[
-            userInfo := OperatingSystem userInfoOf:user.
-            userInfo notNil ifTrue:[
-                dir := userInfo at:#dir ifAbsent:nil.
-            ].
-            dir isNil ifTrue:[
+	idx := aString indexOf:self separator.
+	idx == 0 ifTrue:[
+	    "aString is '~user'"
+	    user := aString copyFrom:2.
+	    cutIdx := aString size + 1.
+	] ifFalse:[
+	    "aString is '~user/something'"
+	    user := aString copyFrom:2 to:(idx - 1).
+	    cutIdx := idx.
+	].
+	user notEmpty ifTrue:[
+	    userInfo := OperatingSystem userInfoOf:user.
+	    userInfo notNil ifTrue:[
+		dir := userInfo at:#dir ifAbsent:nil.
+	    ].
+	    dir isNil ifTrue:[
 "/                 ('Filename [info]: unknown user: ' , user) infoPrintCR.
-                ^ aString
-            ].
-        ].
+		^ aString
+	    ].
+	].
     ].
     dir isNil ifTrue:[
-        "aString is '~' or '~/'"
-        dir := OperatingSystem getHomeDirectory.
-        cutIdx := 2.
+	"aString is '~' or '~/'"
+	dir := OperatingSystem getHomeDirectory.
+	cutIdx := 2.
     ].
 
     ^ dir , (aString copyFrom:cutIdx)
 
     "
-     Filename new nameWithSpecialExpansions:'~'      
-     Filename new nameWithSpecialExpansions:'~\work'  
-     Filename new nameWithSpecialExpansions:'~stefan'     
-     Filename new nameWithSpecialExpansions:'~stefan\work' 
-     Filename new nameWithSpecialExpansions:'~foo'    
-     Filename new nameWithSpecialExpansions:'~foo\bar' 
-    "
-
-    "
-     UnixFilename new nameWithSpecialExpansions:'~'      
-     UnixFilename new nameWithSpecialExpansions:'~/work'  
-     UnixFilename new nameWithSpecialExpansions:'~stefan'     
-     UnixFilename new nameWithSpecialExpansions:'~stefan/work' 
-     UnixFilename new nameWithSpecialExpansions:'~foo'    
-     UnixFilename new nameWithSpecialExpansions:'~foo/bar' 
-    "
-
-    "
-     PCFilename new nameWithSpecialExpansions:'~'      
-     PCFilename new nameWithSpecialExpansions:'~\work'   
-     PCFilename new nameWithSpecialExpansions:'~stefan'     
-     PCFilename new nameWithSpecialExpansions:'~stefan\work' 
-     PCFilename new nameWithSpecialExpansions:'~foo'    
-     PCFilename new nameWithSpecialExpansions:'~foo\bar' 
+     Filename new nameWithSpecialExpansions:'~'
+     Filename new nameWithSpecialExpansions:'~\work'
+     Filename new nameWithSpecialExpansions:'~stefan'
+     Filename new nameWithSpecialExpansions:'~stefan\work'
+     Filename new nameWithSpecialExpansions:'~foo'
+     Filename new nameWithSpecialExpansions:'~foo\bar'
+    "
+
+    "
+     UnixFilename new nameWithSpecialExpansions:'~'
+     UnixFilename new nameWithSpecialExpansions:'~/work'
+     UnixFilename new nameWithSpecialExpansions:'~stefan'
+     UnixFilename new nameWithSpecialExpansions:'~stefan/work'
+     UnixFilename new nameWithSpecialExpansions:'~foo'
+     UnixFilename new nameWithSpecialExpansions:'~foo/bar'
+    "
+
+    "
+     PCFilename new nameWithSpecialExpansions:'~'
+     PCFilename new nameWithSpecialExpansions:'~\work'
+     PCFilename new nameWithSpecialExpansions:'~stefan'
+     PCFilename new nameWithSpecialExpansions:'~stefan\work'
+     PCFilename new nameWithSpecialExpansions:'~foo'
+     PCFilename new nameWithSpecialExpansions:'~foo\bar'
     "
 !
 
@@ -1029,22 +1029,22 @@
      On Unix systems, special characters might also be prefixed by a backslash character."
 
     (aPath startsWith:'"') ifFalse:[
-        (aPath includes:Character space) ifTrue:[
-            ^ '"',aPath,'"'
-        ].
+	(aPath includes:Character space) ifTrue:[
+	    ^ '"',aPath,'"'
+	].
     ].
     ^ aPath
 
 
     "
-     Filename possiblyQuotedPathname:'/tmp/bla'   
-     Filename possiblyQuotedPathname:'/tmp directory/bla'   
-     Filename possiblyQuotedPathname:'/tmp directory/bla file'   
-    "
-!
-
-suggest:aFilenameString 
-    "return a fileNamestring based on the argument, 
+     Filename possiblyQuotedPathname:'/tmp/bla'
+     Filename possiblyQuotedPathname:'/tmp directory/bla'
+     Filename possiblyQuotedPathname:'/tmp directory/bla file'
+    "
+!
+
+suggest:aFilenameString
+    "return a fileNamestring based on the argument,
      which is legal on the current platform."
 
     ^ self canonicalize:aFilenameString
@@ -1058,7 +1058,7 @@
     "return a filename for the current directory"
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass currentDirectoryName
+	^ ConcreteClass currentDirectoryName
     ].
 
     "/ fallBack - works on Unix & MSDOS (but not on VMS)
@@ -1066,7 +1066,7 @@
     ^ '.'
 
     "
-     Filename currentDirectoryName    
+     Filename currentDirectoryName
     "
 
     "Modified: / 8.9.1997 / 00:24:15 / cg"
@@ -1079,7 +1079,7 @@
     ^ self defaultDirectory name
 
     "
-     Filename defaultDirectoryName 
+     Filename defaultDirectoryName
     "
 !
 
@@ -1088,7 +1088,7 @@
      The default is nil here, redefined for VMS"
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass directorySuffix
+	^ ConcreteClass directorySuffix
     ].
 
     ^ nil
@@ -1096,7 +1096,7 @@
 
 errorReporter
     "who knows the signals to report errors?"
-        
+
     ^ FileStream
 
     "Created: 2.7.1996 / 12:30:25 / stefan"
@@ -1107,18 +1107,18 @@
      return the longest matching filename prefix as a string.
      The boolean directoriesOnly and filesOnly control respectively,
      if only directories or only regular files are to be considered for completion.
-     If multiple files match, the exception block aBlock is evaluated with a 
+     If multiple files match, the exception block aBlock is evaluated with a
      filename representing the directory (where the match was done) as argument.
      (this may be different from the inDirectory argument, if aString is absolute
       or starts with ../)"
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass 
-            filenameCompletionFor:aString 
-            directory:inDirectory       
-            directoriesOnly:directoriesOnly 
-            filesOnly:filesOnly 
-            ifMultiple:aBlock
+	^ ConcreteClass
+	    filenameCompletionFor:aString
+	    directory:inDirectory
+	    directoriesOnly:directoriesOnly
+	    filesOnly:filesOnly
+	    ifMultiple:aBlock
     ].
     ^ self filenameCompletionFor:aString directory:inDirectory directoriesOnly:directoriesOnly filesOnly:filesOnly ifMultiple:aBlock forMultipleDo:nil
 !
@@ -1128,7 +1128,7 @@
      return the longest matching filename prefix as a string.
      The boolean directoriesOnly and filesOnly control respectively,
      if only directories or only regular files are to be considered for completion.
-     If multiple files match, the exception block aBlock is evaluated with a 
+     If multiple files match, the exception block aBlock is evaluated with a
      filename representing the directory (where the match was done) as argument and the aMultipleBlock
      is evaluated with both the directory (where the match was done) and the matchSet
      (list of matched filenames)  as arguments.
@@ -1138,8 +1138,8 @@
     |s f matchSet nMatch name dir isAbsolute sep|
 
     aString size == 0 ifTrue:[
-        aBlock value:(self named:'.').
-        ^ ''
+	aBlock value:(self named:'.').
+	^ ''
     ].
 
     sep := self separator.
@@ -1152,34 +1152,34 @@
     dir := f directory.
 
     matchSet := matchSet select:[:aFilename |
-        |f isDir|
-
-        isAbsolute ifTrue:[
-            f := aFilename asFilename
-        ] ifFalse:[
-            f := (dir construct:aFilename). 
-        ].
-        isDir := f isDirectory.
-        directoriesOnly ifTrue:[
-            isDir
-        ] ifFalse:[
-            filesOnly ifTrue:[    
-                isDir not
-            ] ifFalse:[
-                true
-            ]
-        ]
+	|f isDir|
+
+	isAbsolute ifTrue:[
+	    f := aFilename asFilename
+	] ifFalse:[
+	    f := (dir construct:aFilename).
+	].
+	isDir := f isDirectory.
+	directoriesOnly ifTrue:[
+	    isDir
+	] ifFalse:[
+	    filesOnly ifTrue:[
+		isDir not
+	    ] ifFalse:[
+		true
+	    ]
+	]
     ].
 
     f := f asCanonicalizedFilename.
-        (nMatch := matchSet size) ~~ 1 ifTrue:[
-        "
-         more than one possible completion -
-        "
-        aMultipleBlock notNil ifTrue:[
-            aMultipleBlock value:f value:matchSet.
-        ].
-        aBlock value:f
+	(nMatch := matchSet size) ~~ 1 ifTrue:[
+	"
+	 more than one possible completion -
+	"
+	aMultipleBlock notNil ifTrue:[
+	    aMultipleBlock value:f value:matchSet.
+	].
+	aBlock value:f
     ].
 
     "
@@ -1189,17 +1189,17 @@
     name := f asString.
 
     nMatch <= 1 ifTrue:[
-        "
-         exactly one possible completion -
-        "
+	"
+	 exactly one possible completion -
+	"
 "/        f := dir construct:matchSet first.
-        false "directoriesOnly" ifFalse:[
-            (f exists and:[f isDirectory]) ifTrue:[
-                (name endsWith:sep) ifFalse:[
-                    name := name , sep asString
-                ].
-            ].
-        ]
+	false "directoriesOnly" ifFalse:[
+	    (f exists and:[f isDirectory]) ifTrue:[
+		(name endsWith:sep) ifFalse:[
+		    name := name , sep asString
+		].
+	    ].
+	]
     ].
 
     s := name.
@@ -1207,11 +1207,11 @@
     "/ special: if there was no change, and the string represented
     "/ is a directories name, add a directory separator
     ((nMatch == 1) or:[s = aString]) ifTrue:[
-        (s endsWith:sep) ifFalse:[
-            (self named:s) isDirectory ifTrue:[
-                ^ s , sep asString
-            ]
-        ].
+	(s endsWith:sep) ifFalse:[
+	    (self named:s) isDirectory ifTrue:[
+		^ s , sep asString
+	    ]
+	].
     ].
 
     ^ s
@@ -1231,7 +1231,7 @@
     |basePattern dir d files|
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass filesMatching:aPattern
+	^ ConcreteClass filesMatching:aPattern
     ].
 
     "/ the following works on Unix & MSDOS (but not on openVMS)
@@ -1244,7 +1244,7 @@
     ^ files collect:[:base | d constructString:base].
 
     "
-     Filename filesMatching:'*'   
+     Filename filesMatching:'*'
      Filename filesMatching:'/*'
      Filename filesMatching:'/usr/local/*'
     "
@@ -1255,14 +1255,14 @@
 isAbstract
     "return true, if this is not a concrete class"
 
-    ^ self == Filename 
+    ^ self == Filename
 !
 
 isBadCharacter:aCharacter
     "return true, if aCharacter is unallowed in a filename."
 
     self isAbstract  ifTrue:[
-        ^ ConcreteClass isBadCharacter:aCharacter
+	^ ConcreteClass isBadCharacter:aCharacter
     ].
 
     ^ aCharacter isControlCharacter
@@ -1273,7 +1273,7 @@
      We ask the OS about this, to be independent here."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass isCaseSensitive
+	^ ConcreteClass isCaseSensitive
     ].
 
     ^ OperatingSystem caseSensitiveFilenames
@@ -1284,11 +1284,11 @@
 localNameStringFrom:aString
     "ST-80 compatibility.
      what does this do ? (used in FileNavigator-goody).
-     GUESS: 
-        does it strip off any volume characters and make a path relative ?"
+     GUESS:
+	does it strip off any volume characters and make a path relative ?"
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass localNameStringFrom:aString
+	^ ConcreteClass localNameStringFrom:aString
     ].
 
     ^ aString withoutPrefix:self separatorString
@@ -1302,7 +1302,7 @@
      be in size. This depends on the OperatingSystem."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass maxComponentLength
+	^ ConcreteClass maxComponentLength
     ].
     ^ OperatingSystem maxFileNameLength
 !
@@ -1312,7 +1312,7 @@
      This depends on the OperatingSystem."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass maxLength
+	^ ConcreteClass maxLength
     ].
     ^ OperatingSystem maxPathLength
 
@@ -1325,7 +1325,7 @@
      The default is nil here"
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass nullFilename
+	^ ConcreteClass nullFilename
     ].
 
     ^ OperatingSystem getNullDevice
@@ -1333,19 +1333,19 @@
     "Created: / 12.1.1998 / 12:15:30 / stefan"
 !
 
-parentDirectoryName 
+parentDirectoryName
     "return the name used for the parent directory.
-     This is '..' for unix and dos-like systems. 
+     This is '..' for unix and dos-like systems.
      (there may be more in the future."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass parentDirectoryName
+	^ ConcreteClass parentDirectoryName
     ].
 
     ^ OperatingSystem parentDirectoryName
 
     "
-     Filename parentDirectoryName  
+     Filename parentDirectoryName
     "
 
     "Modified: 8.9.1997 / 00:34:39 / cg"
@@ -1371,19 +1371,19 @@
     ^ self separator asString
 
     "
-     Filename separatorString  
+     Filename separatorString
     "
 !
 
 suffixSeparator
     "return the filename suffix separator.
-     Usually, this is $. for unix-like and msdos systems 
+     Usually, this is $. for unix-like and msdos systems
      (there is currently no known system, where this differs)"
 
      ^ $.
 
      "
-      Filename suffixSeparator  
+      Filename suffixSeparator
      "
 
     "Modified: 7.9.1995 / 11:10:43 / claus"
@@ -1396,7 +1396,7 @@
      to generate a unique filename."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass tempFileNameTemplate
+	^ ConcreteClass tempFileNameTemplate
     ].
 
     ^ 'stxtmp_%1_%2'
@@ -1411,7 +1411,7 @@
      Q: what does this do on Unix systems ? (used in FileNavigator-goody)."
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass volumes
+	^ ConcreteClass volumes
     ].
 
     ^ OperatingSystem getDriveList
@@ -1431,20 +1431,20 @@
     ^ self nameFromComponents:(self canonicalizedNameComponents:aPathString)
 
     "
-     Filename canonicalize:'/etc/../etc'      
-     Filename canonicalize:'/home/cg/../'     
-     Filename canonicalize:'/home/cg/../././'  
-     Filename canonicalize:'./home/cg/../././'     
-     Filename canonicalize:'/home/././cg/../././'   
-     Filename canonicalize:'/home/././cg/././'    
-     Filename canonicalize:'/home/cg/../../..'    
-     Filename canonicalize:'cg/../../..'    
-     Filename canonicalize:'./'      
-     Filename canonicalize:'/home/.'   
-     Filename canonicalize:'/home/../..'   
-     Filename canonicalize:'//foo'   
-     Filename canonicalize:'///foo'   
-     Filename canonicalize:'//foo//bar'   
+     Filename canonicalize:'/etc/../etc'
+     Filename canonicalize:'/home/cg/../'
+     Filename canonicalize:'/home/cg/../././'
+     Filename canonicalize:'./home/cg/../././'
+     Filename canonicalize:'/home/././cg/../././'
+     Filename canonicalize:'/home/././cg/././'
+     Filename canonicalize:'/home/cg/../../..'
+     Filename canonicalize:'cg/../../..'
+     Filename canonicalize:'./'
+     Filename canonicalize:'/home/.'
+     Filename canonicalize:'/home/../..'
+     Filename canonicalize:'//foo'
+     Filename canonicalize:'///foo'
+     Filename canonicalize:'//foo//bar'
     "
 !
 
@@ -1464,49 +1464,49 @@
     comps := self components:aPathString.
     newComps := OrderedCollection new:comps size.
     comps do:[:eachComponent |
-        eachComponent ~= dot ifTrue:[
-            eachComponent = dotDot ifTrue:[
-               (newComps isEmpty 
-                or:[(newComps size == 1 and:[newComps first startsWith:rootName]) 
-                or:[newComps last = dotDot]]) ifTrue:[
-                   newComps add:eachComponent
-               ] ifFalse:[
-                   newComps removeLast
-               ].
-            ] ifFalse:[
-                newComps add:eachComponent
-            ].
-        ]
-    ]. 
+	eachComponent ~= dot ifTrue:[
+	    eachComponent = dotDot ifTrue:[
+	       (newComps isEmpty
+		or:[(newComps size == 1 and:[newComps first startsWith:rootName])
+		or:[newComps last = dotDot]]) ifTrue:[
+		   newComps add:eachComponent
+	       ] ifFalse:[
+		   newComps removeLast
+	       ].
+	    ] ifFalse:[
+		newComps add:eachComponent
+	    ].
+	]
+    ].
     "/ add current Directory if empty
     newComps isEmpty ifTrue:[
-        newComps add:dot.
+	newComps add:dot.
     ].
     ^ newComps
 
     "
-     Filename canonicalizedNameComponents:'/etc/../etc'      
-     Filename canonicalizedNameComponents:'/home/cg/../'     
-     Filename canonicalizedNameComponents:'/home/cg/../././'  
-     Filename canonicalizedNameComponents:'./home/cg/../././'     
-     Filename canonicalizedNameComponents:'/home/././cg/../././'   
-     Filename canonicalizedNameComponents:'/home/././cg/././'    
-     Filename canonicalizedNameComponents:'/home/cg/../../..'    
-     Filename canonicalizedNameComponents:'cg/../../..'    
-     Filename canonicalizedNameComponents:'/'      
-     Filename canonicalizedNameComponents:'./'      
-     Filename canonicalizedNameComponents:'/.'      
-     Filename canonicalizedNameComponents:'/home/.'   
-     Filename canonicalizedNameComponents:'/home'   
-     Filename canonicalizedNameComponents:'/home/../..'   
-     Filename canonicalizedNameComponents:'//foo'   
-     Filename canonicalizedNameComponents:'///foo'   
-     Filename canonicalizedNameComponents:'//foo//bar'   
+     Filename canonicalizedNameComponents:'/etc/../etc'
+     Filename canonicalizedNameComponents:'/home/cg/../'
+     Filename canonicalizedNameComponents:'/home/cg/../././'
+     Filename canonicalizedNameComponents:'./home/cg/../././'
+     Filename canonicalizedNameComponents:'/home/././cg/../././'
+     Filename canonicalizedNameComponents:'/home/././cg/././'
+     Filename canonicalizedNameComponents:'/home/cg/../../..'
+     Filename canonicalizedNameComponents:'cg/../../..'
+     Filename canonicalizedNameComponents:'/'
+     Filename canonicalizedNameComponents:'./'
+     Filename canonicalizedNameComponents:'/.'
+     Filename canonicalizedNameComponents:'/home/.'
+     Filename canonicalizedNameComponents:'/home'
+     Filename canonicalizedNameComponents:'/home/../..'
+     Filename canonicalizedNameComponents:'//foo'
+     Filename canonicalizedNameComponents:'///foo'
+     Filename canonicalizedNameComponents:'//foo//bar'
     "
 !
 
 components:aString
-    "separate the pathName given by aString into 
+    "separate the pathName given by aString into
      a collection containing the directory components and the file's name as
      the final component.
      If the argument names an absolute path, the first component will be the
@@ -1515,7 +1515,7 @@
     |sep f vol rest components|
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass components:aString
+	^ ConcreteClass components:aString
     ].
 
     "/ the following works on Unix & MSDOS (but not on openVMS)
@@ -1526,68 +1526,68 @@
     f := aString asFilename.
     vol := f volume.
     vol size ~~ 0 ifTrue:[
-        rest := f localPathName.
+	rest := f localPathName.
     ] ifFalse:[
-        rest := aString
+	rest := aString
     ].
 
     components := rest asCollectionOfSubstringsSeparatedBy:sep.
     (rest startsWith:sep) ifTrue:[
-        "first was a separator - root directory - restore"
-        (rest size > 1 and:[rest second = sep and:[vol isEmptyOrNil]]) ifTrue:[
-            "keep \\ for windows network paths"
-            components at:1 put:(String with:sep with:sep).
-        ] ifFalse:[
-            components at:1 put:sep asString.
-        ].
+	"first was a separator - root directory - restore"
+	(rest size > 1 and:[rest second = sep and:[vol isEmptyOrNil]]) ifTrue:[
+	    "keep \\ for windows network paths"
+	    components at:1 put:(String with:sep with:sep).
+	] ifFalse:[
+	    components at:1 put:sep asString.
+	].
     ].
     components := components select:[:each| each notEmpty].
 
     "/ prepend volume to first component (the root directory)
     vol size ~~ 0 ifTrue:[
-        components at:1 put:(vol , (components at:1)).
+	components at:1 put:(vol , (components at:1)).
     ].
     ^ components
 
     "
-     Filename components:'/foo/bar/baz'      
-     Filename components:'/'     
-     Filename components:'//'     
-     Filename components:'foo/bar/baz'  
-     Filename components:'foo/bar'  
-     Filename components:'foo'     
-     Filename components:'/foo'     
-     Filename components:'//foo'     
-     Filename components:''     
-
-     Filename components:'\'     
-     Filename components:'\foo'     
-     Filename components:'\foo\'     
-     Filename components:'\foo\bar'     
-     Filename components:'\foo\bar\'     
-     Filename components:'c:'        
-     Filename components:'c:\'       
-     Filename components:'c:\foo'      
-     Filename components:'c:\foo\'     
-     Filename components:'c:\foo\bar'     
-     Filename components:'c:\foo\bar\'  
-     Filename components:'\\idefix'     
-     Filename components:'\\idefix\home'     
-     Filename components:'\\idefix\home\bar'    
+     Filename components:'/foo/bar/baz'
+     Filename components:'/'
+     Filename components:'//'
+     Filename components:'foo/bar/baz'
+     Filename components:'foo/bar'
+     Filename components:'foo'
+     Filename components:'/foo'
+     Filename components:'//foo'
+     Filename components:''
+
+     Filename components:'\'
+     Filename components:'\foo'
+     Filename components:'\foo\'
+     Filename components:'\foo\bar'
+     Filename components:'\foo\bar\'
+     Filename components:'c:'
+     Filename components:'c:\'
+     Filename components:'c:\foo'
+     Filename components:'c:\foo\'
+     Filename components:'c:\foo\bar'
+     Filename components:'c:\foo\bar\'
+     Filename components:'\\idefix'
+     Filename components:'\\idefix\home'
+     Filename components:'\\idefix\home\bar'
     "
 
     "Modified: / 24.9.1998 / 19:10:52 / cg"
 !
 
 nameFromComponents:aCollectionOfDirectoryNames
-    "return a filenameString from components given in aCollectionOfDirectoryNames. 
+    "return a filenameString from components given in aCollectionOfDirectoryNames.
      If the first component is the name of the root directory (i.e. '/'),
      an absolute path-string is returned."
 
     |sep s|
 
     self isAbstract ifTrue:[
-        ^ ConcreteClass nameFromComponents:aCollectionOfDirectoryNames
+	^ ConcreteClass nameFromComponents:aCollectionOfDirectoryNames
     ].
 
     "/ fallBack - works on Unix & MSDOS
@@ -1595,50 +1595,50 @@
     sep := self separatorString.
     s := ''.
     aCollectionOfDirectoryNames keysAndValuesDo:[:index :component |
-        index == 1 ifTrue:[
-            s := component.
-        ] ifFalse:[
-            (index == 2 and:[ (s endsWith:sep) ]) ifTrue:[
-                s := s , component
-            ] ifFalse:[
-                s := s , sep , component
-            ]
-        ].
+	index == 1 ifTrue:[
+	    s := component.
+	] ifFalse:[
+	    (index == 2 and:[ (s endsWith:sep) ]) ifTrue:[
+		s := s , component
+	    ] ifFalse:[
+		s := s , sep , component
+	    ]
+	].
     ].
     ^ s
 
     "
-     Filename nameFromComponents:#('/' 'foo' 'bar' 'baz')  
-     Filename nameFromComponents:#('foo' 'bar' 'baz')  
-     Filename nameFromComponents:#('/') 
+     Filename nameFromComponents:#('/' 'foo' 'bar' 'baz')
+     Filename nameFromComponents:#('foo' 'bar' 'baz')
+     Filename nameFromComponents:#('/')
 
      |comps|
      comps := Filename components:'/foo/bar/baz'.
-     Filename nameFromComponents:comps        
+     Filename nameFromComponents:comps
 
      |comps|
      comps := Filename components:'\foo\bar\baz'.
-     Filename nameFromComponents:comps          
+     Filename nameFromComponents:comps
 
      |comps|
      comps := Filename components:'c:\foo\bar\baz'.
-     Filename nameFromComponents:comps            
+     Filename nameFromComponents:comps
 
      |comps|
      comps := Filename components:'foo\bar\baz'.
-     Filename nameFromComponents:comps            
+     Filename nameFromComponents:comps
 
      |comps|
      comps := Filename components:'foo'.
-     Filename nameFromComponents:comps            
+     Filename nameFromComponents:comps
 
      |comps|
      comps := Filename components:'\'.
-     Filename nameFromComponents:comps            
+     Filename nameFromComponents:comps
 
      |comps|
      comps := Filename components:'c:\'.
-     Filename nameFromComponents:comps            
+     Filename nameFromComponents:comps
     "
 
     "Modified: 8.9.1997 / 00:23:16 / cg"
@@ -1656,12 +1656,12 @@
 
      |rslt|
 
-     rslt := 
-        Filename 
-            readingFile:'/etc/passwd'
-            do:[:s |
-                s nextLine
-            ]. 
+     rslt :=
+	Filename
+	    readingFile:'/etc/passwd'
+	    do:[:s |
+		s nextLine
+	    ].
      Transcript showCR:rslt.
     "
 
@@ -1671,22 +1671,22 @@
      |rslt|
 
      rslt :=
-        Filename 
-            readingFile:'/etc/passwd' 
-            do:
-                [:s |
-                    |shells|
-
-                    shells := Bag new.
-                    s linesDo:
-                        [:line |
-                            |parts|
-
-                            parts := line asCollectionOfSubstringsSeparatedBy:$:.
-                            shells add:(parts seventh).
-                        ].
-                    shells contents
-                ].           
+	Filename
+	    readingFile:'/etc/passwd'
+	    do:
+		[:s |
+		    |shells|
+
+		    shells := Bag new.
+		    s linesDo:
+			[:line |
+			    |parts|
+
+			    parts := line asCollectionOfSubstringsSeparatedBy:$:.
+			    shells add:(parts seventh).
+			].
+		    shells contents
+		].
      Transcript showCR:rslt.
     "
 ! !
@@ -1705,9 +1705,9 @@
     ^ self isWritable
 
     "
-     '/foo/bar' asFilename canBeWritten 
-     '/tmp' asFilename canBeWritten   
-     'Makefile' asFilename canBeWritten   
+     '/foo/bar' asFilename canBeWritten
+     '/tmp' asFilename canBeWritten
+     'Makefile' asFilename canBeWritten
     "
 !
 
@@ -1727,17 +1727,17 @@
     string := self asString.
     idx := string lastIndexOf:$..
     idx > 1 ifTrue:[
-        ^ string copyFrom:idx
+	^ string copyFrom:idx
     ].
     ^ nil
 
     "
-     'foo.html' asFilename extension   
-     'foo.bar' asFilename extension       
-     'foo.bar.baz' asFilename extension   
-     'foo.' asFilename extension          
-     'foo' asFilename extension           
-     '.login' asFilename extension           
+     'foo.html' asFilename extension
+     'foo.bar' asFilename extension
+     'foo.bar.baz' asFilename extension
+     'foo.' asFilename extension
+     'foo' asFilename extension
+     '.login' asFilename extension
     "
 ! !
 
@@ -1755,11 +1755,11 @@
     |str|
 
     self species == aFilename species ifTrue:[
-        str := aFilename asString.
-        self species isCaseSensitive ifTrue:[
-            ^ nameString = str
-        ].
-        ^ nameString sameAs:str
+	str := aFilename asString.
+	self species isCaseSensitive ifTrue:[
+	    ^ nameString = str
+	].
+	^ nameString sameAs:str
     ].
     ^ false
 !
@@ -1777,32 +1777,32 @@
     self fileSize > f2 fileSize ifTrue:[^ false].
 
     [
-        s1 := self readStream.
-        s2 := f2 readStream.
-        s1 binary.
-        s2 binary.
-
-        buffer1 := ByteArray new:bufferSize.
-        buffer2 := ByteArray new:bufferSize.
-
-        [s1 atEnd] whileFalse:[
-            n := s1 nextBytes:bufferSize into:buffer1 startingAt:1.
-            n == 0 ifTrue:[
-                "/ receiver shorter.
-                ^ true
-            ].
-            (s2 nextBytes:n into:buffer2 startingAt:1) ~~ n ifTrue:[
-                "/ aFilename shorter
-                ^ false
-            ].
-            buffer1 ~= buffer2 ifTrue:[
-                ^ false
-            ]
-        ].
-        "/ receiver shorter or same size.
+	s1 := self readStream.
+	s2 := f2 readStream.
+	s1 binary.
+	s2 binary.
+
+	buffer1 := ByteArray new:bufferSize.
+	buffer2 := ByteArray new:bufferSize.
+
+	[s1 atEnd] whileFalse:[
+	    n := s1 nextBytes:bufferSize into:buffer1 startingAt:1.
+	    n == 0 ifTrue:[
+		"/ receiver shorter.
+		^ true
+	    ].
+	    (s2 nextBytes:n into:buffer2 startingAt:1) ~~ n ifTrue:[
+		"/ aFilename shorter
+		^ false
+	    ].
+	    buffer1 ~= buffer2 ifTrue:[
+		^ false
+	    ]
+	].
+	"/ receiver shorter or same size.
     ] ensure:[
-        s1 notNil ifTrue:[s1 close]. 
-        s2 notNil ifTrue:[s2 close]. 
+	s1 notNil ifTrue:[s1 close].
+	s2 notNil ifTrue:[s2 close].
     ].
     ^ true
 
@@ -1905,7 +1905,10 @@
     "return an integer useful as a hash-key"
 
     self species isCaseSensitive ifFalse:[
-        ^ nameString asUppercase hash   
+	"/ asLowercase is slightly better:
+	"/ it never converts single-byte strings to double one's,
+	"/ whereas asUppercase might (for umlaut-y)
+	^ nameString asUppercase hash
     ].
     ^ nameString hash
 !
@@ -1922,8 +1925,8 @@
     ^ self contentsIsPrefixOf:f2.
 
     "
-     'Make.proto' asFilename sameContentsAs:'Makefile'  
-     'Make.proto' asFilename sameContentsAs:'Make.proto'   
+     'Make.proto' asFilename sameContentsAs:'Makefile'
+     'Make.proto' asFilename sameContentsAs:'Make.proto'
     "
 
     "
@@ -2039,12 +2042,12 @@
     ^ self species components:self name
 
     "
-     '.' asFilename asAbsoluteFilename components 
-     'Makefile' asFilename asAbsoluteFilename components     
-    "
-!
-
-makeLegalFilename 
+     '.' asFilename asAbsoluteFilename components
+     'Makefile' asFilename asAbsoluteFilename components
+    "
+!
+
+makeLegalFilename
     "convert the receivers name to be a legal filename.
      This removes/replaces invalid characters and/or compresses
      the name as required by the OS.
@@ -2057,13 +2060,13 @@
     "
     nameString := nameString copyReplaceAll:(Character space) with:$_ ifNone:nameString.
     "
-     need more - especially on SYS5.3 type systems, 
+     need more - especially on SYS5.3 type systems,
      we may want to contract the fileName to 14 characters.
     "
     ^ self
 
     "
-     'hello world' asFilename makeLegalFilename 
+     'hello world' asFilename makeLegalFilename
     "
 
     "Modified: / 20.7.1998 / 13:16:51 / cg"
@@ -2090,13 +2093,13 @@
      may be changed in the near future, to raise an exception instead.
      So users of this method better test for existing directory before."
 
-    self recursiveDirectoryContentsDo:[:eachFileOrDirectoryName | 
-        |eachFileOrDirectory|
-
-        eachFileOrDirectory := self construct:eachFileOrDirectoryName.
-        eachFileOrDirectory isDirectory ifTrue:[
-            aBlock value:eachFileOrDirectory
-        ]
+    self recursiveDirectoryContentsDo:[:eachFileOrDirectoryName |
+	|eachFileOrDirectory|
+
+	eachFileOrDirectory := self construct:eachFileOrDirectoryName.
+	eachFileOrDirectory isDirectory ifTrue:[
+	    aBlock value:eachFileOrDirectory
+	]
     ].
 
     "
@@ -2114,9 +2117,9 @@
     here := self.
     parent := here directory.
     [here notNil and:[parent ~= here]] whileTrue:[
-        aBlock value:parent.    
-        here := parent.
-        parent := here directory.
+	aBlock value:parent.
+	here := parent.
+	parent := here directory.
     ].
 
     "
@@ -2130,10 +2133,10 @@
     |collection|
 
     collection := OrderedCollection new.
-    self directoryContentsAsFilenamesDo:[:eachFileOrDirectory | 
-        eachFileOrDirectory isDirectory ifTrue:[
-            collection add:eachFileOrDirectory.
-        ].
+    self directoryContentsAsFilenamesDo:[:eachFileOrDirectory |
+	eachFileOrDirectory isDirectory ifTrue:[
+	    collection add:eachFileOrDirectory.
+	].
     ].
 
     ^ collection
@@ -2155,9 +2158,9 @@
      So users of this method better test for existing directory before."
 
     self directoryContentsAsFilenamesDo:[:eachFileOrDirectory |
-        eachFileOrDirectory isDirectory ifTrue:[
-            aBlock value:eachFileOrDirectory
-        ]
+	eachFileOrDirectory isDirectory ifTrue:[
+	    aBlock value:eachFileOrDirectory
+	]
     ].
 
     "
@@ -2177,7 +2180,7 @@
      #directoryContentsDo:, which enumerates strings."
 
     self directoryContentsDo:[:entry |
-        aBlock value:(self construct:entry).
+	aBlock value:(self construct:entry).
     ]
 
     "
@@ -2204,25 +2207,25 @@
     s := DirectoryStream directoryNamed:self osNameForDirectoryContents.
     "check for nil, in order to allow to proceed from an OpenError"
     s notNil ifTrue:[
-        [
-            [s atEnd] whileFalse:[
-                |fn|
-
-                fn := s nextLine.
-                (fn ~= '.' and:[fn ~= '..']) ifTrue:[        
-                    aBlock value:fn
-                ].
-            ].
-        ] ensure:[
-            s close.
-        ].
+	[
+	    [s atEnd] whileFalse:[
+		|fn|
+
+		fn := s nextLine.
+		(fn ~= '.' and:[fn ~= '..']) ifTrue:[
+		    aBlock value:fn
+		].
+	    ].
+	] ensure:[
+	    s close.
+	].
     ].
 
     "
      '.' asFilename directoryContentsDo:[:fn | Transcript showCR:fn].
      'doeSnotExIST' asFilename directoryContentsDo:[:fn | Transcript showCR:fn].
      [
-        'doeSnotExIST' asFilename directoryContentsDo:[:fn | Transcript showCR:fn].
+	'doeSnotExIST' asFilename directoryContentsDo:[:fn | Transcript showCR:fn].
      ] on:OpenError do:[:ex| ex proceed]
     "
 
@@ -2236,10 +2239,10 @@
     |collection|
 
     collection := OrderedCollection new.
-    self directoryContentsAsFilenamesDo:[:eachFileName | 
-        eachFileName isRegularFile ifTrue:[
-            collection add:eachFileName
-        ].
+    self directoryContentsAsFilenamesDo:[:eachFileName |
+	eachFileName isRegularFile ifTrue:[
+	    collection add:eachFileName
+	].
     ].
     ^ collection.
 
@@ -2253,8 +2256,8 @@
 filesDo:aBlock
     "evaluate aBlock for all files contained in the directory represented by the receiver."
 
-    ^ self directoryContentsAsFilenamesDo:[:eachFileOrDirectory | 
-        eachFileOrDirectory isRegularFile ifTrue:[ aBlock value: eachFileOrDirectory].
+    ^ self directoryContentsAsFilenamesDo:[:eachFileOrDirectory |
+	eachFileOrDirectory isRegularFile ifTrue:[ aBlock value: eachFileOrDirectory].
     ].
 
     "
@@ -2265,7 +2268,7 @@
     "Modified: / 29-05-2007 / 12:02:46 / cg"
 !
 
-recursiveDirectoryContentsAsFilenamesDo:aBlock 
+recursiveDirectoryContentsAsFilenamesDo:aBlock
     "evaluate aBlock for all files and directories found under the receiver.
      The block is invoked with the filenames as argument.
      The walk is bread-first.
@@ -2274,17 +2277,17 @@
      Warning: this may take a long time to execute (especially with deep and/or remote fileSystems)."
 
     self recursiveDirectoryContentsDo:[:relFn |
-        aBlock value:(self construct:relFn)
+	aBlock value:(self construct:relFn)
     ].
 
     "
-     '.' asFilename recursiveDirectoryContentsAsFilenamesDo:[:f | Transcript showCR:f] 
+     '.' asFilename recursiveDirectoryContentsAsFilenamesDo:[:f | Transcript showCR:f]
     "
 
     "Modified: / 12-09-2010 / 15:43:22 / cg"
 !
 
-recursiveDirectoryContentsDo:aBlock 
+recursiveDirectoryContentsDo:aBlock
     "evaluate aBlock for all files and directories found under the receiver.
      The block is invoked with the relative filenames as string-argument.
      The walk is bread-first.
@@ -2295,7 +2298,7 @@
     self recursiveDirectoryContentsDo:aBlock directoryPrefix:''
 
     "
-     '.' asFilename recursiveDirectoryContentsDo:[:f | Transcript showCR:f] 
+     '.' asFilename recursiveDirectoryContentsDo:[:f | Transcript showCR:f]
     "
 
     "Modified: / 12-09-2010 / 15:43:22 / cg"
@@ -2315,32 +2318,32 @@
     fileNames := OrderedCollection new.
     dirNames := OrderedCollection new.
     self directoryContentsDo:[:f | |t|
-        t := self construct:f.
-        t isDirectory ifTrue:[
-            t isSymbolicLink ifFalse:[
-                dirNames add:f
-            ]
-        ] ifFalse:[
-            fileNames add:f
-        ]
+	t := self construct:f.
+	t isDirectory ifTrue:[
+	    t isSymbolicLink ifFalse:[
+		dirNames add:f
+	    ]
+	] ifFalse:[
+	    fileNames add:f
+	]
     ].
 
     aPrefix size > 0 ifTrue:[
-        p := aPrefix , self separator
+	p := aPrefix , self separator
     ] ifFalse:[
-        p := ''
+	p := ''
     ].
 
     fileNames do:[:aFile | aBlock value:(p , aFile)].
     dirNames do:[:dN |
-        aBlock value:(p , dN).
-        (self construct:dN)
-            recursiveDirectoryContentsDo:aBlock directoryPrefix:(p , dN)
+	aBlock value:(p , dN).
+	(self construct:dN)
+	    recursiveDirectoryContentsDo:aBlock directoryPrefix:(p , dN)
     ].
 
     "
-     '.' asFilename recursiveDirectoryContentsDo:[:f | Transcript showCR:f] 
-     '/etc' asFilename recursiveDirectoryContentsDo:[:f | Transcript showCR:f] 
+     '.' asFilename recursiveDirectoryContentsDo:[:f | Transcript showCR:f]
+     '/etc' asFilename recursiveDirectoryContentsDo:[:f | Transcript showCR:f]
     "
 !
 
@@ -2354,7 +2357,7 @@
      So users of this method better test for existing directory before."
 
     self isDirectory ifTrue:[
-        aBlock value:self.
+	aBlock value:self.
     ].
     self allDirectoriesDo:aBlock.
 
@@ -2377,14 +2380,14 @@
     errNo := OperatingSystem lastErrorNumber.
     errString := OperatingSystem lastErrorString.
     errString size == 0 ifTrue:[
-        errString := ''.
+	errString := ''.
     ] ifFalse:[
-        errString := ' (' , errString , ')'
+	errString := ' (' , errString , ')'
     ].
 
     ^ OperatingSystem accessDeniedErrorSignal
-        raiseRequestWith:filename ? self
-        errorString:(' : ' , (filename ? self) asString , errString)
+	raiseRequestWith:filename ? self
+	errorString:(' : ' , (filename ? self) asString , errString)
 
     "Modified: / 26.9.1999 / 16:11:44 / cg"
 !
@@ -2395,18 +2398,18 @@
     "report an error that some file could not be created"
 
     ^ OperatingSystem accessDeniedErrorSignal
-        raiseRequestWith:filename?self
-        errorString:(' - cannot create/write file: "%1"' bindWith:(filename ? self) asString)
-!
-
-fileNotFoundError:filename 
+	raiseRequestWith:filename?self
+	errorString:(' - cannot create/write file: "%1"' bindWith:(filename ? self) asString)
+!
+
+fileNotFoundError:filename
     "{ Pragma: +optSpace }"
 
     "report an error that some file was not found"
 
     ^ OperatingSystem fileNotFoundErrorSignal
-        raiseRequestWith:filename?self
-        errorString:('file not found: ' , (filename ? self) asString)
+	raiseRequestWith:filename?self
+	errorString:('file not found: ' , (filename ? self) asString)
 !
 
 removeError:filename
@@ -2415,8 +2418,8 @@
     "report an error that some file could not be removed"
 
     ^ OperatingSystem accessDeniedErrorSignal
-        raiseRequestWith:filename?self
-        errorString:('cannot remove: ' , (filename?self) asString)
+	raiseRequestWith:filename?self
+	errorString:('cannot remove: ' , (filename?self) asString)
 !
 
 reportError:string with:filename
@@ -2425,8 +2428,8 @@
     "report an error"
 
     ^ OsError
-        raiseRequestWith:filename?self
-        errorString:string
+	raiseRequestWith:filename?self
+	errorString:string
 ! !
 
 !Filename methodsFor:'file access'!
@@ -2457,7 +2460,7 @@
      s nextPutAll:'abcdef'.
      s close.
 
-     '/tmp/foo' asFilename contents   
+     '/tmp/foo' asFilename contents
     "
 !
 
@@ -2478,8 +2481,8 @@
      s := '/tmp/foo' asFilename existingReadWriteStream.
      s nextPutAll:'abcdef'; close.
 
-     '/tmp/foo' asFilename contents inspect.     
-     '/tmp/foo' asFilename remove      
+     '/tmp/foo' asFilename contents inspect.
+     '/tmp/foo' asFilename remove
     "
 !
 
@@ -2501,7 +2504,7 @@
      s nextPutAll:'12345'.
      s close.
 
-     '/tmp/foo' asFilename contents   
+     '/tmp/foo' asFilename contents
     "
 !
 
@@ -2520,7 +2523,7 @@
      s close.
 
 
-     '/tmp/foo' asFilename contents   
+     '/tmp/foo' asFilename contents
     "
 !
 
@@ -2549,12 +2552,12 @@
      s nextPutAll:'1234567890'.
      s close.
 
-     s := '/tmp/foo' asFilename readWriteStream. 
+     s := '/tmp/foo' asFilename readWriteStream.
      s nextPutAll:'abcdef'.
      s close.
 
-     '/tmp/foo' asFilename contents      
-     '/tmp/foo' asFilename remove      
+     '/tmp/foo' asFilename contents
+     '/tmp/foo' asFilename remove
     "
 !
 
@@ -2566,7 +2569,7 @@
     ^ FileStream newFileForWritingNamed:(self osNameForAccess)
 
     "
-     '/tmp/foo' asFilename writeStream 
+     '/tmp/foo' asFilename writeStream
     "
 
     "
@@ -2580,7 +2583,7 @@
      s nextPutAll:'12345'.
      s close.
 
-     '/tmp/foo' asFilename contents  
+     '/tmp/foo' asFilename contents
     "
 ! !
 
@@ -2596,7 +2599,7 @@
      instead of an exception when an error occurs."
 
     ^ [
-        FileStream appendingOldFileNamed:(self osNameForAccess)
+	FileStream appendingOldFileNamed:(self osNameForAccess)
       ] on:FileStream openErrorSignal do:[:ex| nil].
 !
 
@@ -2610,7 +2613,7 @@
      instead of an exception when an error occurs."
 
     ^ [
-         FileStream newFileNamed:(self osNameForAccess)
+	 FileStream newFileNamed:(self osNameForAccess)
     ] on:FileStream openErrorSignal do:[:ex|nil].
 !
 
@@ -2623,12 +2626,12 @@
      instead of an exception when an error occurs."
 
     ^ [
-        FileStream readonlyFileNamed:(self osNameForAccess)
+	FileStream readonlyFileNamed:(self osNameForAccess)
     ] on:FileStream openErrorSignal do:[:ex|nil].
 
     "
-     '/tmp/foo' asFilename readStreamOrNil 
-     '/tmp/foo' asFilename readStream 
+     '/tmp/foo' asFilename readStreamOrNil
+     '/tmp/foo' asFilename readStream
     "
 !
 
@@ -2642,7 +2645,7 @@
      instead of an exception when an error occurs."
 
     ^ [
-        FileStream fileNamed:(self osNameForAccess)
+	FileStream fileNamed:(self osNameForAccess)
     ] on:FileStream openErrorSignal do:[:ex|^ nil].
 !
 
@@ -2656,12 +2659,12 @@
      instead of an exception when an error occurs."
 
     ^ [
-        FileStream newFileForWritingNamed:(self osNameForAccess)
+	FileStream newFileForWritingNamed:(self osNameForAccess)
     ] on:FileStream openErrorSignal do:[:ex|^ nil].
 
 
     "
-     '/etc/foo' asFilename writeStreamOrNil 
+     '/etc/foo' asFilename writeStreamOrNil
     "
 ! !
 
@@ -2683,14 +2686,14 @@
      which is normally retrieved by Filename>>#accessRights."
 
     (OperatingSystem changeAccessModeOf:self osNameForFile to:opaqueData) ifFalse:[
-        ^ self accessDeniedError:self
+	^ self accessDeniedError:self
     ].
 
     "
      |rights|
 
-     rights := 'Make.proto' asFilename accessRights. 
-     'Make.proto' asFilename accessRights:rights. 
+     rights := 'Make.proto' asFilename accessRights.
+     'Make.proto' asFilename accessRights:rights.
     "
 
     "Modified: / 5.5.1999 / 13:41:21 / cg"
@@ -2706,10 +2709,10 @@
     osName := self osNameForFile.
     access := OperatingSystem accessModeOf:osName.
     aCollection do:[:accessSymbol |
-        access := access bitOr:(OperatingSystem accessMaskFor:accessSymbol).
+	access := access bitOr:(OperatingSystem accessMaskFor:accessSymbol).
     ].
     (OperatingSystem changeAccessModeOf:osName to:access) ifFalse:[
-        ^ self accessDeniedError:self
+	^ self accessDeniedError:self
     ]
 
     "
@@ -2800,10 +2803,10 @@
     osName := self osNameForFile.
     access := OperatingSystem accessModeOf:osName.
     aCollection do:[:accessSymbol |
-        access := access bitAnd:(OperatingSystem accessMaskFor:accessSymbol) bitInvert.
+	access := access bitAnd:(OperatingSystem accessMaskFor:accessSymbol) bitInvert.
     ].
     (OperatingSystem changeAccessModeOf:osName to:access) ifFalse:[
-        ^ self accessDeniedError:self
+	^ self accessDeniedError:self
     ].
 
     "
@@ -2819,20 +2822,20 @@
 symbolicAccessRights
     "return the access rights of the file as a aCollection of access symbols.
      The returned collection consists of symbols like:
-        #readUser, #writeGroup etc."
+	#readUser, #writeGroup etc."
 
     |access osName|
 
     osName := self osNameForFile.
     access := OperatingSystem accessModeOf:osName.
 
-    ^ 
-        #(  readUser writeUser executeUser
-            readGroup writeGroup executeGroup
-            readOthers writeOthers executeOthers
-          ) select:[:eachSymbolicAccessSymbol |
-                access bitTest:(OperatingSystem accessMaskFor:eachSymbolicAccessSymbol).
-            ].
+    ^
+	#(  readUser writeUser executeUser
+	    readGroup writeGroup executeGroup
+	    readOthers writeOthers executeOthers
+	  ) select:[:eachSymbolicAccessSymbol |
+		access bitTest:(OperatingSystem accessMaskFor:eachSymbolicAccessSymbol).
+	    ].
 
     "
      'Makefile' asFilename symbolicAccessRights
@@ -2844,24 +2847,24 @@
 symbolicAccessRights:aCollectionOfSymbols
     "set the access rights of the file given a aCollection of access symbols.
      The collection must consist of symbols like:
-        #readUser, #writeGroup etc."
+	#readUser, #writeGroup etc."
 
     |access osName|
 
     osName := self osNameForFile.
     access := aCollectionOfSymbols inject:0 into:[:bitsSoFar :eachSymbolicAccessSymbol |
-                bitsSoFar bitOr:(OperatingSystem accessMaskFor:eachSymbolicAccessSymbol)
-              ].
+		bitsSoFar bitOr:(OperatingSystem accessMaskFor:eachSymbolicAccessSymbol)
+	      ].
 
     (OperatingSystem changeAccessModeOf:osName to:access) ifFalse:[
-        ^ self accessDeniedError:self
+	^ self accessDeniedError:self
     ].
 
     "
      |rights|
 
-     rights := 'Makefile' asFilename symbolicAccessRights. 
-     'Makefile' asFilename symbolicAccessRights:(rights , #(executeOthers)). 
+     rights := 'Makefile' asFilename symbolicAccessRights.
+     'Makefile' asFilename symbolicAccessRights:(rights , #(executeOthers)).
     "
 
     "Modified: / 5.5.1999 / 13:41:21 / cg"
@@ -2877,23 +2880,23 @@
 
     inStream := self readStream.
     [
-        newNameOrStream isStream ifTrue:[
-            outStream := newNameOrStream.
-        ] ifFalse:[
-            outStream := outStreamToClose := newNameOrStream asFilename appendingWriteStream.
-        ].
-
-        inStream binary.
-        outStream binary.
-
-        [
-            inStream copyToEndInto:outStream.
-        ] on:OsError do:[:ex|
-            ^ self fileCreationError:newNameOrStream
-        ]
+	newNameOrStream isStream ifTrue:[
+	    outStream := newNameOrStream.
+	] ifFalse:[
+	    outStream := outStreamToClose := newNameOrStream asFilename appendingWriteStream.
+	].
+
+	inStream binary.
+	outStream binary.
+
+	[
+	    inStream copyToEndInto:outStream.
+	] on:OsError do:[:ex|
+	    ^ self fileCreationError:newNameOrStream
+	]
     ] ensure:[
-        inStream close.
-        outStreamToClose notNil ifTrue:[outStreamToClose close].
+	inStream close.
+	outStreamToClose notNil ifTrue:[outStreamToClose close].
     ].
 
     "
@@ -2927,29 +2930,29 @@
 
     inStream := self readStream.
     inStream isNil ifTrue:[
-        "open failed, but somenone did a proceed for the OpenError.
-         Ignore this file but continue in order to copy the rest when
-         doing a recursive copy"
-        ^ self.
+	"open failed, but somenone did a proceed for the OpenError.
+	 Ignore this file but continue in order to copy the rest when
+	 doing a recursive copy"
+	^ self.
     ].
 
     [
-        newNameAlreadyExists := newName exists.
-        outStream := newName writeStream.
-        newNameAlreadyExists ifFalse:[
-            [
-                "would be nice to keep the access rights of the original test suite"    
-                newName accessRights:self accessRights.
-            ] on:OperatingSystem accessDeniedErrorSignal do:[:ex|
-                "ignore the error - may occure when copying to a network drive"
-            ].            
-        ].
-        inStream binary; buffered:false.
-        outStream binary; buffered:false.
-        inStream copyToEndInto:outStream.
+	newNameAlreadyExists := newName exists.
+	outStream := newName writeStream.
+	newNameAlreadyExists ifFalse:[
+	    [
+		"would be nice to keep the access rights of the original test suite"
+		newName accessRights:self accessRights.
+	    ] on:OperatingSystem accessDeniedErrorSignal do:[:ex|
+		"ignore the error - may occure when copying to a network drive"
+	    ].
+	].
+	inStream binary; buffered:false.
+	outStream binary; buffered:false.
+	inStream copyToEndInto:outStream.
     ] ensure:[
-        inStream close.
-        outStream notNil ifTrue:[outStream close].
+	inStream close.
+	outStream notNil ifTrue:[outStream close].
     ].
 
     "
@@ -2971,26 +2974,26 @@
 
     "Contents is not copied if newName represent same file as me."
     outStream isFileStream ifTrue:[
-        outStream fileName asAbsoluteFilename = self asAbsoluteFilename ifTrue: [ ^ self ].
+	outStream fileName asAbsoluteFilename = self asAbsoluteFilename ifTrue: [ ^ self ].
     ].
 
     inStream := self readStream.
     [
-        inStream binary"; buffered:false".
-        resetBinary := false.
-        outStream isBinary ifFalse:[
-            outStream binary.
-            resetBinary := true.
-        ].
-        inStream copyToEndInto:outStream.
+	inStream binary"; buffered:false".
+	resetBinary := false.
+	outStream isBinary ifFalse:[
+	    outStream binary.
+	    resetBinary := true.
+	].
+	inStream copyToEndInto:outStream.
     ] ensure:[
-        inStream close.
-        resetBinary ifTrue:[
-            outStream text.
-        ].
+	inStream close.
+	resetBinary ifTrue:[
+	    outStream text.
+	].
     ].
 
-    "   
+    "
      |out|
      out := FileStream newTemporary.
      'Make.proto' asFilename copyToStream:out.
@@ -3006,17 +3009,17 @@
     |writeStream|
 
     self exists ifTrue:[
-        OperatingSystem accessDeniedErrorSignal
-            raiseRequestWith:self
-            errorString:(' - file exists: ' , self asString).
-        ^ self
-    ].  
+	OperatingSystem accessDeniedErrorSignal
+	    raiseRequestWith:self
+	    errorString:(' - file exists: ' , self asString).
+	^ self
+    ].
 
     FileStream openErrorSignal handle:[:ex|
-        self fileCreationError:self.
-        ^ self
-    ] do:[    
-        writeStream := self newReadWriteStream.
+	self fileCreationError:self.
+	^ self
+    ] do:[
+	writeStream := self newReadWriteStream.
     ].
     writeStream close.
 !
@@ -3028,7 +3031,7 @@
     OperatingSystem createSymbolicLinkFrom:linkFilenameString to:self pathName.
 
     "
-        '/tmp/link' asFilename makeSymbolicLinkTo:'bla'
+	'/tmp/link' asFilename makeSymbolicLinkTo:'bla'
     "
 !
 
@@ -3043,13 +3046,13 @@
      Raises an exception if not successful"
 
     (self basicMakeDirectory) ifFalse:[
-        "/
-        "/ could have existed before ...
-        "/
-        (self exists and:[self isDirectory]) ifFalse:[
-            self fileCreationError:self.
-            ^ false
-        ]
+	"/
+	"/ could have existed before ...
+	"/
+	(self exists and:[self isDirectory]) ifFalse:[
+	    self fileCreationError:self.
+	    ^ false
+	]
     ].
     ^ true
 
@@ -3062,15 +3065,15 @@
      Raise an exception if not successful.
      (Notice, that a rename is tried first, in case of non-cross device move)"
 
-    [self renameTo:newName] 
-        on:OsError 
-        do:[:ex |
-            ex creator == OperatingSystem fileNotFoundErrorSignal ifTrue:[
-                ex reject
-            ].
-            self safeCopyTo:newName. 
-            self remove
-        ].
+    [self renameTo:newName]
+	on:OsError
+	do:[:ex |
+	    ex creator == OperatingSystem fileNotFoundErrorSignal ifTrue:[
+		ex reject
+	    ].
+	    self safeCopyTo:newName.
+	    self remove
+	].
 
     "
      |f s|
@@ -3101,18 +3104,18 @@
 
     |newName|
 
-    newName := newNameArg asFilename.    
-    [self renameTo:newName] 
-        on:(OSErrorHolder inappropriateReferentSignal) 
-        do:[:ex |
-            "handle renames accross device boundaries (Unix. cross device link)"
-            self isDirectory ifTrue:[
-                self recursiveMoveDirectoryTo:newName.
-            ] ifFalse:[
-                self safeCopyTo:newName.
-                self remove.
-            ].
-        ].
+    newName := newNameArg asFilename.
+    [self renameTo:newName]
+	on:(OSErrorHolder inappropriateReferentSignal)
+	do:[:ex |
+	    "handle renames accross device boundaries (Unix. cross device link)"
+	    self isDirectory ifTrue:[
+		self recursiveMoveDirectoryTo:newName.
+	    ] ifFalse:[
+		self safeCopyTo:newName.
+		self remove.
+	    ].
+	].
 
     "
      |f s|
@@ -3142,34 +3145,34 @@
 
      Raises an exception if not successful.
      Do not resolve symbolic links.
-     If a whole directory is to be copied and the destination directory 
+     If a whole directory is to be copied and the destination directory
      does not exist, it will be created."
 
     |ok destinationFilename|
 
     destinationFilename := destination asFilename.
     self isDirectory ifFalse:[
-        destinationFilename isDirectory ifTrue:[
-            destinationFilename := destinationFilename construct:self baseName.
-        ].
-        self copyTo:destinationFilename.
-        ^ self.
+	destinationFilename isDirectory ifTrue:[
+	    destinationFilename := destinationFilename construct:self baseName.
+	].
+	self copyTo:destinationFilename.
+	^ self.
     ].
 
     "/ typically, an 'cp -r' is faster;
     "/ however, if the command fails (or the OS does not support it),
     "/ fallBack doing a manual directory walk.
 
-    ok := OperatingSystem 
-            recursiveCopyDirectory:(self osNameForDirectory)
-            to:(destinationFilename osNameForDirectory).
+    ok := OperatingSystem
+	    recursiveCopyDirectory:(self osNameForDirectory)
+	    to:(destinationFilename osNameForDirectory).
 
     ok ifFalse:[
-        self recursiveCopyWithoutOSCommandTo:destinationFilename
+	self recursiveCopyWithoutOSCommandTo:destinationFilename
     ].
 
     "
-        '.' asFilename recursiveCopyTo:'/tmp/xxx'.
+	'.' asFilename recursiveCopyTo:'/tmp/xxx'.
     "
 
     "Created: / 05-05-1999 / 13:35:01 / cg"
@@ -3184,7 +3187,7 @@
      Raises an exception if not successful.
 
      Do not resolve symbolic links.
-     If a whole directory is to be copied and the destination directory 
+     If a whole directory is to be copied and the destination directory
      does not exist, it will be created."
 
     |destinationFilename|
@@ -3192,32 +3195,32 @@
     destinationFilename := destination asFilename.
 
     self isDirectory ifTrue:[
-        destinationFilename exists ifFalse:[
-            destinationFilename makeDirectory.
-            destinationFilename accessRights:self accessRights.
-        ].
-
-        self directoryContents do:[:aFilenameString |
-            |src dst|
-
-            src := self construct:aFilenameString.
-            dst := destinationFilename construct:aFilenameString.
-
-            src isDirectory ifTrue:[
-                src recursiveCopyWithoutOSCommandTo:dst
-            ] ifFalse:[src isSymbolicLink ifTrue:[                    
-                dst
-                    remove;
-                    createAsSymbolicLinkTo:src linkInfo path.
-            ] ifFalse:[
-                src copyTo:dst.
-            ]].
-        ].
+	destinationFilename exists ifFalse:[
+	    destinationFilename makeDirectory.
+	    destinationFilename accessRights:self accessRights.
+	].
+
+	self directoryContents do:[:aFilenameString |
+	    |src dst|
+
+	    src := self construct:aFilenameString.
+	    dst := destinationFilename construct:aFilenameString.
+
+	    src isDirectory ifTrue:[
+		src recursiveCopyWithoutOSCommandTo:dst
+	    ] ifFalse:[src isSymbolicLink ifTrue:[
+		dst
+		    remove;
+		    createAsSymbolicLinkTo:src linkInfo path.
+	    ] ifFalse:[
+		src copyTo:dst.
+	    ]].
+	].
     ] ifFalse:[
-        destinationFilename isDirectory ifTrue:[
-            destinationFilename := destinationFilename construct:self baseName.
-        ].
-        self copyTo:destinationFilename.
+	destinationFilename isDirectory ifTrue:[
+	    destinationFilename := destinationFilename construct:self baseName.
+	].
+	self copyTo:destinationFilename.
     ]
 
     "
@@ -3234,7 +3237,7 @@
      Raises an exception if not successful."
 
     (OperatingSystem recursiveCreateDirectory:(self osNameForDirectory)) ifFalse:[
-        ^ self fileCreationError:self
+	^ self fileCreationError:self
     ]
 
     "Created: / 27.11.1995 / 23:36:40 / cg"
@@ -3247,12 +3250,12 @@
      Raise an exception if not successful.
      (Notice, that a rename is tried first, in case of non-cross device move)"
 
-    [self renameTo:newName] 
-        on:OsError 
-        do:[ 
-            self recursiveCopyTo:newName.
-            self recursiveRemove
-        ].
+    [self renameTo:newName]
+	on:OsError
+	do:[
+	    self recursiveCopyTo:newName.
+	    self recursiveRemove
+	].
 !
 
 recursiveRemove
@@ -3263,26 +3266,26 @@
     |ok|
 
     "/ typically, an 'rm -rf' is faster and removes better;
-    "/ however, if the command fails (or the OS does not support it), 
+    "/ however, if the command fails (or the OS does not support it),
     "/ fallBack doing a manual directory walk.
 
     ok := OperatingSystem recursiveRemoveDirectory:(self osNameForDirectory).
     ok ifFalse:[
-        self recursiveRemoveWithoutOSCommand
+	self recursiveRemoveWithoutOSCommand
     ].
 
     "
      'foo' asFilename makeDirectory.
      'foo/bar' asFilename writeStream close.
      ('foo' asFilename remove) ifFalse:[
-        Transcript showCR:'could not remove foo'
+	Transcript showCR:'could not remove foo'
      ]
     "
     "
      'foo' asFilename makeDirectory.
      'foo/bar' asFilename writeStream close.
      ('foo' asFilename recursiveRemove) ifFalse:[
-        Transcript showCR:'could not remove foo'
+	Transcript showCR:'could not remove foo'
      ]
     "
 
@@ -3299,27 +3302,27 @@
     |files|
 
     self isDirectory ifTrue:[
-        (files := self directoryContents) size > 0 ifTrue:[
-            files do:[:aFilenameString |
-                |f|
-
-                f := self construct:aFilenameString.
-                Error handle:[:ex |
-                    f isDirectory ifFalse:[ ex reject ].
-
-                    f recursiveRemoveAll.
-                    f removeDirectory
-                ] do:[
-                    f remove
-                ].
+	(files := self directoryContents) size > 0 ifTrue:[
+	    files do:[:aFilenameString |
+		|f|
+
+		f := self construct:aFilenameString.
+		Error handle:[:ex |
+		    f isDirectory ifFalse:[ ex reject ].
+
+		    f recursiveRemoveAll.
+		    f removeDirectory
+		] do:[
+		    f remove
+		].
 
 "/                f isDirectory ifTrue:[
 "/                    f recursiveRemoveWithoutOSCommand
 "/                ] ifFalse:[
 "/                    f remove
 "/                ].
-            ].
-        ]
+	    ].
+	]
     ].
 
     "
@@ -3343,9 +3346,9 @@
      This one walks down the directory hierarchy, not using any OS
      command to do the remove."
 
-    self 
-        recursiveRemoveAll;
-        remove.
+    self
+	recursiveRemoveAll;
+	remove.
 
     "
      'foo' asFilename makeDirectory.
@@ -3371,18 +3374,18 @@
 
     osName := self osNameForFile.
     (ok := OperatingSystem removeFile:osName) ifFalse:[
-        linkInfo := self linkInfo.
-        linkInfo isNil ifTrue:[
-            "file does not exist - no error"
-            ^ self.
-        ] ifFalse:[linkInfo isDirectory ifTrue:[
-            ok := OperatingSystem removeDirectory:osName
-        ]].
-        ok ifFalse:[
-            self exists ifTrue:[
-                self removeError:self
-            ]
-        ]
+	linkInfo := self linkInfo.
+	linkInfo isNil ifTrue:[
+	    "file does not exist - no error"
+	    ^ self.
+	] ifFalse:[linkInfo isDirectory ifTrue:[
+	    ok := OperatingSystem removeDirectory:osName
+	]].
+	ok ifFalse:[
+	    self exists ifTrue:[
+		self removeError:self
+	    ]
+	]
     ].
 
     "
@@ -3394,7 +3397,7 @@
      'foo' asFilename makeDirectory.
      'foo/bar' asFilename writeStream close.
      'foo' asFilename remove.   'expect an exception'
-     'foo' asFilename recursiveRemove.   
+     'foo' asFilename recursiveRemove.
     "
 
     "Modified: / 20-11-1997 / 17:40:22 / stefan"
@@ -3411,25 +3414,25 @@
 
     ok := OperatingSystem removeDirectory:(self osNameForFile).
     ok ifFalse:[
-        self exists ifFalse:[ ^ self].
-        self removeError:self
+	self exists ifFalse:[ ^ self].
+	self removeError:self
     ].
 
     "
      (FileStream newFileNamed:'foo') close.
-     'foo' asFilename removeDirectory   
+     'foo' asFilename removeDirectory
     "
 
     "
      'foo' asFilename writeStream close.
-     'foo' asFilename removeDirectory   
+     'foo' asFilename removeDirectory
     "
 
     "
      'foo' asFilename makeDirectory.
      'foo/bar' asFilename writeStream close.
      ('foo' asFilename remove) ifFalse:[
-        Transcript showCR:'could not remove foo'
+	Transcript showCR:'could not remove foo'
      ]
     "
 
@@ -3444,19 +3447,19 @@
      Use #recursiveRemove in order to (recursively) remove non empty directories."
 
     (OperatingSystem removeFile:self osNameForFile) ifFalse:[
-        self exists ifTrue:[
-            self removeError:self
-        ].
+	self exists ifTrue:[
+	    self removeError:self
+	].
     ].
 
     "
      (FileStream newFileNamed:'foo') close.
-     'foo' asFilename removeFile   
+     'foo' asFilename removeFile
     "
 
     "
      'foo' asFilename makeDirectory.
-     'foo' asFilename removeFile   
+     'foo' asFilename removeFile
     "
 !
 
@@ -3468,18 +3471,18 @@
     |errno newName|
 
     newName := newNameArg asFilename.
-    (OperatingSystem 
-        renameFile:(self osNameForFile) 
-        to:(newName osNameForFile)
+    (OperatingSystem
+	renameFile:(self osNameForFile)
+	to:(newName osNameForFile)
     ) ifFalse:[
-        errno := OperatingSystem lastErrorNumber.
-
-        self exists ifFalse:[
-            ^ self fileNotFoundError:self
-        ].
-        (OperatingSystem errorHolderForNumber:errno) 
-            parameter:newName;
-            reportError.
+	errno := OperatingSystem lastErrorNumber.
+
+	self exists ifFalse:[
+	    ^ self fileNotFoundError:self
+	].
+	(OperatingSystem errorHolderForNumber:errno)
+	    parameter:newName;
+	    reportError.
     ].
 
     "
@@ -3504,34 +3507,34 @@
 
     inStream := self readStream.
     newName exists ifTrue:[
-        accessRights := newName accessRights.
+	accessRights := newName accessRights.
     ] ifFalse:[
-        accessRights := self accessRights.
+	accessRights := self accessRights.
     ].
 
     [
-        "let the temp filename start with a ~ to make it invisible"    
-        tempStream := FileStream newTemporaryIn:newName directory osNameForFile nameTemplate:'~%1_%2'.
-        [
-            "would be nice to keep the access rights of the original file"    
-            tempStream fileName accessRights:accessRights.
-        ] on:OperatingSystem accessDeniedErrorSignal do:[:ex|
-            "ignore the error - may occure when copying to a network drive"
-        ].            
-
-        inStream binary; buffered:false.
-        tempStream binary; buffered:false.
-        [
-            inStream copyToEndInto:tempStream.
-        ] ifCurtailed:[
-            tempStream close.
-            tempStream fileName remove.
-            tempStream := nil.
-        ].
-        tempStream syncData.
+	"let the temp filename start with a ~ to make it invisible"
+	tempStream := FileStream newTemporaryIn:newName directory osNameForFile nameTemplate:'~%1_%2'.
+	[
+	    "would be nice to keep the access rights of the original file"
+	    tempStream fileName accessRights:accessRights.
+	] on:OperatingSystem accessDeniedErrorSignal do:[:ex|
+	    "ignore the error - may occure when copying to a network drive"
+	].
+
+	inStream binary; buffered:false.
+	tempStream binary; buffered:false.
+	[
+	    inStream copyToEndInto:tempStream.
+	] ifCurtailed:[
+	    tempStream close.
+	    tempStream fileName remove.
+	    tempStream := nil.
+	].
+	tempStream syncData.
     ] ensure:[
-        inStream close.
-        tempStream notNil ifTrue:[tempStream close].
+	inStream close.
+	tempStream notNil ifTrue:[tempStream close].
     ].
     tempStream fileName renameTo:newName.
 
@@ -3551,7 +3554,7 @@
      (raises an exception, if not)"
 
     (OperatingSystem truncateFile:self osNameForFile to:newSize) ifFalse:[
-        ^ self reportError:'unsupported operation' with:self
+	^ self reportError:'unsupported operation' with:self
     ]
 
     "
@@ -3579,7 +3582,7 @@
     ^ i accessTime
 
     "
-     Filename currentDirectory accessTime 
+     Filename currentDirectory accessTime
     "
 
     "Created: / 9.7.1996 / 10:19:15 / cg"
@@ -3598,7 +3601,7 @@
     ^ i creationTime
 
     "
-     Filename currentDirectory creationTime 
+     Filename currentDirectory creationTime
     "
 
     "Created: / 9.7.1996 / 10:18:59 / cg"
@@ -3608,7 +3611,7 @@
 
 dates
     "return the file's modification and access times as an object (currently a dictionary)
-     that responds to the at: message with arguments 
+     that responds to the at: message with arguments
      #modified, #accessed or #statusChanged."
 
     |info dates osName|
@@ -3616,12 +3619,12 @@
     osName := self osNameForAccess.
     info := OperatingSystem infoOf:osName.
     info isNil ifTrue:[
-        "maybe this is a symbolic link with a broken link target.
-         Answer the dates of the link itself"
-        info := OperatingSystem linkInfoOf:osName.
-        info isNil ifTrue:[
-            ^ nil
-        ]
+	"maybe this is a symbolic link with a broken link target.
+	 Answer the dates of the link itself"
+	info := OperatingSystem linkInfoOf:osName.
+	info isNil ifTrue:[
+	    ^ nil
+	]
     ].
     dates := IdentityDictionary new.
     dates at:#created put:(info creationTime).
@@ -3631,7 +3634,7 @@
     ^ dates
 
     "
-     Filename currentDirectory dates  
+     Filename currentDirectory dates
      '../regression' asFilename dates
     "
 
@@ -3653,44 +3656,44 @@
     "this returns a string describing the type of contents of
      the file. This is done using the unix 'file' command,
      (which usually is configurable by /etc/magic).
-     On non-unix systems, this may simply return 'file', 
+     On non-unix systems, this may simply return 'file',
      not knowning about the contents.
      Warning:
-         Since the returned string differs among systems (and language settings),
-         it is only useful for user-information; 
-         NOT as a tag to be used by a program."
+	 Since the returned string differs among systems (and language settings),
+	 it is only useful for user-information;
+	 NOT as a tag to be used by a program."
 
     |suffix baseNm info mime|
 
     "/ since we cannot depend on a 'file' command being available,
-    "/ do the most obvious ones here. 
+    "/ do the most obvious ones here.
     "/ (also useful since the 'file' command takes some time, and the code
     "/  below is faster for common things like directories)
 
     info := self linkInfo.
     info isNil ifTrue:[
-        ^ 'removed'         "/ could happen, when coming from a snapshot image
+	^ 'removed'         "/ could happen, when coming from a snapshot image
     ].
 
     info isSymbolicLink ifTrue:[
-        ^ 'symbolic link to ' , info path
+	^ 'symbolic link to ' , info path
     ].
     info isDirectory ifTrue:[
-        self isReadable ifFalse:[^ 'directory, unreadable'].
-        self isExecutable ifFalse:[^ 'directory, locked'].
-        ^ 'directory'
+	self isReadable ifFalse:[^ 'directory, unreadable'].
+	self isExecutable ifFalse:[^ 'directory, locked'].
+	^ 'directory'
     ].
     info isCharacterSpecial ifTrue:[
-        ^ 'character device special file'
+	^ 'character device special file'
     ].
     info isBlockSpecial ifTrue:[
-        ^ 'block device special file'
+	^ 'block device special file'
     ].
     info isSocket ifTrue:[
-        ^ 'socket'
+	^ 'socket'
     ].
     info isFifo ifTrue:[
-        ^ 'fifo'
+	^ 'fifo'
     ].
 
     self isReadable ifFalse:[^ 'unreadable'].
@@ -3701,22 +3704,22 @@
 
     mime := self mimeTypeOfContents.
     mime notNil ifTrue:[
-        "/ kludge to avoid making libview a prereq. of libbasic
-        (Smalltalk at:#MIMETypes) notNil ifTrue:[
-            info := (Smalltalk at:#MIMETypes) fileInfoForMimeType:mime.
-            info notNil ifTrue:[^ info].
-        ].
+	"/ kludge to avoid making libview a prereq. of libbasic
+	(Smalltalk at:#MIMETypes) notNil ifTrue:[
+	    info := (Smalltalk at:#MIMETypes) fileInfoForMimeType:mime.
+	    info notNil ifTrue:[^ info].
+	].
     ].
     ^ 'file'
 
     "
-     'Makefile' asFilename fileType 
-     '.' asFilename fileType     
-     '/dev/null' asFilename fileType 
-     '/usr/tmp' asFilename fileType 
-     '/tmp/.X11-unix/X0' asFilename fileType 
-     'smalltalk.rc' asFilename fileType    
-     'bitmaps/SBrowser.xbm' asFilename fileType    
+     'Makefile' asFilename fileType
+     '.' asFilename fileType
+     '/dev/null' asFilename fileType
+     '/usr/tmp' asFilename fileType
+     '/tmp/.X11-unix/X0' asFilename fileType
+     'smalltalk.rc' asFilename fileType
+     'bitmaps/SBrowser.xbm' asFilename fileType
     "
 
     "Modified: / 21.7.1998 / 11:25:56 / cg"
@@ -3728,7 +3731,7 @@
     ^ OperatingSystem idOf:(self osNameForAccess)
 
     "
-     Filename currentDirectory id 
+     Filename currentDirectory id
     "
 
     "Modified: 9.7.1996 / 10:19:27 / cg"
@@ -3740,30 +3743,30 @@
      the info (for which corresponding access methods are understood by
      the returned object) is:
 
-         type  - a symbol giving the files fileType
-         mode  - numeric access mode 
-         uid   - owners user id
-         gid   - owners group id
-         size  - files size
-         id    - files number (i.e. inode number)
-         accessed      - last access time (as osTime-stamp)
-         modified      - last modification time (as osTime-stamp)
-         statusChangeTime - last staus change (as osTime-stamp)
+	 type  - a symbol giving the files fileType
+	 mode  - numeric access mode
+	 uid   - owners user id
+	 gid   - owners group id
+	 size  - files size
+	 id    - files number (i.e. inode number)
+	 accessed      - last access time (as osTime-stamp)
+	 modified      - last modification time (as osTime-stamp)
+	 statusChangeTime - last staus change (as osTime-stamp)
 
      Some of the fields may be returned as nil on systems which do not provide
      all of the information.
      The minimum returned info (i.e. on all OS's) will consist of at least:
-        modified
-        size
-        type
+	modified
+	size
+	type
 
      Dont expect things like uid/gid/mode to be non-nil; write your application
      to either handle nil values,
      or (better) use one of isXXXX query methods. (Be prepared for DOS ...)
      (i.e. instead of:
-        someFilename type == #directory
+	someFilename type == #directory
       use
-        someFilename isDirectory
+	someFilename isDirectory
     "
 
     ^ OperatingSystem infoOf:(self osNameForAccess)
@@ -3791,26 +3794,26 @@
     "return the file's info. If it is a symbolic link return the info of the link itself
      instead of the link's target.
      The information is the same as returned by #info, except that if the
-     receiver represents a symbolic link, the links information 
-     is returned 
-     (while in this case, #info returns the info of the target file, 
+     receiver represents a symbolic link, the links information
+     is returned
+     (while in this case, #info returns the info of the target file,
       which is accessed via the symbolic link).
 
      In addition to the normal entries, Unix returns an additional entry:
-         path -> the target files pathname
+	 path -> the target files pathname
 
      See the comment in #info for more details."
 
     ^ OperatingSystem linkInfoOf:(self osNameForAccess)
 
     "
-     Filename currentDirectory linkInfo 
-     '/dev/null' asFilename linkInfo    
-     'Make.proto' asFilename linkInfo   
-     'Make.proto' asFilename linkInfo path  
-     'source/Point.st' asFilename linkInfo 
-     '../../libbasic/Point.st' asFilename linkInfo 
-     '/usr/tmp' asFilename linkInfo 
+     Filename currentDirectory linkInfo
+     '/dev/null' asFilename linkInfo
+     'Make.proto' asFilename linkInfo
+     'Make.proto' asFilename linkInfo path
+     'source/Point.st' asFilename linkInfo
+     '../../libbasic/Point.st' asFilename linkInfo
+     '/usr/tmp' asFilename linkInfo
     "
 
     "Modified: 1.11.1996 / 20:49:09 / cg"
@@ -3839,7 +3842,7 @@
     ^ OperatingSystem typeOf:(self osNameForAccess)
 
     "
-     Filename currentDirectory type 
+     Filename currentDirectory type
     "
 
     "Modified: 9.7.1996 / 10:19:27 / cg"
@@ -3870,7 +3873,7 @@
 
 / subname
     "Same as construct: Taking the receiver as a directory name, construct a new
-     filename for an entry within this directory 
+     filename for an entry within this directory
      (i.e. for a file or a subdirectory in that directory).
      The argument may not specify an absolute path name.
      Please do not use this to create filenames with suffixes,
@@ -3881,9 +3884,9 @@
     ^ self construct:subname
 
     "
-     '/tmp' asFilename / 'foo'    
-     '/' asFilename / 'foo' / 'bar' / 'baz'        
-     '/foo/bar' asFilename / ('baz' asFilename) 
+     '/tmp' asFilename / 'foo'
+     '/' asFilename / 'foo' / 'bar' / 'baz'
+     '/foo/bar' asFilename / ('baz' asFilename)
 
      Bad example; works on UNIX, but may not on others:
        'foo/bar.baz' / '.suff'
@@ -3892,7 +3895,7 @@
 
 construct:subname
     "taking the receiver as a directory name, construct a new
-     filename for an entry within this directory 
+     filename for an entry within this directory
      (i.e. for a file or a subdirectory in that directory).
      The argument may not specify an absolute path name.
      Please do not use this to create filenames with suffixes,
@@ -3905,11 +3908,11 @@
     ^ self species named:constructedName.
 
     "
-     '/tmp' asFilename construct:'foo'    
-     '/' asFilename construct:'foo'         
+     '/tmp' asFilename construct:'foo'
+     '/' asFilename construct:'foo'
      '/usr/tmp' asFilename construct:'foo'
-     '/foo/bar' asFilename construct:'baz' 
-     '/foo/bar' asFilename construct:'baz' asFilename 
+     '/foo/bar' asFilename construct:'baz'
+     '/foo/bar' asFilename construct:'baz' asFilename
 
      Bad example; works on UNIX, but may not on others:
        'foo/bar.baz' asFilename construct:'.suff'
@@ -3921,7 +3924,7 @@
 constructDirectory:subname
     "same as #construct: on most systems.
      (may allow different/relaxed name syntax of the argument on some systems)"
-     
+
     ^ self species named:(self constructDirectoryString:subname)
 !
 
@@ -3934,10 +3937,10 @@
 
 constructString:subName
     "taking the receiver as a directory name, construct a new
-     filename-string for an entry within this directory 
+     filename-string for an entry within this directory
      (i.e. for a file or a subdirectory in that directory).
      The argument may not specify an absolute path name.
-     The code below works for UNIX & MSDOS; 
+     The code below works for UNIX & MSDOS;
      other filename classes (i.e. VMS) may want to redefine this method."
 
     |sepString sub|
@@ -3945,19 +3948,19 @@
     sub := subName asString.
     sepString := self species separatorString.
     nameString size == 0 ifTrue:[
-        ^ sub
+	^ sub
     ].
     (nameString endsWith:sepString) ifTrue:[
-        ^ nameString , sub
+	^ nameString , sub
     ].
     ^ nameString , sepString , sub
 
     "
-     '/tmp' asFilename constructString:'foo'   
-     '/' asFilename constructString:'foo'         
+     '/tmp' asFilename constructString:'foo'
+     '/' asFilename constructString:'foo'
      '/usr/tmp' asFilename constructString:'foo'
-     '/foo/bar' asFilename constructString:'baz' 
-     '' asFilename constructString:'baz' 
+     '/foo/bar' asFilename constructString:'baz'
+     '' asFilename constructString:'baz'
     "
 
     "Modified: / 7.9.1995 / 10:15:22 / claus"
@@ -3977,8 +3980,8 @@
     ^ (self construct:fileName)
 
     "
-     '/tmp' asFilename filenameFor:'foo'    
-     '/tmp' asFilename filenameFor:'/foo'    
+     '/tmp' asFilename filenameFor:'foo'
+     '/tmp' asFilename filenameFor:'/foo'
     "
 
     "Created: 18.9.1997 / 14:34:14 / stefan"
@@ -3986,7 +3989,7 @@
 
 secureConstruct:subname
     "taking the receiver as a directory name, construct a new
-     filename for an entry within this directory 
+     filename for an entry within this directory
      (i.e. for a file or a subdirectory in that directory).
      The argument may not specify an absolute path name.
      Please do not use this to create filenames with suffixes,
@@ -3999,14 +4002,14 @@
     ^ self species named:(self secureConstructString:subname)
 
     "
-     '/tmp' asFilename secureConstruct:'foo'    
-     '/tmp' asFilename secureConstruct:'../foo'    
-     '/tmp' asFilename secureConstruct:'/./foo'    
-     '/tmp' asFilename secureConstruct:'foo/../bar'    
-     '/' asFilename secureConstruct:'foo'         
+     '/tmp' asFilename secureConstruct:'foo'
+     '/tmp' asFilename secureConstruct:'../foo'
+     '/tmp' asFilename secureConstruct:'/./foo'
+     '/tmp' asFilename secureConstruct:'foo/../bar'
+     '/' asFilename secureConstruct:'foo'
      '/usr/tmp' asFilename secureConstruct:'foo'
-     '/foo/bar' asFilename secureConstruct:'baz' 
-     '/foo/bar' asFilename secureConstruct:'baz' asFilename 
+     '/foo/bar' asFilename secureConstruct:'baz'
+     '/foo/bar' asFilename secureConstruct:'baz' asFilename
 
      Bad example; works on UNIX, but may not on others:
        'foo/bar.baz' secureConstruct:'.suff'
@@ -4017,13 +4020,13 @@
 
 secureConstructString:subName
     "taking the receiver as a directory name, construct a new
-     filename-string for an entry within this directory 
+     filename-string for an entry within this directory
      (i.e. for a file or a subdirectory in that directory).
-    
+
      This method differs from #constructString, by not permitting subName
      to navigate above (via ..) the current filename.
 
-     The code below works for UNIX & MSDOS; 
+     The code below works for UNIX & MSDOS;
      other filename classes (i.e. VMS) may want to redefine this method."
 
     |sepString sub normalizedPath pathStream|
@@ -4034,38 +4037,38 @@
     sub := sub asCollectionOfSubstringsSeparatedByAll:sepString.
     normalizedPath := OrderedCollection new:sub size.
     sub do:[:eachPathComponent|
-        eachPathComponent = '..' ifTrue:[
-            normalizedPath isEmpty ifTrue:[
-                self error:'secureConstruct: - trying to escape from: ', nameString.
-            ].
-            normalizedPath removeLast.
-        ] ifFalse:[(eachPathComponent notEmpty and:[eachPathComponent ~= '.']) ifTrue:[
-            normalizedPath add:eachPathComponent.
-        ]]
+	eachPathComponent = '..' ifTrue:[
+	    normalizedPath isEmpty ifTrue:[
+		self error:'secureConstruct: - trying to escape from: ', nameString.
+	    ].
+	    normalizedPath removeLast.
+	] ifFalse:[(eachPathComponent notEmpty and:[eachPathComponent ~= '.']) ifTrue:[
+	    normalizedPath add:eachPathComponent.
+	]]
     ].
     pathStream := CharacterWriteStream with:nameString.
     (nameString notEmpty and:[(nameString endsWith:sepString) not]) ifTrue:[
-        pathStream nextPutAll:sepString.
+	pathStream nextPutAll:sepString.
     ].
     normalizedPath do:[:eachPathComponent|
-        pathStream nextPutAll:eachPathComponent.
+	pathStream nextPutAll:eachPathComponent.
     ] separatedBy:[
-        pathStream nextPutAll:sepString.
+	pathStream nextPutAll:sepString.
     ].
-        
+
     ^ pathStream contents.
 
     "
-     '/tmp' asFilename secureConstructString:'fooÅ '   
-     '/tmp' asFilename secureConstructString:'../foo'   
-     '/tmp' asFilename secureConstructString:'foo/../bla'   
-     '/tmp' asFilename secureConstructString:'foo/./bla'   
-     '/tmp' asFilename secureConstructString:'/bla/foo/../../foo'   
-     '/' asFilename secureConstructString:'foo'         
+     '/tmp' asFilename secureConstructString:'fooÅ '
+     '/tmp' asFilename secureConstructString:'../foo'
+     '/tmp' asFilename secureConstructString:'foo/../bla'
+     '/tmp' asFilename secureConstructString:'foo/./bla'
+     '/tmp' asFilename secureConstructString:'/bla/foo/../../foo'
+     '/' asFilename secureConstructString:'foo'
      '/usr/tmp' asFilename secureConstructString:'foo'
-     '/foo/bar' asFilename secureConstructString:'baz' 
-     '' asFilename secureConstructString:'baz' 
-     '' asFilename secureConstructString:'/baz' 
+     '/foo/bar' asFilename secureConstructString:'baz'
+     '' asFilename secureConstructString:'baz'
+     '' asFilename secureConstructString:'/baz'
     "
 ! !
 
@@ -4084,10 +4087,10 @@
     ^ (nameString , aString asString)
 
     "
-     'Makefile' asFilename , '.bak'        
-     ('Makefile' asFilename , '.bak') asFilename  
-     'Makefile' asFilename withSuffix:'bak' 
-     'Makefile' asFilename construct:'.bak'     
+     'Makefile' asFilename , '.bak'
+     ('Makefile' asFilename , '.bak') asFilename
+     'Makefile' asFilename withSuffix:'bak'
+     'Makefile' asFilename construct:'.bak'
     "
 
     "Modified: / 07-09-1997 / 23:45:36 / cg"
@@ -4098,18 +4101,18 @@
     "normalize a filename by removing all empty path components or dots,
      and by resolving parent directory '..' references.
 
-     The code below works for UNIX & MSDOS; 
+     The code below works for UNIX & MSDOS;
      other filename classes (i.e. VMS) may want to redefine this method."
 
     nameString := self species canonicalize:nameString.
 
     "
-        '/tmp/bla' asFilename canonicalize.    
-        '/tmp/bla/../fasel' asFilename canonicalize.
-        '/tmp/bla/.././/fasel' asFilename canonicalize.
-        '..' asFilename canonicalize.
-        'bla/../fasel' asFilename canonicalize.
-        '//bla/../fasel' asFilename canonicalize.
+	'/tmp/bla' asFilename canonicalize.
+	'/tmp/bla/../fasel' asFilename canonicalize.
+	'/tmp/bla/.././/fasel' asFilename canonicalize.
+	'..' asFilename canonicalize.
+	'bla/../fasel' asFilename canonicalize.
+	'//bla/../fasel' asFilename canonicalize.
     "
 ! !
 
@@ -4120,12 +4123,12 @@
      On non-windows systems, an error is raised"
 
     OperatingSystem isMSWINDOWSlike ifFalse:[
-        self warn:'sorry - this operation is only available under windows'.
+	self warn:'sorry - this operation is only available under windows'.
     ].
 
     OperatingSystem
-        openApplicationForDocument:self pathName 
-        operation:#explore.
+	openApplicationForDocument:self pathName
+	operation:#explore.
 
     "Created: / 21-07-2012 / 12:28:18 / cg"
 !
@@ -4135,10 +4138,10 @@
      On non-osx systems, an error is raised"
 
     OperatingSystem isOSXlike ifFalse:[
-        self warn:'sorry - this operation is only available under osx'.
+	self warn:'sorry - this operation is only available under osx'.
     ].
 
-    OperatingSystem executeCommand:'open "',self pathName,'"' 
+    OperatingSystem executeCommand:'open "',self pathName,'"'
 !
 
 openTerminal
@@ -4148,29 +4151,29 @@
      on unix, an xterm is opened."
 
     OperatingSystem isOSXlike ifTrue:[
-        "/ I dont know yet how to tell the terminal to
-        "/ go to a particular directory.
-        "/ therefore, use the built in terminal
-        VT100TerminalView openShellIn:self pathName.
-        ^ self.
+	"/ I dont know yet how to tell the terminal to
+	"/ go to a particular directory.
+	"/ therefore, use the built in terminal
+	VT100TerminalView openShellIn:self pathName.
+	^ self.
     ].
 
     [
-        |cmd|
-
-        OperatingSystem isOSXlike ifTrue:[
-            cmd := '/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal ' 
-        ] ifFalse:[
-            OperatingSystem isMSWINDOWSlike ifTrue:[
-                cmd := 'c:\windows\System32\cmd.exe'        
-            ] ifFalse:[
-                "/ VT100TerminalView openShellIn:self pathName
-                cmd := 'xterm' 
-            ]
-        ].
-        OperatingSystem 
-            executeCommand:cmd
-            inDirectory:self pathName. 
+	|cmd|
+
+	OperatingSystem isOSXlike ifTrue:[
+	    cmd := '/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal '
+	] ifFalse:[
+	    OperatingSystem isMSWINDOWSlike ifTrue:[
+		cmd := 'c:\windows\System32\cmd.exe'
+	    ] ifFalse:[
+		"/ VT100TerminalView openShellIn:self pathName
+		cmd := 'xterm'
+	    ]
+	].
+	OperatingSystem
+	    executeCommand:cmd
+	    inDirectory:self pathName.
     ] fork
 ! !
 
@@ -4202,7 +4205,7 @@
 getName
     "get the raw filename"
 
-    ^ nameString 
+    ^ nameString
 !
 
 setName:aString
@@ -4221,9 +4224,9 @@
     ^ OperatingSystem isValidPath:(self osNameForAccess)
 
     "
-     '/foo/bar' asFilename exists 
-     '/tmp' asFilename exists  
-     'Makefile' asFilename exists   
+     '/foo/bar' asFilename exists
+     '/tmp' asFilename exists
+     'Makefile' asFilename exists
     "
 !
 
@@ -4231,10 +4234,10 @@
     "VW compatibility"
 
     ^ (self filesMatching:aPattern)
-            collect:[:eachName | self construct:eachName].
-
-    "
-     '/etc' asFilename filenamesMatching:'a*;c*' 
+	    collect:[:eachName | self construct:eachName].
+
+    "
+     '/etc' asFilename filenamesMatching:'a*;c*'
     "
 
     "Created: / 15.4.1997 / 15:40:02 / cg"
@@ -4252,12 +4255,12 @@
     matchers := aPattern asCollectionOfSubstringsSeparatedBy:$;.
     caseSensitive := self species isCaseSensitive.
     ^ self directoryContents
-        select:[:name | 
-                (matchers detect:[:p | p match:name caseSensitive:caseSensitive] ifNone:0) ~~ 0
-               ]
-
-    "
-     '/etc' asFilename filesMatching:'a*;c*' 
+	select:[:name |
+		(matchers detect:[:p | p match:name caseSensitive:caseSensitive] ifNone:0) ~~ 0
+	       ]
+
+    "
+     '/etc' asFilename filesMatching:'a*;c*'
     "
 
     "Created: / 15.4.1997 / 15:40:02 / cg"
@@ -4276,17 +4279,17 @@
     matchers := aPattern asCollectionOfSubstringsSeparatedBy:$;.
     caseSensitive := self species isCaseSensitive.
 
-    ^ self directoryContents 
-        select:[:name | 
-                name ~= '.'
-                and:[name ~= '..'
-                and:[(matchers detect:[:p | p match:name caseSensitive:caseSensitive] ifNone:0) ~~ 0]]
+    ^ self directoryContents
+	select:[:name |
+		name ~= '.'
+		and:[name ~= '..'
+		and:[(matchers detect:[:p | p match:name caseSensitive:caseSensitive] ifNone:0) ~~ 0]]
       ]
 
     "
-     Filename currentDirectory filesMatching:'M*' 
-     '/etc' asFilename filesMatching:'[a-z]*' 
-     '../../libbasic' asFilename filesMatching:'[A-D]*.st'  
+     Filename currentDirectory filesMatching:'M*'
+     '/etc' asFilename filesMatching:'[a-z]*'
+     '../../libbasic' asFilename filesMatching:'[A-D]*.st'
     "
 
     "Created: / 15.4.1997 / 12:52:10 / cg"
@@ -4305,10 +4308,10 @@
     ^ OperatingSystem isExecutable:(self osNameForAccess)
 
     "
-     '/foo/bar' asFilename isExecutable 
-     '/tmp' asFilename isExecutable   
-     'Makefile' asFilename isExecutable   
-     '/bin/ls' asFilename isExecutable   
+     '/foo/bar' asFilename isExecutable
+     '/tmp' asFilename isExecutable
+     'Makefile' asFilename isExecutable
+     '/bin/ls' asFilename isExecutable
     "
 !
 
@@ -4323,10 +4326,10 @@
       and:[(OperatingSystem isDirectory:osName) not]
 
     "
-     '/tmp' asFilename isExecutable         
-     '/bin/ls' asFilename isExecutable       
-     '/tmp' asFilename isExecutableProgram   
-     '/bin/ls' asFilename isExecutableProgram    
+     '/tmp' asFilename isExecutable
+     '/bin/ls' asFilename isExecutable
+     '/tmp' asFilename isExecutableProgram
+     '/bin/ls' asFilename isExecutableProgram
     "
 !
 
@@ -4342,14 +4345,14 @@
 
 isMountPoint:aPathName
     "return true, if I represent a mount-point.
-     Warning: 
-        the receiver must be an absolute pathname, 
-        because a realPath is not used/generated for the query (to avoid automounting).
-        Aka: do not ask: '../../' asFilename isMountPoint;
+     Warning:
+	the receiver must be an absolute pathname,
+	because a realPath is not used/generated for the query (to avoid automounting).
+	Aka: do not ask: '../../' asFilename isMountPoint;
     "
 
     self isAbsolute ifFalse:[
-        self error:'this query must be done on an absolute pathname'.
+	self error:'this query must be done on an absolute pathname'.
     ].
     ^ OperatingSystem isMountPoint:(self name)
 !
@@ -4360,9 +4363,9 @@
     ^ OperatingSystem isReadable:(self osNameForFile)
 
     "
-     '/foo/bar' asFilename isReadable   
-     '/tmp' asFilename isReadable      
-     'Makefile' asFilename isReadable   
+     '/foo/bar' asFilename isReadable
+     '/tmp' asFilename isReadable
+     'Makefile' asFilename isReadable
     "
 !
 
@@ -4370,17 +4373,17 @@
     "return true, if such a file exists and is a shared library."
 
     ObjectFileLoader isNil ifTrue:[
-        "we cannot handle shared libraries, so there are no shared libraries"
-        ^ false.
+	"we cannot handle shared libraries, so there are no shared libraries"
+	^ false.
     ].
-    ^ (ObjectFileLoader validBinaryExtensions includes:self suffix) 
-        and:[self isRegularFile].
-
-    "
-     'libstx_libbasic.so' asFilename isSharedLibrary         
-     'libstx_libbasic.dll' asFilename isSharedLibrary         
-     '/tmp' asFilename isSharedLibrary         
-     '/tmp.dll' asFilename isSharedLibrary         
+    ^ (ObjectFileLoader validBinaryExtensions includes:self suffix)
+	and:[self isRegularFile].
+
+    "
+     'libstx_libbasic.so' asFilename isSharedLibrary
+     'libstx_libbasic.dll' asFilename isSharedLibrary
+     '/tmp' asFilename isSharedLibrary
+     '/tmp.dll' asFilename isSharedLibrary
     "
 !
 
@@ -4390,9 +4393,9 @@
     ^ OperatingSystem isWritable:(self osNameForFile)
 
     "
-     '/foo/bar' asFilename isWritable 
-     '/tmp' asFilename isWritable   
-     'Makefile' asFilename isWritable   
+     '/foo/bar' asFilename isWritable
+     '/tmp' asFilename isWritable
+     'Makefile' asFilename isWritable
     "
 !
 
@@ -4402,30 +4405,30 @@
      with UID mapping and attribute cache enabled, there may be false negatives."
 
     self isDirectory ifFalse:[
-        ^ false.
+	^ false.
     ].
 
     self isWritable ifFalse:[
-        "/ on an NFS mounted filesystem with UID mapping and
-        "/ attribute cache enabled,
-        "/ this query may fail, but creation may work actually. 
-        "/ check again...
-        [
-            |tempFile|
-
-            tempFile := FileStream newTemporaryIn:self.
-            tempFile close.
-            tempFile fileName remove.
-        ] on:OpenError do:[:ex|
-            ^ false.
-        ].
+	"/ on an NFS mounted filesystem with UID mapping and
+	"/ attribute cache enabled,
+	"/ this query may fail, but creation may work actually.
+	"/ check again...
+	[
+	    |tempFile|
+
+	    tempFile := FileStream newTemporaryIn:self.
+	    tempFile close.
+	    tempFile fileName remove.
+	] on:OpenError do:[:ex|
+	    ^ false.
+	].
     ].
     ^ true.
 
     "
-     '/foo/bar' asFilename isWritableDirectory 
-     '/tmp' asFilename isWritableDirectory   
-     '/etc' asFilename isWritableDirectory   
+     '/foo/bar' asFilename isWritableDirectory
+     '/tmp' asFilename isWritableDirectory
+     '/etc' asFilename isWritableDirectory
      'Makefile' asFilename isWritableDirectory
      '/net/exeptn/home2/office' asFilename isWritable
      '/net/exeptn/home2/office' asFilename isWritableDirectory
@@ -4446,28 +4449,28 @@
      per default (from directories etc.)"
 
     self == Filename ifTrue:[
-        ^ ConcreteClass.
+	^ ConcreteClass.
     ] ifFalse:[
-        ^ self class.
+	^ self class.
     ].
 !
 
 withSpecialExpansions
-    "return a new filename, expanding any OS specific macros. 
+    "return a new filename, expanding any OS specific macros.
      Here, a ~/ prefix is expanded to the users home dir (as in bash)"
 
     |newName|
 
     newName := self species nameWithSpecialExpansions:nameString.
     newName = nameString ifTrue:[
-        ^ self.
+	^ self.
     ].
     ^ self species named:newName.
 
     "
-     '~' asFilename withSpecialExpansions       
-     '~/Desktop' asFilename withSpecialExpansions  
-     '~stefan' asFilename withSpecialExpansions     
+     '~' asFilename withSpecialExpansions
+     '~/Desktop' asFilename withSpecialExpansions
+     '~stefan' asFilename withSpecialExpansions
      '~stefan/Desktop' asFilename withSpecialExpansions
     "
 ! !
@@ -4485,21 +4488,21 @@
 
     "/ kludge to avoid making libview a prereq. of libbasic
     (mimeTypes := Smalltalk at:#MIMETypes) notNil ifTrue:[
-        ^ mimeTypes mimeTypeForFilename:(self name)
+	^ mimeTypes mimeTypeForFilename:(self name)
     ].
     ^ nil
 
     "
-     'Makefile' asFilename mimeTypeFromName     
-     '.' asFilename mimeTypeFromName            
-     '/dev/null' asFilename mimeTypeFromName   
-     '/tmp/.X11-unix/X0' asFilename mimeTypeFromName  
-     'smalltalk.rc' asFilename mimeTypeFromName     
-     'bitmaps/SBrowser.xbm' asFilename mimeTypeFromName    
-     '../../rules/stmkmf' asFilename mimeTypeFromName  
-     '/bläh' asFilename mimeTypeFromName               
-     '/x.zip' asFilename mimeTypeFromName               
-     '/x.gz' asFilename mimeTypeFromName               
+     'Makefile' asFilename mimeTypeFromName
+     '.' asFilename mimeTypeFromName
+     '/dev/null' asFilename mimeTypeFromName
+     '/tmp/.X11-unix/X0' asFilename mimeTypeFromName
+     'smalltalk.rc' asFilename mimeTypeFromName
+     'bitmaps/SBrowser.xbm' asFilename mimeTypeFromName
+     '../../rules/stmkmf' asFilename mimeTypeFromName
+     '/bläh' asFilename mimeTypeFromName
+     '/x.zip' asFilename mimeTypeFromName
+     '/x.gz' asFilename mimeTypeFromName
     "
 !
 
@@ -4513,7 +4516,7 @@
 
     type := self type.
     type isNil ifTrue:[ ^ nil ].
-    type == #directory ifTrue:[ ^ nil ].                                                              
+    type == #directory ifTrue:[ ^ nil ].
     type == #characterSpecial ifTrue:[ ^ nil ].
     type == #blockSpecial ifTrue:[ ^ nil ].
     type == #socket ifTrue:[ ^ nil ].
@@ -4526,29 +4529,29 @@
     buffer := String new:2048.
 
     s errorSignal handle:[:ex |
-        size := 0.
+	size := 0.
     ] do:[
-        size := s nextBytes:buffer size into:buffer.
+	size := s nextBytes:buffer size into:buffer.
     ].
     s close.
 
     "/ kludge to avoid making libview a prereq. of libbasic
     (mimeTypes := Smalltalk at:#MIMETypes) notNil ifTrue:[
-        ^ mimeTypes mimeTypeOfData:buffer suffix:self suffix.
+	^ mimeTypes mimeTypeOfData:buffer suffix:self suffix.
     ].
     ^ nil
 
     "
-     'Makefile' asFilename mimeTypeOfContents     
-     '.' asFilename mimeTypeOfContents            
-     '/dev/null' asFilename mimeTypeOfContents  
-     '/tmp/.X11-unix/X0' asFilename mimeTypeOfContents   
-     'smalltalk.rc' asFilename mimeTypeOfContents      
-     'bitmaps/SBrowser.xbm' asFilename mimeTypeOfContents    
-     '../../rules/stmkmf' asFilename mimeTypeOfContents 
-     '/bläh' asFilename mimeTypeOfContents              
+     'Makefile' asFilename mimeTypeOfContents
+     '.' asFilename mimeTypeOfContents
+     '/dev/null' asFilename mimeTypeOfContents
+     '/tmp/.X11-unix/X0' asFilename mimeTypeOfContents
+     'smalltalk.rc' asFilename mimeTypeOfContents
+     'bitmaps/SBrowser.xbm' asFilename mimeTypeOfContents
+     '../../rules/stmkmf' asFilename mimeTypeOfContents
+     '/bläh' asFilename mimeTypeOfContents
      'C:\Dokumente und Einstellungen\cg\Favoriten\languages.lnk' asFilename mimeTypeOfContents
-     'G:\A\A01.TOP' asFilename mimeTypeOfContents       
+     'G:\A\A01.TOP' asFilename mimeTypeOfContents
     "
 
     "Modified: / 06-11-2006 / 11:44:58 / cg"
@@ -4572,29 +4575,29 @@
     sep := self separator.
     len := nameString size.
     ((len == 1) and:[(nameString at:1) == sep]) ifTrue:[
-        ^ nameString
+	^ nameString
     ].
 
     endIdx := len.
     len > 1 ifTrue:[
-        (nameString at:len) == sep ifTrue:[endIdx := endIdx - 1].
+	(nameString at:len) == sep ifTrue:[endIdx := endIdx - 1].
     ].
     index := nameString lastIndexOf:sep startingAt:len-1.
     ^ nameString copyFrom:(index+1) to:endIdx
 
     "
-     '/foo/bar' asFilename baseName  
-     '/foo/bar.cc' asFilename baseName  
-     '.' asFilename baseName          
-     '..' asFilename baseName         
-     '../..' asFilename baseName        
-     '../../libbasic' asFilename baseName        
-     '../../libpr' asFilename baseName        
-     '../../libbasic/Object.st' asFilename baseName        
-     '/' asFilename baseName        
-     '\' asFilename baseName        
-     'c:\' asFilename baseName        
-     '\\idefix' asFilename baseName        
+     '/foo/bar' asFilename baseName
+     '/foo/bar.cc' asFilename baseName
+     '.' asFilename baseName
+     '..' asFilename baseName
+     '../..' asFilename baseName
+     '../../libbasic' asFilename baseName
+     '../../libpr' asFilename baseName
+     '../../libbasic/Object.st' asFilename baseName
+     '/' asFilename baseName
+     '\' asFilename baseName
+     'c:\' asFilename baseName
+     '\\idefix' asFilename baseName
     "
 
     "Modified: / 24.9.1998 / 13:06:23 / cg"
@@ -4610,13 +4613,13 @@
     ^ self species named:(self directoryName)
 
     "
-     '/foo/bar' asFilename directory      
-     '/foo/bar' asFilename directoryName  
-     '/foo/bar' asFilename head  
-
-     '.' asFilename directory        
-     '..' asFilename directory       
-     '../..' asFilename directory     
+     '/foo/bar' asFilename directory
+     '/foo/bar' asFilename directoryName
+     '/foo/bar' asFilename head
+
+     '.' asFilename directory
+     '..' asFilename directory
+     '../..' asFilename directory
     "
 
     "Modified: 29.2.1996 / 20:50:14 / cg"
@@ -4642,10 +4645,10 @@
     sep := self separator.
     sepString := sep asString.
     (nameString = sepString) ifTrue:[
-        "/
-        "/ the trivial '/' case
-        "/
-        ^ sepString
+	"/
+	"/ the trivial '/' case
+	"/
+	^ sepString
     ].
 
     "/
@@ -4653,10 +4656,10 @@
     "/
     p := nameString.
     [p endsWith:sep] whileTrue:[
-        (p = sepString) ifTrue:[
-            ^ sepString
-        ].
-        p := p copyButLast:1
+	(p = sepString) ifTrue:[
+	    ^ sepString
+	].
+	p := p copyButLast:1
     ].
 
     parentDirectoryString := self class parentDirectoryName.
@@ -4664,43 +4667,43 @@
     "/ strip off trailing components
     index := p lastIndexOf:sep startingAt:p size.
     index == 0 ifTrue:[
-        "/ no separator found
-        p = '.' ifTrue:[
-            ^ parentDirectoryString
-        ].
-        p = '..' ifTrue:[
-            ^ parentDirectoryString, sepString, parentDirectoryString
-        ].
-        ^ '.'
+	"/ no separator found
+	p = '.' ifTrue:[
+	    ^ parentDirectoryString
+	].
+	p = '..' ifTrue:[
+	    ^ parentDirectoryString, sepString, parentDirectoryString
+	].
+	^ '.'
     ].
     rest := p copyFrom:(index+1).
     (rest = '.') ifTrue:[
-        ^ p copyTo:index-1.
+	^ p copyTo:index-1.
     ].
     (rest = parentDirectoryString) ifTrue:[
-        ^ (self species named:(p copyTo:(index-1))) directoryName
+	^ (self species named:(p copyTo:(index-1))) directoryName
     ].
     index == 1 ifTrue:[
-        ^ sepString
+	^ sepString
     ].
     ^ p copyTo:(index - 1)
 
     "
-     '/home' asFilename directoryName          
-     '/foo/bar/' asFilename directoryName    
-     '/foo/bar/' asFilename directory      
-
-     '/foo/bar' asFilename directoryName    
-     'bitmaps' asFilename directoryName        
-     'bitmaps' asFilename directoryPathName        
-     '.' asFilename directoryName           
-     '.' asFilename directoryPathName        
-     '..' asFilename directoryName       
-     '..' asFilename directoryPathName       
-     '../..' asFilename directoryName     
-     '../..' asFilename directoryPathName     
-     '/foo/bar/baz/..' asFilename directoryName     
-     '/foo/bar/baz/.' asFilename directoryName     
+     '/home' asFilename directoryName
+     '/foo/bar/' asFilename directoryName
+     '/foo/bar/' asFilename directory
+
+     '/foo/bar' asFilename directoryName
+     'bitmaps' asFilename directoryName
+     'bitmaps' asFilename directoryPathName
+     '.' asFilename directoryName
+     '.' asFilename directoryPathName
+     '..' asFilename directoryName
+     '..' asFilename directoryPathName
+     '../..' asFilename directoryName
+     '../..' asFilename directoryPathName
+     '/foo/bar/baz/..' asFilename directoryName
+     '/foo/bar/baz/.' asFilename directoryName
     "
 
     "Modified: / 7.9.1995 / 10:42:03 / claus"
@@ -4717,18 +4720,18 @@
     ^ (self species named:self pathName) directoryName
 
     "
-     '/foo/bar/' asFilename directoryPathName    
-     '/foo/bar' asFilename directoryPathName    
-
-     '.' asFilename directoryPathName      
-     '.' asFilename directoryName     
-     '.' asFilename directory          
-
-     '..' asFilename directoryPathName       
-     '..' asFilename directoryName       
+     '/foo/bar/' asFilename directoryPathName
+     '/foo/bar' asFilename directoryPathName
+
+     '.' asFilename directoryPathName
+     '.' asFilename directoryName
+     '.' asFilename directory
+
+     '..' asFilename directoryPathName
+     '..' asFilename directoryName
      '..' asFilename directory
 
-     '../..' asFilename directoryPathName     
+     '../..' asFilename directoryPathName
     "
 
     "Modified: 7.9.1995 / 10:42:13 / claus"
@@ -4754,12 +4757,12 @@
 
     ^ self filenameCompletionIn:nil
 
-    " 
-     'mak' asFilename filenameCompletion  
-     'Make' asFilename filenameCompletion  
-     'Makef' asFilename filenameCompletion;yourself  
-     '/u' asFilename filenameCompletion             
-     '../../libpr' asFilename inspect filenameCompletion    
+    "
+     'mak' asFilename filenameCompletion
+     'Make' asFilename filenameCompletion
+     'Makef' asFilename filenameCompletion;yourself
+     '/u' asFilename filenameCompletion
+     '../../libpr' asFilename inspect filenameCompletion
     "
 
     "Modified: 3.7.1996 / 10:53:51 / cg"
@@ -4777,7 +4780,7 @@
      containing the fully expanded filename and the receiver's name is changed to it.
      An empty baseName pattern (i.e. giving the name of a directory) will also return an empty matchset."
 
-    |mySpecies dir baseName matching matchLen try allMatching 
+    |mySpecies dir baseName matching matchLen try allMatching
      sepString parentString prefix nMatch nm caseless lcBaseName|
 
     mySpecies := self species.
@@ -4790,127 +4793,127 @@
 
     sepString := mySpecies separatorString.
     (nm endsWith:sepString) ifTrue:[
-        "/ two exceptions here: 
-        "/   if there is only one file in the directory, that one must be it.
-        "/   otherwise, return the longest common prefix of all files.
-        self isDirectory ifTrue:[
-            |first longest|
-
-            first := nil.
-            OpenError catch:[
-                self directoryContentsDo:[:fileName |
-                    ((fileName ~= '.') and:[fileName ~= parentString]) ifTrue:[
-                        matching add:fileName.    
-                        first isNil ifTrue:[
-                            first := longest := fileName.
-                        ] ifFalse:[
-                            "/ more than one file
-                            longest := longest commonPrefixWith:fileName ignoreCase:caseless.
-                            longest isEmpty ifTrue:[ 
-                                ^ #() 
-                            ].
-                        ]
-                    ]
-                ].
-            ].
-            longest notNil ifTrue:[
-                nameString := (self constructString:longest).
-                 ^ matching
-            ].
-        ].
-        ^ #()
+	"/ two exceptions here:
+	"/   if there is only one file in the directory, that one must be it.
+	"/   otherwise, return the longest common prefix of all files.
+	self isDirectory ifTrue:[
+	    |first longest|
+
+	    first := nil.
+	    OpenError catch:[
+		self directoryContentsDo:[:fileName |
+		    ((fileName ~= '.') and:[fileName ~= parentString]) ifTrue:[
+			matching add:fileName.
+			first isNil ifTrue:[
+			    first := longest := fileName.
+			] ifFalse:[
+			    "/ more than one file
+			    longest := longest commonPrefixWith:fileName ignoreCase:caseless.
+			    longest isEmpty ifTrue:[
+				^ #()
+			    ].
+			]
+		    ]
+		].
+	    ].
+	    longest notNil ifTrue:[
+		nameString := (self constructString:longest).
+		 ^ matching
+	    ].
+	].
+	^ #()
     ].
 
     parentString := mySpecies parentDirectoryName.
     baseName := self baseName.
     baseName ~= nm ifTrue:[
-        prefix := self directoryName.
+	prefix := self directoryName.
     ].
 
     self isAbsolute ifTrue:[
-        dir := self directory
+	dir := self directory
     ] ifFalse:[
-        aDirectory isNil ifTrue:[
-            dir := self directory
-        ] ifFalse:[
-            dir := (aDirectory asFilename construct:nm) directory
-        ]
+	aDirectory isNil ifTrue:[
+	    dir := self directory
+	] ifFalse:[
+	    dir := (aDirectory asFilename construct:nm) directory
+	]
     ].
 
     caseless ifTrue:[
-        lcBaseName := baseName asLowercase
+	lcBaseName := baseName asLowercase
     ].
 
     dir class errorReporter openErrorSignal handle:[:ex|
-        ^ #().
+	^ #().
     ] do:[
-        dir directoryContents do:[:fileName |
-            ((fileName ~= '.') and:[fileName ~= parentString]) ifTrue:[
-                ((caseless and:[fileName asLowercase startsWith:lcBaseName])
-                or:[caseless not and:[fileName startsWith:baseName]]) ifTrue:[
-                    matching add:fileName
-                ]
-            ]
-        ].
+	dir directoryContents do:[:fileName |
+	    ((fileName ~= '.') and:[fileName ~= parentString]) ifTrue:[
+		((caseless and:[fileName asLowercase startsWith:lcBaseName])
+		or:[caseless not and:[fileName startsWith:baseName]]) ifTrue:[
+		    matching add:fileName
+		]
+	    ]
+	].
     ].
 
     (nMatch := matching size) > 1 ifTrue:[
-        "
-         find the longest common prefix
-        "
-        matchLen := baseName size.
-        matchLen > matching first size ifTrue:[
-            try := baseName.
-            allMatching := false
-        ] ifFalse:[
-            try := matching first copyTo:matchLen.
-            allMatching := true.
-        ].
-
-        [allMatching] whileTrue:[
-            matching do:[:aName |
-                ((caseless and:[aName asLowercase startsWith:try asLowercase])
-                or:[caseless not and:[aName startsWith:try]]) ifFalse:[
-                    allMatching := false
-                ]
-            ].
-            allMatching ifTrue:[
-                matchLen <  matching first size ifTrue:[
-                    matchLen := matchLen + 1.
-                    try := matching first copyTo:matchLen.
-                ] ifFalse:[
-                    allMatching := false
-                ]
-            ] ifFalse:[
-                try := matching first copyTo:matchLen - 1.
-            ]
-        ].
-        "
-         and set my name to the last full match
-        "
-        nameString := nm := try
+	"
+	 find the longest common prefix
+	"
+	matchLen := baseName size.
+	matchLen > matching first size ifTrue:[
+	    try := baseName.
+	    allMatching := false
+	] ifFalse:[
+	    try := matching first copyTo:matchLen.
+	    allMatching := true.
+	].
+
+	[allMatching] whileTrue:[
+	    matching do:[:aName |
+		((caseless and:[aName asLowercase startsWith:try asLowercase])
+		or:[caseless not and:[aName startsWith:try]]) ifFalse:[
+		    allMatching := false
+		]
+	    ].
+	    allMatching ifTrue:[
+		matchLen <  matching first size ifTrue:[
+		    matchLen := matchLen + 1.
+		    try := matching first copyTo:matchLen.
+		] ifFalse:[
+		    allMatching := false
+		]
+	    ] ifFalse:[
+		try := matching first copyTo:matchLen - 1.
+	    ]
+	].
+	"
+	 and set my name to the last full match
+	"
+	nameString := nm := try
     ].
 
     "
      if I had a directory-prefix, change names in collection ...
     "
     prefix notNil ifTrue:[
-        (prefix endsWith:sepString) ifTrue:[
-            "/ avoid introducing double slashes
-            prefix := prefix copyButLast:(sepString size).
-        ].
-        matching := matching collect:[:n | prefix , sepString , n].
-        nMatch == 1 ifTrue:[
-            nameString := nm := matching first
-        ] ifFalse:[
-            nMatch > 1 ifTrue:[
-                nameString := nm := prefix , sepString , nm
-            ]
-        ]
+	(prefix endsWith:sepString) ifTrue:[
+	    "/ avoid introducing double slashes
+	    prefix := prefix copyButLast:(sepString size).
+	].
+	matching := matching collect:[:n | prefix , sepString , n].
+	nMatch == 1 ifTrue:[
+	    nameString := nm := matching first
+	] ifFalse:[
+	    nMatch > 1 ifTrue:[
+		nameString := nm := prefix , sepString , nm
+	    ]
+	]
     ] ifFalse:[
-        nMatch == 1 ifTrue:[
-            nameString := nm := matching first
-        ]
+	nMatch == 1 ifTrue:[
+	    nameString := nm := matching first
+	]
     ].
 
     "
@@ -4925,16 +4928,16 @@
      '/' asFilename filenameCompletion       -> empty
      '/usr/' asFilename filenameCompletion   -> empty
 
-     'mak' asFilename filenameCompletion   
-     'Make' asFilename filenameCompletion    
+     'mak' asFilename filenameCompletion
+     'Make' asFilename filenameCompletion
      'Makef' asFilename filenameCompletion
-     '/u' asFilename filenameCompletion             
+     '/u' asFilename filenameCompletion
      '../../libpr' asFilename filenameCompletion
      '/etc/mail/auth/xx' asFilename filenameCompletion
 
      'c:\pr' asFilename filenameCompletion             -> matching names
      'c:\pr' asFilename filenameCompletion; yourself   -> side effect: name changed to longest match
-     'c:\p' asFilename filenameCompletion 
+     'c:\p' asFilename filenameCompletion
      'c:\' asFilename filenameCompletion  -> empty
      'c:' asFilename filenameCompletion   -> empty
      '\' asFilename filenameCompletion    -> empty
@@ -4944,8 +4947,8 @@
     "Modified: / 17-11-2007 / 14:31:08 / cg"
 !
 
-head 
-    "return the directory name as a string. 
+head
+    "return the directory name as a string.
      An alias for directoryName, for ST-80 compatiblity.
      (this is almost equivalent to #directory, but returns
       a string instead of a Filename instance)"
@@ -4953,9 +4956,9 @@
     ^ self directoryName
 
     "
-     Filename currentDirectory head  
-     'Makefile' asFilename head    
-     '/foo/bar/baz.st' asFilename head  
+     Filename currentDirectory head
+     'Makefile' asFilename head
+     '/foo/bar/baz.st' asFilename head
     "
 
     "Modified: 29.2.1996 / 20:21:25 / cg"
@@ -4969,13 +4972,13 @@
     ^ self isVolumeAbsolute
 
     "
-     '/foo/bar' asFilename isAbsolute 
+     '/foo/bar' asFilename isAbsolute
      '~/bla' asFilename isAbsolute
-     '..' asFilename isAbsolute         
-     '..' asAbsoluteFilename isAbsolute         
-     'source/SBrowser.st' asFilename isAbsolute  
-     'source/SBrowser.st' asFilename isRelative  
-     'SBrowser.st' asFilename isRelative    
+     '..' asFilename isAbsolute
+     '..' asAbsoluteFilename isAbsolute
+     'source/SBrowser.st' asFilename isAbsolute
+     'source/SBrowser.st' asFilename isRelative
+     'SBrowser.st' asFilename isRelative
     "
 !
 
@@ -4999,8 +5002,8 @@
 isParentDirectoryOf:aFilenameOrString
     "Answer true, if myself is a parent directory of aFilenameOrString.
      Unexpected results may be returned, if one of myself or aFilenameOrString does
-     not exist and relative and absolute path names are mixed 
-     ('/' asFilename isParentDirectoryOf:'../noExistant' -> false) 
+     not exist and relative and absolute path names are mixed
+     ('/' asFilename isParentDirectoryOf:'../noExistant' -> false)
 
      Warning: maybe symbolic links must be resolved which could lead to automounting"
 
@@ -5012,38 +5015,38 @@
     otherNames := self class canonicalizedNameComponents:filenameArg name.
     myNames := self class canonicalizedNameComponents:self name.
     ((otherNames startsWith:myNames) and:[myNames first ~= self class parentDirectoryName]) ifTrue:[
-        ^ otherNames ~= myNames
+	^ otherNames ~= myNames
     ].
 
     "fall back - try it again with ~ substitution and symbolic links resolved"
     otherNames := self class canonicalizedNameComponents:filenameArg pathName.
     myNames := self class canonicalizedNameComponents:self pathName.
     (otherNames startsWith:myNames) ifTrue:[
-        ^ otherNames ~= myNames
+	^ otherNames ~= myNames
     ].
 
     myName := self class nameFromComponents:myNames.
     filenameArg allParentDirectoriesDo:[:parent |
-        parent pathName = myName ifTrue:[^ true].
+	parent pathName = myName ifTrue:[^ true].
     ].
     ^ false.
 
     "
-     '/etc' asFilename isParentDirectoryOf:'/etc/passwd' 
-     'etc' asFilename isParentDirectoryOf:'etc/passwd' 
-     '/etc' asFilename isParentDirectoryOf:'/etc/'   
-     '/etc' asFilename isParentDirectoryOf:'/etc'   
-     '/et' asFilename isParentDirectoryOf:'/etc'   
-     '/home' asFilename isParentDirectoryOf:Filename currentDirectory 
-     '~' asFilename isParentDirectoryOf:Filename currentDirectory 
-     '~' asFilename isParentDirectoryOf:'.' 
-     '~' asFilename isParentDirectoryOf:'..' 
-     '~' asFilename isParentDirectoryOf:'../smalltalk' 
-     '../..' asFilename isParentDirectoryOf:'../nonExistant' 
-     '..' asFilename isParentDirectoryOf:'../../nonExistant' 
-     '/' asFilename isParentDirectoryOf:'../nonExistant' 
-     '/' asFilename isParentDirectoryOf:'/phys/qnx'      
-    "       
+     '/etc' asFilename isParentDirectoryOf:'/etc/passwd'
+     'etc' asFilename isParentDirectoryOf:'etc/passwd'
+     '/etc' asFilename isParentDirectoryOf:'/etc/'
+     '/etc' asFilename isParentDirectoryOf:'/etc'
+     '/et' asFilename isParentDirectoryOf:'/etc'
+     '/home' asFilename isParentDirectoryOf:Filename currentDirectory
+     '~' asFilename isParentDirectoryOf:Filename currentDirectory
+     '~' asFilename isParentDirectoryOf:'.'
+     '~' asFilename isParentDirectoryOf:'..'
+     '~' asFilename isParentDirectoryOf:'../smalltalk'
+     '../..' asFilename isParentDirectoryOf:'../nonExistant'
+     '..' asFilename isParentDirectoryOf:'../../nonExistant'
+     '/' asFilename isParentDirectoryOf:'../nonExistant'
+     '/' asFilename isParentDirectoryOf:'/phys/qnx'
+    "
 !
 
 isRelative
@@ -5055,15 +5058,15 @@
     "
      './foo/bar' asFilename isRelative
      '../../foo/bar' asFilename isRelative
-     '/foo/bar' asFilename isRelative     
-     'bar' asFilename isRelative          
+     '/foo/bar' asFilename isRelative
+     'bar' asFilename isRelative
     "
 
     "Modified: 16.1.1997 / 01:19:14 / cg"
 !
 
 isRootDirectory
-    "return true, if I represent the root directory 
+    "return true, if I represent the root directory
      (i.e. I have no parentDir)"
 
     "/ mhmh - should we use:
@@ -5108,20 +5111,20 @@
     ^ nameString
 
     "
-     '/foo/bar' asFilename name        
-     '/foo/bar' asFilename pathName    
-     '.' asFilename name                
-     '.' asFilename pathName             
-     '../..' asFilename name             
-     '../..' asFilename pathName 
-     'bitmaps' asFilename name                
-     'bitmaps' asFilename pathName             
-     '/tmp/../usr' asFilename name       
-     '/tmp/../usr' asFilename pathName    
-     'source/..' asFilename name    
-     'source/..' asFilename pathName    
-     '/tmp/..' asFilename name    
-     '/tmp/..' asFilename pathName    
+     '/foo/bar' asFilename name
+     '/foo/bar' asFilename pathName
+     '.' asFilename name
+     '.' asFilename pathName
+     '../..' asFilename name
+     '../..' asFilename pathName
+     'bitmaps' asFilename name
+     'bitmaps' asFilename pathName
+     '/tmp/../usr' asFilename name
+     '/tmp/../usr' asFilename pathName
+     'source/..' asFilename name
+     'source/..' asFilename pathName
+     '/tmp/..' asFilename name
+     '/tmp/..' asFilename pathName
     "
 
     "Modified: 18.1.1996 / 21:36:27 / cg"
@@ -5141,7 +5144,7 @@
 
 pathName
     "return the full pathname of the file represented by the receiver,
-     as a string. This will not include ..'s. 
+     as a string. This will not include ..'s.
      If the path represented by the receiver does NOT represent a valid path,
      no compression will be done (for now; this may change).
      See also: name"
@@ -5157,13 +5160,13 @@
     ^ OperatingSystem pathNameOf:(self species nameWithSpecialExpansions:nameString).
 
     "
-     '/foo/bar' asFilename pathName  
-     '.' asFilename pathName         
-     '../..' asFilename pathName     
-     '../..' asFilename name           
-     '/tmp/../usr' asFilename pathName   
-     '/././usr' asFilename pathName     
-     '~/..' asFilename pathName     
+     '/foo/bar' asFilename pathName
+     '.' asFilename pathName
+     '../..' asFilename pathName
+     '../..' asFilename name
+     '/tmp/../usr' asFilename pathName
+     '/././usr' asFilename pathName
+     '~/..' asFilename pathName
     "
 
     "Modified: 27.4.1996 / 18:19:52 / cg"
@@ -5180,12 +5183,12 @@
 
     pathOrNil := self physicalPathName.
     pathOrNil isNil ifTrue:[
-        ^ nil
+	^ nil
     ].
     ^ pathOrNil asFilename
 
     "
-     '/foo/bar' asFilename physicalFileName  
+     '/foo/bar' asFilename physicalFileName
     "
 !
 
@@ -5200,54 +5203,54 @@
 
     info := self linkInfo.
     info isNil ifTrue:[
-        " I do not exist"
-        ^ nil.
+	" I do not exist"
+	^ nil.
     ].
     info isSymbolicLink ifFalse:[
-        ^ self pathName
+	^ self pathName
     ].
 
     t := self.
     [
-        path := info path.
-        path isNil ifTrue:[
-            "/ cannot happen
-            ^ nil
-        ].
-        path asFilename isAbsolute ifTrue:[
-            t := path asFilename
-        ] ifFalse:[
-            t := (self species named:t directoryName) construct:path.
-        ].
-        info := t linkInfo.
-        info isNil ifTrue:[
-            "t does not exist"
-             ^ nil
-        ].
+	path := info path.
+	path isNil ifTrue:[
+	    "/ cannot happen
+	    ^ nil
+	].
+	path asFilename isAbsolute ifTrue:[
+	    t := path asFilename
+	] ifFalse:[
+	    t := (self species named:t directoryName) construct:path.
+	].
+	info := t linkInfo.
+	info isNil ifTrue:[
+	    "t does not exist"
+	     ^ nil
+	].
     ] doWhile:[info isSymbolicLink].
 
     ^ t pathName
 
     "
-     '/foo/bar' asFilename physicalPathName  
-     '.' asFilename physicalPathName         
-     '../..' asFilename physicalPathName     
-     '/usr/tmp' asFilename physicalPathName           
+     '/foo/bar' asFilename physicalPathName
+     '.' asFilename physicalPathName
+     '../..' asFilename physicalPathName
+     '/usr/tmp' asFilename physicalPathName
     "
 
     "Modified: 21.12.1996 / 15:29:50 / cg"
 !
 
 tail
-    "the file's name without directory prefix as a string. 
+    "the file's name without directory prefix as a string.
      An alias for baseName, for ST-80 compatiblity."
 
     ^ self baseName
 
     "
-     Filename currentDirectory tail 
-     'Makefile' asFilename tail    
-     '/foo/bar/baz.st' asFilename tail  
+     Filename currentDirectory tail
+     'Makefile' asFilename tail
+     '/foo/bar/baz.st' asFilename tail
     "
 
     "Modified: 29.2.1996 / 20:19:50 / cg"
@@ -5269,41 +5272,41 @@
     components := self components.
     start := components size - nComponents + 1.
     start < 1 ifTrue:[
-        start := 1.
+	start := 1.
     ].
     start = 1 ifTrue:[
-        tail := ''
+	tail := ''
     ] ifFalse:[
-        tail := components at:start.
+	tail := components at:start.
     ].
     start+1 to:components size do:[:i|
-        tail := tail, sep, (components at:i).
+	tail := tail, sep, (components at:i).
     ].
-    ^ tail.    
-
-
-    "
-     '/foo/bar' asFilename tail:1  
-     '/foo/bar' asFilename tail:2  
-     '/foo/bar' asFilename tail:3  
-     '/foo/bar.cc' asFilename tail:2  
-     '.' asFilename tail:3          
-     '..' asFilename tail:3         
-     '../..' asFilename tail:2        
-     '../../libbasic' asFilename tail:2        
-     '../../libbasic' asFilename asCanonicalizedFilename tail:2        
-     '../../libpr' asFilename tail:2        
-     '../../libbasic/Object.st' asFilename asCanonicalizedFilename tail:2        
-     '/' asFilename tail:2        
-     '\' asFilename tail:2        
-     'c:\' asFilename tail:2        
-     '\\idefix' asFilename tail:2        
+    ^ tail.
+
+
+    "
+     '/foo/bar' asFilename tail:1
+     '/foo/bar' asFilename tail:2
+     '/foo/bar' asFilename tail:3
+     '/foo/bar.cc' asFilename tail:2
+     '.' asFilename tail:3
+     '..' asFilename tail:3
+     '../..' asFilename tail:2
+     '../../libbasic' asFilename tail:2
+     '../../libbasic' asFilename asCanonicalizedFilename tail:2
+     '../../libpr' asFilename tail:2
+     '../../libbasic/Object.st' asFilename asCanonicalizedFilename tail:2
+     '/' asFilename tail:2
+     '\' asFilename tail:2
+     'c:\' asFilename tail:2
+     '\\idefix' asFilename tail:2
     "
 !
 
 volume
     "return the disc volume part of the name or an empty string.
-     This is only used with MSDOS and VMS filenames 
+     This is only used with MSDOS and VMS filenames
      - by default (and on unix), an empty string is returned"
 
     ^ ''
@@ -5322,9 +5325,9 @@
     "
      '/foo/bar' asFilename isDirectory
      '/tmp' asFilename isDirectory
-     'Makefile' asFilename isDirectory   
-     'c:\' asFilename isDirectory   
-     'd:\' asFilename isDirectory   
+     'Makefile' asFilename isDirectory
+     'c:\' asFilename isDirectory
+     'd:\' asFilename isDirectory
     "
 
     "Modified: / 21.9.1998 / 15:53:10 / cg"
@@ -5335,20 +5338,20 @@
      readable directories pathname, and the directory is not empty."
 
     FileStream openErrorSignal
-        handle:[:ex| ]
-        do:[
-            self directoryContentsDo:[:pathString|^ true].
-        ].
+	handle:[:ex| ]
+	do:[
+	    self directoryContentsDo:[:pathString|^ true].
+	].
     ^ false.
 
     "
-     '/foo/bar' asFilename isNonEmptyDirectory 
+     '/foo/bar' asFilename isNonEmptyDirectory
      '/tmp' asFilename isNonEmptyDirectory
      '/tmp/empty' asFilename makeDirectory; isNonEmptyDirectory.
      '/tmp/empty' asFilename removeDirectory.
-     'Makefile' asFilename isNonEmptyDirectory   
-     'c:\' asFilename isNonEmptyDirectory   
-     'd:\' asFilename isNonEmptyDirectory   
+     'Makefile' asFilename isNonEmptyDirectory
+     'c:\' asFilename isNonEmptyDirectory
+     'd:\' asFilename isNonEmptyDirectory
     "
 
     "Modified: / 21.9.1998 / 15:53:10 / cg"
@@ -5362,10 +5365,10 @@
     "
      '/foo/bar' asFilename isRegularFile
      '/tmp' asFilename isRegularFile
-     'Makefile' asFilename isRegularFile   
-     'c:\' asFilename isRegularFile   
-     'd:\' asFilename isRegularFile   
-     '/dev/null' asFilename isRegularFile   
+     'Makefile' asFilename isRegularFile
+     'c:\' asFilename isRegularFile
+     'd:\' asFilename isRegularFile
+     '/dev/null' asFilename isRegularFile
     "
 !
 
@@ -5381,10 +5384,10 @@
     "
      '/foo/bar' asFilename isSpecialFile
      '/tmp' asFilename isSpecialFile
-     'Makefile' asFilename isSpecialFile   
-     'c:\' asFilename isSpecialFile   
-     'd:\' asFilename isSpecialFile   
-     '/dev/null' asFilename isSpecialFile   
+     'Makefile' asFilename isSpecialFile
+     'c:\' asFilename isSpecialFile
+     'd:\' asFilename isSpecialFile
+     '/dev/null' asFilename isSpecialFile
     "
 !
 
@@ -5396,8 +5399,8 @@
     ^ OperatingSystem isSymbolicLink:(self osNameForFile)
 
     "
-     'Make.proto' asFilename isSymbolicLink  
-     'Makefile' asFilename isSymbolicLink   
+     'Make.proto' asFilename isSymbolicLink
+     'Makefile' asFilename isSymbolicLink
     "
 ! !
 
@@ -5409,9 +5412,9 @@
      Returns nil for non-existing directories; however, this behavior
      may be changed in the near future, to raise an exception instead.
      So users of this method better test for existing directory before.
-     Notice: 
-        this returns the file-names as strings; 
-        see also #directoryContentsAsFilenames, which returns fileName instances."
+     Notice:
+	this returns the file-names as strings;
+	see also #directoryContentsAsFilenames, which returns fileName instances."
 
     |directoryStream contents|
 
@@ -5420,16 +5423,16 @@
     directoryStream isNil ifTrue:[^ nil].
 
     [
-        [directoryStream atEnd] whileFalse:[  
-            |entry|
-
-            entry := directoryStream nextLine.
-            (entry notNil and:[entry ~= '.' and:[entry ~= '..']]) ifTrue:[
-                contents add:entry
-            ].
-        ].
+	[directoryStream atEnd] whileFalse:[
+	    |entry|
+
+	    entry := directoryStream nextLine.
+	    (entry notNil and:[entry ~= '.' and:[entry ~= '..']]) ifTrue:[
+		contents add:entry
+	    ].
+	].
     ] ensure:[
-        directoryStream close
+	directoryStream close
     ].
 
     ^ contents.
@@ -5449,9 +5452,9 @@
      Returns nil for non-existing directories; however, this behavior
      may be changed in the near future, to raise an exception instead.
      So users of this method better test for existing directory before.
-     Notice: 
-        this returns the file-names as fileName instances; 
-        see also #directoryContents, which returns strings."
+     Notice:
+	this returns the file-names as fileName instances;
+	see also #directoryContents, which returns strings."
 
     |names|
 
@@ -5460,7 +5463,7 @@
     ^ names collect:[:entry | self construct:entry].
 
     "
-     '.' asFilename directoryContentsAsFilenames   
+     '.' asFilename directoryContentsAsFilenames
      '/XXXdoesNotExist' asFilename directoryContentsAsFilenames
     "
 !
@@ -5478,8 +5481,8 @@
     "here we get the files without '.' and '..'"
     files := self directoryContents.
     files isNil ifTrue:[
-        "/ mhmh - that one does not exist
-        ^ files
+	"/ mhmh - that one does not exist
+	^ files
     ].
 
     files addFirst:'..'.
@@ -5499,9 +5502,9 @@
      as a collection of strings.
      This excludes any entries for '.' or '..'.
      Subdirectory files are included with a relative pathname.
-     Notice: 
-        this returns the file-names as strings; 
-        see also #recursiveDirectoryContentsAsFilenames, which returns fileName instances.
+     Notice:
+	this returns the file-names as strings;
+	see also #recursiveDirectoryContentsAsFilenames, which returns fileName instances.
 
      Warning: this may take a long time to execute."
 
@@ -5510,25 +5513,25 @@
     fileNames := OrderedCollection new.
     dirNames := OrderedCollection new.
     self directoryContents do:[:f |
-        (self construct:f) isDirectory ifTrue:[
-            dirNames add:f
-        ] ifFalse:[
-            fileNames add:f
-        ]
+	(self construct:f) isDirectory ifTrue:[
+	    dirNames add:f
+	] ifFalse:[
+	    fileNames add:f
+	]
     ].
 
     dirNames do:[:dN |
-        |dd subFiles|
-
-        dd := dN asFilename.
-        subFiles := (self construct:dN) recursiveDirectoryContents.
-        fileNames addAll:(subFiles collect:[:f | dd constructString:f])
+	|dd subFiles|
+
+	dd := dN asFilename.
+	subFiles := (self construct:dN) recursiveDirectoryContents.
+	fileNames addAll:(subFiles collect:[:f | dd constructString:f])
     ].
     ^ fileNames.
 
     "
-     '.' asFilename recursiveDirectoryContents 
-     '../../clients' asFilename recursiveDirectoryContents 
+     '.' asFilename recursiveDirectoryContents
+     '../../clients' asFilename recursiveDirectoryContents
     "
 !
 
@@ -5539,9 +5542,9 @@
      Returns nil for non-existing directories; however, this behavior
      may be changed in the near future, to raise an exception instead.
      So users of this method better test for existing directory before.
-     Notice: 
-        this returns the file-names as fileName instances; 
-        see also #recursiveDirectoryContents, which returns strings.
+     Notice:
+	this returns the file-names as fileName instances;
+	see also #recursiveDirectoryContents, which returns strings.
 
      Warning: this may take a long time to execute."
 
@@ -5552,7 +5555,7 @@
     ^ names collect:[:entry | self construct:entry].
 
     "
-     '.' asFilename recursiveDirectoryContentsAsFilenames   
+     '.' asFilename recursiveDirectoryContentsAsFilenames
      '/XXXdoesNotExist' asFilename recursiveDirectoryContentsAsFilenames
     "
 ! !
@@ -5562,30 +5565,30 @@
 binaryContentsOfEntireFile
     "return the binary contents of the file (as a byteArray);
      Raises an error, if the file is unreadable/non-existing."
-    
-    ^ self 
-        readingFileDo:[:s | 
-            |nBytes bytes n result|
-
-            s binary.
-            nBytes := self fileSize.
-            (nBytes notNil and:[ nBytes ~~ 0 ]) ifTrue:[
-                bytes := ByteArray uninitializedNew:nBytes.
-                n := s nextBytes:nBytes into:bytes startingAt:1.
-                n == nBytes ifTrue:[
-                    result := bytes
-                ] ifFalse:[
-                    result := bytes copyTo:n
-                ]
-            ] ifFalse:[
-                result := s contentsOfEntireFile
-            ].
-            result
-        ]
+
+    ^ self
+	readingFileDo:[:s |
+	    |nBytes bytes n result|
+
+	    s binary.
+	    nBytes := self fileSize.
+	    (nBytes notNil and:[ nBytes ~~ 0 ]) ifTrue:[
+		bytes := ByteArray uninitializedNew:nBytes.
+		n := s nextBytes:nBytes into:bytes startingAt:1.
+		n == nBytes ifTrue:[
+		    result := bytes
+		] ifFalse:[
+		    result := bytes copyTo:n
+		]
+	    ] ifFalse:[
+		result := s contentsOfEntireFile
+	    ].
+	    result
+	]
 
     "
      'Makefile' asFilename binaryContentsOfEntireFile
-     'foobar' asFilename binaryContentsOfEntireFile   
+     'foobar' asFilename binaryContentsOfEntireFile
     "
 
     "Modified: / 27-10-2012 / 19:42:07 / cg"
@@ -5601,7 +5604,7 @@
 
     "
      'Makefile' asFilename contents
-     'foobar' asFilename contents            
+     'foobar' asFilename contents
     "
 
     "Modified: / 2.7.1996 / 12:49:45 / stefan"
@@ -5643,7 +5646,7 @@
 
 readingFileDo:aBlock
     "create a read-stream on the receiver file, evaluate aBlock, passing that stream as arg,
-     and return the blocks value. 
+     and return the blocks value.
      If the file cannot be opened, an exception is raised or
      (old behavior, will vanish:)the block is evaluated with a nil argument.
      Ensures that the stream is closed."
@@ -5652,9 +5655,9 @@
 
     stream := self readStream.
     [
-        result := aBlock value:stream
+	result := aBlock value:stream
     ] ensure:[
-        stream notNil ifTrue:[stream close]
+	stream notNil ifTrue:[stream close]
     ].
     ^ result
 
@@ -5663,11 +5666,11 @@
 
      |rslt|
 
-     rslt := 
-        '/etc/passwd' asFilename 
-            readingFileDo:[:s |
-                s nextLine
-            ]. 
+     rslt :=
+	'/etc/passwd' asFilename
+	    readingFileDo:[:s |
+		s nextLine
+	    ].
      Transcript showCR:rslt.
     "
 
@@ -5677,21 +5680,21 @@
      |rslt|
 
      rslt :=
-        '/etc/passwd' asFilename 
-            readingFileDo:
-                [:s |
-                    |shells|
-
-                    shells := Bag new.
-                    s linesDo:
-                        [:line |
-                            |parts|
-
-                            parts := line asCollectionOfSubstringsSeparatedBy:$:.
-                            shells add:(parts seventh).
-                        ].
-                    shells contents
-                ].           
+	'/etc/passwd' asFilename
+	    readingFileDo:
+		[:s |
+		    |shells|
+
+		    shells := Bag new.
+		    s linesDo:
+			[:line |
+			    |parts|
+
+			    parts := line asCollectionOfSubstringsSeparatedBy:$:.
+			    shells add:(parts seventh).
+			].
+		    shells contents
+		].
      Transcript showCR:rslt.
     "
 !
@@ -5703,21 +5706,21 @@
      Ensures that the stream is closed."
 
     self readingFileDo:[:stream |
-        stream linesDo:aBlock
+	stream linesDo:aBlock
     ].
 
     "
-    '/etc/passwd' asFilename 
-        readingLinesDo:[:eachLine |
-            Transcript showCR:eachLine.
-        ]. 
-    "
-
-    "
-    '/etc/xxxxx' asFilename 
-        readingLinesDo:[:eachLine |
-            Transcript showCR:eachLine.
-        ]. 
+    '/etc/passwd' asFilename
+	readingLinesDo:[:eachLine |
+	    Transcript showCR:eachLine.
+	].
+    "
+
+    "
+    '/etc/xxxxx' asFilename
+	readingLinesDo:[:eachLine |
+	    Transcript showCR:eachLine.
+	].
     "
 ! !
 
@@ -5727,7 +5730,7 @@
     "special - return the OS's name for the receiver."
 
     self isDirectory ifTrue:[
-        ^ self osNameForDirectory
+	^ self osNameForDirectory
     ].
     ^ self osNameForFile
 !
@@ -5768,17 +5771,17 @@
      access it as a file."
 
     (nameString startsWith:'~') ifFalse:[
-        ^ nameString.
+	^ nameString.
     ].
 
-    ^ self species nameWithSpecialExpansions:nameString. 
+    ^ self species nameWithSpecialExpansions:nameString.
 ! !
 
 !Filename methodsFor:'suffixes'!
 
 addSuffix:aSuffix
     "return a new filename for the receivers name with a additional suffix.
-     The new suffix is simply appended to the name, 
+     The new suffix is simply appended to the name,
      regardless whether there is already an existing suffix.
      See also #withSuffix:"
 
@@ -5786,37 +5789,37 @@
 
     prefixName := self name.
     aSuffix isEmptyOrNil ifTrue:[
-        ^ self species named:prefixName
+	^ self species named:prefixName
     ].
 
     ^ self species named:
-        (prefixName 
-         , self species suffixSeparator asString 
-         , aSuffix asString)
-
-    "
-     'abc.st' asFilename addSuffix:nil         
-     'a.b.c' asFilename addSuffix:nil            
-     '.b.c.' asFilename addSuffix:nil            
-     '.b.c' asFilename addSuffix:nil            
-     '.c.' asFilename addSuffix:nil            
-     '.c' asFilename addSuffix:nil            
-     'c.' asFilename addSuffix:nil            
-     '.' asFilename addSuffix:nil            
-
-     'abc.st' asFilename addSuffix:'o'         
-     'abc' asFilename addSuffix:'o'             
-     'a.b.c' asFilename addSuffix:'o'            
-     'a.b.c.' asFilename addSuffix:'o'            
-     '.b.c.' asFilename addSuffix:'o'            
-     '.c.' asFilename addSuffix:'o'            
-     '.c' asFilename addSuffix:'o'            
-     'c.' asFilename addSuffix:'o'            
-     '.' asFilename addSuffix:'o'            
-     '/foo/bar/baz.st' asFilename addSuffix:'c'   
-     '/foo/bar/baz.c' asFilename addSuffix:'st'   
-     '/foo/bar.c/baz.c' asFilename addSuffix:'st'   
-     '/foo/bar.c/baz' asFilename addSuffix:'st'   
+	(prefixName
+	 , self species suffixSeparator asString
+	 , aSuffix asString)
+
+    "
+     'abc.st' asFilename addSuffix:nil
+     'a.b.c' asFilename addSuffix:nil
+     '.b.c.' asFilename addSuffix:nil
+     '.b.c' asFilename addSuffix:nil
+     '.c.' asFilename addSuffix:nil
+     '.c' asFilename addSuffix:nil
+     'c.' asFilename addSuffix:nil
+     '.' asFilename addSuffix:nil
+
+     'abc.st' asFilename addSuffix:'o'
+     'abc' asFilename addSuffix:'o'
+     'a.b.c' asFilename addSuffix:'o'
+     'a.b.c.' asFilename addSuffix:'o'
+     '.b.c.' asFilename addSuffix:'o'
+     '.c.' asFilename addSuffix:'o'
+     '.c' asFilename addSuffix:'o'
+     'c.' asFilename addSuffix:'o'
+     '.' asFilename addSuffix:'o'
+     '/foo/bar/baz.st' asFilename addSuffix:'c'
+     '/foo/bar/baz.c' asFilename addSuffix:'st'
+     '/foo/bar.c/baz.c' asFilename addSuffix:'st'
+     '/foo/bar.c/baz' asFilename addSuffix:'st'
     "
 !
 
@@ -5828,16 +5831,16 @@
 
     mySuffix := self suffix.
     self species isCaseSensitive ifTrue:[
-        ^ mySuffix = aSuffixString
+	^ mySuffix = aSuffixString
     ].
     ^ mySuffix asLowercase = aSuffixString asLowercase
 
     "
-     'abc.st' asFilename hasSuffix:'st'   
-     'abc.ST' asFilename hasSuffix:'st'   
+     'abc.st' asFilename hasSuffix:'st'
+     'abc.ST' asFilename hasSuffix:'st'
      '.ST' asFilename hasSuffix:'st'              -- false expected here
      '.foorc' asFilename hasSuffix:'foorc'        -- false expected here
-     '.foorc.sav' asFilename hasSuffix:'sav'   
+     '.foorc.sav' asFilename hasSuffix:'sav'
     "
 
     "Modified: 7.9.1997 / 02:55:25 / cg"
@@ -5862,23 +5865,23 @@
     ^ nameString copyTo:(idx - 1)
 
     "
-     'abc.st' asFilename nameWithoutSuffix         
-     'abc' asFilename nameWithoutSuffix            
-     '/abc' asFilename nameWithoutSuffix            
-     '/abc.d' asFilename nameWithoutSuffix            
-     './abc' asFilename nameWithoutSuffix            
-     './abc.d' asFilename nameWithoutSuffix            
-     './.abc' asFilename nameWithoutSuffix            
-     'a.b.c' asFilename nameWithoutSuffix           
-     'a.b.' asFilename nameWithoutSuffix           
-     '.b.c' asFilename nameWithoutSuffix           
-     '.b.' asFilename nameWithoutSuffix           
-     '.b' asFilename nameWithoutSuffix           
-     '/foo/bar/baz.c' asFilename nameWithoutSuffix     
-     '/foo/bar.x/baz.c' asFilename nameWithoutSuffix     
-     '/foo/bar.x/baz' asFilename nameWithoutSuffix     
-     '/foo/bar/baz/foo.c/bar' asFilename nameWithoutSuffix   
-     '/foo/bar/baz/foo.c/bar.c' asFilename nameWithoutSuffix   
+     'abc.st' asFilename nameWithoutSuffix
+     'abc' asFilename nameWithoutSuffix
+     '/abc' asFilename nameWithoutSuffix
+     '/abc.d' asFilename nameWithoutSuffix
+     './abc' asFilename nameWithoutSuffix
+     './abc.d' asFilename nameWithoutSuffix
+     './.abc' asFilename nameWithoutSuffix
+     'a.b.c' asFilename nameWithoutSuffix
+     'a.b.' asFilename nameWithoutSuffix
+     '.b.c' asFilename nameWithoutSuffix
+     '.b.' asFilename nameWithoutSuffix
+     '.b' asFilename nameWithoutSuffix
+     '/foo/bar/baz.c' asFilename nameWithoutSuffix
+     '/foo/bar.x/baz.c' asFilename nameWithoutSuffix
+     '/foo/bar.x/baz' asFilename nameWithoutSuffix
+     '/foo/bar/baz/foo.c/bar' asFilename nameWithoutSuffix
+     '/foo/bar/baz/foo.c/bar.c' asFilename nameWithoutSuffix
     "
 
     "Modified: / 07-09-1995 / 11:15:42 / claus"
@@ -5893,12 +5896,12 @@
     ^ self prefixAndSuffix at:1
 
     "
-     'abc.st' asFilename prefix   
-     'abc' asFilename prefix      
-     'a.b.c' asFilename prefix    
-     'a.b.c' asFilename prefix    
-     'a.' asFilename prefix    
-     '.a' asFilename prefix    
+     'abc.st' asFilename prefix
+     'abc' asFilename prefix
+     'a.b.c' asFilename prefix
+     'a.b.c' asFilename prefix
+     'a.' asFilename prefix
+     '.a' asFilename prefix
     "
 
     "Modified: / 07-09-1995 / 11:09:03 / claus"
@@ -5917,9 +5920,9 @@
      that part is NOT considered a suffix. Thus, '.foorc' has no suffix and a prefix of
      '.foorc'.
      See also: #withoutSuffix and #withSuffix
-     Notice: 
-        there is currently no known system which uses other than
-        the period character as suffixCharacter."
+     Notice:
+	there is currently no known system which uses other than
+	the period character as suffixCharacter."
 
     |nm idx|
 
@@ -5928,23 +5931,23 @@
     "/ be careful: if the name consists only of suffix (i.e '.foo'),
     "/ the suffix is considered empty.
     ((idx == 1) or:[ idx == 0 ]) ifTrue:[
-        ^ Array with:nm with:''
+	^ Array with:nm with:''
     ].
-    ^ Array 
-        with:(nm copyTo:idx-1)
-        with:(nm copyFrom:idx+1)
-
-    "
-     'abc.st' asFilename prefixAndSuffix  
-     'abc' asFilename prefixAndSuffix  
-     'a.b.c' asFilename prefixAndSuffix 
-     '/foo/bar.c/baz.c' asFilename prefixAndSuffix 
-     'a.' asFilename prefixAndSuffix    
-     '.a' asFilename prefixAndSuffix    
-
-     |parts| 
+    ^ Array
+	with:(nm copyTo:idx-1)
+	with:(nm copyFrom:idx+1)
+
+    "
+     'abc.st' asFilename prefixAndSuffix
+     'abc' asFilename prefixAndSuffix
+     'a.b.c' asFilename prefixAndSuffix
+     '/foo/bar.c/baz.c' asFilename prefixAndSuffix
+     'a.' asFilename prefixAndSuffix
+     '.a' asFilename prefixAndSuffix
+
+     |parts|
      parts := 'Object.st' asFilename prefixAndSuffix.
-     ((parts at:1) , '.o') asFilename   
+     ((parts at:1) , '.o') asFilename
     "
 
     "Modified: 7.9.1995 / 11:15:42 / claus"
@@ -5959,12 +5962,12 @@
     ^ self prefixAndSuffix at:2
 
     "
-     'abc.st' asFilename suffix   
-     'abc' asFilename suffix      
-     'a.b.c' asFilename suffix    
-     'a.b.c' asFilename suffix    
-     'a.' asFilename suffix    
-     '.a' asFilename suffix    
+     'abc.st' asFilename suffix
+     'abc' asFilename suffix
+     'a.b.c' asFilename suffix
+     'a.b.c' asFilename suffix
+     'a.' asFilename suffix
+     '.a' asFilename suffix
     "
 
     "Modified: 7.9.1995 / 11:09:03 / claus"
@@ -5979,37 +5982,37 @@
 
     prefixName := self nameWithoutSuffix.
     aSuffix isEmptyOrNil ifTrue:[
-        ^ self species named:prefixName
+	^ self species named:prefixName
     ].
 
     ^ self species named:
-        (prefixName 
-         , self class suffixSeparator asString 
-         , aSuffix asString)
-
-    "
-     'abc.st' asFilename withSuffix:nil         
-     'a.b.c' asFilename withSuffix:nil            
-     '.b.c.' asFilename withSuffix:nil            
-     '.b.c' asFilename withSuffix:nil            
-     '.c.' asFilename withSuffix:nil            
-     '.c' asFilename withSuffix:nil            
-     'c.' asFilename withSuffix:nil            
-     '.' asFilename withSuffix:nil            
-
-     'abc.st' asFilename withSuffix:'o'         
-     'abc' asFilename withSuffix:'o'             
-     'a.b.c' asFilename withSuffix:'o'            
-     'a.b.c.' asFilename withSuffix:'o'            
-     '.b.c.' asFilename withSuffix:'o'            
-     '.c.' asFilename withSuffix:'o'            
-     '.c' asFilename withSuffix:'o'            
-     'c.' asFilename withSuffix:'o'            
-     '.' asFilename withSuffix:'o'            
-     '/foo/bar/baz.st' asFilename withSuffix:'c'   
-     '/foo/bar/baz.c' asFilename withSuffix:'st'   
-     '/foo/bar.c/baz.c' asFilename withSuffix:'st'   
-     '/foo/bar.c/baz' asFilename withSuffix:'st'   
+	(prefixName
+	 , self class suffixSeparator asString
+	 , aSuffix asString)
+
+    "
+     'abc.st' asFilename withSuffix:nil
+     'a.b.c' asFilename withSuffix:nil
+     '.b.c.' asFilename withSuffix:nil
+     '.b.c' asFilename withSuffix:nil
+     '.c.' asFilename withSuffix:nil
+     '.c' asFilename withSuffix:nil
+     'c.' asFilename withSuffix:nil
+     '.' asFilename withSuffix:nil
+
+     'abc.st' asFilename withSuffix:'o'
+     'abc' asFilename withSuffix:'o'
+     'a.b.c' asFilename withSuffix:'o'
+     'a.b.c.' asFilename withSuffix:'o'
+     '.b.c.' asFilename withSuffix:'o'
+     '.c.' asFilename withSuffix:'o'
+     '.c' asFilename withSuffix:'o'
+     'c.' asFilename withSuffix:'o'
+     '.' asFilename withSuffix:'o'
+     '/foo/bar/baz.st' asFilename withSuffix:'c'
+     '/foo/bar/baz.c' asFilename withSuffix:'st'
+     '/foo/bar.c/baz.c' asFilename withSuffix:'st'
+     '/foo/bar.c/baz' asFilename withSuffix:'st'
     "
 
     "Modified: / 07-09-1995 / 11:15:42 / claus"
@@ -6027,23 +6030,23 @@
     ^ self species named:n
 
     "
-     'abc.st' asFilename withoutSuffix         
-     'abc' asFilename withoutSuffix            
-     '/abc' asFilename withoutSuffix            
-     '/abc.d' asFilename withoutSuffix            
-     './abc' asFilename withoutSuffix            
-     './abc.d' asFilename withoutSuffix            
-     './.abc' asFilename withoutSuffix            
-     'a.b.c' asFilename withoutSuffix           
-     'a.b.' asFilename withoutSuffix           
-     '.b.c' asFilename withoutSuffix           
-     '.b.' asFilename withoutSuffix           
-     '.b' asFilename withoutSuffix           
-     '/foo/bar/baz.c' asFilename withoutSuffix     
-     '/foo/bar.x/baz.c' asFilename withoutSuffix     
-     '/foo/bar.x/baz' asFilename withoutSuffix     
-     '/foo/bar/baz/foo.c/bar' asFilename withoutSuffix   
-     '/foo/bar/baz/foo.c/bar.c' asFilename withoutSuffix   
+     'abc.st' asFilename withoutSuffix
+     'abc' asFilename withoutSuffix
+     '/abc' asFilename withoutSuffix
+     '/abc.d' asFilename withoutSuffix
+     './abc' asFilename withoutSuffix
+     './abc.d' asFilename withoutSuffix
+     './.abc' asFilename withoutSuffix
+     'a.b.c' asFilename withoutSuffix
+     'a.b.' asFilename withoutSuffix
+     '.b.c' asFilename withoutSuffix
+     '.b.' asFilename withoutSuffix
+     '.b' asFilename withoutSuffix
+     '/foo/bar/baz.c' asFilename withoutSuffix
+     '/foo/bar.x/baz.c' asFilename withoutSuffix
+     '/foo/bar.x/baz' asFilename withoutSuffix
+     '/foo/bar/baz/foo.c/bar' asFilename withoutSuffix
+     '/foo/bar/baz/foo.c/bar.c' asFilename withoutSuffix
     "
 
     "Modified: / 07-09-1995 / 11:15:42 / claus"
@@ -6065,7 +6068,7 @@
 
 appendingFileDo:aBlock
     "create a append-stream on the receiver file, evaluate aBlock, passing that stream as arg,
-     and return the blocks value. 
+     and return the blocks value.
      If the file cannot be opened, an exception is raised.
      Ensures that the stream is closed."
 
@@ -6073,17 +6076,17 @@
 
     stream := self appendStream.
     [
-        result := aBlock value:stream
+	result := aBlock value:stream
     ] ensure:[
-        stream close
+	stream close
     ].
     ^ result
 
     "
      'ttt' asFilename appendingFileDo:[:s |
-        s nextPutLine:'hello'.
-        s nextPutLine:'world'.
-     ]           
+	s nextPutLine:'hello'.
+	s nextPutLine:'world'.
+     ]
     "
 
     "Created: / 09-11-2012 / 10:07:41 / sr"
@@ -6093,24 +6096,24 @@
     "create (or overwrite) a file given its contents as a collection of lines.
      Raises an error, if the file is unwritable."
 
-    ^ self 
-        writingFileDo:[:s |
-            aStringOrCollectionOfLines isNonByteCollection ifTrue:[
-                "a StringCollection or a collection of lines"
-                aStringOrCollectionOfLines do:[:each | s nextPutLine:(each ? '')]
-            ] ifFalse:[
-                "something string-like"
-                aStringOrCollectionOfLines isString ifFalse:[
-                    s binary
-                ].
-                s nextPutAll:aStringOrCollectionOfLines
-            ]
-        ].
-
-    "
-     'foo1' asFilename contents:#('one' 'two' 'three')            
-     'foo2' asFilename contents:'Hello world'            
-     'foo3' asFilename contents:#[1 2 3 4 5]          
+    ^ self
+	writingFileDo:[:s |
+	    aStringOrCollectionOfLines isNonByteCollection ifTrue:[
+		"a StringCollection or a collection of lines"
+		aStringOrCollectionOfLines do:[:each | s nextPutLine:(each ? '')]
+	    ] ifFalse:[
+		"something string-like"
+		aStringOrCollectionOfLines isString ifFalse:[
+		    s binary
+		].
+		s nextPutAll:aStringOrCollectionOfLines
+	    ]
+	].
+
+    "
+     'foo1' asFilename contents:#('one' 'two' 'three')
+     'foo2' asFilename contents:'Hello world'
+     'foo3' asFilename contents:#[1 2 3 4 5]
     "
 
     "Created: / 11-12-2006 / 14:11:21 / cg"
@@ -6119,7 +6122,7 @@
 
 writingFileDo:aBlock
     "create a write-stream on the receiver file, evaluate aBlock, passing that stream as arg,
-     and return the blocks value. 
+     and return the blocks value.
      If the file cannot be opened, an exception is raised.
      Ensures that the stream is closed."
 
@@ -6127,16 +6130,16 @@
 
     stream := self writeStream.
     [
-        result := aBlock value:stream
+	result := aBlock value:stream
     ] ensure:[
-        stream close
+	stream close
     ].
     ^ result
 
     "
      'ttt' asFilename writingFileDo:[:s |
-        s nextPutLine:'hello'.
-        s nextPutLine:'world'.
+	s nextPutLine:'hello'.
+	s nextPutLine:'world'.
      ]
     "
 
--- a/String.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/String.st	Wed Aug 05 22:44:27 2015 +0100
@@ -171,126 +171,126 @@
     int nInstVars;
 
     if (__isSmallInteger(anInteger)) {
-        len = __intVal(anInteger);
-        if (len >= 0) {
-            instsize = OHDR_SIZE + len + 1;
-            if (self == String || self == ImmutableString) {
-                if (__CanDoQuickNew(instsize)) {        /* OBJECT ALLOCATION */
-                    /*
-                     * the most common case
-                     */
-                    __qCheckedNew(newString, instsize);
-                    __InstPtr(newString)->o_class = self; /* no need for PROTECT - there was no GC */
-                    __qSTORE(newString, self);
-
-                    cp = __stringVal(newString);
+	len = __intVal(anInteger);
+	if (len >= 0) {
+	    instsize = OHDR_SIZE + len + 1;
+	    if (self == String || self == ImmutableString) {
+		if (__CanDoQuickNew(instsize)) {        /* OBJECT ALLOCATION */
+		    /*
+		     * the most common case
+		     */
+		    __qCheckedNew(newString, instsize);
+		    __InstPtr(newString)->o_class = self; /* no need for PROTECT - there was no GC */
+		    __qSTORE(newString, self);
+
+		    cp = __stringVal(newString);
 
 # if defined(memset4) && !defined(NON_ASCII)
-                    {
-                        /*
-                         * no sizeof(int) here please -
-                         * - memset4 (if defined) fills 4-bytes on ALL machines
-                         */
-                        int l4 = len >> 2;
-
-                        if (len & 3) l4++;   
-                        memset4(cp, 0x20202020, l4);
-                        cp[len] = '\0';
-                    }
+		    {
+			/*
+			 * no sizeof(int) here please -
+			 * - memset4 (if defined) fills 4-bytes on ALL machines
+			 */
+			int l4 = len >> 2;
+
+			if (len & 3) l4++;
+			memset4(cp, 0x20202020, l4);
+			cp[len] = '\0';
+		    }
 # else
 #  ifdef FAST_MEMSET
-                    memset(cp, ' ', len);
-                    cp[len] = '\0';
+		    memset(cp, ' ', len);
+		    cp[len] = '\0';
 #  else
-                    for ( ; len >= 8; cp += 8, len -= 8) {
+		    for ( ; len >= 8; cp += 8, len -= 8) {
 #   ifndef NON_ASCII       /* i.e. EBCDIC  */
 #    ifdef INT64
-                        ((INT64 *)cp)[0] = 0x2020202020202020L;
+			((INT64 *)cp)[0] = 0x2020202020202020L;
 #    else
-                        ((int *)cp)[0] = 0x20202020;
-                        ((int *)cp)[1] = 0x20202020;
+			((int *)cp)[0] = 0x20202020;
+			((int *)cp)[1] = 0x20202020;
 #    endif
 #   else
-                        cp[0] = cp[1] = cp[2] = cp[3] = ' ';
-                        cp[4] = cp[5] = cp[6] = cp[7] = ' ';
+			cp[0] = cp[1] = cp[2] = cp[3] = ' ';
+			cp[4] = cp[5] = cp[6] = cp[7] = ' ';
 #   endif
-                    }
-                    while (len--)
-                        *cp++ = ' ';
-                    *cp = '\0';
+		    }
+		    while (len--)
+			*cp++ = ' ';
+		    *cp = '\0';
 #  endif /* not FAST_MEMSET */
 # endif /* not memset4 */
 
-                    RETURN (newString);
-                }
-                nInstVars = 0;
-            } else {
-                nInstVars = __intVal(__ClassInstPtr(self)->c_ninstvars);
-                instsize += __OBJS2BYTES__(nInstVars);
-            }
-
-            __PROTECT_CONTEXT__;
-            __qNew(newString, instsize);        /* OBJECT ALLOCATION */
-            __UNPROTECT_CONTEXT__;
-
-            if (newString == nil) goto fail;
-
-            __InstPtr(newString)->o_class = self;
-            __qSTORE(newString, self);
-
-            cp = __stringVal(newString);
-            if (nInstVars) {
-                OBJ *op;
-                cp += __OBJS2BYTES__(nInstVars);
-
-                /*
-                 * nil-out instvars
-                 */
+		    RETURN (newString);
+		}
+		nInstVars = 0;
+	    } else {
+		nInstVars = __intVal(__ClassInstPtr(self)->c_ninstvars);
+		instsize += __OBJS2BYTES__(nInstVars);
+	    }
+
+	    __PROTECT_CONTEXT__;
+	    __qNew(newString, instsize);        /* OBJECT ALLOCATION */
+	    __UNPROTECT_CONTEXT__;
+
+	    if (newString == nil) goto fail;
+
+	    __InstPtr(newString)->o_class = self;
+	    __qSTORE(newString, self);
+
+	    cp = __stringVal(newString);
+	    if (nInstVars) {
+		OBJ *op;
+		cp += __OBJS2BYTES__(nInstVars);
+
+		/*
+		 * nil-out instvars
+		 */
 # if defined(memset4)
-                memset4(__InstPtr(newString)->i_instvars, nil, nInstVars);
+		memset4(__InstPtr(newString)->i_instvars, nil, nInstVars);
 # else
 #  if defined(FAST_MEMSET) && ! defined(NEGATIVE_ADDRESSES)
-                /*
-                 * knowing that nil is 0
-                 */
-                memset(__InstPtr(newString)->i_instvars, 0, __OBJS2BYTES__(nInstVars));
+		/*
+		 * knowing that nil is 0
+		 */
+		memset(__InstPtr(newString)->i_instvars, 0, __OBJS2BYTES__(nInstVars));
 #  else
-                op = __InstPtr(newString)->i_instvars;
-                do {
-                    *op++ = nil;
-                } while (--nInstVars);
+		op = __InstPtr(newString)->i_instvars;
+		do {
+		    *op++ = nil;
+		} while (--nInstVars);
 #  endif
 # endif
-            }
-
-            /*
-             * fill with spaces
-             */
+	    }
+
+	    /*
+	     * fill with spaces
+	     */
 # ifdef FAST_MEMSET
-            memset(cp, ' ', len);
-            *(cp + len) = '\0';
+	    memset(cp, ' ', len);
+	    *(cp + len) = '\0';
 # else
-            while (len >= 8) {
+	    while (len >= 8) {
 #  ifndef NON_ASCII       /* i.e. EBCDIC ;-) */
 #   ifdef INT64
-                ((INT64 *)cp)[0] = 0x2020202020202020L;
+		((INT64 *)cp)[0] = 0x2020202020202020L;
 #   else
-                ((int *)cp)[0] = 0x20202020;
-                ((int *)cp)[1] = 0x20202020;
+		((int *)cp)[0] = 0x20202020;
+		((int *)cp)[1] = 0x20202020;
 #   endif
 #  else
-                cp[0] = cp[1] = cp[2] = cp[3] = ' ';
-                cp[4] = cp[5] = cp[6] = cp[7] = ' ';
+		cp[0] = cp[1] = cp[2] = cp[3] = ' ';
+		cp[4] = cp[5] = cp[6] = cp[7] = ' ';
 #  endif
-                cp += 8;
-                len -= 8;
-            }
-            while (len--)
-                *cp++ = ' ';
-            *cp = '\0';
+		cp += 8;
+		len -= 8;
+	    }
+	    while (len--)
+		*cp++ = ' ';
+	    *cp = '\0';
 # endif
-            RETURN (newString);
-        }
+	    RETURN (newString);
+	}
     }
 fail: ;;
 #endif /* not __SCHTEAM__ */
@@ -300,11 +300,11 @@
      use error handling in superclass
     "
     (anInteger < 0) ifTrue:[
-        "
-         the argument is negative,
-        "
-        self error:'bad (negative) argument to new:'.
-        ^ nil
+	"
+	 the argument is negative,
+	"
+	self error:'bad (negative) argument to new:'.
+	^ nil
     ].
 
     ^ (super basicNew:anInteger+1) atAllPut:(Character space)
@@ -1954,15 +1954,15 @@
 	cont:    
 	h = 2166136261U;
 	while (l >= 4) {
-	    l -= 4;
-	    h = (h ^ cp[0]) * 16777619;
-	    h = (h ^ cp[1]) * 16777619;
-	    h = (h ^ cp[2]) * 16777619;
-	    h = (h ^ cp[3]) * 16777619;
-	    cp += 4;
+	l -= 4;
+	h = (h ^ cp[0]) * 16777619;
+	h = (h ^ cp[1]) * 16777619;
+	h = (h ^ cp[2]) * 16777619;
+	h = (h ^ cp[3]) * 16777619;
+	cp += 4;
     	}
     	while (l--) {
-	    h = (h ^ *cp++) * 16777619;
+	h = (h ^ *cp++) * 16777619;
     	}
     	// make it a smallInteger
     	h = (h ^ (h >> 30)) & 0x3FFFFFFF;
@@ -2292,6 +2292,76 @@
     ^ self copy changeClassTo:ImmutableString
 !
 
+asLowercase
+    "a tuned version. Some apps call this very heavily"
+
+%{  /* NOCONTEXT */
+#if 0
+#ifndef __SCHTEAM__
+    REGISTER OBJ slf = self;
+
+    if (__qClass(slf) == String) {
+	char quickBuffer[256];
+	int sz = __stringSize(slf);
+
+	if (sz < (sizeof(quickBuffer)-1)) {
+	    REGISTER int i = 0;
+	    int anyChange = 0;
+	    REGISTER unsigned char *cp = __stringVal(slf);
+
+	    // fast advance
+#if __POINTER_SIZE__ == 8
+	    for (; i<(sz-8); i+=8) {
+		unsigned INT eightChars;
+
+		eightChars = *((unsigned INT *)(cp));
+		if ((eightChars & 0x20202020) != 0x20202020) break;
+		*((unsigned INT *)(&quickBuffer[i])) = eightChars;
+	    }
+#endif
+	    for (; i<(sz-4); i+=4) {
+		unsigned int fourChars;
+
+		fourChars = *((unsigned int *)(cp));
+		if ((fourChars & 0x20202020) != 0x20202020) break;
+		*((unsigned int *)(&quickBuffer[i])) = fourChars;
+	    }
+
+	    for (; i<sz; i++) {
+		unsigned char ch = cp[i];
+
+		quickBuffer[i] = ch;
+		if ((ch & 0x60) == 0x40) {
+		    if (ch >= 'A') {
+			if (ch <= 'Z') {
+			    quickBuffer[i] = ch - 'A' + 'a';
+			    anyChange = 1;
+			} else {
+			    if (ch >= 0xC0) {
+				if (ch <= 0xDE) {
+				    if (ch != 0xD7) {
+					quickBuffer[i] = ch + 0x20;
+					anyChange = 1;
+				    }
+				}
+			    }
+			}
+		    }
+		}
+	    }
+	    quickBuffer[i] = '\0';
+	    if (! anyChange) {
+		RETURN(slf);
+	    }
+	    RETURN (__MKSTRING_L(quickBuffer, i));
+	}
+    }
+#endif /* ! __SCHTEAM__ */
+#endif
+%}.
+    ^ super asLowercase
+!
+
 asPackageId
     "given a package-string as receiver, return a packageId object.
      packageIds hide the details of module/directory handling inside the path.
@@ -3013,7 +3083,7 @@
     "Return my UTF-8 representation as a new String"
 
     self containsNon7BitAscii ifTrue:[
-        ^ CharacterEncoderImplementations::ISO10646_to_UTF8 new encodeString:self
+	^ CharacterEncoderImplementations::ISO10646_to_UTF8 new encodeString:self
     ].
     "speed up common case"
     ^ self.
@@ -3023,21 +3093,21 @@
     "write to aStream in utf8 encoding"
 
     self containsNon7BitAscii ifTrue:[
-        aStream nextPutAllUtf8:self.
+	aStream nextPutAllUtf8:self.
     ] ifFalse:[
-        "speed up common case"
-        aStream nextPutAll:self.
+	"speed up common case"
+	aStream nextPutAll:self.
     ].
 
     "
      String streamContents:[:w|
-        'abcde1234' utf8EncodedOn:w
+	'abcde1234' utf8EncodedOn:w
      ].
      String streamContents:[:w|
-         'abcdeäöüß' utf8EncodedOn:w
+	 'abcdeäöüß' utf8EncodedOn:w
      ].
      String streamContents:[:w|
-         'abcdeäöüß' asUnicode16String utf8EncodedOn:w
+	 'abcdeäöüß' asUnicode16String utf8EncodedOn:w
      ].
     "
 ! !
@@ -3199,24 +3269,24 @@
      && start.isSmallInteger()
      && stop.isSmallInteger()
      && repStart.isSmallInteger()) {
-        STString me = self.asSTString();
-        STString other = aString.asSTString();
-        int _start = start.intValue() - 1;
-        int _stop = stop.intValue() - 1;
-        int _repStart = repStart.intValue() - 1;
-        int mySize = me.characters.length;
-        int otherSize = other.characters.length;
-        int count = _stop - _start + 1;
-
-        if (_start >= 0
-         && _repStart >= 0
-         && _stop < mySize
-         && (_repStart + count) <= otherSize) {
-            if (count > 0) {
-                System.arraycopy(other.characters, _repStart, me.characters, _start, count);
-            }
-            return context._RETURN(self);
-        }
+	STString me = self.asSTString();
+	STString other = aString.asSTString();
+	int _start = start.intValue() - 1;
+	int _stop = stop.intValue() - 1;
+	int _repStart = repStart.intValue() - 1;
+	int mySize = me.characters.length;
+	int otherSize = other.characters.length;
+	int count = _stop - _start + 1;
+
+	if (_start >= 0
+	 && _repStart >= 0
+	 && _stop < mySize
+	 && (_repStart + count) <= otherSize) {
+	    if (count > 0) {
+		System.arraycopy(other.characters, _repStart, me.characters, _start, count);
+	    }
+	    return context._RETURN(self);
+	}
     }
 #else
 
@@ -3229,67 +3299,67 @@
     if (__isStringLike(aString)
      && __isString(self)
      && __bothSmallInteger(start, stop)) {
-        len = __stringSize(self);
-        index1 = __intVal(start);
-        index2 = __intVal(stop);
-        count = index2 - index1 + 1;
-        if (count <= 0) {
-             RETURN (self);
-        }
-        if ((index2 <= len) && (index1 > 0)) {
-            repLen = __stringSize(aString);
-            repIndex = __intVal(repStart);
-            if ((repIndex > 0) && ((repIndex + count - 1) <= repLen)) {
-                srcp = __stringVal(aString) + repIndex - 1;
-                dstp = __stringVal(self) + index1 - 1;
-                if (aString == self) {
-                    /* take care of overlapping copy */
-                    memmove(dstp, srcp, count);
-                    RETURN (self);
-                }
+	len = __stringSize(self);
+	index1 = __intVal(start);
+	index2 = __intVal(stop);
+	count = index2 - index1 + 1;
+	if (count <= 0) {
+	     RETURN (self);
+	}
+	if ((index2 <= len) && (index1 > 0)) {
+	    repLen = __stringSize(aString);
+	    repIndex = __intVal(repStart);
+	    if ((repIndex > 0) && ((repIndex + count - 1) <= repLen)) {
+		srcp = __stringVal(aString) + repIndex - 1;
+		dstp = __stringVal(self) + index1 - 1;
+		if (aString == self) {
+		    /* take care of overlapping copy */
+		    memmove(dstp, srcp, count);
+		    RETURN (self);
+		}
 #  ifdef bcopy4
-                /* copy quadbytes if pointers are aligned */
-                /*
-                 * no sizeof(int) here please -
-                 * - bcopy4 (if defined) copies 4-bytes on ALL machines
-                 */
-                if ((count > 12)
-                 && (((unsigned INT)srcp & 3) == 0)
-                 && (((unsigned INT)dstp & 3) == 0)) {
-                    int n;
-
-                    n = count >> 2;        /* make it quads */
-                    bcopy4(srcp, dstp, n);
-                    n <<= 2;               /* back to chars */
-                    dstp += n;
-                    srcp += n;
-                    count -= n;
-                }
-                while (count-- > 0) {
-                    *dstp++ = *srcp++;
-                }
+		/* copy quadbytes if pointers are aligned */
+		/*
+		 * no sizeof(int) here please -
+		 * - bcopy4 (if defined) copies 4-bytes on ALL machines
+		 */
+		if ((count > 12)
+		 && (((unsigned INT)srcp & 3) == 0)
+		 && (((unsigned INT)dstp & 3) == 0)) {
+		    int n;
+
+		    n = count >> 2;        /* make it quads */
+		    bcopy4(srcp, dstp, n);
+		    n <<= 2;               /* back to chars */
+		    dstp += n;
+		    srcp += n;
+		    count -= n;
+		}
+		while (count-- > 0) {
+		    *dstp++ = *srcp++;
+		}
 #  else
 #   ifdef FAST_MEMCPY
-                memcpy(dstp, srcp, count);
+		memcpy(dstp, srcp, count);
 #   else
-                /* copy longs if pointers are aligned */
-                if ((((unsigned INT)srcp & (sizeof(INT)-1)) == 0)
-                 && (((unsigned INT)dstp & (sizeof(INT)-1)) == 0)) {
-                    while (count >= sizeof(INT)) {
-                        *((unsigned INT *)dstp) = *((unsigned INT *)srcp);
-                        dstp += sizeof(INT);
-                        srcp += sizeof(INT);
-                        count -= sizeof(INT);
-                    }
-                }
-                while (count-- > 0) {
-                    *dstp++ = *srcp++;
-                }
+		/* copy longs if pointers are aligned */
+		if ((((unsigned INT)srcp & (sizeof(INT)-1)) == 0)
+		 && (((unsigned INT)dstp & (sizeof(INT)-1)) == 0)) {
+		    while (count >= sizeof(INT)) {
+			*((unsigned INT *)dstp) = *((unsigned INT *)srcp);
+			dstp += sizeof(INT);
+			srcp += sizeof(INT);
+			count -= sizeof(INT);
+		    }
+		}
+		while (count-- > 0) {
+		    *dstp++ = *srcp++;
+		}
 #   endif
 #  endif
-                RETURN (self);
-            }
-        }
+		RETURN (self);
+	    }
+	}
     }
 # endif
 #endif /* not SCHTEAM */
@@ -3726,33 +3796,33 @@
     REGISTER unsigned char *last = cp + __stringSize(self);
 
     if (!__isStringLike(self)) {
-        cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+	cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
     }
 #if __POINTER_SIZE__ == 8
     if (sizeof(unsigned INT) == 8) {
-        for ( ; (cp+8) <= last; cp += 8) {
-            if (*(unsigned INT *)cp & 0x8080808080808080) {
-                RETURN ( __mkSmallInteger(8) );
-            }
-        }
+	for ( ; (cp+8) <= last; cp += 8) {
+	    if (*(unsigned INT *)cp & 0x8080808080808080) {
+		RETURN ( __mkSmallInteger(8) );
+	    }
+	}
     }
 #endif
     if (sizeof(int) == 4) {
-        for ( ; (cp+4) <= last; cp += 4) {
-            if (*(unsigned int *)cp & 0x80808080) {
-                RETURN ( __mkSmallInteger(8) );
-            }
-        }
+	for ( ; (cp+4) <= last; cp += 4) {
+	    if (*(unsigned int *)cp & 0x80808080) {
+		RETURN ( __mkSmallInteger(8) );
+	    }
+	}
     }
     for ( ; (cp+2) <= last; cp += 2) {
-        if (*(unsigned short *)cp & 0x8080) {
-            RETURN ( __mkSmallInteger(8) );
-        }
+	if (*(unsigned short *)cp & 0x8080) {
+	    RETURN ( __mkSmallInteger(8) );
+	}
     }
     for ( ; cp < last; cp++) {
-        if (*cp & 0x80) {
-            RETURN ( __mkSmallInteger(8) );
-        }
+	if (*cp & 0x80) {
+	    RETURN ( __mkSmallInteger(8) );
+	}
     }
     RETURN ( __mkSmallInteger(7) );
 %}.
@@ -3775,33 +3845,33 @@
     REGISTER unsigned char *last = cp + __stringSize(self);
 
     if (!__isStringLike(self)) {
-        cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+	cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
     }
 #if __POINTER_SIZE__ == 8
     if (sizeof(unsigned INT) == 8) {
-        for ( ; (cp+8) <= last; cp += 8) {
-            if (*(unsigned INT *)cp & 0x8080808080808080) {
-                RETURN ( true );
-            }
-        }
+	for ( ; (cp+8) <= last; cp += 8) {
+	    if (*(unsigned INT *)cp & 0x8080808080808080) {
+		RETURN ( true );
+	    }
+	}
     }
 #endif
     if (sizeof(int) == 4) {
-        for ( ; (cp+4) <= last; cp += 4) {
-            if (*(unsigned int *)cp & 0x80808080) {
-                RETURN ( true );
-            }
-        }
+	for ( ; (cp+4) <= last; cp += 4) {
+	    if (*(unsigned int *)cp & 0x80808080) {
+		RETURN ( true );
+	    }
+	}
     }
     for ( ; (cp+2) <= last; cp += 2) {
-        if (*(unsigned short *)cp & 0x8080) {
-            RETURN ( true );
-        }
+	if (*(unsigned short *)cp & 0x8080) {
+	    RETURN ( true );
+	}
     }
     for ( ; cp < last; cp++) {
-        if (*cp & 0x80) {
-            RETURN ( true );
-        }
+	if (*cp & 0x80) {
+	    RETURN ( true );
+	}
     }
     RETURN (false);
 %}.
@@ -4118,7 +4188,7 @@
 #  endif /* ascii */
 
     while ((c = *src++) == ' ')
-	;; /* just walking along */ 
+	;; /* just walking along */
     if (c != '\0') {
 	RETURN ( false );
     }
@@ -4429,4 +4499,3 @@
 version_CVS
     ^ '$Header$'
 ! !
-
--- a/UninterpretedBytes.st	Mon Aug 03 21:05:52 2015 +0100
+++ b/UninterpretedBytes.st	Wed Aug 05 22:44:27 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -81,28 +83,28 @@
 "
     UninterpretedBytes provides the common protocol for byte-storage
     containers; concrete subclasses are
-        ByteArray (which store the bytes within the Smalltalk object memory)
-        String    (knows that the bytes represent characters)
+	ByteArray (which store the bytes within the Smalltalk object memory)
+	String    (knows that the bytes represent characters)
     and
-        ExternalBytes (which store the bytes in the malloc-heap).
+	ExternalBytes (which store the bytes in the malloc-heap).
 
     UninterpretedBytes itself is abstract, so no instances of it can be created.
 
     [See also:]
-        ByteArray String ExternalBytes
+	ByteArray String ExternalBytes
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [Notice:]
-        Notice the confusion due to multiple methods with the same
-        functionality (i.e. 'xxxx:MSB:' vs. 'xxxx:bigEndian:').
-        The reason is that at the time this class was written,
-        ST80 sid not offer protocol to specify the byteOrder, and
-        ST/X provided methods ending in 'MSB:' for this.
-        In the meanwhile, VW added protocol ending in 'bigEndian:',
-        which has been added here for compatibility.
-        (certainly a point, where an ansi-standard will help)
+	Notice the confusion due to multiple methods with the same
+	functionality (i.e. 'xxxx:MSB:' vs. 'xxxx:bigEndian:').
+	The reason is that at the time this class was written,
+	ST80 sid not offer protocol to specify the byteOrder, and
+	ST/X provided methods ending in 'MSB:' for this.
+	In the meanwhile, VW added protocol ending in 'bigEndian:',
+	which has been added here for compatibility.
+	(certainly a point, where an ansi-standard will help)
 "
 ! !
 
@@ -197,7 +199,7 @@
      of 4 in size (since 24 is the lcm of 6 and 8).
      Every 6 bit packet is encoded as a character in 32..95.
      Characters below 32 are ignored (so line breaks can be inserted at any place).
-     An addition final byte defines how many bytes of the last triple are valid. 
+     An addition final byte defines how many bytes of the last triple are valid.
      This is somewhat like the radix-encoding used in good old PDP11 times ;-)
      ST-80 uses this encoding for Images ...
      This is a base64 encoding, very similar (but not equal) to the algorithm used in RFC1421.
@@ -222,47 +224,47 @@
 
     last := aString last codePoint.
     last > 96 ifTrue:[
-        stop := stop - 3 + (last - 96)
+	stop := stop - 3 + (last - 96)
     ].
     bytes := self new:stop.
 
     index := 1. dstIndex := 1.
     [dstIndex <= stop] whileTrue:[
-        "/ take 4 characters ...
-        "/ allow a line break before each group of 4
-        sixBits := (aString at:index) codePoint.
-        [sixBits < 32] whileTrue:[
-            index := index + 1.
-            sixBits := (aString at:index) codePoint.
-        ].
-        sixBits := sixBits bitAnd:16r3F.
-        n := sixBits.
-
-        "/ self assert:(aString at:index+1) codePoint >= 32.
-        sixBits := (aString at:index+1) codePoint bitAnd:16r3F.
-        n := (n bitShift:6) + sixBits.
-
-        "/ self assert:(aString at:index+2) codePoint >= 32.
-        sixBits := (aString at:index+2) codePoint bitAnd:16r3F.
-        n := (n bitShift:6) + sixBits.
-
-        "/ self assert:(aString at:index+3) codePoint >= 32.
-        sixBits := (aString at:index+3) codePoint bitAnd:16r3F.
-        n := (n bitShift:6) + sixBits.
-
-        index := index + 4.
-
-        "/ now have 24 bits in n
-
-        bytes at:dstIndex put:(n bitShift:-16).
-
-        dstIndex < stop ifTrue:[
-            bytes at:dstIndex+1 put:((n bitShift:-8) bitAnd:16rFF).
-            dstIndex+2 <= stop ifTrue:[
-                bytes at:dstIndex+2 put:(n bitAnd:16rFF).
-            ]
-        ].
-        dstIndex := dstIndex + 3.
+	"/ take 4 characters ...
+	"/ allow a line break before each group of 4
+	sixBits := (aString at:index) codePoint.
+	[sixBits < 32] whileTrue:[
+	    index := index + 1.
+	    sixBits := (aString at:index) codePoint.
+	].
+	sixBits := sixBits bitAnd:16r3F.
+	n := sixBits.
+
+	"/ self assert:(aString at:index+1) codePoint >= 32.
+	sixBits := (aString at:index+1) codePoint bitAnd:16r3F.
+	n := (n bitShift:6) + sixBits.
+
+	"/ self assert:(aString at:index+2) codePoint >= 32.
+	sixBits := (aString at:index+2) codePoint bitAnd:16r3F.
+	n := (n bitShift:6) + sixBits.
+
+	"/ self assert:(aString at:index+3) codePoint >= 32.
+	sixBits := (aString at:index+3) codePoint bitAnd:16r3F.
+	n := (n bitShift:6) + sixBits.
+
+	index := index + 4.
+
+	"/ now have 24 bits in n
+
+	bytes at:dstIndex put:(n bitShift:-16).
+
+	dstIndex < stop ifTrue:[
+	    bytes at:dstIndex+1 put:((n bitShift:-8) bitAnd:16rFF).
+	    dstIndex+2 <= stop ifTrue:[
+		bytes at:dstIndex+2 put:(n bitAnd:16rFF).
+	    ]
+	].
+	dstIndex := dstIndex + 3.
     ].
     ^ bytes
 
@@ -281,13 +283,13 @@
      ByteArray fromPackedString:((ByteArray new:64) asPackedString)
 
      0 to:256 do:[:l |
-        |orig copy|
-
-        0 to:255 do:[:fill |
-            orig := ByteArray new:l withAll:fill.
-            copy := ByteArray fromPackedString:(orig asPackedString).
-            self assert:(orig = copy).
-         ]
+	|orig copy|
+
+	0 to:255 do:[:fill |
+	    orig := ByteArray new:l withAll:fill.
+	    copy := ByteArray fromPackedString:(orig asPackedString).
+	    self assert:(orig = copy).
+	 ]
      ]
     "
 
@@ -1646,16 +1648,20 @@
 		 * aligned
 		 */
 		if (((INT)cp & (sizeof(int)-1)) == 0) {
-		    int __v;
+		    INT __v;
 
 		    if (__isSmallInteger(value)) {
-			((int *)cp)[0] = __intVal(value);
+			// how about a range check?
+			((int *)cp)[0] = (int)(__intVal(value));
 			RETURN (value);
 		    }
-		    if (__v = __signedLongIntVal(value)) {
-			((int *)cp)[0] = __v;
+# if __POINTER_SIZE__ == 4
+		    if ((__v = __signedLongIntVal(value)) != 0) {
+			// how about a range check?
+			((int *)cp)[0] = (int)(__v);
 			RETURN (value);
 		    }
+#endif
 		}
 	    }
 	}
@@ -2736,8 +2742,8 @@
     cls := self class.
 
     (cls == ByteArray or:[cls == ImmutableByteArray or:[cls == ExternalBytes]]) ifTrue:[
-        size := self size.
-        ^ (String uninitializedNew:size) replaceBytesFrom:1 to:size with:self startingAt:1.
+	size := self size.
+	^ (String uninitializedNew:size) replaceBytesFrom:1 to:size with:self startingAt:1.
     ].
     ^ super asString.
 
@@ -2773,12 +2779,12 @@
       |utf8Encoding original readBack|
 
       1 to:16rFFFF do:[:ascii |
-        original := (Character value:ascii) asString.
-        utf8Encoding := original utf8Encoded.
-        readBack := utf8Encoding utf8Decoded.
-        readBack = original ifFalse:[
-            self halt
-        ]
+	original := (Character value:ascii) asString.
+	utf8Encoding := original utf8Encoded.
+	readBack := utf8Encoding utf8Decoded.
+	readBack = original ifFalse:[
+	    self halt
+	]
       ]
     "
 !
@@ -2791,26 +2797,26 @@
     |in out c|
 
     self containsNon7BitAscii ifFalse:[
-        ^ self asSingleByteString
+	^ self asSingleByteString
     ].
 
     out := WriteStream on:(String uninitializedNew:self size * 3 // 2).
     in := self readStream.
     [in atEnd] whileFalse:[
-        c := Character utf8DecodeFrom:in.
-        c codePoint > 16rFF ifTrue:[
-            c := replacementCharacter
-        ].
-        out nextPut:c.
+	c := Character utf8DecodeFrom:in.
+	c codePoint > 16rFF ifTrue:[
+	    c := replacementCharacter
+	].
+	out nextPut:c.
     ].
     ^ out contents
 
     "
      (Character value:16r220) utf8Encoded
-        utf8DecodedWithTwoByteCharactersReplacedBy:(Character space)
+	utf8DecodedWithTwoByteCharactersReplacedBy:(Character space)
 
      (Character value:16r220) utf8Encoded asExternalBytes copyButLast
-        utf8DecodedWithTwoByteCharactersReplacedBy:(Character space)
+	utf8DecodedWithTwoByteCharactersReplacedBy:(Character space)
     "
 ! !
 
@@ -3235,6 +3241,80 @@
     "Created: / 3.4.1998 / 13:37:01 / cg"
 ! !
 
+!UninterpretedBytes methodsFor:'printing & storing'!
+
+hexPrintOn:aStream
+    "print as hex string, eg: 'FF0243'.
+     This string can be used in #fromHexString: to recreate the byteArray"
+
+    self hexPrintOn:aStream withSeparator:nil
+
+    "
+      #[1 2 3 4 10 17] hexPrintOn:Transcript
+    "
+
+    "
+     |s|
+     s := String streamContents:[:s | #[1 2 3 4 10 17] hexPrintOn:s].
+     ByteArray fromHexString:s
+    "
+!
+
+hexPrintOn:aStream withSeparator:aSeparatorStringOrCharacterOrNil
+    "print as hex string with separators, eg: 'FF:02:43'"
+
+    |first|
+
+    first := true.
+    1 to:self size do:[:idx |
+	aSeparatorStringOrCharacterOrNil notNil ifTrue:[
+	    first ifFalse:[
+		aSeparatorStringOrCharacterOrNil printOn:aStream
+	    ] ifTrue:[
+		first := false.
+	    ].
+	].
+	(self byteAt:idx) printOn:aStream base:16 size:2 fill:$0.
+    ].
+
+    "
+      #[1 2 3 4 10 17] hexPrintOn:Transcript withSeparator:$:
+      #[1 2 3 4 10 17] hexPrintOn:Transcript withSeparator:(Character space)
+      #[1 2 3 4 10 17] hexPrintOn:Transcript withSeparator:'-'
+      #[1 2 3 4 10 17] hexPrintOn:Transcript withSeparator:nil
+    "
+!
+
+hexPrintString
+    "print as hex string, eg: 'FF0243'.
+     This string can be used in #fromHexString: to recreate the byteArray"
+
+    ^ self hexPrintStringWithSeparator:nil
+
+    "
+     #[1 2 3 4 10 17] hexPrintString
+     ByteArray fromHexString:#[1 2 3 4 10 17] hexPrintString
+    "
+
+    "Modified: / 03-07-2010 / 01:59:19 / cg"
+!
+
+hexPrintStringWithSeparator:aSeparatorStringOrCharacterOrNil
+    "print as hex string, eg: 'FF:02:43'."
+
+    ^ String
+	streamContents:[:s |
+	    self hexPrintOn:s withSeparator:aSeparatorStringOrCharacterOrNil.
+	]
+
+    "
+      #[1 2 3 4 10 17] hexPrintStringWithSeparator:$:
+      #[1 2 3 4 10 17] hexPrintStringWithSeparator:Character space
+      #[1 2 3 4 10 17] hexPrintStringWithSeparator:' - '
+      #[1 2 3 4 10 17] hexPrintStringWithSeparator:nil
+    "
+! !
+
 !UninterpretedBytes methodsFor:'private'!
 
 slowReplaceBytesFrom:start to:stop with:sourceBytes startingAt:sourceIndex
@@ -3259,9 +3339,9 @@
 
     sz := self size.
     1 to:sz do:[:idx|
-        (self at:idx) > 16r7F ifTrue:[
-            ^ true.
-        ].
+	(self at:idx) > 16r7F ifTrue:[
+	    ^ true.
+	].
     ].
     ^ false.
 !
@@ -3275,14 +3355,14 @@
 
 %{ /* NOCONTEXT */
     if (__mkSmallInteger(0) == __ClassInstPtr(__qClass(self))->c_ninstvars) {
-        /* I am only bytes */
-        RETURN(false)
+	/* I am only bytes */
+	RETURN(false)
     }
 %}.
     ^ super referencesAny:aCollection
 
     "
-        'abc' referencesAny:#()
+	'abc' referencesAny:#()
     "
 !