Merged b882507b9fdf and 9a8afa1b41cb (branch default - CVS HEAD) jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 24 May 2013 18:52:05 +0100
branchjv
changeset 18060 3708e12e9aa8
parent 18059 b882507b9fdf (current diff)
parent 15265 9a8afa1b41cb (diff)
child 18061 2643e3012a13
Merged b882507b9fdf and 9a8afa1b41cb (branch default - CVS HEAD)
AbstractOperatingSystem.st
AutoDeletedFilename.st
Autoload.st
Behavior.st
Block.st
Character.st
Class.st
Context.st
ExternalBytes.st
ExternalStream.st
Filename.st
Float.st
GenericException.st
Integer.st
LargeInteger.st
LongFloat.st
Make.proto
Method.st
NoHandlerError.st
Object.st
ObjectMemory.st
QuerySignal.st
ReadStream.st
Signal.st
SmallInteger.st
Smalltalk.st
String.st
UnixOperatingSystem.st
Win32OperatingSystem.st
stx_libbasic.st
--- a/AbstractOperatingSystem.st	Tue May 21 21:58:09 2013 +0100
+++ b/AbstractOperatingSystem.st	Fri May 24 18:52:05 2013 +0100
@@ -2602,8 +2602,9 @@
 linkInfoOf:aPathName
     "return a dictionary filled with info for the file 'aPathName',
      IFF aPathName is a symbolic link.
-     If aPathName is invalid, or its NOT a symbolic link, nil is returned.
-     (which means, that systems like VMS or MSDOS always return nil here.)
+     If aPathName is invalid, nil is returned.
+     If aPathName is NOT a symbolic link, the #infoOf: aPathname itself is returned.
+     (which means, that systems like VMS or MSDOS always return the info here.)
 
      The contents of the dictionary gives info about the link itself,
      on contrast to #infoOf:, which returns the info of the pointed to file
@@ -7188,11 +7189,11 @@
 !AbstractOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.236 2013-05-05 13:44:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.237 2013-05-15 13:57:09 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.236 2013-05-05 13:44:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.237 2013-05-15 13:57:09 stefan Exp $'
 ! !
 
 
--- a/AutoDeletedFilename.st	Tue May 21 21:58:09 2013 +0100
+++ b/AutoDeletedFilename.st	Fri May 24 18:52:05 2013 +0100
@@ -48,7 +48,7 @@
                                                     [exBegin]
     |f p|
 
-    f := Filename newTemporary.
+    f := AutoDeletedFilename newTemporary.
     f writeStream
         nextPutLine:'hello';
         close.
@@ -137,5 +137,6 @@
 !AutoDeletedFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AutoDeletedFilename.st,v 1.8 2012-11-06 17:47:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AutoDeletedFilename.st,v 1.9 2013-05-15 10:25:11 stefan Exp $'
 ! !
+
--- a/Autoload.st	Tue May 21 21:58:09 2013 +0100
+++ b/Autoload.st	Fri May 24 18:52:05 2013 +0100
@@ -721,6 +721,23 @@
     ^ false
 !
 
+handles:anException
+    "redefined to avoid recursive autoload.
+     (#autoload eventually raises QueryExceptions.
+      These exception may send #handles: to exception classes
+      that are currently being loaded)"
+
+    |newClass|
+
+    self isBeingLoaded ifFalse:[
+        newClass := self autoload.
+        newClass notNil ifTrue:[
+            ^ newClass handles:anException
+        ].
+    ].
+    ^ false
+!
+
 isBehavior
     "return true, if the receiver is describing another objects behavior.
      Autoloaded classes are definitely; therefore return true."
@@ -810,11 +827,11 @@
 !Autoload class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.164 2013-04-03 19:57:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.165 2013-05-13 13:41:06 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.164 2013-04-03 19:57:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.165 2013-05-13 13:41:06 stefan Exp $'
 ! !
 
 
--- a/Behavior.st	Tue May 21 21:58:09 2013 +0100
+++ b/Behavior.st	Fri May 24 18:52:05 2013 +0100
@@ -2121,114 +2121,114 @@
      * (i.e. if no GC is needed, we fall through without a branch)
      */
     if (nextPtr < (char *)__newEndPtr) {
-        _objPtr(newobj)->o_size = instsize;
-        /* o_allFlags(newobj) = 0;              */
-        /* _objPtr(newobj)->o_space = __newSpace; */
-        o_setAllFlags(newobj, __newSpace);
+	__objPtr(newobj)->o_size = instsize;
+	/* o_allFlags(newobj) = 0;              */
+	/* __objPtr(newobj)->o_space = __newSpace; */
+	o_setAllFlags(newobj, __newSpace);
 #ifdef __HAS_ALIGN4__
-        /*
-         * if the alignment is 4, we are already sat,
-         * since a non-indexed object always has a word-aligned size.
-         */
-        __newNextPtr = nextPtr;
+	/*
+	 * if the alignment is 4, we are already sat,
+	 * since a non-indexed object always has a word-aligned size.
+	 */
+	__newNextPtr = nextPtr;
 #else
-        if (instsize & (__ALIGN__-1)) {
-            __newNextPtr = (char *)newobj + (instsize & ~(__ALIGN__-1)) + __ALIGN__;
-        } else {
-            __newNextPtr = nextPtr;
-        }
+	if (instsize & (__ALIGN__-1)) {
+	    __newNextPtr = (char *)newobj + (instsize & ~(__ALIGN__-1)) + __ALIGN__;
+	} else {
+	    __newNextPtr = nextPtr;
+	}
 #endif
 
 ok:
-        __InstPtr(newobj)->o_class = self;
-        __qSTORE(newobj, self);
-
-        if (nInstVars) {
+	__InstPtr(newobj)->o_class = self;
+	__qSTORE(newobj, self);
+
+	if (nInstVars) {
 #if defined(memset4) && defined(FAST_OBJECT_MEMSET4) || defined(FAST_MEMSET4)
-            memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
+	    memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
 #else
-            REGISTER OBJ *op = __InstPtr(newobj)->i_instvars;
-
-            /*
-             * knowing that nil is 0
-             */
+	    REGISTER OBJ *op = __InstPtr(newobj)->i_instvars;
+
+	    /*
+	     * knowing that nil is 0
+	     */
 # if defined(FAST_OBJECT_MEMSET_DOUBLES_UNROLLED)
-            if (nInstVars > 8) {
-                *op++ = nil;    /* for alignment */
-                nInstVars--;
-                while (nInstVars >= 8) {
-                    *(double *)op = 0.0;
-                    ((double *)op)[1] = 0.0;
-                    ((double *)op)[2] = 0.0;
-                    ((double *)op)[3] = 0.0;
-                    op += 8;
-                    nInstVars -= 8;
-                }
-            }
-            while (nInstVars != 0) {
-                *op++ = 0;
-                nInstVars--;
-            }
+	    if (nInstVars > 8) {
+		*op++ = nil;    /* for alignment */
+		nInstVars--;
+		while (nInstVars >= 8) {
+		    *(double *)op = 0.0;
+		    ((double *)op)[1] = 0.0;
+		    ((double *)op)[2] = 0.0;
+		    ((double *)op)[3] = 0.0;
+		    op += 8;
+		    nInstVars -= 8;
+		}
+	    }
+	    while (nInstVars != 0) {
+		*op++ = 0;
+		nInstVars--;
+	    }
 # else
 #  if defined(FAST_OBJECT_MEMSET_LONGLONG_UNROLLED)
-            if (nInstVars > 8) {
-                *op++ = nil;    /* for alignment */
-                nInstVars--;
-                while (nInstVars >= 8) {
-                    *(long long *)op = 0;
-                    ((long long *)op)[1] = 0;
-                    ((long long *)op)[2] = 0;
-                    ((long long *)op)[3] = 0;
-                    op += 8;
-                    nInstVars -= 8;
-                }
-            }
-            while (nInstVars != 0) {
-                *op++ = 0;
-                nInstVars--;
-            }
+	    if (nInstVars > 8) {
+		*op++ = nil;    /* for alignment */
+		nInstVars--;
+		while (nInstVars >= 8) {
+		    *(long long *)op = 0;
+		    ((long long *)op)[1] = 0;
+		    ((long long *)op)[2] = 0;
+		    ((long long *)op)[3] = 0;
+		    op += 8;
+		    nInstVars -= 8;
+		}
+	    }
+	    while (nInstVars != 0) {
+		*op++ = 0;
+		nInstVars--;
+	    }
 
 #  else
 #   if defined(FAST_OBJECT_MEMSET_WORDS_UNROLLED)
-            while (nInstVars >= 8) {
-                *op = nil;
-                *(op+1) = nil;
-                *(op+2) = nil;
-                *(op+3) = nil;
-                *(op+4) = nil;
-                *(op+5) = nil;
-                *(op+6) = nil;
-                *(op+7) = nil;
-                op += 8;
-                nInstVars -= 8;
-            }
-            while (nInstVars != 0) {
-                *op++ = nil;
-                nInstVars--;
-            }
+	    while (nInstVars >= 8) {
+		*op = nil;
+		*(op+1) = nil;
+		*(op+2) = nil;
+		*(op+3) = nil;
+		*(op+4) = nil;
+		*(op+5) = nil;
+		*(op+6) = nil;
+		*(op+7) = nil;
+		op += 8;
+		nInstVars -= 8;
+	    }
+	    while (nInstVars != 0) {
+		*op++ = nil;
+		nInstVars--;
+	    }
 #   else
 #    if defined(FAST_MEMSET)
-            memset(__InstPtr(newobj)->i_instvars, 0, instsize-OHDR_SIZE);
+	    memset(__InstPtr(newobj)->i_instvars, 0, instsize-OHDR_SIZE);
 #    else
-            while (nInstVars >= 8) {
-                nInstVars -= 8;
-                op[0] = nil; op[1] = nil;
-                op[2] = nil; op[3] = nil;
-                op[4] = nil; op[5] = nil;
-                op[6] = nil; op[7] = nil;
-                op += 8;
-            }
-            while (nInstVars != 0) {
-                *op++ = nil;
-                nInstVars--;
-            }
+	    while (nInstVars >= 8) {
+		nInstVars -= 8;
+		op[0] = nil; op[1] = nil;
+		op[2] = nil; op[3] = nil;
+		op[4] = nil; op[5] = nil;
+		op[6] = nil; op[7] = nil;
+		op += 8;
+	    }
+	    while (nInstVars != 0) {
+		*op++ = nil;
+		nInstVars--;
+	    }
 #    endif
 #   endif
 #  endif
 # endif
 #endif
-        }
-        RETURN ( newobj );
+	}
+	RETURN ( newobj );
     }
 
     /*
@@ -4982,10 +4982,10 @@
 !Behavior class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.342 2013-05-08 07:54:34 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.343 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.342 2013-05-08 07:54:34 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.343 2013-05-21 20:44:47 cg Exp $'
 ! !
 
--- a/Block.st	Tue May 21 21:58:09 2013 +0100
+++ b/Block.st	Fri May 24 18:52:05 2013 +0100
@@ -663,6 +663,7 @@
     "Created: / 28-08-2010 / 14:41:15 / cg"
 ! !
 
+
 !Block methodsFor:'accessing'!
 
 home
@@ -2481,13 +2482,12 @@
 
 valueWithRestart
     "the receiver must be a block of one argument.  It is evaluated, and is passed a block,
-     which, if sent a value-message, will restart the receiver block fro mthe beginning"
-
-    |myContext restartAction|
+     which, if sent a value-message, will restart the receiver block from the beginning"
+
+    |myContext|
 
     myContext := thisContext.
-    restartAction := [ myContext restart ].
-    ^ self value:restartAction.
+    ^ self value:[ myContext restart ].
 
     "
      [:restart |
@@ -2504,11 +2504,10 @@
     "the receiver must be a block of two arguments, a restart and an exit block.
      See description of valueWithExit and valueWithRestart for their use"
 
-    |myContext restartAction|
+    |myContext|
 
     myContext := thisContext.
-    restartAction := [ myContext restart ].
-    ^ self value:restartAction value:[:exitValue | ^exitValue].
+    ^ self value:[myContext restart] value:[:exitValue | ^exitValue].
 
     "
      [:restart :exit |
@@ -3119,11 +3118,11 @@
 !Block class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.195 2013-04-19 09:36:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.196 2013-05-13 19:21:34 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.195 2013-04-19 09:36:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.196 2013-05-13 19:21:34 stefan Exp $'
 ! !
 
 
--- a/Character.st	Tue May 21 21:58:09 2013 +0100
+++ b/Character.st	Fri May 24 18:52:05 2013 +0100
@@ -979,7 +979,7 @@
     OBJ s;
     unsigned INT val;
 
-    val = __intVal(_characterVal(self));
+    val = __intVal(__characterVal(self));
     if (val <= 0xFF) {
 	buffer[0] = (char) val;
 	buffer[1] = '\0';
@@ -2815,9 +2815,9 @@
 !Character class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.145 2013-01-23 10:46:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.146 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.145 2013-01-23 10:46:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.146 2013-05-21 20:44:47 cg Exp $'
 ! !
--- a/Class.st	Tue May 21 21:58:09 2013 +0100
+++ b/Class.st	Fri May 24 18:52:05 2013 +0100
@@ -1880,7 +1880,6 @@
     "Created: / 18-07-2011 / 09:14:38 / cg"
 ! !
 
-
 !Class methodsFor:'adding & removing'!
 
 removeFromSystem
@@ -3807,25 +3806,21 @@
 !
 
 extensions
-    "return a collection of extension-methods from any package, or empty if there are none."
-
-    |extensions classPackage|
+    "return a collection of extension-methods from any other package, or empty if there are none.
+     Unassigned methods are ignored"
+
+    |classPackage defaultPkg|
 
     classPackage := self package.
-    self instAndClassMethodsDo:[:mthd |
-	mthd package ~= classPackage ifTrue:[
-	    extensions isNil ifTrue:[
-		extensions := OrderedCollection new.
-	    ].
-	    extensions add:mthd
-	].
-    ].
-    ^ extensions ? #()
+    defaultPkg := PackageId noProjectID.
+    ^ self methodsForWhich:[:mthd | mthd package ~= classPackage and:[ mthd package ~= defaultPkg ]]
 
     "
      CType extensions
      Rectangle extensions
      Rectangle hasExtensions
+     Object extensions
+     Object hasExtensions
     "
 
     "Created: / 12-10-2006 / 18:29:51 / cg"
@@ -3835,18 +3830,8 @@
 extensionsFrom:aPackageID
     "return the set of extension-methods from the given package."
 
-    |extensions|
-
     aPackageID = self package ifTrue:[^ #() ].
-    self instAndClassMethodsDo:[:mthd |
-	mthd package = aPackageID ifTrue:[
-	    extensions isNil ifTrue:[
-		extensions := OrderedCollection new.
-	    ].
-	    extensions add:mthd
-	].
-    ].
-    ^ extensions ? #()
+    ^ self methodsForWhich:[:mthd | mthd package = aPackageID]
 
     "
      CType extensionsFrom:#'bosch:dapasx'
@@ -3864,28 +3849,29 @@
     "return true, if there are methods in the receiver, which belong to
      a different package (i.e. package of class ~= package of method).
      Those are class extensions, which must be treated specially when checking classes
-     into the sourceCode repository. (extensions are stored separate)"
+     into the sourceCode repository. (extensions are stored separate).
+     Unassigned extensions are ignored here (i.e. as yet unpackaged changes)"
 
     |clsPkg defaultPkg|
 
     defaultPkg := PackageId noProjectID.
     clsPkg := self package.
     self instAndClassMethodsDo:[:mthd |
-	|mthdPkg|
-	(((mthdPkg := mthd package) ~= clsPkg) and:[ mthdPkg ~= defaultPkg ]) ifTrue:[^ true ].
+        |mthdPkg|
+        (((mthdPkg := mthd package) ~= clsPkg) and:[ mthdPkg ~= defaultPkg ]) ifTrue:[^ true ].
     ].
     ^ false
 
     "
      Time millisecondsToRun:[
-	Smalltalk allClasses select:[:each | each hasExtensions]
+        Smalltalk allClasses select:[:each | each hasExtensions]
      ]. 190 130 260
 
      Dictionary
-	withAssociations:
-	    (Smalltalk allClasses
-		select:[:each | each hasExtensions]
-		thenCollect:[:each | each -> each extensions])
+        withAssociations:
+            (Smalltalk allClasses
+                select:[:each | each hasExtensions]
+                thenCollect:[:each | each -> each extensions])
     "
 
     "Modified: / 05-03-2007 / 17:06:20 / cg"
@@ -3917,6 +3903,25 @@
     "Modified: / 06-03-2007 / 11:55:39 / cg"
 !
 
+hasUnassignedExtensions
+    "return true, if there are methods in the receiver, which have not been
+     assigned to any package."
+
+    ^ self unassignedExtensions notEmpty
+
+    "
+     Time millisecondsToRun:[
+        Smalltalk allClasses select:[:each | each hasUnassignedExtensions]
+     ]. 190 130 260
+
+     Dictionary
+        withAssociations:
+            (Smalltalk allClasses
+                select:[:each | each hasUnassignedExtensions]
+                thenCollect:[:each | each -> each unassignedExtensions])
+    "
+!
+
 hasUnsavedChanges
     "return true, if there are changes for this class in the current changeSet"
 
@@ -3976,6 +3981,22 @@
     ^ self theMetaclass includesSelector:#start
 !
 
+methodsForWhich:aFilter
+    "return a collection of methods for which aFilter returns true"
+
+    |matching|
+
+    self instAndClassMethodsDo:[:mthd |
+        (aFilter value:mthd) ifTrue:[
+            matching isNil ifTrue:[
+                matching := OrderedCollection new.
+            ].
+            matching add:mthd
+        ].
+    ].
+    ^ matching ? #()
+!
+
 packageDirectory
     "return the packageDirectory of this classes package.
      That is usually the directory where my source is, and where package specific additional
@@ -4008,6 +4029,20 @@
     "Modified: 18.4.1997 / 20:55:34 / cg"
 !
 
+unassignedExtensions
+    "return a collection of methods which have not been assigned to any
+     any package, or empty if there are none."
+
+    |noPackage|
+
+    noPackage := PackageId noProjectID.
+    ^ self methodsForWhich:[:mthd | mthd package == noPackage ]
+
+    "
+     SchemeBoolean unassignedExtensions
+    "
+!
+
 wasAutoloaded
     "return true, if this class came into the system via an
      autoload; false otherwise.
@@ -5631,14 +5666,14 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.624 2013-04-25 13:09:55 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.625 2013-05-16 23:41:48 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.624 2013-04-25 13:09:55 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.625 2013-05-16 23:41:48 cg Exp $'
 !
 
 version_SVN
-    ^ '§ Id: Class.st 10643 2011-06-08 21:53:07Z vranyj1  §'
+    ^ '$ Id: Class.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !
 
--- a/Context.st	Tue May 21 21:58:09 2013 +0100
+++ b/Context.st	Fri May 24 18:52:05 2013 +0100
@@ -718,12 +718,12 @@
         if (! __isNonLIFO(theContext)) {
             /*
              * to be prepared for the worst situation
-             * (the sender is not stored, so the trap wont catch it)
+             * (the sender is not stored, so the trap won't catch it)
              * make the writeBarrier trigger manually.
              * We'll see, if this is really required.
              */
             theContext->o_space |= CATCHMARK;
-            _markNonLIFO(theContext);
+            __markNonLIFO(theContext);
         }
     }
     RETURN (theContext);
@@ -1953,7 +1953,7 @@
                  */
                 theContext->o_space |= CATCHMARK;
 #if 0
-                _markNonLIFO(theContext);
+                __markNonLIFO(theContext);
 #endif
             }
             RETURN (theContext);
@@ -2015,12 +2015,12 @@
             if (! __isNonLIFO(theContext)) {
                 /*
                  * to be prepared for the worst situation
-                 * (the sender is not stored, so the trap wont catch it)
+                 * (the sender is not stored, so the trap won't catch it)
                  * make the writeBarrier trigger manually.
                  * We'll see, if this is really required.
                  */
                 theContext->o_space |= CATCHMARK;
-                _markNonLIFO(theContext);
+                __markNonLIFO(theContext);
             }
             RETURN (theContext);
         }
@@ -2080,13 +2080,13 @@
             if (! __isNonLIFO(theContext)) {
                 /*
                  * to be prepared for the worst situation
-                 * (the sender is not stored, so the trap wont catch it)
+                 * (the sender is not stored, so the trap won't catch it)
                  * make the writeBarrier trigger manually.
                  * We'll see, if this is really required.
                  */
                 theContext->o_space |= CATCHMARK;
 #if 0
-                _markNonLIFO(theContext);
+                __markNonLIFO(theContext);
 #endif
             }
             RETURN (theContext);
@@ -2147,7 +2147,7 @@
                  */
                 theContext->o_space |= CATCHMARK;
 #if 0
-                _markNonLIFO(theContext);
+                __markNonLIFO(theContext);
 #endif
             }
             RETURN (theContext);
@@ -2477,15 +2477,15 @@
 !Context class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.181 2013-04-15 15:28:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.182 2013-05-10 18:46:37 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.181 2013-04-15 15:28:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.182 2013-05-10 18:46:37 stefan Exp $'
 !
 
 version_SVN
-    ^ '§ Id: Context.st 10643 2011-06-08 21:53:07Z vranyj1  §'
+    ^ '$ Id: Context.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !
 
 
--- a/ExternalBytes.st	Tue May 21 21:58:09 2013 +0100
+++ b/ExternalBytes.st	Fri May 24 18:52:05 2013 +0100
@@ -699,7 +699,7 @@
     if (__isSmallInteger(value)) {
 	val = __smallIntegerVal(value);
     } else if (__isCharacter(value)) {
-	val = __smallIntegerVal(_characterVal(value));
+	val = __smallIntegerVal(__characterVal(value));
     } else
 	goto badArg;
 
@@ -1316,11 +1316,11 @@
 !ExternalBytes class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.88 2013-03-29 15:06:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.89 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.88 2013-03-29 15:06:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.89 2013-05-21 20:44:47 cg Exp $'
 ! !
 
 
--- a/ExternalStream.st	Tue May 21 21:58:09 2013 +0100
+++ b/ExternalStream.st	Fri May 24 18:52:05 2013 +0100
@@ -3204,6 +3204,34 @@
 
 !ExternalStream methodsFor:'non homogenous reading'!
 
+next:count into:anObject startingAt:start
+    "read the next count bytes into an object and return the number of
+     bytes read or the number of bytes read, if EOF is encountered before.
+     If the receiver is some socket/pipe-like stream, an exception
+     is raised if the connection is broken.
+
+     Warning: if used with a pipe/socket, this blocks until the requested number
+     of bytes have been read. See #nextAvailableBytes:into:startingAt:
+     to only read whats there.
+
+     Notice, that in contrast to other methods,
+     this does NOT return nil on EOF, but the actual count.
+     Thus allowing read of partial blocks.
+
+     The object must have non-pointer indexed instvars
+     (i.e. it must be a ByteArray, String, Float- or DoubleArray),
+     or an externalBytes object (with known size).
+     If anObject is a string or byteArray and reused, this provides the
+     fastest possible physical I/O (since no new objects are allocated).
+
+     Use with care - non object oriented I/O.
+     Warning: in general, you cannot use this method to pass data from other
+     architectures (unless you prepared the buffer with care),
+     since it does not care for byte order or float representation."
+
+    ^ self nextBytes:count into:anObject startingAt:start
+!
+
 nextAvailable:count
     "return the next count elements of the stream as aCollection.
      If the stream reaches the end before count elements have been read,
@@ -5735,11 +5763,11 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.361 2013-03-11 09:48:06 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.362 2013-05-15 21:49:08 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.361 2013-03-11 09:48:06 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.362 2013-05-15 21:49:08 cg Exp $'
 ! !
 
 
--- a/Filename.st	Tue May 21 21:58:09 2013 +0100
+++ b/Filename.st	Fri May 24 18:52:05 2013 +0100
@@ -1400,14 +1400,9 @@
 
 separator
     "return the file/directory separator.
-     This is to be redefined in concrete classes;
-     the following default usually leads to a flat view of
-     the fileSystem (huh - BS2000 ?)"
-
-    self isAbstract ifTrue:[
-       ^ ConcreteClass separator
-    ].
-    ^ $_
+     This is to be redefined in concrete classes."
+
+   ^ ConcreteClass separator
 
     "
      Filename separator
