Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 14 Feb 2016 07:29:57 +0000
branchjv
changeset 19227 5e949760a4e8
parent 19226 470475a1734e (current diff)
parent 19219 4988f69224c3 (diff)
child 19228 f2f3abaadcb4
Merge
AbstractTime.st
Behavior.st
Character.st
CharacterEncoderImplementations__ISO10646_to_UTF16BE.st
CharacterEncoderImplementations__ISO10646_to_UTF16LE.st
CharacterEncoderImplementations__TwoByteEncoder.st
Collection.st
Date.st
Error.st
ExternalStream.st
GenericException.st
LibraryDefinition.st
Notification.st
ProjectDefinition.st
Query.st
SharedPool.st
StandaloneStartup.st
Stream.st
Unicode16String.st
UninterpretedBytes.st
Warning.st
--- a/AbstractTime.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/AbstractTime.st	Sun Feb 14 07:29:57 2016 +0000
@@ -512,7 +512,6 @@
     "
 ! !
 
-
 !AbstractTime methodsFor:'abstract'!
 
 hours
@@ -1031,7 +1030,6 @@
     "/ ^ aTimestamp getSeconds - self getSeconds
 ! !
 
-
 !AbstractTime methodsFor:'printing & storing'!
 
 addBasicPrintBindingsTo:aDictionary language:languageOrNil
--- a/Behavior.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Behavior.st	Sun Feb 14 07:29:57 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -25,7 +23,7 @@
 !Behavior class methodsFor:'documentation'!
 
 VS
-    ^ '§Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.315 2011/11/29 10:20:21 cg Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.315 2011/11/29 10:20:21 cg Exp '
 !
 
 copyright
@@ -76,25 +74,25 @@
 
     [Instance variables:]
 
-	superclass        <Class>            the receivers superclass
-
-	methodDictionary  <MethodDictionary> inst-selectors and methods
-
-	instSize          <SmallInteger>     the number of instance variables
-
-	flags             <SmallInteger>     special flag bits coded in a number
-					     not for application use
+        superclass        <Class>            the classes superclass
+
+        methodDictionary  <MethodDictionary> inst-selectors and methods
+
+        instSize          <SmallInteger>     the number of instance variables
+
+        flags             <SmallInteger>     special flag bits coded in a number
+                                             not for application use
 
     flag bits (see stc.h):
 
     NOTICE: layout known by compiler and runtime system; be careful when changing
 
     [author:]
-	Claus Gittinger
+        Claus Gittinger
 
     [see also:]
-	Class ClassDescription Metaclass
-	Method MethodDictionary
+        Class ClassDescription Metaclass
+        Method MethodDictionary
 "
 !
 
@@ -1404,7 +1402,7 @@
 !
 
 getMethodDictionary
-    "ST 80 compatibility: return the receivers method dictionary."
+    "ST 80 compatibility: return the receiver's method dictionary."
 
     ^ self methodDictionary
 
@@ -1426,7 +1424,6 @@
     ^ self nameWithoutPrefix
 ! !
 
-
 !Behavior methodsFor:'RefactoringBrowser'!
 
 realClass
@@ -1642,7 +1639,7 @@
 !
 
 methodDictionary
-    "return the receivers method dictionary."
+    "return the receiver's method dictionary."
 
     ^ methodDictionary
 
@@ -1651,11 +1648,11 @@
 !
 
 methodDictionary:dict
-    "set the receivers method dictionary and flush inline caches."
+    "set the receiver's method dictionary and flush inline caches."
 
     dict isNil ifTrue:[
-	self error:'attempt to set methodDictionary to nil.' mayProceed:true.
-	^ self
+        self error:'attempt to set methodDictionary to nil.' mayProceed:true.
+        ^ self
     ].
     self setMethodDictionary:dict.
     ObjectMemory flushCaches.
@@ -1678,15 +1675,15 @@
 !
 
 selectors
-    "return the receivers selector array as an orderedCollection.
+    "return the receiver's selector array as an OrderedCollection.
      Notice: this may not be compatible with ST-80.
      (should we return a Set ?)"
 
     |md|
 
     (md := self methodDictionary) isNil ifTrue:[
-	'oops - nil methodDictionary' errorPrintCR.
-	^ #()
+        'oops - nil methodDictionary' errorPrintCR.
+        ^ #()
     ].
     ^ md keys
 
@@ -1695,7 +1692,7 @@
 !
 
 superclass
-    "return the receivers superclass"
+    "return the receiver's superclass"
 
     ^ superclass
 ! !
@@ -3308,7 +3305,7 @@
 !
 
 setMethodDictionary:dict
-    "set the receivers method dictionary.
+    "set the receiver's method dictionary.
      Convert dict to a MethodDictionary if necessary.
      Do not flush inline caches, therefore old cached methods may be executed
      after this call"
@@ -3325,19 +3322,19 @@
     "/ No other classes instances are allowed.
 
     dict class ~~ MethodDictionary ifTrue:[
-	methodDictionary := MethodDictionary withAll:dict.
-	methodDictionary isNil ifTrue:[
-
-	    "/ refuse to do this
-	    "/ (can only happen in case of memory allocation trouble,
-	    "/  where the allocation failed and some exception handler returned
-	    "/  nil ...)
-
-	    self error:'cannot set methodDictionary to nil' mayProceed:true.
-	    ^ self.
-	]
+        methodDictionary := MethodDictionary withAll:dict.
+        methodDictionary isNil ifTrue:[
+
+            "/ refuse to do this
+            "/ (can only happen in case of memory allocation trouble,
+            "/  where the allocation failed and some exception handler returned
+            "/  nil ...)
+
+            self error:'cannot set methodDictionary to nil' mayProceed:true.
+            ^ self.
+        ]
     ] ifFalse:[
-	methodDictionary := dict.
+        methodDictionary := dict.
     ].
     ^ self.
 
@@ -3876,18 +3873,18 @@
 !
 
 allSuperclasses
-    "return a collection of the receivers accumulated superclasses"
+    "return a collection of the receiver's accumulated superclasses"
 
     |aCollection theSuperClass|
 
     theSuperClass := self superclass.
     theSuperClass isNil ifTrue:[
-	^ #()
+        ^ #()
     ].
     aCollection := OrderedCollection new.
     [theSuperClass notNil] whileTrue:[
-	aCollection add:theSuperClass.
-	theSuperClass := theSuperClass superclass
+        aCollection add:theSuperClass.
+        theSuperClass := theSuperClass superclass
     ].
     ^ aCollection
 
@@ -3956,7 +3953,7 @@
 
 inheritsFrom:aClass
     "return true, if the receiver inherits methods from aClass;
-     i.e. if aClass is on the receivers superclass chain."
+     i.e. if aClass is on the receiver's superclass chain."
 
     ^ self isSubclassOf:aClass
 
@@ -4041,7 +4038,7 @@
 !
 
 superclasses
-    "return a collection of the receivers immediate superclasses.
+    "return a collection of the receiver's immediate superclasses.
      This method is a preparation for a future multiple inheritance extension
      - currently it is not supported by the VM"
 
@@ -4074,13 +4071,13 @@
 
 withAllSuperclasses
     "return a collection containing the receiver and all
-     of the receivers accumulated superclasses"
+     of the receiver's accumulated superclasses"
 
     |coll|
 
     coll := OrderedCollection new.
     self withAllSuperclassesDo:[:cls |
-	coll add:cls
+        coll add:cls
     ].
     ^ coll
 
@@ -4660,13 +4657,13 @@
 allSelectors
     "return a collection of all selectors understood by the receiver;
      this includes my selectors and all superclass selectors
-     (i.e. the receivers full protocol)"
+     (i.e. the receiver's full protocol)"
 
     |superclass|
 
     superclass := self superclass.
     superclass notNil ifTrue:[
-	^ superclass allSelectors addAll:(self selectors); yourself.
+        ^ superclass allSelectors addAll:(self selectors); yourself.
     ].
     ^ self selectors asNewIdentitySet
 
--- a/Character.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Character.st	Sun Feb 14 07:29:57 2016 +0000
@@ -1661,12 +1661,14 @@
     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
     "/ ST/X (and some old ST80's) mean: draw-yourself on a GC.
     (aGCOrStream isStream) ifFalse:[
-	^ super displayOn:aGCOrStream
+        ^ super displayOn:aGCOrStream
     ].
 
     self storeOn:aGCOrStream.
     aGCOrStream nextPutAll:' "16r'.
     asciivalue printOn:aGCOrStream base:16.
+    aGCOrStream nextPutAll:' '.
+    asciivalue printOn:aGCOrStream.
     aGCOrStream nextPut:$".
 !
 
--- a/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st	Sun Feb 14 07:29:57 2016 +0000
@@ -254,11 +254,11 @@
 !ISO10646_to_UTF16BE methodsFor:'private'!
 
 nextPutTwoByteValue:anInteger to:aStream
-    aStream nextPutShort:anInteger MSB:true
+    aStream nextPutInt16:anInteger MSB:true
 !
 
 nextTwoByteValueFrom:aStream
-    ^ aStream nextUnsignedShortMSB:true
+    ^ aStream nextUnsignedInt16MSB:true
 ! !
 
 !ISO10646_to_UTF16BE methodsFor:'queries'!
@@ -270,9 +270,10 @@
 !ISO10646_to_UTF16BE class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st,v 1.6 2012-07-12 18:07:54 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st,v 1.6 2012-07-12 18:07:54 cg Exp $'
+    ^ '$Header$'
 ! !
+
--- a/CharacterEncoderImplementations__ISO10646_to_UTF16LE.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/CharacterEncoderImplementations__ISO10646_to_UTF16LE.st	Sun Feb 14 07:29:57 2016 +0000
@@ -75,11 +75,11 @@
 !ISO10646_to_UTF16LE methodsFor:'private'!
 
 nextPutTwoByteValue:anInteger to:aStream
-    aStream nextPutShort:anInteger MSB:false
+    aStream nextPutInt16:anInteger MSB:false
 !
 
 nextTwoByteValueFrom:aStream
-    ^ aStream nextUnsignedShortMSB:false
+    ^ aStream nextUnsignedInt16MSB:false
 ! !
 
 !ISO10646_to_UTF16LE methodsFor:'queries'!
@@ -91,5 +91,6 @@
 !ISO10646_to_UTF16LE class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF16LE.st,v 1.3 2012-07-10 07:55:26 stefan Exp $'
+    ^ '$Header$'
 ! !
+
--- a/CharacterEncoderImplementations__TwoByteEncoder.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/CharacterEncoderImplementations__TwoByteEncoder.st	Sun Feb 14 07:29:57 2016 +0000
@@ -66,22 +66,23 @@
 readNextCharacterFrom:aStream
     | c |
 
-    c := aStream nextUnsignedShortMSB:false.
+    c := aStream nextUnsignedInt16MSB:false.
     ^ c isNil 
         ifTrue: [nil]
         ifFalse: [(self decode:c) asCharacter]
 !
 
 readNextInputCharacterFrom:aStream
-    ^ aStream nextUnsignedShortMSB:false
+    ^ aStream nextUnsignedInt16MSB:false
 ! !
 
 !TwoByteEncoder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp $'
+    ^ '$Header$'
 ! !
+
--- a/Collection.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Collection.st	Sun Feb 14 07:29:57 2016 +0000
@@ -275,7 +275,6 @@
     ^ self newWithSize:n
 ! !
 
-
 !Collection class methodsFor:'Signal constants'!
 
 emptyCollectionSignal
@@ -528,7 +527,6 @@
     "Created: / 22-10-2008 / 21:29:27 / cg"
 ! !
 
-
 !Collection methodsFor:'accessing'!
 
 anElement
@@ -5827,7 +5825,6 @@
     ^ aVisitor visitCollection:self with:aParameter
 ! !
 
-
 !Collection class methodsFor:'documentation'!
 
 version
--- a/Date.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Date.st	Sun Feb 14 07:29:57 2016 +0000
@@ -931,7 +931,6 @@
     ^ self newDay:day month:mon year:yr
 ! !
 
-
 !Date class methodsFor:'change & update'!
 
 update:something with:aParameter from:changedObject
@@ -1897,7 +1896,6 @@
     "Modified: 8.10.1996 / 19:25:39 / cg"
 ! !
 
-
 !Date class methodsFor:'private'!
 
 dayAbbrevsForLanguage:languageOrNilForDefault
@@ -2114,7 +2112,6 @@
     "
 ! !
 
-
 !Date methodsFor:'Compatibility-ANSI'!
 
 dayOfWeek
@@ -3272,7 +3269,6 @@
 ! !
 
 
-
 !Date methodsFor:'obsolete'!
 
 asAbsoluteTime
@@ -3343,7 +3339,6 @@
     ^ self addDays:days
 ! !
 
-
 !Date methodsFor:'printing & storing'!
 
 addPrintBindingsTo:aDictionary
--- a/Error.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Error.st	Sun Feb 14 07:29:57 2016 +0000
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 Exception subclass:#Error
 	instanceVariableNames:''
 	classVariableNames:''
@@ -56,13 +58,6 @@
     "Modified: / 17-11-2010 / 17:53:07 / cg"
 ! !
 
-!Error class methodsFor:'misc ui support'!
-
-iconInBrowserSymbol
-    <resource: #programImage>
-
-    ^ #errorClassBrowserIcon
-! !
 
 !Error class methodsFor:'queries'!
 
@@ -85,11 +80,12 @@
 !Error class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Error.st,v 1.11 2010-11-17 16:53:31 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Error.st,v 1.11 2010-11-17 16:53:31 cg Exp $'
+    ^ '$Header$'
 ! !
 
+
 Error initialize!
--- a/ExternalStream.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/ExternalStream.st	Sun Feb 14 07:29:57 2016 +0000
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -204,7 +204,7 @@
 # define DEBUGBUFFER(buf)  \
     if (((char *)(buf) >= __survStartPtr) \
      && ((char *)(buf) < __survEndPtr)) { \
-        __fatal0("read into survivor\n"); \
+	__fatal0("read into survivor\n"); \
     }
 
 #else
@@ -227,33 +227,33 @@
 // Win returns from ReadFile() with false and _threadErrno == 0 on end of pipe.
 // We don't know why
 #  define READ(ret, f, cp, n, handleType) { \
-        if (handleType == @symbol(socketHandle)) { \
-          (ret) = __STX_WSA_NOINT_CALL4("recv", recv, (f), (cp), (n), 0); \
-        } else { \
-          HANDLE h = _get_osfhandle(fileno(f)); \
-          if (handleType == @symbol(socketFilePointer)) { \
-            (ret) = __STX_WSA_NOINT_CALL4("recv", recv, h, (cp), (n), 0);\
-          } else { \
-            int __res; \
-            (ret) = __STX_API_NOINT_CALL5("ReadFile", ReadFile, h, (cp), (n), &__res, 0);\
-            (ret) = (ret) ? __res : ((__threadErrno == EPIPE || __threadErrno == 0) ? 0 : -1); \
-          } \
-        } \
+	if (handleType == @symbol(socketHandle)) { \
+	  (ret) = __STX_WSA_NOINT_CALL4("recv", recv, (f), (cp), (n), 0); \
+	} else { \
+	  HANDLE h = _get_osfhandle(fileno(f)); \
+	  if (handleType == @symbol(socketFilePointer)) { \
+	    (ret) = __STX_WSA_NOINT_CALL4("recv", recv, h, (cp), (n), 0);\
+	  } else { \
+	    int __res; \
+	    (ret) = __STX_API_NOINT_CALL5("ReadFile", ReadFile, h, (cp), (n), &__res, 0);\
+	    (ret) = (ret) ? __res : ((__threadErrno == EPIPE || __threadErrno == 0) ? 0 : -1); \
+	  } \
+	} \
       }
 
 #  define WRITE(ret, f, cp, n, handleType) { \
-        if (handleType == @symbol(socketHandle)) { \
-          (ret) = __STX_WSA_NOINT_CALL4("send", send, (f), (cp), (n), 0); \
-        } else {\
-          HANDLE h = _get_osfhandle(fileno(f)); \
-          if (handleType == @symbol(socketFilePointer)) { \
-            (ret) = __STX_WSA_NOINT_CALL4("send", send, h, (cp), (n), 0);\
-          } else {\
-            int __res; \
-            (ret) = __STX_API_NOINT_CALL5("WriteFile", WriteFile, h, (cp), (n), &__res, 0);\
-            (ret) = (ret) ? __res : -1; \
-          } \
-        } \
+	if (handleType == @symbol(socketHandle)) { \
+	  (ret) = __STX_WSA_NOINT_CALL4("send", send, (f), (cp), (n), 0); \
+	} else {\
+	  HANDLE h = _get_osfhandle(fileno(f)); \
+	  if (handleType == @symbol(socketFilePointer)) { \
+	    (ret) = __STX_WSA_NOINT_CALL4("send", send, h, (cp), (n), 0);\
+	  } else {\
+	    int __res; \
+	    (ret) = __STX_API_NOINT_CALL5("WriteFile", WriteFile, h, (cp), (n), &__res, 0);\
+	    (ret) = (ret) ? __res : -1; \
+	  } \
+	} \
       }
 
 # define FFLUSH(fp)             fflush(fp)