@@ -3076,6 +3071,7 @@
                 f := self construct:aFilenameString.
                 Error handle:[:ex |
                     f isDirectory ifFalse:[ ex reject ].
+
                     f recursiveRemoveAll.
                     f removeDirectory
                 ] do:[
@@ -3112,8 +3108,9 @@
      This one walks down the directory hierarchy, not using any OS
      command to do the remove."
 
-    self recursiveRemoveAll.
-    self remove
+    self 
+        recursiveRemoveAll;
+        remove.
 
     "
      'foo' asFilename makeDirectory.
@@ -3142,8 +3139,6 @@
         linkInfo := self linkInfo.
         (linkInfo notNil and:[linkInfo isDirectory]) ifTrue:[
             ok := OperatingSystem removeDirectory:osName
-"/        ] ifFalse:[
-"/            ok := OperatingSystem removeFile:osName
         ].
         ok ifFalse:[
             self exists ifTrue:[
@@ -5931,11 +5926,11 @@
 !Filename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.393 2013-05-07 15:29:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.396 2013-05-15 17:28:19 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.393 2013-05-07 15:29:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.396 2013-05-15 17:28:19 stefan Exp $'
 ! !
 
 
--- a/Float.st	Tue May 21 21:58:09 2013 +0100
+++ b/Float.st	Fri May 24 18:52:05 2013 +0100
@@ -191,12 +191,12 @@
     In contrast to ShortFloats (32bit) and LongFloats (>=64bit).
 
     WARNING:
-        The layout of Float instances is known by the runtime system and the compiler;
-        you may not add instance variables here.
-        Also, subclassing is complicated by the fact, that the VM creates floats/shortFloats,
-        and does some float-checks by an identity compare with the Float-class.
-        (i.e. your subclasses instances may not be recognized as float-like objects,
-         thus mixed mode arithmetic will always coerce them, effectively slowing things down).
+	The layout of Float instances is known by the runtime system and the compiler;
+	you may not add instance variables here.
+	Also, subclassing is complicated by the fact, that the VM creates floats/shortFloats,
+	and does some float-checks by an identity compare with the Float-class.
+	(i.e. your subclasses instances may not be recognized as float-like objects,
+	 thus mixed mode arithmetic will always coerce them, effectively slowing things down).
 
     Notice, that Floats are defined as Byte-array to prevent the garbage collector
     from going into the value ... otherwise I needed a special case in many places.
@@ -214,29 +214,29 @@
     instances.
 
     Mixed mode arithmetic:
-        float op float       -> float
-        float op fix         -> float
-        float op fraction    -> float
-        float op integer     -> float
-        float op shortFloat  -> float
-        float op longFloat   -> longFloat
-        float op complex     -> complex
+	float op float       -> float
+	float op fix         -> float
+	float op fraction    -> float
+	float op integer     -> float
+	float op shortFloat  -> float
+	float op longFloat   -> longFloat
+	float op complex     -> complex
 
     Representation:
-            64bit double precision IEE floats
-            53 bit mantissa,
-            11 bit exponent,
-            15 decimal digits (approx)
+	    64bit double precision IEE floats
+	    53 bit mantissa,
+	    11 bit exponent,
+	    15 decimal digits (approx)
 
     Range and Precision of Storage Formats: see LimitedPrecisionReal >> documentation
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [see also:]
-        Number
-        ShortFloat LongFloat Fraction FixedPoint Integer Complex
-        FloatArray DoubleArray
+	Number
+	ShortFloat LongFloat Fraction FixedPoint Integer Complex
+	FloatArray DoubleArray
 "
 !
 
@@ -342,8 +342,8 @@
 %{  /* NOCONTEXT */
 
     REGISTER union {
-        unsigned int    i;
-        float           f;
+	unsigned int    i;
+	float           f;
     } r;
 
     r.i = __unsignedLongIntVal( anInteger );
@@ -2229,7 +2229,7 @@
 
     val = __floatVal(self);
 
-# ifdef WIN32 /* dont know (yet) how to suppress the warnBox opened by win32 */
+# ifdef WIN32 /* don't know (yet) how to suppress the warnBox opened by win32 */
     if (val >= 1.0)
 # endif
     {
@@ -2318,7 +2318,7 @@
 
     val = __floatVal(self);
 
-# ifdef WIN32 /* dont know (yet) how to suppress the warnBox opened by win32 */
+# ifdef WIN32 /* don't know (yet) how to suppress the warnBox opened by win32 */
     if (val >= 1.0)
 # endif
     {
@@ -2442,12 +2442,15 @@
 
     __threadErrno = 0;
     val = __floatVal(self);
-# ifdef WIN32 /* dont know (yet) how to suppress the warnBox opened by win32 */
+# ifdef WIN32 /* don't know (yet) how to suppress the warnBox opened by win32 */
     if ((val >= -1.0) && (val <= 1.0))
 # endif
     {
 	rslt = atanh(__floatVal(self));
 	if (! isnan(rslt))  /* Currently all our systems support isnan() */
+#ifdef __osx__
+	if (! isinf(rslt))
+#endif
 	{
 	    if (__threadErrno == 0) {
 		__qMKFLOAT(newFloat, rslt);
@@ -2901,11 +2904,11 @@
 !Float class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.195 2013-03-31 20:45:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.196 2013-05-21 20:45:30 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.195 2013-03-31 20:45:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.196 2013-05-21 20:45:30 cg Exp $'
 ! !
 
 
--- a/GenericException.st	Tue May 21 21:58:09 2013 +0100
+++ b/GenericException.st	Fri May 24 18:52:05 2013 +0100
@@ -12,11 +12,11 @@
 "{ Package: 'stx:libbasic' }"
 
 Object subclass:#GenericException
-    instanceVariableNames: 'signal parameter messageText suspendedContext raiseContext
+	instanceVariableNames:'signal parameter messageText suspendedContext raiseContext
 		handlerContext rejected originator proceedable'
-    classVariableNames: 'StrictRaising'
-    poolDictionaries: ''
-    category: 'Kernel-Exceptions'
+	classVariableNames:'StrictRaising'
+	poolDictionaries:''
+	category:'Kernel-Exceptions'
 !
 
 GenericException class instanceVariableNames:'NotifierString'
@@ -169,7 +169,6 @@
 "
 ! !
 
-
 !GenericException class methodsFor:'initialization'!
 
 initialize
@@ -180,13 +179,12 @@
     "Modified: / 17-11-2010 / 17:53:13 / cg"
 ! !
 
-
 !GenericException class methodsFor:'instance creation'!
 
 new
     "{ Pragma: +inlineNew }"
 
-    ^ self basicNew setSignal:self.
+    ^ self basicNew creator:self.
 
     "Modified: / 23.7.1999 / 13:53:12 / stefan"
     "Created: / 24.7.1999 / 13:21:13 / stefan"
@@ -195,13 +193,12 @@
 newException
     "{ Pragma: +inlineNew }"
 
-    ^ self basicNew setSignal:self.
+    ^ self basicNew creator:self.
 
     "Created: / 23.7.1999 / 13:45:49 / stefan"
     "Modified: / 24.7.1999 / 13:21:25 / stefan"
 ! !
 
-
 !GenericException class methodsFor:'Compatibility-Squeak'!
 
 signal
@@ -213,7 +210,6 @@
     "Created: / 20-11-2006 / 14:00:09 / cg"
 ! !
 
-
 !GenericException class methodsFor:'accessing'!
 
 errorString
@@ -239,7 +235,6 @@
     NotifierString := aString
 ! !
 
-
 !GenericException class methodsFor:'backward compatibility'!
 
 abortingEmergencyHandler
@@ -291,7 +286,6 @@
     ^ NoHandlerError notifyingEmergencyHandlerForUserProcesses
 ! !
 
-
 !GenericException class methodsFor:'child signal creation'!
 
 newSignal
@@ -325,7 +319,6 @@
     "Created: / 23.7.1999 / 20:12:43 / stefan"
 ! !
 
-
 !GenericException class methodsFor:'converting'!
 
 , anExceptionHandler
@@ -334,7 +327,6 @@
     ^ SignalSet with:self with:anExceptionHandler
 ! !
 
-
 !GenericException class methodsFor:'misc ui support'!
 
 iconInBrowserSymbol
@@ -343,7 +335,6 @@
     ^ #exceptionClassBrowserIcon
 ! !
 
-
 !GenericException class methodsFor:'printing'!
 
 description
@@ -381,7 +372,6 @@
     "Created: / 10-02-2011 / 12:28:51 / cg"
 ! !
 
-
 !GenericException class methodsFor:'queries'!
 
 accepts:aSignal
@@ -537,7 +527,6 @@
     "Modified: / 23.7.1999 / 16:15:38 / stefan"
 ! !
 
-
 !GenericException class methodsFor:'raising'!
 
 raise
@@ -876,7 +865,6 @@
     self raiseErrorString:messageText
 ! !
 
-
 !GenericException class methodsFor:'save evaluation'!
 
 catch:aBlock
@@ -1063,7 +1051,6 @@
     "Modified: / 07-12-2006 / 17:05:35 / cg"
 ! !
 
-
 !GenericException class methodsFor:'testing'!
 
 isControlInterrupt
@@ -1108,7 +1095,6 @@
     "Modified: / 23.7.1999 / 14:50:11 / stefan"
 ! !
 
-
 !GenericException methodsFor:'Compatibility-ANSI'!
 
 pass
@@ -1140,7 +1126,6 @@
     ^ self raise
 ! !
 
-
 !GenericException methodsFor:'Compatibility-Dolphin'!
 
 stackTrace:numberOfFrames
@@ -1167,14 +1152,12 @@
     "
 ! !
 
-
 !GenericException methodsFor:'Compatibility-Squeak'!
 
 signalerContext
     ^ self suspendedContext
 ! !
 
-
 !GenericException methodsFor:'Compatibility-V''Age'!
 
 exitWith:value
@@ -1183,7 +1166,6 @@
     "Created: / 28-08-2010 / 14:43:23 / cg"
 ! !
 
-
 !GenericException methodsFor:'accessing'!
 
 catchInDebugger
@@ -1408,7 +1390,9 @@
      Warning and notice: in ANSI, signal means: raise;
      here and in old VW, it is the accessor to create.
      This will change in the near future; please use #creator to get
-     the creator."
+     the creator. Marked as obsolete, until the change is done!!"
+
+    self obsoleteMethodWarning:'meaning of #signal will change. Use #creator'.
 
     ^ signal ? self class
 
@@ -1437,7 +1421,6 @@
     "Modified: / 2.3.1998 / 12:20:43 / stefan"
 ! !
 
-
 !GenericException methodsFor:'copying'!
 
 postCopy
@@ -1456,7 +1439,6 @@
     "Created: / 2.3.1998 / 12:30:06 / stefan"
 ! !
 
-
 !GenericException methodsFor:'default actions'!
 
 defaultAction
@@ -1526,7 +1508,6 @@
           in:suspendedContext.
 ! !
 
-
 !GenericException methodsFor:'default values'!
 
 defaultResumeValue
@@ -1537,7 +1518,6 @@
     ^ nil
 ! !
 
-
 !GenericException methodsFor:'handler actions'!
 
 exit
@@ -1817,8 +1797,18 @@
     |con|
 
     con := handlerContext.
+    "/ cg: moving the following clearing of the handlerContext
+    "/ to before the evalUnwindActions allows for the exception
+    "/ to be handled during the unwind.
+    "/ It can be discussed, whether this is correct or not;
+    "/ I think, that the unwind actions should behave just the same as
+    "/ when a normal return is done. As unwind actions are called,
+    "/ these are unmarkedForUnwind anyway, so there should be no danger
+    "/ for endless recursion here... (i.e. each unwind action can at most
+    "/ reraise that exception once).
+    handlerContext := suspendedContext := raiseContext := nil.
     thisContext evaluateUnwindActionsUpTo:con.
-    handlerContext := suspendedContext := raiseContext := nil.
+    "/ handlerContext := suspendedContext := raiseContext := nil.
     con return:(self defaultReturnValue)
 
     "Modified: / 7.9.2001 / 13:29:34 / cg"
@@ -1830,8 +1820,18 @@
     |con|
 
     con := handlerContext.
+    "/ cg: moving the following clearing of the handlerContext
+    "/ to before the evalUnwindActions allows for the exception
+    "/ to be handled during the unwind.
+    "/ It can be discussed, whether this is correct or not;
+    "/ I think, that the unwind actions should behave just the same as
+    "/ when a normal return is done. As unwind actions are called,
+    "/ these are unmarkedForUnwind anyway, so there should be no danger
+    "/ for endless recursion here... (i.e. each unwind action can at most
+    "/ reraise that exception once).
+    handlerContext := suspendedContext := raiseContext := nil.
     thisContext evaluateUnwindActionsUpTo:con.
-    handlerContext := suspendedContext := raiseContext := nil.
+    "/ handlerContext := suspendedContext := raiseContext := nil.
     con return:value.
 
     "Modified: 27.3.1997 / 16:46:51 / cg"
@@ -1845,8 +1845,18 @@
     |con|
 
     con := handlerContext.
+    "/ cg: moving the following clearing of the handlerContext
+    "/ to before the evalUnwindActions allows for the exception
+    "/ to be handled during the unwind.
+    "/ It can be discussed, whether this is correct or not;
+    "/ I think, that the unwind actions should behave just the same as
+    "/ when a normal return is done. As unwind actions are called,
+    "/ these are unmarkedForUnwind anyway, so there should be no danger
+    "/ for endless recursion here... (i.e. each unwind action can at most
+    "/ reraise that exception once).
+    handlerContext := suspendedContext := raiseContext := nil.
     thisContext evaluateUnwindActionsUpTo:con.
-    handlerContext := suspendedContext := raiseContext := nil.
+    "/ handlerContext := suspendedContext := raiseContext := nil.
     con returnDoing:aBlock
 
     "
@@ -1864,7 +1874,6 @@
     self return:value
 ! !
 
-
 !GenericException methodsFor:'printing & storing'!
 
 description
@@ -1906,7 +1915,6 @@
     aStream nextPutAll:self description
 ! !
 
-
 !GenericException methodsFor:'private'!
 
 checkProceedable
@@ -2061,7 +2069,6 @@
     "Modified: / 10-08-2010 / 09:26:14 / cg"
 ! !
 
-
 !GenericException methodsFor:'raising'!
 
 raise
@@ -2278,17 +2285,17 @@
     "Created: / 10-08-2010 / 09:50:54 / cg"
 ! !
 
-
 !GenericException methodsFor:'setup'!
 
-setSignal:aSignal
+creator:aSignal
     "set the fields usable for inspection by the handler
-     - only to be sent from the signal when raising.
-     CG: added this one to avoid confusion with dolphin signal: (which raises the ex)"
+     - only to be sent from the signal when raising."
 
     signal := aSignal.
 !
 
+
+
 suspendedContext:sContext errorString:aString
     "set required fields
      - only to be sent from the signal when raising"
@@ -2327,7 +2334,6 @@
     originator := anOriginator.
 ! !
 
-
 !GenericException methodsFor:'testing'!
 
 isError
@@ -2344,15 +2350,14 @@
     ^ false
 ! !
 
-
 !GenericException class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.137 2013-04-19 09:41:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.139 2013-05-21 20:26:48 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.137 2013-04-19 09:41:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.139 2013-05-21 20:26:48 cg Exp $'
 !
 
 version_HG
--- a/Integer.st	Tue May 21 21:58:09 2013 +0100
+++ b/Integer.st	Fri May 24 18:52:05 2013 +0100
@@ -77,7 +77,8 @@
 byte1:b1 byte2:b2 byte3:b3 byte4:b4
     "Squeak compatibility:
      Return an Integer given four value bytes.
-     The returned integer is either a Small- or a LargeInteger"
+     The returned integer is either a Small- or a LargeInteger 
+     (on 32bit systems - on 64bit systems, it will be always a SmallInteger)"
 
     |t|
 
@@ -817,7 +818,6 @@
     "
 ! !
 
-
 !Integer class methodsFor:'prime numbers'!
 
 flushPrimeCache
@@ -4932,11 +4932,11 @@
 !Integer class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.277 2013-04-15 13:07:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.278 2013-05-13 14:43:36 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.277 2013-04-15 13:07:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.278 2013-05-13 14:43:36 cg Exp $'
 ! !
 
 
--- a/LargeInteger.st	Tue May 21 21:58:09 2013 +0100
+++ b/LargeInteger.st	Fri May 24 18:52:05 2013 +0100
@@ -290,8 +290,6 @@
     "Modified: / 8.5.1998 / 21:40:41 / cg"
 ! !
 
-
-
 !LargeInteger class methodsFor:'queries'!
 
 isBuiltInClass
@@ -456,10 +454,10 @@
     "return the quotient of the receiver and the argument, aNumber"
 
     aNumber isInteger ifTrue:[
-        ^ Fraction numerator:self denominator:aNumber
+	^ Fraction numerator:self denominator:aNumber
     ].
     aNumber isFraction ifTrue:[
-        ^ Fraction numerator:(self * aNumber denominator) denominator:(aNumber numerator)
+	^ Fraction numerator:(self * aNumber denominator) denominator:(aNumber numerator)
     ].
 
     "this is a q&d hack - we loose lots of precision here ..."
@@ -473,7 +471,7 @@
      The result is truncated toward negative infinity and negative,
      if the operands signs differ.
      The following is always true:
-        (receiver // aNumber) * aNumber + (receiver \\ aNUmber) = receiver
+	(receiver // aNumber) * aNumber + (receiver \\ aNUmber) = receiver
     "
 
     |cls divMod quo abs "{ Class: SmallInteger }" n|
@@ -486,38 +484,38 @@
      Use a special method for this case ...
     "
     (cls == SmallInteger) ifTrue:[
-        abs := aNumber.
-        abs := abs abs.
-        (abs between:1 and:16r00ffffff) ifTrue:[
-            divMod := self absFastDivMod:abs.
-        ] ifFalse:[
-            n := abs asLargeInteger.
-        ].
+	abs := aNumber.
+	abs := abs abs.
+	(abs between:1 and:16r00ffffff) ifTrue:[
+	    divMod := self absFastDivMod:abs.
+	] ifFalse:[
+	    n := abs asLargeInteger.
+	].
     ] ifFalse:[
-        "
-         if the argument is not a largeInteger, coerce
-        "
-        (cls == self class) ifFalse:[
-            ^ self retry:#// coercing:aNumber
-        ].
-        n := aNumber
+	"
+	 if the argument is not a largeInteger, coerce
+	"
+	(cls == self class) ifFalse:[
+	    ^ self retry:#// coercing:aNumber
+	].
+	n := aNumber
     ].
 
     divMod isNil ifTrue:[
-        divMod := self absDivMod:n.
+	divMod := self absDivMod:n.
     ].
     quo := divMod at:1.
     (sign == aNumber sign) ifFalse:[
-        "/ adjust for truncation if negative and there is a remainder ...
-        "/ be careful: there is one special case to care for here:
-        "/ if quo is maxInt+1, the negation can be represented as a smallInt.
-        quo := quo sign:-1.
-        (divMod at:2) == 0 ifFalse:[
-            ^ quo - 1
-        ].
-        quo digitLength == SmallInteger maxBytes ifTrue:[
-            ^ quo compressed
-        ].
+	"/ adjust for truncation if negative and there is a remainder ...
+	"/ be careful: there is one special case to care for here:
+	"/ if quo is maxInt+1, the negation can be represented as a smallInt.
+	quo := quo sign:-1.
+	(divMod at:2) == 0 ifFalse:[
+	    ^ quo - 1
+	].
+	quo digitLength == SmallInteger maxBytes ifTrue:[
+	    ^ quo compressed
+	].
     ].
     ^ quo
 
@@ -882,139 +880,139 @@
 
 %{  /* NOCONTEXT */
     if (__isSmallInteger(anInteger)) {
-        INT v2 = __intVal(anInteger);
-        INT v1;
+	INT v2 = __intVal(anInteger);
+	INT v1;
 #if defined(__LSBFIRST__)
-        v1 = *(INT *)(__byteArrayVal(__INST(digitByteArray)));
+	v1 = *(INT *)(__byteArrayVal(__INST(digitByteArray)));
 #else
-        unsigned char *digits = (unsigned char *)(__byteArrayVal(__INST(digitByteArray)));
-
-        v1 = digits[0] & 0xFF;
-        v1 = v1 | ((digits[1] & 0xFF)<<8);
-        v1 = v1 | ((digits[2] & 0xFF)<<16);
-        v1 = v1 | ((digits[3] & 0xFF)<<24);
+	unsigned char *digits = (unsigned char *)(__byteArrayVal(__INST(digitByteArray)));
+
+	v1 = digits[0] & 0xFF;
+	v1 = v1 | ((digits[1] & 0xFF)<<8);
+	v1 = v1 | ((digits[2] & 0xFF)<<16);
+	v1 = v1 | ((digits[3] & 0xFF)<<24);
 # if (__POINTER_SIZE__ == 8)
-        v1 = v1 | ((digits[4] & 0xFF)<<32);
-        v1 = v1 | ((digits[5] & 0xFF)<<40);
-        v1 = v1 | ((digits[6] & 0xFF)<<48);
-        v1 = v1 | ((digits[7] & 0xFF)<<56);
+	v1 = v1 | ((digits[4] & 0xFF)<<32);
+	v1 = v1 | ((digits[5] & 0xFF)<<40);
+	v1 = v1 | ((digits[6] & 0xFF)<<48);
+	v1 = v1 | ((digits[7] & 0xFF)<<56);
  #endif
 #endif
-        RETURN ( __mkSmallInteger(v1 & v2) );
+	RETURN ( __mkSmallInteger(v1 & v2) );
     }
 
     if (__isLargeInteger(anInteger)) {
-        OBJ _myDigitByteArray = __INST(digitByteArray);
-        OBJ _otherDigitByteArray = __LargeIntegerInstPtr(anInteger)->l_digits;
-
-        if (__isByteArray(_myDigitByteArray)
-         && __isByteArray(_otherDigitByteArray)) {
-            unsigned char *pDigits1, *pDigits2;
-            int size1, size2, minSize;
-            union {
-                double d;                    // force align
-                unsigned char chars[2048+8];
-            } buffer;
-            unsigned char *pRslt;
-            OBJ newDigits, newLarge;
-
-            pDigits1 = (unsigned char *)(__byteArrayVal(_myDigitByteArray));
-            pDigits2 = (unsigned char *)(__byteArrayVal(_otherDigitByteArray));
-            pRslt = (void *)(buffer.chars);
-
-            size1 = __byteArraySize(_myDigitByteArray);
-            size2 = __byteArraySize(_otherDigitByteArray);
-            minSize = (size1 < size2) ? size1 : size2;
-            if (minSize <= sizeof(buffer.chars)) {
-                int n = minSize;
-
-            /* not worth it - but a nice try and first testbed for mmx... */
+	OBJ _myDigitByteArray = __INST(digitByteArray);
+	OBJ _otherDigitByteArray = __LargeIntegerInstPtr(anInteger)->l_digits;
+
+	if (__isByteArray(_myDigitByteArray)
+	 && __isByteArray(_otherDigitByteArray)) {
+	    unsigned char *pDigits1, *pDigits2;
+	    int size1, size2, minSize;
+	    union {
+		double d;                    // force align
+		unsigned char chars[2048+8];
+	    } buffer;
+	    unsigned char *pRslt;
+	    OBJ newDigits, newLarge;
+
+	    pDigits1 = (unsigned char *)(__byteArrayVal(_myDigitByteArray));
+	    pDigits2 = (unsigned char *)(__byteArrayVal(_otherDigitByteArray));
+	    pRslt = (void *)(buffer.chars);
+
+	    size1 = __byteArraySize(_myDigitByteArray);
+	    size2 = __byteArraySize(_otherDigitByteArray);
+	    minSize = (size1 < size2) ? size1 : size2;
+	    if (minSize <= sizeof(buffer.chars)) {
+		int n = minSize;
+
+	    /* not worth it - but a nice try and first testbed for mmx... */
 #define x__USE_MMX__
 #ifdef __USE_MMX__
 #ifdef __VISUALC__
-                if (((INT)pRslt & 7) == 0) {    // 8-byte aligned
-                    if (((INT)pDigits1 & 7) == ((INT)pDigits2 & 7)) {   // same align
-                        while (((INT)pDigits1 & 7) && (n >= sizeof(int))) {
-                            ((int *)pRslt)[0] = ((int *)pDigits1)[0] & ((int *)pDigits2)[0];
-                            pRslt += sizeof(int);
-                            pDigits1 += sizeof(int);
-                            pDigits2 += sizeof(int);
-                            pDigits2 += sizeof(int);
-                            n -= sizeof(int);
-                        }
-                        for (; n >= 8; n -= 8) {
-                            __asm {
-                                mov eax, pDigits1
-                                movq mm0, [eax]
-                                mov eax, pDigits2
-                                movq mm1, [eax]
-                                pand mm0, mm1
-                                mov eax, pRslt
-                                movq [eax], mm0
-                            }
-                            pDigits1 += 8;
-                            pDigits2 += 8;
-                            pRslt += 8;
-                        }
-                        __asm {
-                            emms ; switch back to FPU state.
-                        }
-                    }
-                }
+		if (((INT)pRslt & 7) == 0) {    // 8-byte aligned
+		    if (((INT)pDigits1 & 7) == ((INT)pDigits2 & 7)) {   // same align
+			while (((INT)pDigits1 & 7) && (n >= sizeof(int))) {
+			    ((int *)pRslt)[0] = ((int *)pDigits1)[0] & ((int *)pDigits2)[0];
+			    pRslt += sizeof(int);
+			    pDigits1 += sizeof(int);
+			    pDigits2 += sizeof(int);
+			    pDigits2 += sizeof(int);
+			    n -= sizeof(int);
+			}
+			for (; n >= 8; n -= 8) {
+			    __asm {
+				mov eax, pDigits1
+				movq mm0, [eax]
+				mov eax, pDigits2
+				movq mm1, [eax]
+				pand mm0, mm1
+				mov eax, pRslt
+				movq [eax], mm0
+			    }
+			    pDigits1 += 8;
+			    pDigits2 += 8;
+			    pRslt += 8;
+			}
+			__asm {
+			    emms ; switch back to FPU state.
+			}
+		    }
+		}
 #endif /* __VISUALC__ */
 #endif /* __USE_MMX__ */
 
-                for (; n >= sizeof(INT)*4; n -= sizeof(INT)*4) {
-                    ((INT *)pRslt)[0] = ((INT *)pDigits1)[0] & ((INT *)pDigits2)[0];
-                    ((INT *)pRslt)[1] = ((INT *)pDigits1)[1] & ((INT *)pDigits2)[1];
-                    ((INT *)pRslt)[2] = ((INT *)pDigits1)[2] & ((INT *)pDigits2)[2];
-                    ((INT *)pRslt)[3] = ((INT *)pDigits1)[3] & ((INT *)pDigits2)[3];
-                    pRslt += sizeof(INT)*4;
-                    pDigits1 += sizeof(INT)*4;
-                    pDigits2 += sizeof(INT)*4;
-                }
-                for (; n >= sizeof(INT); n -= sizeof(INT)) {
-                    ((INT *)pRslt)[0] = ((INT *)pDigits1)[0] & ((INT *)pDigits2)[0];
-                    pRslt += sizeof(INT);
-                    pDigits1 += sizeof(INT);
-                    pDigits2 += sizeof(INT);
-                }
-                for (; n > 0; n--) {
-                    *pRslt = *pDigits1 & *pDigits2;
-                    pRslt++;
-                    pDigits1++;
-                    pDigits2++;
-                }
-                // normalize
-                while ((pRslt[-1]==0) && (pRslt > buffer.chars)) {
-                    pRslt--;
-                }
-
-                // allocate result
-                n = pRslt-buffer.chars;
-                if (n <= sizeof(INT)) {
-                    INT val = 0;
-
-                    // make it a smallInteger / 32bitInteger
-                    while (n > 0) {
-                        val = (val << 8) + buffer.chars[--n];
-                    }
-                    RETURN (__MKUINT(val));
-                }
-                newDigits = __MKBYTEARRAY(buffer.chars, n);
-                if (newDigits) {
-                    __PROTECT__(newDigits);
-                    newLarge = __STX___new(sizeof(struct __LargeInteger));
-                    __UNPROTECT__(newDigits);
-                    if (newLarge) {
-                        __InstPtr(newLarge)->o_class = LargeInteger; __STORE(newLarge, LargeInteger);
-                        __LargeIntegerInstPtr(newLarge)->l_digits = newDigits; __STORE(newLarge, newDigits);
-                        __LargeIntegerInstPtr(newLarge)->l_sign = __MKSMALLINT(1);
-                        RETURN (newLarge);
-                    }
-                }
-            }
-        }
+		for (; n >= sizeof(INT)*4; n -= sizeof(INT)*4) {
+		    ((INT *)pRslt)[0] = ((INT *)pDigits1)[0] & ((INT *)pDigits2)[0];
+		    ((INT *)pRslt)[1] = ((INT *)pDigits1)[1] & ((INT *)pDigits2)[1];
+		    ((INT *)pRslt)[2] = ((INT *)pDigits1)[2] & ((INT *)pDigits2)[2];
+		    ((INT *)pRslt)[3] = ((INT *)pDigits1)[3] & ((INT *)pDigits2)[3];
+		    pRslt += sizeof(INT)*4;
+		    pDigits1 += sizeof(INT)*4;
+		    pDigits2 += sizeof(INT)*4;
+		}
+		for (; n >= sizeof(INT); n -= sizeof(INT)) {
+		    ((INT *)pRslt)[0] = ((INT *)pDigits1)[0] & ((INT *)pDigits2)[0];
+		    pRslt += sizeof(INT);
+		    pDigits1 += sizeof(INT);
+		    pDigits2 += sizeof(INT);
+		}
+		for (; n > 0; n--) {
+		    *pRslt = *pDigits1 & *pDigits2;
+		    pRslt++;
+		    pDigits1++;
+		    pDigits2++;
+		}
+		// normalize
+		while ((pRslt[-1]==0) && (pRslt > buffer.chars)) {
+		    pRslt--;
+		}
+
+		// allocate result
+		n = pRslt-buffer.chars;
+		if (n <= sizeof(INT)) {
+		    INT val = 0;
+
+		    // make it a smallInteger / 32bitInteger
+		    while (n > 0) {
+			val = (val << 8) + buffer.chars[--n];
+		    }
+		    RETURN (__MKUINT(val));
+		}
+		newDigits = __MKBYTEARRAY(buffer.chars, n);
+		if (newDigits) {
+		    __PROTECT__(newDigits);
+		    newLarge = __STX___new(sizeof(struct __LargeInteger));
+		    __UNPROTECT__(newDigits);
+		    if (newLarge) {
+			__InstPtr(newLarge)->o_class = LargeInteger; __STORE(newLarge, LargeInteger);
+			__LargeIntegerInstPtr(newLarge)->l_digits = newDigits; __STORE(newLarge, newDigits);
+			__LargeIntegerInstPtr(newLarge)->l_sign = __MKSMALLINT(1);
+			RETURN (newLarge);
+		    }
+		}
+	    }
+	}
     }
 %}.
     ^ super bitAnd:anInteger
@@ -1036,29 +1034,29 @@
 bitAt:anIntegerIndex
     "return the value of the index's bit (index starts at 1) as 0 or 1.
      Notice: the result of bitAt: on negative receivers is not
-             defined in the language standard (since the implementation
-             is free to choose any internal representation for integers)"
+	     defined in the language standard (since the implementation
+	     is free to choose any internal representation for integers)"
 
 %{  /* NOCONTEXT */
     if (__isSmallInteger(anIntegerIndex)) {
-        INT idx = __smallIntegerVal(anIntegerIndex) - 1;
-
-        if (idx >= 0) {
-            int v1;
-            int byteOffset = idx / 8;
-            int digitLen   = __byteArraySize(__INST(digitByteArray));
-
-            if (digitLen < byteOffset) {
-                RETURN(__mkSmallInteger(0));
-            }
-
-            v1 = (__byteArrayVal(__INST(digitByteArray)))[byteOffset];
-            if (v1 & (1 << (idx % 8))) {
-                RETURN(__mkSmallInteger(1));
-            } else {
-                RETURN(__mkSmallInteger(0));
-            }
-        }
+	INT idx = __smallIntegerVal(anIntegerIndex) - 1;
+
+	if (idx >= 0) {
+	    int v1;
+	    int byteOffset = idx / 8;
+	    int digitLen   = __byteArraySize(__INST(digitByteArray));
+
+	    if (digitLen < byteOffset) {
+		RETURN(__mkSmallInteger(0));
+	    }
+
+	    v1 = (__byteArrayVal(__INST(digitByteArray)))[byteOffset];
+	    if (v1 & (1 << (idx % 8))) {
+		RETURN(__mkSmallInteger(1));
+	    } else {
+		RETURN(__mkSmallInteger(0));
+	    }
+	}
     }
 %}.
     ^ super bitAt:anIntegerIndex
@@ -1090,11 +1088,11 @@
     anInteger class ~~ LargeInteger ifTrue:[^ super bitXor:anInteger].
 
     (len1 := anInteger digitLength) > (len2 := self digitLength) ifTrue:[
-        newBytes := anInteger digitBytes copy.
-        newBytes bitXorBytesFrom:1 to:len2 with:digitByteArray startingAt:1
+	newBytes := anInteger digitBytes copy.
+	newBytes bitXorBytesFrom:1 to:len2 with:digitByteArray startingAt:1
     ] ifFalse:[
-        newBytes := digitByteArray copy.
-        newBytes bitXorBytesFrom:1 to:len1 with:anInteger digits startingAt:1
+	newBytes := digitByteArray copy.
+	newBytes bitXorBytesFrom:1 to:len1 with:anInteger digits startingAt:1
     ].
     ^ (LargeInteger digitBytes:newBytes) compressed
 
@@ -1109,9 +1107,9 @@
      bigNum1 := 2 raisedToInteger:512.
      bigNum2 := 2 raisedToInteger:510.
      Time millisecondsToRun:[
-        1000000 timesRepeat:[
-           bigNum1 bitXor:bigNum2.
-        ]
+	1000000 timesRepeat:[
+	   bigNum1 bitXor:bigNum2.
+	]
      ]
     "
 !
@@ -1130,92 +1128,92 @@
 
     idx0 := 1.
 
-%{  
+%{
     OBJ __digitByteArray = __INST(digitByteArray);
 
     /*
      * quickly advance over full 0-words
      */
     if (__isByteArray(__digitByteArray)) {
-        int __sz = __byteArraySize(__digitByteArray);
-        unsigned char *__bP = __byteArrayVal(__digitByteArray);
-        unsigned char *__bP0 = __bP;
-
-        sz = _MKSMALLINT(__sz);
+	int __sz = __byteArraySize(__digitByteArray);
+	unsigned char *__bP = __byteArrayVal(__digitByteArray);
+	unsigned char *__bP0 = __bP;
+
+	sz = __MKSMALLINT(__sz);
 
 #ifdef __UNROLL_LOOPS__
-        while (__sz > (sizeof(INT) * 4)) {
-            if (( ((INT *)__bP)[0] 
-                 | ((INT *)__bP)[1] 
-                 | ((INT *)__bP)[2] 
-                 | ((INT *)__bP)[3] ) != 0) break;
-            __sz -= sizeof(INT) * 4;
-            __bP += sizeof(INT) * 4;
-        }
+	while (__sz > (sizeof(INT) * 4)) {
+	    if (( ((INT *)__bP)[0]
+		 | ((INT *)__bP)[1]
+		 | ((INT *)__bP)[2]
+		 | ((INT *)__bP)[3] ) != 0) break;
+	    __sz -= sizeof(INT) * 4;
+	    __bP += sizeof(INT) * 4;
+	}
 #endif
-        while (__sz > sizeof(INT)) {
-            if ( ((INT *)__bP)[0] != 0 ) break;
-            __sz -= sizeof(INT);
-            __bP += sizeof(INT);
-        }
-        while (__sz > 0) {
-            unsigned int c;
-
-            if ( (c = *__bP) != 0 ) {
-                int bitIdx = (__bP - __bP0) * 8;
+	while (__sz > sizeof(INT)) {
+	    if ( ((INT *)__bP)[0] != 0 ) break;
+	    __sz -= sizeof(INT);
+	    __bP += sizeof(INT);
+	}
+	while (__sz > 0) {
+	    unsigned int c;
+
+	    if ( (c = *__bP) != 0 ) {
+		int bitIdx = (__bP - __bP0) * 8;
 #ifdef __BSF
-                {
-                    int index;
-                    int t = c;
-
-                    index = __BSF(t);
-                    RETURN ( __mkSmallInteger(index + 1 + bitIdx) );
-                }
+		{
+		    int index;
+		    int t = c;
+
+		    index = __BSF(t);
+		    RETURN ( __mkSmallInteger(index + 1 + bitIdx) );
+		}
 #else
-                if (c & 0x0F) {
-                    if (c & 0x03) {
-                        if (c & 0x01) {
-                            RETURN ( __mkSmallInteger( bitIdx + 1) );
-                        } else {
-                            RETURN ( __mkSmallInteger( bitIdx + 2) );
-                        }
-                    } else {
-                        if (c & 0x04) {
-                            RETURN ( __mkSmallInteger( bitIdx + 3) );
-                        } else {
-                            RETURN ( __mkSmallInteger( bitIdx + 4) );
-                        }
-                    }
-                } else {
-                    if (c & 0x30) {
-                        if (c & 0x10) {
-                            RETURN ( __mkSmallInteger( bitIdx + 5) );
-                        } else {
-                            RETURN ( __mkSmallInteger( bitIdx + 6) );
-                        }
-                    } else {
-                        if (c & 0x40) {
-                            RETURN ( __mkSmallInteger( bitIdx + 7) );
-                        } else {
-                            RETURN ( __mkSmallInteger( bitIdx + 8) );
-                        }
-                    }
-                }
+		if (c & 0x0F) {
+		    if (c & 0x03) {
+			if (c & 0x01) {
+			    RETURN ( __mkSmallInteger( bitIdx + 1) );
+			} else {
+			    RETURN ( __mkSmallInteger( bitIdx + 2) );
+			}
+		    } else {
+			if (c & 0x04) {
+			    RETURN ( __mkSmallInteger( bitIdx + 3) );
+			} else {
+			    RETURN ( __mkSmallInteger( bitIdx + 4) );
+			}
+		    }
+		} else {
+		    if (c & 0x30) {
+			if (c & 0x10) {
+			    RETURN ( __mkSmallInteger( bitIdx + 5) );
+			} else {
+			    RETURN ( __mkSmallInteger( bitIdx + 6) );
+			}
+		    } else {
+			if (c & 0x40) {
+			    RETURN ( __mkSmallInteger( bitIdx + 7) );
+			} else {
+			    RETURN ( __mkSmallInteger( bitIdx + 8) );
+			}
+		    }
+		}
 #endif
-                break;
-            }
-            __sz--;
-            __bP++;
-        }
-        idx0 = __mkSmallInteger( __bP - __bP0 + 1 );
+		break;
+	    }
+	    __sz--;
+	    __bP++;
+	}
+	idx0 = __mkSmallInteger( __bP - __bP0 + 1 );
     }
 %}.
 
     "/ never actually reached
     idx0 to:sz do:[:digitIndex |
-        (byte := digitByteArray at:digitIndex) ~~ 0 ifTrue:[
-            ^ (digitIndex-1)*8 + (byte lowBit)
-        ]
+	(byte := digitByteArray at:digitIndex) ~~ 0 ifTrue:[
+	    ^ (digitIndex-1)*8 + (byte lowBit)
+	]
     ].
     ^ 0 "/ should not happen
 
@@ -1239,24 +1237,24 @@
      ((1 bitShift:64)-1) highBit
 
      1 to:1000 do:[:idx |
-        self assert:(( 1 bitShift:idx) lowBit = (idx+1)).
-        self assert:(( 1 bitShift:idx) lowBit = ( 1 bitShift:idx) highBit).
-        self assert:(( 3 bitShift:idx) lowBit = (idx+1)).
-        self assert:(( 7 bitShift:idx) lowBit = (idx+1)).
-        self assert:(( 15 bitShift:idx) lowBit = (idx+1)).
-        self assert:(( 31 bitShift:idx) lowBit = (idx+1)).
-        self assert:(( 63 bitShift:idx) lowBit = (idx+1)).
-        self assert:(( 127 bitShift:idx) lowBit = (idx+1)).
-        self assert:(( 255 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 1 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 1 bitShift:idx) lowBit = ( 1 bitShift:idx) highBit).
+	self assert:(( 3 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 7 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 15 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 31 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 63 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 127 bitShift:idx) lowBit = (idx+1)).
+	self assert:(( 255 bitShift:idx) lowBit = (idx+1)).
      ]
 
      |num|
 
      num := (1 bitShift:1000).
      Time millisecondsToRun:[
-        1000000 timesRepeat:[
-            num lowBit
-        ]
+	1000000 timesRepeat:[
+	    num lowBit
+	]
      ]
     "
 
@@ -1272,23 +1270,23 @@
     |myDigitLength newDigitLength newDigitBytes byteIndexOfBitToSet|
 
     index <= 0 ifTrue:[
-        ^ SubscriptOutOfBoundsSignal
-                raiseRequestWith:index
-                errorString:'index out of bounds'
+	^ SubscriptOutOfBoundsSignal
+		raiseRequestWith:index
+		errorString:'index out of bounds'
     ].
 
     myDigitLength := digitByteArray size.
     byteIndexOfBitToSet := ((index-1)//8)+1.
     byteIndexOfBitToSet > myDigitLength ifTrue:[
-        newDigitLength := myDigitLength max:byteIndexOfBitToSet.
-        newDigitBytes := ByteArray new:newDigitLength.
-        newDigitBytes replaceFrom:1 to:myDigitLength with:digitByteArray startingAt:1.
+	newDigitLength := myDigitLength max:byteIndexOfBitToSet.
+	newDigitBytes := ByteArray new:newDigitLength.
+	newDigitBytes replaceFrom:1 to:myDigitLength with:digitByteArray startingAt:1.
     ] ifFalse:[
-        newDigitBytes := digitByteArray copy
+	newDigitBytes := digitByteArray copy
     ].
     newDigitBytes
-        at:byteIndexOfBitToSet
-        put:((newDigitBytes at:byteIndexOfBitToSet) setBit:(((index-1)\\8)+1)).
+	at:byteIndexOfBitToSet
+	put:((newDigitBytes at:byteIndexOfBitToSet) setBit:(((index-1)\\8)+1)).
     ^ (self class digitBytes:newDigitBytes) sign:sign
 
     "
@@ -1335,27 +1333,27 @@
     int count;
 
     if (__isSmallInteger(shiftCount)) {
-        count = __intVal(shiftCount);
-        count = count % 32;
-
-        bits = __unsignedLongIntVal(self);
-        if (count > 0) {
-            bits = (bits << count) | (bits >> (32-count));
-        } else {
-            bits = (bits >> (-count)) | (bits << (32-(-count)));
-        }
+	count = __intVal(shiftCount);
+	count = count % 32;
+
+	bits = __unsignedLongIntVal(self);
+	if (count > 0) {
+	    bits = (bits << count) | (bits >> (32-count));
+	} else {
+	    bits = (bits >> (-count)) | (bits << (32-(-count)));
+	}
 #if __POINTER_SIZE__ == 8
-        bits &= 0xFFFFFFFFL;
+	bits &= 0xFFFFFFFFL;
 #endif
-        RETURN (__MKUINT(bits));
+	RETURN (__MKUINT(bits));
     }
 %}.
     ^ self primitiveFailed
 
     "
-     (1 bitShift32:31) rotate32:0   
-     (1 bitShift32:31) rotate32:1   
-     (1 bitShift32:31) rotate32:-1   
+     (1 bitShift32:31) rotate32:0
+     (1 bitShift32:31) rotate32:1
+     (1 bitShift32:31) rotate32:-1
     "
 !
 
@@ -1373,21 +1371,21 @@
     int count;
 
     if (__isSmallInteger(shiftCount)) {
-        count = __intVal(shiftCount);
-        if (count >= 32) {
-            RETURN (__mkSmallInteger(0));
-        }
-
-        bits = __unsignedLongIntVal(self);
-        if (count > 0) {
-            bits = bits << count;
-        } else {
-            bits = bits >> (-count);
-        }
+	count = __intVal(shiftCount);
+	if (count >= 32) {
+	    RETURN (__mkSmallInteger(0));
+	}
+
+	bits = __unsignedLongIntVal(self);
+	if (count > 0) {
+	    bits = bits << count;
+	} else {
+	    bits = bits >> (-count);
+	}
 #if __POINTER_SIZE__ == 8
-        bits &= 0xFFFFFFFFL;
+	bits &= 0xFFFFFFFFL;
 #endif
-        RETURN (__MKUINT(bits));
+	RETURN (__MKUINT(bits));
     }
 %}.
     ^ self primitiveFailed
@@ -1433,10 +1431,10 @@
     ^ self class digitBytes:digitByteArray MSB:true
 
     "
-     (LargeInteger value:16r11223344) byteSwapped hexPrintString 
-     (LargeInteger value:16r44332211) byteSwapped hexPrintString 
-     16r88776655 byteSwapped hexPrintString                     
-     16r11223344 byteSwapped hexPrintString 
+     (LargeInteger value:16r11223344) byteSwapped hexPrintString
+     (LargeInteger value:16r44332211) byteSwapped hexPrintString
+     16r88776655 byteSwapped hexPrintString
+     16r11223344 byteSwapped hexPrintString
     "
 
     "Created: / 31-01-2012 / 11:07:42 / cg"
@@ -1660,6 +1658,9 @@
 		}
 		break;
 	    case 7:
+# if defined(__LSBFIRST__)
+		_val = ((INT *)__digitBytes)[0] & 0x00FFFFFFFFFFFFFFL;
+# else
 		_val = (__digitBytes[6]<<8);
 		_val = (_val + __digitBytes[5]) << 8;
 		_val = (_val + __digitBytes[4]) << 8;
@@ -1667,45 +1668,66 @@
 		_val = (_val + __digitBytes[2]) << 8;
 		_val = (_val + __digitBytes[1]) << 8;
 		_val += __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
 	    case 6:
+# if defined(__LSBFIRST__)
+		_val = ((INT *)__digitBytes)[0] & 0x0000FFFFFFFFFFFFL;
+# else
 		_val = (__digitBytes[5]<<8);
 		_val = (_val + __digitBytes[4]) << 8;
 		_val = (_val + __digitBytes[3]) << 8;
 		_val = (_val + __digitBytes[2]) << 8;
 		_val = (_val + __digitBytes[1]) << 8;
 		_val += __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
 	    case 5:
+# if defined(__LSBFIRST__)
+		_val = ((INT *)__digitBytes)[0] & 0x000000FFFFFFFFFFL;
+# else
 		_val = (__digitBytes[4]<<8);
 		_val = (_val + __digitBytes[3]) << 8;
 		_val = (_val + __digitBytes[2]) << 8;
 		_val = (_val + __digitBytes[1]) << 8;
 		_val += __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
 	    case 4:
+# if defined(__LSBFIRST__)
+		_val = ((INT *)__digitBytes)[0] & 0x00000000FFFFFFFFL;
+# else
 		_val = (__digitBytes[3]<<8);
 		_val = (_val + __digitBytes[2]) << 8;
 		_val = (_val + __digitBytes[1]) << 8;
 		_val += __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
 	    case 3:
+# if defined(__LSBFIRST__)
+		_val = ((int *)__digitBytes)[0] & 0x00FFFFFF;
+# else
 		_val = (__digitBytes[2]<<8);
 		_val = (_val + __digitBytes[1]) << 8;
 		_val += __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
 	    case 2:
+# if defined(__LSBFIRST__)
+		_val = ((int *)__digitBytes)[0] & 0x0000FFFF;
+# else
 		_val = (__digitBytes[1]<<8) + __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
@@ -1730,20 +1752,32 @@
 			_val = -_val;
 		    RETURN (__mkSmallInteger(_val));
 		}
+# if defined(__LSBFIRST__)
+		_val = ((int *)__digitBytes)[0] & 0x0000FFFF;
+# else
 		_val = (__digitBytes[1]<<8) + __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
 	    }
 	    if (_idx == 3) {
+# if defined(__LSBFIRST__)
+		_val = ((int *)__digitBytes)[0] & 0x00FFFFFF;
+# else
 		_val = (((__digitBytes[2]<<8) + __digitBytes[1])<<8) + __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		RETURN (__mkSmallInteger(_val));
 	    }
 	    _val = __digitBytes[3];
 	    if (_val <= 0x40) {
+# if defined(__LSBFIRST__)
+		_val = ((int *)__digitBytes)[0];
+# else
 		_val = (((((_val<<8) + __digitBytes[2])<<8) + __digitBytes[1])<<8) + __digitBytes[0];
+# endif
 		if (__INST(sign) == __mkSmallInteger(-1))
 		    _val = -_val;
 		if (__ISVALIDINTEGER(_val)) {
@@ -1758,7 +1792,7 @@
 	}
 
 	/*
-	 * must copy & cut off some bytes
+	 * must copy & cut off some (zero)bytes
 	 */
 	{
 	    OBJ newDigits;
@@ -1929,41 +1963,41 @@
     |otherSign|
 
     (aNumber class == self class) ifTrue:[
-        otherSign := aNumber sign.
-
-        (sign > 0) ifTrue:[
-            "I am positive"
-            (otherSign > 0) ifTrue:[^ self absLess:aNumber].
-            ^ false "aNumber is <= 0"
-        ].
-        "I am negative"
-        (otherSign > 0) ifTrue:[^ true].
-        (otherSign == 0) ifTrue:[^ true].
-        ^ (aNumber absLess:self)
+	otherSign := aNumber sign.
+
+	(sign > 0) ifTrue:[
+	    "I am positive"
+	    (otherSign > 0) ifTrue:[^ self absLess:aNumber].
+	    ^ false "aNumber is <= 0"
+	].
+	"I am negative"
+	(otherSign > 0) ifTrue:[^ true].
+	(otherSign == 0) ifTrue:[^ true].
+	^ (aNumber absLess:self)
     ].
     (aNumber class == SmallInteger) ifTrue:[
-        otherSign := aNumber sign.
-
-        (sign > 0) ifTrue:[
-            "I am positive"
-            ^ false "aNumber is <= 0"
-        ].
-        (sign == 0) ifTrue:[
-            (otherSign > 0) ifTrue:[^ true].
-            ^ false
-        ].
-        "I am negative"
-        ^ true
+	otherSign := aNumber sign.
+
+	(sign > 0) ifTrue:[
+	    "I am positive"
+	    ^ false "aNumber is <= 0"
+	].
+	(sign == 0) ifTrue:[
+	    (otherSign > 0) ifTrue:[^ true].
+	    ^ false
+	].
+	"I am negative"
+	^ true
     ].
     "/ hack for epsilon tests
     (aNumber class == Float) ifTrue:[
-        self negative ifTrue:[
-            "/ I am a large negative; so my value is definitely below SmallInteger minVal
-            aNumber >= SmallInteger minVal asFloat ifTrue:[^ true].
-        ] ifFalse:[
-            "/ I am a large positive; so my value is definitely above SmallInteger maxVal
-            aNumber <= SmallInteger maxVal asFloat ifTrue:[^ false].
-        ].
+	self negative ifTrue:[
+	    "/ I am a large negative; so my value is definitely below SmallInteger minVal
+	    aNumber >= SmallInteger minVal asFloat ifTrue:[^ true].
+	] ifFalse:[
+	    "/ I am a large positive; so my value is definitely above SmallInteger maxVal
+	    aNumber <= SmallInteger maxVal asFloat ifTrue:[^ false].
+	].
     ].
 
     ^ aNumber lessFromInteger:self
@@ -2508,7 +2542,7 @@
 
     "
      16r7FFFFFFF + 1       ->  2147483648
-     16r7FFFFFFF plus32: 1 ->  -2147483648  
+     16r7FFFFFFF plus32: 1 ->  -2147483648
     "
 ! !
 
@@ -2593,7 +2627,7 @@
 
 %{  /* NOCONTEXT */
     if (__isLargeInteger(aLargeInteger)) {
-    	OBJ _digitByteArray = __INST(digitByteArray);
+	OBJ _digitByteArray = __INST(digitByteArray);
 	OBJ _otherDigitByteArray = __LargeIntegerInstPtr(aLargeInteger)->l_digits;
 
 	if (__isByteArray(_digitByteArray)
@@ -3810,10 +3844,10 @@
 	].
 	lastDigit := resultDigitByteArray basicAt:lResult.
     ].
-    (lastDigit ~~ 0 and:[lResult > SmallInteger maxBytes]) ifTrue:[
-	^ result
+    (lastDigit == 0 or:[lResult <= SmallInteger maxBytes]) ifTrue:[
+	^ result compressed.
     ].
-    ^ result compressed
+    ^ result
 
     "Modified: 5.11.1996 / 14:09:25 / cg"
 !
@@ -5172,10 +5206,10 @@
 !LargeInteger class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.206 2013-04-25 07:12:35 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.209 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.206 2013-04-25 07:12:35 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.209 2013-05-21 20:44:47 cg Exp $'
 ! !
 
--- a/LongFloat.st	Tue May 21 21:58:09 2013 +0100
+++ b/LongFloat.st	Fri May 24 18:52:05 2013 +0100
@@ -125,7 +125,7 @@
 #if defined(__GNUC__) || defined(WIN32)
 # define LONGFLOAT      long double
 
-# if defined(linux) || defined(WIN32)
+# if defined(linux) || defined(__osx__) || defined(WIN32)
 #  define LONG_ceil     ceill
 #  define LONG_floor    floorl
 #  define LONG_sqrt     sqrtl
@@ -146,14 +146,15 @@
 #  define LONG_pow      powl
 #  define LONG_isnan    isnanl
 #  define LONG_isfinite isfinitel
+
+#  if !defined(WIN32)
+#   define LONG_asinh    asinhl
+#   define LONG_acosh    acoshl
+#   define LONG_atanh    atanhl
+#  endif /* linux */
+
 # endif  /* defined(linux) || defined(WIN32) */
 
-# if defined(linux)
-#  define LONG_asinh    asinhl
-#  define LONG_acosh    acoshl
-#  define LONG_atanh    atanhl
-# endif /* linux */
-
 # if !defined(LONG_isnan)
 /* This should be true for ISO C99 systems - even for newer linux systems */
 #  define LONG_isnan    isnan
@@ -510,14 +511,18 @@
 	00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
     "
 %{
-    if (sizeof(LONGFLOAT) == 10) { /* i386 - WIN32 */
-	RETURN (__mkSmallInteger(15));
+    if (sizeof(LONGFLOAT) == 10) {
+	RETURN (__mkSmallInteger(15));  /* i386 - WIN32 */
+    }
+    if (sizeof(LONGFLOAT) == 12) {
+	RETURN (__mkSmallInteger(15));  /* i386 */
     }
-    if (sizeof(LONGFLOAT) == 12) { /* i386 */
-	RETURN (__mkSmallInteger(15));
-    }
-    if (sizeof(LONGFLOAT) == 16) { /* sparc, i386-64bit */
-	RETURN (__mkSmallInteger(15));
+    if (sizeof(LONGFLOAT) == 16) {
+#ifdef __x86_64__
+	RETURN (__mkSmallInteger(15));  /* amd64, i386-64bit */
+#else
+	RETURN (__mkSmallInteger(15));  /* sparc */
+#endif
     }
 %}.
     "systems without longFloat support use doubles instead"
@@ -538,14 +543,18 @@
 	00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
     "
 %{
-    if (sizeof(LONGFLOAT) == 10) { /* i386 - WIN32 */
-	RETURN (__mkSmallInteger(1));
+    if (sizeof(LONGFLOAT) == 10) {
+	RETURN (__mkSmallInteger(1));   /* i386 - WIN32 */
+    }
+    if (sizeof(LONGFLOAT) == 12) {
+	RETURN (__mkSmallInteger(1));   /* i386 */
     }
-    if (sizeof(LONGFLOAT) == 12) { /* i386 */
-	RETURN (__mkSmallInteger(1));
-    }
-    if (sizeof(LONGFLOAT) == 16) { /* sparc */
-	RETURN (__mkSmallInteger(0));
+    if (sizeof(LONGFLOAT) == 16) {
+#ifdef __x86_64__
+	RETURN (__mkSmallInteger(1));   /* amd64 */
+#else
+	RETURN (__mkSmallInteger(0));   /* sparc */
+#endif
     }
 %}.
     "systems without longFloat support use doubles instead"
@@ -569,14 +578,18 @@
 	00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
     "
 %{
-    if (sizeof(LONGFLOAT) == 10) { /* i386 - WIN32 */
-	RETURN (__mkSmallInteger(64));
+    if (sizeof(LONGFLOAT) == 10) {
+	RETURN (__mkSmallInteger(64));  /* i386 - WIN32 */
+    }
+    if (sizeof(LONGFLOAT) == 12) {
+	RETURN (__mkSmallInteger(64));  /* i386 */
     }
-    if (sizeof(LONGFLOAT) == 12) { /* i386 */
-	RETURN (__mkSmallInteger(64));
-    }
-    if (sizeof(LONGFLOAT) == 16) { /* sparc */
-	RETURN (__mkSmallInteger(112));
+    if (sizeof(LONGFLOAT) == 16) {
+#ifdef __x86_64__
+	RETURN (__mkSmallInteger(64));  /* amd64 */
+#else
+	RETURN (__mkSmallInteger(112)); /* sparc */
+#endif
     }
 %}.
     "systems without longFloat support use doubles instead"
@@ -590,6 +603,15 @@
     "
 !
 
+precision
+    "answer the precision of a LongFloat (in bits)
+     This is an IEEE float, where only the fraction from the normalized mantissa is stored
+     and so there is a hidden bit and the mantissa is actually represented by 64 binary digits
+     (although only 63 are needed in the binary representation)"
+
+    ^ 64
+!
+
 radix
    "answer the radix of a LongFloats exponent
     This is an IEEE float, which is represented as binary"
@@ -2670,11 +2692,11 @@
 !LongFloat class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.78 2013-03-31 20:46:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.79 2013-05-21 20:45:20 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.78 2013-03-31 20:46:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.79 2013-05-21 20:45:20 cg Exp $'
 ! !
 
 
--- a/Make.proto	Tue May 21 21:58:09 2013 +0100
+++ b/Make.proto	Fri May 24 18:52:05 2013 +0100
@@ -1,4 +1,4 @@
-# $Header: /cvs/stx/stx/libbasic/Make.proto,v 1.263 2013-04-25 07:36:53 stefan Exp $
+# $Header: /cvs/stx/stx/libbasic/Make.proto,v 1.264 2013-05-13 08:21:40 cg Exp $
 #
 # DO NOT EDIT
 # automagically generated from the projectDefinition: stx_libbasic.
@@ -34,7 +34,7 @@
 # add the path(es) here:,
 # ********** OPTIONAL: MODIFY the next lines ***
 # LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES=-I$(TOP)/librun
+LOCALINCLUDES=-I$(TOP)/librun $(FFI_INCLUDE)
 
 
 # if you need any additional defines for embedded C code,
--- a/Method.st	Tue May 21 21:58:09 2013 +0100
+++ b/Method.st	Fri May 24 18:52:05 2013 +0100
@@ -3006,10 +3006,13 @@
         "/ to flush: LastParseTreeCache removeAll.
         cachedInfo := LastParseTreeCache at:self ifAbsent:nil.
         cachedInfo notNil ifTrue:[
-            cachedInfo parserClass == parserClass ifTrue:[
-                "/ Transcript show:'hit '; showCR:self.
-                ^ cachedInfo parser perform:accessSelector
-            ]
+            cachedInfo method == self ifTrue:[
+                cachedInfo parserClass == parserClass ifTrue:[
+                    "/ Transcript show:'hit '; showCR:self.
+                    ^ cachedInfo parser perform:accessSelector
+                ]
+            ].
+            LastParseTreeCache removeKey:self
         ]
     ].
 
@@ -3843,11 +3846,11 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.410 2013-04-18 13:24:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.411 2013-05-14 16:32:08 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.410 2013-04-18 13:24:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.411 2013-05-14 16:32:08 cg Exp $'
 !
 
 version_HG
@@ -3856,7 +3859,7 @@
 !
 
 version_SVN
-    ^ '§ Id: Method.st 10648 2011-06-23 15:55:10Z vranyj1 §'
+    ^ '$ Id: Method.st 10648 2011-06-23 15:55:10Z vranyj1 $'
 ! !
 
 
--- a/NoHandlerError.st	Tue May 21 21:58:09 2013 +0100
+++ b/NoHandlerError.st	Fri May 24 18:52:05 2013 +0100
@@ -428,13 +428,14 @@
             ^ Debugger
                 enter:ex returnableSuspendedContext
                 withMessage:message
-                mayProceed:true
+                mayProceed:ex mayProceed.
         ].
         "/ ask, and maybe go into the debugger ...
         ^ nil
             errorNotify:message
             from:ex returnableSuspendedContext
             allowDebug:true
+            mayProceed:ex mayProceed.
       ]
 
     "test with (NOTE: halt, breakpoints or CTRL-C's still go straight into the debugger):
@@ -479,13 +480,14 @@
                 ^ Debugger
                     enter:ex returnableSuspendedContext
                     withMessage:message
-                    mayProceed:true
+                    mayProceed:ex mayProceed.
             ].
             "/ ask, and maybe go into the debugger ...
             ^ nil
                 errorNotify:message
                 from:ex returnableSuspendedContext
                 allowDebug:true
+                mayProceed:ex mayProceed.
         ]
       ]
 
@@ -577,11 +579,11 @@
 !NoHandlerError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.21 2013-04-19 08:39:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.23 2013-05-16 11:11:21 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.21 2013-04-19 08:39:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.23 2013-05-16 11:11:21 stefan Exp $'
 ! !
 
 
--- a/Object.st	Tue May 21 21:58:09 2013 +0100
+++ b/Object.st	Fri May 24 18:52:05 2013 +0100
@@ -4465,7 +4465,8 @@
             self
                 errorNotify:msgString
                 from:ex suspendedContext
-                allowDebug:false.
+                allowDebug:false
+                mayProceed:ex willProceed.
 
             "/ arrive here if proceeded...
             ^ nil
@@ -8867,7 +8868,7 @@
     "return true, if the receiver is an instance of aClass or one of its
      subclasses, false otherwise.
      Advice:
-        use of this to check objects for certain attributes/protocoll should
+        use of this to check objects for certain attributes/protocol should
         be avoided; it limits the reusability of your classes by limiting use
         to instances of certain classes and fences you into a specific inheritance
         hierarchy.
@@ -8907,7 +8908,6 @@
 "/  ].
 "/  ^ false
 "/
-
 !
 
 isLayout
@@ -9393,6 +9393,7 @@
         errorNotify:aString
         from:thisContext sender
         allowDebug:true
+        mayProceed:true
 
     "
      nil errorNotify:'hello there'
@@ -9406,13 +9407,20 @@
     "launch a Notifier, showing top stack (above aContext),
      telling user something and give user a chance to enter debugger."
 
-    ^ self errorNotify:aString from:aContext allowDebug:true
+    ^ self errorNotify:aString from:aContext allowDebug:true mayProceed:true
 
     "Modified: / 17.8.1998 / 10:09:27 / cg"
 !
 
 errorNotify:aString from:aContext allowDebug:allowDebug
     "launch a Notifier, showing top stack (above aContext),
+     telling user something and give user a chance to enter debugger."
+
+    ^ self errorNotify:aString from:aContext allowDebug:allowDebug mayProceed:true
+!
+
+errorNotify:aString from:aContext allowDebug:allowDebug mayProceed:mayProceed
+    "launch a Notifier, showing top stack (above aContext),
      telling user something and optionally give the user a chance to enter debugger."
 
     |currentScreen con sender action boxLabels boxValues default s|
@@ -9487,9 +9495,14 @@
                 ]
             ].
 
-            boxLabels := #('Proceed').
-            boxValues := #(#proceed).
-            default := #proceed.
+            mayProceed ifTrue:[
+                boxLabels := #('Proceed').
+                boxValues := #(#proceed).
+                default := #proceed.
+            ] ifFalse:[
+                boxLabels := #().
+                boxValues := #().
+            ].
 
             AbortOperationRequest isHandled ifTrue:[
                 default := #abort.
@@ -9500,7 +9513,7 @@
                     boxValues := boxValues , #(#copyAndAbort).
                 ]
             ] ifFalse:[
-                true "allowDebug" ifTrue:[
+                mayProceed "and:[allowDebug]" ifTrue:[
                     boxLabels := boxLabels , #('Copy Trace and Proceed').
                     boxValues := boxValues , #(#copyAndProceed).
                 ].
@@ -9524,7 +9537,7 @@
     ].
 
     action == #debug ifTrue:[
-        ^ Debugger enter:sender withMessage:aString mayProceed:true
+        ^ Debugger enter:sender withMessage:aString mayProceed:mayProceed
     ].
     action == #proceed ifTrue:[
         ^ nil.
@@ -9653,15 +9666,15 @@
 !Object class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.720 2013-05-07 14:04:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.722 2013-05-16 10:39:47 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.720 2013-05-07 14:04:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.722 2013-05-16 10:39:47 stefan Exp $'
 !
 
 version_SVN
-    ^ '§ Id: Object.st 10643 2011-06-08 21:53:07Z vranyj1  §'
+    ^ '$ Id: Object.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !
 
 
--- a/ObjectMemory.st	Tue May 21 21:58:09 2013 +0100
+++ b/ObjectMemory.st	Fri May 24 18:52:05 2013 +0100
@@ -3939,18 +3939,13 @@
     "return the setting of the optimize contexts flag"
 
 %{  /* NOCONTEXT */
-#ifndef WIN32
     extern int __optimizeContexts();
 
     RETURN (__optimizeContexts(-1) ? true : false);
-#else
-	RETURN ( true );
-#endif
 %}
     "
      ObjectMemory optimizeContexts
     "
-
 !
 
 optimizeContexts:aBoolean
@@ -3959,25 +3954,20 @@
      Execution is a bit slower if enabled."
 
 %{  /* NOCONTEXT */
-#ifndef WIN32
     extern int __optimizeContexts();
     int prev;
 
     prev = __optimizeContexts(aBoolean == true
-				   ? 1
-				   : (aBoolean == false)
-					? 0
-					: -1);
+                                   ? 1
+                                   : (aBoolean == false)
+                                        ? 0
+                                        : -1);
     RETURN (prev ? true : false);
-#else
-	RETURN ( true );
-#endif
 %}
     "
      ObjectMemory optimizeContexts:true
      ObjectMemory optimizeContexts:false
     "
-
 !
 
 reEnableJustInTimeCompilation
@@ -5514,11 +5504,11 @@
 !ObjectMemory class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.267 2013-03-31 12:50:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.268 2013-05-11 17:42:41 stefan Exp $'
 !
 
 version_SVN
-    ^ '§ Id: ObjectMemory.st 10643 2011-06-08 21:53:07Z vranyj1  §'
+    ^ '$ Id: ObjectMemory.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !
 
 
--- a/QuerySignal.st	Tue May 21 21:58:09 2013 +0100
+++ b/QuerySignal.st	Fri May 24 18:52:05 2013 +0100
@@ -289,7 +289,7 @@
     "{ Pragma: +inlineNew }"
     "answer a new exception object for this signal"
 
-    ^ Query basicNew setSignal:self.
+    ^ Query basicNew creator:self.
 
     "
       |querySignal|
@@ -510,10 +510,10 @@
 !QuerySignal class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/QuerySignal.st,v 1.46 2013-04-19 08:41:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/QuerySignal.st,v 1.47 2013-05-13 13:47:28 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/QuerySignal.st,v 1.46 2013-04-19 08:41:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/QuerySignal.st,v 1.47 2013-05-13 13:47:28 stefan Exp $'
 ! !
 
--- a/ReadStream.st	Tue May 21 21:58:09 2013 +0100
+++ b/ReadStream.st	Fri May 24 18:52:05 2013 +0100
@@ -36,7 +36,7 @@
 
 documentation
 "
-    ReadStream defines protocol for reading streamwise over collections. 
+    ReadStream defines protocol for reading streamwise over collections.
 
     [author:]
 	Claus Gittinger
@@ -47,7 +47,7 @@
 !ReadStream class methodsFor:'blocked instance creation'!
 
 with:aCollection
-    "with on readStream makes no sense 
+    "with on readStream makes no sense
      - what do you want to read from the end of a collection?"
     <resource:#obsolete>
 
@@ -57,20 +57,20 @@
 
 !ReadStream methodsFor:'Compatibility-Dolphin'!
 
-skipWhile:aBlock 
+skipWhile:aBlock
     "skip all elements for which aBlock returns true. Return true if more elements can be read,
      false if eof has been reached."
 
     [self atEnd] whileFalse:[
-        (aBlock value: self peek) ifFalse:[^ true].
-        self next
+	(aBlock value: self peek) ifFalse:[^ true].
+	self next
     ].
     ^ false
 
     "
      #(1 2 3 4 5 6 7 8 9 10) readStream
-        skipWhile:[:el | el <= 5];
-        next
+	skipWhile:[:el | el <= 5];
+	next
     "
 
     "Created: / 23-09-2011 / 13:32:40 / cg"
@@ -100,7 +100,7 @@
 emphasis
     "return the emphasis of the current (i.e. next returned by #next)
      element. Streams on a string will return nil for all elements.
-     Streams on collections which nothing at all about emphasises, 
+     Streams on collections which nothing at all about emphasises,
      will report an error."
 
     ^ collection emphasisAt:(position - ZeroPosition + 1).
@@ -109,13 +109,13 @@
      |t s|
 
      t := 'hello world' asText
-                emphasizeFrom:1 to:5 with:#bold;
-                emphasizeFrom:7 to:11 with:#italic.
+		emphasizeFrom:1 to:5 with:#bold;
+		emphasizeFrom:7 to:11 with:#italic.
 
      s := t readStream.
      [s atEnd] whileFalse:[
-        Transcript show:(s emphasis); show:' '.
-        Transcript show:''''; show:(s next); showCR:''''.
+	Transcript show:(s emphasis); show:' '.
+	Transcript show:''''; show:(s next); showCR:''''.
      ].
     "
 
@@ -171,42 +171,42 @@
 
     if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if (pos > 0 && pos <= __intVal(l)) {
-            OBJ cls, ret;
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if (pos > 0 && pos <= __intVal(l)) {
+	    OBJ cls, ret;
 
-            cls = __qClass(coll);
-            if (cls == @global(String)) {
-                if (pos <= __stringSize(coll)) {
-                    ch = __stringVal(coll)[pos-1];
-                    ret = __MKCHARACTER(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(ByteArray)) {
-                if (pos <= __byteArraySize(coll)) {
-                    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
-                    ret = __mkSmallInteger(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(Unicode16String)) {
-                if (pos <= __unicode16StringSize(coll)) {
-                    ch = __Unicode16StringInstPtr(coll)->s_element[pos-1];
-                    ret = __MKUCHARACTER(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(Array)) {
-                if (pos <= __arraySize(coll)) {
-                    ret = __ArrayInstPtr(coll)->a_element[pos-1];
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            }
-        }
+	    cls = __qClass(coll);
+	    if (cls == @global(String)) {
+		if (pos <= __stringSize(coll)) {
+		    ch = __stringVal(coll)[pos-1];
+		    ret = __MKCHARACTER(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(ByteArray)) {
+		if (pos <= __byteArraySize(coll)) {
+		    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
+		    ret = __mkSmallInteger(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(Unicode16String)) {
+		if (pos <= __unicode16StringSize(coll)) {
+		    ch = __Unicode16StringInstPtr(coll)->s_element[pos-1];
+		    ret = __MKUCHARACTER(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(Array)) {
+		if (pos <= __arraySize(coll)) {
+		    ret = __ArrayInstPtr(coll)->a_element[pos-1];
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    }
+	}
     }
 %}.
     ((position + 1 - ZeroPosition) > readLimit) ifTrue:[^ self pastEndRead].
@@ -222,19 +222,19 @@
     |answer|
 
     self contentsSpecies = collection class ifTrue:[
-        ((position + count - ZeroPosition) > readLimit) ifFalse:[
-            answer := collection copyFrom:position+1 to:position+count.
-            position := position+count.
-            ^ answer
-        ].
+	((position + count - ZeroPosition) > readLimit) ifFalse:[
+	    answer := collection copyFrom:position+1 to:position+count.
+	    position := position+count.
+	    ^ answer
+	].
     ].
     ^ super next:count
 
     "
      #[1 2 3 4 5 6 7 8 9] readStream
-        next;      
-        next:5;    
-        next.
+	next;
+	next:5;
+	next.
     "
 !
 
@@ -256,54 +256,54 @@
     coll = __INST(collection);
     p = __INST(position);
     l = __INST(readLimit);
-    
+
     if (__isStringLike(coll) && __bothSmallInteger(p, l)) {
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
 
-        limit = __intVal(l);
-        sz = __qSize(coll) - OHDR_SIZE;
-        if (sz < limit)
-            limit = sz; 
-        cp = __stringVal(coll) + pos - 1;
+	limit = __intVal(l);
+	sz = __qSize(coll) - OHDR_SIZE;
+	if (sz < limit)
+	    limit = sz;
+	cp = __stringVal(coll) + pos - 1;
 
-        for (;;) {
-            if (pos > limit) break;
-            ch = *cp;
+	for (;;) {
+	    if (pos > limit) break;
+	    ch = *cp;
 
-            if (((ch >= 'a') && (ch <= 'z')) ||
-                ((ch >= 'A') && (ch <= 'Z')) ||
-                ((ch >= '0') && (ch <= '9')))
-                break;
-            cp++;
-            pos++;
-        }
+	    if (((ch >= 'a') && (ch <= 'z')) ||
+		((ch >= 'A') && (ch <= 'Z')) ||
+		((ch >= '0') && (ch <= '9')))
+		break;
+	    cp++;
+	    pos++;
+	}
 
-        len = 0;
-        for (;;) {
-            if (pos > limit) break;
-            ch = *cp & 0xFF;
+	len = 0;
+	for (;;) {
+	    if (pos > limit) break;
+	    ch = *cp & 0xFF;
 
-            if (! (((ch >= 'a') && (ch <= 'z')) ||
-                   ((ch >= 'A') && (ch <= 'Z')) ||
-                   ((ch >= '0') && (ch <= '9'))))
-                break;
-            buffer[len++] = ch;
-            if (len >= (sizeof(buffer)-1)) {
-                /* emergency */
-                break;
-            }
-            pos++;
-            cp++;
-        }
+	    if (! (((ch >= 'a') && (ch <= 'z')) ||
+		   ((ch >= 'A') && (ch <= 'Z')) ||
+		   ((ch >= '0') && (ch <= '9'))))
+		break;
+	    buffer[len++] = ch;
+	    if (len >= (sizeof(buffer)-1)) {
+		/* emergency */
+		break;
+	    }
+	    pos++;
+	    cp++;
+	}
 
-        /* make ZeroPosition-based */
-        pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-        __INST(position) = __mkSmallInteger(pos);
-        buffer[len] = '\0';
-        RETURN ( (len != 0) ? __MKSTRING_L(buffer, len) : nil );
+	/* make ZeroPosition-based */
+	pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+	__INST(position) = __mkSmallInteger(pos);
+	buffer[len] = '\0';
+	RETURN ( (len != 0) ? __MKSTRING_L(buffer, len) : nil );
     }
 %}
 .
@@ -329,35 +329,35 @@
 
     if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if (pos > 0 && pos <= __intVal(l)) {
-            OBJ cls, ret;
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if (pos > 0 && pos <= __intVal(l)) {
+	    OBJ cls, ret;
 
-            cls = __qClass(coll);
-            if (cls == @global(String)) {
-                if (pos <= __stringSize(coll)) {
-                    ch = __stringVal(coll)[pos-1];
-                    ret = __mkSmallInteger(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(ByteArray)) {
-                if (pos <= __byteArraySize(coll)) {
-                    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
-                    ret = __mkSmallInteger(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(Array)) {
-                if (pos <= __arraySize(coll)) {
-                    ret = __ArrayInstPtr(coll)->a_element[pos-1];
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            }
-        }
+	    cls = __qClass(coll);
+	    if (cls == @global(String)) {
+		if (pos <= __stringSize(coll)) {
+		    ch = __stringVal(coll)[pos-1];
+		    ret = __mkSmallInteger(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(ByteArray)) {
+		if (pos <= __byteArraySize(coll)) {
+		    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
+		    ret = __mkSmallInteger(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(Array)) {
+		if (pos <= __arraySize(coll)) {
+		    ret = __ArrayInstPtr(coll)->a_element[pos-1];
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    }
+	}
     }
 %}.
     ((position + 1 - ZeroPosition) > readLimit) ifTrue:[^ self pastEndRead].
@@ -374,20 +374,20 @@
      The receiver must support reading of binary bytes.
 
      Notice: this method is provided here for protocol completeness
-             with externalStreams - it is normally not used with other
-             streams."
+	     with externalStreams - it is normally not used with other
+	     streams."
 
-    ((initialIndex + numBytes - 1) <= aCollection size 
-        and:[(position + numBytes) <= readLimit 
-        and:[collection isByteCollection 
-        and:[aCollection isByteCollection
+    ((initialIndex + numBytes - 1) <= aCollection size
+	and:[(position + numBytes) <= readLimit
+	and:[collection isByteCollection
+	and:[aCollection isByteCollection
     ]]]) ifTrue:[
-        "do it the fast way"
-        aCollection 
-            replaceBytesFrom:initialIndex to:(initialIndex + numBytes - 1) 
-            with:collection startingAt:position+1.
-        position := position + numBytes.
-        ^ numBytes
+	"do it the fast way"
+	aCollection
+	    replaceBytesFrom:initialIndex to:(initialIndex + numBytes - 1)
+	    with:collection startingAt:position+1.
+	position := position + numBytes.
+	^ numBytes
     ].
     "do it the hard way"
     ^ super nextBytes:numBytes into:aCollection startingAt:initialIndex
@@ -419,32 +419,32 @@
     coll = __INST(collection);
     p = __INST(position);
     l = __INST(readLimit);
-    
+
     if (__isStringLike(coll) && __bothSmallInteger(p, l)) {
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        limit = __intVal(l);
-        sz = __qSize(coll) - OHDR_SIZE;
-        if (sz < limit)
-            limit = sz; 
-        cp = __stringVal(coll) + pos - 1;
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	limit = __intVal(l);
+	sz = __qSize(coll) - OHDR_SIZE;
+	if (sz < limit)
+	    limit = sz;
+	cp = __stringVal(coll) + pos - 1;
 
-        for (;;) {
-            if (pos > limit) break;
-            ch = *cp;
+	for (;;) {
+	    if (pos > limit) break;
+	    ch = *cp;
 
-            if ((ch < '0') || (ch > '9')) break;
-            val = val * 10 + (ch - '0');
-            pos++;
-            if (val > (_MAX_INT / 10)) goto oops;
-            cp++;
-        }
-        /* make ZeroPosition-based */
-        pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-        __INST(position) = __mkSmallInteger(pos);
-        RETURN (__mkSmallInteger(val));
+	    if ((ch < '0') || (ch > '9')) break;
+	    val = val * 10 + (ch - '0');
+	    pos++;
+	    if (val > (_MAX_INT / 10)) goto oops;
+	    cp++;
+	}
+	/* make ZeroPosition-based */
+	pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+	__INST(position) = __mkSmallInteger(pos);
+	RETURN (__mkSmallInteger(val));
     }
 oops:
     value = __mkSmallInteger(val);
@@ -456,8 +456,8 @@
 
     nextOne := self peek.
     [nextOne notNil and:[nextOne isDigitRadix:10]] whileTrue:[
-        value := (value * 10) + nextOne digitValue.
-        nextOne := self nextPeek
+	value := (value * 10) + nextOne digitValue.
+	nextOne := self nextPeek
     ].
     ^ value
 !
@@ -480,46 +480,46 @@
     l = __INST(readLimit);
 
     if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if (pos > 0) {
-            OBJ cls, ret;
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if (pos > 0) {
+	    OBJ cls, ret;
 
-            if (pos > __intVal(l)) {
-                RETURN(nil);
-            }
+	    if (pos > __intVal(l)) {
+		RETURN(nil);
+	    }
 
-            cls = __qClass(coll);
-            if (cls == @global(String)) {
-                if (pos <= __stringSize(coll)) {
-                    ch = __stringVal(coll)[pos-1];
-                    ret = __MKCHARACTER(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(ByteArray)) {
-                if (pos <= __byteArraySize(coll)) {
-                    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
-                    ret = __mkSmallInteger(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(Unicode16String)) {
-                if (pos <= __unicode16StringSize(coll)) {
-                    ch = __Unicode16StringInstPtr(coll)->s_element[pos-1];
-                    ret = __MKUCHARACTER(ch);
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            } else if (cls == @global(Array)) {
-                if (pos <= __arraySize(coll)) {
-                    ret = __ArrayInstPtr(coll)->a_element[pos-1];
-                    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
-                    RETURN ( ret );
-                }
-            }
-        }
+	    cls = __qClass(coll);
+	    if (cls == @global(String)) {
+		if (pos <= __stringSize(coll)) {
+		    ch = __stringVal(coll)[pos-1];
+		    ret = __MKCHARACTER(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(ByteArray)) {
+		if (pos <= __byteArraySize(coll)) {
+		    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
+		    ret = __mkSmallInteger(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(Unicode16String)) {
+		if (pos <= __unicode16StringSize(coll)) {
+		    ch = __Unicode16StringInstPtr(coll)->s_element[pos-1];
+		    ret = __MKUCHARACTER(ch);
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    } else if (cls == @global(Array)) {
+		if (pos <= __arraySize(coll)) {
+		    ret = __ArrayInstPtr(coll)->a_element[pos-1];
+		    __INST(position) = __mkSmallInteger(__intVal(__INST(position)) + 1);
+		    RETURN ( ret );
+		}
+	    }
+	}
     }
 %}.
     ret := collection at:(position + 1 - ZeroPosition).
@@ -540,20 +540,20 @@
     l = __INST(readLimit);
 
     if (__isStringLike(coll) && __bothSmallInteger(p, l)) {
-        REGISTER int pos;
-        unsigned ch;
+	REGISTER int pos;
+	unsigned ch;
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if ((pos > 0) && (pos < __intVal(l)) && (pos < __stringSize(coll))) {
-            pos = pos + 1;
-            ch = __stringVal(coll)[pos-1];
-            /* make ZeroPosition-based */
-            pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-            __INST(position) = __mkSmallInteger(pos);
-            RETURN ( __MKCHARACTER(ch) );
-        }
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if ((pos > 0) && (pos < __intVal(l)) && (pos < __stringSize(coll))) {
+	    pos = pos + 1;
+	    ch = __stringVal(coll)[pos-1];
+	    /* make ZeroPosition-based */
+	    pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+	    __INST(position) = __mkSmallInteger(pos);
+	    RETURN ( __MKCHARACTER(ch) );
+	}
     }
 %}.
     ((position + 1 - ZeroPosition) > readLimit) ifTrue:[^ self pastEndRead].
@@ -580,27 +580,27 @@
 
     if (__isNonNilObject(coll) && __bothSmallInteger(p, l)) {
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if (pos <= __intVal(l) && pos > 0) {
-            cls = __qClass(coll);
-            if (cls == @global(String)) {
-                if (pos <= __stringSize(coll)) {
-                    ch = __stringVal(coll)[pos-1];
-                    RETURN ( __MKCHARACTER(ch) );
-                }
-            } else if (cls == @global(ByteArray)) {
-                if (pos <= __byteArraySize(coll)) {
-                    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
-                    RETURN ( __mkSmallInteger(ch) );
-                }
-            } else if (cls == @global(Array)) {
-                if (pos <= __arraySize(coll)) {
-                    RETURN ( __ArrayInstPtr(coll)->a_element[pos-1]);
-                }
-            }
-        }
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if (pos <= __intVal(l) && pos > 0) {
+	    cls = __qClass(coll);
+	    if (cls == @global(String)) {
+		if (pos <= __stringSize(coll)) {
+		    ch = __stringVal(coll)[pos-1];
+		    RETURN ( __MKCHARACTER(ch) );
+		}
+	    } else if (cls == @global(ByteArray)) {
+		if (pos <= __byteArraySize(coll)) {
+		    ch = __ByteArrayInstPtr(coll)->ba_element[pos-1];
+		    RETURN ( __mkSmallInteger(ch) );
+		}
+	    } else if (cls == @global(Array)) {
+		if (pos <= __arraySize(coll)) {
+		    RETURN ( __ArrayInstPtr(coll)->a_element[pos-1]);
+		}
+	    }
+	}
     }
 %}.
     ((position + 1 - ZeroPosition) > readLimit) ifTrue:[^ self pastEndRead].
@@ -670,46 +670,46 @@
     l = __INST(readLimit);
 
     if (__isStringLike(coll) && __bothSmallInteger(p, l)) {
-        REGISTER unsigned char *chars;
-        REGISTER unsigned ch;
-        REGISTER int pos;
-        int limit;
-        int sz;
+	REGISTER unsigned char *chars;
+	REGISTER unsigned ch;
+	REGISTER int pos;
+	int limit;
+	int sz;
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if (pos <= 0) {
-            RETURN ( nil );
-        }
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if (pos <= 0) {
+	    RETURN ( nil );
+	}
 
-        limit = __intVal(l);
-        sz = __qSize(coll) - OHDR_SIZE;
-        if (limit > sz) {
-            limit = sz;
-        }
+	limit = __intVal(l);
+	sz = __qSize(coll) - OHDR_SIZE;
+	if (limit > sz) {
+	    limit = sz;
+	}
 
-        chars = (unsigned char *)(__stringVal(coll) + pos - 1);
-        while (pos <= limit) {
-            pos++;
-            ch = *chars++;
-            if ((ch > 0x20)
-             || ((ch != ' ')
-                 && (ch != '\t')
-                 && (ch != '\r')
-                 && (ch != '\n')
-                 && (ch != '\f')
-                 && (ch != 0x0B))) {
-                /* make ZeroPosition-based */
-                pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-                __INST(position) = __mkSmallInteger(pos-1);
-                RETURN ( __MKCHARACTER(ch) );
-            }
-        }
-        /* make ZeroPosition-based */
-        pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-        __INST(position) = __mkSmallInteger(pos);
-        RETURN ( nil );
+	chars = (unsigned char *)(__stringVal(coll) + pos - 1);
+	while (pos <= limit) {
+	    pos++;
+	    ch = *chars++;
+	    if ((ch > 0x20)
+	     || ((ch != ' ')
+		 && (ch != '\t')
+		 && (ch != '\r')
+		 && (ch != '\n')
+		 && (ch != '\f')
+		 && (ch != 0x0B))) {
+		/* make ZeroPosition-based */
+		pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+		__INST(position) = __mkSmallInteger(pos-1);
+		RETURN ( __MKCHARACTER(ch) );
+	    }
+	}
+	/* make ZeroPosition-based */
+	pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+	__INST(position) = __mkSmallInteger(pos);
+	RETURN ( nil );
     }
 %}.
     ^ super skipSeparators
@@ -737,43 +737,43 @@
     l = __INST(readLimit);
 
     if (__isStringLike(coll) && __bothSmallInteger(p, l)) {
-        REGISTER unsigned char *chars;
-        REGISTER unsigned ch;
-        REGISTER int pos;
-        int limit;
+	REGISTER unsigned char *chars;
+	REGISTER unsigned ch;
+	REGISTER int pos;
+	int limit;
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if (pos <= 0) {
-            RETURN ( nil );
-        }
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if (pos <= 0) {
+	    RETURN ( nil );
+	}
 
-        limit = __intVal(l);
-        if (limit > (__qSize(coll) - OHDR_SIZE))
-            limit = __qSize(coll) - OHDR_SIZE;
+	limit = __intVal(l);
+	if (limit > (__qSize(coll) - OHDR_SIZE))
+	    limit = __qSize(coll) - OHDR_SIZE;
 
-        chars = (unsigned char *)(__stringVal(coll) + pos - 1);
-        while (pos <= limit) {
-            ch = *chars++;
-            if (((int)ch > 0x20)
-             || (
-                 (ch != ' ') 
-                 && (ch != '\t')
-                 && (ch != '\f')
-                 && (ch != '\b')
-                 && (ch != 0x0B))) {
-                /* make ZeroPosition-based */
-                pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-                __INST(position) = __mkSmallInteger(pos);
-                RETURN ( __MKCHARACTER(ch) );
-            }
-            pos++;
-        }
-        /* make ZeroPosition-based */
-        pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-        __INST(position) = __mkSmallInteger(pos);
-        RETURN ( nil );
+	chars = (unsigned char *)(__stringVal(coll) + pos - 1);
+	while (pos <= limit) {
+	    ch = *chars++;
+	    if (((int)ch > 0x20)
+	     || (
+		 (ch != ' ')
+		 && (ch != '\t')
+		 && (ch != '\f')
+		 && (ch != '\b')
+		 && (ch != 0x0B))) {
+		/* make ZeroPosition-based */
+		pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+		__INST(position) = __mkSmallInteger(pos);
+		RETURN ( __MKCHARACTER(ch) );
+	    }
+	    pos++;
+	}
+	/* make ZeroPosition-based */
+	pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+	__INST(position) = __mkSmallInteger(pos);
+	RETURN ( nil );
     }
 %}
 .
@@ -782,7 +782,7 @@
 
 skipThrough:anObject
     "skip all objects up-to and including anObject.
-     Return the receiver if skip was successful, 
+     Return the receiver if skip was successful,
      otherwise (i.e. if not found) return nil and leave the stream positioned at the end.
      On success, the next read operation will return the element after anObject.
      - reimplemented for speed on String-Streams for faster scanning"
@@ -797,40 +797,40 @@
     if (__isStringLike(coll)
      && __isCharacter(anObject)
      && __bothSmallInteger(p, l)) {
-        REGISTER unsigned char *chars;
-        REGISTER int pos, limit;
-        unsigned ch;
-        int sz;
+	REGISTER unsigned char *chars;
+	REGISTER int pos, limit;
+	unsigned ch;
+	int sz;
 
-        pos = __intVal(p);
-        /* make 1-based */
-        pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
-        if (pos <= 0) {
-            RETURN ( nil );
-        }
+	pos = __intVal(p);
+	/* make 1-based */
+	pos = pos + 1 - __intVal( @global(PositionableStream:ZeroPosition));
+	if (pos <= 0) {
+	    RETURN ( nil );
+	}
 
-        limit = __intVal(l);
-        sz = __stringSize(coll);
-        if (limit > sz) limit = sz;
+	limit = __intVal(l);
+	sz = __stringSize(coll);
+	if (limit > sz) limit = sz;
 
-        chars = (unsigned char *)(__stringVal(coll) + pos - 1);
-        ch = __intVal(_characterVal(anObject)) & 0xFF;
-        while (pos < limit) {
-            if (*chars == ch) {
-                ch = *++chars;
-                pos++;
-                /* make ZeroPosition-based */
-                pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-                __INST(position) = __mkSmallInteger(pos);
-                RETURN ( self );
-            }
-            chars++;
-            pos++;
-        }
-        /* make ZeroPosition-based */
-        pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
-        __INST(position) = __mkSmallInteger(pos+1);
-        RETURN ( nil );
+	chars = (unsigned char *)(__stringVal(coll) + pos - 1);
+	ch = __intVal(__characterVal(anObject)) & 0xFF;
+	while (pos < limit) {
+	    if (*chars == ch) {
+		ch = *++chars;
+		pos++;
+		/* make ZeroPosition-based */
+		pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+		__INST(position) = __mkSmallInteger(pos);
+		RETURN ( self );
+	    }
+	    chars++;
+	    pos++;
+	}
+	/* make ZeroPosition-based */
+	pos = pos - 1 + __intVal( @global(PositionableStream:ZeroPosition));
+	__INST(position) = __mkSmallInteger(pos+1);
+	RETURN ( nil );
     }
 %}.
     ^ super skipThrough:anObject
@@ -847,10 +847,10 @@
 !ReadStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.66 2013-03-22 14:24:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.67 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.66 2013-03-22 14:24:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.67 2013-05-21 20:44:47 cg Exp $'
 ! !
 
--- a/Signal.st	Tue May 21 21:58:09 2013 +0100
+++ b/Signal.st	Fri May 24 18:52:05 2013 +0100
@@ -307,7 +307,7 @@
     "answer a new exception object for this signal.
      Subclasses may redefine this method"
 
-    ^ Exception basicNew setSignal:self
+    ^ Exception basicNew creator:self
 
     "Created: / 26.2.1998 / 19:53:56 / stefan"
     "Modified: / 23.7.1999 / 13:41:00 / stefan"
@@ -980,10 +980,10 @@
 !Signal class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.111 2013-04-19 08:41:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.112 2013-05-13 13:47:45 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.111 2013-04-19 08:41:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.112 2013-05-13 13:47:45 stefan Exp $'
 ! !
 
--- a/SmallInteger.st	Tue May 21 21:58:09 2013 +0100
+++ b/SmallInteger.st	Fri May 24 18:52:05 2013 +0100
@@ -13,7 +13,7 @@
 
 Integer subclass:#SmallInteger
 	instanceVariableNames:''
-	classVariableNames:''
+	classVariableNames:'ZeroString'
 	poolDictionaries:''
 	category:'Magnitude-Numbers'
 !
@@ -97,6 +97,12 @@
     ^ 1 bitShift:(index - 1)
 ! !
 
+!SmallInteger class methodsFor:'class initialization'!
+
+initialize
+    ZeroString := '0'
+! !
+
 !SmallInteger class methodsFor:'constants'!
 
 maxBits
@@ -802,7 +808,6 @@
 ! !
 
 
-
 !SmallInteger methodsFor:'bit operators'!
 
 bitAnd:anInteger
@@ -3716,18 +3721,18 @@
      upon the printOn: method."
 
 %{  /* NOCONTEXT */
-
-    char buffer[30];
+    char buffer[30];    /* enough for 64 bit machines */
     char *cp;
     OBJ newString = nil;
     INT myValue;
     int negative = 0;
     int len;
 
+    if (self == __MKSMALLINT(0)) {
+        RETURN (@global(ZeroString));
+//        RETURN (__MKSTRING_L("0", 1));
+    }
     myValue = __intVal(self);
-    if (myValue == 0) {
-	RETURN (__MKSTRING_L("0", 1));
-    }
 #ifdef SLOW_CODE
     /*
      * this takes twice as long as the code below ...
@@ -3735,37 +3740,37 @@
      */
 
     /*
+     * PROTECT_REGISTERS: 
      * actually only needed on sparc: since thisContext is
      * in a global register, which gets destroyed by printf,
      * manually save it here - very stupid ...
      */
     __BEGIN_PROTECT_REGISTERS__
-    len = snprintf(buffer, sizeof(buffer), "%"_ld_"", (long)myValue);
+    len = snprintf(buffer, sizeof(buffer), "%"_ld_"", myValue);
     __END_PROTECT_REGISTERS__
 
     if (len >= 0 && len <= sizeof(buffer)) {
-	newString = __MKSTRING_L(buffer, len);
+        newString = __MKSTRING_L(buffer, len);
     }
-
 #else
     if (myValue < 0) {
-	negative = 1;
-	myValue = -myValue;
+        negative = 1;
+        myValue = -myValue;
     }
     cp = buffer + sizeof(buffer) - 1;
     *cp-- = '\0';
     while (myValue != 0) {
-	*cp = '0' + (myValue % 10);
-	myValue = myValue / 10;
-	cp--;
+        *cp = '0' + (myValue % 10);
+        myValue = myValue / 10;
+        cp--;
     }
     if (negative) {
-	*cp-- = '-';
+        *cp-- = '-';
     }
     newString = __MKSTRING_L(cp+1, (buffer + sizeof(buffer) - 2 - cp));
 #endif
     if (newString != nil) {
-	RETURN (newString);
+        RETURN (newString);
     }
 %}.
     "/ only arrive here,
@@ -3776,6 +3781,13 @@
      1234 printString
      0    printString
      -100 printString
+
+    Time millisecondsToRun:[ 1000000 timesRepeat:[ 123456789012 printString ]] 180 180 180 170 180
+    Time millisecondsToRun:[ 1000000 timesRepeat:[ 12345678 printString ]]     140 150 140 150 140
+    Time millisecondsToRun:[ 1000000 timesRepeat:[ 1234 printString ]]         130 140 130 130 130
+    Time millisecondsToRun:[ 1000000 timesRepeat:[ 12 printString ]]           130 120 120 120 110
+    Time millisecondsToRun:[ 1000000 timesRepeat:[ 5 printString ]]            110 110 100 110 90
+    Time millisecondsToRun:[ 1000000 timesRepeat:[ 0 printString ]]             60 
     "
 !
 
@@ -3785,7 +3797,7 @@
     |s|
 
 %{
-    char buffer[64+3];  /* for alpha, base 2 plus sign */
+    char buffer[64+3];  /* for 64bit machines, base 2, plus sign, plus 0-byte */
     char *cp;
     OBJ newString;
     INT myValue;
@@ -3793,72 +3805,74 @@
     INT __base;
 
     if (__isSmallInteger(base)) {
-	myValue = __intVal(self);
-	if (myValue == 0) {
-	    RETURN (__MKSTRING_L("0", 1));
-	}
-	__base = __intVal(base);
+        if (self == __MKSMALLINT(0)) {
+            RETURN (__MKSTRING_L("0", 1));
+        }
+        myValue = __intVal(self);
+        __base = __intVal(base);
 
 #ifdef SLOW_CODE
-	switch (__base) {
-	    case 10:
-		format = "%"_ld_"";
-		break;
-	    case 16:
-		format = "%"_lx_"";
-		break;
-	    case 8:
-		format = "%"_lo_"";
-		break;
-	}
-
-	if (format) {
-	    /*
-	     * actually only needed on sparc: since thisContext is
-	     * in a global register, which gets destroyed by printf,
-	     * manually save it here - very stupid ...
-	     */
-	    __BEGIN_PROTECT_REGISTERS__
-
-	    len = snprintf(buffer, sizeof(buffer), format, (long)myValue);
-
-	    __END_PROTECT_REGISTERS__
-
-	    if (len > 0 && len <= sizeof(buffer)) {
-		newString = __MKSTRING_L(buffer, len);
-		if (newString != nil) {
-		    RETURN (newString);
-		}
-	    }
-	}
+        /* disabled, because printf is slower than the code below */
+
+        switch (__base) {
+            case 10:
+                format = "%"_ld_"";
+                break;
+            case 16:
+                format = "%"_lx_"";
+                break;
+            case 8:
+                format = "%"_lo_"";
+                break;
+        }
+
+        if (format) {
+            /*
+             * actually only needed on sparc: since thisContext is
+             * in a global register, which gets destroyed by printf,
+             * manually save it here - very stupid ...
+             */
+            __BEGIN_PROTECT_REGISTERS__
+
+            len = snprintf(buffer, sizeof(buffer), format, (long)myValue);
+
+            __END_PROTECT_REGISTERS__
+
+            if (len > 0 && len <= sizeof(buffer)) {
+                newString = __MKSTRING_L(buffer, len);
+                if (newString != nil) {
+                    RETURN (newString);
+                }
+            }
+        }
 #else
-	if ((__base <= 36) && (__base > 1)) {
-	    if (myValue < 0) {
-		negative = 1;
-		myValue = -myValue;
-	    }
-	    cp = buffer + sizeof(buffer) - 1;
-	    *cp-- = '\0';
-	    while (myValue != 0) {
-		int digit;
-
-		digit = myValue % __base;
-		if (digit <= 9) {
-		    *cp = '0' + digit;
-		} else {
-		    *cp = 'A' + digit - 10;
-		}
-		myValue = myValue / __base;
-		cp--;
-	    }
-	    if (negative) {
-		*cp-- = '-';
-	    }
-	    newString = __MKSTRING_L(cp+1, (buffer + sizeof(buffer) - 2 - cp));
-	    if (newString != nil) {
-		RETURN (newString);
-	    }
-	}
+        if ((__base <= 36) && (__base > 1)) {
+            if (myValue < 0) {
+                negative = 1;
+                myValue = -myValue;
+            }
+            cp = buffer + sizeof(buffer) - 1;
+            *cp-- = '\0';
+            while (myValue != 0) {
+                int digit;
+
+                digit = myValue % __base;
+                if (digit <= 9) {
+                    *cp = '0' + digit;
+                } else {
+                    *cp = 'A' + digit - 10;
+                }
+                myValue = myValue / __base;
+                cp--;
+            }
+            if (negative) {
+                *cp-- = '-';
+            }
+            newString = __MKSTRING_L(cp+1, (buffer + sizeof(buffer) - 2 - cp));
+            if (newString != nil) {
+                RETURN (newString);
+            }
+        }
 #endif
     }
 %}.
@@ -3896,20 +3910,18 @@
 printfPrintString:formatString
     "non-standard, but sometimes useful.
      return a printed representation of the receiver
-     as specified by formatString, which is defined by the C-
-     function 'printf'.
+     as specified by formatString, which is defined by the C-function 'printf'.
      No checking for string overrun - the resulting string
      must be shorter than 256 chars or else ...
      This method is NONSTANDARD and may be removed without notice;
-     it is provided to allow special conversions in very special
-     situaltions.
+     it is provided to allow special conversions in very special situations.
      Notice that a conversion may not be portable; for example,
      to correctly convert an int on a 64-bit alpha, a %ld is required,
      on 64bit mingw or visualc, %lld is required,
      while other systems may be happy with a %d.
-     (We cannot use lld unconditionally, because some (old) c compilers do not support it!!)
+     You cannot use lld unconditionally, because some (old) c printfs do not support it!!)
      Use at your own risk (if at all).
-     WARNNG: this goes directly to the C-printf function and may therefore me inherently unsafe.
+     WARNNG: this goes directly to the C-printf function and may therefore be inherently unsafe.
      Please use the printf: method, which is safe as it is completely implemented in Smalltalk."
 
 %{  /* STACK: 400 */
@@ -3918,34 +3930,34 @@
     int len;
 
     if (__isStringLike(formatString)) {
-	/*
-	 * actually only needed on sparc: since thisContext is
-	 * in a global register, which gets destroyed by printf,
-	 * manually save it here - very stupid ...
-	 */
-	__BEGIN_PROTECT_REGISTERS__
-
-	len = snprintf(buffer, sizeof(buffer), __stringVal(formatString), __intVal(self));
-
-	__END_PROTECT_REGISTERS__
-
-	if (len < 0) goto fail;
-
-	s = __MKSTRING_L(buffer, len);
-	if (s != nil) {
-	    RETURN (s);
-	}
+        /*
+         * actually only needed on sparc: since thisContext is
+         * in a global register, which gets destroyed by printf,
+         * manually save it here - very stupid ...
+         */
+        __BEGIN_PROTECT_REGISTERS__
+
+        len = snprintf(buffer, sizeof(buffer), __stringVal(formatString), __intVal(self));
+
+        __END_PROTECT_REGISTERS__
+
+        if (len < 0) goto fail;
+
+        s = __MKSTRING_L(buffer, len);
+        if (s != nil) {
+            RETURN (s);
+        }
     }
 fail: ;
 %}.
     self primitiveFailed
 
     "
-	123 printfPrintString:'%%d -> %d'
-	123 printfPrintString:'%%6d -> %6d'
-	123 printfPrintString:'%%x -> %x'
-	123 printfPrintString:'%%4x -> %4x'
-	123 printfPrintString:'%%04x -> %04x'
+        123 printfPrintString:'%%d -> %d'
+        123 printfPrintString:'%%6d -> %6d'   
+        123 printfPrintString:'%%x -> %x'     
+        123 printfPrintString:'%%4x -> %4x'   
+        123 printfPrintString:'%%04x -> %04x' 
     "
 ! !
 
@@ -4187,10 +4199,12 @@
 !SmallInteger class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.204 2013-04-25 07:02:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.205 2013-05-21 20:17:58 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.204 2013-04-25 07:02:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.205 2013-05-21 20:17:58 cg Exp $'
 ! !
 
+
+SmallInteger initialize!
--- a/Smalltalk.st	Tue May 21 21:58:09 2013 +0100
+++ b/Smalltalk.st	Fri May 24 18:52:05 2013 +0100
@@ -228,17 +228,17 @@
      right after startup, ususally immediately followed by Smalltalk>>start.
      [with error handling, via the initializeSystem]
      Notice:
-	this is not called when an image is restarted; in this
-	case the show starts in Smalltalk>>restart."
+        this is not called when an image is restarted; in this
+        case the show starts in Smalltalk>>restart."
 
     Compiler := ByteCodeCompiler.
     Compiler isNil ifTrue:[
-	"
-	 ByteCodeCompiler is not in the system (i.e. has not been linked in)
-	 this allows at least immediate evaluations for runtime systems without compiler
-	 NOTICE: a parser is always needed, otherwise we cannot read resource files etc.
-	"
-	Compiler := Parser
+        "
+         ByteCodeCompiler is not in the system (i.e. has not been linked in)
+         this allows at least immediate evaluations for runtime systems without compiler
+         NOTICE: a parser is always needed, otherwise we cannot read resource files etc.
+        "
+        Compiler := Parser
     ].
 
     "/
@@ -252,6 +252,7 @@
     "/ sorry - there are some, which MUST be initialized before ..
     "/ reason: if any error happens during init, we need Signals, Stdout etc. to be there
     "/
+    SmallInteger initialize.
     Object initialize.
     Stream initialize.
     PositionableStream initialize.
@@ -7972,11 +7973,11 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1026 2013-05-07 15:29:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1027 2013-05-21 23:28:19 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1026 2013-05-07 15:29:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1027 2013-05-21 23:28:19 cg Exp $'
 !
 
 version_HG
--- a/String.st	Tue May 21 21:58:09 2013 +0100
+++ b/String.st	Fri May 24 18:52:05 2013 +0100
@@ -442,7 +442,7 @@
     "return a string consisting of the cr-Character"
 
     CR isNil ifTrue:[
-        CR := String with:Character return
+	CR := String with:Character return
     ].
     ^ CR
 
@@ -477,10 +477,10 @@
     stringSize := aString size.
     hash := speciesHash bitAnd: 16rFFFFFFF.
     1 to: stringSize do: [:pos |
-        hash := hash + (aString at: pos) asInteger.
-        "Begin hashMultiply"
-        low := hash bitAnd: 16383.
-        hash := (16r260D * low + ((16r260D * (hash bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF.
+	hash := hash + (aString at: pos) asInteger.
+	"Begin hashMultiply"
+	low := hash bitAnd: 16383.
+	hash := (16r260D * low + ((16r260D * (hash bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF.
     ].
     ^ hash.
 !
@@ -489,7 +489,7 @@
     "return a string consisting of the tab-Character"
 
     TAB isNil ifTrue:[
-        TAB := String with:Character tab
+	TAB := String with:Character tab
     ].
     ^ TAB
 ! !
@@ -577,7 +577,7 @@
 
     if (__isString(slf)) {
 	if (__isCharacter(aCharacter)) {
-	    value = __intVal(_characterVal(aCharacter));
+	    value = __intVal(__characterVal(aCharacter));
 	    if (((unsigned)value <= 0xFF)
 	     && __isSmallInteger(index)) {
 		indx = __intVal(index) - 1;
@@ -638,7 +638,7 @@
     slf = self;
 
     if (__isCharacter(aCharacter)) {
-	value = __intVal(_characterVal(aCharacter));
+	value = __intVal(__characterVal(aCharacter));
 	if (((unsigned)value <= 0xFF)
 	 && __isSmallInteger(index)) {
 	    cls = __qClass(slf);
@@ -693,11 +693,11 @@
     cls = __qClass(slf);
     indx = 0;
     if (cls != String) {
-        if (indx < 0) goto badIndex;
-        indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+	if (indx < 0) goto badIndex;
+	indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
     }
     if ((unsigned)indx < (unsigned)(__stringSize(slf))) {
-        RETURN ( __MKCHARACTER(__stringVal(slf)[indx] & 0xFF) );
+	RETURN ( __MKCHARACTER(__stringVal(slf)[indx] & 0xFF) );
     }
 badIndex: ;
 %}.
@@ -758,40 +758,40 @@
     OBJ cls;
 
     if (__isStringLike(aCollection)) {
-        matchP = __stringVal(aCollection);
-        cp = __stringVal(self);
-        if ((cls = __qClass(self)) != String)
-            cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-
-        switch (__stringSize(aCollection)) {
-            case 3:
-                /* three character search */
-                if (strchr(cp, matchP[2])) {
-                    RETURN ( true );
-                }
-                /* fall into */
-            case 2:
-                /* two character search */
-                if (strchr(cp, matchP[1])) {
-                    RETURN ( true );
-                }
-                /* fall into */
-            case 1:
-                /* single character search */
-                if (strchr(cp, matchP[0])) {
-                    RETURN ( true );
-                }
-                /* fall into */
-            case 0:
-                RETURN ( false );
-        }
-        while (*cp) {
-            if (strchr(matchP, *cp)) {
-                RETURN ( true );
-            }
-            cp++;
-        }
-        RETURN ( false );
+	matchP = __stringVal(aCollection);
+	cp = __stringVal(self);
+	if ((cls = __qClass(self)) != String)
+	    cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+
+	switch (__stringSize(aCollection)) {
+	    case 3:
+		/* three character search */
+		if (strchr(cp, matchP[2])) {
+		    RETURN ( true );
+		}
+		/* fall into */
+	    case 2:
+		/* two character search */
+		if (strchr(cp, matchP[1])) {
+		    RETURN ( true );
+		}
+		/* fall into */
+	    case 1:
+		/* single character search */
+		if (strchr(cp, matchP[0])) {
+		    RETURN ( true );
+		}
+		/* fall into */
+	    case 0:
+		RETURN ( false );
+	}
+	while (*cp) {
+	    if (strchr(matchP, *cp)) {
+		RETURN ( true );
+	    }
+	    cp++;
+	}
+	RETURN ( false );
     }
 %}.
     ^ super includesAny:aCollection
@@ -829,92 +829,92 @@
     OBJ cls;
 
     if (__isSmallInteger(start)) {
-        index = __intVal(start);
-        if (index > 0) {
-            if (__isCharacter(aCharacter)) {
-                byteValue = __intVal(_characterVal(aCharacter));
-                if (byteValue <= 0xFF) {
-                    last = __stringSize(self);
-                    cp = __stringVal(self);
-                    if ((cls = __qClass(self)) != String) {
-                        int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-
-                        cp += numInstBytes;             
-                        last -= numInstBytes;
-                    }
-                    if (index <= last) {
-#ifdef FAST_MEMCHR    
-                        ncp = (unsigned char *) memchr(cp+index-1, byteValue, last+1-index);
-                        if (ncp) {
-                            RETURN ( __mkSmallInteger(ncp - cp + 1) );
-                        }
+	index = __intVal(start);
+	if (index > 0) {
+	    if (__isCharacter(aCharacter)) {
+		byteValue = __intVal(__characterVal(aCharacter));
+		if (byteValue <= 0xFF) {
+		    last = __stringSize(self);
+		    cp = __stringVal(self);
+		    if ((cls = __qClass(self)) != String) {
+			int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+
+			cp += numInstBytes;
+			last -= numInstBytes;
+		    }
+		    if (index <= last) {
+#ifdef FAST_MEMCHR
+			ncp = (unsigned char *) memchr(cp+index-1, byteValue, last+1-index);
+			if (ncp) {
+			    RETURN ( __mkSmallInteger(ncp - cp + 1) );
+			}
 #else
 # ifdef __UNROLL_LOOPS__
-                        {
-                            int last3 = last-3;
-
-                            for (; index <= last3; index += 4) {
-                                if (cp[index-1] == byteValue) { RETURN ( __mkSmallInteger(index) ); }
-                                if (cp[index-1+1] == byteValue) { RETURN ( __mkSmallInteger(index+1) ); }
-                                if (cp[index-1+2] == byteValue) { RETURN ( __mkSmallInteger(index+2) ); }
-                                if (cp[index-1+3] == byteValue) { RETURN ( __mkSmallInteger(index+3) ); }
-                            }
-                        }
+			{
+			    int last3 = last-3;
+
+			    for (; index <= last3; index += 4) {
+				if (cp[index-1] == byteValue) { RETURN ( __mkSmallInteger(index) ); }
+				if (cp[index-1+1] == byteValue) { RETURN ( __mkSmallInteger(index+1) ); }
+				if (cp[index-1+2] == byteValue) { RETURN ( __mkSmallInteger(index+2) ); }
+				if (cp[index-1+3] == byteValue) { RETURN ( __mkSmallInteger(index+3) ); }
+			    }
+			}
 # endif
 # ifdef V1
-                        for (; index <= last; index++) {
-                            if (cp[index-1] == byteValue) {
-                                RETURN ( __mkSmallInteger(index) );
-                            }
-                        }
+			for (; index <= last; index++) {
+			    if (cp[index-1] == byteValue) {
+				RETURN ( __mkSmallInteger(index) );
+			    }
+			}
 # endif
 # ifdef V2
-                        {
-                            // see bit twiddling hacks
+			{
+			    // see bit twiddling hacks
 #                           define hasZeroByte(v) (((v) - 0x01010101UL) & ~(v) & 0x80808080UL)
 #                           define hasByteM(v,m)   hasZeroByte( (v) ^ m)
 
-                            // the following loop checks four bytes at once
-                            if (((index-1) & 0x3) == 0) {
-                                int last4 = last-4;
-                                int m = (~0UL/255 * (byteValue));
-
-                                while (index <= last4) {
-                                    unsigned int v = *(unsigned int *)(cp+index-1);
-
-                                    if (hasByteM(v,m)) break;
-                                    index += 4;
-                                }
-                            }
-                            while (index <= last) {
-                                if (cp[index-1] == byteValue) {
-                                    RETURN ( __mkSmallInteger(index) );
-                                }
-                                index++;
-                            }
-                        }
+			    // the following loop checks four bytes at once
+			    if (((index-1) & 0x3) == 0) {
+				int last4 = last-4;
+				int m = (~0UL/255 * (byteValue));
+
+				while (index <= last4) {
+				    unsigned int v = *(unsigned int *)(cp+index-1);
+
+				    if (hasByteM(v,m)) break;
+				    index += 4;
+				}
+			    }
+			    while (index <= last) {
+				if (cp[index-1] == byteValue) {
+				    RETURN ( __mkSmallInteger(index) );
+				}
+				index++;
+			    }
+			}
 # endif
 #endif
-                    }
-                }
-            }
-            RETURN ( __mkSmallInteger(0) );
-        }
+		    }
+		}
+	    }
+	    RETURN ( __mkSmallInteger(0) );
+	}
     }
 #undef V2
 %}.
     ^ super indexOf:aCharacter startingAt:start
 
     "
-     'hello world' indexOf:$0 startingAt:1   
-     'hello world' indexOf:$l startingAt:1   
-     'hello world' indexOf:$l startingAt:5   
-     'hello world' indexOf:$d startingAt:5   
-     #[0 0 1 0 0] asString indexOf:(Character value:1) startingAt:1  
+     'hello world' indexOf:$0 startingAt:1
+     'hello world' indexOf:$l startingAt:1
+     'hello world' indexOf:$l startingAt:5
+     'hello world' indexOf:$d startingAt:5
+     #[0 0 1 0 0] asString indexOf:(Character value:1) startingAt:1
      #[0 0 1 0 0] asString indexOf:(Character value:0) startingAt:3
 
-     '1234567890123456a' indexOf:$a      
-     '1234567890123456a' indexOf:$b      
+     '1234567890123456a' indexOf:$a
+     '1234567890123456a' indexOf:$b
 
      |s|
      s := '12345678901234b'.
@@ -925,7 +925,7 @@
      self assert:(s indexOf:$4) == 4.
      self assert:(s indexOf:$5) == 5.
      self assert:(s indexOf:$0) == 10.
-     self assert:(s indexOf:$b) == 15.   
+     self assert:(s indexOf:$b) == 15.
 
      |s|
      s := ''.
@@ -994,21 +994,21 @@
      self assert:(s indexOf:$9) == 9.
 
      self assert:(s indexOf:$0) == 0.
-     self assert:(s indexOf:$b) == 0.   
+     self assert:(s indexOf:$b) == 0.
 
      |s|
      s := String new:1024.
      s atAllPut:$a.
      s at:512 put:(Character space).
      Time millisecondsToRun:[
-        1000000 timesRepeat:[ s indexOf:(Character space) ]
-     ]         
+	1000000 timesRepeat:[ s indexOf:(Character space) ]
+     ]
 
      timing (ms):
-        v1: 1763 normal   
-            2340 +unroll   
-            3308 memsrch !!
-        v2: 1045
+	v1: 1763 normal
+	    2340 +unroll
+	    3308 memsrch !!
+	v2: 1045
     "
 
     "Modified: / 10-01-2012 / 17:09:34 / cg"
@@ -1031,76 +1031,76 @@
 
     if (__isSmallInteger(start)
      && __isStringLike(aCollectionOfCharacters)) {
-        matchP = __stringVal(aCollectionOfCharacters);
-        index = __intVal(start);
-        if (index > 0) {
-            cp = __stringVal(self) + index - 1;
-            if ((cls = __qClass(self)) != String) {
-                cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-            }
-            len = __stringSize(self);
-            if (index <= len) {
-
-                if (matchP[0] == 0) {
-                    /* matchSet is empty */
-                    RETURN ( __mkSmallInteger(0) );
-                }
-
-                if (matchP[1] == 0) {
-                    /* only a single character match */
-                    unsigned char m = matchP[0];
+	matchP = __stringVal(aCollectionOfCharacters);
+	index = __intVal(start);
+	if (index > 0) {
+	    cp = __stringVal(self) + index - 1;
+	    if ((cls = __qClass(self)) != String) {
+		cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+	    }
+	    len = __stringSize(self);
+	    if (index <= len) {
+
+		if (matchP[0] == 0) {
+		    /* matchSet is empty */
+		    RETURN ( __mkSmallInteger(0) );
+		}
+
+		if (matchP[1] == 0) {
+		    /* only a single character match */
+		    unsigned char m = matchP[0];
 
     #ifdef FAST_MEMCHR
-                    ccp = (unsigned char *) memchr(cp, m, len+1-index);
-                    if (ccp) {
-                        RETURN ( __mkSmallInteger((ccp - cp) + index + 1) );
-                    }
+		    ccp = (unsigned char *) memchr(cp, m, len+1-index);
+		    if (ccp) {
+			RETURN ( __mkSmallInteger((ccp - cp) + index + 1) );
+		    }
     #else
-                    while (c = *cp++) {
-                        if (c == m) {
-                            RETURN ( __mkSmallInteger(index) );
-                        }
-                        index++;
-                    }
+		    while (c = *cp++) {
+			if (c == m) {
+			    RETURN ( __mkSmallInteger(index) );
+			}
+			index++;
+		    }
     #endif
-                    RETURN ( __mkSmallInteger(0) );
-                }
-
-                if (matchP[2] == 0) {
-                    /* two character matches */
-                    unsigned char m1 = matchP[0];
-                    unsigned char m2 = matchP[1];
-
-                    while (c = *cp++) {
-                        if ((c == m1) || (c == m2)) {
-                            RETURN ( __mkSmallInteger(index) );
-                        }
-                        index++;
-                    }
-                    RETURN ( __mkSmallInteger(0) );
-                }
-
-                min = max = matchP[0];
-
-                for (ccp = matchP+1; *ccp ; ccp++) {
-                    unsigned char c = *ccp;
-                    if (c < min) min = c;
-                    else if (c > max) max = c;
-                }
-
-                while (c = *cp++) {
-                    if ((c >= min) && (c <= max)) {
-                        for (ccp = matchP; *ccp ; ccp++) {
-                            if (*ccp == c) {
-                                RETURN ( __mkSmallInteger(index) );
-                            }
-                        }
-                    }
-                    index++;
-                }
-            }
-            RETURN ( __mkSmallInteger(0) );
-        }
+		    RETURN ( __mkSmallInteger(0) );
+		}
+
+		if (matchP[2] == 0) {
+		    /* two character matches */
+		    unsigned char m1 = matchP[0];
+		    unsigned char m2 = matchP[1];
+
+		    while (c = *cp++) {
+			if ((c == m1) || (c == m2)) {
+			    RETURN ( __mkSmallInteger(index) );
+			}
+			index++;
+		    }
+		    RETURN ( __mkSmallInteger(0) );
+		}
+
+		min = max = matchP[0];
+
+		for (ccp = matchP+1; *ccp ; ccp++) {
+		    unsigned char c = *ccp;
+		    if (c < min) min = c;
+		    else if (c > max) max = c;
+		}
+
+		while (c = *cp++) {
+		    if ((c >= min) && (c <= max)) {
+			for (ccp = matchP; *ccp ; ccp++) {
+			    if (*ccp == c) {
+				RETURN ( __mkSmallInteger(index) );
+			    }
+			}
+		    }
+		    index++;
+		}
+	    }
+	    RETURN ( __mkSmallInteger(0) );
+	}
     }
 %}.
     "/
@@ -1134,24 +1134,24 @@
 
     index = __intVal(start);
     if (index <= 0) {
-        index = 1;
+	index = 1;
     }
     len = __stringSize(self);
     cp = __stringVal(self);
     if ((cls = __qClass(self)) != String) {
-        int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-
-        cp += numInstBytes;
-        len -= numInstBytes;
+	int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+
+	cp += numInstBytes;
+	len -= numInstBytes;
     }
     while (index <= len) {
-        REGISTER unsigned char c;
-
-        c = cp[index - 1];
-        if (c < ' ') {
-            RETURN ( __mkSmallInteger(index) );
-        }
-        index++;
+	REGISTER unsigned char c;
+
+	c = cp[index - 1];
+	if (c < ' ') {
+	    RETURN ( __mkSmallInteger(index) );
+	}
+	index++;
     }
     RETURN ( __mkSmallInteger(0) );
 #endif
@@ -1178,28 +1178,28 @@
 
     index = __intVal(start);
     if (index <= 0) {
-        index = 1;
+	index = 1;
     }
     len = __stringSize(self);
     cp = __stringVal(self);
     if ((cls = __qClass(self)) != String) {
-        int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-
-        cp += numInstBytes;
-        len -= numInstBytes;
+	int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+
+	cp += numInstBytes;
+	len -= numInstBytes;
     }
     while (index <= len) {
-        REGISTER unsigned char c;
-
-        c = cp[index - 1];
+	REGISTER unsigned char c;
+
+	c = cp[index - 1];
 #ifndef NON_ASCII       /* i.e. EBCDIC ;-) */
-        if (c > ' ')
+	if (c > ' ')
 #endif
-        if ((c != ' ') && (c != '\t') && (c != '\n')
-         && (c != '\r') && (c != '\f')) {
-            RETURN ( __mkSmallInteger(index) );
-        }
-        index++;
+	if ((c != ' ') && (c != '\t') && (c != '\n')
+	 && (c != '\r') && (c != '\f')) {
+	    RETURN ( __mkSmallInteger(index) );
+	}
+	index++;
     }
     RETURN ( __mkSmallInteger(0) );
 %}.
@@ -1221,28 +1221,28 @@
 
     index = __intVal(start);
     if (index <= 0) {
-        index = 1;
+	index = 1;
     }
     len = __stringSize(self);
     cp = __stringVal(self);
     if ((cls = __qClass(self)) != String) {
-        int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-
-        cp += numInstBytes;
-        len -= numInstBytes;
+	int numInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+
+	cp += numInstBytes;
+	len -= numInstBytes;
     }
     while (index <= len) {
-        REGISTER unsigned char c;
-
-        c = cp[index - 1];
+	REGISTER unsigned char c;
+
+	c = cp[index - 1];
 #ifndef NON_ASCII       /* i.e. EBCDIC ;-) */
-        if (c <= ' ')
+	if (c <= ' ')
 #endif
-        if ((c == ' ') || (c == '\t') || (c == '\n')
-         || (c == '\r') || (c == '\f')) {
-            RETURN ( __mkSmallInteger(index) );
-        }
-        index++;
+	if ((c == ' ') || (c == '\t') || (c == '\n')
+	 || (c == '\r') || (c == '\f')) {
+	    RETURN ( __mkSmallInteger(index) );
+	}
+	index++;
     }
     RETURN ( __mkSmallInteger(0) );
 %}.
@@ -1265,43 +1265,43 @@
     OBJ cls;
 
     if (__isCharacter(aCharacter)) {
-        limit = __stringSize(self);
-        count = 0;
-        byteValue = __intVal(_characterVal(aCharacter));
-        if (byteValue <= 0xFF) {
-            cp = __stringVal(self);
-            if ((cls = __qClass(self)) != String) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-                limit -= n;
-                cp += n;
-            }
-            /* loop unrolled and software-pipelined 
-             * (gives 30-40% speedup on Intel-DUO using borland bcc55)
-             */
-            while (limit >= 4) {
-                register unsigned char c1, c2;
-
-                c1 = cp[0];
-                limit -= 4;
-                c2 = cp[1];
-                if (c1 == byteValue) count++;
-                c1 = cp[2];
-                if (c2 == byteValue) count++;
-                c2 = cp[3];
-                if (c1 == byteValue) count++;
-                cp += 4;
-                if (c2 == byteValue) count++;
-            }
-            while (limit > 0) {
-                register unsigned char c1;
-
-                c1 = cp[0];
-                limit--;
-                if (c1 == byteValue) count++;
-                cp ++;
-            }
-        }
-        RETURN ( __mkSmallInteger(count) );
+	limit = __stringSize(self);
+	count = 0;
+	byteValue = __intVal(__characterVal(aCharacter));
+	if (byteValue <= 0xFF) {
+	    cp = __stringVal(self);
+	    if ((cls = __qClass(self)) != String) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+		limit -= n;
+		cp += n;
+	    }
+	    /* loop unrolled and software-pipelined
+	     * (gives 30-40% speedup on Intel-DUO using borland bcc55)
+	     */
+	    while (limit >= 4) {
+		register unsigned char c1, c2;
+
+		c1 = cp[0];
+		limit -= 4;
+		c2 = cp[1];
+		if (c1 == byteValue) count++;
+		c1 = cp[2];
+		if (c2 == byteValue) count++;
+		c2 = cp[3];
+		if (c1 == byteValue) count++;
+		cp += 4;
+		if (c2 == byteValue) count++;
+	    }
+	    while (limit > 0) {
+		register unsigned char c1;
+
+		c1 = cp[0];
+		limit--;
+		if (c1 == byteValue) count++;
+		cp ++;
+	    }
+	}
+	RETURN ( __mkSmallInteger(count) );
     }
 %}.
     ^ super occurrencesOf:aCharacter
@@ -1313,7 +1313,7 @@
      'hello world' occurrencesOf:$x
      'hello world' occurrencesOf:1
      Time millisecondsToRun:[
-        1000000 timesRepeat:[ 'abcdefghijklmn' occurrencesOf:$x ]
+	1000000 timesRepeat:[ 'abcdefghijklmn' occurrencesOf:$x ]
      ]. 219 203 156 203 204 204 219 172 187 187 141
     "
 ! !
@@ -1335,45 +1335,45 @@
     int argIsString;
 
     if (__isNonNilObject(aString)) {
-        argIsString = __qIsStringLike(aString);
-        if (argIsString || __qClass(aString) == __qClass(self)) {
-            cp2 = __stringVal(aString);
-            len2 = __stringSize(aString);
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!argIsString) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
-
-                cp2 += n;
-                len2 -= n;
-            }
-
-            cp1 = __stringVal(self);
-            len1 = __stringSize(self);
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!__qIsStringLike(self)) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-                cp1 += n;
-                len1 -= n;
-            }
-
-            if (len1 <= len2)
-                cmp = strncmp(cp1, cp2, len1);
-            else
-                cmp = strncmp(cp1, cp2, len2);
-
-            if (cmp < 0) {
-                RETURN ( true );
-            }
-            if ((cmp == 0) && (len1 < len2)) {
-                RETURN ( true );
-            }
-            RETURN ( false );
-        }
+	argIsString = __qIsStringLike(aString);
+	if (argIsString || __qClass(aString) == __qClass(self)) {
+	    cp2 = __stringVal(aString);
+	    len2 = __stringSize(aString);
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!argIsString) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
+
+		cp2 += n;
+		len2 -= n;
+	    }
+
+	    cp1 = __stringVal(self);
+	    len1 = __stringSize(self);
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!__qIsStringLike(self)) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+		cp1 += n;
+		len1 -= n;
+	    }
+
+	    if (len1 <= len2)
+		cmp = strncmp(cp1, cp2, len1);
+	    else
+		cmp = strncmp(cp1, cp2, len2);
+
+	    if (cmp < 0) {
+		RETURN ( true );
+	    }
+	    if ((cmp == 0) && (len1 < len2)) {
+		RETURN ( true );
+	    }
+	    RETURN ( false );
+	}
     }
 %}.
     ^ super < aString
@@ -1393,86 +1393,86 @@
     int argIsString;
 
     if (aString == self) {
-        RETURN ( true );
+	RETURN ( true );
     }
     if (! __isNonNilObject(aString)) {
-        RETURN ( false );
+	RETURN ( false );
     }
 
     argIsString = __qIsStringLike(aString);
     if (argIsString || __qClass(aString) == __qClass(self)) {
-        cp2 = __stringVal(aString);
-        l2 = __stringSize(aString);
-        /*
-         * care for instances of subclasses ...
-         */
-        if (!argIsString) {
-            int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
-
-            cp2 += n;
-            l2 -= n;
-        }
-
-        cp1 = __stringVal(self);
-        l1 = __stringSize(self);
-        /*
-         * care for instances of subclasses ...
-         */
-        if (!__qIsStringLike(self)) {
-            int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-            cp1 += n;
-            l1 -= n;
-        }
-
-        if (l1 != l2) {
-            RETURN ( false );
-        }
+	cp2 = __stringVal(aString);
+	l2 = __stringSize(aString);
+	/*
+	 * care for instances of subclasses ...
+	 */
+	if (!argIsString) {
+	    int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
+
+	    cp2 += n;
+	    l2 -= n;
+	}
+
+	cp1 = __stringVal(self);
+	l1 = __stringSize(self);
+	/*
+	 * care for instances of subclasses ...
+	 */
+	if (!__qIsStringLike(self)) {
+	    int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+	    cp1 += n;
+	    l1 -= n;
+	}
+
+	if (l1 != l2) {
+	    RETURN ( false );
+	}
 #ifdef FAST_MEMCMP
-        RETURN ( (memcmp(cp1, cp2, l1) == 0) ? true : false );
+	RETURN ( (memcmp(cp1, cp2, l1) == 0) ? true : false );
 #else
-        addrDelta = cp2 - cp1;
+	addrDelta = cp2 - cp1;
 # ifdef __UNROLL_LOOPS__
-        while (l1 >= (sizeof(unsigned INT)*4)) {
-            if (((unsigned INT *)cp1)[0] != ((unsigned INT *)(cp1+addrDelta))[0]) {
-                RETURN (false);
-            }
-            if (((unsigned INT *)cp1)[1] != ((unsigned INT *)(cp1+addrDelta))[1]) {
-                RETURN (false);
-            }
-            if (((unsigned INT *)cp1)[2] != ((unsigned INT *)(cp1+addrDelta))[2]) {
-                RETURN (false);
-            }
-            if (((unsigned INT *)cp1)[3] != ((unsigned INT *)(cp1+addrDelta))[3]) {
-                RETURN (false);
-            }
-            l1 -= (sizeof(unsigned INT) * 4);
-            cp1 += (sizeof(unsigned INT) * 4);
-        }
+	while (l1 >= (sizeof(unsigned INT)*4)) {
+	    if (((unsigned INT *)cp1)[0] != ((unsigned INT *)(cp1+addrDelta))[0]) {
+		RETURN (false);
+	    }
+	    if (((unsigned INT *)cp1)[1] != ((unsigned INT *)(cp1+addrDelta))[1]) {
+		RETURN (false);
+	    }
+	    if (((unsigned INT *)cp1)[2] != ((unsigned INT *)(cp1+addrDelta))[2]) {
+		RETURN (false);
+	    }
+	    if (((unsigned INT *)cp1)[3] != ((unsigned INT *)(cp1+addrDelta))[3]) {
+		RETURN (false);
+	    }
+	    l1 -= (sizeof(unsigned INT) * 4);
+	    cp1 += (sizeof(unsigned INT) * 4);
+	}
 # endif /* __UNROLL_LOOPS__ */
-        while (l1 >= sizeof(unsigned INT)) {
-            if (*((unsigned INT *)cp1) != *((unsigned INT *)(cp1+addrDelta))) {
-                RETURN (false);
-            }
-            l1 -= sizeof(unsigned INT);
-            cp1 += sizeof(unsigned INT);
-        }
-        if (l1 >= sizeof(unsigned short)) {
-            if (*((unsigned short *)cp1) != *((unsigned short *)(cp1+addrDelta))) {
-                RETURN (false);
-            }
-            l1 -= sizeof(unsigned short);
-            cp1 += sizeof(unsigned short);
-        }
-        while (l1) {
-            if (*cp1 != *(cp1+addrDelta)) {
-                RETURN (false);
-            }
-            l1--;
-            cp1++;
-        }
-
-        RETURN (true);
+	while (l1 >= sizeof(unsigned INT)) {
+	    if (*((unsigned INT *)cp1) != *((unsigned INT *)(cp1+addrDelta))) {
+		RETURN (false);
+	    }
+	    l1 -= sizeof(unsigned INT);
+	    cp1 += sizeof(unsigned INT);
+	}
+	if (l1 >= sizeof(unsigned short)) {
+	    if (*((unsigned short *)cp1) != *((unsigned short *)(cp1+addrDelta))) {
+		RETURN (false);
+	    }
+	    l1 -= sizeof(unsigned short);
+	    cp1 += sizeof(unsigned short);
+	}
+	while (l1) {
+	    if (*cp1 != *(cp1+addrDelta)) {
+		RETURN (false);
+	    }
+	    l1--;
+	    cp1++;
+	}
+
+	RETURN (true);
 #endif
     }
 %}.
@@ -1487,10 +1487,10 @@
      |tEmpty tCmp|
 
      tEmpty := Time millisecondsToRun:[
-         1000000 timesRepeat:[]
+	 1000000 timesRepeat:[]
      ].
      tCmp := Time millisecondsToRun:[
-         1000000 timesRepeat:[ '1234567890' = '1234567890' ]
+	 1000000 timesRepeat:[ '1234567890' = '1234567890' ]
      ].
      tCmp - tEmpty
     "
@@ -1511,45 +1511,45 @@
     int argIsString;
 
     if (__isNonNilObject(aString)) {
-        argIsString = __qIsStringLike(aString);
-        if (argIsString || __qClass(aString) == __qClass(self)) {
-            cp2 = __stringVal(aString);
-            len2 = __stringSize(aString);
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!argIsString) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
-
-                cp2 += n;
-                len2 -= n;
-            }
-
-            cp1 = __stringVal(self);
-            len1 = __stringSize(self);
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!__qIsStringLike(self)) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-                cp1 += n;
-                len1 -= n;
-            }
-
-            if (len1 <= len2)
-                cmp = strncmp(cp1, cp2, len1);
-            else
-                cmp = strncmp(cp1, cp2, len2);
-
-            if (cmp > 0) {
-                RETURN ( true );
-            }
-            if ((cmp == 0) && (len1 > len2)) {
-                RETURN ( true );
-            }
-            RETURN ( false );
-        }
+	argIsString = __qIsStringLike(aString);
+	if (argIsString || __qClass(aString) == __qClass(self)) {
+	    cp2 = __stringVal(aString);
+	    len2 = __stringSize(aString);
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!argIsString) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
+
+		cp2 += n;
+		len2 -= n;
+	    }
+
+	    cp1 = __stringVal(self);
+	    len1 = __stringSize(self);
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!__qIsStringLike(self)) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+		cp1 += n;
+		len1 -= n;
+	    }
+
+	    if (len1 <= len2)
+		cmp = strncmp(cp1, cp2, len1);
+	    else
+		cmp = strncmp(cp1, cp2, len2);
+
+	    if (cmp > 0) {
+		RETURN ( true );
+	    }
+	    if ((cmp == 0) && (len1 > len2)) {
+		RETURN ( true );
+	    }
+	    RETURN ( false );
+	}
     }
 %}.
     ^ super > aString
@@ -1568,43 +1568,43 @@
     int argIsString;
 
     if (__isNonNilObject(aString)) {
-        argIsString = __qIsStringLike(aString);
-        if (argIsString || __qClass(aString) == __qClass(self)) {
-            cp1 = __stringVal(self);
-
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!__qIsStringLike(self)) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-                cp1 += n;
-            }
-
-            cp2 = __stringVal(aString);
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!argIsString) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
-
-                cp2 += n;
-            }
+	argIsString = __qIsStringLike(aString);
+	if (argIsString || __qClass(aString) == __qClass(self)) {
+	    cp1 = __stringVal(self);
+
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!__qIsStringLike(self)) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+		cp1 += n;
+	    }
+
+	    cp2 = __stringVal(aString);
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!argIsString) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
+
+		cp2 += n;
+	    }
 
 #ifdef HAS_STRCOLL
-            cmp = strcoll(cp1, cp2);
+	    cmp = strcoll(cp1, cp2);
 #else
-            cmp = strcmp(cp1, cp2);
+	    cmp = strcmp(cp1, cp2);
 #endif
 
-            if (cmp > 0) {
-                RETURN ( __mkSmallInteger(1) );
-            }
-            if (cmp < 0) {
-                RETURN ( __mkSmallInteger(-1) );
-            }
-            RETURN ( __mkSmallInteger(0) );
-        }
+	    if (cmp > 0) {
+		RETURN ( __mkSmallInteger(1) );
+	    }
+	    if (cmp < 0) {
+		RETURN ( __mkSmallInteger(-1) );
+	    }
+	    RETURN ( __mkSmallInteger(0) );
+	}
     }
 %}.
     "
@@ -1629,38 +1629,38 @@
     int argIsString;
 
     if (__isNonNilObject(aString)) {
-        argIsString = __qIsStringLike(aString);
-        if (argIsString || __qClass(aString) == __qClass(self)) {
-            cp1 = __stringVal(self);
-
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!__qIsStringLike(self)) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-                cp1 += n;
-            }
-
-            cp2 = __stringVal(aString);
-            /*
-             * care for instances of subclasses ...
-             */
-            if (!argIsString) {
-                int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
-
-                cp2 += n;
-            }
-
-            cmp = strcmp(cp1, cp2);
-            if (cmp > 0) {
-                RETURN ( __mkSmallInteger(1) );
-            }
-            if (cmp < 0) {
-                RETURN ( __mkSmallInteger(-1) );
-            }
-            RETURN ( __mkSmallInteger(0) );
-        }
+	argIsString = __qIsStringLike(aString);
+	if (argIsString || __qClass(aString) == __qClass(self)) {
+	    cp1 = __stringVal(self);
+
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!__qIsStringLike(self)) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+		cp1 += n;
+	    }
+
+	    cp2 = __stringVal(aString);
+	    /*
+	     * care for instances of subclasses ...
+	     */
+	    if (!argIsString) {
+		int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
+
+		cp2 += n;
+	    }
+
+	    cmp = strcmp(cp1, cp2);
+	    if (cmp > 0) {
+		RETURN ( __mkSmallInteger(1) );
+	    }
+	    if (cmp < 0) {
+		RETURN ( __mkSmallInteger(-1) );
+	    }
+	    RETURN ( __mkSmallInteger(0) );
+	}
     }
 %}.
     "
@@ -1682,10 +1682,10 @@
     cp = __stringVal(self);
     l = __stringSize(self);
     if (!__qIsStringLike(self)) {
-        int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-        cp += n;
-        l -= n;
+	int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+	cp += n;
+	l -= n;
     }
 
     /*
@@ -1693,15 +1693,15 @@
      */
     val = 0;
     while (l >= 4) {
-        l -= 4;
-        val = ((val * 65599) & _MAX_INT) + cp[0];
-        val = ((val * 65599) & _MAX_INT) + cp[1];
-        val = ((val * 65599) & _MAX_INT) + cp[2];
-        val = ((val * 65599) & _MAX_INT) + cp[3];
-        cp += 4;
+	l -= 4;
+	val = ((val * 65599) & _MAX_INT) + cp[0];
+	val = ((val * 65599) & _MAX_INT) + cp[1];
+	val = ((val * 65599) & _MAX_INT) + cp[2];
+	val = ((val * 65599) & _MAX_INT) + cp[3];
+	cp += 4;
     }
     while (l--) {
-        val = ((val * 65599) & _MAX_INT) + *cp++;
+	val = ((val * 65599) & _MAX_INT) + *cp++;
     }
     RETURN ( __mkSmallInteger(val & _MAX_INT));
 %}
@@ -1710,7 +1710,7 @@
      'a' hash
      'ab' hash = 'ab' asUnicode16String hash
     "
-    
+
     "Created: / 26-12-2011 / 13:53:09 / cg"
 !
 
@@ -1726,10 +1726,10 @@
     cp = __stringVal(self);
     l = __stringSize(self);
     if (__qClass(self) != @global(String)) {
-        int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-        cp += n;
-        l -= n;
+	int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+	cp += n;
+	l -= n;
     }
 
     /*
@@ -1739,28 +1739,28 @@
     val = 0;
     switch (l) {
     default:
-        for (cp0 = cp, cp += l - 1; cp >= cp0; cp--) {
-            val = (val << 4) + *cp;
-            if (g = (val & 0xF0000000)) {
-                val ^= g >> 24;
-                val ^= g;
-            }
-        }
-        break;
+	for (cp0 = cp, cp += l - 1; cp >= cp0; cp--) {
+	    val = (val << 4) + *cp;
+	    if (g = (val & 0xF0000000)) {
+		val ^= g >> 24;
+		val ^= g;
+	    }
+	}
+	break;
     case 6:
-        val = cp[5] << 4;
+	val = cp[5] << 4;
     case 5:
-        val = (val + cp[4]) << 4;
+	val = (val + cp[4]) << 4;
     case 4:
-        val = (val + cp[3]) << 4;
+	val = (val + cp[3]) << 4;
     case 3:
-        val = (val + cp[2]) << 4;
+	val = (val + cp[2]) << 4;
     case 2:
-        val = (val + cp[1]) << 4;
+	val = (val + cp[1]) << 4;
     case 1:
-        val = val + cp[0];
+	val = val + cp[0];
     case 0:
-        break;
+	break;
     }
 
     /*
@@ -1790,83 +1790,83 @@
     int argIsString;
 
     if (aString == self) {
-        RETURN ( false );
+	RETURN ( false );
     }
     if (! __isNonNilObject(aString)) {
-        RETURN ( true );
+	RETURN ( true );
     }
 
     argIsString = __qIsStringLike(aString);
     if (argIsString || __qClass(aString) == __qClass(self)) {
-        cp1 = __stringVal(self);
-        l1 = __stringSize(self);
-        /*
-         * care for instances of subclasses ...
-         */
-        if (!__qIsStringLike(self)) {
-            int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-            cp1 += n;
-            l1 -= n;
-        }
-
-        cp2 = __stringVal(aString);
-        l2 = __stringSize(aString);
-        /*
-         * care for instances of subclasses ...
-         */
-        if (!argIsString) {
-            int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
-
-            cp2 += n;
-            l2 -= n;
-        }
-
-        if (l1 != l2) {
-            RETURN ( true );
-        }
-
-        addrDelta = cp2 - cp1;
+	cp1 = __stringVal(self);
+	l1 = __stringSize(self);
+	/*
+	 * care for instances of subclasses ...
+	 */
+	if (!__qIsStringLike(self)) {
+	    int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+
+	    cp1 += n;
+	    l1 -= n;
+	}
+
+	cp2 = __stringVal(aString);
+	l2 = __stringSize(aString);
+	/*
+	 * care for instances of subclasses ...
+	 */
+	if (!argIsString) {
+	    int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aString))->c_ninstvars));
+
+	    cp2 += n;
+	    l2 -= n;
+	}
+
+	if (l1 != l2) {
+	    RETURN ( true );
+	}
+
+	addrDelta = cp2 - cp1;
 # ifdef __UNROLL_LOOPS__
-        while (l1 >= (sizeof(unsigned INT)*4)) {
-            if (((unsigned INT *)cp1)[0] != ((unsigned INT *)(cp1+addrDelta))[0]) {
-                RETURN (true);
-            }
-            if (((unsigned INT *)cp1)[1] != ((unsigned INT *)(cp1+addrDelta))[1]) {
-                RETURN (true);
-            }
-            if (((unsigned INT *)cp1)[2] != ((unsigned INT *)(cp1+addrDelta))[2]) {
-                RETURN (true);
-            }
-            if (((unsigned INT *)cp1)[3] != ((unsigned INT *)(cp1+addrDelta))[3]) {
-                RETURN (true);
-            }
-            l1 -= (sizeof(unsigned INT) * 4);
-            cp1 += (sizeof(unsigned INT) * 4);
-        }
+	while (l1 >= (sizeof(unsigned INT)*4)) {
+	    if (((unsigned INT *)cp1)[0] != ((unsigned INT *)(cp1+addrDelta))[0]) {
+		RETURN (true);
+	    }
+	    if (((unsigned INT *)cp1)[1] != ((unsigned INT *)(cp1+addrDelta))[1]) {
+		RETURN (true);
+	    }
+	    if (((unsigned INT *)cp1)[2] != ((unsigned INT *)(cp1+addrDelta))[2]) {
+		RETURN (true);
+	    }
+	    if (((unsigned INT *)cp1)[3] != ((unsigned INT *)(cp1+addrDelta))[3]) {
+		RETURN (true);
+	    }
+	    l1 -= (sizeof(unsigned INT) * 4);
+	    cp1 += (sizeof(unsigned INT) * 4);
+	}
 # endif /* __UNROLL_LOOPS__ */