@@ -264,56 +264,56 @@
 # define __READING__(f)                          \
     if ((__INST(didWrite) != false)              \
      && (__INST(mode) == @symbol(readwrite))) {  \
-        __INST(didWrite) = false;                \
-        OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
+	__INST(didWrite) = false;                \
+	OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
     }
 
 # define __WRITING__(f)                          \
     if ((__INST(didWrite) != true)               \
      && (__INST(mode) == @symbol(readwrite))) {  \
-        __INST(didWrite) = true;                 \
-        OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
+	__INST(didWrite) = true;                 \
+	OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
     }
 
 # define __UNGETC__(c, f, isBuffered)                   \
     if (isBuffered) {                                   \
-        ungetc((c), (f));                               \
+	ungetc((c), (f));                               \
     } else {                                            \
       __INST(readAhead) = __mkSmallInteger((c));        \
     }
 
 # define __READBYTE__(ret, f, buf, isBuffered, handleType) \
     if (isBuffered) {                                   \
-        for (;;) {                                      \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) >= 0) {                           \
-                *(buf) = (ret);                         \
-                (ret) = 1;                              \
-            } else if (ferror(f)) {                     \
-                if (__threadErrno == EINTR) {           \
-                    clearerr(f);                        \
-                    continue;                           \
-                }                                       \
-            } else {                                    \
-                (ret) = 0;                              \
-            }                                           \
-            break;                                      \
-        }                                               \
+	for (;;) {                                      \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) >= 0) {                           \
+		*(buf) = (ret);                         \
+		(ret) = 1;                              \
+	    } else if (ferror(f)) {                     \
+		if (__threadErrno == EINTR) {           \
+		    clearerr(f);                        \
+		    continue;                           \
+		}                                       \
+	    } else {                                    \
+		(ret) = 0;                              \
+	    }                                           \
+	    break;                                      \
+	}                                               \
     } else {                                            \
-        OBJ rA = __INST(readAhead);                     \
-        if (rA != nil) {                                \
-            *(buf) = (char)__intVal(rA);                \
-            __INST(readAhead) = nil;                    \
-            (ret) = 1;                                  \
-        } else {                                        \
-            for (;;) {                                  \
-                CLEAR_ERRNO;                            \
-                READ((ret), f, buf, 1, handleType);       \
-                if ((ret) >= 0 || __threadErrno != EINTR) \
-                    break;                              \
-            }                                           \
-        }                                               \
+	OBJ rA = __INST(readAhead);                     \
+	if (rA != nil) {                                \
+	    *(buf) = (char)__intVal(rA);                \
+	    __INST(readAhead) = nil;                    \
+	    (ret) = 1;                                  \
+	} else {                                        \
+	    for (;;) {                                  \
+		CLEAR_ERRNO;                            \
+		READ((ret), f, buf, 1, handleType);       \
+		if ((ret) >= 0 || __threadErrno != EINTR) \
+		    break;                              \
+	    }                                           \
+	}                                               \
     }
 
   /*
@@ -323,110 +323,110 @@
 # define __READBYTES__(ret, f, buf, cnt, isBuffered, handleType)    \
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        int __offs = 0;                                 \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) < 0) {                            \
-                if (ferror(f)) {                        \
-                    if (__threadErrno == EINTR) {       \
-                        clearerr(f);                    \
-                        continue;                       \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            (buf)[__offs++] = (ret);                    \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) < 0) {                            \
+		if (ferror(f)) {                        \
+		    if (__threadErrno == EINTR) {       \
+			clearerr(f);                    \
+			continue;                       \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    (buf)[__offs++] = (ret);                    \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        int __offs = 0;                                 \
-                                                        \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__offs] = __intVal(rA);           \
-                __INST(readAhead) = nil;                \
-                (ret) = 1;                              \
-            } else {                                    \
-                CLEAR_ERRNO;                            \
-                READ((ret), f, (buf)+__offs, (cnt)-__offs, handleType); \
-                if ((ret) <= 0) {                       \
-                    if ((ret) < 0 && __threadErrno == EINTR) {  \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                }                                       \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+							\
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__offs] = __intVal(rA);           \
+		__INST(readAhead) = nil;                \
+		(ret) = 1;                              \
+	    } else {                                    \
+		CLEAR_ERRNO;                            \
+		READ((ret), f, (buf)+__offs, (cnt)-__offs, handleType); \
+		if ((ret) <= 0) {                       \
+		    if ((ret) < 0 && __threadErrno == EINTR) {  \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		}                                       \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
    }
 
 # define __READAVAILBYTES__(ret, f, buf, cnt, isBuffered, handleType) \
   {                                                     \
     int __offs = 0;                                     \
     int oldFlags;                                       \
-                                                        \
+							\
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) < 0) {                            \
-                if (ferror(f)) {                        \
-                    if (__threadErrno == EINTR) {       \
-                        clearerr(f);                    \
-                        continue;                       \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            (buf)[__offs++] = (ret);                    \
-        }                                               \
-        (ret) = __offs;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) < 0) {                            \
+		if (ferror(f)) {                        \
+		    if (__threadErrno == EINTR) {       \
+			clearerr(f);                    \
+			continue;                       \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    (buf)[__offs++] = (ret);                    \
+	}                                               \
+	(ret) = __offs;                                 \
     } else {                                            \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__offs] = __intVal(rA);           \
-                __INST(readAhead) = nil;                \
-                (ret) = 1;                              \
-                __offs ++;                              \
-                continue;                               \
-            }                                           \
-            CLEAR_ERRNO;                                \
-            {                                           \
-              int res = 0;                              \
-              if ((handleType == @symbol(socketFilePointer) && (ioctlsocket((SOCKET)_get_osfhandle(fileno(f)),FIONREAD,&res), 1)) \
-                  || (handleType == @symbol(socketHandle) && (ioctlsocket((SOCKET)(f), FIONREAD, &res), 1)) \
-                  || (handleType == @symbol(pipeFilePointer) && (PeekNamedPipe((HANDLE)_get_osfhandle(fileno(f)),0, 0,0,&res,0), 1))) { \
-                  if (res > 0) {                        \
-                      if (res > ((cnt)-__offs))         \
-                          res = (cnt)-__offs;           \
-                      READ((ret), f, (buf)+__offs, res, handleType); \
-                  } else {                              \
-                      (ret) = 0;                        \
-                      break;                            \
-                  }                                     \
-              } else {                                  \
-                  READ((ret), f, (buf)+__offs, (cnt)-__offs, handleType); \
-              }                                         \
-            }                                           \
-            if ((ret) <= 0) {                           \
-                if (ret < 0 && __threadErrno == EINTR)  \
-                    continue;                           \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        (ret) = __offs;                                 \
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__offs] = __intVal(rA);           \
+		__INST(readAhead) = nil;                \
+		(ret) = 1;                              \
+		__offs ++;                              \
+		continue;                               \
+	    }                                           \
+	    CLEAR_ERRNO;                                \
+	    {                                           \
+	      int res = 0;                              \
+	      if ((handleType == @symbol(socketFilePointer) && (ioctlsocket((SOCKET)_get_osfhandle(fileno(f)),FIONREAD,&res), 1)) \
+		  || (handleType == @symbol(socketHandle) && (ioctlsocket((SOCKET)(f), FIONREAD, &res), 1)) \
+		  || (handleType == @symbol(pipeFilePointer) && (PeekNamedPipe((HANDLE)_get_osfhandle(fileno(f)),0, 0,0,&res,0), 1))) { \
+		  if (res > 0) {                        \
+		      if (res > ((cnt)-__offs))         \
+			  res = (cnt)-__offs;           \
+		      READ((ret), f, (buf)+__offs, res, handleType); \
+		  } else {                              \
+		      (ret) = 0;                        \
+		      break;                            \
+		  }                                     \
+	      } else {                                  \
+		  READ((ret), f, (buf)+__offs, (cnt)-__offs, handleType); \
+	      }                                         \
+	    }                                           \
+	    if ((ret) <= 0) {                           \
+		if (ret < 0 && __threadErrno == EINTR)  \
+		    continue;                           \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	(ret) = __offs;                                 \
     }                                                   \
   }
 
@@ -437,63 +437,63 @@
     int __ooffs = obj_offs;                             \
     int __offs = 0;                                     \
     char *buf = (char *)(obj);                          \
-                                                        \
+							\
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) < 0) {                            \
-                if (ferror(f)) {                        \
-                    if (__threadErrno == EINTR) {       \
-                        clearerr(f);                    \
-                        /* refetch */                   \
-                        buf = (char *)(obj);   \
-                        continue;                       \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            (buf)[__ooffs+__offs] = (ret);              \
-            __offs++;                                   \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) < 0) {                            \
+		if (ferror(f)) {                        \
+		    if (__threadErrno == EINTR) {       \
+			clearerr(f);                    \
+			/* refetch */                   \
+			buf = (char *)(obj);   \
+			continue;                       \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    (buf)[__ooffs+__offs] = (ret);              \
+	    __offs++;                                   \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        while (__offs < (cnt)) {                        \
-            char __buf[IO_BUFFER_SIZE];                 \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__ooffs+__offs] = __intVal(rA);   \
-                __INST(readAhead) = nil;                \
-                (ret) = 1;                              \
-            } else {                                    \
-                int l;                                  \
-                CLEAR_ERRNO;                            \
-                l = (cnt)-__offs;                       \
-                if ( l > IO_BUFFER_SIZE)                \
-                  l = IO_BUFFER_SIZE;                   \
-                READ((ret),f, __buf, l, handleType);                  \
-                if ((ret) <= 0) {                       \
-                    if ((ret) < 0 && __threadErrno == EINTR) {  \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                }                                       \
-            }                                           \
-            if ((ret) > 0 ) {                           \
-                /* refetch */                               \
-                buf = (char *)(obj);               \
-                memcpy((buf)+__ooffs+__offs,__buf,(ret));   \
-                __offs += (ret);                            \
-            } else {                                        \
-                (ret) = 0;                                  \
-            }                                               \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    char __buf[IO_BUFFER_SIZE];                 \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__ooffs+__offs] = __intVal(rA);   \
+		__INST(readAhead) = nil;                \
+		(ret) = 1;                              \
+	    } else {                                    \
+		int l;                                  \
+		CLEAR_ERRNO;                            \
+		l = (cnt)-__offs;                       \
+		if ( l > IO_BUFFER_SIZE)                \
+		  l = IO_BUFFER_SIZE;                   \
+		READ((ret),f, __buf, l, handleType);                  \
+		if ((ret) <= 0) {                       \
+		    if ((ret) < 0 && __threadErrno == EINTR) {  \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		}                                       \
+	    }                                           \
+	    if ((ret) > 0 ) {                           \
+		/* refetch */                               \
+		buf = (char *)(obj);               \
+		memcpy((buf)+__ooffs+__offs,__buf,(ret));   \
+		__offs += (ret);                            \
+	    } else {                                        \
+		(ret) = 0;                                  \
+	    }                                               \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
   }
 
@@ -502,141 +502,141 @@
     int __ooffs = obj_offs;                          \
     int __offs = 0;                                  \
     char *buf = (char *)(obj);                       \
-                                                     \
+						     \
     (ret) = 0;                                       \
     if (isBuffered) {                                \
-        while (__offs < (cnt)) {                     \
-            CLEAR_ERRNO;                             \
-            (ret) = getc(f);                         \
-            if ((ret) < 0) {                         \
-                if (ferror(f)) {                     \
-                    if (__threadErrno == EINTR) {    \
-                        clearerr(f);                 \
-                        /* refetch */                \
-                        buf = (char *)(obj);\
-                        continue;                    \
-                    }                                \
-                } else {                             \
-                    (ret) = 0;                       \
-                }                                    \
-                break;                               \
-            }                                        \
-            (buf)[__ooffs+__offs] = (ret);           \
-            __offs++;                                \
-        }                                            \
-        if (__offs > 0)                              \
-            (ret) = __offs;                          \
+	while (__offs < (cnt)) {                     \
+	    CLEAR_ERRNO;                             \
+	    (ret) = getc(f);                         \
+	    if ((ret) < 0) {                         \
+		if (ferror(f)) {                     \
+		    if (__threadErrno == EINTR) {    \
+			clearerr(f);                 \
+			/* refetch */                \
+			buf = (char *)(obj);\
+			continue;                    \
+		    }                                \
+		} else {                             \
+		    (ret) = 0;                       \
+		}                                    \
+		break;                               \
+	    }                                        \
+	    (buf)[__ooffs+__offs] = (ret);           \
+	    __offs++;                                \
+	}                                            \
+	if (__offs > 0)                              \
+	    (ret) = __offs;                          \
     } else {                                         \
-        while (__offs < (cnt)) {                     \
-            char __buf[IO_BUFFER_SIZE];              \
-            OBJ rA = __INST(readAhead);              \
-            if (rA != nil) {                         \
-                (buf)[__ooffs+__offs] = __intVal(rA);\
-                __INST(readAhead) = nil;             \
-                (ret) = 1;                           \
-                __offs++;                            \
-                continue;                            \
-            }                                        \
-            {                                        \
-                int res = 0;                         \
-                int l = (cnt)-__offs;                \
-                CLEAR_ERRNO;                         \
-                if (l > IO_BUFFER_SIZE)              \
-                    l = IO_BUFFER_SIZE;              \
-                if ((handleType == @symbol(socketFilePointer) && (ioctlsocket((SOCKET)_get_osfhandle(fileno(f)), FIONREAD, &res), 1)) \
-                    || (handleType == @symbol(socketHandle) && (ioctlsocket((SOCKET)(f), FIONREAD, &res), 1)) \
-                    || (handleType == @symbol(pipeFilePointer) && (PeekNamedPipe((HANDLE)_get_osfhandle(fileno(f)),0,0,0,&res,0), 1))) { \
-                    if (res > 0) {                   \
-                        if (res > l) res = l;        \
-                        READ((ret), f, __buf, res, handleType); \
-                    } else {                         \
-                        (ret) = 0;                   \
-                        break;                       \
-                    }                                \
-                } else {                             \
-                    READ((ret), f, __buf, l, handleType); \
-                }                                     \
-                if ((ret) <= 0) {                     \
-                    if (ret < 0 && __threadErrno == EINTR) \
-                        continue;                       \
-                    break;                              \
-                }                                       \
-            }                                           \
-            if ((ret) > 0) {                            \
-                buf = (char *)(obj);                    \
-                memcpy((buf)+__ooffs+__offs, __buf, (ret)); \
-                __offs += (ret);                        \
-            } else {                                    \
-                (ret) = 0;                              \
-            }                                           \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                     \
+	    char __buf[IO_BUFFER_SIZE];              \
+	    OBJ rA = __INST(readAhead);              \
+	    if (rA != nil) {                         \
+		(buf)[__ooffs+__offs] = __intVal(rA);\
+		__INST(readAhead) = nil;             \
+		(ret) = 1;                           \
+		__offs++;                            \
+		continue;                            \
+	    }                                        \
+	    {                                        \
+		int res = 0;                         \
+		int l = (cnt)-__offs;                \
+		CLEAR_ERRNO;                         \
+		if (l > IO_BUFFER_SIZE)              \
+		    l = IO_BUFFER_SIZE;              \
+		if ((handleType == @symbol(socketFilePointer) && (ioctlsocket((SOCKET)_get_osfhandle(fileno(f)), FIONREAD, &res), 1)) \
+		    || (handleType == @symbol(socketHandle) && (ioctlsocket((SOCKET)(f), FIONREAD, &res), 1)) \
+		    || (handleType == @symbol(pipeFilePointer) && (PeekNamedPipe((HANDLE)_get_osfhandle(fileno(f)),0,0,0,&res,0), 1))) { \
+		    if (res > 0) {                   \
+			if (res > l) res = l;        \
+			READ((ret), f, __buf, res, handleType); \
+		    } else {                         \
+			(ret) = 0;                   \
+			break;                       \
+		    }                                \
+		} else {                             \
+		    READ((ret), f, __buf, l, handleType); \
+		}                                     \
+		if ((ret) <= 0) {                     \
+		    if (ret < 0 && __threadErrno == EINTR) \
+			continue;                       \
+		    break;                              \
+		}                                       \
+	    }                                           \
+	    if ((ret) > 0) {                            \
+		buf = (char *)(obj);                    \
+		memcpy((buf)+__ooffs+__offs, __buf, (ret)); \
+		__offs += (ret);                        \
+	    } else {                                    \
+		(ret) = 0;                              \
+	    }                                           \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
   }
 
 # define __WRITEBYTE__(ret, f, buf, isBuffered, handleType)         \
     if (isBuffered) {                                   \
-        for (;;) {                                      \
-            CLEAR_ERRNO;                                \
-            ret = putc(*(buf), f);                      \
-            if ((ret) >= 0) {                           \
-                (ret) = 1;                              \
-            } else if (ferror(f)) {                     \
-                if (__threadErrno == EINTR) {                   \
-                    clearerr(f);                        \
-                    continue;                           \
-                }                                       \
-            } else                                      \
-                (ret) = 0;                              \
-            break;                                      \
-        }                                               \
+	for (;;) {                                      \
+	    CLEAR_ERRNO;                                \
+	    ret = putc(*(buf), f);                      \
+	    if ((ret) >= 0) {                           \
+		(ret) = 1;                              \
+	    } else if (ferror(f)) {                     \
+		if (__threadErrno == EINTR) {                   \
+		    clearerr(f);                        \
+		    continue;                           \
+		}                                       \
+	    } else                                      \
+		(ret) = 0;                              \
+	    break;                                      \
+	}                                               \
     } else {                                            \
-        for (;;) {                                      \
-            CLEAR_ERRNO;                                \
-            WRITE(ret,f, buf, 1, handleType);                       \
-            if ((ret) >= 0 || __threadErrno != EINTR)           \
-                break;                                  \
-        }                                               \
+	for (;;) {                                      \
+	    CLEAR_ERRNO;                                \
+	    WRITE(ret,f, buf, 1, handleType);                       \
+	    if ((ret) >= 0 || __threadErrno != EINTR)           \
+		break;                                  \
+	}                                               \
    }
 
 # define __WRITEBYTES__(ret, f, buf, cnt, isBuffered, handleType)   \
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        int __offs = 0;                                 \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = fwrite((buf)+__offs, 1, (cnt)-__offs, f);\
-            if ((ret) <= 0) {                           \
-                if (ferror(f)) {                        \
-                    if (__threadErrno == EINTR) {               \
-                        clearerr(f);                    \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = fwrite((buf)+__offs, 1, (cnt)-__offs, f);\
+	    if ((ret) <= 0) {                           \
+		if (ferror(f)) {                        \
+		    if (__threadErrno == EINTR) {               \
+			clearerr(f);                    \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        int __offs = 0;                                 \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            WRITE(ret,f, (buf)+__offs, (cnt)-__offs, handleType);   \
-            if (ret <= 0) {                             \
-                if (ret < 0 && __threadErrno == EINTR) { \
-                    continue;                           \
-                }                                       \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    WRITE(ret,f, (buf)+__offs, (cnt)-__offs, handleType);   \
+	    if (ret <= 0) {                             \
+		if (ret < 0 && __threadErrno == EINTR) { \
+		    continue;                           \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
    }
 
 # define __WRITEBYTES_OBJ__(ret, f, obj, obj_offs, cnt, isBuffered, handleType) \
@@ -644,51 +644,51 @@
     int __ooffs = obj_offs;                             \
     int __offs = 0;                                     \
     char *buf = (char *)(obj);                          \
-                                                        \
+							\
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            ret = fwrite((buf)+__ooffs+__offs, 1, (cnt)-__offs, f); \
-            if ((ret) <= 0) {                           \
-                if (ferror(f)) {                        \
-                    if (__threadErrno == EINTR) {       \
-                        /* refetch */                   \
-                        buf = (char *)(obj);   \
-                        clearerr(f);                    \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    ret = fwrite((buf)+__ooffs+__offs, 1, (cnt)-__offs, f); \
+	    if ((ret) <= 0) {                           \
+		if (ferror(f)) {                        \
+		    if (__threadErrno == EINTR) {       \
+			/* refetch */                   \
+			buf = (char *)(obj);   \
+			clearerr(f);                    \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        while (__offs < (cnt)) {                        \
-            char __buf[IO_BUFFER_SIZE];                 \
-            int l;                                      \
-            CLEAR_ERRNO;                                \
-            l = (cnt)-__offs;                           \
-            if ( l > IO_BUFFER_SIZE)                    \
-              l = IO_BUFFER_SIZE;                       \
-            /* refetch */                               \
-            buf = (char *)(obj);               \
-            memcpy(__buf,(buf)+__ooffs+__offs,l);       \
-            WRITE(ret,f, __buf, l, handleType);                     \
-            if (ret <= 0) {                             \
-                if (ret < 0 && __threadErrno == EINTR) {        \
-                    continue;                           \
-                }                                       \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    char __buf[IO_BUFFER_SIZE];                 \
+	    int l;                                      \
+	    CLEAR_ERRNO;                                \
+	    l = (cnt)-__offs;                           \
+	    if ( l > IO_BUFFER_SIZE)                    \
+	      l = IO_BUFFER_SIZE;                       \
+	    /* refetch */                               \
+	    buf = (char *)(obj);               \
+	    memcpy(__buf,(buf)+__ooffs+__offs,l);       \
+	    WRITE(ret,f, __buf, l, handleType);                     \
+	    if (ret <= 0) {                             \
+		if (ret < 0 && __threadErrno == EINTR) {        \
+		    continue;                           \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
   }
 
@@ -699,15 +699,15 @@
 # define __READING__(f)                          \
     if ((__INST(didWrite) != false)              \
      && (__INST(mode) == @symbol(readwrite))) {  \
-        __INST(didWrite) = false;                \
-        OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
+	__INST(didWrite) = false;                \
+	OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
     }
 
 # define __WRITING__(f)                          \
     if ((__INST(didWrite) != true)               \
      && (__INST(mode) == @symbol(readwrite))) {  \
-        __INST(didWrite) = true;                 \
-        OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
+	__INST(didWrite) = true;                 \
+	OPT_FSEEK(f, 0L, SEEK_CUR); /* needed in stdio */  \
     }
 
 
@@ -717,73 +717,73 @@
 # else /* use STDIO */
 #  define __UNGETC__(c, f, isBuffered)                  \
     if (isBuffered) {                                   \
-        ungetc((c), (f));                               \
+	ungetc((c), (f));                               \
     } else {                                            \
-        __INST(readAhead) = __mkSmallInteger((c));          \
+	__INST(readAhead) = __mkSmallInteger((c));          \
     }
 # endif /* use STDIO */
 
 # ifdef NO_STDIO
 #  define __READBYTE__(ret, f, buf, isBuffered, handleType)         \
     {                                                   \
-        OBJ rA = __INST(readAhead);                     \
-        if (rA != nil) {                                \
-            *(buf) = __intVal(rA);                      \
-            DEBUGBUFFER(buf);                           \
-            __INST(readAhead) = nil;                    \
-            (ret) = 1;                                  \
-        } else {                                        \
-            for (;;) {                                  \
-                CLEAR_ERRNO;                            \
-                (ret) = READ(f, buf, 1, handleType);    \
-                DEBUGBUFFER(buf);                       \
-                if ((ret) >= 0) break;                  \
-                if (errno != EINTR) {                   \
-                    break;                              \
-                }                                       \
-                __HANDLE_INTERRUPTS__;                  \
-            }                                           \
-        }                                               \
+	OBJ rA = __INST(readAhead);                     \
+	if (rA != nil) {                                \
+	    *(buf) = __intVal(rA);                      \
+	    DEBUGBUFFER(buf);                           \
+	    __INST(readAhead) = nil;                    \
+	    (ret) = 1;                                  \
+	} else {                                        \
+	    for (;;) {                                  \
+		CLEAR_ERRNO;                            \
+		(ret) = READ(f, buf, 1, handleType);    \
+		DEBUGBUFFER(buf);                       \
+		if ((ret) >= 0) break;                  \
+		if (errno != EINTR) {                   \
+		    break;                              \
+		}                                       \
+		__HANDLE_INTERRUPTS__;                  \
+	    }                                           \
+	}                                               \
     }
 # else /* use STDIO */
 #  define __READBYTE__(ret, f, buf, isBuffered, handleType)         \
     if (isBuffered) {                                   \
-        for (;;) {                                      \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) >= 0) {                           \
-                DEBUGBUFFER(buf);                       \
-                *(buf) = (ret);                         \
-                (ret) = 1;                              \
-            } else if (ferror(f)) {                     \
-                if (errno == EINTR) {                   \
-                    __HANDLE_INTERRUPTS__;              \
-                    clearerr(f);                        \
-                    continue;                           \
-                }                                       \
-            } else                                      \
-                (ret) = 0;                              \
-            break;                                      \
-        }                                               \
+	for (;;) {                                      \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) >= 0) {                           \
+		DEBUGBUFFER(buf);                       \
+		*(buf) = (ret);                         \
+		(ret) = 1;                              \
+	    } else if (ferror(f)) {                     \
+		if (errno == EINTR) {                   \
+		    __HANDLE_INTERRUPTS__;              \
+		    clearerr(f);                        \
+		    continue;                           \
+		}                                       \
+	    } else                                      \
+		(ret) = 0;                              \
+	    break;                                      \
+	}                                               \
     } else {                                            \
-        OBJ rA = __INST(readAhead);                     \
-        if (rA != nil) {                                \
-            *(buf) = __intVal(rA);                      \
-            DEBUGBUFFER(buf);                           \
-            __INST(readAhead) = nil;                    \
-            (ret) = 1;                                  \
-        } else {                                        \
-            for (;;) {                                  \
-                CLEAR_ERRNO;                            \
-                (ret) = read(fileno(f), buf, 1);        \
-                DEBUGBUFFER(buf);                       \
-                if ((ret) >= 0) break;                  \
-                if (errno != EINTR) {                   \
-                    break;                              \
-                }                                       \
-                __HANDLE_INTERRUPTS__;                  \
-            }                                           \
-        }                                               \
+	OBJ rA = __INST(readAhead);                     \
+	if (rA != nil) {                                \
+	    *(buf) = __intVal(rA);                      \
+	    DEBUGBUFFER(buf);                           \
+	    __INST(readAhead) = nil;                    \
+	    (ret) = 1;                                  \
+	} else {                                        \
+	    for (;;) {                                  \
+		CLEAR_ERRNO;                            \
+		(ret) = read(fileno(f), buf, 1);        \
+		DEBUGBUFFER(buf);                       \
+		if ((ret) >= 0) break;                  \
+		if (errno != EINTR) {                   \
+		    break;                              \
+		}                                       \
+		__HANDLE_INTERRUPTS__;                  \
+	    }                                           \
+	}                                               \
    }
 # endif /* use STDIO */
 
@@ -794,84 +794,84 @@
 # ifdef NO_STDIO
 #  define __READBYTES__(ret, f, buf, cnt, isBuffered, handleType)   \
     {                                                   \
-        int __offs = 0, __cnt;                          \
-                                                        \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__offs] = __intVal(rA);           \
-                DEBUGBUFFER(buf);                       \
-                __INST(readAhead) = nil;                \
-                __offs++;                               \
-            } else {                                    \
-                CLEAR_ERRNO;                            \
-                __cnt = READ(f, (buf)+__offs, (cnt)-__offs, handleType); \
-                DEBUGBUFFER(buf);                       \
-                if (__cnt <= 0) {                       \
-                    if (__cnt < 0 && errno == EINTR) {  \
-                        __HANDLE_INTERRUPTS__;          \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                }                                       \
-                __offs += __cnt;                        \
-            }                                           \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0, __cnt;                          \
+							\
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__offs] = __intVal(rA);           \
+		DEBUGBUFFER(buf);                       \
+		__INST(readAhead) = nil;                \
+		__offs++;                               \
+	    } else {                                    \
+		CLEAR_ERRNO;                            \
+		__cnt = READ(f, (buf)+__offs, (cnt)-__offs, handleType); \
+		DEBUGBUFFER(buf);                       \
+		if (__cnt <= 0) {                       \
+		    if (__cnt < 0 && errno == EINTR) {  \
+			__HANDLE_INTERRUPTS__;          \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		}                                       \
+		__offs += __cnt;                        \
+	    }                                           \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
    }
 # else /* use STDIO */
 #  define __READBYTES__(ret, f, buf, cnt, isBuffered, handleType)     \
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        int __offs = 0;                                 \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) < 0) {                            \
-                if (ferror(f)) {                        \
-                    if (errno == EINTR) {               \
-                        __HANDLE_INTERRUPTS__;          \
-                        clearerr(f);                    \
-                        continue;                       \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            DEBUGBUFFER(buf);                           \
-            (buf)[__offs++] = (ret);                    \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) < 0) {                            \
+		if (ferror(f)) {                        \
+		    if (errno == EINTR) {               \
+			__HANDLE_INTERRUPTS__;          \
+			clearerr(f);                    \
+			continue;                       \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    DEBUGBUFFER(buf);                           \
+	    (buf)[__offs++] = (ret);                    \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        int __offs = 0, __cnt;                          \
-        int fd = fileno(f);                             \
-                                                        \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                DEBUGBUFFER(buf);                       \
-                (buf)[__offs] = __intVal(rA);           \
-                __INST(readAhead) = nil;                \
-                __offs++;                               \
-            } else {                                    \
-                CLEAR_ERRNO;                            \
-                __cnt = read(fd, (buf)+__offs, (cnt)-__offs);  \
-                DEBUGBUFFER(buf);                       \
-                if (__cnt <= 0) {                       \
-                    if (__cnt < 0 && errno == EINTR) {  \
-                        __HANDLE_INTERRUPTS__;          \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                }                                       \
-                __offs += __cnt;                        \
-            }                                           \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0, __cnt;                          \
+	int fd = fileno(f);                             \
+							\
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		DEBUGBUFFER(buf);                       \
+		(buf)[__offs] = __intVal(rA);           \
+		__INST(readAhead) = nil;                \
+		__offs++;                               \
+	    } else {                                    \
+		CLEAR_ERRNO;                            \
+		__cnt = read(fd, (buf)+__offs, (cnt)-__offs);  \
+		DEBUGBUFFER(buf);                       \
+		if (__cnt <= 0) {                       \
+		    if (__cnt < 0 && errno == EINTR) {  \
+			__HANDLE_INTERRUPTS__;          \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		}                                       \
+		__offs += __cnt;                        \
+	    }                                           \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
    }
 
 
@@ -881,7 +881,7 @@
 
 #  if defined(F_GETFL) && defined(F_SETFL) && (defined(O_NONBLOCK) || defined(O_NDELAY) || defined(FNDELAY))
 #   define SETFLAGS(fd, flags) \
-        fcntl(fd, F_SETFL, flags)
+	fcntl(fd, F_SETFL, flags)
 
 #   if defined(O_NONBLOCK)
 #    define __STX_NONBLOCK_FLAG O_NONBLOCK
@@ -894,13 +894,13 @@
 #   endif
 
 #   define SETNONBLOCKING(fd, oldFlags) \
-        { \
-            int flags = fcntl(fd, F_GETFL, 0); \
-            if (flags >= 0) { \
-                fcntl(fd, F_SETFL, flags | __STX_NONBLOCK_FLAG); \
-            } \
-            oldFlags = flags; \
-        }
+	{ \
+	    int flags = fcntl(fd, F_GETFL, 0); \
+	    if (flags >= 0) { \
+		fcntl(fd, F_SETFL, flags | __STX_NONBLOCK_FLAG); \
+	    } \
+	    oldFlags = flags; \
+	}
 #  else
 #   define SETFLAGS(fd, flags) /* nothing */
 #   define SETNONBLOCKING(fd, oldFlags) /* nothing */
@@ -910,52 +910,52 @@
   {                                                     \
     int __offs = 0, __cnt;                              \
     int oldFlags;                                       \
-                                                        \
+							\
     (ret) = 0;                                          \
     SETNONBLOCKING(fileno(f), oldFlags);                \
     if (isBuffered) {                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) < 0) {                            \
-                if (ferror(f)) {                        \
-                    if (errno == EINTR) {               \
-                        (ret) = 0;                      \
-                        clearerr(f);                    \
-                        break;                          \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            (buf)[__offs++] = (ret);                    \
-            DEBUGBUFFER(buf);                           \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) < 0) {                            \
+		if (ferror(f)) {                        \
+		    if (errno == EINTR) {               \
+			(ret) = 0;                      \
+			clearerr(f);                    \
+			break;                          \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    (buf)[__offs++] = (ret);                    \
+	    DEBUGBUFFER(buf);                           \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        int fd = fileno(f);                             \
-                                                        \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__offs] = __intVal(rA);           \
-                DEBUGBUFFER(buf);                       \
-                __INST(readAhead) = nil;                \
-                __offs++;                               \
-                continue;                               \
-            }                                           \
-            CLEAR_ERRNO;                                \
-            __cnt = read(fd, (buf)+__offs, (cnt)-__offs); \
-            DEBUGBUFFER(buf);                           \
-            if (__cnt > 0) {                            \
-                __offs += __cnt;                        \
-            }                                           \
-            break;                                      \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int fd = fileno(f);                             \
+							\
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__offs] = __intVal(rA);           \
+		DEBUGBUFFER(buf);                       \
+		__INST(readAhead) = nil;                \
+		__offs++;                               \
+		continue;                               \
+	    }                                           \
+	    CLEAR_ERRNO;                                \
+	    __cnt = read(fd, (buf)+__offs, (cnt)-__offs); \
+	    DEBUGBUFFER(buf);                           \
+	    if (__cnt > 0) {                            \
+		__offs += __cnt;                        \
+	    }                                           \
+	    break;                                      \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
     SETFLAGS(fileno(f), oldFlags);                      \
   }
@@ -973,34 +973,34 @@
     int __offs = 0;                                     \
     int __cnt;                                          \
     char *buf = (char *)(obj);                          \
-                                                        \
+							\
     (ret) = 0;                                          \
     {                                                   \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__ooffs+__offs] = __intVal(rA);   \
-                DEBUGBUFFER(buf);                       \
-                __INST(readAhead) = nil;                \
-                __offs++;                               \
-            } else {                                    \
-                CLEAR_ERRNO;                            \
-                __cnt = READ(f, (buf)+__ooffs+__offs, (cnt)-__offs, handleType); \
-                DEBUGBUFFER(buf);                       \
-                if (__cnt <= 0) {                       \
-                    if (__cnt < 0 && errno == EINTR) {  \
-                        __HANDLE_INTERRUPTS__;          \
-                        /* refetch */                   \
-                        buf = (char *)(obj);            \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                }                                       \
-                __offs += __cnt;                        \
-            }                                           \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__ooffs+__offs] = __intVal(rA);   \
+		DEBUGBUFFER(buf);                       \
+		__INST(readAhead) = nil;                \
+		__offs++;                               \
+	    } else {                                    \
+		CLEAR_ERRNO;                            \
+		__cnt = READ(f, (buf)+__ooffs+__offs, (cnt)-__offs, handleType); \
+		DEBUGBUFFER(buf);                       \
+		if (__cnt <= 0) {                       \
+		    if (__cnt < 0 && errno == EINTR) {  \
+			__HANDLE_INTERRUPTS__;          \
+			/* refetch */                   \
+			buf = (char *)(obj);            \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		}                                       \
+		__offs += __cnt;                        \
+	    }                                           \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
   }
 
@@ -1012,61 +1012,61 @@
     int __offs = 0;                                     \
     int __cnt;                                          \
     char *buf = (char *)(obj);                          \
-                                                        \
+							\
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) < 0) {                            \
-                if (ferror(f)) {                        \
-                    if (errno == EINTR) {               \
-                        __HANDLE_INTERRUPTS__;          \
-                        clearerr(f);                    \
-                        /* refetch */                   \
-                        buf = (char *)(obj);            \
-                        DEBUGBUFFER(buf);               \
-                        continue;                       \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            (buf)[__ooffs+__offs] = (ret);              \
-            DEBUGBUFFER(buf);                           \
-            __offs++;                                   \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) < 0) {                            \
+		if (ferror(f)) {                        \
+		    if (errno == EINTR) {               \
+			__HANDLE_INTERRUPTS__;          \
+			clearerr(f);                    \
+			/* refetch */                   \
+			buf = (char *)(obj);            \
+			DEBUGBUFFER(buf);               \
+			continue;                       \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    (buf)[__ooffs+__offs] = (ret);              \
+	    DEBUGBUFFER(buf);                           \
+	    __offs++;                                   \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        int fd = fileno(f);                             \
-                                                        \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__ooffs+__offs] = __intVal(rA);   \
-                DEBUGBUFFER(buf);                       \
-                __INST(readAhead) = nil;                \
-                __offs++;                               \
-            } else {                                    \
-                CLEAR_ERRNO;                            \
-                __cnt = read(fd, (buf)+__ooffs+__offs, (cnt)-__offs); \
-                DEBUGBUFFER(buf);                       \
-                if (__cnt <= 0) {                       \
-                    if (__cnt < 0 && errno == EINTR) {  \
-                        __HANDLE_INTERRUPTS__;          \
-                        /* refetch */                   \
-                        buf = (char *)(obj);            \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                }                                       \
-                __offs += __cnt;                        \
-            }                                           \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int fd = fileno(f);                             \
+							\
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__ooffs+__offs] = __intVal(rA);   \
+		DEBUGBUFFER(buf);                       \
+		__INST(readAhead) = nil;                \
+		__offs++;                               \
+	    } else {                                    \
+		CLEAR_ERRNO;                            \
+		__cnt = read(fd, (buf)+__ooffs+__offs, (cnt)-__offs); \
+		DEBUGBUFFER(buf);                       \
+		if (__cnt <= 0) {                       \
+		    if (__cnt < 0 && errno == EINTR) {  \
+			__HANDLE_INTERRUPTS__;          \
+			/* refetch */                   \
+			buf = (char *)(obj);            \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		}                                       \
+		__offs += __cnt;                        \
+	    }                                           \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
   }
 
@@ -1077,56 +1077,56 @@
     int __cnt;                                          \
     char *buf = (char *)(obj);                          \
     int oldFlags;                                       \
-                                                        \
+							\
     (ret) = 0;                                          \
     SETNONBLOCKING(fileno(f), oldFlags);                \
-                                                        \
+							\
     if (isBuffered) {                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = getc(f);                            \
-            if ((ret) < 0) {                            \
-                if (ferror(f)) {                        \
-                    if (errno == EINTR) {               \
-                        clearerr(f);                    \
-                        /* refetch */                   \
-                        buf = (char *)(obj);            \
-                        (ret) = 0;                      \
-                        break;                          \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            (buf)[__ooffs+__offs] = (ret);              \
-            DEBUGBUFFER(buf);                           \
-            __offs++;                                   \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = getc(f);                            \
+	    if ((ret) < 0) {                            \
+		if (ferror(f)) {                        \
+		    if (errno == EINTR) {               \
+			clearerr(f);                    \
+			/* refetch */                   \
+			buf = (char *)(obj);            \
+			(ret) = 0;                      \
+			break;                          \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    (buf)[__ooffs+__offs] = (ret);              \
+	    DEBUGBUFFER(buf);                           \
+	    __offs++;                                   \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        int fd = fileno(f);                             \
-                                                        \
-        while (__offs < (cnt)) {                        \
-            OBJ rA = __INST(readAhead);                 \
-            if (rA != nil) {                            \
-                (buf)[__ooffs+__offs] = __intVal(rA);   \
-                DEBUGBUFFER(buf);                       \
-                __INST(readAhead) = nil;                \
-                __offs++;                               \
-                continue;                               \
-            }                                           \
-            CLEAR_ERRNO;                                \
-            __cnt = read(fd, (buf)+__ooffs+__offs, (cnt)-__offs); \
-            DEBUGBUFFER(buf);                           \
-            if (__cnt > 0) {                            \
-                __offs += __cnt;                        \
-            }                                           \
-            break;                                      \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int fd = fileno(f);                             \
+							\
+	while (__offs < (cnt)) {                        \
+	    OBJ rA = __INST(readAhead);                 \
+	    if (rA != nil) {                            \
+		(buf)[__ooffs+__offs] = __intVal(rA);   \
+		DEBUGBUFFER(buf);                       \
+		__INST(readAhead) = nil;                \
+		__offs++;                               \
+		continue;                               \
+	    }                                           \
+	    CLEAR_ERRNO;                                \
+	    __cnt = read(fd, (buf)+__ooffs+__offs, (cnt)-__offs); \
+	    DEBUGBUFFER(buf);                           \
+	    if (__cnt > 0) {                            \
+		__offs += __cnt;                        \
+	    }                                           \
+	    break;                                      \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
     SETFLAGS(fileno(f), oldFlags);                      \
   }
@@ -1136,44 +1136,44 @@
 
 # ifdef NO_STDIO
 #  define __WRITEBYTE__(ret, f, buf, isBuffered, handleType)          \
-        for (;;) {                                      \
-            CLEAR_ERRNO;                                \
-            (ret) = WRITE(f, buf, 1, handleType);       \
-            if ((ret) >= 0) break;                      \
-            if (errno != EINTR) {                       \
-                break;                                  \
-            }                                           \
-            __HANDLE_INTERRUPTS__;                      \
-        }
+	for (;;) {                                      \
+	    CLEAR_ERRNO;                                \
+	    (ret) = WRITE(f, buf, 1, handleType);       \
+	    if ((ret) >= 0) break;                      \
+	    if (errno != EINTR) {                       \
+		break;                                  \
+	    }                                           \
+	    __HANDLE_INTERRUPTS__;                      \
+	}
 # else /* use STDIO */
 #  define __WRITEBYTE__(ret, f, buf, isBuffered, handleType)        \
     if (isBuffered) {                                   \
-        for (;;) {                                      \
-            CLEAR_ERRNO;                                \
-            ret = putc(*(buf), f);                      \
-            if ((ret) >= 0) {                           \
-                (ret) = 1;                              \
-            } else if (ferror(f)) {                     \
-                /* SOLARIS/SPARC (2.6) generates spurious errors with errno = 0 */ \
-                if (errno == EINTR || errno == 0) {     \
-                    __HANDLE_INTERRUPTS__;              \
-                    clearerr(f);                        \
-                    continue;                           \
-                }                                       \
-            } else                                      \
-                (ret) = 0;                              \
-            break;                                      \
-        }                                               \
+	for (;;) {                                      \
+	    CLEAR_ERRNO;                                \
+	    ret = putc(*(buf), f);                      \
+	    if ((ret) >= 0) {                           \
+		(ret) = 1;                              \
+	    } else if (ferror(f)) {                     \
+		/* SOLARIS/SPARC (2.6) generates spurious errors with errno = 0 */ \
+		if (errno == EINTR || errno == 0) {     \
+		    __HANDLE_INTERRUPTS__;              \
+		    clearerr(f);                        \
+		    continue;                           \
+		}                                       \
+	    } else                                      \
+		(ret) = 0;                              \
+	    break;                                      \
+	}                                               \
     } else {                                            \
-        for (;;) {                                      \
-            CLEAR_ERRNO;                                \
-            (ret) = write(fileno(f), buf, 1);           \
-            if ((ret) >= 0) break;                      \
-            if (errno != EINTR) {                       \
-                break;                                  \
-            }                                           \
-            __HANDLE_INTERRUPTS__;                      \
-        }                                               \
+	for (;;) {                                      \
+	    CLEAR_ERRNO;                                \
+	    (ret) = write(fileno(f), buf, 1);           \
+	    if ((ret) >= 0) break;                      \
+	    if (errno != EINTR) {                       \
+		break;                                  \
+	    }                                           \
+	    __HANDLE_INTERRUPTS__;                      \
+	}                                               \
    }
 # endif /* use STDIO */
 
@@ -1185,64 +1185,64 @@
 #  define __WRITEBYTES__(ret, f, buf, cnt, isBuffered, handleType)    \
     (ret) = 0;                                          \
     {                                                   \
-        int __offs = 0;                                 \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            ret = WRITE(f, (buf)+__offs, (cnt)-__offs, handleType); \
-            if (ret <= 0) {                             \
-                if (ret < 0 && errno == EINTR) {        \
-                    __HANDLE_INTERRUPTS__;              \
-                    continue;                           \
-                }                                       \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    ret = WRITE(f, (buf)+__offs, (cnt)-__offs, handleType); \
+	    if (ret <= 0) {                             \
+		if (ret < 0 && errno == EINTR) {        \
+		    __HANDLE_INTERRUPTS__;              \
+		    continue;                           \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
    }
 # else /* use STDIO */
 #  define __WRITEBYTES__(ret, f, buf, cnt, isBuffered, handleType)    \
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        int __offs = 0;                                 \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = fwrite((buf)+__offs, 1, (cnt)-__offs, f);\
-            if ((ret) <= 0) {                            \
-                if (ferror(f)) {                        \
-                    if (errno == EINTR) {               \
-                        __HANDLE_INTERRUPTS__;          \
-                        clearerr(f);                    \
-                        continue;                       \
-                    }                                   \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = fwrite((buf)+__offs, 1, (cnt)-__offs, f);\
+	    if ((ret) <= 0) {                            \
+		if (ferror(f)) {                        \
+		    if (errno == EINTR) {               \
+			__HANDLE_INTERRUPTS__;          \
+			clearerr(f);                    \
+			continue;                       \
+		    }                                   \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     } else {                                            \
-        int __offs = 0;                                 \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = write(fileno(f), (buf)+__offs, (cnt)-__offs);\
-            if ((ret) <= 0) {                           \
-                if ((ret) < 0) {                        \
-                    if (errno == EINTR) {               \
-                        __HANDLE_INTERRUPTS__;          \
-                        continue;                       \
-                    }                                   \
-                }                                       \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	int __offs = 0;                                 \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = write(fileno(f), (buf)+__offs, (cnt)-__offs);\
+	    if ((ret) <= 0) {                           \
+		if ((ret) < 0) {                        \
+		    if (errno == EINTR) {               \
+			__HANDLE_INTERRUPTS__;          \
+			continue;                       \
+		    }                                   \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
    }
 # endif /* use STDIO */
 
@@ -1256,25 +1256,25 @@
     int __ooffs = obj_offs;                             \
     int __offs = 0;                                     \
     char *buf = (char *)(obj);                          \
-                                                        \
+							\
     (ret) = 0;                                          \
     {                                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            ret = WRITE(f, (buf)+__ooffs+__offs, (cnt)-__offs, handleType); \
-            if (ret <= 0) {                             \
-                if (ret < 0 && errno == EINTR) {        \
-                    __HANDLE_INTERRUPTS__;              \
-                    /* refetch */                       \
-                    buf = (char *)(obj);                \
-                    continue;                           \
-                }                                       \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
-        if (__offs > 0)                                 \
-            (ret) = __offs;                             \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    ret = WRITE(f, (buf)+__ooffs+__offs, (cnt)-__offs, handleType); \
+	    if (ret <= 0) {                             \
+		if (ret < 0 && errno == EINTR) {        \
+		    __HANDLE_INTERRUPTS__;              \
+		    /* refetch */                       \
+		    buf = (char *)(obj);                \
+		    continue;                           \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
+	if (__offs > 0)                                 \
+	    (ret) = __offs;                             \
     }                                                   \
   }
 # else /* use STDIO */
@@ -1283,48 +1283,48 @@
     int __ooffs = obj_offs;                             \
     int __offs = 0;                                     \
     char *buf = (char *)(obj);                          \
-                                                        \
+							\
     (ret) = 0;                                          \
     if (isBuffered) {                                   \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = fwrite((buf)+__ooffs+__offs, 1, (cnt)-__offs, f);  \
-            if ((ret) <= 0) {                           \
-                if (ferror(f)) {                        \
-                    if (errno == EINTR) {               \
-                        __HANDLE_INTERRUPTS__;          \
-                        /* refetch */                   \
-                        buf = (char *)(obj);            \
-                        clearerr(f);                    \
-                        continue;                       \
-                    }                                   \
-                    break;                              \
-                } else {                                \
-                    (ret) = 0;                          \
-                }                                       \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = fwrite((buf)+__ooffs+__offs, 1, (cnt)-__offs, f);  \
+	    if ((ret) <= 0) {                           \
+		if (ferror(f)) {                        \
+		    if (errno == EINTR) {               \
+			__HANDLE_INTERRUPTS__;          \
+			/* refetch */                   \
+			buf = (char *)(obj);            \
+			clearerr(f);                    \
+			continue;                       \
+		    }                                   \
+		    break;                              \
+		} else {                                \
+		    (ret) = 0;                          \
+		}                                       \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
     } else {                                            \
-        while (__offs < (cnt)) {                        \
-            CLEAR_ERRNO;                                \
-            (ret) = write(fileno(f), (buf)+__ooffs+__offs, (cnt)-__offs); \
-            if ((ret) <= 0) {                           \
-                if ((ret) < 0) {                        \
-                    if (errno == EINTR){                \
-                        __HANDLE_INTERRUPTS__;          \
-                        /* refetch */                   \
-                        buf = (char *)(obj);            \
-                        continue;                       \
-                    }                                   \
-                }                                       \
-                break;                                  \
-            }                                           \
-            __offs += (ret);                            \
-        }                                               \
+	while (__offs < (cnt)) {                        \
+	    CLEAR_ERRNO;                                \
+	    (ret) = write(fileno(f), (buf)+__ooffs+__offs, (cnt)-__offs); \
+	    if ((ret) <= 0) {                           \
+		if ((ret) < 0) {                        \
+		    if (errno == EINTR){                \
+			__HANDLE_INTERRUPTS__;          \
+			/* refetch */                   \
+			buf = (char *)(obj);            \
+			continue;                       \
+		    }                                   \
+		}                                       \
+		break;                                  \
+	    }                                           \
+	    __offs += (ret);                            \
+	}                                               \
     }                                                   \
     if (__offs > 0)                                     \
-        (ret) = __offs;                                 \
+	(ret) = __offs;                                 \
   }
 # endif /* use STDIO */
 #endif /* unix */
@@ -1336,7 +1336,7 @@
 copyright
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -1386,37 +1386,37 @@
 
     [Instance variables:]
 
-        handleType      <Symbol>        desribes what handle is:
-                                            win32: #fileHandle, #socketHandle,
-                                                   #filePointer, #socketFilePointer, #pipeFilePointer
-                                            unix: #filePointer, #socketFilePointer, #pipeFilePointer
-                                        needed for win32, which uses different APIs for the different handles (sigh)
-        handle          <Integer>       used to be always a filePointer somehow mapped to an integer (FILE* - not the fd);
-                                        now, either a filePointer or a handle (win32)
-        mode            <Symbol>        #readwrite, #readonly or #writeonly
-        buffered        <Boolean>       true, if buffered (i.e. collects characters - does
-                                        not output immediately)
-        binary          <Boolean>       true if in binary mode (reads bytes instead of chars)
-        eolMode         <Symbol>        one of nil, #nl, #cr or #crlf.
-                                        determines how lines should be terminated.
-                                        nil -> newLine (as in Unix);
-                                        #crlf -> with cr-lf (as in MSDOS)
-                                        #cr -> with cr (as in VMS)
-        hitEOF          <Boolean>       true, if EOF was reached
-
-        lastErrorNumber <Integer>       the value of errno (only valid right after the error -
-                                        updated with next i/o operation)
+	handleType      <Symbol>        desribes what handle is:
+					    win32: #fileHandle, #socketHandle,
+						   #filePointer, #socketFilePointer, #pipeFilePointer
+					    unix: #filePointer, #socketFilePointer, #pipeFilePointer
+					needed for win32, which uses different APIs for the different handles (sigh)
+	handle          <Integer>       used to be always a filePointer somehow mapped to an integer (FILE* - not the fd);
+					now, either a filePointer or a handle (win32)
+	mode            <Symbol>        #readwrite, #readonly or #writeonly
+	buffered        <Boolean>       true, if buffered (i.e. collects characters - does
+					not output immediately)
+	binary          <Boolean>       true if in binary mode (reads bytes instead of chars)
+	eolMode         <Symbol>        one of nil, #nl, #cr or #crlf.
+					determines how lines should be terminated.
+					nil -> newLine (as in Unix);
+					#crlf -> with cr-lf (as in MSDOS)
+					#cr -> with cr (as in VMS)
+	hitEOF          <Boolean>       true, if EOF was reached
+
+	lastErrorNumber <Integer>       the value of errno (only valid right after the error -
+					updated with next i/o operation)
 
     [Class variables:]
-        Lobby           <Registry>      keeps track of used ext-streams (to free up FILE*'s)
-
-        StreamErrorSignal       <Signal> parent of all stream errors (see Stream class)
-        InvalidReadSignal       <Signal> raised on read from writeonly stream
-        InvalidWriteSignal      <Signal> raised on write to readonly stream
-        InvalidModeSignal       <Signal> raised on text I/O with binary-stream
-                                         or binary I/O with text-stream
-        OpenErrorSignal         <Signal> raised if open fails
-        StreamNotOpenSignal     <Signal> raised on I/O with non-open stream
+	Lobby           <Registry>      keeps track of used ext-streams (to free up FILE*'s)
+
+	StreamErrorSignal       <Signal> parent of all stream errors (see Stream class)
+	InvalidReadSignal       <Signal> raised on read from writeonly stream
+	InvalidWriteSignal      <Signal> raised on write to readonly stream
+	InvalidModeSignal       <Signal> raised on text I/O with binary-stream
+					 or binary I/O with text-stream
+	OpenErrorSignal         <Signal> raised if open fails
+	StreamNotOpenSignal     <Signal> raised on I/O with non-open stream
 
     Additional notes:
       This class is implemented using the underlying stdio-c library package, which
@@ -1450,44 +1450,44 @@
       fread/fgetc and fwrite/putc respectively.
 
     [author:]
-        Claus Gittinger
-        Stefan Vogel (many, many fixes ...)
+	Claus Gittinger
+	Stefan Vogel (many, many fixes ...)
 
     [see also:]
-        FileStream Socket PipeStream
-        Filename OperatingSystem
+	FileStream Socket PipeStream
+	Filename OperatingSystem
 "
 !
 
 examples
 "
     open a file, read the contents and display it in a textView:
-                                                                        [exBegin]
-        |topView scrollPane textView fileStream text|
-
-        topView := StandardSystemView new.
-        topView label:'contents of Makefile'.
-
-        scrollPane := HVScrollableView in:topView.
-        scrollPane origin:0.0@0.0 corner:1.0@1.0.
-
-        textView := EditTextView new.
-        scrollPane scrolledView:textView.
-
-        fileStream := 'Makefile' asFilename readStream.
-        text := fileStream upToEnd.
-        fileStream close.
-
-        textView contents:text.
-
-        topView open.
-                                                                        [exEnd]
+									[exBegin]
+	|topView scrollPane textView fileStream text|
+
+	topView := StandardSystemView new.
+	topView label:'contents of Makefile'.
+
+	scrollPane := HVScrollableView in:topView.
+	scrollPane origin:0.0@0.0 corner:1.0@1.0.
+
+	textView := EditTextView new.
+	scrollPane scrolledView:textView.
+
+	fileStream := 'Makefile' asFilename readStream.
+	text := fileStream upToEnd.
+	fileStream close.
+
+	textView contents:text.
+
+	topView open.
+									[exEnd]
 
 
     Notice, all of the above can also be done (simply) as:
-                                                                        [exBegin]
-        EditTextView openOn:'Makefile'
-                                                                        [exEnd]
+									[exBegin]
+	EditTextView openOn:'Makefile'
+									[exEnd]
 "
 ! !
 
@@ -1498,25 +1498,25 @@
      To be called on exit of Smalltalk."
 
     Lobby do:[:eachFileStream |
-        eachFileStream close
+	eachFileStream close
     ].
 !
 
 initDefaultEOLMode
     OperatingSystem isUNIXlike ifTrue:[
-        "/ unix EOL conventions
-        DefaultEOLMode := #nl
+	"/ unix EOL conventions
+	DefaultEOLMode := #nl
     ] ifFalse:[
-        OperatingSystem isVMSlike ifTrue:[
-            "/ vms EOL conventions
-            DefaultEOLMode := #cr
-        ] ifFalse:[
-            "/ msdos EOL conventions
-            "/ msdos uses #crlf. but we keep #nl here,
-            "/ otherwise sending HTTP request over sockets fails
+	OperatingSystem isVMSlike ifTrue:[
+	    "/ vms EOL conventions
+	    DefaultEOLMode := #cr
+	] ifFalse:[
+	    "/ msdos EOL conventions
+	    "/ msdos uses #crlf. but we keep #nl here,
+	    "/ otherwise sending HTTP request over sockets fails
 "/            DefaultEOLMode := #crlf
-            DefaultEOLMode := #nl
-        ]
+	    DefaultEOLMode := #nl
+	]
     ]
 !
 
@@ -1525,62 +1525,62 @@
      fopen/fdopen functions."
 
     OperatingSystem isMSDOSlike ifTrue:[
-        ReadMode := 'rb'.
-        ReadWriteMode := 'rb+'.
-        WriteMode := 'wb'.
-        AppendMode := 'ab+'.
-        CreateReadWriteMode := 'wb+'.
+	ReadMode := 'rb'.
+	ReadWriteMode := 'rb+'.
+	WriteMode := 'wb'.
+	AppendMode := 'ab+'.
+	CreateReadWriteMode := 'wb+'.
     ] ifFalse:[
-        ReadMode := 'r'.
-        ReadWriteMode := 'r+'.
-        WriteMode := 'w'.
-        AppendMode := 'a+'.
-        CreateReadWriteMode := 'w+'.
+	ReadMode := 'r'.
+	ReadWriteMode := 'r+'.
+	WriteMode := 'w'.
+	AppendMode := 'a+'.
+	CreateReadWriteMode := 'w+'.
     ]
 !
 
 initialize
     OpenErrorSignal isNil ifTrue:[
-        OpenErrorSignal := OpenError.
-        OpenErrorSignal notifierString:'open error'.
-
-        InvalidReadSignal := InvalidReadError.
-        InvalidReadSignal notifierString:'stream does not support reading'.
-
-        InvalidWriteSignal := InvalidWriteError.
-        InvalidWriteSignal notifierString:'stream does not support writing'.
-
-        InvalidModeSignal := InvalidModeError.
-        InvalidModeSignal notifierString:'binary/text mode mismatch'.
-
-        InvalidOperationSignal := InvalidOperationError.
-        InvalidOperationSignal notifierString:'unsupported file operation'.
-
-        StreamNotOpenSignal := StreamNotOpenError.
-        StreamNotOpenSignal notifierString:'stream is not open'.
-
-        StreamIOErrorSignal := StreamIOError.
-        StreamIOErrorSignal notifierString:'I/O error'.
+	OpenErrorSignal := OpenError.
+	OpenErrorSignal notifierString:'open error'.
+
+	InvalidReadSignal := InvalidReadError.
+	InvalidReadSignal notifierString:'stream does not support reading'.
+
+	InvalidWriteSignal := InvalidWriteError.
+	InvalidWriteSignal notifierString:'stream does not support writing'.
+
+	InvalidModeSignal := InvalidModeError.
+	InvalidModeSignal notifierString:'binary/text mode mismatch'.
+
+	InvalidOperationSignal := InvalidOperationError.
+	InvalidOperationSignal notifierString:'unsupported file operation'.
+
+	StreamNotOpenSignal := StreamNotOpenError.
+	StreamNotOpenSignal notifierString:'stream is not open'.
+
+	StreamIOErrorSignal := StreamIOError.
+	StreamIOErrorSignal notifierString:'I/O error'.
     ].
 
     Lobby isNil ifTrue:[
-        Lobby := Registry new.
-
-        "want to get informed when returning from snapshot"
-        ObjectMemory addDependent:self
+	Lobby := Registry new.
+
+	"want to get informed when returning from snapshot"
+	ObjectMemory addDependent:self
     ].
     DefaultEOLMode isNil ifTrue:[
-        self initDefaultEOLMode.
+	self initDefaultEOLMode.
     ].
     ReadMode isNil ifTrue:[
-        self initModeStrings.
+	self initModeStrings.
     ].
 
     "limit the amount of newspace to be used for non-tenurable executors to 5%"
     "/ MaxNonTenurableExecutors := ObjectMemory newSpaceSize // (Socket sizeOfInst:0) // 20.
     "/ cg: changed because Socket is not in libbasic. Thus, standalone (libbasic only)
     "/ programs would fail to start.
-    MaxNonTenurableExecutors := (ObjectMemory newSpaceSize // 20 min:2000). 
+    MaxNonTenurableExecutors := (ObjectMemory newSpaceSize // 20 min:2000).
 
     "Modified: / 21.5.1998 / 16:33:53 / cg"
 !
@@ -1590,7 +1590,7 @@
      This is invoked via the #earlyRestart change notification."
 
     Lobby do:[:eachFileStream |
-        eachFileStream reOpen
+	eachFileStream reOpen
     ].
 !
 
@@ -1598,8 +1598,8 @@
     "have to reopen files when returning from snapshot"
 
     something == #earlyRestart ifTrue:[
-        self reOpenFiles.
-        self initDefaultEOLMode
+	self reOpenFiles.
+	self initDefaultEOLMode
     ]
 
     "Created: 15.6.1996 / 15:19:59 / cg"
@@ -1709,18 +1709,18 @@
 
      'read ...'.
      [
-         1 to:10 do:[:i |
-             Transcript showCR:rs nextLine
-         ].
-         rs close.
+	 1 to:10 do:[:i |
+	     Transcript showCR:rs nextLine
+	 ].
+	 rs close.
      ] forkAt:7.
 
      'write ...'.
      [
-         1 to:10 do:[:i |
-             ws nextPutAll:'hello world '; nextPutAll:i printString; cr
-         ].
-         ws close.
+	 1 to:10 do:[:i |
+	     ws nextPutAll:'hello world '; nextPutAll:i printString; cr
+	 ].
+	 ws close.
      ] fork.
 
     "
@@ -1848,16 +1848,16 @@
      Report it via an Exception"
 
     anErrorSymbolOrNumber isInteger ifTrue:[
-        StreamError
-            raiseRequestWith:anErrorSymbolOrNumber
-            errorString:(' - os error:' , (OperatingSystem errorTextForNumber:anErrorSymbolOrNumber))
+	StreamError
+	    raiseRequestWith:anErrorSymbolOrNumber
+	    errorString:(' - os error:' , (OperatingSystem errorTextForNumber:anErrorSymbolOrNumber))
     ].
     (self respondsTo:anErrorSymbolOrNumber) ifTrue:[
-        self perform:anErrorSymbolOrNumber
+	self perform:anErrorSymbolOrNumber
     ] ifFalse:[
-        StreamError
-            raiseRequestWith:anErrorSymbolOrNumber
-            errorString:(' - ' , anErrorSymbolOrNumber printString)
+	StreamError
+	    raiseRequestWith:anErrorSymbolOrNumber
+	    errorString:(' - ' , anErrorSymbolOrNumber printString)
     ].
     ^ false
 ! !
@@ -1965,42 +1965,42 @@
     |text l chunks sizes chunk byteCount cnt bytes offset|
 
     binary ifTrue:[
-        "adding to a ByteArray produces quadratic time-space
-         behavior - therefore we allocate chunks, and concatenate them
-         at the end."
-
-        chunks := OrderedCollection new.
-        sizes := OrderedCollection new.
-        byteCount := 0.
-        [self atEnd] whileFalse:[
-            chunk := ByteArray uninitializedNew:4096.
-            cnt := self nextBytes:(chunk size) into:chunk.
-            cnt notNil ifTrue:[
-                chunks add:chunk.
-                sizes add:cnt.
-                byteCount := byteCount + cnt
-            ]
-        ].
-
-        "now, create one big ByteArray"
-        bytes := ByteArray uninitializedNew:byteCount.
-        offset := 1.
-        1 to:chunks size do:[:index |
-            chunk := chunks at:index.
-            cnt := sizes at:index.
-            bytes replaceFrom:offset to:(offset + cnt - 1) with:chunk.
-            offset := offset + cnt
-        ].
-        ^ bytes
+	"adding to a ByteArray produces quadratic time-space
+	 behavior - therefore we allocate chunks, and concatenate them
+	 at the end."
+
+	chunks := OrderedCollection new.
+	sizes := OrderedCollection new.
+	byteCount := 0.
+	[self atEnd] whileFalse:[
+	    chunk := ByteArray uninitializedNew:4096.
+	    cnt := self nextBytes:(chunk size) into:chunk.
+	    cnt notNil ifTrue:[
+		chunks add:chunk.
+		sizes add:cnt.
+		byteCount := byteCount + cnt
+	    ]
+	].
+
+	"now, create one big ByteArray"
+	bytes := ByteArray uninitializedNew:byteCount.
+	offset := 1.
+	1 to:chunks size do:[:index |
+	    chunk := chunks at:index.
+	    cnt := sizes at:index.
+	    bytes replaceFrom:offset to:(offset + cnt - 1) with:chunk.
+	    offset := offset + cnt
+	].
+	^ bytes
     ].
 
     text := StringCollection new.
     [self atEnd] whileFalse:[
-        l := self nextLine.
-        l isNil ifTrue:[
-            ^ text
-        ].
-        text add:l
+	l := self nextLine.
+	l isNil ifTrue:[
+	    ^ text
+	].
+	text add:l
     ].
     ^ text
 !
@@ -2017,7 +2017,7 @@
      See also #contents, which returns the lines as stringCollection for text files."
 
     binary ifTrue:[
-        ^ self contents.
+	^ self contents.
     ].
     ^ self upToEnd
 
@@ -2030,7 +2030,7 @@
      (such as upTo)"
 
     binary == true ifTrue:[
-        ^ ByteArray
+	^ ByteArray
     ].
     ^ String
 !
@@ -2038,10 +2038,10 @@
 eolMode
     "return how end-of-line (EOL) is to be marked.
      Returns one one of:
-        #crlf         -> add a CR-NL, as in MSDOS
-        #cr           -> add a CR, as in VMS
-        #nl           -> add a NL, as in Unix
-        nil           -> transparent
+	#crlf         -> add a CR-NL, as in MSDOS
+	#cr           -> add a CR, as in VMS
+	#nl           -> add a NL, as in Unix
+	nil           -> transparent
     "
 
     ^ eolMode
@@ -2050,20 +2050,20 @@
 eolMode:aSymbolOrNil
     "specify how end-of-line (EOL) is to be marked.
      The argument may be one of:
-        #crlf         -> add a CR-NL, as in MSDOS
-        #cr           -> add a CR, as in VMS
-        #nl           -> add a NL, as in Unix
-        anyOther      -> like #nl
+	#crlf         -> add a CR-NL, as in MSDOS
+	#cr           -> add a CR, as in VMS
+	#nl           -> add a NL, as in Unix
+	anyOther      -> like #nl
     "
 
     aSymbolOrNil == #crnl ifTrue:[
-        eolMode := #crlf
+	eolMode := #crlf
     ] ifFalse:[
-        aSymbolOrNil == #lf ifTrue:[
-            eolMode := #nl
-        ] ifFalse:[
-            eolMode := aSymbolOrNil
-        ]
+	aSymbolOrNil == #lf ifTrue:[
+	    eolMode := #nl
+	] ifFalse:[
+	    eolMode := aSymbolOrNil
+	]
     ].
 !
 
@@ -2076,14 +2076,14 @@
     OBJ _handle  = __INST(handle);
 
     if (_handle != nil) {
-        if (__INST(handleType) == @symbol(socketHandle)) {
-            RETURN (_handle);
-        } else if ((__INST(handleType) == nil)
-                     || (__INST(handleType) == @symbol(filePointer))
-                     || (__INST(handleType) == @symbol(socketFilePointer))
-                     || (__INST(handleType) == @symbol(pipeFilePointer))) {
-            RETURN ( __MKINT(fileno(__FILEVal(_handle))));
-        }
+	if (__INST(handleType) == @symbol(socketHandle)) {
+	    RETURN (_handle);
+	} else if ((__INST(handleType) == nil)
+		     || (__INST(handleType) == @symbol(filePointer))
+		     || (__INST(handleType) == @symbol(socketFilePointer))
+		     || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	    RETURN ( __MKINT(fileno(__FILEVal(_handle))));
+	}
     }
 %}.
     handle isNil ifTrue:[^ self errorNotOpen].
@@ -2112,20 +2112,20 @@
     OBJ _handle  = __INST(handle);
 
     if (_handle != nil) {
-        if ((__INST(handleType) == @symbol(fileHandle))
-         || (__INST(handleType) == @symbol(socketHandle))) {
-            RETURN (_handle);
-        }
-        if ((__INST(handleType) == nil)
-         || (__INST(handleType) == @symbol(filePointer))
-         || (__INST(handleType) == @symbol(socketFilePointer))
-         || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	if ((__INST(handleType) == @symbol(fileHandle))
+	 || (__INST(handleType) == @symbol(socketHandle))) {
+	    RETURN (_handle);
+	}
+	if ((__INST(handleType) == nil)
+	 || (__INST(handleType) == @symbol(filePointer))
+	 || (__INST(handleType) == @symbol(socketFilePointer))
+	 || (__INST(handleType) == @symbol(pipeFilePointer))) {
 #ifdef WIN32
-            RETURN(__MKEXTERNALADDRESS(_get_osfhandle(fileno(__FILEVal(_handle)))));
+	    RETURN(__MKEXTERNALADDRESS(_get_osfhandle(fileno(__FILEVal(_handle)))));
 #else
-            RETURN (__MKINT(fileno(__FILEVal(_handle))));
+	    RETURN (__MKINT(fileno(__FILEVal(_handle))));
 #endif
-        }
+	}
     }
 %}.
     handle isNil ifTrue:[^ self errorNotOpen].
@@ -2141,7 +2141,7 @@
      - except passing it to a primitive, for example."
 
     (handleType isNil or:[handleType == #filePointer]) ifTrue:[
-        ^ handle
+	^ handle
     ].
     ^ self error:'not a FILE*'
 !
@@ -2193,9 +2193,9 @@
      which offers another choice."
 
     aBoolean ifTrue:[
-        eolMode := #crlf
+	eolMode := #crlf
     ] ifFalse:[
-        eolMode := #nl
+	eolMode := #nl
     ].
 !
 
@@ -2212,8 +2212,8 @@
      No error of the stream is not open."
 
     self isOpen ifTrue:[
-        self unregisterForFinalization.
-        self closeFile.
+	self unregisterForFinalization.
+	self closeFile.
     ].
 !
 
@@ -2282,8 +2282,8 @@
     "report an error, that the stream is already opened"
 
     ^ OpenError
-        raiseRequestWith:self
-        errorString:' - stream is already open'
+	raiseRequestWith:self
+	errorString:' - stream is already open'
 
     "
       self new errorAlreadyOpen
@@ -2298,9 +2298,9 @@
     "report an error, that the stream is in binary mode"
 
     ^ InvalidModeError
-        raiseRequestWith:self
-        errorString:(self class name , ' is in binary mode')
-        "/ in:thisContext sender
+	raiseRequestWith:self
+	errorString:(self class name , ' is in binary mode')
+	"/ in:thisContext sender
 
     "Modified: / 8.5.1999 / 20:12:43 / cg"
 !
@@ -2311,9 +2311,9 @@
     "report an error, that the stream is not in binary mode"
 
     ^ InvalidModeError
-        raiseRequestWith:self
-        errorString:(self class name , ' is not in binary mode')
-        "/ in:thisContext sender
+	raiseRequestWith:self
+	errorString:(self class name , ' is not in binary mode')
+	"/ in:thisContext sender
 
     "Modified: / 8.5.1999 / 20:12:40 / cg"
 !
@@ -2324,9 +2324,9 @@
     "report an error, that the stream is not in buffered mode"
 
     ^ StreamError
-        raiseRequestWith:self
-        errorString:(self class name , ' is unbuffered - operation not allowed')
-        "/ in:thisContext sender
+	raiseRequestWith:self
+	errorString:(self class name , ' is unbuffered - operation not allowed')
+	"/ in:thisContext sender
 
     "Modified: / 8.5.1999 / 20:12:36 / cg"
 !
@@ -2397,10 +2397,10 @@
     "{ Pragma: +optSpace }"
 
     ^ StreamIOError newException
-        errorCode:errorNumber;
-        osErrorHolder:(OperatingSystem errorHolderForNumber:errorNumber);
-        parameter:self;
-        raiseRequest
+	errorCode:errorNumber;
+	osErrorHolder:(OperatingSystem errorHolderForNumber:errorNumber);
+	parameter:self;
+	raiseRequest
 
     "Modified: / 8.5.1999 / 20:12:16 / cg"
 !
@@ -2415,7 +2415,7 @@
     "return a message string describing the last error"
 
     (lastErrorNumber isNil or:[lastErrorNumber == 0]) ifTrue:[
-        ^ 'I/O error'
+	^ 'I/O error'
     ].
     ^ OperatingSystem errorTextForNumber:lastErrorNumber
 !
@@ -2444,17 +2444,17 @@
     errorHolder := OperatingSystem errorHolderForNumber:errorNumber.
 
     exClass := (errorHolder errorCategory == #nonexistentSignal)
-        ifTrue:[ FileDoesNotExistException ]
-        ifFalse:[ OpenError ].
+	ifTrue:[ FileDoesNotExistException ]
+	ifFalse:[ OpenError ].
 
     ^ exClass newException
-        errorCode:errorNumber;
-        osErrorHolder:errorHolder;
-        "/ cg: initialized lazyly - see OpenError>>#description
-        "/ errorString:(' : ' , errorHolder errorString);
-        parameter:self;
-        raiseRequest
-        "/ in:thisContext sender
+	errorCode:errorNumber;
+	osErrorHolder:errorHolder;
+	"/ cg: initialized lazyly - see OpenError>>#description
+	"/ errorString:(' : ' , errorHolder errorString);
+	parameter:self;
+	raiseRequest
+	"/ in:thisContext sender
 
     "Modified: / 09-09-2011 / 07:22:49 / cg"
 !
@@ -2473,10 +2473,10 @@
     "{ Pragma: +optSpace }"
 
     ^ ReadError newException
-        errorCode:errorNumber;
-        osErrorHolder:(OperatingSystem errorHolderForNumber:errorNumber);
-        parameter:self;
-        raiseRequest
+	errorCode:errorNumber;
+	osErrorHolder:(OperatingSystem errorHolderForNumber:errorNumber);
+	parameter:self;
+	raiseRequest
 !
 
 writeError
@@ -2493,10 +2493,10 @@
     "{ Pragma: +optSpace }"
 
     ^ WriteError newException
-        errorCode:errorNumber;
-        osErrorHolder:(OperatingSystem errorHolderForNumber:errorNumber);
-        parameter:self;
-        raiseRequest
+	errorCode:errorNumber;
+	osErrorHolder:(OperatingSystem errorHolderForNumber:errorNumber);
+	parameter:self;
+	raiseRequest
 ! !
 
 !ExternalStream methodsFor:'finalization'!
@@ -2521,7 +2521,7 @@
 
     "/ with timeout to avoid blocking in a bad pty/socket
     [
-        self closeFile
+	self closeFile
     ] valueWithTimeout:30 seconds.
 !
 
@@ -2533,7 +2533,7 @@
 
     "keep myself in newSpace, so it will be finalized early"
     Lobby size < MaxNonTenurableExecutors ifTrue:[
-        ObjectMemory preventTenureOf:self.
+	ObjectMemory preventTenureOf:self.
     ].
     Lobby register:self.
 !
@@ -2583,129 +2583,129 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-            && (__INST(binary) != true)
-        ) {
-            f = __FILEVal(fp);
-            buffer[0] = '\0';
-
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f);
-            }
-
-            rslt = nextPtr = buffer;
-            limit = buffer + sizeof(buffer) - 2;
-
-            for (;;) {
-                __READBYTE__(ret, f, nextPtr, _buffered, __INST(handleType));
-                if (ret <= 0) {
-                    if (nextPtr == buffer)
-                        rslt = NULL;
-                    if (ret == 0) {
-                        __INST(hitEOF) = true;
-                        break;
-                    } else {
-                        error = __mkSmallInteger(__threadErrno);
-                        goto err;
-                    }
-                }
-
-                if (*nextPtr == '\n') {
-                    cutOff = 1;
-                    *nextPtr = '\0';
-                    break;
-                }
-                if (*nextPtr == '\r') {
-                    char peekChar;
-
-                    /*
-                     * peek ahead for a newLine ...
-                     */
-                    __READBYTE__(ret, f, &peekChar, _buffered, __INST(handleType));
-                    if (ret <= 0) {
-                        cutOff = 1;
-                        *nextPtr = '\0';
-                        if (ret == 0) {
-                            __INST(hitEOF) = true;
-                            break;
-                        }
-                        error = __mkSmallInteger(__threadErrno);
-                        goto err;
-                    }
-
-                    if (peekChar == '\n') {
-                        cutOff = 2;
-                        *nextPtr = '\0';
-                        break;
-                    }
-
-                    __UNGETC__(peekChar, f, _buffered);
-
-                    cutOff = 1;
-                    *nextPtr = '\0';
-                    break;
-                }
-
-                nextPtr++;
-                if (nextPtr >= limit) {
-                    *nextPtr = '\0';
-                    lineTooLong = 1;
-                    if (@global(InfoPrinting) == true) {
-                        fprintf(stderr, "ExtStream [warning]: line truncated in nextLine\n");
-                    }
-                    break;
-                }
-            }
-
-            if (rslt != NULL) {
-                len = nextPtr-buffer;
-
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + len + cutOff;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                /* remove any EOL character */
-                if (len != 0) {
-                    if (buffer[len-1] == '\n') {
-                        buffer[--len] = '\0';
-                    }
-                    if ((len != 0) && (buffer[len-1] == '\r')) {
-                        buffer[--len] = '\0';
-                    }
-                }
-                line = __MKSTRING_L(buffer, len);
-                if (! lineTooLong) {
-                    RETURN ( line );
-                }
-            }
-        }
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	    && (__INST(binary) != true)
+	) {
+	    f = __FILEVal(fp);
+	    buffer[0] = '\0';
+
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f);
+	    }
+
+	    rslt = nextPtr = buffer;
+	    limit = buffer + sizeof(buffer) - 2;
+
+	    for (;;) {
+		__READBYTE__(ret, f, nextPtr, _buffered, __INST(handleType));
+		if (ret <= 0) {
+		    if (nextPtr == buffer)
+			rslt = NULL;
+		    if (ret == 0) {
+			__INST(hitEOF) = true;
+			break;
+		    } else {
+			error = __mkSmallInteger(__threadErrno);
+			goto err;
+		    }
+		}
+
+		if (*nextPtr == '\n') {
+		    cutOff = 1;
+		    *nextPtr = '\0';
+		    break;
+		}
+		if (*nextPtr == '\r') {
+		    char peekChar;
+
+		    /*
+		     * peek ahead for a newLine ...
+		     */
+		    __READBYTE__(ret, f, &peekChar, _buffered, __INST(handleType));
+		    if (ret <= 0) {
+			cutOff = 1;
+			*nextPtr = '\0';
+			if (ret == 0) {
+			    __INST(hitEOF) = true;
+			    break;
+			}
+			error = __mkSmallInteger(__threadErrno);
+			goto err;
+		    }
+
+		    if (peekChar == '\n') {
+			cutOff = 2;
+			*nextPtr = '\0';
+			break;
+		    }
+
+		    __UNGETC__(peekChar, f, _buffered);
+
+		    cutOff = 1;
+		    *nextPtr = '\0';
+		    break;
+		}
+
+		nextPtr++;
+		if (nextPtr >= limit) {
+		    *nextPtr = '\0';
+		    lineTooLong = 1;
+		    if (@global(InfoPrinting) == true) {
+			fprintf(stderr, "ExtStream [warning]: line truncated in nextLine\n");
+		    }
+		    break;
+		}
+	    }
+
+	    if (rslt != NULL) {
+		len = nextPtr-buffer;
+
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + len + cutOff;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		/* remove any EOL character */
+		if (len != 0) {
+		    if (buffer[len-1] == '\n') {
+			buffer[--len] = '\0';
+		    }
+		    if ((len != 0) && (buffer[len-1] == '\r')) {
+			buffer[--len] = '\0';
+		    }
+		}
+		line = __MKSTRING_L(buffer, len);
+		if (! lineTooLong) {
+		    RETURN ( line );
+		}
+	    }
+	}
     }
 err: ;
 %}.
     line notNil ifTrue:[
-        "/ the line as read is longer than 32k characters (boy - what a line)
-        "/ The exception could be handled by reading more and returning the
-        "/ concatenation in your exception handler (the receiver and the partial
-        "/ line are passed as parameter)
-
-        LineTooLongErrorSignal isHandled ifTrue:[
-            ^ LineTooLongErrorSignal
-                raiseRequestWith:(Array with:self with:line)
-                     errorString:('line too long read error')
-        ].
-        ^ line , self nextLine
+	"/ the line as read is longer than 32k characters (boy - what a line)
+	"/ The exception could be handled by reading more and returning the
+	"/ concatenation in your exception handler (the receiver and the partial
+	"/ line are passed as parameter)
+
+	LineTooLongErrorSignal isHandled ifTrue:[
+	    ^ LineTooLongErrorSignal
+		raiseRequestWith:(Array with:self with:line)
+		     errorString:('line too long read error')
+	].
+	^ line , self nextLine
     ].
 
     (hitEOF == true) ifTrue:[^ self pastEndRead].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error
+	lastErrorNumber := error.
+	^ self readError:error
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
@@ -2727,74 +2727,74 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(readonly))
-            && (__INST(binary) != true)
-            && __isStringLike(aString)
-        ) {
-            int _buffered = (__INST(buffered) == true);
-            int len = __stringSize(aString);
-            int cnt, len1;
-            FILEPOINTER f = __FILEVal(fp);
-            char *cp;
-            int o_offs;
-
-            if (_buffered) {
-                __WRITING__(f)
-            }
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(readonly))
+	    && (__INST(binary) != true)
+	    && __isStringLike(aString)
+	) {
+	    int _buffered = (__INST(buffered) == true);
+	    int len = __stringSize(aString);
+	    int cnt, len1;
+	    FILEPOINTER f = __FILEVal(fp);
+	    char *cp;
+	    int o_offs;
+
+	    if (_buffered) {
+		__WRITING__(f)
+	    }
 #if defined(WIN32) && !defined(__MINGW__)
-            if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                cnt = __win32_fwrite(__stringVal(aString), 1, len, f);
-            } else
+	    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+		cnt = __win32_fwrite(__stringVal(aString), 1, len, f);
+	    } else
 #endif
-            {
-                o_offs = (char *)__stringVal(aString)-(char *)aString;
-                __WRITEBYTES_OBJ__(cnt, f, aString, o_offs, len, _buffered, __INST(handleType));
-            }
-            if (cnt == len) {
-                OBJ mode = __INST(eolMode);
-
-                len1 = len;
-
-                if (mode == @symbol(cr)) {
-                    cp = "\r"; len = 1;
-                } else if (mode == @symbol(crlf)) {
-                    cp = "\r\n"; len = 2;
-                } else if (mode == @symbol(eot)) {
-                    cp = "\004"; len = 1;
-                } else if (mode == @symbol(etx)) {
-                    cp = "\003"; len = 1;
-                } else {
-                    cp = "\n"; len = 1;
-                }
+	    {
+		o_offs = (char *)__stringVal(aString)-(char *)aString;
+		__WRITEBYTES_OBJ__(cnt, f, aString, o_offs, len, _buffered, __INST(handleType));
+	    }
+	    if (cnt == len) {
+		OBJ mode = __INST(eolMode);
+
+		len1 = len;
+
+		if (mode == @symbol(cr)) {
+		    cp = "\r"; len = 1;
+		} else if (mode == @symbol(crlf)) {
+		    cp = "\r\n"; len = 2;
+		} else if (mode == @symbol(eot)) {
+		    cp = "\004"; len = 1;
+		} else if (mode == @symbol(etx)) {
+		    cp = "\003"; len = 1;
+		} else {
+		    cp = "\n"; len = 1;
+		}
 #if defined(WIN32) && !defined(__MINGW__)
-                if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                    cnt = __win32_fwrite(cp, 1, len, f);
-                } else
+		if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+		    cnt = __win32_fwrite(cp, 1, len, f);
+		} else
 #endif
-                {
-                    __WRITEBYTES__(cnt, f, cp, len, _buffered, __INST(handleType));
-                }
-                if (cnt > 0) {
-                    if (__isSmallInteger(__INST(position))) {
-                        INT np = __intVal(__INST(position)) + cnt;
-                        OBJ t;
-
-                        t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                    } else {
-                        __INST(position) = nil; /* i.e. do not know */
-                    }
-                    RETURN ( self );
-                }
-            }
-            error = __mkSmallInteger(__threadErrno);
-        }
+		{
+		    __WRITEBYTES__(cnt, f, cp, len, _buffered, __INST(handleType));
+		}
+		if (cnt > 0) {
+		    if (__isSmallInteger(__INST(position))) {
+			INT np = __intVal(__INST(position)) + cnt;
+			OBJ t;
+
+			t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		    } else {
+			__INST(position) = nil; /* i.e. do not know */
+		    }
+		    RETURN ( self );
+		}
+	    }
+	    error = __mkSmallInteger(__threadErrno);
+	}
     }
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ self
+	lastErrorNumber := error.
+	self writeError:error.
+	^ self
     ].
     super nextPutLine:aString.
 !
@@ -2809,14 +2809,14 @@
     |line|
 
     [aStream atEnd] whileFalse:[
-        line := aStream nextLine.
-        line isNil ifTrue:[
-            ^ self.
-        ].
-        self nextPutLine:line.
-        (aStringOrNil notNil and:[line startsWith:aStringOrNil]) ifTrue:[
-            ^ self
-        ]
+	line := aStream nextLine.
+	line isNil ifTrue:[
+	    ^ self.
+	].
+	self nextPutLine:line.
+	(aStringOrNil notNil and:[line startsWith:aStringOrNil]) ifTrue:[
+	    ^ self
+	]
     ].
 !
 
@@ -2836,16 +2836,16 @@
 
     firstPos := self position.
     [self atEnd] whileFalse:[
-        lastPos := self position.
-        line := self nextLine.
-        line isNil ifTrue:[
-            self position:firstPos.
-            ^ nil
-        ].
-        (line startsWith:aString) ifTrue:[
-            self position:lastPos.
-            ^ line
-        ]
+	lastPos := self position.
+	line := self nextLine.
+	line isNil ifTrue:[
+	    self position:firstPos.
+	    ^ nil
+	].
+	(line startsWith:aString) ifTrue:[
+	    self position:lastPos.
+	    ^ line
+	]
     ].
     self position:firstPos.
     ^ nil
@@ -2865,18 +2865,18 @@
 
     startPos := self position.
     [self atEnd] whileFalse:[
-        linePos := self position.
-        line := self nextLine.
-        line notNil ifTrue:[
-            index := 1.
-            aCollectionOfStrings do:[:prefix |
-                (line startsWith:prefix) ifTrue:[
-                    self position:linePos.
-                    ^ index
-                ].
-                index := index + 1
-            ]
-        ]
+	linePos := self position.
+	line := self nextLine.
+	line notNil ifTrue:[
+	    index := 1.
+	    aCollectionOfStrings do:[:prefix |
+		(line startsWith:prefix) ifTrue:[
+		    self position:linePos.
+		    ^ index
+		].
+		index := index + 1
+	    ]
+	]
     ].
     self position:startPos.
     ^ nil
@@ -2889,20 +2889,20 @@
      the receiver will trigger an ioInterrupt.
      If cleared (which is the default) no special notification is made.
      Notice:
-        not every OS supports this
-        - check with OS>>supportsIOInterrupts before using"
+	not every OS supports this
+	- check with OS>>supportsIOInterrupts before using"
 
     |fd|
 
     handle isNil ifTrue:[^ self errorNotOpen].
 
     OperatingSystem supportsIOInterrupts ifFalse:[
-        ^ self errorUnsupportedOperation
+	^ self errorUnsupportedOperation
     ].
 
     fd := self fileDescriptor.
     aBoolean ifTrue:[
-        ^ OperatingSystem enableIOInterruptsOn:fd
+	^ OperatingSystem enableIOInterruptsOn:fd
     ].
     ^ OperatingSystem disableIOInterruptsOn:fd
 
@@ -2935,10 +2935,10 @@
     |bufferSize|
 
     OperatingSystem isMSDOSlike ifTrue:[
-        "/ mhmh - NT hangs, when copying bigger blocks to a network drive - why ?
-        bufferSize := 1 * 1024.
+	"/ mhmh - NT hangs, when copying bigger blocks to a network drive - why ?
+	bufferSize := 1 * 1024.
     ] ifFalse:[
-        bufferSize := 8 * 1024.
+	bufferSize := 8 * 1024.
     ].
 
     ^ inStream copyToEndInto:self bufferSize:bufferSize
@@ -2959,10 +2959,10 @@
     |bufferSize|
 
     OperatingSystem isMSDOSlike ifTrue:[
-        "/ mhmh - NT hangs, when copying bigger blocks to a network drive - why ?
-        bufferSize := 1 * 1024.
+	"/ mhmh - NT hangs, when copying bigger blocks to a network drive - why ?
+	bufferSize := 1 * 1024.
     ] ifFalse:[
-        bufferSize := 8 * 1024.
+	bufferSize := 8 * 1024.
     ].
 
     ^ self copyToEndInto:outStream bufferSize:bufferSize
@@ -3019,55 +3019,55 @@
     OBJ fp = __INST(handle);
 
     if (fp == nil)
-        goto out;
+	goto out;
 
     if (!__isInteger(ioctlNumber)
-         || (!__isInteger(arg)
-             && (arg != nil)
-             && !__isBytes(arg)
-             && !__isExternalBytesLike(arg)
-             && !__isExternalAddress(arg))) {
-        error = @symbol(badArgument);
-        goto out;
+	 || (!__isInteger(arg)
+	     && (arg != nil)
+	     && !__isBytes(arg)
+	     && !__isExternalBytesLike(arg)
+	     && !__isExternalAddress(arg))) {
+	error = @symbol(badArgument);
+	goto out;
     }
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-        fd = __FILEVal(fp);
+	fd = __FILEVal(fp);
     } else
-        if ((__INST(handleType) == nil)
-         || (__INST(handleType) == @symbol(filePointer))
-         || (__INST(handleType) == @symbol(socketFilePointer))
-         || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        fd = fileno(__FILEVal(fp));
+	if ((__INST(handleType) == nil)
+	 || (__INST(handleType) == @symbol(filePointer))
+	 || (__INST(handleType) == @symbol(socketFilePointer))
+	 || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	fd = fileno(__FILEVal(fp));
     } else {
-        error = @symbol(badHandleType);
-        goto out;
+	error = @symbol(badHandleType);
+	goto out;
     }
 
     ioNum = __unsignedLongIntVal(ioctlNumber);
 
     __BEGIN_INTERRUPTABLE__
     do {
-        __threadErrno = 0;
-        if (arg == nil) {
-            ioArg = 0;
-        } else if (__isSmallInteger(arg)) {
-            ioArg = __intVal(arg);
-        } else if (__isInteger(arg)) {
-            ioArg = __unsignedLongIntVal(arg);
-        } else if (__isExternalBytesLike(arg)) {
-            ioArg = (INT)(__externalBytesAddress(arg));
-        } else if (__isExternalAddress(arg)) {
-            ioArg = (INT)(__externalAddressVal(arg));
-        } else {
-            ioArg = (INT)(__ByteArrayInstPtr(arg)->ba_element);
-        }
-        ret = ioctl(fd, ioNum, ioArg);
+	__threadErrno = 0;
+	if (arg == nil) {
+	    ioArg = 0;
+	} else if (__isSmallInteger(arg)) {
+	    ioArg = __intVal(arg);
+	} else if (__isInteger(arg)) {
+	    ioArg = __unsignedLongIntVal(arg);
+	} else if (__isExternalBytesLike(arg)) {
+	    ioArg = (INT)(__externalBytesAddress(arg));
+	} else if (__isExternalAddress(arg)) {
+	    ioArg = (INT)(__externalAddressVal(arg));
+	} else {
+	    ioArg = (INT)(__ByteArrayInstPtr(arg)->ba_element);
+	}
+	ret = ioctl(fd, ioNum, ioArg);
     } while (ret < 0 && __threadErrno == EINTR);
     __END_INTERRUPTABLE__
 
     if (ret >= 0) {
-        RETURN ( __mkSmallInteger(ret) );
+	RETURN ( __mkSmallInteger(ret) );
     }
     error = __mkSmallInteger(__threadErrno);
 #endif
@@ -3075,8 +3075,8 @@
 out:;
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self ioError:error.
+	lastErrorNumber := error.
+	^ self ioError:error.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
 
@@ -3110,39 +3110,39 @@
     OBJ fp = __INST(handle);
 
     if (fp == nil)
-        goto out;
+	goto out;
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-        // syncing a socket to disk ?
-        error = @symbol(badHandleType);
-        goto out;
-        // fd = __FILEVal(fp);
+	// syncing a socket to disk ?
+	error = @symbol(badHandleType);
+	goto out;
+	// fd = __FILEVal(fp);
     } else
-        if ((__INST(handleType) == nil)
-               || (__INST(handleType) == @symbol(filePointer))
-               || (__INST(handleType) == @symbol(socketFilePointer))
-               || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        fd = fileno(__FILEVal(fp));
+	if ((__INST(handleType) == nil)
+	       || (__INST(handleType) == @symbol(filePointer))
+	       || (__INST(handleType) == @symbol(socketFilePointer))
+	       || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	fd = fileno(__FILEVal(fp));
     } else {
-        error = @symbol(badHandleType);
-        goto out;
+	error = @symbol(badHandleType);
+	goto out;
     }
 
 #ifdef WIN32
      __threadErrno = 0;
      ret = __STX_API_NOINT_CALL1( "FlushFileBuffers", FlushFileBuffers, _get_osfhandle(fd));
      if (ret) {
-         RETURN (self);
+	 RETURN (self);
      }
 #else
      __BEGIN_INTERRUPTABLE__
      do {
-         ret = fsync(fd);
+	 ret = fsync(fd);
      } while ((ret < 0) && (__threadErrno == EINTR));
      __END_INTERRUPTABLE__
 
      if (ret >= 0) {
-         RETURN (self);
+	 RETURN (self);
      }
 #endif /* ! WIN32 */
      error = __mkSmallInteger(__threadErrno);
@@ -3150,16 +3150,16 @@
 out:;
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self ioError:error.
-        ^ self.
+	lastErrorNumber := error.
+	self ioError:error.
+	^ self.
     ].
     handle isNil ifTrue:[self errorNotOpen].
 
     "
-        |f|
-        f := 'x' asFilename writeStream.
-        f nextPutAll:'hallo'; sync; syncData; close
+	|f|
+	f := 'x' asFilename writeStream.
+	f nextPutAll:'hallo'; sync; syncData; close
     "
 !
 
@@ -3179,39 +3179,39 @@
     OBJ fp = __INST(handle);
 
     if (fp == nil)
-        goto out;
+	goto out;
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-        // syncing a socket to disk ?
-        error = @symbol(badHandleType);
-        goto out;
-        // fd = __FILEVal(fp);
+	// syncing a socket to disk ?
+	error = @symbol(badHandleType);
+	goto out;
+	// fd = __FILEVal(fp);
     } else
-        if ((__INST(handleType) == nil)
-               || (__INST(handleType) == @symbol(filePointer))
-               || (__INST(handleType) == @symbol(socketFilePointer))
-               || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        fd = fileno(__FILEVal(fp));
+	if ((__INST(handleType) == nil)
+	       || (__INST(handleType) == @symbol(filePointer))
+	       || (__INST(handleType) == @symbol(socketFilePointer))
+	       || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	fd = fileno(__FILEVal(fp));
     } else {
-        error = @symbol(badHandleType);
-        goto out;
+	error = @symbol(badHandleType);
+	goto out;
     }
 
 #ifdef WIN32
      __threadErrno = 0;
      ret = __STX_API_NOINT_CALL1( "FlushFileBuffers", FlushFileBuffers, _get_osfhandle(fd));
      if (ret) {
-         RETURN (self);
+	 RETURN (self);
      }
 #else
      __BEGIN_INTERRUPTABLE__
      do {
-         ret = fdatasync(fd);
+	 ret = fdatasync(fd);
      } while ((ret < 0) && (__threadErrno == EINTR));
      __END_INTERRUPTABLE__
 
      if (ret >= 0) {
-         RETURN (self);
+	 RETURN (self);
      }
 #endif /* ! WIN32 */
      error = __mkSmallInteger(__threadErrno);
@@ -3220,9 +3220,9 @@
 %}.
 
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self ioError:error.
-        ^ self.
+	lastErrorNumber := error.
+	self ioError:error.
+	^ self.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
 
@@ -3230,9 +3230,9 @@
     self sync.
 
     "
-        |f|
-        f := 'x' asFilename writeStream.
-        f nextPutAll:'hallo'; sync; syncData; close
+	|f|
+	f := 'x' asFilename writeStream.
+	f nextPutAll:'hallo'; sync; syncData; close
     "
 !
 
@@ -3265,33 +3265,33 @@
     int sz;
 
     if (fp == nil)
-        goto out;
+	goto out;
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-        // cg: termina attributes of a socket?
-        error = @symbol(badHandleType);
-        goto out;
-        // fd = __FILEVal(fp);
+	// cg: termina attributes of a socket?
+	error = @symbol(badHandleType);
+	goto out;
+	// fd = __FILEVal(fp);
     } else
-        if ((__INST(handleType) == nil)
-         || (__INST(handleType) == @symbol(filePointer))
-         || (__INST(handleType) == @symbol(socketFilePointer))
-         || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        fd = fileno(__FILEVal(fp));
+	if ((__INST(handleType) == nil)
+	 || (__INST(handleType) == @symbol(filePointer))
+	 || (__INST(handleType) == @symbol(socketFilePointer))
+	 || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	fd = fileno(__FILEVal(fp));
     } else {
-        error = @symbol(badHandleType);
-        goto out;
+	error = @symbol(badHandleType);
+	goto out;
     }
 
     __BEGIN_INTERRUPTABLE__
     do {
-        __threadErrno = 0;
-        _ret = tcgetattr(fd, &t);
+	__threadErrno = 0;
+	_ret = tcgetattr(fd, &t);
     } while (_ret < 0 && __threadErrno == EINTR);
     __END_INTERRUPTABLE__
 
     if (_ret < 0) {
-        error = __mkSmallInteger(__threadErrno);
+	error = __mkSmallInteger(__threadErrno);
     }
     ignbrk = t.c_iflag & IGNBRK ? true : false;
     brkint = t.c_iflag & BRKINT ? true : false;
@@ -3327,18 +3327,18 @@
 
     sz = t.c_cflag & CSIZE;
     switch (sz) {
-        case CS5:
-            csize = @symbol(cs5);
-            break;
-        case CS6:
-            csize = @symbol(cs6);
-            break;
-        case CS7:
-            csize = @symbol(cs7);
-            break;
-        case CS8:
-            csize = @symbol(cs8);
-            break;
+	case CS5:
+	    csize = @symbol(cs5);
+	    break;
+	case CS6:
+	    csize = @symbol(cs6);
+	    break;
+	case CS7:
+	    csize = @symbol(cs7);
+	    break;
+	case CS8:
+	    csize = @symbol(cs8);
+	    break;
     }
     cstopb = t.c_cflag & CSTOPB ? true : false;
     cread = t.c_cflag & CREAD ? true : false;
@@ -3374,12 +3374,12 @@
 out:;
 %}.
     error notNil ifTrue:[
-        error == #unsupportedOperation ifTrue:[
-            "/ the system does not support tcgetattr
-            ^ self errorUnsupportedOperation
-        ].
-        lastErrorNumber := error.
-        ^ self ioError:error.
+	error == #unsupportedOperation ifTrue:[
+	    "/ the system does not support tcgetattr
+	    ^ self errorUnsupportedOperation
+	].
+	lastErrorNumber := error.
+	^ self ioError:error.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
 
@@ -3441,7 +3441,7 @@
 
     readCount := self nextBytes:count into:aCollection startingAt:start.
     readCount = count ifTrue:[
-        ^ aCollection.
+	^ aCollection.
     ].
     ^ aCollection copyFrom:1 to:start+readCount-1.
 !
@@ -3455,20 +3455,20 @@
     |buffer n|
 
     binary ifTrue:[
-        buffer := ByteArray uninitializedNew:count
+	buffer := ByteArray uninitializedNew:count
     ] ifFalse:[
-        buffer := String uninitializedNew:count
+	buffer := String uninitializedNew:count
     ].
     n := self nextAvailableBytes:count into:buffer startingAt:1.
     n == 0 ifTrue:[
-        binary ifTrue:[
-            ^ #[]
-        ].
-        ^ ''
+	binary ifTrue:[
+	    ^ #[]
+	].
+	^ ''
     ].
 
     n ~~ count ifTrue:[
-        ^ buffer copyTo:n
+	^ buffer copyTo:n
     ].
     ^ buffer.
 
@@ -3526,99 +3526,99 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-            && __bothSmallInteger(count, start)
-        ) {
-            f = __FILEVal(fp);
-
-            cnt = __intVal(count);
-            offs = __intVal(start) - 1;
-
-            if (__isExternalBytesLike(anObject)) {
-                OBJ sz;
-
-                nInstBytes = 0;
-                extPtr = (char *)(__externalBytesAddress(anObject));
-                if (extPtr == NULL) goto bad;
-                sz = __externalBytesSize(anObject);
-                if (__isSmallInteger(sz)) {
-                    objSize = __intVal(sz);
-                } else {
-                    objSize = 0; /* unknown */
-                }
-            } else {
-                OBJ oClass = __Class(anObject);
-                int nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
-
-                nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
-
-                switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
-                    case BYTEARRAY:
-                    case WORDARRAY:
-                    case LONGARRAY:
-                    case SWORDARRAY:
-                    case SLONGARRAY:
-                    case FLOATARRAY:
-                        break;
-                    case DOUBLEARRAY:
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	    && __bothSmallInteger(count, start)
+	) {
+	    f = __FILEVal(fp);
+
+	    cnt = __intVal(count);
+	    offs = __intVal(start) - 1;
+
+	    if (__isExternalBytesLike(anObject)) {
+		OBJ sz;
+
+		nInstBytes = 0;
+		extPtr = (char *)(__externalBytesAddress(anObject));
+		if (extPtr == NULL) goto bad;
+		sz = __externalBytesSize(anObject);
+		if (__isSmallInteger(sz)) {
+		    objSize = __intVal(sz);
+		} else {
+		    objSize = 0; /* unknown */
+		}
+	    } else {
+		OBJ oClass = __Class(anObject);
+		int nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
+
+		nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+
+		switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
+		    case BYTEARRAY:
+		    case WORDARRAY:
+		    case LONGARRAY:
+		    case SWORDARRAY:
+		    case SLONGARRAY:
+		    case FLOATARRAY:
+			break;
+		    case DOUBLEARRAY:
 #ifdef __NEED_DOUBLE_ALIGN
-                        nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
+			nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
 #endif
-                        break;
-                    case LONGLONGARRAY:
-                    case SLONGLONGARRAY:
+			break;
+		    case LONGLONGARRAY:
+		    case SLONGLONGARRAY:
 #ifdef __NEED_LONGLONG_ALIGN
-                        nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
+			nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
 #endif
-                        break;
-                    default:
-                        goto bad;
-                }
-                extPtr = (char *)0;
-                objSize = __Size(anObject) - nInstBytes;
-            }
-
-            if ((offs >= 0) && (cnt >= 0) && (objSize >= (cnt + offs))) {
-                _buffered = (__INST(buffered) == true);
-                if (_buffered) {
-                    __READING__(f);
-                }
-
-                if (extPtr) {
-                    __READAVAILBYTES__(ret, f, extPtr+offs, cnt, _buffered, __INST(handleType));
-                } else {
-                    /*
-                     * on interrupt, anObject may be moved to another location.
-                     * So we pass (char *)__InstPtr(anObject) + nInstBytes + offs to the macro __READ_BYTES__,
-                     * to get a new address.
-                     */
-                    offs += nInstBytes;
-                    __READAVAILBYTES_OBJ__(ret, f, anObject, offs, cnt, _buffered, __INST(handleType));
-                }
-                /* 0 is NOT an EOF condition here ... */
-                if (ret >= 0) {
-                    if (__isSmallInteger(__INST(position))) {
-                        INT np = __intVal(__INST(position)) + ret;
-                        OBJ t;
-
-                        t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                    } else {
-                        __INST(position) = nil; /* i.e. do not know */
-                    }
-                    RETURN (__mkSmallInteger(ret));
-                }
-                __INST(position) = nil;
-                error = __mkSmallInteger(__threadErrno);
-            }
-        }
+			break;
+		    default:
+			goto bad;
+		}
+		extPtr = (char *)0;
+		objSize = __Size(anObject) - nInstBytes;
+	    }
+
+	    if ((offs >= 0) && (cnt >= 0) && (objSize >= (cnt + offs))) {
+		_buffered = (__INST(buffered) == true);
+		if (_buffered) {
+		    __READING__(f);
+		}
+
+		if (extPtr) {
+		    __READAVAILBYTES__(ret, f, extPtr+offs, cnt, _buffered, __INST(handleType));
+		} else {
+		    /*
+		     * on interrupt, anObject may be moved to another location.
+		     * So we pass (char *)__InstPtr(anObject) + nInstBytes + offs to the macro __READ_BYTES__,
+		     * to get a new address.
+		     */
+		    offs += nInstBytes;
+		    __READAVAILBYTES_OBJ__(ret, f, anObject, offs, cnt, _buffered, __INST(handleType));
+		}
+		/* 0 is NOT an EOF condition here ... */
+		if (ret >= 0) {
+		    if (__isSmallInteger(__INST(position))) {
+			INT np = __intVal(__INST(position)) + ret;
+			OBJ t;
+
+			t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		    } else {
+			__INST(position) = nil; /* i.e. do not know */
+		    }
+		    RETURN (__mkSmallInteger(ret));
+		}
+		__INST(position) = nil;
+		error = __mkSmallInteger(__threadErrno);
+	    }
+	}
     }
 bad: ;
 %}.
     (hitEOF and:[self pastEndRead isNil]) ifTrue:[^ 0].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error
+	lastErrorNumber := error.
+	^ self readError:error
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
@@ -3639,14 +3639,14 @@
     STObject handle = self.instVarAt(I_handle);
 
     if (handle != STObject.Nil) {
-        STObject next;
-
-        next = handle.nextByte();
-        if (next != STObject.EOF) {
-            self.instVarAt_put(I_position, STObject.Nil);
-            return __c__._RETURN( next );
-        }
-        self.instVarAt_put(I_hitEOF, STObject.True);
+	STObject next;
+
+	next = handle.nextByte();
+	if (next != STObject.EOF) {
+	    self.instVarAt_put(I_position, STObject.Nil);
+	    return __c__._RETURN( next );
+	}
+	self.instVarAt_put(I_hitEOF, STObject.True);
     }
 #else
     FILEPOINTER f;
@@ -3660,41 +3660,41 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-         && (__INST(mode) != @symbol(writeonly))) {
-            f = __FILEVal(fp);
-
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTE__(ret, f, &byte, _buffered, __INST(handleType));
-            if (ret > 0) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 1;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                RETURN (__mkSmallInteger(byte));
-            }
-
-            if (ret == 0) {
-                __INST(hitEOF) = true;
-            } else /* ret < 0 */ {
-                __INST(position) = nil;
-                error = __mkSmallInteger(__threadErrno);
-            }
-        }
+	if (((fp = __INST(handle)) != nil)
+	 && (__INST(mode) != @symbol(writeonly))) {
+	    f = __FILEVal(fp);
+
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTE__(ret, f, &byte, _buffered, __INST(handleType));
+	    if (ret > 0) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 1;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		RETURN (__mkSmallInteger(byte));
+	    }
+
+	    if (ret == 0) {
+		__INST(hitEOF) = true;
+	    } else /* ret < 0 */ {
+		__INST(position) = nil;
+		error = __mkSmallInteger(__threadErrno);
+	    }
+	}
     }
 #endif /* not SCHTEAM */
 %}.
     hitEOF ifTrue:[^ self pastEndRead].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error