-        while (l1 >= sizeof(unsigned INT)) {
-            if (*((unsigned INT *)cp1) != *((unsigned INT *)(cp1+addrDelta))) {
-                RETURN (true);
-            }
-            l1 -= sizeof(unsigned INT);
-            cp1 += sizeof(unsigned INT);
-        }
-        if (l1 >= sizeof(unsigned short)) {
-            if (*((unsigned short *)cp1) != *((unsigned short *)(cp1+addrDelta))) {
-                RETURN (true);
-            }
-            l1 -= sizeof(unsigned short);
-            cp1 += sizeof(unsigned short);
-        }
-        while (l1) {
-            if (*cp1 != *(cp1+addrDelta)) {
-                RETURN (true);
-            }
-            l1--;
-            cp1++;
-        }
-        RETURN (false);
+	while (l1 >= sizeof(unsigned INT)) {
+	    if (*((unsigned INT *)cp1) != *((unsigned INT *)(cp1+addrDelta))) {
+		RETURN (true);
+	    }
+	    l1 -= sizeof(unsigned INT);
+	    cp1 += sizeof(unsigned INT);
+	}
+	if (l1 >= sizeof(unsigned short)) {
+	    if (*((unsigned short *)cp1) != *((unsigned short *)(cp1+addrDelta))) {
+		RETURN (true);
+	    }
+	    l1 -= sizeof(unsigned short);
+	    cp1 += sizeof(unsigned short);
+	}
+	while (l1) {
+	    if (*cp1 != *(cp1+addrDelta)) {
+		RETURN (true);
+	    }
+	    l1--;
+	    cp1++;
+	}
+	RETURN (false);
     }
 %}.
     ^ super ~= aString