+	lastErrorNumber := error.
+	^ self readError:error
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     ^ self errorWriteOnly
@@ -3739,98 +3739,98 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-            && __bothSmallInteger(count, start)
-        ) {
-            f = __FILEVal(fp);
-
-            cnt = __intVal(count);
-            offs = __intVal(start) - 1;
-
-            if (__isExternalBytesLike(anObject)) {
-                OBJ sz;
-
-                nInstBytes = 0;
-                extPtr = (char *)(__externalBytesAddress(anObject));
-                if (extPtr == NULL) goto bad;
-                sz = __externalBytesSize(anObject);
-                if (__isSmallInteger(sz)) {
-                    objSize = __intVal(sz);
-                } else {
-                    objSize = 0; /* unknown */
-                }
-            } else {
-                OBJ oClass = __Class(anObject);
-                int nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
-
-                nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
-                switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
-                    case BYTEARRAY:
-                    case WORDARRAY:
-                    case LONGARRAY:
-                    case SWORDARRAY:
-                    case SLONGARRAY:
-                    case FLOATARRAY:
-                        break;
-                    case DOUBLEARRAY:
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	    && __bothSmallInteger(count, start)
+	) {
+	    f = __FILEVal(fp);
+
+	    cnt = __intVal(count);
+	    offs = __intVal(start) - 1;
+
+	    if (__isExternalBytesLike(anObject)) {
+		OBJ sz;
+
+		nInstBytes = 0;
+		extPtr = (char *)(__externalBytesAddress(anObject));
+		if (extPtr == NULL) goto bad;
+		sz = __externalBytesSize(anObject);
+		if (__isSmallInteger(sz)) {
+		    objSize = __intVal(sz);
+		} else {
+		    objSize = 0; /* unknown */
+		}
+	    } else {
+		OBJ oClass = __Class(anObject);
+		int nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
+
+		nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
+		    case BYTEARRAY:
+		    case WORDARRAY:
+		    case LONGARRAY:
+		    case SWORDARRAY:
+		    case SLONGARRAY:
+		    case FLOATARRAY:
+			break;
+		    case DOUBLEARRAY:
 #ifdef __NEED_DOUBLE_ALIGN
-                        nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
+			nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
 #endif
-                        break;
-                    case LONGLONGARRAY:
-                    case SLONGLONGARRAY:
+			break;
+		    case LONGLONGARRAY:
+		    case SLONGLONGARRAY:
 #ifdef __NEED_LONGLONG_ALIGN
-                        nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
+			nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
 #endif
-                        break;
-                    default:
-                        goto bad;
-                }
-                extPtr = (char *)0;
-                objSize = __Size(anObject) - nInstBytes;
-            }
-            if ((offs >= 0) && (cnt >= 0) && (objSize >= (cnt + offs))) {
-                _buffered = (__INST(buffered) == true);
-                if (_buffered) {
-                    __READING__(f);
-                }
-
-                if (extPtr) {
-                    __READBYTES__(ret, f, extPtr+offs, cnt, _buffered, __INST(handleType));
-                } else {
-                    /*
-                     * on interrupt, anObject may be moved to another location.
-                     * So we pass anObject, and the offset to the __READBYTES_OBJ__ macro.
-                     */
-                    offs += nInstBytes;
-                    __READBYTES_OBJ__(ret, f, anObject, offs, cnt, _buffered, __INST(handleType));
-                }
-
-                if (ret > 0) {
-                    if (__isSmallInteger(__INST(position))) {
-                        INT np = __intVal(__INST(position)) + ret;
-                        OBJ t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                    } else {
-                        __INST(position) = nil; /* i.e. do not know */
-                    }
-                    RETURN (__mkSmallInteger(ret));
-                }
-                if (ret == 0) {
-                    __INST(hitEOF) = true;
-                } else /* ret < 0 */ {
-                    __INST(position) = nil;
-                    error = __mkSmallInteger(__threadErrno);
-                }
-            }
-        }
+			break;
+		    default:
+			goto bad;
+		}
+		extPtr = (char *)0;
+		objSize = __Size(anObject) - nInstBytes;
+	    }
+	    if ((offs >= 0) && (cnt >= 0) && (objSize >= (cnt + offs))) {
+		_buffered = (__INST(buffered) == true);
+		if (_buffered) {
+		    __READING__(f);
+		}
+
+		if (extPtr) {
+		    __READBYTES__(ret, f, extPtr+offs, cnt, _buffered, __INST(handleType));
+		} else {
+		    /*
+		     * on interrupt, anObject may be moved to another location.
+		     * So we pass anObject, and the offset to the __READBYTES_OBJ__ macro.
+		     */
+		    offs += nInstBytes;
+		    __READBYTES_OBJ__(ret, f, anObject, offs, cnt, _buffered, __INST(handleType));
+		}
+
+		if (ret > 0) {
+		    if (__isSmallInteger(__INST(position))) {
+			INT np = __intVal(__INST(position)) + ret;
+			OBJ t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		    } else {
+			__INST(position) = nil; /* i.e. do not know */
+		    }
+		    RETURN (__mkSmallInteger(ret));
+		}
+		if (ret == 0) {
+		    __INST(hitEOF) = true;
+		} else /* ret < 0 */ {
+		    __INST(position) = nil;
+		    error = __mkSmallInteger(__threadErrno);
+		}
+	    }
+	}
     }
 bad: ;
 %}.
     (hitEOF and:[self pastEndRead isNil]) ifTrue:[^ 0].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error
+	lastErrorNumber := error.
+	^ self readError:error
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
@@ -3840,15 +3840,83 @@
     ^ self primitiveFailed
 !
 
-nextLong
-    "Read four bytes (msb-first) and return the value as a 32-bit signed Integer.
-     The returned value may be a LargeInteger.
-     (msb-first for compatibility with other smalltalks)"
-
-    ^ self nextUnsignedLongMSB:true
+nextInt16MSB:msbFlag
+    "Read two bytes and return the value as a 16-bit signed Integer.
+     If msbFlag is true, value is read with most-significant byte first,
+     otherwise least-significant byte comes first.
+     A nil is returned if EOF is reached (also when EOF is hit after the first byte).
+     Works in both binary and text modes."
+
+    |error|
+%{
+    OBJ fp;
+
+    __INST(lastErrorNumber) = nil;
+    if ((__INST(handleType) == nil)
+     || (__INST(handleType) == @symbol(filePointer))
+     || (__INST(handleType) == @symbol(socketFilePointer))
+     || (__INST(handleType) == @symbol(socketHandle))
+     || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    FILEPOINTER f;
+	    int ret, _buffered;
+	    short value;
+	    union {
+		unsigned char buffer[2];
+		short shortVal;
+	    } u;
+
+	    f = __FILEVal(fp);
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTES__(ret, f, u.buffer, 2, _buffered, __INST(handleType));
+
+	    if (ret == 2) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 2;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		if (msbFlag == true) {
+#if defined(__MSBFIRST__)
+		    value = u.shortVal;
+#else
+		    value = ((u.buffer[0] & 0xFF) << 8) | (u.buffer[1] & 0xFF);
+#endif
+		} else {
+#if defined(__LSBFIRST__)
+		    value = u.shortVal;
+#else
+		    value = ((u.buffer[1] & 0xFF) << 8) | (u.buffer[0] & 0xFF);
+#endif
+		}
+		RETURN (__mkSmallInteger(value));
+	    }
+
+	    if (ret < 0) {
+		__INST(position) = nil; /* i.e. do not know */
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
+    }
+%}.
+    hitEOF ifTrue:[^ self pastEndRead].
+    handle isNil ifTrue:[^ self errorNotOpen].
+    (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
+    lastErrorNumber := error.
+    ^ self readError:error.
 !
 
-nextLongMSB:msbFlag
+nextInt32MSB:msbFlag
     "Read four bytes and return the value as a 32-bit signed Integer,
      which may be a LargeInteger.
      If msbFlag is true, value is read with most-significant byte first,
@@ -3866,69 +3934,69 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            FILEPOINTER f;
-            int ret, _buffered;
-            int value;
-            union {
-                unsigned char buffer[4];
-                int intVal;
-            } u;
-
-            f = __FILEVal(fp);
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTES__(ret, f, u.buffer, 4, _buffered, __INST(handleType));
-
-            if (ret == 4) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 4;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                if (msbFlag == true) {
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    FILEPOINTER f;
+	    int ret, _buffered;
+	    int value;
+	    union {
+		unsigned char buffer[4];
+		int intVal;
+	    } u;
+
+	    f = __FILEVal(fp);
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTES__(ret, f, u.buffer, 4, _buffered, __INST(handleType));
+
+	    if (ret == 4) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 4;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		if (msbFlag == true) {
 #if defined(__MSBFIRST__)
-                    value = u.intVal;
+		    value = u.intVal;
 #else
-                    value = (u.buffer[0] & 0xFF);
-                    value = (value << 8) | (u.buffer[1] & 0xFF);
-                    value = (value << 8) | (u.buffer[2] & 0xFF);
-                    value = (value << 8) | (u.buffer[3] & 0xFF);
+		    value = (u.buffer[0] & 0xFF);
+		    value = (value << 8) | (u.buffer[1] & 0xFF);
+		    value = (value << 8) | (u.buffer[2] & 0xFF);
+		    value = (value << 8) | (u.buffer[3] & 0xFF);
 #endif
-                } else {
+		} else {
 #if defined(__LSBFIRST__)
-                    value = u.intVal;
+		    value = u.intVal;
 #else
-                    value = (u.buffer[3] & 0xFF);
-                    value = (value << 8) | (u.buffer[2] & 0xFF);
-                    value = (value << 8) | (u.buffer[1] & 0xFF);
-                    value = (value << 8) | (u.buffer[0] & 0xFF);
+		    value = (u.buffer[3] & 0xFF);
+		    value = (value << 8) | (u.buffer[2] & 0xFF);
+		    value = (value << 8) | (u.buffer[1] & 0xFF);
+		    value = (value << 8) | (u.buffer[0] & 0xFF);
 #endif
-                }
+		}
 #if __POINTER_SIZE__ == 8
-                RETURN ( __mkSmallInteger(value));
+		RETURN ( __mkSmallInteger(value));
 #else
-                if ((value >= _MIN_INT) && (value <= _MAX_INT)) {
-                    RETURN ( __mkSmallInteger(value));
-                }
-                RETURN ( __MKLARGEINT(value) );
+		if ((value >= _MIN_INT) && (value <= _MAX_INT)) {
+		    RETURN ( __mkSmallInteger(value));
+		}
+		RETURN ( __MKLARGEINT(value) );
 #endif
-            }
-
-            if (ret < 0) {
-                __INST(position) = nil;
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
+	    }
+
+	    if (ret < 0) {
+		__INST(position) = nil;
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
     }
 %}.
     hitEOF ifTrue:[^ self pastEndRead].
@@ -3938,8 +4006,8 @@
     ^ self readError:error.
 !
 
-nextShortMSB:msbFlag
-    "Read two bytes and return the value as a 16-bit signed Integer.
+nextUnsignedInt16MSB:msbFlag
+    "Read two bytes and return the value as a 16-bit unsigned Integer.
      If msbFlag is true, value is read with most-significant byte first,
      otherwise least-significant byte comes first.
      A nil is returned if EOF is reached (also when EOF is hit after the first byte).
@@ -3955,56 +4023,56 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            FILEPOINTER f;
-            int ret, _buffered;
-            short value;
-            union {
-                unsigned char buffer[2];
-                short shortVal;
-            } u;
-
-            f = __FILEVal(fp);
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTES__(ret, f, u.buffer, 2, _buffered, __INST(handleType));
-
-            if (ret == 2) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 2;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                if (msbFlag == true) {
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    FILEPOINTER f;
+	    int ret, _buffered;
+	    unsigned int value;
+	    union {
+		unsigned char buffer[2];
+		unsigned short shortVal;
+	    } u;
+
+	    f = __FILEVal(fp);
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTES__(ret, f, u.buffer, 2, _buffered, __INST(handleType));
+
+	    if (ret == 2) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 2;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		if (msbFlag == true) {
 #if defined(__MSBFIRST__)
-                    value = u.shortVal;
+		    value = u.shortVal;
 #else
-                    value = ((u.buffer[0] & 0xFF) << 8) | (u.buffer[1] & 0xFF);
+		    value = (u.buffer[0] << 8) | u.buffer[1];
 #endif
-                } else {
+		} else {
 #if defined(__LSBFIRST__)
-                    value = u.shortVal;
+		    value = u.shortVal;
 #else
-                    value = ((u.buffer[1] & 0xFF) << 8) | (u.buffer[0] & 0xFF);
+		    value = (u.buffer[1] << 8) | u.buffer[0];
 #endif
-                }
-                RETURN (__mkSmallInteger(value));
-            }
-
-            if (ret < 0) {
-                __INST(position) = nil; /* i.e. do not know */
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
+		}
+		RETURN (__mkSmallInteger(value));
+	    }
+
+	    if (ret < 0) {
+		__INST(position) = nil; /* i.e. do not know */
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
     }
 %}.
     hitEOF ifTrue:[^ self pastEndRead].
@@ -4014,7 +4082,7 @@
     ^ self readError:error.
 !
 
-nextUnsignedLongMSB:msbFlag
+nextUnsignedInt32MSB:msbFlag
     "Read four bytes and return the value as a 32-bit unsigned Integer, which may be
      a LargeInteger.
      If msbFlag is true, value is read with most-significant byte first, otherwise
@@ -4032,146 +4100,70 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            FILEPOINTER f;
-            int ret, _buffered;
-            unsigned INT value;
-            union {
-                unsigned char buffer[4];
-                unsigned int intVal;
-            } u;
-
-            f = __FILEVal(fp);
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTES__(ret, f, u.buffer, 4, _buffered, __INST(handleType));
-
-            if (ret == 4) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 4;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                if (msbFlag == true) {
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    FILEPOINTER f;
+	    int ret, _buffered;
+	    unsigned INT value;
+	    union {
+		unsigned char buffer[4];
+		unsigned int intVal;
+	    } u;
+
+	    f = __FILEVal(fp);
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTES__(ret, f, u.buffer, 4, _buffered, __INST(handleType));
+
+	    if (ret == 4) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 4;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		if (msbFlag == true) {
 #if defined(__MSBFIRST__)
-                    value = u.intVal;
-#else
-                    value = u.buffer[0];
-                    value = (value << 8) | u.buffer[1];
-                    value = (value << 8) | u.buffer[2];
-                    value = (value << 8) | u.buffer[3];
-#endif
-                } else {
-#if defined(__LSBFIRST__)
-                    value = u.intVal;
+		    value = u.intVal;
 #else
-                    value = u.buffer[3];
-                    value = (value << 8) | u.buffer[2];
-                    value = (value << 8) | u.buffer[1];
-                    value = (value << 8) | u.buffer[0];
-#endif
-                }
-#if __POINTER_SIZE__ == 8
-                value &= 0xFFFFFFFF;
-                RETURN (__mkSmallInteger(value));
-#else
-                if (value <= _MAX_INT) {
-                    RETURN (__mkSmallInteger(value));
-                }
-                RETURN (__MKULARGEINT(value) );
+		    value = u.buffer[0];
+		    value = (value << 8) | u.buffer[1];
+		    value = (value << 8) | u.buffer[2];
+		    value = (value << 8) | u.buffer[3];
 #endif
-            }
-
-            if (ret < 0) {
-                __INST(position) = nil; /* i.e. do not know */
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
-    }
-%}.
-    hitEOF ifTrue:[^ self pastEndRead].
-    handle isNil ifTrue:[^ self errorNotOpen].
-    (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
-    lastErrorNumber := error.
-    ^ self readError:error.
-!
-
-nextUnsignedShortMSB:msbFlag
-    "Read two bytes and return the value as a 16-bit unsigned Integer.
-     If msbFlag is true, value is read with most-significant byte first,
-     otherwise least-significant byte comes first.
-     A nil is returned if EOF is reached (also when EOF is hit after the first byte).
-     Works in both binary and text modes."
-
-    |error|
-%{
-    OBJ fp;
-
-    __INST(lastErrorNumber) = nil;
-    if ((__INST(handleType) == nil)
-     || (__INST(handleType) == @symbol(filePointer))
-     || (__INST(handleType) == @symbol(socketFilePointer))
-     || (__INST(handleType) == @symbol(socketHandle))
-     || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            FILEPOINTER f;
-            int ret, _buffered;
-            unsigned int value;
-            union {
-                unsigned char buffer[2];
-                unsigned short shortVal;
-            } u;
-
-            f = __FILEVal(fp);
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTES__(ret, f, u.buffer, 2, _buffered, __INST(handleType));
-
-            if (ret == 2) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 2;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                if (msbFlag == true) {
-#if defined(__MSBFIRST__)
-                    value = u.shortVal;
+		} else {
+#if defined(__LSBFIRST__)
+		    value = u.intVal;
+#else
+		    value = u.buffer[3];
+		    value = (value << 8) | u.buffer[2];
+		    value = (value << 8) | u.buffer[1];
+		    value = (value << 8) | u.buffer[0];
+#endif
+		}
+#if __POINTER_SIZE__ == 8
+		value &= 0xFFFFFFFF;
+		RETURN (__mkSmallInteger(value));
 #else
-                    value = (u.buffer[0] << 8) | u.buffer[1];
-#endif
-                } else {
-#if defined(__LSBFIRST__)
-                    value = u.shortVal;
-#else
-                    value = (u.buffer[1] << 8) | u.buffer[0];
+		if (value <= _MAX_INT) {
+		    RETURN (__mkSmallInteger(value));
+		}
+		RETURN (__MKULARGEINT(value) );
 #endif
-                }
-                RETURN (__mkSmallInteger(value));
-            }
-
-            if (ret < 0) {
-                __INST(position) = nil; /* i.e. do not know */
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
+	    }
+
+	    if (ret < 0) {
+		__INST(position) = nil; /* i.e. do not know */
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
     }
 %}.
     hitEOF ifTrue:[^ self pastEndRead].