@@ -1878,21 +1878,21 @@
     "Answer an array with all the substrings of the receiver separated by
      separator characters (space, cr, tab, linefeed, formfeed, etc).
      CG: This is ported Squeak code, and I am not sure if it is more efficient than
-         the inherited one... after all: who added it anyway ?"
+	 the inherited one... after all: who added it anyway ?"
 
     | substrings start end |
 
     substrings := OrderedCollection new.
     start := 1.
     [start <= self size] whileTrue: [
-        (self at: start) isSeparator ifFalse: [
-            end := start + 1.
-            [end <= self size and: [(self at: end) isSeparator not]]
-                whileTrue: [end := end + 1].
-            substrings add: (self copyFrom: start to: end - 1).
-            start := end - 1
-        ].
-        start := start + 1
+	(self at: start) isSeparator ifFalse: [
+	    end := start + 1.
+	    [end <= self size and: [(self at: end) isSeparator not]]
+		whileTrue: [end := end + 1].
+	    substrings add: (self copyFrom: start to: end - 1).
+	    start := end - 1
+	].
+	start := start + 1
     ].
     ^ substrings asArray
 !
@@ -1904,10 +1904,10 @@
      Notice, that all singleByte strings are already 0-terminated in ST/X, whereas wide
      strings are not."
 