@@ -4184,15 +4176,15 @@
 nextWord
     <resource: #obsolete>
     "in text-mode:
-         read the alphaNumeric next word (i.e. up to non letter-or-digit).
-         return a string containing those characters.
+	 read the alphaNumeric next word (i.e. up to non letter-or-digit).
+	 return a string containing those characters.
      in binary-mode:
-         read two bytes (msb-first) and return the value as a 16-bit
-         unsigned Integer (for compatibility with other smalltalks)"
+	 read two bytes (msb-first) and return the value as a 16-bit
+	 unsigned Integer (for compatibility with other smalltalks)"
 
     binary ifTrue:[
-        self obsoleteMethodWarning:'use #nextUnsignedShortMSB:true'.
-        ^ self nextUnsignedShortMSB:true
+	self obsoleteMethodWarning:'use #nextUnsignedShortMSB:true'.
+	^ self nextUnsignedShortMSB:true
     ].
     self obsoleteMethodWarning:'use #nextAlphaNumericWord'.
     ^ self nextAlphaNumericWord
@@ -4215,43 +4207,43 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-         && (__INST(mode) != @symbol(readonly))
-         && __isSmallInteger(aByteValue)
-
-        ) {
-            int _buffered = (__INST(buffered) == true);
-            FILEPOINTER f = __FILEVal(fp);
-            char c = __intVal(aByteValue);
-            int cnt;
-
-            if (_buffered) {
-                __WRITING__(f)
-            }
+	if (((fp = __INST(handle)) != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	 && __isSmallInteger(aByteValue)
+
+	) {
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    char c = __intVal(aByteValue);
+	    int cnt;
+
+	    if (_buffered) {
+		__WRITING__(f)
+	    }
 #if defined(WIN32) && !defined(__MINGW__)
-            if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                cnt = __win32_fwrite(&c, 1, 1, f);
-            } else
+	    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+		cnt = __win32_fwrite(&c, 1, 1, f);
+	    } else
 #endif
-            {
-                __WRITEBYTE__(cnt, f, &c, _buffered, __INST(handleType));
-            }
-            if (cnt == 1) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 1;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                RETURN (self);
-            }
-            if (cnt < 0) {
-                __INST(position) = nil; /* i.e. do not know */
-            }
-            error = __mkSmallInteger(__threadErrno);
-        }
+	    {
+		__WRITEBYTE__(cnt, f, &c, _buffered, __INST(handleType));
+	    }
+	    if (cnt == 1) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 1;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		RETURN (self);
+	    }
+	    if (cnt < 0) {
+		__INST(position) = nil; /* i.e. do not know */
+	    }
+	    error = __mkSmallInteger(__threadErrno);
+	}
     }
 %}.
     handle isNil ifTrue:[self errorNotOpen. ^ self].
@@ -4260,7 +4252,90 @@
     self writeError:error.
 !
 
-nextPutLong:aNumber MSB:msbFlag
+nextPutInt16:anIntegerOrCharacter MSB:msbFlag
+    "Write the argument, anIntegerOrCharacter as a short (two bytes). If msbFlag is
+     true, data is written most-significant byte first; otherwise least
+     first.
+     Works in both binary and text modes."
+
+    |error|
+%{
+    int num;
+    union {
+	char bytes[2];
+	short shortVal;
+    } u;
+    OBJ fp;
+
+    __INST(lastErrorNumber) = nil;
+    if ((__INST(handleType) == nil)
+     || (__INST(handleType) == @symbol(filePointer))
+     || (__INST(handleType) == @symbol(socketFilePointer))
+     || (__INST(handleType) == @symbol(socketHandle))
+     || (__INST(handleType) == @symbol(pipeFilePointer))) {
+	if (((fp = __INST(handle)) != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	) {
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+	    int cnt;
+
+	    if (__isSmallInteger(anIntegerOrCharacter)) {
+		num = __intVal(anIntegerOrCharacter);
+	    } else if (__isCharacter(anIntegerOrCharacter)) {
+		num = __smallIntegerVal(__characterVal(anIntegerOrCharacter));
+	    } else
+		goto out;
+
+	    if (msbFlag == true) {
+#if defined(__MSBFIRST__)
+		u.shortVal = num;
+#else
+		u.bytes[0] = (num >> 8) & 0xFF;
+		u.bytes[1] = num & 0xFF;
+#endif
+	    } else {
+#if defined(__LSBFIRST__)
+		u.shortVal = num;
+#else
+		u.bytes[1] = (num >> 8) & 0xFF;
+		u.bytes[0] = num & 0xFF;
+#endif
+	    }
+
+	    if (_buffered) {
+		__WRITING__(f)
+	    }
+	    __WRITEBYTES__(cnt, f, u.bytes, 2, _buffered, __INST(handleType));
+
+	    if (cnt == 2) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 2;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		RETURN ( self );
+	    }
+	    __INST(position) = nil; /* i.e. do not know */
+	    error = __mkSmallInteger(__threadErrno);
+	}
+    }
+out:;
+%}.
+    error notNil ifTrue:[
+	lastErrorNumber := error.
+	self writeError:error.
+	^ self
+    ].
+    handle isNil ifTrue:[self errorNotOpen. ^ self].
+    (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
+    self argumentMustBeInteger
+!
+
+nextPutInt32:aNumber MSB:msbFlag
     "Write the argument, aNumber as a long (four bytes). If msbFlag is
      true, data is written most-significant byte first; otherwise least
      first.
@@ -4271,29 +4346,29 @@
 %{
     int num;
     union {
-        char bytes[4];
-        int intVal;
+	char bytes[4];
+	int intVal;
     } u;
     OBJ fp;
 
     __INST(lastErrorNumber) = nil;
     if (__isSmallInteger(aNumber)) {
-        num = __intVal(aNumber);
+	num = __intVal(aNumber);
     } else {
 #if __POINTER_SIZE__ == 8
-        // always more than 4-bytes
-        goto badArg;
+	// always more than 4-bytes
+	goto badArg;
 #else
-        num = __longIntVal(aNumber);
-        if (num == 0) {
-            num = __signedLongIntVal(aNumber);
-            if (num == 0) {
-                /* bad arg or out-of-range integer
-                 * (handled by the fallBack code)
-                 */
-                goto badArg;
-            }
-        }
+	num = __longIntVal(aNumber);
+	if (num == 0) {
+	    num = __signedLongIntVal(aNumber);
+	    if (num == 0) {
+		/* bad arg or out-of-range integer
+		 * (handled by the fallBack code)
+		 */
+		goto badArg;
+	    }
+	}
 #endif
     }
 
@@ -4302,150 +4377,67 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-         && (__INST(mode) != @symbol(readonly))
-        ) {
-            int _buffered = (__INST(buffered) == true);
-            FILEPOINTER f = __FILEVal(fp);
-            int cnt;
-
-            if (msbFlag == true) {
+	if (((fp = __INST(handle)) != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	) {
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    int cnt;
+
+	    if (msbFlag == true) {
 #if defined(__MSBFIRST__)
-                u.intVal = num;
+		u.intVal = num;
 #else
-                u.bytes[0] = (num >> 24) & 0xFF;
-                u.bytes[1] = (num >> 16) & 0xFF;
-                u.bytes[2] = (num >> 8) & 0xFF;
-                u.bytes[3] = num & 0xFF;
+		u.bytes[0] = (num >> 24) & 0xFF;
+		u.bytes[1] = (num >> 16) & 0xFF;
+		u.bytes[2] = (num >> 8) & 0xFF;
+		u.bytes[3] = num & 0xFF;
 #endif
-            } else {
+	    } else {
 #if defined(__LSBFIRST__)
-                u.intVal = num;
+		u.intVal = num;
 #else
-                u.bytes[3] = (num >> 24) & 0xFF;
-                u.bytes[2] = (num >> 16) & 0xFF;
-                u.bytes[1] = (num >> 8) & 0xFF;
-                u.bytes[0] = num & 0xFF;
+		u.bytes[3] = (num >> 24) & 0xFF;
+		u.bytes[2] = (num >> 16) & 0xFF;
+		u.bytes[1] = (num >> 8) & 0xFF;
+		u.bytes[0] = num & 0xFF;
 #endif
-            }
-
-            if (_buffered) {
-                __WRITING__(f)
-            }
-            __WRITEBYTES__(cnt, f, u.bytes, 4, _buffered, __INST(handleType));
-
-            if (cnt == 4) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 4;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                RETURN ( self );
-            }
-            __INST(position) = nil; /* i.e. do not know */
-            error = __mkSmallInteger(__threadErrno);
-        }
+	    }
+
+	    if (_buffered) {
+		__WRITING__(f)
+	    }
+	    __WRITEBYTES__(cnt, f, u.bytes, 4, _buffered, __INST(handleType));
+
+	    if (cnt == 4) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + 4;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		RETURN ( self );
+	    }
+	    __INST(position) = nil; /* i.e. do not know */
+	    error = __mkSmallInteger(__threadErrno);
+	}
     }
 badArg: ;
 %}.
     handle isNil ifTrue:[self errorNotOpen. ^ self].
     (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ self
+	lastErrorNumber := error.
+	self writeError:error.
+	^ self
     ].
 
     aNumber isInteger ifTrue:[
-        ^ super nextPutLong:aNumber MSB:msbFlag
+	^ super nextPutLong:aNumber MSB:msbFlag
     ].
     self argumentMustBeInteger
-!
-
-nextPutShort:anIntegerOrCharacter MSB:msbFlag
-    "Write the argument, anIntegerOrCharacter as a short (two bytes). If msbFlag is
-     true, data is written most-significant byte first; otherwise least
-     first.
-     Works in both binary and text modes."
-
-    |error|
-%{
-    int num;
-    union {
-        char bytes[2];
-        short shortVal;
-    } u;
-    OBJ fp;
-
-    __INST(lastErrorNumber) = nil;
-    if ((__INST(handleType) == nil)
-     || (__INST(handleType) == @symbol(filePointer))
-     || (__INST(handleType) == @symbol(socketFilePointer))
-     || (__INST(handleType) == @symbol(socketHandle))
-     || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-         && (__INST(mode) != @symbol(readonly))
-        ) {
-            FILEPOINTER f = __FILEVal(fp);
-            int _buffered = (__INST(buffered) == true);
-            int cnt;
-
-            if (__isSmallInteger(anIntegerOrCharacter)) {
-                num = __intVal(anIntegerOrCharacter);
-            } else if (__isCharacter(anIntegerOrCharacter)) {
-                num = __smallIntegerVal(__characterVal(anIntegerOrCharacter));
-            } else
-                goto out;
-
-            if (msbFlag == true) {
-#if defined(__MSBFIRST__)
-                u.shortVal = num;
-#else
-                u.bytes[0] = (num >> 8) & 0xFF;
-                u.bytes[1] = num & 0xFF;
-#endif
-            } else {
-#if defined(__LSBFIRST__)
-                u.shortVal = num;
-#else
-                u.bytes[1] = (num >> 8) & 0xFF;
-                u.bytes[0] = num & 0xFF;
-#endif
-            }
-
-            if (_buffered) {
-                __WRITING__(f)
-            }
-            __WRITEBYTES__(cnt, f, u.bytes, 2, _buffered, __INST(handleType));
-
-            if (cnt == 2) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + 2;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                RETURN ( self );
-            }
-            __INST(position) = nil; /* i.e. do not know */
-            error = __mkSmallInteger(__threadErrno);
-        }
-    }
-out:;
-%}.
-    error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ self
-    ].
-    handle isNil ifTrue:[self errorNotOpen. ^ self].
-    (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
-    self argumentMustBeInteger
 ! !
 
 !ExternalStream methodsFor:'positioning'!
@@ -4462,8 +4454,8 @@
 
 printOn:aStream
     aStream
-        nextPutAll:self className;
-        nextPutAll:'(handle:('.
+	nextPutAll:self className;
+	nextPutAll:'(handle:('.
     handle printOn:aStream.
     aStream nextPutAll:'))'
 ! !
@@ -4488,74 +4480,74 @@
     int rslt;
 
     if (fp == nil) {
-        error = @symbol(errorNotOpen);
-        goto out;
+	error = @symbol(errorNotOpen);
+	goto out;
     }
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-        SOCKET sock = __FILEVal(fp);
-
-        if (@global(FileOpenTrace) == true) {
-            fprintf(stderr, "close socket [ExternalStream] %"_lx_"\n", (INT)sock);
-        }
-
-        // whether the close() will be successful or not - the handle is invalid now!
-        __INST(handle) = nil;
-        do {
+	SOCKET sock = __FILEVal(fp);
+
+	if (@global(FileOpenTrace) == true) {
+	    fprintf(stderr, "close socket [ExternalStream] %"_lx_"\n", (INT)sock);
+	}
+
+	// whether the close() will be successful or not - the handle is invalid now!
+	__INST(handle) = nil;
+	do {
 #ifdef WIN32
-            rslt = __STX_WSA_NOINT_CALL1("closesocket", closesocket, sock);
+	    rslt = __STX_WSA_NOINT_CALL1("closesocket", closesocket, sock);
 #else
-            rslt = close(sock);
+	    rslt = close(sock);
 #endif
-        } while((rslt < 0) && (__threadErrno == EINTR));
+	} while((rslt < 0) && (__threadErrno == EINTR));
     } else if ((__INST(handleType) == nil)
-               || (__INST(handleType) == @symbol(filePointer))
-               || (__INST(handleType) == @symbol(socketFilePointer))
-               || (__INST(handleType) == @symbol(pipeFilePointer)))
+	       || (__INST(handleType) == @symbol(filePointer))
+	       || (__INST(handleType) == @symbol(socketFilePointer))
+	       || (__INST(handleType) == @symbol(pipeFilePointer)))
     {
-        FILEPOINTER f = __FILEVal(fp);
-
-        if (@global(FileOpenTrace) == true) {
-            fprintf(stderr, "fclose [ExternalStream] %"_lx_"\n", (INT)f);
-        }
-        // whether the close() will be successful or not - the handle is invalid now!
-        __INST(handle) = nil;
+	FILEPOINTER f = __FILEVal(fp);
+
+	if (@global(FileOpenTrace) == true) {
+	    fprintf(stderr, "fclose [ExternalStream] %"_lx_"\n", (INT)f);
+	}
+	// whether the close() will be successful or not - the handle is invalid now!
+	__INST(handle) = nil;
 
 #ifdef WIN32
-        if (__INST(mode) != @symbol(readonly) && __INST(buffered) != false) {
-            // do a fflush() first, so that fclose() doesn't block
-            // we suspect, that EINTR causes problems in fclose()
-            do {
-                __threadErrno = 0;
-                rslt = __STX_C_CALL1("fflush", fflush, f);
-            } while((rslt < 0) && (__threadErrno == EINTR));
-        }
-        do {
-            __threadErrno = 0;
-            rslt = __STX_C_NOINT_CALL1("fclose", fclose, f);
-        } while((rslt < 0) && (__threadErrno == EINTR));
+	if (__INST(mode) != @symbol(readonly) && __INST(buffered) != false) {
+	    // do a fflush() first, so that fclose() doesn't block
+	    // we suspect, that EINTR causes problems in fclose()
+	    do {
+		__threadErrno = 0;
+		rslt = __STX_C_CALL1("fflush", fflush, f);
+	    } while((rslt < 0) && (__threadErrno == EINTR));
+	}
+	do {
+	    __threadErrno = 0;
+	    rslt = __STX_C_NOINT_CALL1("fclose", fclose, f);
+	} while((rslt < 0) && (__threadErrno == EINTR));
 #else
-        // cg: the pre Nov2014 code always did the fclose interruptable;
-        // I am not sure, if fclose is actually prepared to do this;
-        // at least when only reading, this should not block, and we
-        // should be ableto do it without being interruptable.
-        // Must watch this - if it leads to blockings, change and think about it.
-        if (__INST(mode) != @symbol(readonly)) {
-            __BEGIN_INTERRUPTABLE__
-            rslt = fclose(f);
-            __END_INTERRUPTABLE__
-        } else {
-            rslt = fclose(f);
-        }
+	// cg: the pre Nov2014 code always did the fclose interruptable;
+	// I am not sure, if fclose is actually prepared to do this;
+	// at least when only reading, this should not block, and we
+	// should be ableto do it without being interruptable.
+	// Must watch this - if it leads to blockings, change and think about it.
+	if (__INST(mode) != @symbol(readonly)) {
+	    __BEGIN_INTERRUPTABLE__
+	    rslt = fclose(f);
+	    __END_INTERRUPTABLE__
+	} else {
+	    rslt = fclose(f);
+	}
 #endif
     } else {
-        error = @symbol(badHandleType);
-        goto out;
+	error = @symbol(badHandleType);
+	goto out;
     }
 
     if (rslt < 0) {
-        error = __mkSmallInteger(__threadErrno);
-        goto out;
+	error = __mkSmallInteger(__threadErrno);
+	goto out;
     }
     RETURN (self);
 
@@ -4563,28 +4555,28 @@
 %}.
 
     error notNil ifTrue:[
-        error == #errorNotOpen ifTrue:[
-            self errorNotOpen.
-        ].
-        error isInteger ifTrue:[
-            lastErrorNumber := error.
-            mode == #readonly ifTrue:[
-                self ioError:error.
-            ] ifFalse:[
-                self writeError:error.
-            ].
-            ^ self.
-        ].
-        self primitiveFailed:error.
-        ^ self.
+	error == #errorNotOpen ifTrue:[
+	    self errorNotOpen.
+	].
+	error isInteger ifTrue:[
+	    lastErrorNumber := error.
+	    mode == #readonly ifTrue:[
+		self ioError:error.
+	    ] ifFalse:[
+		self writeError:error.
+	    ].
+	    ^ self.
+	].
+	self primitiveFailed:error.
+	^ self.
     ].
 
     "/ fallback for rel5
 
     fp := handle.
     fp notNil ifTrue:[
-        handle := nil.
-        self closeFile:fp
+	handle := nil.
+	self closeFile:fp
     ]
 ! !
 
@@ -4617,59 +4609,59 @@
 
     if (__isStringLike(openmode)) {
 #ifdef WIN32
-        __stxWrapApiEnterCritical();
+	__stxWrapApiEnterCritical();
 #endif
-        if (__isSmallInteger(aFileDescriptor)) {
-            fd = __intVal(aFileDescriptor);
-        }
+	if (__isSmallInteger(aFileDescriptor)) {
+	    fd = __intVal(aFileDescriptor);
+	}
 #ifdef WIN32
-        else if (__isExternalAddressLike(aFileDescriptor)) {
-            fd = _open_osfhandle((long)__externalAddressVal(aFileDescriptor), O_BINARY);
-            if (fd < 0) {
-                if (__threadErrno == 0) {
-                    // no more file descriptors
-                    __threadErrno = EMFILE;
-                }
-                error = __mkSmallInteger(__threadErrno);
-                __stxWrapApiLeaveCritical();
-                goto out;
-            }
-        }
+	else if (__isExternalAddressLike(aFileDescriptor)) {
+	    fd = _open_osfhandle((long)__externalAddressVal(aFileDescriptor), O_BINARY);
+	    if (fd < 0) {
+		if (__threadErrno == 0) {
+		    // no more file descriptors
+		    __threadErrno = EMFILE;
+		}
+		error = __mkSmallInteger(__threadErrno);
+		__stxWrapApiLeaveCritical();
+		goto out;
+	    }
+	}
 #endif
-        f = (FILEPOINTER) fdopen(fd, (char *)__stringVal(openmode));
+	f = (FILEPOINTER) fdopen(fd, (char *)__stringVal(openmode));
 #ifdef WIN32
-        __stxWrapApiLeaveCritical();
+	__stxWrapApiLeaveCritical();
 #endif
-        if (f == NULL) {
-            error =__mkSmallInteger(__threadErrno);
-        } else {
-            if (@global(FileOpenTrace) == true) {
-                fprintf(stderr, "fdopen [ExternalStream] %"_ld_" (%"_lx_") -> %"_lx_"\n", (INT)fd, (INT)fd, (INT)f);
-            }
-
-            fp = __MKFILEPOINTER(f); __INST(handle) = fp; __STORE(self, fp);
-            retVal = self;
-        }
+	if (f == NULL) {
+	    error =__mkSmallInteger(__threadErrno);
+	} else {
+	    if (@global(FileOpenTrace) == true) {
+		fprintf(stderr, "fdopen [ExternalStream] %"_ld_" (%"_lx_") -> %"_lx_"\n", (INT)fd, (INT)fd, (INT)f);
+	    }
+
+	    fp = __MKFILEPOINTER(f); __INST(handle) = fp; __STORE(self, fp);
+	    retVal = self;
+	}
     }
 out:;
 %}.
     retVal notNil ifTrue:[
-        position := 0.
-        buffered isNil ifTrue:[
-            buffered := true.       "default is buffered"
-        ].
-        handleType := handleTypeSymbol.
-        self registerForFinalization.
-        ^ retVal
+	position := 0.
+	buffered isNil ifTrue:[
+	    buffered := true.       "default is buffered"
+	].
+	handleType := handleTypeSymbol.
+	self registerForFinalization.
+	^ retVal
     ].
     error notNil ifTrue:[
-        OperatingSystem closeFd:aFileDescriptor.
-        lastErrorNumber := error.
-        position := nil.
-        "
-         the open failed for some reason ...
-        "
-        ^ self openError:error
+	OperatingSystem closeFd:aFileDescriptor.
+	lastErrorNumber := error.
+	position := nil.
+	"
+	 the open failed for some reason ...
+	"
+	^ self openError:error
     ].
 !
 
@@ -4688,16 +4680,16 @@
     Only used internally"
 
    mode == #readonly ifTrue:[
-        ^ ReadMode
+	^ ReadMode
    ].
    mode == #writeonly ifTrue:[
-        ^ WriteMode
+	^ WriteMode
    ].
    mode == #readWrite ifTrue:[
-        ^ ReadWriteMode
+	^ ReadWriteMode
    ].
    mode == #append ifTrue:[
-        ^ AppendMode
+	^ AppendMode
    ].
    ^ ReadWriteMode
 !
@@ -4718,42 +4710,42 @@
 # if 1
        f = fopen((char *) __stringVal(aPath), (char *) __stringVal(openModeString));
 # else
-        __BEGIN_INTERRUPTABLE__
-        do {
-            f = fopen((char *) __stringVal(aPath), (char *) __stringVal(openModeString));
-        } while ((f == NULL) && (__threadErrno == EINTR));
-        __END_INTERRUPTABLE__
+	__BEGIN_INTERRUPTABLE__
+	do {
+	    f = fopen((char *) __stringVal(aPath), (char *) __stringVal(openModeString));
+	} while ((f == NULL) && (__threadErrno == EINTR));
+	__END_INTERRUPTABLE__
 # endif
 #else /* UNIX */
-        __BEGIN_INTERRUPTABLE__
-        do {
-            f = fopen((char *) __stringVal(aPath), (char *) __stringVal(openModeString));
-        } while ((f == NULL) && (__threadErrno == EINTR));
-        __END_INTERRUPTABLE__
+	__BEGIN_INTERRUPTABLE__
+	do {
+	    f = fopen((char *) __stringVal(aPath), (char *) __stringVal(openModeString));
+	} while ((f == NULL) && (__threadErrno == EINTR));
+	__END_INTERRUPTABLE__
 #endif /* UNIX */
-        if (f == NULL) {
-            error = __mkSmallInteger(__threadErrno);
-        } else {
-            if (@global(FileOpenTrace) == true) {
-                fprintf(stderr, "fopen %s [ExternalStream] -> %"_lx_"\n", __stringVal(aPath), (INT)f);
-            }
-            fp = __MKFILEPOINTER(f); __INST(handle) = fp; __STORE(self, fp);
-            __INST(handleType) = @symbol(filePointer);
-            ok = true;
-        }
+	if (f == NULL) {
+	    error = __mkSmallInteger(__threadErrno);
+	} else {
+	    if (@global(FileOpenTrace) == true) {
+		fprintf(stderr, "fopen %s [ExternalStream] -> %"_lx_"\n", __stringVal(aPath), (INT)f);
+	    }
+	    fp = __MKFILEPOINTER(f); __INST(handle) = fp; __STORE(self, fp);
+	    __INST(handleType) = @symbol(filePointer);
+	    ok = true;
+	}
     }
 %}.
     ok ifTrue:[
-        position := 0.
-        self registerForFinalization.
-        ^ self.
+	position := 0.
+	self registerForFinalization.
+	^ self.
     ].
     error notNil ifTrue:[
-        "
-         the open failed for some reason ...
-        "
-        lastErrorNumber := error.
-        self openError:error.
+	"
+	 the open failed for some reason ...
+	"
+	lastErrorNumber := error.
+	self openError:error.
     ].
     self primitiveFailed.
 !
@@ -4808,39 +4800,39 @@
     int fd;
 
     if (!__isStringLike(openMode))
-        goto err;
+	goto err;
 
 #ifdef WIN32
     __stxWrapApiEnterCritical();
     if (__isExternalAddressLike(anIntegerOrExternalAddress) ) {
-        HANDLE __fileHandle = (HANDLE)__externalAddressVal(anIntegerOrExternalAddress);
-        fd = _open_osfhandle((long)__fileHandle, O_BINARY);      /* should we handle readonly, append or text mode? */
-        if (fd < 0) {
-            __stxWrapApiLeaveCritical();
-            CloseHandle(__fileHandle);
-            goto err;
-        }
+	HANDLE __fileHandle = (HANDLE)__externalAddressVal(anIntegerOrExternalAddress);
+	fd = _open_osfhandle((long)__fileHandle, O_BINARY);      /* should we handle readonly, append or text mode? */
+	if (fd < 0) {
+	    __stxWrapApiLeaveCritical();
+	    CloseHandle(__fileHandle);
+	    goto err;
+	}
     } else
 #endif
     if (__isSmallInteger(anIntegerOrExternalAddress)) {
-        fd = __smallIntegerVal(anIntegerOrExternalAddress);
+	fd = __smallIntegerVal(anIntegerOrExternalAddress);
     } else {
 #ifdef WIN32
-        __stxWrapApiLeaveCritical();
+	__stxWrapApiLeaveCritical();
 #endif
-        goto err;
+	goto err;
     }
     f = fdopen(fd, __stringVal(openMode));
 #ifdef WIN32
     __stxWrapApiLeaveCritical();
 #endif
     if (f != NULL) {
-        if (@global(FileOpenTrace) == true) {
-            fprintf(stderr, "fdopen [ExternalStream] %d -> %"_lx_"\n", fd, (INT)f);
-        }
-        fp = __MKFILEPOINTER(f); __INST(handle) = fp; __STORE(self, fp);
-        __INST(handleType) = @symbol(filePointer);
-        RETURN (self);
+	if (@global(FileOpenTrace) == true) {
+	    fprintf(stderr, "fdopen [ExternalStream] %d -> %"_lx_"\n", fd, (INT)f);
+	}
+	fp = __MKFILEPOINTER(f); __INST(handle) = fp; __STORE(self, fp);
+	__INST(handleType) = @symbol(filePointer);
+	RETURN (self);
     }
 err:;
 %}.
@@ -4886,26 +4878,26 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            f = __FILEVal(fp);
-
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTE__(ret, f, &ch, _buffered, __INST(handleType));
-
-            if (ret > 0) {
-                RETURN(nil)
-            }
-            if (ret < 0) {
-                RETURN(__mkSmallInteger(__threadErrno));
-            } else /* ret == 0 */ {
-                RETURN(__mkSmallInteger(0)); /* EOF */
-            }
-        }
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    f = __FILEVal(fp);
+
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTE__(ret, f, &ch, _buffered, __INST(handleType));
+
+	    if (ret > 0) {
+		RETURN(nil)
+	    }
+	    if (ret < 0) {
+		RETURN(__mkSmallInteger(__threadErrno));
+	    } else /* ret == 0 */ {
+		RETURN(__mkSmallInteger(0)); /* EOF */
+	    }
+	}
     }
 %}.
 !
@@ -4925,15 +4917,15 @@
     int success = 0;
 
     if (__INST(handleType) == @symbol(socketHandle)) {
-        success = ioctlsocket((SOCKET)__externalAddressVal(fd), FIONREAD, &res) == 0;
+	success = ioctlsocket((SOCKET)__externalAddressVal(fd), FIONREAD, &res) == 0;
     } else if (__INST(handleType) == @symbol(socketFilePointer)) {
-        success = ioctlsocket((SOCKET)_get_osfhandle(__intVal(fd)), FIONREAD, &res) == 0;
+	success = ioctlsocket((SOCKET)_get_osfhandle(__intVal(fd)), FIONREAD, &res) == 0;
     } else if (__INST(handleType) == @symbol(pipeFilePointer)) {
-        success = PeekNamedPipe((HANDLE)_get_osfhandle(__intVal(fd)),0,0,0,&res,0);
+	success = PeekNamedPipe((HANDLE)_get_osfhandle(__intVal(fd)),0,0,0,&res,0);
     }
     if (success) {
-        if (__INST(readAhead) != nil) res++;
-        RETURN(__mkSmallInteger(res));
+	if (__INST(readAhead) != nil) res++;
+	RETURN(__mkSmallInteger(res));
     }
 #endif
 %}.
@@ -4958,18 +4950,18 @@
     STObject handle = self.instVarAt(I_handle);
 
     if (handle != STObject.Nil) {
-        STObject next;
-
-        if (self.instVarAt(I_binary) == STObject.True) {
-            next = handle.nextByte();
-        } else {
-            next = handle.nextChar();
-        }
-        if (next != STObject.EOF) {
-            self.instVarAt_put(I_position, STObject.Nil);
-            return __c__._RETURN( next );
-        }
-        self.instVarAt_put(I_hitEOF, STObject.True);
+	STObject next;
+
+	if (self.instVarAt(I_binary) == STObject.True) {
+	    next = handle.nextByte();
+	} else {
+	    next = handle.nextChar();
+	}
+	if (next != STObject.EOF) {
+	    self.instVarAt_put(I_position, STObject.Nil);
+	    return __c__._RETURN( next );
+	}
+	self.instVarAt_put(I_hitEOF, STObject.True);
     }
 #else
     FILEPOINTER f;