-    ^ self 
+    ^ self
 
     "
-     'abc' asAsciiZ               
+     'abc' asAsciiZ
      'abc' asWideString asAsciiZ
     "
 !
@@ -1986,16 +1986,16 @@
 !
 
 asPackageId
-    "given a package-string as receiver, return a packageId object. 
+    "given a package-string as receiver, return a packageId object.
      packageIds hide the details of module/directory handling inside the path.
      See PackageId for the required format of those strings."
 
     ^ PackageId from: self
 
     "
-     'stx:libbasic' asPackageId  
-     'stx:goodies/net/ssl' asPackageId  
-     'stx:hello' asPackageId  
+     'stx:libbasic' asPackageId
+     'stx:goodies/net/ssl' asPackageId
+     'stx:hello' asPackageId
     "
 
     "Created: / 18-08-2006 / 12:19:54 / cg"
@@ -2211,74 +2211,74 @@
     OBJ newString;
 
     if (__isNonNilObject(aString)) {
-        /*
-         * can do it here if both are Strings/Symbols:
-         */
-        if (__qIsStringLike(self) && __qIsStringLike(aString)) {
-            l1 = __stringSize(self);
-            l2 = __stringSize(aString);
-
-            sz = OHDR_SIZE + l1 + l2 + 1;
-            __qNew(newString, sz);      /* OBJECT ALLOCATION */
-            if (newString != nil) {
-                char *cp1, *cp2;
-                REGISTER unsigned char *dstp;
-
-                __InstPtr(newString)->o_class = String;
-                __qSTORE(newString, String);
-                dstp = __stringVal(newString);
-                cp1 = (char *) __stringVal(self);
-                cp2 = (char *) __stringVal(aString);
+	/*
+	 * can do it here if both are Strings/Symbols:
+	 */
+	if (__qIsStringLike(self) && __qIsStringLike(aString)) {
+	    l1 = __stringSize(self);
+	    l2 = __stringSize(aString);
+
+	    sz = OHDR_SIZE + l1 + l2 + 1;
+	    __qNew(newString, sz);      /* OBJECT ALLOCATION */
+	    if (newString != nil) {
+		char *cp1, *cp2;
+		REGISTER unsigned char *dstp;
+
+		__InstPtr(newString)->o_class = String;
+		__qSTORE(newString, String);
+		dstp = __stringVal(newString);
+		cp1 = (char *) __stringVal(self);
+		cp2 = (char *) __stringVal(aString);
 
 #ifdef bcopy4
-                /* knowing that allocation is 4-byte aligned and
-                 * size rounded up to next 4-byte, the first copy
-                 * can be done word-wise.
-                 * that speeds up size-10-string , size-10-string
-                 * by 10% on a P5/200.
-                 */
-                {
-                    int nw = l1 >> 2;
-
-                    if (l1 & 3) nw++;
-                    bcopy4(cp1, dstp, nw);
-                    dstp += l1;
-                }
+		/* knowing that allocation is 4-byte aligned and
+		 * size rounded up to next 4-byte, the first copy
+		 * can be done word-wise.
+		 * that speeds up size-10-string , size-10-string
+		 * by 10% on a P5/200.
+		 */
+		{
+		    int nw = l1 >> 2;
+
+		    if (l1 & 3) nw++;
+		    bcopy4(cp1, dstp, nw);
+		    dstp += l1;
+		}
 #else
 # ifdef FAST_MEMCPY
-                memcpy(dstp, cp1, l1);
-                dstp += l1;
+		memcpy(dstp, cp1, l1);
+		dstp += l1;
 # else
-                while (l1 >= 4) {
-                    *(int *)dstp = *(int *)cp1;
-                    dstp += 4; cp1 += 4;
-                    l1 -= 4;
-                }
-                while (l1--) *dstp++ = *cp1++;
+		while (l1 >= 4) {
+		    *(int *)dstp = *(int *)cp1;
+		    dstp += 4; cp1 += 4;
+		    l1 -= 4;
+		}
+		while (l1--) *dstp++ = *cp1++;
 # endif
 #endif
 
 #ifdef bcopy4
-                if (((INT)dstp & 3) == 0) {
-                    int nw = l2 >> 2;
-
-                    if (l2 & 3) nw++;
-                    bcopy4(cp2, dstp, nw);
-                    *(dstp + l2) = '\0';
-                    RETURN ( newString );
-                }
+		if (((INT)dstp & 3) == 0) {
+		    int nw = l2 >> 2;
+
+		    if (l2 & 3) nw++;
+		    bcopy4(cp2, dstp, nw);
+		    *(dstp + l2) = '\0';
+		    RETURN ( newString );
+		}
 #endif
 
 #ifdef FAST_MEMCPY
-                memcpy(dstp, cp2, l2+1);
-                dstp[l2] = '\0';
+		memcpy(dstp, cp2, l2+1);
+		dstp[l2] = '\0';
 #else
-                while (l2--) *dstp++ = *cp2++;
-                *dstp = '\0';
+		while (l2--) *dstp++ = *cp2++;
+		*dstp = '\0';
 #endif
-                RETURN ( newString );
-            }
-        }
+		RETURN ( newString );
+	    }
+	}
     }
 %}.
     ^ super , aString