@@ -4983,65 +4975,65 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            f = __FILEVal(fp);
-
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTE__(ret, f, &ch, _buffered, __INST(handleType));
-
-            if (ret > 0) {
-                pos = __INST(position);
-                if (__isSmallInteger(pos)) {
-                    OBJ t;
-
-                    t = __MKINT(__intVal(pos) + 1); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                if (__INST(binary) == true) {
-                    RETURN ( __mkSmallInteger(ch) );
-                }
-                RETURN ( __MKCHARACTER(ch) );
-            }
-
-            __INST(position) = nil;
-            if ((ret < 0)
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    f = __FILEVal(fp);
+
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTE__(ret, f, &ch, _buffered, __INST(handleType));
+
+	    if (ret > 0) {
+		pos = __INST(position);
+		if (__isSmallInteger(pos)) {
+		    OBJ t;
+
+		    t = __MKINT(__intVal(pos) + 1); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		if (__INST(binary) == true) {
+		    RETURN ( __mkSmallInteger(ch) );
+		}
+		RETURN ( __MKCHARACTER(ch) );
+	    }
+
+	    __INST(position) = nil;
+	    if ((ret < 0)
 # ifdef ECONNRESET
-                && (__threadErrno != ECONNRESET)
+		&& (__threadErrno != ECONNRESET)
 # endif
-            ){
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
+	    ){
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
     }
 #endif /* not SCHTEAM */
 %}.
     hitEOF == true ifTrue:[^ self pastEndRead].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error
+	lastErrorNumber := error.
+	^ self readError:error
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
 
     readAhead notNil ifTrue:[
-        c := readAhead.
-        readAhead := nil.
-        ^ c.
+	c := readAhead.
+	readAhead := nil.
+	^ c.
     ].
     c := self nextByteFromFile:handle.
     c isNil ifTrue:[
-        ^ self pastEndRead.
+	^ self pastEndRead.
     ].
     binary == true ifTrue:[
-        ^ c
+	^ c
     ].
     ^ Character value:c
 !
@@ -5053,9 +5045,9 @@
     |coll nRead|
 
     binary ifTrue:[
-        coll := ByteArray uninitializedNew:count
+	coll := ByteArray uninitializedNew:count
     ] ifFalse:[
-        coll := String new:count
+	coll := String new:count
     ].
     nRead := self nextBytes:count into:coll startingAt:1.
 
@@ -5063,7 +5055,7 @@
     "/ we must raise an exception here.
 
     nRead < count ifTrue:[
-        ^ self pastEndRead
+	^ self pastEndRead
     ].
     ^ coll
 
@@ -5089,64 +5081,64 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            f = __FILEVal(fp);
-
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTE__(ret, f, &ch, _buffered, __INST(handleType));
-
-            if (ret > 0) {
-                pos = __INST(position);
-                if (__isSmallInteger(pos)) {
-                    OBJ t;
-
-                    t = __MKINT(__intVal(pos) + 1); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                if (__INST(binary) == true) {
-                    RETURN ( __mkSmallInteger(ch) );
-                }
-                RETURN ( __MKCHARACTER(ch) );
-            }
-
-            __INST(position) = nil;
-            if ((ret < 0)
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    f = __FILEVal(fp);
+
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTE__(ret, f, &ch, _buffered, __INST(handleType));
+
+	    if (ret > 0) {
+		pos = __INST(position);
+		if (__isSmallInteger(pos)) {
+		    OBJ t;
+
+		    t = __MKINT(__intVal(pos) + 1); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		if (__INST(binary) == true) {
+		    RETURN ( __mkSmallInteger(ch) );
+		}
+		RETURN ( __MKCHARACTER(ch) );
+	    }
+
+	    __INST(position) = nil;
+	    if ((ret < 0)
 #ifdef ECONNRESET
-                && (__threadErrno != ECONNRESET)
+		&& (__threadErrno != ECONNRESET)
 #endif
-            ){
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
+	    ){
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
     }
 %}.
     hitEOF == true ifTrue:[^ nil].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error.
+	lastErrorNumber := error.
+	^ self readError:error.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
 
     readAhead notNil ifTrue:[
-        c := readAhead.
-        readAhead := nil.
-        ^ c.
+	c := readAhead.
+	readAhead := nil.
+	^ c.
     ].
     c := self nextByteFromFile:handle.
     c isNil ifTrue:[
-        ^ nil.
+	^ nil.
     ].
     binary == true ifTrue:[
-        ^ c
+	^ c
     ].
     ^ Character value:c
 !
@@ -5166,11 +5158,11 @@
     OBJ ra;
 
     if ((ra = __INST(readAhead)) != nil) {
-        if (__INST(binary) == true) {
-            RETURN ( ra );
-        }
-        c = __intVal(ra);
-        RETURN ( __MKCHARACTER(c) );
+	if (__INST(binary) == true) {
+	    RETURN ( ra );
+	}
+	c = __intVal(ra);
+	RETURN ( __MKCHARACTER(c) );
     }
 
     __INST(lastErrorNumber) = nil;
@@ -5180,49 +5172,49 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            f = __FILEVal(fp);
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
-
-            if (ret > 0) {
-                __UNGETC__(c, f, _buffered);
-
-                if (__INST(binary) == true) {
-                    RETURN ( __mkSmallInteger(c) );
-                }
-                RETURN ( __MKCHARACTER(c) );
-            }
-            if ((ret < 0)
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    f = __FILEVal(fp);
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+
+	    if (ret > 0) {
+		__UNGETC__(c, f, _buffered);
+
+		if (__INST(binary) == true) {
+		    RETURN ( __mkSmallInteger(c) );
+		}
+		RETURN ( __MKCHARACTER(c) );
+	    }
+	    if ((ret < 0)
 #ifdef ECONNRESET
-                && (__threadErrno != ECONNRESET)
+		&& (__threadErrno != ECONNRESET)
 #endif
-            ){
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
+	    ){
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
     }
 %}.
     hitEOF == true ifTrue:[^ self pastEndRead].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error.
+	lastErrorNumber := error.
+	^ self readError:error.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
 
     readAhead isNil ifTrue:[
-        readAhead := self nextOrNil.
-        readAhead isNil ifTrue:[
-            ^ self pastEndRead.
-        ].
+	readAhead := self nextOrNil.
+	readAhead isNil ifTrue:[
+	    ^ self pastEndRead.
+	].
     ].
     ^ readAhead
 !
@@ -5242,11 +5234,11 @@
     OBJ ra;
 
     if ((ra = __INST(readAhead)) != nil) {
-        if (__INST(binary) == true) {
-            RETURN ( ra );
-        }
-        c = __intVal(ra);
-        RETURN ( __MKCHARACTER(c) );
+	if (__INST(binary) == true) {
+	    RETURN ( ra );
+	}
+	c = __intVal(ra);
+	RETURN ( __MKCHARACTER(c) );
     }
 
     __INST(lastErrorNumber) = nil;
@@ -5256,46 +5248,46 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(writeonly))
-        ) {
-            f = __FILEVal(fp);
-            _buffered = (__INST(buffered) == true);
-            if (_buffered) {
-                __READING__(f)
-            }
-            __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
-
-            if (ret > 0) {
-                __UNGETC__(c, f, _buffered);
-
-                if (__INST(binary) == true) {
-                    RETURN ( __mkSmallInteger(c) );
-                }
-                RETURN ( __MKCHARACTER(c) );
-            }
-            if ((ret < 0)
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(writeonly))
+	) {
+	    f = __FILEVal(fp);
+	    _buffered = (__INST(buffered) == true);
+	    if (_buffered) {
+		__READING__(f)
+	    }
+	    __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+
+	    if (ret > 0) {
+		__UNGETC__(c, f, _buffered);
+
+		if (__INST(binary) == true) {
+		    RETURN ( __mkSmallInteger(c) );
+		}
+		RETURN ( __MKCHARACTER(c) );
+	    }
+	    if ((ret < 0)
 #ifdef ECONNRESET
-                && (__threadErrno != ECONNRESET)
+		&& (__threadErrno != ECONNRESET)
 #endif
-            ){
-                error = __mkSmallInteger(__threadErrno);
-            } else /* ret == 0 */ {
-                __INST(hitEOF) = true;
-            }
-        }
+	    ){
+		error = __mkSmallInteger(__threadErrno);
+	    } else /* ret == 0 */ {
+		__INST(hitEOF) = true;
+	    }
+	}
     }
 %}.
     hitEOF == true ifTrue:[^ nil].
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        ^ self readError:error.
+	lastErrorNumber := error.
+	^ self readError:error.
     ].
     handle isNil ifTrue:[^ self errorNotOpen].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
 
     readAhead isNil ifTrue:[
-        readAhead := self nextOrNil.
+	readAhead := self nextOrNil.
     ].
     ^ readAhead
 !
@@ -5308,16 +5300,16 @@
 
     buffer := self contentsSpecies new:4096.
     [self atEnd] whileFalse:[
-        count := self nextAvailableBytes:4096 into:buffer startingAt:1.
-        count ~~ 0 ifTrue:[
-            answerStream isNil ifTrue:[
-                answerStream := WriteStream with:buffer.
-                answerStream position:count.
-                buffer := self contentsSpecies new:4096.
-            ] ifFalse:[
-                answerStream nextPutAll:buffer startingAt:1 to:count.
-            ].
-        ].
+	count := self nextAvailableBytes:4096 into:buffer startingAt:1.
+	count ~~ 0 ifTrue:[
+	    answerStream isNil ifTrue:[
+		answerStream := WriteStream with:buffer.
+		answerStream position:count.
+		buffer := self contentsSpecies new:4096.
+	    ] ifFalse:[
+		answerStream nextPutAll:buffer startingAt:1 to:count.
+	    ].
+	].
     ].
     answerStream isNil ifTrue:[^ self contentsSpecies new].
     ^ answerStream contents
@@ -5359,19 +5351,19 @@
     char c;
 
     if (__INST(hitEOF) == true) {
-        RETURN (true);
+	RETURN (true);
     }
     pos = __INST(position);
     lim = __INST(readLimit);
     if (lim != nil) {
-        off_t _pos, _readLimit;
-
-        _pos = __signedLongIntVal(pos);
-        _pos = _pos - __intVal( @global(PositionableStream:ZeroPosition)) + 1;
-        _readLimit = __signedLongIntVal(lim);
-        if (_pos > _readLimit) {
-            RETURN (true);
-        }
+	off_t _pos, _readLimit;
+
+	_pos = __signedLongIntVal(pos);
+	_pos = _pos - __intVal( @global(PositionableStream:ZeroPosition)) + 1;
+	_readLimit = __signedLongIntVal(lim);
+	if (_pos > _readLimit) {
+	    RETURN (true);
+	}
     }
 
     __INST(lastErrorNumber) = nil;
@@ -5381,57 +5373,57 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if ((fp = __INST(handle)) != nil) {
-            int _buffered = (__INST(buffered) == true);
-            int ret;
-            FILEPOINTER f = __FILEVal(fp);
-
-            if (_buffered) {
-                __READING__(f);
-            } else {
-                if (__INST(readAhead) != nil) {
-                    RETURN (false);
-                }
-            }
-
-            /*
-             * read ahead ...
-             */
-            do {
+	if ((fp = __INST(handle)) != nil) {
+	    int _buffered = (__INST(buffered) == true);
+	    int ret;
+	    FILEPOINTER f = __FILEVal(fp);
+
+	    if (_buffered) {
+		__READING__(f);
+	    } else {
+		if (__INST(readAhead) != nil) {
+		    RETURN (false);
+		}
+	    }
+
+	    /*
+	     * read ahead ...
+	     */
+	    do {
 #ifdef WIN32
 # if 1
-                __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+		__READBYTE__(ret, f, &c, _buffered, __INST(handleType));
 
 # else
-                __BEGIN_INTERRUPTABLE__
-                __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
-                __END_INTERRUPTABLE__
+		__BEGIN_INTERRUPTABLE__
+		__READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+		__END_INTERRUPTABLE__
 # endif
 #else /* not WIN32 */
-                __BEGIN_INTERRUPTABLE__
-                __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
-                __END_INTERRUPTABLE__
+		__BEGIN_INTERRUPTABLE__
+		__READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+		__END_INTERRUPTABLE__
 #endif
-            } while ((ret < 0) && (__threadErrno == EINTR));
-
-            if (ret > 0) {
-                __UNGETC__(c&0xff, f, _buffered);
-                RETURN (false);
-            }
-            if (ret == 0) {
-                __INST(hitEOF) = true;
-                RETURN (true);
-            }
+	    } while ((ret < 0) && (__threadErrno == EINTR));
+
+	    if (ret > 0) {
+		__UNGETC__(c&0xff, f, _buffered);
+		RETURN (false);
+	    }
+	    if (ret == 0) {
+		__INST(hitEOF) = true;
+		RETURN (true);
+	    }
 #ifdef ECONNRESET
-            // connection reset by peer is also an EOF
-            if (__threadErrno == ECONNRESET) {
-                __INST(hitEOF) = true;
-                RETURN (true);
-            }
+	    // connection reset by peer is also an EOF
+	    if (__threadErrno == ECONNRESET) {
+		__INST(hitEOF) = true;
+		RETURN (true);
+	    }
 #endif
-            /* ret < 0 */
-            __INST(lastErrorNumber) = __mkSmallInteger(__threadErrno);
-        }
+	    /* ret < 0 */
+	    __INST(lastErrorNumber) = __mkSmallInteger(__threadErrno);
+	}
     }
 %}.
     lastErrorNumber notNil ifTrue:[^ self readError].
@@ -5441,7 +5433,7 @@
 
     "/ migration support
     ^ self
-        atEndFile:handle
+	atEndFile:handle
 
     "Modified: / 30.10.1998 / 20:16:06 / cg"
 !
@@ -5452,18 +5444,18 @@
      We know, that error conditions do not block, so return true for errors."
 
     ^ readAhead notNil
-        or:[handle isNil
-        or:[mode == #writeonly
-        or:[OperatingSystem readCheck:self fileDescriptor]]]
+	or:[handle isNil
+	or:[mode == #writeonly
+	or:[OperatingSystem readCheck:self fileDescriptor]]]
 
     "
      |pipe|
 
      pipe := PipeStream readingFrom:'(sleep 10; echo hello)'.
      pipe canReadWithoutBlocking ifTrue:[
-         Transcript showCR:'data available'
+	 Transcript showCR:'data available'
      ] ifFalse:[
-         Transcript showCR:'no data available'
+	 Transcript showCR:'no data available'
      ].
      pipe close
     "
@@ -5477,8 +5469,8 @@
      We know, that error conditions do not block, so return true for errors."
 
     ^ handle isNil
-        or:[mode == #readonly
-        or:[OperatingSystem writeCheck:self fileDescriptor]]
+	or:[mode == #readonly
+	or:[OperatingSystem writeCheck:self fileDescriptor]]
 !
 
 gotErrorOrEOF
@@ -5554,19 +5546,19 @@
     wasBlocked := OperatingSystem blockInterrupts.
     inputSema := Semaphore new name:'readWait'.
     [
-        timeoutOrNil notNil ifTrue:[
-            Processor signal:inputSema afterMilliseconds:timeoutOrNil.
-        ].
-        Processor signal:inputSema onInput:fd.
-        Processor activeProcess state:#ioWait.
-        inputSema wait.
-        hasTimedout := timeoutOrNil notNil and:[(OperatingSystem readCheck:fd) not].
+	timeoutOrNil notNil ifTrue:[
+	    Processor signal:inputSema afterMilliseconds:timeoutOrNil.
+	].
+	Processor signal:inputSema onInput:fd.
+	Processor activeProcess state:#ioWait.
+	inputSema wait.
+	hasTimedout := timeoutOrNil notNil and:[(OperatingSystem readCheck:fd) not].
     ] ifCurtailed:[
-        Processor disableSemaphore:inputSema.
-        wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+	Processor disableSemaphore:inputSema.
+	wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ].
     timeoutOrNil notNil ifTrue:[
-        Processor disableSemaphore:inputSema.
+	Processor disableSemaphore:inputSema.
     ].
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ^ hasTimedout
@@ -5582,7 +5574,7 @@
     |fd sema hasTimedout wasBlocked|
 
     handle isNil ifTrue:[
-        ^ self errorNotOpen
+	^ self errorNotOpen
     ].
 
     fd := self fileDescriptor.
@@ -5591,20 +5583,20 @@
     wasBlocked := OperatingSystem blockInterrupts.
     sema := Semaphore new name:'readWriteWait'.
     [
-        timeout notNil ifTrue:[
-            Processor signal:sema afterMilliseconds:timeout
-        ].
-        Processor signal:sema onOutput:fd.
-        Processor signal:sema onInput:fd.
-        Processor activeProcess state:#ioWait.
-        sema wait.
-        hasTimedout := timeout notNil and:[(OperatingSystem readWriteCheck:fd) not].
+	timeout notNil ifTrue:[
+	    Processor signal:sema afterMilliseconds:timeout
+	].
+	Processor signal:sema onOutput:fd.
+	Processor signal:sema onInput:fd.
+	Processor activeProcess state:#ioWait.
+	sema wait.
+	hasTimedout := timeout notNil and:[(OperatingSystem readWriteCheck:fd) not].
     ] ifCurtailed:[
-        Processor disableSemaphore:sema.
-        wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+	Processor disableSemaphore:sema.
+	wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ].
     timeout notNil ifTrue:[
-        Processor disableSemaphore:sema.
+	Processor disableSemaphore:sema.
     ].
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ^ hasTimedout
@@ -5620,7 +5612,7 @@
     |fd sema hasTimedout wasBlocked|
 
     handle isNil ifTrue:[
-        ^ self errorNotOpen
+	^ self errorNotOpen
     ].
 
     fd := self fileDescriptor.
@@ -5629,20 +5621,20 @@
     wasBlocked := OperatingSystem blockInterrupts.
     sema := Semaphore new name:'writeExceptionWait'.
     [
-        timeout notNil ifTrue:[
-            Processor signal:sema afterMilliseconds:timeout
-        ].
-        Processor signal:sema onOutput:fd.
-        Processor signal:sema onException:fd.
-        Processor activeProcess state:#ioWait.
-        sema wait.
-        hasTimedout := timeout notNil and:[(OperatingSystem readWriteCheck:fd) not].
+	timeout notNil ifTrue:[
+	    Processor signal:sema afterMilliseconds:timeout
+	].
+	Processor signal:sema onOutput:fd.
+	Processor signal:sema onException:fd.
+	Processor activeProcess state:#ioWait.
+	sema wait.
+	hasTimedout := timeout notNil and:[(OperatingSystem readWriteCheck:fd) not].
     ] ifCurtailed:[
-        Processor disableSemaphore:sema.
-        wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+	Processor disableSemaphore:sema.
+	wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ].
     timeout notNil ifTrue:[
-        Processor disableSemaphore:sema.
+	Processor disableSemaphore:sema.
     ].
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ^ hasTimedout
@@ -5658,10 +5650,10 @@
     |fd outputSema hasTimedout wasBlocked|
 
     handle isNil ifTrue:[
-        ^ self errorNotOpen
+	^ self errorNotOpen
     ].
     mode == #readonly ifTrue:[
-        ^ self errorReadOnly
+	^ self errorReadOnly
     ].
 
     fd := self fileDescriptor.
@@ -5670,19 +5662,19 @@
     wasBlocked := OperatingSystem blockInterrupts.
     outputSema := Semaphore new name:'writeWait'.
     [
-        timeout notNil ifTrue:[
-            Processor signal:outputSema afterMilliseconds:timeout
-        ].
-        Processor signal:outputSema onOutput:fd.
-        Processor activeProcess state:#ioWait.
-        outputSema wait.
-        hasTimedout := timeout notNil and:[(OperatingSystem writeCheck:fd) not].
+	timeout notNil ifTrue:[
+	    Processor signal:outputSema afterMilliseconds:timeout
+	].
+	Processor signal:outputSema onOutput:fd.
+	Processor activeProcess state:#ioWait.
+	outputSema wait.
+	hasTimedout := timeout notNil and:[(OperatingSystem writeCheck:fd) not].
     ] ifCurtailed:[
-        Processor disableSemaphore:outputSema.
-        wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+	Processor disableSemaphore:outputSema.
+	wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ].
     timeout notNil ifTrue:[
-        Processor disableSemaphore:outputSema.
+	Processor disableSemaphore:outputSema.
     ].
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ^ hasTimedout
@@ -5700,57 +5692,57 @@
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        OBJ fp;
-
-        __INST(lastErrorNumber) = nil;
-        if (((fp = __INST(handle)) != nil)
-         && (__INST(mode) != @symbol(readonly))
-         && (__INST(binary) != true)
-        ) {
-            FILEPOINTER f = __FILEVal(fp);
-            int _buffered = (__INST(buffered) == true);
-            int len, cnt;
-            char *cp;
-
-            if (_buffered) {
-                __WRITING__(f)
-            }
-            {
-                OBJ mode = __INST(eolMode);
-
-                if (mode == @symbol(cr)) {
-                    cp = "\r"; len = 1;
-                } else if (mode == @symbol(crlf)) {
-                    cp = "\r\n"; len = 2;
-                } else if (mode == @symbol(eot)) {
-                    cp = "\004"; len = 1;
-                } else if (mode == @symbol(etx)) {
-                    cp = "\003"; len = 1;
-                } else {
-                    cp = "\n"; len = 1;
-                }
-            }
+	OBJ fp;
+
+	__INST(lastErrorNumber) = nil;
+	if (((fp = __INST(handle)) != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	 && (__INST(binary) != true)
+	) {
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+	    int len, cnt;
+	    char *cp;
+
+	    if (_buffered) {
+		__WRITING__(f)
+	    }
+	    {
+		OBJ mode = __INST(eolMode);
+
+		if (mode == @symbol(cr)) {
+		    cp = "\r"; len = 1;
+		} else if (mode == @symbol(crlf)) {
+		    cp = "\r\n"; len = 2;
+		} else if (mode == @symbol(eot)) {
+		    cp = "\004"; len = 1;
+		} else if (mode == @symbol(etx)) {
+		    cp = "\003"; len = 1;
+		} else {
+		    cp = "\n"; len = 1;
+		}
+	    }
 #if defined(WIN32) && !defined(__MINGW__)
-            if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                cnt = __win32_fwrite(cp, 1, len, f);
-            } else
+	    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+		cnt = __win32_fwrite(cp, 1, len, f);
+	    } else
 #endif
-            {
-                __WRITEBYTES__(cnt, f, cp, len, _buffered, __INST(handleType));
-            }
-            if (cnt == len) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + len;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e: dont know */
-                }
-                RETURN ( self );
-            }
-            __INST(lastErrorNumber) = __mkSmallInteger(__threadErrno);
-        }
+	    {
+		__WRITEBYTES__(cnt, f, cp, len, _buffered, __INST(handleType));
+	    }
+	    if (cnt == len) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + len;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e: dont know */
+		}
+		RETURN ( self );
+	    }
+	    __INST(lastErrorNumber) = __mkSmallInteger(__threadErrno);
+	}
     }
 %}.
     lastErrorNumber notNil ifTrue:[self writeError. ^ self].
@@ -5759,11 +5751,11 @@
     (binary==true) ifTrue:[self errorBinary. ^ self].
 
     (eolMode == #cr) ifTrue:[
-        self nextPut:(Character return).
-        ^ self
+	self nextPut:(Character return).
+	^ self
     ].
     (eolMode == #crlf) ifTrue:[
-        self nextPut:(Character return).
+	self nextPut:(Character return).
     ].
     self nextPut:(Character nl).
     ^ self
@@ -5778,32 +5770,32 @@
      || (__INST(handleType) == @symbol(filePointer))
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        OBJ fp;
-        int _buffered = (__INST(buffered) == true);
-
-        if ((fp = __INST(handle)) != nil) {
-            if (__INST(mode) != @symbol(readonly)) {
-                if (_buffered) {
-                    FILEPOINTER f = __FILEVal(fp);
+	OBJ fp;
+	int _buffered = (__INST(buffered) == true);
+
+	if ((fp = __INST(handle)) != nil) {
+	    if (__INST(mode) != @symbol(readonly)) {
+		if (_buffered) {
+		    FILEPOINTER f = __FILEVal(fp);
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        __win32_fflush(f);
-                    } else {
-                        int rslt;
-
-                        do {
-                            __threadErrno = 0;
-                            rslt = __STX_C_CALL1("fflush", fflush, f);
-                        } while((rslt < 0) && (__threadErrno == EINTR));
-                    }
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			__win32_fflush(f);
+		    } else {
+			int rslt;
+
+			do {
+			    __threadErrno = 0;
+			    rslt = __STX_C_CALL1("fflush", fflush, f);
+			} while((rslt < 0) && (__threadErrno == EINTR));
+		    }
 #else /* ! WIN32 */
-                    __BEGIN_INTERRUPTABLE__
-                    FFLUSH(f);
-                    __END_INTERRUPTABLE__
+		    __BEGIN_INTERRUPTABLE__
+		    FFLUSH(f);
+		    __END_INTERRUPTABLE__
 #endif /* ! WIN32 */
-                }
-            }
-        }
+		}
+	    }
+	}
     }
 %}
 !
@@ -5819,9 +5811,9 @@
 
     if ((handle != STObject.Nil)
      && (aCharacter.isSTCharacter())) {
-        handle.writeChar( aCharacter );
-        self.instVarAt_put(I_position, STObject.Nil);
-        return __c__._RETURN_self();
+	handle.writeChar( aCharacter );
+	self.instVarAt_put(I_position, STObject.Nil);
+	return __c__._RETURN_self();
     }
 #else
     __INST(lastErrorNumber) = nil;
@@ -5830,112 +5822,112 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        OBJ fp;
-
-        if (((fp = __INST(handle)) != nil)
-         && (__INST(mode) != @symbol(readonly))
-        ) {
-            FILEPOINTER f = __FILEVal(fp);
-            int _buffered = (__INST(buffered) == true);
-            unsigned codePoint;
-            unsigned char c;
-            int cnt;
-            char buff[2];
-            int nBytes = 1;
-
-            if (__INST(binary) != true) {
-                if (__isCharacter(aCharacter)) {
-
-                    codePoint = __intVal(__characterVal(aCharacter));
-                    if (codePoint <= 0xFF) {
-                        c = codePoint;
-                        buff[0] = c; nBytes = 1;
-
-                        if (c == '\n') {
-                            OBJ mode = __INST(eolMode);
-                            if (mode == @symbol(nl)) {
-                                // no EOL translation
-                            } else if (mode == nil) {
-                                // no EOL translation
-                            } else if (mode == @symbol(cr)) {
-                                buff[0] = '\r';
-                            } else if (mode == @symbol(eot)) {
-                                buff[0] = '\004';
-                            } else if (mode == @symbol(etx)) {
-                                buff[0] = '\003';
-                            } else if (mode == @symbol(crlf)) {
-                                buff[0] = '\r';
-                                buff[1] = '\n';
-                                nBytes = 2;
-                            }
-                        }
+	OBJ fp;
+
+	if (((fp = __INST(handle)) != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	) {
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+	    unsigned codePoint;
+	    unsigned char c;
+	    int cnt;
+	    char buff[2];
+	    int nBytes = 1;
+
+	    if (__INST(binary) != true) {
+		if (__isCharacter(aCharacter)) {
+
+		    codePoint = __intVal(__characterVal(aCharacter));
+		    if (codePoint <= 0xFF) {
+			c = codePoint;
+			buff[0] = c; nBytes = 1;
+
+			if (c == '\n') {
+			    OBJ mode = __INST(eolMode);
+			    if (mode == @symbol(nl)) {
+				// no EOL translation
+			    } else if (mode == nil) {
+				// no EOL translation
+			    } else if (mode == @symbol(cr)) {
+				buff[0] = '\r';
+			    } else if (mode == @symbol(eot)) {
+				buff[0] = '\004';
+			    } else if (mode == @symbol(etx)) {
+				buff[0] = '\003';
+			    } else if (mode == @symbol(crlf)) {
+				buff[0] = '\r';
+				buff[1] = '\n';
+				nBytes = 2;
+			    }
+			}
     doWrite:
-                        if (! f) {
-                            fprintf(stderr, "oops - fileHandle is NULL in nextPut:\n");
-                            __INST(handle) = nil;
-                            goto out;
-                        }
-
-                        if (_buffered) {
-                            __WRITING__(f)
-                        }
+			if (! f) {
+			    fprintf(stderr, "oops - fileHandle is NULL in nextPut:\n");
+			    __INST(handle) = nil;
+			    goto out;
+			}
+
+			if (_buffered) {
+			    __WRITING__(f)
+			}
 #if defined(WIN32) && !defined(__MINGW__)
-                        if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                            cnt = __win32_fwrite(buff, 1, nBytes, f);
-                        } else
+			if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			    cnt = __win32_fwrite(buff, 1, nBytes, f);
+			} else
 # endif
-                        {
-                            __WRITEBYTES__(cnt, f, buff, nBytes, _buffered, __INST(handleType));
-                        }
-                        if (cnt == nBytes) {
-                            if (__isSmallInteger(__INST(position))) {
-                                INT np = __intVal(__INST(position)) + nBytes;
-                                OBJ t;
-
-                                t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                            } else {
-                                __INST(position) = nil; /* i.e. do not know */
-                            }
-                            RETURN ( self );
-                        }
-                        error = __mkSmallInteger(__threadErrno);
-                    }
-                }
-            } else {
-                if (__isSmallInteger(aCharacter)) {
-                    c = __intVal(aCharacter);
-                    buff[0] = c; nBytes = 1;
-                    goto doWrite;
-                }
-            }
-        }
+			{
+			    __WRITEBYTES__(cnt, f, buff, nBytes, _buffered, __INST(handleType));
+			}
+			if (cnt == nBytes) {
+			    if (__isSmallInteger(__INST(position))) {
+				INT np = __intVal(__INST(position)) + nBytes;
+				OBJ t;
+
+				t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+			    } else {
+				__INST(position) = nil; /* i.e. do not know */
+			    }
+			    RETURN ( self );
+			}
+			error = __mkSmallInteger(__threadErrno);
+		    }
+		}
+	    } else {
+		if (__isSmallInteger(aCharacter)) {
+		    c = __intVal(aCharacter);
+		    buff[0] = c; nBytes = 1;
+		    goto doWrite;
+		}
+	    }
+	}
     }
 out: ;
 #endif /* not SCHTEAM */
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ self
+	lastErrorNumber := error.
+	self writeError:error.
+	^ self
     ].
     handle isNil ifTrue:[self errorNotOpen. ^ self].
     (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
     binary == true ifFalse:[
-        (aCharacter isCharacter not
-        or:[aCharacter codePoint > 16rFF]) ifTrue:[
-            self argumentMustBeCharacter.
-            ^ self.
-        ].
+	(aCharacter isCharacter not
+	or:[aCharacter codePoint > 16rFF]) ifTrue:[
+	    self argumentMustBeCharacter.
+	    ^ self.
+	].
     ] ifTrue:[
-        aCharacter isInteger ifFalse:[
-            self argumentMustBeInteger.
-            ^ self.
-        ].
+	aCharacter isInteger ifFalse:[
+	    self argumentMustBeInteger.
+	    ^ self.
+	].
     ].
     "/ migration support
     self
-        nextPutByte:aCharacter asInteger
-        toFile:handle
+	nextPutByte:aCharacter asInteger
+	toFile:handle
 !
 
 nextPutAll:aCollection
@@ -5950,9 +5942,9 @@
 
     if ((handle != STObject.Nil)
      && (aCollection.isSTString())) {
-        handle.writeCharacters( aCollection.asSTString().characters );
-        self.instVarAt_put(I_position, STObject.Nil);
-        return __c__._RETURN_self();
+	handle.writeCharacters( aCollection.asSTString().characters );
+	self.instVarAt_put(I_position, STObject.Nil);
+	return __c__._RETURN_self();
     }
 #else
 
@@ -5963,164 +5955,164 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        OBJ fp;
-
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(readonly))
-        ) {
-            INT len, cnt;
-            INT o_offs;
-            FILEPOINTER f = __FILEVal(fp);
-            int _buffered = (__INST(buffered) == true);
-
-            if (! f) {
-                fprintf(stderr, "oops - fileHandle is NULL in nextPutAll:\n");
-                __INST(handle) = nil;
-                goto out;
-            }
-            if (_buffered) {
-                __WRITING__(f)
-            }
-
-            if (__isStringLike(aCollection)) {
-                OBJ mode = __INST(eolMode);
-                char *stringP = __stringVal(aCollection);
-                len = __stringSize(aCollection);
-
-                if (__INST(binary) != true
-                    && ((mode == @symbol(cr))
-                        || (mode == @symbol(etx))
-                        || (mode == @symbol(eot))
-                        || (mode == @symbol(crlf)))
-                    && memchr(stringP, '\n', len) != NULL)
-                {
-                    // there is a '\n' to be translated, replace it into a buffer
-
-                    char *end;
-                    char sep[2];
-                    int sepLen = 1;
-                    int bufLen;
-                    char *buf, *endBuf, *sp, *dp;
-
-                    sep[0] = '\n';
-                    if (mode == @symbol(crlf)) {
-                         sep[0] = '\r'; sep[1] = '\n'; sepLen = 2;
-                    } else if (mode == @symbol(cr)) {
-                         sep[0] = '\r';
-                    } else if (mode == @symbol(eot)) {
-                         sep[0] = '\004';
-                    } else if (mode == @symbol(etx)) {
-                         sep[0] = '\003';
-                    }
-
-                    // estimate size of buffer - assume every 4th char is a separator
-                    bufLen = (sepLen == 1) ? len : (len + ((len/4) + 1) * sepLen);
-                    buf = (char *)malloc(bufLen);
-                    if (buf == NULL) {
-                        error = __mkSmallInteger(ENOMEM);
-                        goto out;
-                    }
-
-                    endBuf = buf + bufLen;
-                    end = stringP + len;
-                    for (sp = stringP, dp = buf; sp < end; sp++) {
-                        char c;
-
-                        if ((dp+sepLen) >= endBuf) {
-                            char *newBuf;
-
-                            bufLen = bufLen * 2;
-                            newBuf = (char *)realloc(buf, bufLen);
-                            if (newBuf == NULL) {
-                                free(buf);
-                                error = __mkSmallInteger(ENOMEM);
-                                goto out;
-                            }
-                            endBuf = newBuf + bufLen;
-                            dp = newBuf + (dp-buf);
-                            buf = newBuf;
-                        }
-
-                        if ((c = *sp) != '\n') {
-                            *dp++ = c;
-                        } else {
-                            *dp++ = sep[0];
-                            if (sepLen == 2) {
-                                *dp++ = sep[1];
-                            };
-                        }
-                    }
-
-                    len = dp - buf;
+	OBJ fp;
+
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(readonly))
+	) {
+	    INT len, cnt;
+	    INT o_offs;
+	    FILEPOINTER f = __FILEVal(fp);
+	    int _buffered = (__INST(buffered) == true);
+
+	    if (! f) {
+		fprintf(stderr, "oops - fileHandle is NULL in nextPutAll:\n");
+		__INST(handle) = nil;
+		goto out;
+	    }
+	    if (_buffered) {
+		__WRITING__(f)
+	    }
+
+	    if (__isStringLike(aCollection)) {
+		OBJ mode = __INST(eolMode);
+		char *stringP = __stringVal(aCollection);
+		len = __stringSize(aCollection);
+
+		if (__INST(binary) != true
+		    && ((mode == @symbol(cr))
+			|| (mode == @symbol(etx))
+			|| (mode == @symbol(eot))
+			|| (mode == @symbol(crlf)))
+		    && memchr(stringP, '\n', len) != NULL)
+		{
+		    // there is a '\n' to be translated, replace it into a buffer
+
+		    char *end;
+		    char sep[2];
+		    int sepLen = 1;
+		    int bufLen;
+		    char *buf, *endBuf, *sp, *dp;
+
+		    sep[0] = '\n';
+		    if (mode == @symbol(crlf)) {
+			 sep[0] = '\r'; sep[1] = '\n'; sepLen = 2;
+		    } else if (mode == @symbol(cr)) {
+			 sep[0] = '\r';
+		    } else if (mode == @symbol(eot)) {
+			 sep[0] = '\004';
+		    } else if (mode == @symbol(etx)) {
+			 sep[0] = '\003';
+		    }
+
+		    // estimate size of buffer - assume every 4th char is a separator
+		    bufLen = (sepLen == 1) ? len : (len + ((len/4) + 1) * sepLen);
+		    buf = (char *)malloc(bufLen);
+		    if (buf == NULL) {
+			error = __mkSmallInteger(ENOMEM);
+			goto out;
+		    }
+
+		    endBuf = buf + bufLen;
+		    end = stringP + len;
+		    for (sp = stringP, dp = buf; sp < end; sp++) {
+			char c;
+
+			if ((dp+sepLen) >= endBuf) {
+			    char *newBuf;
+
+			    bufLen = bufLen * 2;
+			    newBuf = (char *)realloc(buf, bufLen);
+			    if (newBuf == NULL) {
+				free(buf);
+				error = __mkSmallInteger(ENOMEM);
+				goto out;
+			    }
+			    endBuf = newBuf + bufLen;
+			    dp = newBuf + (dp-buf);
+			    buf = newBuf;
+			}
+
+			if ((c = *sp) != '\n') {
+			    *dp++ = c;
+			} else {
+			    *dp++ = sep[0];
+			    if (sepLen == 2) {
+				*dp++ = sep[1];
+			    };
+			}
+		    }
+
+		    len = dp - buf;
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite(buf, 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite(buf, 1, len, f);
+		    } else
 # endif
-                    {
-                        __WRITEBYTES__(cnt, f, buf, len, _buffered, __INST(handleType));
-                    }
-                    free(buf);
-                } else  {  // No EOL conversion needed
+		    {
+			__WRITEBYTES__(cnt, f, buf, len, _buffered, __INST(handleType));
+		    }
+		    free(buf);
+		} else  {  // No EOL conversion needed
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite(stringP, 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite(stringP, 1, len, f);
+		    } else
 # endif
-                    {
-                        o_offs = stringP - (char *)__InstPtr(aCollection);
-                        __WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs, len, _buffered, __INST(handleType));
-                    }
-                }
-            } else {   // Not a String
-                if (__INST(binary) == true) {
-                    INT offs;
-
-                    if (__isByteArrayLike(aCollection)) {
-                        offs = 0;
-                        len = __byteArraySize(aCollection);
-                    } else if (__isBytes(aCollection)) {
-                        offs = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aCollection))->c_ninstvars));
-                        len = __byteArraySize(aCollection) - offs;
-                    } else
-                        goto out;
+		    {
+			o_offs = stringP - (char *)__InstPtr(aCollection);
+			__WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs, len, _buffered, __INST(handleType));
+		    }
+		}
+	    } else {   // Not a String
+		if (__INST(binary) == true) {
+		    INT offs;
+
+		    if (__isByteArrayLike(aCollection)) {
+			offs = 0;
+			len = __byteArraySize(aCollection);
+		    } else if (__isBytes(aCollection)) {
+			offs = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aCollection))->c_ninstvars));
+			len = __byteArraySize(aCollection) - offs;
+		    } else
+			goto out;
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite(__stringVal(aCollection), 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite(__stringVal(aCollection), 1, len, f);
+		    } else
 # endif