@@ -2306,34 +2306,34 @@
 #endif
     REGISTER unsigned char *dstp;
 
-    if (__qIsStringLike(self) 
-            && __isStringLike(string1)
-            && __isStringLike(string2)) {
-        len1 = __stringSize(self);
-        len2 = __stringSize(string1);
-        len3 = __stringSize(string2);
-        sz = OHDR_SIZE + len1 + len2 + len3 + 1;
-        __qNew(newString, sz);  /* OBJECT ALLOCATION */
-        if (newString != nil) {
-            __InstPtr(newString)->o_class = String;
-            __qSTORE(newString, String);
-            dstp = __stringVal(newString);
+    if (__qIsStringLike(self)
+	    && __isStringLike(string1)
+	    && __isStringLike(string2)) {
+	len1 = __stringSize(self);
+	len2 = __stringSize(string1);
+	len3 = __stringSize(string2);
+	sz = OHDR_SIZE + len1 + len2 + len3 + 1;
+	__qNew(newString, sz);  /* OBJECT ALLOCATION */
+	if (newString != nil) {
+	    __InstPtr(newString)->o_class = String;
+	    __qSTORE(newString, String);
+	    dstp = __stringVal(newString);
 #ifdef FAST_MEMCPY
-            memcpy(dstp, __stringVal(self), len1);
-            memcpy(dstp + len1, __stringVal(string1), len2);
-            memcpy(dstp + len1 + len2, __stringVal(string2), len3+1);
-            *(dstp + len1 + len2 + len3) = '\0';
+	    memcpy(dstp, __stringVal(self), len1);
+	    memcpy(dstp + len1, __stringVal(string1), len2);
+	    memcpy(dstp + len1 + len2, __stringVal(string2), len3+1);
+	    *(dstp + len1 + len2 + len3) = '\0';
 #else
-            srcp = __stringVal(self);
-            while (len1--) *dstp++ = *srcp++;
-            srcp = __stringVal(string1);
-            while (len2--) *dstp++ = *srcp++;
-            srcp = __stringVal(string2);
-            while (len3--) *dstp++ = *srcp++;
-            *dstp = '\0';
+	    srcp = __stringVal(self);
+	    while (len1--) *dstp++ = *srcp++;
+	    srcp = __stringVal(string1);
+	    while (len2--) *dstp++ = *srcp++;
+	    srcp = __stringVal(string2);
+	    while (len3--) *dstp++ = *srcp++;
+	    *dstp = '\0';
 #endif
-            RETURN ( newString );
-        }
+	    RETURN ( newString );
+	}
     }
 %}.
     ^ super , string1 , string2
@@ -2353,39 +2353,39 @@
 #endif
     REGISTER unsigned char *dstp;
 
-    if (__qIsStringLike(self) 
+    if (__qIsStringLike(self)
      && __isStringLike(string1)
      && __isStringLike(string2)
      && __isStringLike(string3)) {
-        len1 = __stringSize(self);
-        len2 = __stringSize(string1);
-        len3 = __stringSize(string2);
-        len4 = __stringSize(string3);
-        sz = OHDR_SIZE + len1 + len2 + len3 + len4 + 1;
-        __qNew(newString, sz);  /* OBJECT ALLOCATION */
-        if (newString != nil) {
-            __InstPtr(newString)->o_class = String;
-            __qSTORE(newString, String);
-            dstp = __stringVal(newString);
+	len1 = __stringSize(self);
+	len2 = __stringSize(string1);
+	len3 = __stringSize(string2);
+	len4 = __stringSize(string3);
+	sz = OHDR_SIZE + len1 + len2 + len3 + len4 + 1;
+	__qNew(newString, sz);  /* OBJECT ALLOCATION */
+	if (newString != nil) {
+	    __InstPtr(newString)->o_class = String;
+	    __qSTORE(newString, String);
+	    dstp = __stringVal(newString);
 #ifdef FAST_MEMCPY
-            memcpy(dstp, __stringVal(self), len1);
-            memcpy(dstp + len1, __stringVal(string1), len2);
-            memcpy(dstp + len1 + len2, __stringVal(string2), len3);
-            memcpy(dstp + len1 + len2 + len3, __stringVal(string3), len4+1);
-            *(dstp + len1 + len2 + len3 + len4) = '\0';
+	    memcpy(dstp, __stringVal(self), len1);
+	    memcpy(dstp + len1, __stringVal(string1), len2);
+	    memcpy(dstp + len1 + len2, __stringVal(string2), len3);
+	    memcpy(dstp + len1 + len2 + len3, __stringVal(string3), len4+1);
+	    *(dstp + len1 + len2 + len3 + len4) = '\0';
 #else
-            srcp = __stringVal(self);
-            while (len1--) *dstp++ = *srcp++;
-            srcp = __stringVal(string1);
-            while (len2--) *dstp++ = *srcp++;
-            srcp = __stringVal(string2);
-            while (len3--) *dstp++ = *srcp++;
-            srcp = __stringVal(string3);
-            while (len4--) *dstp++ = *srcp++;
-            *dstp = '\0';
+	    srcp = __stringVal(self);
+	    while (len1--) *dstp++ = *srcp++;
+	    srcp = __stringVal(string1);
+	    while (len2--) *dstp++ = *srcp++;
+	    srcp = __stringVal(string2);
+	    while (len3--) *dstp++ = *srcp++;
+	    srcp = __stringVal(string3);
+	    while (len4--) *dstp++ = *srcp++;
+	    *dstp = '\0';
 #endif
-            RETURN ( newString );
-        }
+	    RETURN ( newString );
+	}
     }
 %}.
     ^ super , string1 , string2 , string3
@@ -2640,7 +2640,7 @@
      of its named instvars ...
     "
     (self isMemberOf:String) ifTrue:[
-        ^ self copyFrom:1
+	^ self copyFrom:1
     ].
     ^ super deepCopyUsing:aDictionary postCopySelector:postCopySelector
 !
@@ -2683,7 +2683,7 @@
     REGISTER int byteValue;
 
     if (__isCharacter(aCharacter) && __isString(self)) {
-	byteValue = __intVal(_characterVal(aCharacter));
+	byteValue = __intVal(__characterVal(aCharacter));
 	if ((unsigned)byteValue <= 0xFF) {
 	    l = __stringSize(self);
 
@@ -2786,8 +2786,8 @@
      && __isCharacter(newCharacter)
      && __isString(self)) {
 	srcp = (unsigned char *)__stringVal(self);
-	oldVal = __intVal(_characterVal(oldCharacter));
-	newVal = __intVal(_characterVal(newCharacter));
+	oldVal = __intVal(__characterVal(oldCharacter));
+	newVal = __intVal(__characterVal(newCharacter));
 	if ((oldVal <= 0xFF)
 	 && (newVal <= 0xFF)) {
 	    cNext = *srcp;
@@ -2828,74 +2828,74 @@
     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 */
-                    if (srcp < dstp) {
-                        /* must do a reverse copy */
-                        srcp += count;
-                        dstp += count;
-                        while (count-- > 0) {
-                            *--dstp = *--srcp;
-                        }
-                        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 */
+		    if (srcp < dstp) {
+			/* must do a reverse copy */
+			srcp += count;
+			dstp += count;
+			while (count-- > 0) {
+			    *--dstp = *--srcp;
+			}
+			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
-                bcopy(srcp, dstp, count);
+		bcopy(srcp, dstp, 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
 %}.
@@ -3071,16 +3071,16 @@
 %{  /* NOCONTEXT */
 
     if (__qIsStringLike(self)) {
-        if (@global(Stderr) == nil) {
-            console_fprintf(stderr, "%s" , __stringVal(self));
-            console_fflush(stderr);
-            RETURN (self);
-        }
+	if (@global(Stderr) == nil) {
+	    console_fprintf(stderr, "%s" , __stringVal(self));
+	    console_fflush(stderr);
+	    RETURN (self);
+	}
     }
 %}.
     ^ super errorPrint
 
-    "  
+    "
       'hello world' asUnicode16String errorPrint
       (Character value:356) asString errorPrint
       'Bönnigheim' errorPrint
@@ -3096,11 +3096,11 @@
 %{  /* NOCONTEXT */
 
     if (__qIsStringLike(self)) {
-        if (@global(Stderr) == nil) {
-            console_fprintf(stderr, "%s\n" , __stringVal(self));
-            console_fflush(stderr);
-            RETURN (self);
-        }
+	if (@global(Stderr) == nil) {
+	    console_fprintf(stderr, "%s\n" , __stringVal(self));
+	    console_fflush(stderr);
+	    RETURN (self);
+	}
     }
 %}.
     ^ super errorPrintCR
@@ -3114,11 +3114,11 @@
 %{  /* NOCONTEXT */
 
     if (__qIsStringLike(self)) {
-        if (@global(Stdout) == nil) {
-            console_fprintf(stdout, "%s" , __stringVal(self));
-            console_fflush(stdout);
-            RETURN (self);
-        }
+	if (@global(Stdout) == nil) {
+	    console_fprintf(stdout, "%s" , __stringVal(self));
+	    console_fflush(stdout);
+	    RETURN (self);
+	}
     }
 %}.
     ^ super print
@@ -3132,11 +3132,11 @@
 %{  /* NOCONTEXT */
 
     if (__qIsStringLike(self)) {
-        if (@global(Stdout) == nil) {
-            console_fprintf(stdout, "%s\n" , __stringVal(self));
-            console_fflush(stdout);
-            RETURN (self);
-        }
+	if (@global(Stdout) == nil) {
+	    console_fprintf(stdout, "%s\n" , __stringVal(self));
+	    console_fflush(stdout);
+	    RETURN (self);
+	}
     }
 %}.
     ^ super printCR
@@ -3162,44 +3162,44 @@
     extern void *malloc();
 
     if (__isStringLike(formatString)) {
-        cp = (char *)__stringVal(self);
-        if (__qClass(self) != String) {
-            cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-        }
+	cp = (char *)__stringVal(self);
+	if (__qClass(self) != String) {
+	    cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+	}
 again:
-        /*
-         * actually only needed on sparc: since thisContext is
-         * in a global register, which gets destroyed by printf,
-         * manually save it here - very stupid ...
-         */
-        __BEGIN_PROTECT_REGISTERS__
-
-        len = snprintf(buf, bufsize, (char *)__stringVal(formatString), cp);
-
-        __END_PROTECT_REGISTERS__
-
-        if ((len < 0) || (len > bufsize)) {
-            if (len < 0) {
-                bufsize = bufsize * 2;
-            } else {
-                bufsize = len + 1;
-            }
-            if (mallocbuf)
-                free(mallocbuf);
-            buf = mallocbuf = malloc(bufsize);
-            if (buf == NULL)
-                goto fail;
-            goto again;
-        }
-
-        s = __MKSTRING_L(buf, len);
-
-        if (mallocbuf)
-            free(mallocbuf);
-
-        if (s != nil) {
-            RETURN (s);
-        }
+	/*
+	 * actually only needed on sparc: since thisContext is
+	 * in a global register, which gets destroyed by printf,
+	 * manually save it here - very stupid ...
+	 */
+	__BEGIN_PROTECT_REGISTERS__
+
+	len = snprintf(buf, bufsize, (char *)__stringVal(formatString), cp);
+
+	__END_PROTECT_REGISTERS__
+
+	if ((len < 0) || (len > bufsize)) {
+	    if (len < 0) {
+		bufsize = bufsize * 2;
+	    } else {
+		bufsize = len + 1;
+	    }
+	    if (mallocbuf)
+		free(mallocbuf);
+	    buf = mallocbuf = malloc(bufsize);
+	    if (buf == NULL)
+		goto fail;
+	    goto again;
+	}
+
+	s = __MKSTRING_L(buf, len);
+
+	if (mallocbuf)
+	    free(mallocbuf);
+
+	if (s != nil) {
+	    RETURN (s);
+	}
     }
 fail:;
 %}.
@@ -3390,7 +3390,7 @@
 reverse
     "in-place reverse the characters of the string.
      WARNING: this is a destructive operation, which modifies the receiver.
-              Please use reversed (with a d) for a functional version."
+	      Please use reversed (with a d) for a functional version."
 
     "Q: is there a need to redefine it here ?"
 
@@ -3400,16 +3400,16 @@
     REGISTER unsigned char *hip, *lowp;
 
     if (__isString(self)) {
-        lowp = __stringVal(self);
-        hip = lowp + __stringSize(self) - 1;
-        while (lowp < hip) {
-            c = *lowp;
-            *lowp = *hip;
-            *hip = c;
-            lowp++;
-            hip--;
-        }
-        RETURN ( self );
+	lowp = __stringVal(self);
+	hip = lowp + __stringSize(self) - 1;
+	while (lowp < hip) {
+	    c = *lowp;
+	    *lowp = *hip;
+	    *hip = c;
+	    lowp++;
+	    hip--;
+	}
+	RETURN ( self );
     }
 %}.
     ^ super reverse
@@ -3423,117 +3423,117 @@
     |notFound|
 
 %{  /* STACK:4000 */
-    if (__qIsStringLike(self) 
+    if (__qIsStringLike(self)
      && __isStringLike(aSubString)
      && (caseSensitive == true)
      && (__isSmallInteger(startIndex))
      && (__intVal(startIndex) > 0)
     ) {
-        unsigned char *y = __stringVal(self);
-        unsigned char *x = __stringVal(aSubString);
-        int m = __stringSize(aSubString);
-        int n = __stringSize(self);
+	unsigned char *y = __stringVal(self);
+	unsigned char *x = __stringVal(aSubString);
+	int m = __stringSize(aSubString);
+	int n = __stringSize(self);
 #       define MAX_PATTERN_SIZE 128
 #       define XSIZE 256
 #       define ASIZE 256
 #       define MAX(a,b) (a>b ? a : b)
 
-        if (m == 0) {
+	if (m == 0) {
 #if 1
-            /* empty string does not match */
-            RETURN(__mkSmallInteger(0));
+	    /* empty string does not match */
+	    RETURN(__mkSmallInteger(0));
 #else
-            /* empty string matches */
-            RETURN(startIndex);
+	    /* empty string matches */
+	    RETURN(startIndex);
 #endif
-        }
-        if (m <= XSIZE) {
-            int i, j;
-            static int lastPatternSize = 0;
-            static char lastPattern[MAX_PATTERN_SIZE+1] = { 0 };
-            static int bmGs[XSIZE+1], bmBc[ASIZE];
+	}
+	if (m <= XSIZE) {
+	    int i, j;
+	    static int lastPatternSize = 0;
+	    static char lastPattern[MAX_PATTERN_SIZE+1] = { 0 };
+	    static int bmGs[XSIZE+1], bmBc[ASIZE];
 
 #           define preBmBc(x, m, bmBc) {          \
-               int i;                             \
-                                                  \
-               for (i = 0; i < ASIZE; ++i)        \
-                  bmBc[i] = m;                    \
-               for (i = 0; i < m - 1; ++i)        \
-                  bmBc[x[i]] = m - i - 1;         \
-            }
+	       int i;                             \
+						  \
+	       for (i = 0; i < ASIZE; ++i)        \
+		  bmBc[i] = m;                    \
+	       for (i = 0; i < m - 1; ++i)        \
+		  bmBc[x[i]] = m - i - 1;         \
+	    }
 
 #           define suffixes(x, m, suff) {                       \
-               int f, g, i;                                     \
-                                                                \
-               suff[m - 1] = m;                                 \
-               g = m - 1;                                       \
-               for (i = m - 2; i >= 0; --i) {                   \
-                  if (i > g && suff[i + m - 1 - f] < i - g)     \
-                     suff[i] = suff[i + m - 1 - f];             \
-                  else {                                        \
-                     if (i < g)                                 \
-                        g = i;                                  \
-                     f = i;                                     \
-                     while (g >= 0 && x[g] == x[g + m - 1 - f]) \
-                        --g;                                    \
-                     suff[i] = f - g;                           \
-                  }                                             \
-               }                                                \
-            }
+	       int f, g, i;                                     \
+								\
+	       suff[m - 1] = m;                                 \
+	       g = m - 1;                                       \
+	       for (i = m - 2; i >= 0; --i) {                   \
+		  if (i > g && suff[i + m - 1 - f] < i - g)     \
+		     suff[i] = suff[i + m - 1 - f];             \
+		  else {                                        \
+		     if (i < g)                                 \
+			g = i;                                  \
+		     f = i;                                     \
+		     while (g >= 0 && x[g] == x[g + m - 1 - f]) \
+			--g;                                    \
+		     suff[i] = f - g;                           \
+		  }                                             \
+	       }                                                \
+	    }
 
 #           define preBmGs(x, m, bmGs) {                        \
-               int i, j, suff[XSIZE];                           \
-                                                                \
-               suffixes(x, m, suff);                            \
-                                                                \
-               for (i = 0; i < m; ++i)                          \
-                  bmGs[i] = m;                                  \
-               j = 0;                                           \
-               for (i = m - 1; i >= 0; --i)                     \
-                  if (suff[i] == i + 1)                         \
-                     for (; j < m - 1 - i; ++j)                 \
-                        if (bmGs[j] == m)                       \
-                           bmGs[j] = m - 1 - i;                 \
-               for (i = 0; i <= m - 2; ++i)                     \
-                  bmGs[m - 1 - suff[i]] = m - 1 - i;            \
-            }
-
-            /* tables only depend on pattern; so we can cache them in case the same string is searched again */
-            if ((m == lastPatternSize)
-             && (strcmp(lastPattern, x) == 0)) {
-                /* tables are still valid */
-                // printf("valid: \"%s\"\n", lastPattern);
-            } else {                
-                /* Preprocessing */
-                // printf("compute: \"%s\"\n", lastPattern);
-                preBmGs(x, m, bmGs);
-                preBmBc(x, m, bmBc);
-                if (m <= MAX_PATTERN_SIZE) {
-                    // printf("cache for: \"%s\"\n", lastPattern);
-                    strcpy(lastPattern, x);
-                    lastPatternSize = m;
-                }
-            }
-
-            /* Searching */
-            j = __intVal(startIndex) - 1;
-            while (j <= n - m) {
-               for (i = m - 1; i >= 0 && x[i] == y[i + j]; --i);
-               if (i < 0) {
-                  RETURN (__mkSmallInteger(j+1));
-                  j += bmGs[0];  
-               } else {
-                  int s1 = bmGs[i];
-                  int s2 = bmBc[y[i + j]] - m + 1 + i;
-                  j += MAX(s1, s2);
-               }
-            }
-            notFound = true;
-        }
+	       int i, j, suff[XSIZE];                           \
+								\
+	       suffixes(x, m, suff);                            \
+								\
+	       for (i = 0; i < m; ++i)                          \
+		  bmGs[i] = m;                                  \
+	       j = 0;                                           \
+	       for (i = m - 1; i >= 0; --i)                     \
+		  if (suff[i] == i + 1)                         \
+		     for (; j < m - 1 - i; ++j)                 \
+			if (bmGs[j] == m)                       \
+			   bmGs[j] = m - 1 - i;                 \
+	       for (i = 0; i <= m - 2; ++i)                     \
+		  bmGs[m - 1 - suff[i]] = m - 1 - i;            \
+	    }
+
+	    /* tables only depend on pattern; so we can cache them in case the same string is searched again */
+	    if ((m == lastPatternSize)
+	     && (strcmp(lastPattern, x) == 0)) {
+		/* tables are still valid */
+		// printf("valid: \"%s\"\n", lastPattern);
+	    } else {
+		/* Preprocessing */
+		// printf("compute: \"%s\"\n", lastPattern);
+		preBmGs(x, m, bmGs);
+		preBmBc(x, m, bmBc);
+		if (m <= MAX_PATTERN_SIZE) {
+		    // printf("cache for: \"%s\"\n", lastPattern);
+		    strcpy(lastPattern, x);
+		    lastPatternSize = m;
+		}
+	    }
+
+	    /* Searching */
+	    j = __intVal(startIndex) - 1;
+	    while (j <= n - m) {
+	       for (i = m - 1; i >= 0 && x[i] == y[i + j]; --i);
+	       if (i < 0) {
+		  RETURN (__mkSmallInteger(j+1));
+		  j += bmGs[0];
+	       } else {
+		  int s1 = bmGs[i];
+		  int s2 = bmBc[y[i + j]] - m + 1 + i;
+		  j += MAX(s1, s2);
+	       }
+	    }
+	    notFound = true;
+	}
     }
 %}.
     notFound == true ifTrue:[
-        ^ exceptionValue value.
+	^ exceptionValue value.
     ].
     ^ super indexOfSubCollection:aSubString startingAt:startIndex ifAbsent:exceptionValue caseSensitive:caseSensitive
 
@@ -3553,32 +3553,32 @@
     REGISTER OBJ slf = self;
 
     if (__isStringLike(slf) && __isStringLike(aStringOrChar)) {
-        len1 = __qSize(slf);
-        len2 = __qSize(aStringOrChar);
-        if (len1 < len2) {
-            RETURN ( false );
-        }
-
-        src1 = __stringVal(slf) + (len1 - len2);
-        src2 = __stringVal(aStringOrChar);
-        while (c = *src2++) {
-            if (c != *src1++) {
-                RETURN ( false );
-            }
-        }
-        RETURN (true);
+	len1 = __qSize(slf);
+	len2 = __qSize(aStringOrChar);
+	if (len1 < len2) {
+	    RETURN ( false );
+	}
+
+	src1 = __stringVal(slf) + (len1 - len2);
+	src2 = __stringVal(aStringOrChar);
+	while (c = *src2++) {
+	    if (c != *src1++) {
+		RETURN ( false );
+	    }
+	}
+	RETURN (true);
     }
     if (__isCharacter(aStringOrChar)) {
-        int val;
-
-        val = __intVal(_characterVal(aStringOrChar));
-        if ((unsigned)val <= 0xFF) {
-            len1 = __stringSize(slf);
-            if (len1 > 0) {
-                RETURN ( (__stringVal(slf)[len1-1] == val) ? true : false);
-            }
-        }
-        RETURN ( false );
+	int val;
+
+	val = __intVal(__characterVal(aStringOrChar));
+	if ((unsigned)val <= 0xFF) {
+	    len1 = __stringSize(slf);
+	    if (len1 > 0) {
+		RETURN ( (__stringVal(slf)[len1-1] == val) ? true : false);
+	    }
+	}
+	RETURN ( false );
     }
 %}.
     ^ super endsWith:aStringOrChar
@@ -3679,77 +3679,77 @@
     extern void *malloc();
 
     if (__qIsStringLike(self) && __isStringLike(aString)
-        && __bothSmallInteger(insrtWeight, caseWeight)
-        && __bothSmallInteger(substWeight, deleteWeight)
-        && __isSmallInteger(kbdTypoWeight)
+	&& __bothSmallInteger(insrtWeight, caseWeight)
+	&& __bothSmallInteger(substWeight, deleteWeight)
+	&& __isSmallInteger(kbdTypoWeight)
     ) {
-        iW = __intVal(insrtWeight);
-        cW = __intVal(caseWeight);
-        sW = __intVal(substWeight);
-        kW = __intVal(kbdTypoWeight);
-        dW = __intVal(deleteWeight);
-        s1 = __stringVal(self);
-        s2 = __stringVal(aString);
-        l1 = strlen(s1);
-        l2 = strlen(s2);
-
-        sz = (l1 < l2) ? l2 : l1;
-        rowDelta = sz + 1;
-        if (sz <= FASTSIZE) {
-            data = fastData;
-        } else {
-            /* add ifdef ALLOCA here ... */
-            data = (unsigned short *)malloc(rowDelta * rowDelta * sizeof(short));
-            if (! data) goto mallocFailed;
-        }
-
-        data[0] = 0;
-        for (j=1, dp=data+1; j<=sz; j++, dp++)
-            *dp = dp[-1] + iW;
-
-        for (i=1, dp=data+rowDelta; i<=sz; i++, dp+=rowDelta)
-            *dp = dp[-rowDelta] + dW;
-
-        for (i=0; i<l1; i++) {
-            for (j=0; j<l2; j++) {
-                if (s1[i] == s2[j])
-                    m = 0;
-                else if (tolower(s1[i]) == tolower(s2[j]))
-                    m = cW;
-                else if (sW != kW && nextOnKeyboard(tolower(s1[i]), tolower(s2[j])))
-                    m = kW;
-                else
-                    m = sW;
-
-                dp = data + ((i+1)*rowDelta) + j;
-                v2 = dp[0] + iW;
-                v1 = dp[-rowDelta] + m;
-                v3 = dp[-rowDelta+1] + dW;
-                if (v1 < v2) {
-                    if (v1 < v3)
-                        m = v1;
-                    else
-                        m = v3;
-                } else {
-                    if (v2 < v3)
-                        m = v2;
-                    else
-                        m = v3;
-                }
-                dp[1] = m;
-            }
-        }
-        m = data[l1*rowDelta + l2];
-        if (sz > FASTSIZE)
-            free(data);
-        RETURN ( __mkSmallInteger(m) );
+	iW = __intVal(insrtWeight);
+	cW = __intVal(caseWeight);
+	sW = __intVal(substWeight);
+	kW = __intVal(kbdTypoWeight);
+	dW = __intVal(deleteWeight);
+	s1 = __stringVal(self);
+	s2 = __stringVal(aString);
+	l1 = strlen(s1);
+	l2 = strlen(s2);
+
+	sz = (l1 < l2) ? l2 : l1;
+	rowDelta = sz + 1;
+	if (sz <= FASTSIZE) {
+	    data = fastData;
+	} else {
+	    /* add ifdef ALLOCA here ... */
+	    data = (unsigned short *)malloc(rowDelta * rowDelta * sizeof(short));
+	    if (! data) goto mallocFailed;
+	}
+
+	data[0] = 0;
+	for (j=1, dp=data+1; j<=sz; j++, dp++)
+	    *dp = dp[-1] + iW;
+
+	for (i=1, dp=data+rowDelta; i<=sz; i++, dp+=rowDelta)
+	    *dp = dp[-rowDelta] + dW;
+
+	for (i=0; i<l1; i++) {
+	    for (j=0; j<l2; j++) {
+		if (s1[i] == s2[j])
+		    m = 0;
+		else if (tolower(s1[i]) == tolower(s2[j]))
+		    m = cW;
+		else if (sW != kW && nextOnKeyboard(tolower(s1[i]), tolower(s2[j])))
+		    m = kW;
+		else
+		    m = sW;
+
+		dp = data + ((i+1)*rowDelta) + j;
+		v2 = dp[0] + iW;
+		v1 = dp[-rowDelta] + m;
+		v3 = dp[-rowDelta+1] + dW;
+		if (v1 < v2) {
+		    if (v1 < v3)
+			m = v1;
+		    else
+			m = v3;
+		} else {
+		    if (v2 < v3)
+			m = v2;
+		    else
+			m = v3;
+		}
+		dp[1] = m;
+	    }
+	}
+	m = data[l1*rowDelta + l2];
+	if (sz > FASTSIZE)
+	    free(data);
+	RETURN ( __mkSmallInteger(m) );
     }
 mallocFailed: ;
 %}.
 
     ^ super levenshteinTo:aString