-                    {
-                        o_offs = (char *)(__ByteArrayInstPtr(aCollection)->ba_element) - (char *)__InstPtr(aCollection);
-                        o_offs += offs;
-                        __WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs, len, _buffered, __INST(handleType));
-                    }
-                } else  // Not binary mode
-                    goto out;
-            }
-
-            // Now check for errors
-            if (cnt == len) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + len;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                RETURN (self);
-            }
-            fprintf(stderr, "cnt=%d len=%d\n", cnt, len);
-            error = __mkSmallInteger(__threadErrno);
-        }
+		    {
+			o_offs = (char *)(__ByteArrayInstPtr(aCollection)->ba_element) - (char *)__InstPtr(aCollection);
+			o_offs += offs;
+			__WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs, len, _buffered, __INST(handleType));
+		    }
+		} else  // Not binary mode
+		    goto out;
+	    }
+
+	    // Now check for errors
+	    if (cnt == len) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + len;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		RETURN (self);
+	    }
+	    fprintf(stderr, "cnt=%d len=%d\n", cnt, len);
+	    error = __mkSmallInteger(__threadErrno);
+	}
     }
 out: ;
 #endif /* not SCHTEAM */
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ self
+	lastErrorNumber := error.
+	self writeError:error.
+	^ self
     ].
     handle isNil ifTrue:[self errorNotOpen. ^ self].
     (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
@@ -6133,7 +6125,7 @@
      I don't know how to write non-bytes to a external stream, but let superclass handle this."
 
     buffer isByteCollection ifTrue:[
-        ^ self nextPutBytes:initialWriteCount from:buffer startingAt:initialOffset.
+	^ self nextPutBytes:initialWriteCount from:buffer startingAt:initialOffset.
     ].
 
     ^ super nextPutAll:initialWriteCount from:buffer startingAt:initialOffset
@@ -6153,176 +6145,176 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        OBJ fp = __INST(handle);
-
-        if ((fp != nil)
-         && (__INST(mode) != @symbol(readonly))
-         && __bothSmallInteger(start, stop)
-        ) {
-            int _buffered = (__INST(buffered) == true);
-            FILEPOINTER f = __FILEVal(fp);
-            int offs, len, cnt;
-            int iStart = __intVal(start);
-            int iStop = __intVal(stop);
-            int o_offs;
-
-            if (_buffered ) {
-                __WRITING__(f)
-            }
-
-            if ((iStart < 1) || (iStop < iStart)) {
-                RETURN(self);
-            }
-            if (__isStringLike(aCollection)) {
-                char *stringP;
-                OBJ mode = __INST(eolMode);
-
-                len = __stringSize(aCollection);
-                if (iStop > len) {
-                    RETURN(self);
-                }
-                if (iStop > len)
-                    iStop = len;
-                len = iStop - iStart + 1;
-                stringP = __stringVal(aCollection) + iStart - 1;
-
-                if (__INST(binary) != true
-                    && ((mode == @symbol(cr))
-                        || (mode == @symbol(etx))
-                        || (mode == @symbol(eot))
-                        || (mode == @symbol(crlf)))
-                    && memchr(stringP, '\n', len) != NULL)
-                {
-                    // see if there is a \n which needs to be translated, replace it
-
-                    char *end = stringP + len;
-                    char sep[2];
-                    int sepLen = 1;
-                    int bufLen;
-                    char *buf, *endBuf, *sp, *dp;
-
-                    sep[0] = '\n';
-                    if (mode == @symbol(crlf)) {
-                         sep[0] = '\r'; sep[1] = '\n'; sepLen = 2;
-                    } else if (mode == @symbol(cr)) {
-                         sep[0] = '\r';
-                    } else if (mode == @symbol(eot)) {
-                         sep[0] = '\004';
-                    } else if (mode == @symbol(etx)) {
-                         sep[0] = '\003';
-                    }
-
-                    // estimate size of buffer - assume every 4th char is a separator
-                    bufLen = (sepLen == 1) ? len : (len + ((len/4) + 1) * sepLen);
-                    buf = (char *)malloc(bufLen);
-                    if (buf == NULL) {
-                        error = __mkSmallInteger(ENOMEM);
-                        goto out;
-                    }
-
-                    endBuf = buf + bufLen;
-
-                    for (sp = stringP, dp = buf; sp < end; sp++) {
-                        char c;
-
-                        if ((dp+sepLen) >= endBuf) {
-                            char *newBuf;
-
-                            bufLen = bufLen * 2;
-                            newBuf = (char *)realloc(buf, bufLen);
-                            if (newBuf == NULL) {
-                                free(buf);
-                                error = __mkSmallInteger(ENOMEM);
-                                goto out;
-                            }
-                            endBuf = newBuf + bufLen;
-                            dp = newBuf + (dp-buf);
-                            buf = newBuf;
-                        }
-
-                        if ((c = *sp) == '\n') {
-                            *dp++ = sep[0];
-                            if (sepLen == 2) {
-                                *dp++ = sep[1];
-                            };
-                        } else {
-                            *dp++ = c;
-                        }
-                    }
-
-                    len = dp - buf;
+	OBJ fp = __INST(handle);
+
+	if ((fp != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	 && __bothSmallInteger(start, stop)
+	) {
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    int offs, len, cnt;
+	    int iStart = __intVal(start);
+	    int iStop = __intVal(stop);
+	    int o_offs;
+
+	    if (_buffered ) {
+		__WRITING__(f)
+	    }
+
+	    if ((iStart < 1) || (iStop < iStart)) {
+		RETURN(self);
+	    }
+	    if (__isStringLike(aCollection)) {
+		char *stringP;
+		OBJ mode = __INST(eolMode);
+
+		len = __stringSize(aCollection);
+		if (iStop > len) {
+		    RETURN(self);
+		}
+		if (iStop > len)
+		    iStop = len;
+		len = iStop - iStart + 1;
+		stringP = __stringVal(aCollection) + iStart - 1;
+
+		if (__INST(binary) != true
+		    && ((mode == @symbol(cr))
+			|| (mode == @symbol(etx))
+			|| (mode == @symbol(eot))
+			|| (mode == @symbol(crlf)))
+		    && memchr(stringP, '\n', len) != NULL)
+		{
+		    // see if there is a \n which needs to be translated, replace it
+
+		    char *end = stringP + len;
+		    char sep[2];
+		    int sepLen = 1;
+		    int bufLen;
+		    char *buf, *endBuf, *sp, *dp;
+
+		    sep[0] = '\n';
+		    if (mode == @symbol(crlf)) {
+			 sep[0] = '\r'; sep[1] = '\n'; sepLen = 2;
+		    } else if (mode == @symbol(cr)) {
+			 sep[0] = '\r';
+		    } else if (mode == @symbol(eot)) {
+			 sep[0] = '\004';
+		    } else if (mode == @symbol(etx)) {
+			 sep[0] = '\003';
+		    }
+
+		    // estimate size of buffer - assume every 4th char is a separator
+		    bufLen = (sepLen == 1) ? len : (len + ((len/4) + 1) * sepLen);
+		    buf = (char *)malloc(bufLen);
+		    if (buf == NULL) {
+			error = __mkSmallInteger(ENOMEM);
+			goto out;
+		    }
+
+		    endBuf = buf + bufLen;
+
+		    for (sp = stringP, dp = buf; sp < end; sp++) {
+			char c;
+
+			if ((dp+sepLen) >= endBuf) {
+			    char *newBuf;
+
+			    bufLen = bufLen * 2;
+			    newBuf = (char *)realloc(buf, bufLen);
+			    if (newBuf == NULL) {
+				free(buf);
+				error = __mkSmallInteger(ENOMEM);
+				goto out;
+			    }
+			    endBuf = newBuf + bufLen;
+			    dp = newBuf + (dp-buf);
+			    buf = newBuf;
+			}
+
+			if ((c = *sp) == '\n') {
+			    *dp++ = sep[0];
+			    if (sepLen == 2) {
+				*dp++ = sep[1];
+			    };
+			} else {
+			    *dp++ = c;
+			}
+		    }
+
+		    len = dp - buf;
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite(buf, 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite(buf, 1, len, f);
+		    } else
 #endif
-                    {
-                        __WRITEBYTES__(cnt, f, buf, len, _buffered, __INST(handleType));
-                    }
-                    free(buf);
-                } else  {  // No EOL conversion needed
+		    {
+			__WRITEBYTES__(cnt, f, buf, len, _buffered, __INST(handleType));
+		    }
+		    free(buf);
+		} else  {  // No EOL conversion needed
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite(stringP, 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite(stringP, 1, len, f);
+		    } else
 #endif
-                    {
-                        o_offs = (char *)__stringVal(aCollection)-(char *)__InstPtr(aCollection);
-                        __WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs+iStart-1, len, _buffered, __INST(handleType));
-                    }
-                }
-            } else {  // Not a string
-                if (__INST(binary) == true) {
-                    int offs;
-
-                    if (__isByteArrayLike(aCollection)) {
-                        offs = 0;
-                        len = __byteArraySize(aCollection);
-                    } else if (__isBytes(aCollection)) {
-                        offs = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aCollection))->c_ninstvars));
-                        len = __byteArraySize(aCollection) - offs;
-                    } else
-                        goto out;
-
-                    if (iStop > len) {
-                        RETURN(self);
-                    }
-                    if (iStop > len)
-                        iStop = len;
-                    len = iStop - iStart + 1;
-                    offs += iStart - 1;
+		    {
+			o_offs = (char *)__stringVal(aCollection)-(char *)__InstPtr(aCollection);
+			__WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs+iStart-1, len, _buffered, __INST(handleType));
+		    }
+		}
+	    } else {  // Not a string
+		if (__INST(binary) == true) {
+		    int offs;
+
+		    if (__isByteArrayLike(aCollection)) {
+			offs = 0;
+			len = __byteArraySize(aCollection);
+		    } else if (__isBytes(aCollection)) {
+			offs = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(aCollection))->c_ninstvars));
+			len = __byteArraySize(aCollection) - offs;
+		    } else
+			goto out;
+
+		    if (iStop > len) {
+			RETURN(self);
+		    }
+		    if (iStop > len)
+			iStop = len;
+		    len = iStop - iStart + 1;
+		    offs += iStart - 1;
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite(__stringVal(aCollection)+iStart-1, 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite(__stringVal(aCollection)+iStart-1, 1, len, f);
+		    } else
 #endif
-                    {
-                        o_offs = (char *)(__ByteArrayInstPtr(aCollection)->ba_element)-(char *)__InstPtr(aCollection);
-                        __WRITEBYTES_OBJ__(cnt, f,  aCollection, o_offs+offs, len, _buffered, __INST(handleType));
-                    }
-                } else
-                    goto out;
-            }
-            if (cnt == len) {
-                if (__isSmallInteger(__INST(position))) {
-                    INT np = __intVal(__INST(position)) + len;
-                    OBJ t;
-
-                    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                } else {
-                    __INST(position) = nil; /* i.e. do not know */
-                }
-                RETURN (self);
-            }
-            error = __mkSmallInteger(__threadErrno);
-        }
+		    {
+			o_offs = (char *)(__ByteArrayInstPtr(aCollection)->ba_element)-(char *)__InstPtr(aCollection);
+			__WRITEBYTES_OBJ__(cnt, f,  aCollection, o_offs+offs, len, _buffered, __INST(handleType));
+		    }
+		} else
+		    goto out;
+	    }
+	    if (cnt == len) {
+		if (__isSmallInteger(__INST(position))) {
+		    INT np = __intVal(__INST(position)) + len;
+		    OBJ t;
+
+		    t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		} else {
+		    __INST(position) = nil; /* i.e. do not know */
+		}
+		RETURN (self);
+	    }
+	    error = __mkSmallInteger(__threadErrno);
+	}
     }
 out: ;
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ self
+	lastErrorNumber := error.
+	self writeError:error.
+	^ self
     ].
     ^ super nextPutAll:aCollection startingAt:start to:stop
 !
@@ -6332,11 +6324,11 @@
      This is needed, so that you can do ('something' asUnicode16String errorPrintCR)"
 
     aString do:[:eachCharacter|
-        self nextPutUtf8:eachCharacter.
+	self nextPutUtf8:eachCharacter.
     ].
 
     "
-        'Bnnigheim' asUnicode16String errorPrintCR
+	'Bnnigheim' asUnicode16String errorPrintCR
     "
 !
 
@@ -6349,9 +6341,9 @@
 
      Use with care - non object oriented i/o.
      Warning:
-        in general, you cannot use this method to pass non-byte data to other
-        architectures (unless you prepared the buffer with care),
-        since it does not care for byte order or float representation."
+	in general, you cannot use this method to pass non-byte data to other
+	architectures (unless you prepared the buffer with care),
+	since it does not care for byte order or float representation."
 
     |error|
 
@@ -6361,16 +6353,16 @@
     STObject handle = self.instVarAt(I_handle);
 
     if (anObject.isSTString()) {
-        char[] chars = anObject.asSTString().characters;
-        handle.writeCharacters(chars, start.intValue()-1, count.intValue());
-        self.instVarAt_put(I_position, STObject.Nil);
-        return context._RETURN(count);
+	char[] chars = anObject.asSTString().characters;
+	handle.writeCharacters(chars, start.intValue()-1, count.intValue());
+	self.instVarAt_put(I_position, STObject.Nil);
+	return context._RETURN(count);
     }
     if (anObject.isSymbol()) {
-        java.lang.String chars = anObject.asSTSymbol().characters;
-        handle.writeString(chars, start.intValue()-1, count.intValue());
-        self.instVarAt_put(I_position, STObject.Nil);
-        return context._RETURN(count);
+	java.lang.String chars = anObject.asSTSymbol().characters;
+	handle.writeString(chars, start.intValue()-1, count.intValue());
+	self.instVarAt_put(I_position, STObject.Nil);
+	return context._RETURN(count);
     }
 #else
     int ret;
@@ -6384,121 +6376,121 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-            && (__INST(mode) != @symbol(readonly))
-            && __bothSmallInteger(count, start)
-        ) {
-            int _buffered = (__INST(buffered) == true);
-            FILEPOINTER f = __FILEVal(fp);
-            int len = __intVal(count);
-            int offs = __intVal(start) - 1;
-
-            if (__isExternalBytesLike(anObject)) {
-                OBJ sz;
-
-                nInstBytes = 0;
-                extPtr = (char *)__externalBytesAddress(anObject);
-                if (extPtr == NULL) goto bad;
-                sz = __externalBytesSize(anObject);
-                if (__isSmallInteger(sz)) {
-                    objSize = __intVal(sz);
-                } else {
-                    objSize = 0; /* unknown */
-                }
-            } else {
-                OBJ oClass = __Class(anObject);
-                int nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
-
-                nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
-                switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
-                    case BYTEARRAY:
-                    case WORDARRAY:
-                    case LONGARRAY:
-                    case SWORDARRAY:
-                    case SLONGARRAY:
-                    case FLOATARRAY:
-                        break;
-                    case DOUBLEARRAY:
+	if (((fp = __INST(handle)) != nil)
+	    && (__INST(mode) != @symbol(readonly))
+	    && __bothSmallInteger(count, start)
+	) {
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+	    int len = __intVal(count);
+	    int offs = __intVal(start) - 1;
+
+	    if (__isExternalBytesLike(anObject)) {
+		OBJ sz;
+
+		nInstBytes = 0;
+		extPtr = (char *)__externalBytesAddress(anObject);
+		if (extPtr == NULL) goto bad;
+		sz = __externalBytesSize(anObject);
+		if (__isSmallInteger(sz)) {
+		    objSize = __intVal(sz);
+		} else {
+		    objSize = 0; /* unknown */
+		}
+	    } else {
+		OBJ oClass = __Class(anObject);
+		int nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
+
+		nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
+		    case BYTEARRAY:
+		    case WORDARRAY:
+		    case LONGARRAY:
+		    case SWORDARRAY:
+		    case SLONGARRAY:
+		    case FLOATARRAY:
+			break;
+		    case DOUBLEARRAY:
 # ifdef __NEED_DOUBLE_ALIGN
-                        nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
+			nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
 # endif
-                        break;
-                    case LONGLONGARRAY:
-                    case SLONGLONGARRAY:
+			break;
+		    case LONGLONGARRAY:
+		    case SLONGLONGARRAY:
 # ifdef __NEED_LONGLONG_ALIGN
-                        nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
+			nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
 # endif
-                        break;
-                    default:
-                        goto bad;
-                }
-                extPtr = (char *)0;
-                objSize = __Size(anObject) - nInstBytes;
-            }
-            if ( (offs >= 0) && (len >= 0) && (objSize >= (len + offs)) ) {
-                int cnt;
-
-                if (_buffered) {
-                    __WRITING__(f)
-                }
-
-                if (extPtr) {
+			break;
+		    default:
+			goto bad;
+		}
+		extPtr = (char *)0;
+		objSize = __Size(anObject) - nInstBytes;
+	    }
+	    if ( (offs >= 0) && (len >= 0) && (objSize >= (len + offs)) ) {
+		int cnt;
+
+		if (_buffered) {
+		    __WRITING__(f)
+		}
+
+		if (extPtr) {
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite(extPtr+offs, 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite(extPtr+offs, 1, len, f);
+		    } else
 # endif
-                    {
-                        __WRITEBYTES__(cnt, f, extPtr+offs, len, _buffered, __INST(handleType));
-                    }
-                } else {
-                    /*
-                     * on interrupt, anObject may be moved to another location.
-                     * So we pass anObject, and the offset to the __WRITEBYTES_OBJ__ macro.
-                     */
-                    offs += nInstBytes;
+		    {
+			__WRITEBYTES__(cnt, f, extPtr+offs, len, _buffered, __INST(handleType));
+		    }
+		} else {
+		    /*
+		     * on interrupt, anObject may be moved to another location.
+		     * So we pass anObject, and the offset to the __WRITEBYTES_OBJ__ macro.
+		     */
+		    offs += nInstBytes;
 #if defined(WIN32) && !defined(__MINGW__)
-                    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                        cnt = __win32_fwrite((char *)anObject+offs, 1, len, f);
-                    } else
+		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			cnt = __win32_fwrite((char *)anObject+offs, 1, len, f);
+		    } else
 # endif
-                    {
-                         __WRITEBYTES_OBJ__(cnt, f, anObject, offs, len, _buffered, __INST(handleType));
-                    }
-                }
-
-                if (cnt >= 0) {
-                    if (__isSmallInteger(__INST(position))) {
-                        INT np = __intVal(__INST(position)) + cnt;
-                        OBJ t;
-
-                        t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                    } else {
-                        __INST(position) = nil; /* i.e. do not know */
-                    }
-                    RETURN ( __mkSmallInteger(cnt) );
-                } else /* cnt < 0 */ {
-                    if (
+		    {
+			 __WRITEBYTES_OBJ__(cnt, f, anObject, offs, len, _buffered, __INST(handleType));
+		    }
+		}
+
+		if (cnt >= 0) {
+		    if (__isSmallInteger(__INST(position))) {
+			INT np = __intVal(__INST(position)) + cnt;
+			OBJ t;
+
+			t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+		    } else {
+			__INST(position) = nil; /* i.e. do not know */
+		    }
+		    RETURN ( __mkSmallInteger(cnt) );
+		} else /* cnt < 0 */ {
+		    if (
 # ifdef EWOULDBLOCK
-                        (__threadErrno == EWOULDBLOCK) ||
+			(__threadErrno == EWOULDBLOCK) ||
 # endif
-                        (__threadErrno == EAGAIN)
-                    ) {
-                        RETURN ( __mkSmallInteger(0) );
-                    }
-                    __INST(position) = nil; /* i.e. do not know */
-                    error = __mkSmallInteger(__threadErrno);
-                }
-            }
-        }
+			(__threadErrno == EAGAIN)
+		    ) {
+			RETURN ( __mkSmallInteger(0) );
+		    }
+		    __INST(position) = nil; /* i.e. do not know */
+		    error = __mkSmallInteger(__threadErrno);
+		}
+	    }
+	}
     }
 bad: ;
 #endif /* not SCHTEAM */
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ 0
+	lastErrorNumber := error.
+	self writeError:error.
+	^ 0
     ].
     handle isNil ifTrue:[self errorNotOpen. ^ 0].
     (mode == #readonly) ifTrue:[self errorReadOnly. ^ 0].
@@ -6521,27 +6513,27 @@
     codePoint := aCharacter codePoint.
     (codePoint <= 16rD7FF
       or:[codePoint >= 16rE000 and:[codePoint <= 16rFFFF]]) ifTrue:[
-        self nextPutShort:codePoint MSB:true.
+	self nextPutShort:codePoint MSB:true.
     ] ifFalse:[codePoint <= 16r10FFFF ifTrue:[
-        |highBits lowBits|
-
-        codePoint := codePoint - 16r100000.
-        highBits := codePoint bitShift:-10.
-        lowBits := codePoint bitAnd:16r3FF.
-        self nextPutShort:highBits+16rD800 MSB:true.
-        self nextPutShort:lowBits+16rDC00 MSB:true.
+	|highBits lowBits|
+
+	codePoint := codePoint - 16r100000.
+	highBits := codePoint bitShift:-10.
+	lowBits := codePoint bitAnd:16r3FF.
+	self nextPutShort:highBits+16rD800 MSB:true.
+	self nextPutShort:lowBits+16rDC00 MSB:true.
     ] ifFalse:[
-        EncodingError raiseWith:aCharacter errorString:'Character cannot be encoded as UTF-16'.
+	EncodingError raiseWith:aCharacter errorString:'Character cannot be encoded as UTF-16'.
     ]].
 
     "
-        (FileStream newTemporary
-            nextPutUtf16:$B;
-            nextPutUtf16:$;
-            nextPutUtf16:(Character codePoint:16r10CCCC);
-            reset;
-            binary;
-            contents)
+	(FileStream newTemporary
+	    nextPutUtf16:$B;
+	    nextPutUtf16:$;
+	    nextPutUtf16:(Character codePoint:16r10CCCC);
+	    reset;
+	    binary;
+	    contents)
     "
 !
 
@@ -6559,84 +6551,84 @@
      || (__INST(handleType) == @symbol(socketFilePointer))
      || (__INST(handleType) == @symbol(socketHandle))
      || (__INST(handleType) == @symbol(pipeFilePointer))) {
-        if (((fp = __INST(handle)) != nil)
-         && (__INST(mode) != @symbol(readonly))
-        ) {
-            unsigned char c;
-            int _buffered = (__INST(buffered) == true);
-            FILEPOINTER f = __FILEVal(fp);
-
-            if (__INST(binary) != true) {
-                if (__isCharacter(aCharacter)) {
-                    unsigned codePoint = __intVal(__characterVal(aCharacter));
-
-                    if (codePoint <= 0xFF) {
-                        int cnt;
-
-                        c = codePoint;
+	if (((fp = __INST(handle)) != nil)
+	 && (__INST(mode) != @symbol(readonly))
+	) {
+	    unsigned char c;
+	    int _buffered = (__INST(buffered) == true);
+	    FILEPOINTER f = __FILEVal(fp);
+
+	    if (__INST(binary) != true) {
+		if (__isCharacter(aCharacter)) {
+		    unsigned codePoint = __intVal(__characterVal(aCharacter));
+
+		    if (codePoint <= 0xFF) {
+			int cnt;
+
+			c = codePoint;
     doWrite:
-                        if (! f) {
-                            fprintf(stderr, "oops - fileHandle is NULL in nextPut:\n");
-                            __INST(handle) = nil;
-                            goto out;
-                        }
-
-                        if (_buffered) {
-                            __WRITING__(f)
-                        }
+			if (! f) {
+			    fprintf(stderr, "oops - fileHandle is NULL in nextPut:\n");
+			    __INST(handle) = nil;
+			    goto out;
+			}
+
+			if (_buffered) {
+			    __WRITING__(f)
+			}
 #if defined(WIN32) && !defined(__MINGW__)
-                        if ((f == __win32_stdout()) || (f == __win32_stderr())) {
-                            cnt = __win32_fwrite(&c, 1, 1, f);
-                        } else
+			if ((f == __win32_stdout()) || (f == __win32_stderr())) {
+			    cnt = __win32_fwrite(&c, 1, 1, f);
+			} else
 #endif
-                        __WRITEBYTE__(cnt, f, &c, _buffered, __INST(handleType));
-                        if (cnt == 1) {
-                            if (__isSmallInteger(__INST(position))) {
-                                INT np = __intVal(__INST(position)) + 1;
-                                OBJ t;
-
-                                t = __MKINT(np); __INST(position) = t; __STORE(self, t);
-                            } else {
-                                __INST(position) = nil; /* i.e. do not know */
-                            }
-                            RETURN ( self );
-                        }
-                        error = __mkSmallInteger(__threadErrno);
-                    }
-                }
-            } else {
-                if (__isSmallInteger(aCharacter)) {
-                    c = __intVal(aCharacter);
-                    goto doWrite;
-                }
-            }
-        }
+			__WRITEBYTE__(cnt, f, &c, _buffered, __INST(handleType));
+			if (cnt == 1) {
+			    if (__isSmallInteger(__INST(position))) {
+				INT np = __intVal(__INST(position)) + 1;
+				OBJ t;
+
+				t = __MKINT(np); __INST(position) = t; __STORE(self, t);
+			    } else {
+				__INST(position) = nil; /* i.e. do not know */
+			    }
+			    RETURN ( self );
+			}
+			error = __mkSmallInteger(__threadErrno);
+		    }
+		}
+	    } else {
+		if (__isSmallInteger(aCharacter)) {
+		    c = __intVal(aCharacter);
+		    goto doWrite;
+		}
+	    }
+	}
     }
 out: ;
 %}.
     error notNil ifTrue:[
-        lastErrorNumber := error.
-        self writeError:error.
-        ^ self
+	lastErrorNumber := error.
+	self writeError:error.
+	^ self
     ].
     handle isNil ifTrue:[self errorNotOpen. ^ self].
     (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
     binary == true ifFalse:[
-        (aCharacter isCharacter not
-        or:[aCharacter codePoint > 16rFF]) ifTrue:[
-            self argumentMustBeCharacter.
-            ^ self.
-        ].
+	(aCharacter isCharacter not
+	or:[aCharacter codePoint > 16rFF]) ifTrue:[
+	    self argumentMustBeCharacter.
+	    ^ self.
+	].
     ] ifTrue:[
-        aCharacter isInteger ifFalse:[
-            self argumentMustBeInteger.
-            ^ self.
-        ].
+	aCharacter isInteger ifFalse:[
+	    self argumentMustBeInteger.
+	    ^ self.
+	].
     ].
     "/ migration support
     self
-        nextPutByte:aCharacter asInteger
-        toFile:handle
+	nextPutByte:aCharacter asInteger
+	toFile:handle
 ! !
 
 !ExternalStream class methodsFor:'documentation'!
--- a/GenericException.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/GenericException.st	Sun Feb 14 07:29:57 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -226,7 +224,6 @@
     self raiseErrorString:messageText
 ! !
 
-
 !GenericException class methodsFor:'accessing'!
 
 errorString
--- a/LibraryDefinition.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/LibraryDefinition.st	Sun Feb 14 07:29:57 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2006-2013 by eXept Software AG
               All Rights Reserved
--- a/Notification.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Notification.st	Sun Feb 14 07:29:57 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1999 by eXept Software AG
               All Rights Reserved
--- a/ProjectDefinition.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/ProjectDefinition.st	Sun Feb 14 07:29:57 2016 +0000
@@ -2738,7 +2738,6 @@
 ! !
 
 
-
 !ProjectDefinition class methodsFor:'description - project information'!
 
 applicationAdditionalIconFileNames
@@ -4744,7 +4743,6 @@
     ^ self subProjectMakeCallsUsing:'call vcmake %1 %2'.
 ! !
 
-
 !ProjectDefinition class methodsFor:'file templates'!
 
 autopackage_default_dot_apspec
--- a/Query.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Query.st	Sun Feb 14 07:29:57 2016 +0000
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 Notification subclass:#Query
 	instanceVariableNames:''
 	classVariableNames:''
@@ -261,22 +263,16 @@
     "
 ! !
 
-!Query class methodsFor:'misc ui support'!
-
-iconInBrowserSymbol
-    <resource: #programImage>
-
-    ^ #queryClassBrowserIcon
-! !
 
 !Query class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Query.st,v 1.13 2009-10-01 13:44:05 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Query.st,v 1.13 2009-10-01 13:44:05 cg Exp $'
+    ^ '$Header$'
 ! !
 
+
 Query initialize!
--- a/SharedPool.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/SharedPool.st	Sun Feb 14 07:29:57 2016 +0000
@@ -194,16 +194,6 @@
     "Modified (comment): / 06-03-2012 / 17:08:54 / cg"
 ! !
 
-!SharedPool class methodsFor:'misc ui support'!
-
-iconInBrowserSymbol
-    <resource: #programImage>
-
-    self == SharedPool ifTrue:[^ super iconInBrowserSymbol].
-    ^ #sharedPoolBrowserIcon
-
-    "Created: / 14-10-2010 / 12:04:32 / cg"
-! !
 
 !SharedPool class methodsFor:'name lookup'!
 
@@ -272,10 +262,10 @@
 !SharedPool class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SharedPool.st,v 1.23 2015-02-03 14:21:24 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/SharedPool.st,v 1.23 2015-02-03 14:21:24 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/StandaloneStartup.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/StandaloneStartup.st	Sun Feb 14 07:29:57 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2006 by eXept Software AG
               All Rights Reserved
--- a/Stream.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Stream.st	Sun Feb 14 07:29:57 2016 +0000
@@ -223,6 +223,58 @@
     self nextPutAll: someObject asString.
 ! !
 
+!Stream methodsFor:'Compatibility-ST80'!
+
+nextLongPut:aNumber
+    <resource: #obsolete>
+
+    "for ST-80 compatibility:
+     Write the argument, aNumber as a long (four bytes). 
+     The most significant byte is sent first."
+
+    ^ self nextPutLong:aNumber MSB:true
+
+    "Modified: 10.1.1996 / 19:38:54 / cg"
+!
+
+nextPutWord:aNumber
+    <resource: #obsolete>
+
+    "write the argument, aNumber as a signed short (two bytes);
+     write msb-first for compatibility with other smalltalks.
+     The receiver must support writing of binary bytes.
+     I dont know if it should be named nextPutWord: or nextWordPut:;
+     one of them will vanish ..."
+
+    ^ self nextPutInt16:aNumber MSB:true
+!
+
+nextTwoBytesPut: anInteger
+    <resource: #obsolete>
+    "Write anInteger as the next two bytes of the
+     receiver stream."
+
+    self obsoleteMethodWarning:'use #nextPutShort:MSB:'.
+
+    self
+        nextPutByte: (anInteger bitAnd: 255);
+        nextPutByte: ((anInteger bitShift: -8) bitAnd: 255)
+
+    "Created: / 21-06-2006 / 19:42:10 / fm"
+!
+
+nextWordPut:aNumber
+    <resource: #obsolete>
+
+    "for ST-80 compatibility:
+     Write the argument, aNumber as a short (two bytes). 
+     The most significant byte is sent first."
+
+    ^ self nextPutShort:aNumber MSB:true
+
+    "Modified: 10.1.1996 / 19:39:19 / cg"
+! !
+
 !Stream methodsFor:'accessing'!
 
 contents
@@ -957,59 +1009,6 @@
     "Created: 22.4.1997 / 10:42:26 / cg"
 !
 
-nextHyperMSB:msbFlag
-    "return a signed hyper (8 bytes) from the stream.
-     The receiver must support reading of binary bytes.
-
-     The msbFlag argument controls if the integer is to be read with
-     most-significant-byte-first (true) or least-first (false).
-     This interface is provided to allow talking to external programs,
-     where its known that the byte order is some definite one.
-     If you dont care (i.e. talk to other smalltalks) or you can control the
-     order, please use the corresponding xxxNet methods, which use a standard
-     network byte order."
-
-    |uval|
-
-    uval := self nextUnsignedHyperMSB:msbFlag.
-    "change from unsigned 0..FF..FF to signed -80..00..7FF..FF"
-
-    uval >= 16r8000000000000000 ifTrue:[
-      ^ uval - 16r10000000000000000 
-    ].
-    ^ uval
-
-    "
-     |bytes s|
-
-     bytes := #[16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF].
-     s := bytes readStream.
-     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
-     s reset.
-     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
-
-     bytes := #[16r10 16r00 16r00 16r00 16r00 16r00 16r00 16r00].
-     s := bytes readStream.
-     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
-     s reset.
-     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
-
-     bytes := #[16r12 16r34 16r56 16r78 16r9a 16rbc 16rde 16rf0].
-     s := bytes readStream.
-     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
-     s reset.
-     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
-
-     bytes := #[16rFe 16rdc 16rba 16r98 16r76 16r54 16r32 16r10].
-     s := bytes readStream.
-     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
-     s reset.
-     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
-    "
-
-    "Modified: / 14.1.1998 / 15:40:41 / cg"
-!
-
 nextIEEEDouble
     "read an 8-byte IEEE double precision float number"
 
@@ -1034,7 +1033,52 @@
     ^ ShortFloat readBinaryIEEESingleFrom:self MSB:msbFirst
 !
 
-nextLongMSB:msbFlag
+nextInt16MSB:msbFlag
+    "return a signed short (2 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where it's known that the byte order is some definite one.
+     If you don't care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    |b1 b2 uval "{ Class: SmallInteger }"|
+
+    b1 := self nextByte.
+    b2 := self nextByte.
+
+    msbFlag ifTrue:[
+        "most significant first"
+        uval := b1 bitShift:8.
+        uval := uval bitOr:b2.
+    ] ifFalse:[
+        "least significant first"
+        uval := b2 bitShift:8.
+        uval := uval bitOr:b1.
+    ].
+    "change from unsigned 0..FFFF to signed -8000..7FFF"
+    uval >= 16r8000 ifTrue:[
+        ^ uval - 16r10000 
+    ].
+    ^ uval
+
+    "Modified: 11.7.1996 / 10:07:04 / cg"
+!
+
+nextInt16Net
+    "return a signed short (2 bytes) in network byte order from the stream.
+     The receiver must support reading of binary bytes.
+     Network byte order is MSB per definition"
+
+    ^ self nextInt16MSB:true
+
+    "Created: 10.1.1996 / 19:49:41 / cg"
+!
+
+nextInt32MSB:msbFlag
     "return a signed long (4 bytes) from the stream.
      The receiver must support reading of binary bytes.
 
@@ -1076,86 +1120,101 @@
 
      bytes := #[16rFF 16rFF 16rFF 16rFF].
      s := bytes readStream.
-     Transcript showCR:(s nextLongMSB:true).
+     Transcript showCR:(s nextInt32MSB:true).
      s reset.
-     Transcript showCR:(s nextLongMSB:false).
+     Transcript showCR:(s nextInt32MSB:false).
 
      bytes := #[16r12 16r34 16r56 16r78].
      s := bytes readStream.
-     Transcript showCR:(s nextLongMSB:true).
+     Transcript showCR:(s nextInt32MSB:true).
      s reset.
-     Transcript showCR:(s nextLongMSB:false).
+     Transcript showCR:(s nextInt32MSB:false).
 
      bytes := #[16r89 16rab 16rcd 16ref].
      s := bytes readStream.
-     Transcript showCR:(s nextLongMSB:true).
+     Transcript showCR:(s nextInt32MSB:true).
      s reset.
-     Transcript showCR:(s nextLongMSB:false).
+     Transcript showCR:(s nextInt32MSB:false).
     "
 
     "Modified: / 14.1.1998 / 15:40:41 / cg"
 !
 
-nextLongNet
+nextInt32Net
     "return a signed long (4 bytes) in network byte order from the stream.
      The receiver must support reading of binary bytes."
 
-    ^ self nextLongMSB:true
+    ^ self nextInt32MSB:true
 
     "Created: 10.1.1996 / 19:49:28 / cg"
 !
 
+nextInt64MSB:msbFlag
+    "return a signed hyper (8 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    |uval|
+
+    uval := self nextUnsignedInt64MSB:msbFlag.
+    "change from unsigned 0..FF..FF to signed -80..00..7FF..FF"
+
+    uval >= 16r8000000000000000 ifTrue:[
+      ^ uval - 16r10000000000000000 
+    ].
+    ^ uval
+
+    "
+     |bytes s|
+
+     bytes := #[16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF].
+     s := bytes readStream.
+     Transcript showCR:(s nextInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextInt64MSB:false) hexPrintString.
+
+     bytes := #[16r10 16r00 16r00 16r00 16r00 16r00 16r00 16r00].
+     s := bytes readStream.
+     Transcript showCR:(s nextInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextInt64MSB:false) hexPrintString.
+
+     bytes := #[16r12 16r34 16r56 16r78 16r9a 16rbc 16rde 16rf0].
+     s := bytes readStream.
+     Transcript showCR:(s nextInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextInt64MSB:false) hexPrintString.
+
+     bytes := #[16rFe 16rdc 16rba 16r98 16r76 16r54 16r32 16r10].
+     s := bytes readStream.
+     Transcript showCR:(s nextInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextInt64MSB:false) hexPrintString.
+    "
+
+    "Modified: / 14.1.1998 / 15:40:41 / cg"
+!
+
+nextInt64Net
+    "return a signed longlong (8 bytes) in network byte order from the stream.
+     The receiver must support reading of binary bytes."
+
+    ^ self nextInt64MSB:true
+!
+
 nextNumber:numBytes 
     "Return the next n bytes as a positive Integer; bytes are taken msb-first."
 
     ^ self nextUnsigned:numBytes MSB:true
 !
 
-nextShortMSB:msbFlag
-    "return a signed short (2 bytes) from the stream.
-     The receiver must support reading of binary bytes.
-
-     The msbFlag argument controls if the integer is to be read with
-     most-significant-byte-first (true) or least-first (false).
-     This interface is provided to allow talking to external programs,
-     where it's known that the byte order is some definite one.
-     If you don't care (i.e. talk to other smalltalks) or you can control the
-     order, please use the corresponding xxxNet methods, which use a standard
-     network byte order."
-
-    |b1 b2 uval "{ Class: SmallInteger }"|
-
-    b1 := self nextByte.
-    b2 := self nextByte.
-
-    msbFlag ifTrue:[
-        "most significant first"
-        uval := b1 bitShift:8.
-        uval := uval bitOr:b2.
-    ] ifFalse:[
-        "least significant first"
-        uval := b2 bitShift:8.
-        uval := uval bitOr:b1.
-    ].
-    "change from unsigned 0..FFFF to signed -8000..7FFF"
-    uval >= 16r8000 ifTrue:[
-        ^ uval - 16r10000 
-    ].
-    ^ uval
-
-    "Modified: 11.7.1996 / 10:07:04 / cg"
-!
-
-nextShortNet
-    "return a signed short (2 bytes) in network byte order from the stream.
-     The receiver must support reading of binary bytes.
-     Network byte order is MSB per definition"
-
-    ^ self nextShortMSB:true
-
-    "Created: 10.1.1996 / 19:49:41 / cg"
-!
-
 nextSignedByte
     "return a signed byte (-128..127) from the stream.
      The receiver must support reading of binary bytes."
@@ -1195,17 +1254,17 @@
         ^ self nextByte
     ].
     numBytes == 2 ifTrue:[
-        ^ self nextUnsignedShortMSB:msbFlag
+        ^ self nextUnsignedInt16MSB:msbFlag
     ].
     numBytes == 3 ifTrue:[
-        val := self nextUnsignedShortMSB:msbFlag.
+        val := self nextUnsignedInt16MSB:msbFlag.
         msbFlag ifTrue:[
             ^ (val bitShift:8) + self nextByte
         ].
         ^ val + (self nextByte bitShift:16)
     ].
     numBytes == 4 ifTrue:[
-        ^ self nextUnsignedLongMSB:msbFlag
+        ^ self nextUnsignedInt32MSB:msbFlag
     ].
 
     val := 0.