-                        s:substWeight k:kbdTypoWeight c:caseWeight
-                        i:insrtWeight d:deleteWeight
+			s:substWeight k:kbdTypoWeight c:caseWeight
+			i:insrtWeight d:deleteWeight
 
     "
      'ocmprt' levenshteinTo:'computer'
@@ -3790,81 +3790,81 @@
     REGISTER OBJ slf = self;
 
     if (__qIsStringLike(slf) &&__isStringLike(aStringOrChar)) {
-        src1 = __stringVal(slf);
-        src2 = __stringVal(aStringOrChar);
-
-        if (src1[0] != src2[0]) {
-            if (__qSize(aStringOrChar) == (OHDR_SIZE+1) /* 1 for the 0-byte */) {
-                RETURN (true);
-            }
-            RETURN ( false );
-        }
-
-        len1 = __qSize(slf);
-        len2 = __qSize(aStringOrChar);
-        if (len1 < len2) {
-            RETURN ( false );
-        }
+	src1 = __stringVal(slf);
+	src2 = __stringVal(aStringOrChar);
+
+	if (src1[0] != src2[0]) {
+	    if (__qSize(aStringOrChar) == (OHDR_SIZE+1) /* 1 for the 0-byte */) {
+		RETURN (true);
+	    }
+	    RETURN ( false );
+	}
+
+	len1 = __qSize(slf);
+	len2 = __qSize(aStringOrChar);
+	if (len1 < len2) {
+	    RETURN ( false );
+	}
 
 #ifdef UINT64
-        while (len2 > (OHDR_SIZE+sizeof(UINT64))) {
-            if ( ((UINT64 *)src1)[0] != ((UINT64 *)src2)[0] ) {
-                RETURN (false);
-            }
-            len2 -= sizeof(UINT64);
-            src1 += sizeof(UINT64);
-            src2 += sizeof(UINT64);
-        }
+	while (len2 > (OHDR_SIZE+sizeof(UINT64))) {
+	    if ( ((UINT64 *)src1)[0] != ((UINT64 *)src2)[0] ) {
+		RETURN (false);
+	    }
+	    len2 -= sizeof(UINT64);
+	    src1 += sizeof(UINT64);
+	    src2 += sizeof(UINT64);
+	}
 #else
 # ifdef __UNROLL_LOOPS__
-        while (len2 > (OHDR_SIZE+sizeof(INT)*4)) {
-            if ( ((unsigned INT *)src1)[0] != ((unsigned INT *)src2)[0]) {
-                RETURN (false);
-            }
-            if ( ((unsigned INT *)src1)[1] != ((unsigned INT *)src2)[1]) {
-                RETURN (false);
-            }
-            if ( ((unsigned INT *)src1)[2] != ((unsigned INT *)src2)[2]) {
-                RETURN (false);
-            }
-            if ( ((unsigned INT *)src1)[3] != ((unsigned INT *)src2)[3]) {
-                RETURN (false);
-            }
-            len2 -= sizeof(INT)*4;
-            src1 += sizeof(INT)*4;
-            src2 += sizeof(INT)*4;
-        }
+	while (len2 > (OHDR_SIZE+sizeof(INT)*4)) {
+	    if ( ((unsigned INT *)src1)[0] != ((unsigned INT *)src2)[0]) {
+		RETURN (false);
+	    }
+	    if ( ((unsigned INT *)src1)[1] != ((unsigned INT *)src2)[1]) {
+		RETURN (false);
+	    }
+	    if ( ((unsigned INT *)src1)[2] != ((unsigned INT *)src2)[2]) {
+		RETURN (false);
+	    }
+	    if ( ((unsigned INT *)src1)[3] != ((unsigned INT *)src2)[3]) {
+		RETURN (false);
+	    }
+	    len2 -= sizeof(INT)*4;
+	    src1 += sizeof(INT)*4;
+	    src2 += sizeof(INT)*4;
+	}
 # endif /* __UNROLL_LOOPS__ */
 #endif /* UINT64 */
 
-        while (len2 > (OHDR_SIZE+sizeof(INT))) {
-            if ( ((unsigned INT *)src1)[0] != ((unsigned INT *)src2)[0]) {
-                RETURN (false);
-            }
-            len2 -= sizeof(INT);
-            src1 += sizeof(INT);
-            src2 += sizeof(INT);
-        }
-
-        while (c = *src2++) {
-            if (c != *src1) {
-                RETURN ( false );
-            }
-            src1++;
-        }
-        RETURN (true);
+	while (len2 > (OHDR_SIZE+sizeof(INT))) {
+	    if ( ((unsigned INT *)src1)[0] != ((unsigned INT *)src2)[0]) {
+		RETURN (false);
+	    }
+	    len2 -= sizeof(INT);
+	    src1 += sizeof(INT);
+	    src2 += sizeof(INT);
+	}
+
+	while (c = *src2++) {
+	    if (c != *src1) {
+		RETURN ( false );
+	    }
+	    src1++;
+	}
+	RETURN (true);
     }
     if (__isCharacter(aStringOrChar)) {
-        int val;
-
-        val = __intVal(_characterVal(aStringOrChar));
-        if ((unsigned)val <= 0xFF) {
-            len1 = __stringSize(slf);
-            if (len1 > 0) {
-                RETURN ( (__stringVal(slf)[0] == val) ? true : false);
-            }
-        }
-        RETURN ( false );
+	int val;
+
+	val = __intVal(__characterVal(aStringOrChar));
+	if ((unsigned)val <= 0xFF) {
+	    len1 = __stringSize(slf);
+	    if (len1 > 0) {
+		RETURN ( (__stringVal(slf)[0] == val) ? true : false);
+	    }
+	}
+	RETURN ( false );
     }
 %}.
     ^ super startsWith:aStringOrChar
@@ -3895,10 +3895,10 @@
 !String class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.304 2013-04-03 14:28:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.305 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.304 2013-04-03 14:28:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.305 2013-05-21 20:44:47 cg Exp $'
 ! !
 
--- a/UnixOperatingSystem.st	Tue May 21 21:58:09 2013 +0100
+++ b/UnixOperatingSystem.st	Fri May 24 18:52:05 2013 +0100
@@ -4512,8 +4512,9 @@
      Some of the fields may be returned as nil on systems which do not provide
      all of the information.
 
-     If aPathName is invalid, or its NOT a symbolic link, nil is returned.
-     (which means, that systems like VMS or MSDOS always return nil here.)
+     If aPathName is invalid, nil is returned.
+     If aPathName is NOT a symbolic link, the #infoOf: aPathname itself is returned.
+     (which means, that systems like VMS or MSDOS always return the info here.)
 
      Return the info about the link itself,
      on contrast to #infoOf:, which returns the info of the pointed to file
@@ -5298,7 +5299,7 @@
 
 enableSignal:signalNumber
     "enable (Unix-)signal processing for signalNumber.
-     Dont confuse Unix signals with smalltalk signals.
+     Don't confuse Unix signals with smalltalk signals.
      The signal will be delivered to one of the standard handlers
      (SIGINT, SIGQUIT, etc) or to a general handler, which
      sends #signalInterrupt:.
@@ -5379,6 +5380,11 @@
     extern void __signalTimerInterrupt(SIGHANDLER_ARG);
 # endif
 #endif
+#ifdef SIGABRT
+# ifndef __signalAbortInterrupt
+    extern void __signalAbortInterrupt(SIGHANDLER_ARG);
+# endif
+#endif
 #ifndef __signalInterrupt
     extern void __signalInterrupt(SIGHANDLER_ARG);
 #endif
@@ -5437,6 +5443,11 @@
 		handler = __signalSEGVInterrupt;
 		break;
 #endif
+#ifdef SIGABRT
+	    case SIGABRT:
+		handler = __signalAbortInterrupt;
+		break;
+#endif
 #ifdef SIGILL
 	    case SIGILL:
 		handler = __signalTrapInterrupt;
@@ -11080,6 +11091,14 @@
     ^ type == #socket
 !
 
+isSpecialFile
+    ^ (type ~~ #directory
+	and:[type ~~ #remoteDirectory
+	and:[type ~~ #regular
+	and:[type ~~ #symbolicLink
+    ]]])
+!
+
 isSymbolicLink
     ^ type == #symbolicLink
 !
@@ -12690,7 +12709,7 @@
     sock = __smallIntegerVal(__INST(fd));
 
     oClass = __Class(aDataBuffer);
-    switch (_intVal(_ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
+    switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
 	case BYTEARRAY:
 	case WORDARRAY:
 	case SWORDARRAY:
@@ -12704,7 +12723,7 @@
 	    goto err;
     }
 
-    nInstVars = __intVal(_ClassInstPtr(oClass)->c_ninstvars);
+    nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
     nInstBytes = OHDR_SIZE + nInstVars * sizeof(OBJ);
     objSize = __qSize(aDataBuffer) - nInstBytes;
     nInstBytes += __startIndex;
@@ -12797,7 +12816,7 @@
     sock = __smallIntegerVal(__INST(fd));
 
     oClass = __Class(aDataBuffer);
-    switch (_intVal(_ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
+    switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
 	case BYTEARRAY:
 	    offs = __startIndex;
 	    break;
@@ -12829,7 +12848,7 @@
 	    goto err;
     }
 
-    nInstVars = __smallIntegerVal(_ClassInstPtr(oClass)->c_ninstvars);
+    nInstVars = __smallIntegerVal(__ClassInstPtr(oClass)->c_ninstvars);
     nInstBytes = OHDR_SIZE + nInstVars * sizeof(OBJ);
     objSize = __qSize(aDataBuffer) - nInstBytes - offs;
 
@@ -13228,11 +13247,11 @@
 !UnixOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.321 2013-05-06 00:24:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.325 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.321 2013-05-06 00:24:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.325 2013-05-21 20:44:47 cg Exp $'
 !
 
 version_HG
--- a/Win32OperatingSystem.st	Tue May 21 21:58:09 2013 +0100
+++ b/Win32OperatingSystem.st	Fri May 24 18:52:05 2013 +0100
@@ -747,13 +747,16 @@
     HRESULT hres;
 
     if( ! coInitialized ) {
+
 	hres = CoInitializeEx(NULL, COINIT_MULTITHREADED);
 	if (! SUCCEEDED(hres)) {
 	    console_fprintf(stderr, "OperatingSystem [info]: Could not open the COM library hres = %08x\n", hres );
 	    goto error;
 	}
 	coInitialized = 1;
+
 #ifdef COM_DEBUG
+
 	console_fprintf(stderr, "OperatingSystem [info]: COM initialized\n" );
 #endif
     }
@@ -821,7 +824,6 @@
     "Modified: 7.1.1997 / 19:36:11 / stefan"
 ! !
 
-
 !Win32OperatingSystem class methodsFor:'OS signal constants'!
 
 sigABRT
@@ -5526,23 +5528,24 @@
     "return some object filled with info for the file 'aPathName';
      the info (for which corresponding access methods are understood by
      the returned object) is:
-	 type            - a symbol giving the files type
-	 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 Timestamp)
-	 modified        - last modification time (as Timestamp)
-	 statusChanged   - last status change time (as Timestamp)
-	 alternativeName - (windows only:) the MSDOS name of the file
+         type            - a symbol giving the files type
+         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 Timestamp)
+         modified        - last modification time (as Timestamp)
+         statusChanged   - last status change time (as Timestamp)
+         alternativeName - (windows only:) the MSDOS name of the file
 
      Some of the fields may be returned as nil on systems which do not provide
      all of the information.
      Return nil if such a file does not exist.
-     For symbolic links (if supported by the OS),
-     the info of the pointed-to-file (i.e. the target) is returned;
-     use #linkInfoOf: to get info about the link itself.
+
+     Return the info about the link itself,
+     on contrast to #infoOf:, which returns the info of the pointed to file
+     in case of a symbolic link.
     "
 
     |info type mode uid gid size id
@@ -5561,45 +5564,45 @@
     wchar_t _aPathName[MAXPATHLEN+1];
 
     if (__isStringLike(aPathName)) {
-	int i;
-	int l = __stringSize(aPathName);
-	if (l > MAXPATHLEN) l = MAXPATHLEN;
-
-	for (i=0; i<l; i++) {
-	    _aPathName[i] = __stringVal(aPathName)[i];
-	}
-	_aPathName[i] = 0;
+        int i;
+        int l = __stringSize(aPathName);
+        if (l > MAXPATHLEN) l = MAXPATHLEN;
+
+        for (i=0; i<l; i++) {
+            _aPathName[i] = __stringVal(aPathName)[i];
+        }
+        _aPathName[i] = 0;
     } else if (__isUnicode16String(aPathName)) {
-	int i;
-	int l = __unicode16StringSize(aPathName);
-	if (l > MAXPATHLEN) l = MAXPATHLEN;
-
-	for (i=0; i<l; i++) {
-	    _aPathName[i] = __unicode16StringVal(aPathName)[i];
-	}
-	_aPathName[i] = 0;
+        int i;
+        int l = __unicode16StringSize(aPathName);
+        if (l > MAXPATHLEN) l = MAXPATHLEN;
+
+        for (i=0; i<l; i++) {
+            _aPathName[i] = __unicode16StringVal(aPathName)[i];
+        }
+        _aPathName[i] = 0;
     } else
-	goto badArgument;
+        goto badArgument;
 
 #ifdef DO_WRAP_CALLS
     {
-	do {
-	    __threadErrno = 0;
-	    result = STX_API_NOINT_CALL3( "GetFileAttributesExW", GetFileAttributesExW, _aPathName, GetFileExInfoStandard, &fileAttributeData);
-	} while (!result && (__threadErrno == EINTR));
+        do {
+            __threadErrno = 0;
+            result = STX_API_NOINT_CALL3( "GetFileAttributesExW", GetFileAttributesExW, _aPathName, GetFileExInfoStandard, &fileAttributeData);
+        } while (!result && (__threadErrno == EINTR));
     }
 #else
     result = GetFileAttributesExW(_aPathName, GetFileExInfoStandard, &fileAttributeData);
     if (!result) {
-	__threadErrno = __WIN32_ERR(GetLastError());
+        __threadErrno = __WIN32_ERR(GetLastError());
     }
 #endif
 
     if (!result) {
-	@global(LastErrorNumber) = __mkSmallInteger(__threadErrno);
+        @global(LastErrorNumber) = __mkSmallInteger(__threadErrno);
     } else {
-	id = __mkSmallInteger(0);   /* could get it by opening ... */
-	size = __MKLARGEINT64(1, fileAttributeData.nFileSizeLow, fileAttributeData.nFileSizeHigh);
+        id = __mkSmallInteger(0);   /* could get it by opening ... */
+        size = __MKLARGEINT64(1, fileAttributeData.nFileSizeLow, fileAttributeData.nFileSizeHigh);
 
 //        if (fileAttributeData.cFileName[0] != '\0') {
 //            bcopy(fileAttributeData.cFileName, fileNameBuffer, MAXPATHLEN*sizeof(wchar_t));
@@ -5613,83 +5616,83 @@
 //            alternativeName = __MKU16STRING(alternativeFileNameBuffer); /* DOS name */
 //        }
 
-	/*
-	 * simulate access bits
-	 */
-	if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) {
-	    modeBits = 0444;
-	} else {
-	    modeBits = 0666;
-	}
-
-	if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
-	    type = @symbol(directory);
-	    modeBits = 0777;   /* executable and WRITABLE - refer to comment in #isWritable: */
-	} else if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
-	    type = @symbol(symbolicLink);
-	    modeBits = 0777;   /* even in UNIX symlinks have 0777 */
-	} else {
-	    type = @symbol(regular);
-	}
-
-	mode = __mkSmallInteger(modeBits);
-
-	cOsTime = FileTimeToOsTime(&fileAttributeData.ftCreationTime);
-	aOsTime = FileTimeToOsTime(&fileAttributeData.ftLastAccessTime);
-	mOsTime = FileTimeToOsTime(&fileAttributeData.ftLastWriteTime);
+        /*
+         * simulate access bits
+         */
+        if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) {
+            modeBits = 0444;
+        } else {
+            modeBits = 0666;
+        }
+
+        if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+            type = @symbol(directory);
+            modeBits = 0777;   /* executable and WRITABLE - refer to comment in #isWritable: */
+        } else if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
+            type = @symbol(symbolicLink);
+            modeBits = 0777;   /* even in UNIX symlinks have 0777 */
+        } else {
+            type = @symbol(regular);
+        }
+
+        mode = __mkSmallInteger(modeBits);
+
+        cOsTime = FileTimeToOsTime(&fileAttributeData.ftCreationTime);
+        aOsTime = FileTimeToOsTime(&fileAttributeData.ftLastAccessTime);
+        mOsTime = FileTimeToOsTime(&fileAttributeData.ftLastWriteTime);
     }
 
   badArgument: ;
 %}.
 
     (aPathName endsWith:'.lnk') ifTrue:[
-	type := #symbolicLink.
-	"/ now done lazyly in FileStatusInfo, when the path is accessed
-	"/ path := self getLinkTarget:aPathName.
+        type := #symbolicLink.
+        "/ now done lazyly in FileStatusInfo, when the path is accessed
+        "/ path := self getLinkTarget:aPathName.
     ].
 
     mode isNil ifTrue:[
-	(self isDirectory:aPathName) ifTrue:[
-	    "/ the code above fails for root directories (these do not exist).
-	    "/ simulate here
-	    mode := 8r777.
-	    type := #directory.
-	    uid := gid := 0.
-	    size := 0.
-	    id := 0.
-	    atime := mtime := ctime := Timestamp now.
-	].
+        (self isDirectory:aPathName) ifTrue:[
+            "/ the code above fails for root directories (these do not exist).
+            "/ simulate here
+            mode := 8r777.
+            type := #directory.
+            uid := gid := 0.
+            size := 0.
+            id := 0.
+            atime := mtime := ctime := Timestamp now.
+        ].
     ].
     mode notNil ifTrue:[
-	atime isNil ifTrue:[
-	    atime := Timestamp new fromOSTime:aOsTime.
-	].
-	mtime isNil ifTrue:[
-	    mtime := Timestamp new fromOSTime:mOsTime.
-	].
-	ctime isNil ifTrue:[
-	    ctime := Timestamp new fromOSTime:cOsTime.
-	].
-	fileName notNil ifTrue:[
-	    fileName := fileName asSingleByteStringIfPossible
-	].
-	alternativeName notNil ifTrue:[
-	    alternativeName := alternativeName asSingleByteStringIfPossible
-	].
-	info := FileStatusInfo
-		    type:type
-		    mode:mode
-		    uid:uid
-		    gid:gid
-		    size:size
-		    id:id
-		    accessed:atime
-		    modified:mtime
-		    created:ctime
-		    sourcePath:aPathName
-		    fullName:fileName
-		    alternativeName:alternativeName.
-	^ info
+        atime isNil ifTrue:[
+            atime := Timestamp new fromOSTime:aOsTime.
+        ].
+        mtime isNil ifTrue:[
+            mtime := Timestamp new fromOSTime:mOsTime.
+        ].
+        ctime isNil ifTrue:[
+            ctime := Timestamp new fromOSTime:cOsTime.
+        ].
+        fileName notNil ifTrue:[
+            fileName := fileName asSingleByteStringIfPossible
+        ].
+        alternativeName notNil ifTrue:[
+            alternativeName := alternativeName asSingleByteStringIfPossible
+        ].
+        info := FileStatusInfo
+                    type:type
+                    mode:mode
+                    uid:uid
+                    gid:gid
+                    size:size
+                    id:id
+                    accessed:atime
+                    modified:mtime
+                    created:ctime
+                    sourcePath:aPathName
+                    fullName:fileName
+                    alternativeName:alternativeName.
+        ^ info
    ].
    ^ nil
 
@@ -5862,21 +5865,21 @@
 
 %{
     if (__isStringLike(aPathName)) {
-	char nameBuffer[MAXPATHLEN + 1];
-	char nameBuffer2[MAXPATHLEN + 1];
-	char *returnedName = NULL;
-	int rslt;
+        char nameBuffer[MAXPATHLEN + 1];
+        char nameBuffer2[MAXPATHLEN + 1];
+        char *returnedName = NULL;
+        int rslt;
 
 #ifdef DO_WRAP_CALLS
-	char _aPathName[MAXPATHLEN+1];
-
-	strncpy(_aPathName, __stringVal(aPathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
-	do {
-	    __threadErrno = 0;
-	    rslt = STX_API_NOINT_CALL4( "GetFullPathNameA", GetFullPathNameA, _aPathName, MAXPATHLEN, nameBuffer, NULL);
-	} while ((rslt < 0) && (__threadErrno == EINTR));
-#else
-	rslt = GetFullPathNameA(__stringVal(aPathName), MAXPATHLEN, nameBuffer, NULL);
+        char _aPathName[MAXPATHLEN+1];
+
+        strncpy(_aPathName, __stringVal(aPathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
+        do {
+            __threadErrno = 0;
+            rslt = STX_API_NOINT_CALL4( "GetFullPathNameA", GetFullPathNameA, _aPathName, MAXPATHLEN, nameBuffer, NULL);
+        } while ((rslt < 0) && (__threadErrno == EINTR));
+#else
+        rslt = GetFullPathNameA(__stringVal(aPathName), MAXPATHLEN, nameBuffer, NULL);
 #endif
 	returnedName = nameBuffer;
 
@@ -5898,31 +5901,33 @@
 	RETURN (nil);
     }
     if (__isUnicode16String(aPathName)) {
-	wchar_t nameBuffer[MAXPATHLEN + 1];
-	wchar_t nameBuffer2[MAXPATHLEN + 1];
-	wchar_t *returnedName = NULL;
-	int rslt;
-	wchar_t _aPathName[MAXPATHLEN+1];
-	int i, l;
-
-	l = __unicode16StringSize(aPathName);
-	if (l > MAXPATHLEN) l = MAXPATHLEN;
-	for (i=0; i<l; i++) {
-	    _aPathName[i] = __unicode16StringVal(aPathName)[i];
-	}
-	_aPathName[i] = 0;
+        wchar_t nameBuffer[MAXPATHLEN + 1];
+        wchar_t nameBuffer2[MAXPATHLEN + 1];
+        wchar_t *returnedName = NULL;
+        int rslt;
+        wchar_t _aPathName[MAXPATHLEN+1];
+        int i, l;
+
+        l = __unicode16StringSize(aPathName);
+        if (l > MAXPATHLEN) l = MAXPATHLEN;
+        for (i=0; i<l; i++) {
+            _aPathName[i] = __unicode16StringVal(aPathName)[i];
+        }
+        _aPathName[i] = 0;
 
 #ifdef DO_WRAP_CALLS
-	do {
-	    __threadErrno = 0;
-	    rslt = STX_API_NOINT_CALL4( "GetFullPathNameW", GetFullPathNameW, _aPathName, MAXPATHLEN, nameBuffer, NULL);
-	} while ((rslt < 0) && (__threadErrno == EINTR));
-#else
-	rslt = GetFullPathNameW(_aPathName, MAXPATHLEN, nameBuffer, NULL);
-#endif
+        do {
+            __threadErrno = 0;
+            rslt = STX_API_NOINT_CALL4( "GetFullPathNameW", GetFullPathNameW, _aPathName, MAXPATHLEN, nameBuffer, NULL);
+        } while ((rslt < 0) && (__threadErrno == EINTR));
+#else
+        rslt = GetFullPathNameW(_aPathName, MAXPATHLEN, nameBuffer, NULL);
+#endif
+
 	returnedName = nameBuffer;
 
 	if (rslt > 0) {
+
 #ifdef DO_WRAP_CALLS
 	    do {
 		__threadErrno = 0;
@@ -5940,6 +5945,7 @@
     }
     error = @symbol(argument);     // argument is not a string or unicode16string
 %}.
+
     error notNil ifTrue:[
 	self primitiveFailed:error.
     ].
@@ -7776,8 +7782,8 @@
 
 getNetworkMACAddresses
     "return a dictionary filled with
-	key -> name of interface
-	value -> the MAC adress (as ByteArray)
+        key -> name of interface
+        value -> the MAC adress (as ByteArray)
      for each interface
     "
 
@@ -7813,6 +7819,7 @@
 	    ipAddress = __MKSTRING(pAdapterInfo->IpAddressList.IpAddress.String);
 	    ipAddressMask = __MKSTRING(pAdapterInfo->IpAddressList.IpMask.String);
 	    entry = __ARRAY_NEW_INT(5);
+
 /*
  * back to ST/X's String definition
  */
@@ -7838,16 +7845,16 @@
     "Keep the order as reurned by the OS"
     info := OrderedDictionary new:nAdapters.
     nAdapters notNil ifTrue:[
-	1 to:nAdapters do:[:i |
-	    |entry name description macAddr ipAddr|
-
-	    entry := rawData at:i.
-	    name := entry at:1.
-	    "/ description := entry at:2.
-	    macAddr := entry at:3.
-	    "/ ipAddr := entry at:4.
-	    info at:name put:macAddr.
-	].
+        1 to:nAdapters do:[:i |
+            |entry name description macAddr ipAddr|
+
+            entry := rawData at:i.
+            name := entry at:1.
+            "/ description := entry at:2.
+            macAddr := entry at:3.
+            "/ ipAddr := entry at:4.
+            info at:name put:macAddr.
+        ].
     ].
     ^ info
 
@@ -11629,6 +11636,14 @@
     ^ type == #socket
 !
 
+isSpecialFile
+    ^ (type ~~ #directory
+        and:[type ~~ #remoteDirectory
+        and:[type ~~ #regular
+        and:[type ~~ #symbolicLink
+    ]]])
+!
+
 isSymbolicLink
     ^ type == #symbolicLink
 !
@@ -17105,15 +17120,15 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.461 2013-04-26 12:42:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.462 2013-05-15 17:06:14 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.461 2013-04-26 12:42:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.462 2013-05-15 17:06:14 stefan Exp $'
 !
 
 version_SVN
-    ^ '§Id§'
+    ^ '$Id: Win32OperatingSystem.st,v 1.462 2013-05-15 17:06:14 stefan Exp $'
 
 ! !
 
--- a/stx_libbasic.st	Tue May 21 21:58:09 2013 +0100
+++ b/stx_libbasic.st	Fri May 24 18:52:05 2013 +0100
@@ -41,7 +41,6 @@
 "
 ! !
 
-
 !stx_libbasic class methodsFor:'description'!
 
 excludedFromPreRequisites
@@ -85,8 +84,6 @@
     )
 !
 
-
-
 referencedPreRequisites
     "list all packages containing classes referenced by the packages's members.
      This list can be maintained manually or (better) generated and
@@ -97,8 +94,9 @@
 
     ^ #(
     )
-! !
+!
 
+ !
 
 !stx_libbasic class methodsFor:'description - compilation'!
 
@@ -113,7 +111,7 @@
 !
 
 localIncludes
-    ^ '-I$(TOP)/librun'
+    ^ '-I$(TOP)/librun $(FFI_INCLUDE)'
 
     "Created: / 06-09-2006 / 18:18:06 / cg"
 !
@@ -124,7 +122,6 @@
     "Created: / 23-08-2006 / 11:06:17 / cg"
 ! !
 
-
 !stx_libbasic class methodsFor:'description - contents'!
 
 classNamesAndAttributes
@@ -539,7 +536,6 @@
     )
 ! !
 
-
 !stx_libbasic class methodsFor:'description - project information'!
 
 applicationIconFileName
@@ -575,7 +571,6 @@
     ^ 'Smalltalk/X'
 ! !
 
-
 !stx_libbasic class methodsFor:'description - svn'!
 
 svnRevisionNr
@@ -585,17 +580,17 @@
     ^ "$SVN-Revision:"'exported'"$"
 ! !
 
-
 !stx_libbasic class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/stx_libbasic.st,v 1.114 2013-03-20 11:33:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/stx_libbasic.st,v 1.117 2013-05-21 20:18:45 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/stx_libbasic.st,v 1.114 2013-03-20 11:33:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/stx_libbasic.st,v 1.117 2013-05-21 20:18:45 cg Exp $'
 !
 
 version_SVN
-    ^ '§ Id: stx_libbasic.st 10648 2011-06-23 15:55:10Z vranyj1  §'
+    ^ '$ Id: stx_libbasic.st 10648 2011-06-23 15:55:10Z vranyj1  $'
 ! !
+