@@ -1245,25 +1304,7 @@
      order, please use the corresponding xxxNet methods, which use a standard
      network byte order."
 
-    |bytes uval t|
-
-    bytes := self nextBytes:8.
-    uval := 0.
-
-    msbFlag ifTrue:[
-        "most significant first"
-        1 to:8 do:[:i |
-            t := (uval bitShift:8).
-            uval := t bitOr:(bytes at:i).
-        ].
-    ] ifFalse:[
-        "least significant first"
-        8 to:1 by:-1 do:[:i |
-            t := (uval bitShift:8).
-            uval := t bitOr:(bytes at:i).
-        ].
-    ].
-    ^ uval
+    ^ self nextUnsignedInt64MSB:msbFlag
 
     "
      |bytes s|
@@ -1296,7 +1337,42 @@
     "Modified: / 14.1.1998 / 15:40:41 / cg"
 !
 
-nextUnsignedLongMSB:msbFlag
+nextUnsignedInt16MSB:msbFlag
+    "return an unsigned short (2 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    |b1 b2|
+
+    b1 := self nextByte.
+    b2 := self nextByte.
+
+    msbFlag ifTrue:[
+        ^ (b1 bitShift:8) bitOr:b2
+    ].
+    ^ (b2 bitShift:8) bitOr:b1
+
+    "Modified: 11.7.1996 / 10:07:20 / cg"
+!
+
+nextUnsignedInt16Net
+    "return an unsigned short (2 bytes) in network byte order from the stream.
+     The receiver must support reading of binary bytes.
+     Network byte order is MSB per definition"
+
+    ^ self nextUnsignedInt16MSB:true
+
+    "Created: 10.1.1996 / 19:50:02 / cg"
+!
+
+nextUnsignedInt32MSB:msbFlag
     "return an unsigned long (4 bytes) from the stream.
      The receiver must support reading of binary bytes.
 
@@ -1331,11 +1407,238 @@
     "Modified: 11.7.1996 / 10:07:13 / cg"
 !
 
+nextUnsignedInt32Net
+    "return an unsigned long (4 bytes) in network byte order from the stream.
+     The receiver must support reading of binary bytes."
+
+    ^ self nextUnsignedInt32MSB:true
+
+    "Created: 10.1.1996 / 19:49:02 / cg"
+    "Modified: 10.1.1996 / 19:49:50 / cg"
+!
+
+nextUnsignedInt64MSB:msbFlag
+    "return an unsigned hyper (8 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    |bytes uval t|
+
+    bytes := self nextBytes:8.
+    uval := 0.
+
+    msbFlag ifTrue:[
+        "most significant first"
+        1 to:8 do:[:i |
+            t := (uval bitShift:8).
+            uval := t bitOr:(bytes at:i).
+        ].
+    ] ifFalse:[
+        "least significant first"
+        8 to:1 by:-1 do:[:i |
+            t := (uval bitShift:8).
+            uval := t bitOr:(bytes at:i).
+        ].
+    ].
+    ^ uval
+
+    "
+     |bytes s|
+
+     bytes := #[16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF].
+     s := bytes readStream.
+     Transcript showCR:(s nextUnsignedInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextUnsignedInt64MSB:false) hexPrintString.
+
+     bytes := #[16r10 16r00 16r00 16r00 16r00 16r00 16r00 16r00].
+     s := bytes readStream.
+     Transcript showCR:(s nextUnsignedInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextUnsignedInt64MSB:false) hexPrintString.
+
+     bytes := #[16r12 16r34 16r56 16r78 16r9a 16rbc 16rde 16rf0].
+     s := bytes readStream.
+     Transcript showCR:(s nextUnsignedInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextUnsignedInt64MSB:false) hexPrintString.
+
+     bytes := #[16rFe 16rdc 16rba 16r98 16r76 16r54 16r32 16r10].
+     s := bytes readStream.
+     Transcript showCR:(s nextUnsignedInt64MSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextUnsignedInt64MSB:false) hexPrintString.
+    "
+
+    "Modified: / 14.1.1998 / 15:40:41 / cg"
+!
+
+nextUnsignedInt64Net
+    "return an unsigned longlong (8 bytes) in network byte order from the stream.
+     The receiver must support reading of binary bytes."
+
+    ^ self nextUnsignedInt64MSB:true
+! !
+
+!Stream methodsFor:'non homogenous reading - obsolete'!
+
+nextHyperMSB:msbFlag
+    "return a signed hyper (8 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    ^ self nextInt64MSB:msbFlag
+
+    "
+     |bytes s|
+
+     bytes := #[16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF].
+     s := bytes readStream.
+     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
+
+     bytes := #[16r10 16r00 16r00 16r00 16r00 16r00 16r00 16r00].
+     s := bytes readStream.
+     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
+
+     bytes := #[16r12 16r34 16r56 16r78 16r9a 16rbc 16rde 16rf0].
+     s := bytes readStream.
+     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
+
+     bytes := #[16rFe 16rdc 16rba 16r98 16r76 16r54 16r32 16r10].
+     s := bytes readStream.
+     Transcript showCR:(s nextHyperMSB:true) hexPrintString.
+     s reset.
+     Transcript showCR:(s nextHyperMSB:false) hexPrintString.
+    "
+
+    "Modified: / 14.1.1998 / 15:40:41 / cg"
+!
+
+nextLong
+    "Read four bytes (msb-first) and return the value as a 32-bit signed Integer.
+     The returned value may be a LargeInteger.
+     (msb-first for compatibility with other smalltalks)"
+
+    ^ self nextInt32MSB:true
+!
+
+nextLongMSB:msbFlag
+    "return a signed long (4 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    ^ self nextInt32MSB:msbFlag
+
+    "
+     |bytes s|
+
+     bytes := #[16rFF 16rFF 16rFF 16rFF].
+     s := bytes readStream.
+     Transcript showCR:(s nextLongMSB:true).
+     s reset.
+     Transcript showCR:(s nextLongMSB:false).
+
+     bytes := #[16r12 16r34 16r56 16r78].
+     s := bytes readStream.
+     Transcript showCR:(s nextLongMSB:true).
+     s reset.
+     Transcript showCR:(s nextLongMSB:false).
+
+     bytes := #[16r89 16rab 16rcd 16ref].
+     s := bytes readStream.
+     Transcript showCR:(s nextLongMSB:true).
+     s reset.
+     Transcript showCR:(s nextLongMSB:false).
+    "
+
+    "Modified: / 14.1.1998 / 15:40:41 / cg"
+!
+
+nextLongNet
+    "return a signed long (4 bytes) in network byte order from the stream.
+     The receiver must support reading of binary bytes."
+
+    ^ self nextInt32MSB:true
+
+    "Created: 10.1.1996 / 19:49:28 / cg"
+!
+
+nextShortMSB:msbFlag
+    "return a signed short (2 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where it's known that the byte order is some definite one.
+     If you don't care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    ^ self nextInt16MSB:msbFlag
+
+    "Modified: 11.7.1996 / 10:07:04 / cg"
+!
+
+nextShortNet
+    "return a signed short (2 bytes) in network byte order from the stream.
+     The receiver must support reading of binary bytes.
+     Network byte order is MSB per definition"
+
+    ^ self nextInt16MSB:true
+
+    "Created: 10.1.1996 / 19:49:41 / cg"
+!
+
+nextUnsignedLongMSB:msbFlag
+    "return an unsigned long (4 bytes) from the stream.
+     The receiver must support reading of binary bytes.
+
+     The msbFlag argument controls if the integer is to be read with
+     most-significant-byte-first (true) or least-first (false).
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    ^ self nextUnsignedInt32MSB:msbFlag
+
+    "Modified: 11.7.1996 / 10:07:13 / cg"
+!
+
 nextUnsignedLongNet
     "return an unsigned long (4 bytes) in network byte order from the stream.
      The receiver must support reading of binary bytes."
 
-    ^ self nextUnsignedLongMSB:true
+    ^ self nextUnsignedInt32MSB:true
 
     "Created: 10.1.1996 / 19:49:02 / cg"
     "Modified: 10.1.1996 / 19:49:50 / cg"
@@ -1353,15 +1656,7 @@
      order, please use the corresponding xxxNet methods, which use a standard
      network byte order."
 
-    |b1 b2|
-
-    b1 := self nextByte.
-    b2 := self nextByte.
-
-    msbFlag ifTrue:[
-        ^ (b1 bitShift:8) bitOr:b2
-    ].
-    ^ (b2 bitShift:8) bitOr:b1
+    ^ self nextUnsignedInt16MSB:msbFlag
 
     "Modified: 11.7.1996 / 10:07:20 / cg"
 !
@@ -1371,23 +1666,13 @@
      The receiver must support reading of binary bytes.
      Network byte order is MSB per definition"
 
-    ^ self nextUnsignedShortMSB:true
+    ^ self nextUnsignedInt16MSB:true
 
     "Created: 10.1.1996 / 19:50:02 / cg"
 ! !
 
 !Stream methodsFor:'non homogenous writing'!
 
-nextLongPut:aNumber
-    "for ST-80 compatibility:
-     Write the argument, aNumber as a long (four bytes). 
-     The most significant byte is sent first."
-
-    ^ self nextPutLong:aNumber MSB:true
-
-    "Modified: 10.1.1996 / 19:38:54 / cg"
-!
-
 nextNumber:n put:v 
     "Append to the receiver the argument, v, which is a positive Integer,
      as the next n bytes. Bytes are written msb first. 
@@ -1564,71 +1849,6 @@
     "Created: 22.4.1997 / 10:44:18 / cg"
 !
 
-nextPutHyper:aNumber MSB:msbFlag
-    "Write the argument, aNumber as a hyper (8 bytes). 
-     If msbFlag is true, data is written most-significant byte first; 
-     otherwise least first. 
-     Returns the receiver on ok, nil on error.
-     The receiver must support writing of binary bytes.
-
-     This interface is provided to allow talking to external programs,
-     where its known that the byte order is some definite one.
-     If you dont care (i.e. talk to other smalltalks) or you can control the
-     order, please use the corresponding xxxNet methods, which use a standard
-     network byte order."
-
-    msbFlag ifTrue:[
-        1 to:8 do:[:i |
-            self nextPutByte:(aNumber digitByteAt:8+1-i)
-        ].
-    ] ifFalse:[
-        1 to:8 do:[:i |
-            self nextPutByte:(aNumber digitByteAt:i)
-        ].
-    ].
-
-    "
-     |s bytes|
-
-     s := #[] writeStream.
-     s nextPutHyper:16r123456789abcdef0 MSB:false.
-     bytes := s contents.
-     s := bytes readStream.
-     (s nextHyperMSB:false) hexPrintString.   
-    "
-    "
-     |s bytes|
-
-     s := #[] writeStream.
-     s nextPutHyper:16r123456789abcdef0 MSB:true.
-     bytes := s contents.
-     s := bytes readStream.
-     (s nextHyperMSB:true) hexPrintString.   
-.
-    "
-    "
-     |s bytes|
-
-     s := #[] writeStream.
-     s nextPutHyper:16r-8000000000000000 MSB:true.
-     bytes := s contents.
-     s := bytes readStream.
-     (s nextHyperMSB:true) hexPrintString.    
-    "
-    "
-     |s bytes|
-
-     s := #[] writeStream.
-     s nextPutHyper:16r-8000000000000000 MSB:false.
-     bytes := s contents.
-     s := bytes readStream.
-     (s nextHyperMSB:false) hexPrintString.   
-    "
-
-    "Modified: / 01-11-1997 / 18:30:52 / cg"
-    "Modified: / 22-06-2006 / 11:31:37 / fm"
-!
-
 nextPutIEEEDouble:aFloat
     "write an 8-byte IEEE double precision float number"
 
@@ -1653,7 +1873,66 @@
     ShortFloat storeBinaryIEEESingle:aFloat on:self MSB:msb.
 !
 
-nextPutLong:aNumber MSB:msbFlag
+nextPutInt16:anIntegerOrCharacter MSB:msbFlag
+    "Write the argument, anIntegerOrCharacter as a short (two bytes). 
+     If msbFlag is true, data is written most-significant byte first; 
+     otherwise least first. 
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes.
+
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you don't care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    |iNum "{ Class: SmallInteger }" hi lo b1 b2|
+
+    iNum := anIntegerOrCharacter asInteger.
+    lo := iNum digitByteAt:1.
+    hi := iNum digitByteAt:2.
+    msbFlag ifTrue:[
+        "high word first"
+        b1 := hi.
+        b2 := lo.
+    ] ifFalse:[
+        "low word first"
+        b1 := lo.
+        b2 := hi.
+    ].
+    self nextPutByte:b1.
+    self nextPutByte:b2.
+
+    "
+     |s|
+
+     s := #[] writeStream.
+     s nextPutInt16:16r1234 MSB:false.
+     s contents.  
+    "
+    "
+     |s|
+
+     s := #[] writeStream.
+     s nextPutInt16:16r1234 MSB:true.
+     s contents.
+    "
+
+    "Modified: / 22-06-2006 / 11:30:26 / fm"
+!
+
+nextPutInt16Net:aNumber
+    "Write the argument, aNumber as a short (two bytes) in the network byte order.
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes.
+     Network byte order is MSB per definition"
+
+    ^ self nextPutInt16:aNumber MSB:true.
+
+    "Created: 10.1.1996 / 19:50:33 / cg"
+!
+
+nextPutInt32:aNumber MSB:msbFlag
     "Write the argument, aNumber as a long (four bytes). 
      If msbFlag is true, data is written most-significant byte first; 
      otherwise least first. 
@@ -1694,57 +1973,54 @@
      |s bytes|
 
      s := #[] writeStream.
-     s nextPutLong:16r12345678 MSB:false.
+     s nextPutInt32:16r12345678 MSB:false.
      bytes := s contents.
      s := bytes readStream.
-     (s nextLongMSB:false) hexPrintString.   
+     (s nextInt32MSB:false) hexPrintString.   
     "
     "
      |s bytes|
 
      s := #[] writeStream.
-     s nextPutLong:16r12345678 MSB:true.
+     s nextPutInt32:16r12345678 MSB:true.
      bytes := s contents.
      s := bytes readStream.
-     (s nextLongMSB:true) hexPrintString.   
+     (s nextInt32MSB:true) hexPrintString.   
 .
     "
     "
      |s bytes|
 
      s := #[] writeStream.
-     s nextPutLong:16r-80000000 MSB:true.
+     s nextPutInt32:16r-80000000 MSB:true.
      bytes := s contents.
      s := bytes readStream.
-     (s nextLongMSB:true) hexPrintString.   
+     (s nextInt32MSB:true) hexPrintString.   
     "
     "
      |s bytes|
 
      s := #[] writeStream.
-     s nextPutLong:16r-80000000 MSB:false.
+     s nextPutInt32:16r-80000000 MSB:false.
      bytes := s contents.
      s := bytes readStream.
-     (s nextLongMSB:false) hexPrintString.   
+     (s nextInt32MSB:false) hexPrintString.   
     "
 
     "Modified: / 01-11-1997 / 18:30:52 / cg"
     "Modified: / 22-06-2006 / 11:31:43 / fm"
 !
 
-nextPutLongNet:aNumber
+nextPutInt32Net:aNumber
     "Write the argument, aNumber as a long (four bytes) in the network byte order.
      Returns the receiver on ok, nil on error.
      The receiver must support writing of binary bytes."
 
-    ^ self nextPutLong:aNumber MSB:true
-
-    "Modified: 10.1.1996 / 19:47:10 / cg"
-    "Created: 10.1.1996 / 19:50:23 / cg"
+    ^ self nextPutInt32:aNumber MSB:true
 !
 
-nextPutShort:anIntegerOrCharacter MSB:msbFlag
-    "Write the argument, anIntegerOrCharacter as a short (two bytes). 
+nextPutInt64:aNumber MSB:msbFlag
+    "Write the argument, aNumber as a longlong (8 bytes). 
      If msbFlag is true, data is written most-significant byte first; 
      otherwise least first. 
      Returns the receiver on ok, nil on error.
@@ -1756,50 +2032,127 @@
      order, please use the corresponding xxxNet methods, which use a standard
      network byte order."
 
-    |iNum "{ Class: SmallInteger }" hi lo b1 b2|
-
-    iNum := anIntegerOrCharacter asInteger.
-    lo := iNum digitByteAt:1.
-    hi := iNum digitByteAt:2.
     msbFlag ifTrue:[
-        "high word first"
-        b1 := hi.
-        b2 := lo.
+        1 to:8 do:[:i |
+            self nextPutByte:(aNumber digitByteAt:8+1-i)
+        ].
     ] ifFalse:[
-        "low word first"
-        b1 := lo.
-        b2 := hi.
+        1 to:8 do:[:i |
+            self nextPutByte:(aNumber digitByteAt:i)
+        ].
     ].
-    self nextPutByte:b1.
-    self nextPutByte:b2.
 
     "
-     |s|
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutUInt64:16r123456789abcdef0 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:false) hexPrintString.   
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutUInt64:16r123456789abcdef0 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:true) hexPrintString.   
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutUInt64:16r-8000000000000000 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:true) hexPrintString.    
+    "
+    "
+     |s bytes|
 
      s := #[] writeStream.
-     s nextPutShort:16r1234 MSB:false.
-     s contents.  
+     s nextPutUInt64:16r-8000000000000000 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:false) hexPrintString.   
     "
+
+    "Modified: / 01-11-1997 / 18:30:52 / cg"
+    "Modified: / 22-06-2006 / 11:31:37 / fm"
+!
+
+nextPutInt64Net:aNumber
+    "Write the argument, aNumber as a longlong (8 bytes) in the network byte order.
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes."
+
+    ^ self nextPutInt64:aNumber MSB:true
+!
+
+nextPutUInt64:aNumber MSB:msbFlag
+    "Write the argument, aNumber as a hyper (8 bytes). 
+     If msbFlag is true, data is written most-significant byte first; 
+     otherwise least first. 
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes.
+
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you don't care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    msbFlag ifTrue:[
+        1 to:8 do:[:i |
+            self nextPutByte:(aNumber digitByteAt:8+1-i)
+        ].
+    ] ifFalse:[
+        1 to:8 do:[:i |
+            self nextPutByte:(aNumber digitByteAt:i)
+        ].
+    ].
+
     "
-     |s|
+     |s bytes|
 
      s := #[] writeStream.
-     s nextPutShort:16r1234 MSB:true.
-     s contents.
+     s nextPutUInt64:16r123456789abcdef0 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:false) hexPrintString.   
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutUInt64:16r123456789abcdef0 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:true) hexPrintString.   
+    "
     "
-
-    "Modified: / 22-06-2006 / 11:30:26 / fm"
-!
-
-nextPutShortNet:aNumber
-    "Write the argument, aNumber as a short (two bytes) in the network byte order.
-     Returns the receiver on ok, nil on error.
-     The receiver must support writing of binary bytes.
-     Network byte order is MSB per definition"
-
-    ^ self nextPutShort:aNumber MSB:true.
-
-    "Created: 10.1.1996 / 19:50:33 / cg"
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutUInt64:16r-8000000000000000 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:true) hexPrintString.    
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutUInt64:16r-8000000000000000 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextUInt64MSB:false) hexPrintString.   
+    "
+
+    "Modified: / 01-11-1997 / 18:30:52 / cg"
+    "Modified: / 22-06-2006 / 11:31:37 / fm"
 !
 
 nextPutUtf16:aCharacter
@@ -1900,40 +2253,177 @@
             asByteArray
             
     "
-!
-
-nextPutWord:aNumber
-    "write the argument, aNumber as a signed short (two bytes);
-     write msb-first for compatibility with other smalltalks.
+! !
+
+!Stream methodsFor:'non homogenous writing - obsolete'!
+
+nextPutHyper:aNumber MSB:msbFlag
+    "Write the argument, aNumber as a hyper (8 bytes). 
+     If msbFlag is true, data is written most-significant byte first; 
+     otherwise least first. 
+     Returns the receiver on ok, nil on error.
      The receiver must support writing of binary bytes.
-     I dont know if it should be named nextPutWord: or nextWordPut:;
-     one of them will vanish ..."
-
-    ^ self nextPutShort:aNumber MSB:true
+
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    ^ self nextPutInt64:aNumber MSB:msbFlag
+
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutHyper:16r123456789abcdef0 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextHyperMSB:false) hexPrintString.   
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutHyper:16r123456789abcdef0 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextHyperMSB:true) hexPrintString.   
+.
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutHyper:16r-8000000000000000 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextHyperMSB:true) hexPrintString.    
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutHyper:16r-8000000000000000 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextHyperMSB:false) hexPrintString.   
+    "
+
+    "Modified: / 01-11-1997 / 18:30:52 / cg"
+    "Modified: / 22-06-2006 / 11:31:37 / fm"
 !
 
-nextTwoBytesPut: anInteger
-        <resource: #obsolete>
-        "Write anInteger as the next two bytes of the
-         receiver stream."
-
-    self obsoleteMethodWarning:'use #nextPutShort:MSB:'.
-
-    self
-        nextPutByte: (anInteger bitAnd: 255);
-        nextPutByte: ((anInteger bitShift: -8) bitAnd: 255)
-
-    "Created: / 21-06-2006 / 19:42:10 / fm"
+nextPutLong:aNumber MSB:msbFlag
+    "Write the argument, aNumber as a long (four bytes). 
+     If msbFlag is true, data is written most-significant byte first; 
+     otherwise least first. 
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes.
+
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you dont care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    ^ self nextPutInt32:aNumber MSB:msbFlag
+
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutLong:16r12345678 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextLongMSB:false) hexPrintString.   
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutLong:16r12345678 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextLongMSB:true) hexPrintString.   
+.
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutLong:16r-80000000 MSB:true.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextLongMSB:true) hexPrintString.   
+    "
+    "
+     |s bytes|
+
+     s := #[] writeStream.
+     s nextPutLong:16r-80000000 MSB:false.
+     bytes := s contents.
+     s := bytes readStream.
+     (s nextLongMSB:false) hexPrintString.   
+    "
+
+    "Modified: / 01-11-1997 / 18:30:52 / cg"
+    "Modified: / 22-06-2006 / 11:31:43 / fm"
 !
 
-nextWordPut:aNumber
-    "for ST-80 compatibility:
-     Write the argument, aNumber as a short (two bytes). 
-     The most significant byte is sent first."
-
-    ^ self nextPutShort:aNumber MSB:true
-
-    "Modified: 10.1.1996 / 19:39:19 / cg"
+nextPutLongNet:aNumber
+    "Write the argument, aNumber as a long (four bytes) in the network byte order.
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes."
+
+    ^ self nextPutInt32:aNumber MSB:true
+
+    "Modified: 10.1.1996 / 19:47:10 / cg"
+    "Created: 10.1.1996 / 19:50:23 / cg"
+!
+
+nextPutShort:anIntegerOrCharacter MSB:msbFlag
+    "Write the argument, anIntegerOrCharacter as a short (two bytes). 
+     If msbFlag is true, data is written most-significant byte first; 
+     otherwise least first. 
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes.
+
+     This interface is provided to allow talking to external programs,
+     where its known that the byte order is some definite one.
+     If you don't care (i.e. talk to other smalltalks) or you can control the
+     order, please use the corresponding xxxNet methods, which use a standard
+     network byte order."
+
+    ^ self nextPutInt16:anIntegerOrCharacter MSB:true
+
+    "
+     |s|
+
+     s := #[] writeStream.
+     s nextPutShort:16r1234 MSB:false.
+     s contents.  
+    "
+    "
+     |s|
+
+     s := #[] writeStream.
+     s nextPutShort:16r1234 MSB:true.
+     s contents.
+    "
+
+    "Modified: / 22-06-2006 / 11:30:26 / fm"
+!
+
+nextPutShortNet:aNumber
+    "Write the argument, aNumber as a short (two bytes) in the network byte order.
+     Returns the receiver on ok, nil on error.
+     The receiver must support writing of binary bytes.
+     Network byte order is MSB per definition"
+
+    ^ self nextPutInt16:aNumber MSB:true.
+
+    "Created: 10.1.1996 / 19:50:33 / cg"
 ! !
 
 !Stream methodsFor:'open / close'!
--- a/Unicode16String.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Unicode16String.st	Sun Feb 14 07:29:57 2016 +0000
@@ -61,7 +61,6 @@
     "Modified: 30.6.1997 / 15:39:21 / cg"
 ! !
 
-
 !Unicode16String class methodsFor:'reading'!
 
 readFrom:aStreamOrString onError:exceptionBlock
@@ -213,7 +212,6 @@
     ^ true
 ! !
 
-
 !Unicode16String class methodsFor:'documentation'!
 
 version
--- a/UninterpretedBytes.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/UninterpretedBytes.st	Sun Feb 14 07:29:57 2016 +0000
@@ -549,6 +549,62 @@
 
 !UninterpretedBytes methodsFor:'accessing-arbitrary-long ints'!
 
+signedIntegerAt:index length:n bigEndian:bigEndian
+    "return the n-byte signed integer starting at index.
+     With n=1, this returns the single signed byte's value,
+     n=2, a signed short, n=4 a signed int etc.
+     Useful to extract arbitrary long integers"
+
+    |val highByte|
+
+    val := 0.
+    bigEndian ifTrue:[
+        highByte := (self at:index).
+        index to:index+n-1 do:[:i |
+            val := (val<<8) + (self at:i)
+        ]
+    ] ifFalse:[
+        highByte := (self at:index+n-1).
+        index+n-1 to:index by:-1 do:[:i |
+            val := (val<<8) + (self at:i)
+        ]
+    ].
+    (highByte bitTest:16r80) ifTrue:[
+        ^ val - (1 bitShift:(n*8))
+    ].    
+    ^ val
+
+    "
+     |b|
+     b := #[ 16r01 16rFF 16r00 16r04 16r05 ].
+     (b signedIntegerAt:2 length:2 bigEndian:false). ' -> 255 (00FF) '.
+     (b signedIntegerAt:2 length:2 bigEndian:true).  ' -> -256 (FF00) '.   
+
+     b := #[ 16r01 16r00 16rFF 16r04 16r05 ].
+     (b signedIntegerAt:2 length:2 bigEndian:false). ' -> -256 (FF00) '.
+     (b signedIntegerAt:2 length:2 bigEndian:true).  ' -> 255 (00FF) '.   
+
+     b := #[ 16r01 16r7F 16r00 16r04 16r05 ].
+     (b signedIntegerAt:2 length:2 bigEndian:false). ' -> 127 (007F) '.
+     (b signedIntegerAt:2 length:2 bigEndian:true).  ' -> 32512 (7F00) '.      
+    "
+    
+    "
+     |b|
+     b := #[ 16r01 16r02 16r03 16r04 16r05 ].
+     (b signedIntegerAt:2 length:4 bigEndian:false).
+     (b signedIntegerAt:2 length:4 bigEndian:true).
+
+     b := #[ 16r01 16r82 16r03 16r04 16r05 ].
+     (b signedIntegerAt:2 length:4 bigEndian:false).
+     (b signedIntegerAt:2 length:4 bigEndian:true).
+
+     b := #[ 16r01 16r82 16r03 16r04 16r85 ].
+     (b signedIntegerAt:2 length:4 bigEndian:false).
+     (b signedIntegerAt:2 length:4 bigEndian:true).
+    "
+!
+
 unsignedIntegerAt:index length:n bigEndian:bigEndian
     "return the n-byte unsigned integer starting at index.
      With n=1, this returns the single byte's value,
@@ -2664,7 +2720,7 @@
 !
 
 stringAt:index put:aString
-    "copy aString to the externalBytes, starting at index up to
+    "copy aString to the receiver, starting at index up to
      (and including) the 0-byte (which is always written).
      The index is a smalltalk index (i.e. 1-based)."
 
@@ -2672,8 +2728,8 @@
 
     i := index.
     aString do:[:aChar |
-	self byteAt:i put:aChar codePoint.
-	i := i + 1.
+        self byteAt:i put:aChar codePoint.
+        i := i + 1.
     ].
     self byteAt:i put:0.
     ^ aString
@@ -2684,7 +2740,7 @@
      bytes := ExternalBytes new:10.
      bytes stringAt:1 put:'hello'.
      1 to:bytes size do:[:i |
-	Transcript showCR:(bytes at:i)
+        Transcript showCR:(bytes at:i)
      ].
     "
 
@@ -2696,7 +2752,7 @@
 !
 
 stringAt:index put:aString size:maxSize
-    "copy aString to the externalBytes, starting at index up to either maxSize characters,
+    "copy aString to the receiver, starting at index up to either maxSize characters,
      or (and including) the 0-byte, whichever is encountered first.
      The final 0-byte is only written, if the string is shorter than maxSize.
      The index is a smalltalk index (i.e. 1-based)."
@@ -2709,10 +2765,10 @@
 
     i := index.
     aString do:[:aChar |
-	self byteAt:i put:aChar codePoint.
-	i := i + 1.
-	remaining := remaining - 1.
-	remaining <= 0 ifTrue:[^ aString].
+        self byteAt:i put:aChar codePoint.
+        i := i + 1.
+        remaining := remaining - 1.
+        remaining <= 0 ifTrue:[^ aString].
     ].
     self byteAt:i put:0.
     ^ aString
@@ -2723,7 +2779,7 @@
      bytes := ExternalBytes new:10.
      bytes stringAt:1 put:'hello' size:3.
      1 to:bytes size do:[:i |
-	Transcript showCR:(bytes at:i)
+        Transcript showCR:(bytes at:i)
      ]
     "
     "
@@ -2732,7 +2788,7 @@
      bytes := ByteArray new:10 withAll:16rFF.
      bytes stringAt:1 put:'he' size:3.
      1 to:bytes size do:[:i |
-	Transcript showCR:(bytes at:i)
+        Transcript showCR:(bytes at:i)
      ]
     "
 
--- a/Warning.st	Sat Feb 13 07:51:52 2016 +0000
+++ b/Warning.st	Sun Feb 14 07:29:57 2016 +0000
@@ -119,13 +119,6 @@
     "Created: / 23.7.1999 / 15:34:27 / stefan"
 ! !
 
-!Warning class methodsFor:'misc ui support'!
-
-iconInBrowserSymbol
-    <resource: #programImage>
-
-    ^ #warningClassBrowserIcon
-! !
 
 !Warning methodsFor:'default actions'!
 
@@ -169,11 +162,11 @@
 !Warning class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Warning.st,v 1.16 2015-01-20 14:39:05 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Warning.st,v 1.16 2015-01-20 14:39:05 cg Exp $'
+    ^ '$Header$'
 ! !