Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 25 Apr 2016 10:19:26 +0100
branchjv
changeset 19659 0f585374259a
parent 19658 cb18e7c8fb6d (diff)
parent 19645 053a5232234d (current diff)
child 19660 d48041817c55
Merge
ByteArray.st
HashStream.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,23 @@
+syntax: glob
+*.chg
+*~
+*.orig
+*.o
+*.so
+*.sc
+*Init.c
+*.H
+*.STH
+*/makefile
+*/docs/output/*
+*/docs/*.xml.profiled
+
+*/objbc
+*/objvc
+*.res
+*-Test.xml
+*.base
+*.orig
+*.local
+*.other
+makefile
--- a/AbortOperationRequest.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/AbortOperationRequest.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 AbortAllOperationRequest subclass:#AbortOperationRequest
@@ -64,7 +63,14 @@
 !AbortOperationRequest class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbortOperationRequest.st,v 1.5 2005-01-11 17:04:57 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbortOperationRequest.st,v 1.5 2005/01/11 17:04:57 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: AbortOperationRequest.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 AbortOperationRequest initialize!
+
+
+
--- a/AbstractOperatingSystem.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/AbstractOperatingSystem.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -4757,17 +4755,17 @@
     "/
     appPath := self pathOfSTXExecutable.
     appPath notNil ifTrue:[
-	appDir := appPath asFilename directory.
-	appPath := appDir pathName.
-	(sysPath includes:appPath) ifFalse:[
-	    sysPath add:appPath.
-	].
-	appDir baseName = 'bin' ifTrue:[
-	    appPath := appDir directory pathName.
-	    (sysPath includes:appPath) ifFalse:[
-		sysPath add:appPath.
-	    ].
-	].
+        appDir := appPath asFilename directory.
+        appPath := appDir pathName.
+        (sysPath includes:appPath) ifFalse:[
+            sysPath add:appPath.
+        ].
+        appDir baseName = 'bin' ifTrue:[
+            appPath := appDir directory pathName.
+            (sysPath includes:appPath) ifFalse:[
+                sysPath add:appPath.
+            ].
+        ].
     ].
 
     "/
@@ -4775,48 +4773,51 @@
     "/
     homePath := self getHomeDirectory.
     homePath notNil ifTrue:[
-	"/
-	"/ a users private smalltalk directory in its home (login) directory
-	"/
-	OperatingSystem isUNIXlike ifTrue:[
-	    priv := '.smalltalk'.
-	] ifFalse:[
-	    priv := 'smalltalk'.
-	].
-	userPrivateSTXDir := homePath asFilename construct:priv.
-	(userPrivateSTXDir isDirectory) ifTrue:[
-	    userPrivateSTXDir := userPrivateSTXDir pathName.
-	    (sysPath includes:userPrivateSTXDir) ifFalse:[
-		sysPath add:userPrivateSTXDir
-	    ]
-	].
+        "/
+        "/ a users private smalltalk directory in its home (login) directory
+        "/
+        OperatingSystem isUNIXlike ifTrue:[
+            priv := #('.smalltalk')
+        ] ifFalse:[
+            priv := #('smalltalk' '.smalltalk')
+        ].
+        priv do:[:p |
+            userPrivateSTXDir := homePath asFilename construct:p.
+            (userPrivateSTXDir isDirectory) ifTrue:[
+                userPrivateSTXDir := userPrivateSTXDir pathName.
+                (sysPath includes:userPrivateSTXDir) ifFalse:[
+                    sysPath add:userPrivateSTXDir
+                ]
+            ].
+        ].
     ].
 
     "/
     "/ SMALLTALK_LIBDIR, STX_LIBDIR and STX_TOPDIR from the environment
     "/
     #(
-	'SMALLTALK_LIBDIR'
-	'STX_LIBDIR'
-	'STX_TOPDIR'
+        'SMALLTALK_LIBDIR'
+        'STX_LIBDIR'
+        'STX_TOPDIR'
      ) do:[:each |
-	p := OperatingSystem decodePath:(OperatingSystem getEnvironment:each).
-	p notNil ifTrue:[
-	    p := p asFilename pathName.
-	    (p asFilename isDirectory) ifTrue:[
-		(sysPath includes:p) ifFalse:[
-		     sysPath add:p
-		]
-	    ]
-	].
+        p := OperatingSystem decodePath:(OperatingSystem getEnvironment:each).
+        p notNil ifTrue:[
+            p := p asFilename pathName.
+            (p asFilename isDirectory) ifTrue:[
+                (sysPath includes:p) ifFalse:[
+                     sysPath add:p
+                ]
+            ]
+        ].
     ].
     ^ sysPath
 
     "
-	OperatingSystem defaultSystemPath
-    "
-
-    "Modified: / 24.12.1999 / 00:30:27 / cg"
+        OperatingSystem defaultSystemPath
+    "
+
+    "Modified: / 24-12-1999 / 00:30:27 / cg"
+    "Modified: / 22-04-2016 / 21:11:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 encodePath:pathName
@@ -7831,6 +7832,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- a/ActivityNotification.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ActivityNotification.st	Mon Apr 25 10:19:26 2016 +0100
@@ -74,7 +74,14 @@
 !ActivityNotification class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ActivityNotification.st,v 1.4 2008-10-04 08:42:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ActivityNotification.st,v 1.4 2008/10/04 08:42:14 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ActivityNotification.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 ActivityNotification initialize!
+
+
+
--- a/AllocationFailure.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/AllocationFailure.st	Mon Apr 25 10:19:26 2016 +0100
@@ -40,9 +40,14 @@
 "
 ! !
 
+
 !AllocationFailure class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/AllocationFailure.st,v 1.6 2013-03-13 23:47:13 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: AllocationFailure.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/ApplicationDefinition.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ApplicationDefinition.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1810,6 +1810,10 @@
 LIBFILES=$(LIBDIR_LIBRUN)\librun.lib
 ALLLIB=$(LIBFILES) $(APP_IMPORTLIBS) $(APP_RT_LIB)
 
+!!if defined(USEMINGW32)
+RT_DLL=libgcc_s_dw2-1.dll
+!!endif
+
 REQUIRED_LIBS=librun.dll %(REQUIRED_LIBS)
 REQUIRED_FILES=$(RT_DLL) $(X11_DLL) $(XEXT_DLL) symbols.stc $(REQUIRED_LIBS)
 
@@ -1981,7 +1985,7 @@
 librun.dll: $(TOP)\librun\$(OBJDIR_LIBRUN)\librun.dll
         copy $(TOP)\librun\$(OBJDIR_LIBRUN)\librun.dll librun.dll
 
-!!ifndef USEMINGW32        
+!!ifdef USEBC 
 !!ifndef USEMINGW64        
 #cs3245.dll
 $(RT_DLL): $(TOP)\support\win32\borland\$(RT_DLL)
@@ -1993,6 +1997,10 @@
 Xext.dll: $(TOP)\support\win32\Xext.dll
         copy $(TOP)\support\win32\Xext.dll Xext.dll
 !!endif
+
+!!if defined(USEMINGW32)
+$(RT_DLL): $(MINGW_DIR)\bin\$(RT_DLL)
+        -copy $(MINGW_DIR)\bin\$(RT_DLL) $(RT_DLL)
 !!endif
 
 symbols.stc: $(TOP)\include\symbols.stc
@@ -2031,6 +2039,7 @@
 %(ADDITIONAL_RULES_HG)'.
 
     "Modified: / 02-06-2015 / 17:40:03 / gg"
+    "Modified: / 26-01-2016 / 14:23:35 / jv"
     "Modified: / 03-03-2016 / 21:15:43 / cg"
 !
 
@@ -2915,7 +2924,7 @@
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
 SectionEnd
 
-LangString appOpen ${LANG_GERMAN}  "Mit %(PRODUCT_NAME) ffnen"
+LangString appOpen ${LANG_GERMAN}  "Mit %(PRODUCT_NAME) ffnen"
 LangString appOpen ${LANG_ENGLISH} "Open with %(PRODUCT_NAME)"
 
 LangString DESC_Section1 ${LANG_ENGLISH} "Program components of %(PRODUCT_NAME)"
@@ -2949,7 +2958,7 @@
 
 Function un.onInit
 !!insertmacro MUI_UNGETLANGUAGE
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Mchten Sie %(PRODUCT_NAME) und alle seine Komponenten deinstallieren?" IDYES +2
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Mchten Sie %(PRODUCT_NAME) und alle seine Komponenten deinstallieren?" IDYES +2
   Abort
 FunctionEnd
 
@@ -3226,6 +3235,11 @@
     ^ '$Header$'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$ Id: ApplicationDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  $'
 ! !
--- a/ArgumentError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ArgumentError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -50,6 +50,10 @@
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/ArgumentError.st,v 1.4 2013-12-16 13:36:35 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ArgumentError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/ArithmeticError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ArithmeticError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -40,9 +40,14 @@
 "
 ! !
 
+
 !ArithmeticError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/ArithmeticError.st,v 1.8 2013-03-13 23:44:07 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ArithmeticError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/Array.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Array.st	Mon Apr 25 10:19:26 2016 +0100
@@ -326,11 +326,11 @@
     if (__isSmallInteger(index)) {
 	indx = __intVal(index) - 1;
 	slf = self;
-
+	cls = __qClass(slf);
 	cls = __qClass(slf);
 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
 	if (cls == Array) {
-fetch:
+	    fetch:
 	    if ((unsigned INT)indx < (unsigned INT)nIndex) {
 		RETURN ( __InstPtr(slf)->i_instvars[indx] );
 	    }
@@ -372,11 +372,11 @@
     if (__isSmallInteger(index)) {
 	indx = __intVal(index) - 1;
 	slf = self;
-
+        cls = __qClass(slf);
 	cls = __qClass(slf);
 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
 	if (cls == Array) {
-store:
+	    store:
 	    if ((unsigned INT)indx < (unsigned INT)nIndex) {
 		__InstPtr(slf)->i_instvars[indx] = anObject;
 		__STORE(slf, anObject);
--- a/AspectVisitor.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/AspectVisitor.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Visitor subclass:#AspectVisitor
@@ -131,5 +130,12 @@
 !AspectVisitor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AspectVisitor.st,v 1.1 2004-06-11 17:55:26 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AspectVisitor.st,v 1.1 2004/06/11 17:55:26 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: AspectVisitor.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/AssertionFailedError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/AssertionFailedError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -43,5 +43,12 @@
 !AssertionFailedError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AssertionFailedError.st,v 1.3 2008-09-30 18:09:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AssertionFailedError.st,v 1.3 2008/09/30 18:09:46 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: AssertionFailedError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/BadLiteralsError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/BadLiteralsError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 InvalidCodeError subclass:#BadLiteralsError
@@ -50,7 +49,14 @@
 !BadLiteralsError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/BadLiteralsError.st,v 1.4 2003-09-05 10:27:45 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/BadLiteralsError.st,v 1.4 2003/09/05 10:27:45 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: BadLiteralsError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 BadLiteralsError initialize!
+
+
+
--- a/BadRomanNumberFormatError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/BadRomanNumberFormatError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -43,5 +43,8 @@
 !BadRomanNumberFormatError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/BadRomanNumberFormatError.st,v 1.3 2008-08-06 09:52:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/BadRomanNumberFormatError.st,v 1.3 2008/08/06 09:52:59 cg Exp $'
 ! !
+
+
+
--- a/Behavior.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Behavior.st	Mon Apr 25 10:19:26 2016 +0100
@@ -23,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
@@ -74,25 +74,25 @@
 
     [Instance variables:]
 
-	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
+        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
 "
 !
 
@@ -1323,7 +1323,7 @@
     "Return all selectors defined in this class that take this number of arguments."
 
     ^ self selectors
-	select:[:sel | sel argumentCount == numberOfArgs]
+        select:[:sel | sel argumentCount == numberOfArgs]
 
     "
      SmallInteger selectorsWithArgs:0
@@ -1652,8 +1652,8 @@
     "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.
@@ -1683,8 +1683,8 @@
     |md|
 
     (md := self methodDictionary) isNil ifTrue:[
-	'oops - nil methodDictionary' errorPrintCR.
-	^ #()
+        'oops - nil methodDictionary' errorPrintCR.
+        ^ #()
     ].
     ^ md keys
 
@@ -2529,314 +2529,409 @@
 %{  /* NOCONTEXT */
 #ifdef __SCHTEAM__
     if (anInteger.isSmallInteger()) {
-        return __c__._RETURN( self.basicNew( anInteger.intValue()) );
+	return __c__._RETURN( self.basicNew( anInteger.intValue()) );
     }
 #else
     OBJ newobj;
     unsigned INT nInstVars;
     unsigned INT instsize;
-    unsigned INT nindexedinstvars;
-    unsigned INT nBytes;
+    INT nindexedinstvars;
     unsigned INT flags;
 # if ! defined(FAST_ARRAY_MEMSET)
     REGISTER char *cp;
     short *sp;
-    long *lp;
+#  if defined(__i386__) || defined(__x86__) || defined(__x86_64__) || defined(__sparc__)
+    int *lp;
+#  else
+#   error "please (conditionally) declare lp as pointer to 4byte integer type"
+#  endif
 # endif
     REGISTER OBJ *op;
     float *fp;
     double *dp;
 
     if (__isSmallInteger(anInteger)) {
-        nindexedinstvars = __intVal(anInteger);
-        if (nindexedinstvars >= 0) {
-            nInstVars = __intVal(__INST(instSize));
-            flags = __intVal(__INST(flags)) & ARRAYMASK;
-            switch (flags) {
-                case BYTEARRAY:
-                    nBytes = nindexedinstvars + __OBJS2BYTES__(nInstVars);
-                    instsize = OHDR_SIZE + nBytes;
-                    if (__CanDoQuickNew(instsize)) {        /* OBJECT ALLOCATION */
-                        /*
-                         * the most common case
-                         */
-                        __qCheckedNew(newobj, instsize);
-                        __InstPtr(newobj)->o_class = self;
-                        __qSTORE(newobj, self);
-                nilIt:
-                        cp = (char *)__InstPtr(newobj)->i_instvars;
+	nindexedinstvars = __intVal(anInteger);
+	if (nindexedinstvars >= 0) {
+	    nInstVars = __intVal(__INST(instSize));
+	    flags = __intVal(__INST(flags)) & ARRAYMASK;
+	    switch (flags) {
+		case BYTEARRAY:
+		    instsize = OHDR_SIZE + nindexedinstvars;
+		    if (nInstVars == 0) {
+			if (__CanDoQuickNew(instsize)) {        /* OBJECT ALLOCATION */
+			    /*
+			     * the most common case
+			     */
+			    __qCheckedNew(newobj, instsize);
+			    __InstPtr(newobj)->o_class = self;
+			    __qSTORE(newobj, self);
+
+# if defined(memset4) && defined(FAST_ARRAY_MEMSET4) || defined(FAST_MEMSET4)
+			    nInstVars = nindexedinstvars >> 2;
+			    if (nindexedinstvars & 3) nInstVars++;
+			    memset4(__InstPtr(newobj)->i_instvars, 0, nInstVars);
+# else
+#  if defined(FAST_ARRAY_MEMSET)
+			    memset(__InstPtr(newobj)->i_instvars, 0, nindexedinstvars);
+#  else
+			    cp = (char *)__InstPtr(newobj)->i_instvars;
+			    while (nindexedinstvars >= sizeof(INT)) {
+				*(INT *)cp = (INT)0;
+				cp += sizeof(INT);
+				nindexedinstvars -= sizeof(INT);
+			    }
+			    while (nindexedinstvars--)
+				*cp++ = '\0';
+#  endif
+# endif
+			    RETURN ( newobj );
+			}
+		    } else {
+			instsize += __OBJS2BYTES__(nInstVars);
+		    }
+		    __PROTECT_CONTEXT__
+		    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+
 # if defined(memset4) && defined(FAST_ARRAY_MEMSET4) || defined(FAST_MEMSET4)
-                        memset4(cp, 0, (nBytes+3) >> 2);
-# elif defined(FAST_ARRAY_MEMSET)
-                        memset(cp, 0, nBytes);
+		    nInstVars = (instsize-OHDR_SIZE) >> 2;
+		    if (instsize & 3) nInstVars++;
+		    memset4(__InstPtr(newobj)->i_instvars, 0, nInstVars);
 # else
-                        while (nBytes >= (sizeof(INT) * 8L)) {
-                            ((INT *)cp)[0] = (INT)0;
-                            ((INT *)cp)[1] = (INT)0;
-                            ((INT *)cp)[2] = (INT)0;
-                            ((INT *)cp)[3] = (INT)0;
-                            ((INT *)cp)[4] = (INT)0;
-                            ((INT *)cp)[5] = (INT)0;
-                            ((INT *)cp)[6] = (INT)0;
-                            ((INT *)cp)[7] = (INT)0;
-                            cp += (sizeof(INT) * 8L);
-                            nBytes -= (sizeof(INT) * 8L);
-                        }
-                        while (nBytes >= sizeof(INT)) {
-                            *(INT *)cp = (INT)0;
-                            cp += sizeof(INT);
-                            nBytes -= sizeof(INT);
-                        }
-                        while (nBytes--)
-                            *cp++ = 0;
+#  if defined(FAST_ARRAY_MEMSET)
+		    /*
+		     * knowing that nil is 0
+		     */
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize-OHDR_SIZE);
+#  else
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars--)
+			*op++ = nil;
+		    cp = (char *)op;
+		    while (nindexedinstvars >= sizeof(INT)) {
+			*(INT *)cp = 0;
+			cp += sizeof(INT);
+			nindexedinstvars -= sizeof(INT);
+		    }
+		    while (nindexedinstvars--)
+			*cp++ = '\0';
+#  endif
+# endif
+		    RETURN ( newobj );
+		    break;
+
+		case WORDARRAY:
+		case SWORDARRAY:
+		    instsize = OHDR_SIZE +
+			       __OBJS2BYTES__(nInstVars) +
+			       nindexedinstvars * 2;
+		    __PROTECT_CONTEXT__
+		    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+
+# if defined(FAST_ARRAY_MEMSET)
+		    /*
+		     * knowing that nil is 0
+		     */
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+# else
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars--)
+			*op++ = nil;
+		    sp = (short *)op;
+		    while (nindexedinstvars--)
+			*sp++ = 0;
 # endif
-                        RETURN ( newobj );
-                    }
-                    __PROTECT_CONTEXT__
-                    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-                    break;
-
-                case WORDARRAY:
-                case SWORDARRAY:
-                    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * 2;
-                    instsize = OHDR_SIZE + nBytes;
-                    __PROTECT_CONTEXT__
-                    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-
-               case LONGARRAY:
-               case SLONGARRAY:
-                    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * 4;
-                    instsize = OHDR_SIZE + nBytes;
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-
-               case LONGLONGARRAY:
-               case SLONGLONGARRAY:
-                    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		    RETURN ( newobj );
+		    break;
+
+	       case LONGARRAY:
+	       case SLONGARRAY:
+		    instsize = OHDR_SIZE +
+			       __OBJS2BYTES__(nInstVars) +
+			       nindexedinstvars * 4;
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+
+# if defined(memset4)
+		    /*
+		     * knowing that nil is 0
+		     */
+		    {
+			int n4 = nInstVars + nindexedinstvars;
+
+			memset4(__InstPtr(newobj)->i_instvars, 0, n4);
+		    }
+# else
+#  if 1 /* defined(FAST_ARRAY_MEMSET) */
+		    /*
+		     * knowing that nil is 0
+		     */
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+#  else
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars--)
+		    *op++ = nil;
+#   if defined(__i386__) || defined(__x86__) || defined(__x86_64__) || defined(__sparc__)
+    		    lp = (int *)op;
+#   else
+#    error "please (conditionally) cast op to pointer to 4byte integer type"
+#   endif		    		    
+		    while (nindexedinstvars--)
+			*lp++ = 0;
+#  endif
+# endif
+		    RETURN ( newobj );
+		    break;
+
+	       case LONGLONGARRAY:
+	       case SLONGLONGARRAY:
+		    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+
 # ifdef __NEED_LONGLONG_ALIGN
-                    instsize = ((instsize-1) + __LONGLONG_ALIGN) & ~(__LONGLONG_ALIGN-1);
+		    instsize = ((instsize-1) + __LONGLONG_ALIGN) & ~(__LONGLONG_ALIGN-1);
 # endif
-                    instsize += nindexedinstvars * 8;
-                    nBytes = instsize - OHDR_SIZE;
-
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-                    break;
-
-               case FLOATARRAY:
-                    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * sizeof(float);
-                    instsize = OHDR_SIZE + nBytes;
-
-                    __PROTECT_CONTEXT__
-                    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-
+		    instsize += nindexedinstvars * 8;
+
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+
+# if defined(memset4)
+		    {
+			int n4 = (instsize-OHDR_SIZE) / 4;
+
+			memset4(__InstPtr(newobj)->i_instvars, 0, n4);
+		    }
+# else
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+# endif
+		    RETURN ( newobj );
+		    break;
+
+	       case FLOATARRAY:
+		    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		    instsize += nindexedinstvars * sizeof(float);
+
+		    __PROTECT_CONTEXT__
+		    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+
+		    op = __InstPtr(newobj)->i_instvars;
 # if defined(__FLOAT0_IS_INT0) /* knowin that float 0.0 is all-zeros */
-                    goto nilIt;
+#  if defined(memset4)
+		    {
+			int n4 = (instsize-OHDR_SIZE) / 4;
+
+			memset4(__InstPtr(newobj)->i_instvars, 0, n4);
+		    }
+#  else
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+#  endif
 # else
-                    op = __InstPtr(newobj)->i_instvars;
-                    while (nInstVars--)
-                        *op++ = nil;
-                    fp = (float *)op;
-                    while (nindexedinstvars--)
-                        *fp++ = 0.0;
+		    while (nInstVars--)
+			*op++ = nil;
+		    fp = (float *)op;
+		    while (nindexedinstvars--)
+			*fp++ = 0.0;
 # endif
-                    RETURN ( newobj );
-                    break;
-
-               case DOUBLEARRAY:
-                    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		    RETURN ( newobj );
+		    break;
+
+	       case DOUBLEARRAY:
+		    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
 # ifdef __NEED_DOUBLE_ALIGN
-                    instsize = ((instsize-1) + __DOUBLE_ALIGN) & ~(__DOUBLE_ALIGN-1);
+		    instsize = ((instsize-1) + __DOUBLE_ALIGN) & ~(__DOUBLE_ALIGN-1);
 # endif
-                    instsize += nindexedinstvars * sizeof(double);
-                    nBytes = instsize - OHDR_SIZE;
-
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
+		    instsize += nindexedinstvars * sizeof(double);
+
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
 
 # if defined(__DOUBLE0_IS_INT0) /* knowin that double 0.0 is all-zeros */
-                    goto nilIt;
+#  ifdef memset4
+		    {
+			int n4 = (instsize-OHDR_SIZE) / 4;
+
+			memset4(__InstPtr(newobj)->i_instvars, 0, n4);
+		    }
+#  else
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+#  endif
 # else
-                    op = __InstPtr(newobj)->i_instvars;
-                    while (nInstVars--)
-                        *op++ = nil;
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars--)
+			*op++ = nil;
 
 #  ifdef __NEED_DOUBLE_ALIGN
-                    /*
-                     * care for double alignment
-                     * add filler.
-                     */
-                    if ((INT)op & (__DOUBLE_ALIGN-1)) {
-                        *op++ = nil;
-                    }
+		    /*
+		     * care for double alignment
+		     * add filler.
+		     */
+		    if ((INT)op & (__DOUBLE_ALIGN-1)) {
+			*op++ = nil;
+		    }
 #  endif
-                    dp = (double *)op;
-                    while (nindexedinstvars--)
-                        *dp++ = 0.0;
+		    dp = (double *)op;
+		    while (nindexedinstvars--)
+			*dp++ = 0.0;
 # endif
-                    RETURN ( newobj );
-                    break;
-
-                case WKPOINTERARRAY:
-                case POINTERARRAY:
-                    nInstVars += nindexedinstvars;
-                    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
+		    RETURN ( newobj );
+		    break;
+
+		case WKPOINTERARRAY:
+		case POINTERARRAY:
+		    nInstVars += nindexedinstvars;
+		    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
 
 # if defined(memset4) && defined(FAST_ARRAY_MEMSET4) || defined(FAST_MEMSET4)
-                    memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
+		    memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
 # else
-                    /*
-                     * knowing that nil is 0
-                     */
+		    /*
+		     * knowing that nil is 0
+		     */
 #  ifdef sparc
 #   define FAST_ARRAY_MEMSET_DOUBLES_UNROLLED
 #  endif
 
 #  if defined(FAST_ARRAY_MEMSET_DOUBLES_UNROLLED)
-                    op = __InstPtr(newobj)->i_instvars;
-                    if (nInstVars > 8) {
-                        *op++ = nil;    /* for alignment */
-                        nInstVars--;
-                        while (nInstVars >= 8) {
-                            *(double *)op = 0.0;
-                            ((double *)op)[1] = 0.0;
-                            ((double *)op)[2] = 0.0;
-                            ((double *)op)[3] = 0.0;
-                            op += 8;
-                            nInstVars -= 8;
-                        }
-                    }
-                    while (nInstVars) {
-                        *op++ = 0;
-                        nInstVars--;
-                    }
+		    op = __InstPtr(newobj)->i_instvars;
+		    if (nInstVars > 8) {
+			*op++ = nil;    /* for alignment */
+			nInstVars--;
+			while (nInstVars >= 8) {
+			    *(double *)op = 0.0;
+			    ((double *)op)[1] = 0.0;
+			    ((double *)op)[2] = 0.0;
+			    ((double *)op)[3] = 0.0;
+			    op += 8;
+			    nInstVars -= 8;
+			}
+		    }
+		    while (nInstVars) {
+			*op++ = 0;
+			nInstVars--;
+		    }
 #  else
 #   if defined(FAST_ARRAY_MEMSET_LONGLONG_UNROLLED)
-                    op = __InstPtr(newobj)->i_instvars;
-                    if (nInstVars > 8) {
-                        *op++ = nil;    /* for alignment */
-                        nInstVars--;
-                        while (nInstVars >= 8) {
-                            *(long long *)op = 0;
-                            ((long long *)op)[1] = 0;
-                            ((long long *)op)[2] = 0;
-                            ((long long *)op)[3] = 0;
-                            op += 8;
-                            nInstVars -= 8;
-                        }
-                    }
-                    while (nInstVars) {
-                        *op++ = 0;
-                        nInstVars--;
-                    }
+		    op = __InstPtr(newobj)->i_instvars;
+		    if (nInstVars > 8) {
+			*op++ = nil;    /* for alignment */
+			nInstVars--;
+			while (nInstVars >= 8) {
+			    *(long long *)op = 0;
+			    ((long long *)op)[1] = 0;
+			    ((long long *)op)[2] = 0;
+			    ((long long *)op)[3] = 0;
+			    op += 8;
+			    nInstVars -= 8;
+			}
+		    }
+		    while (nInstVars) {
+			*op++ = 0;
+			nInstVars--;
+		    }
 #   else
 #    if defined(FAST_ARRAY_MEMSET)
-                    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
 #    else
-                    op = __InstPtr(newobj)->i_instvars;
-                    while (nInstVars >= 8) {
-                        nInstVars -= 8;
-                        op[0] = nil; op[1] = nil;
-                        op[2] = nil; op[3] = nil;
-                        op[4] = nil; op[5] = nil;
-                        op[6] = nil; op[7] = nil;
-                        op += 8;
-                    }
-                    while (nInstVars--)
-                        *op++ = nil;
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars >= 8) {
+			nInstVars -= 8;
+			op[0] = nil; op[1] = nil;
+			op[2] = nil; op[3] = nil;
+			op[4] = nil; op[5] = nil;
+			op[6] = nil; op[7] = nil;
+			op += 8;
+		    }
+		    while (nInstVars--)
+			*op++ = nil;
 #    endif
 #   endif
 #  endif
 # endif
-                    RETURN ( newobj );
-                    break;
-
-                default:
-                    /*
-                     * new:n for non-variable classes only allowed if
-                     * n == 0
-                     */
-                    if (nindexedinstvars == 0) {
-                        instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
-                        __PROTECT_CONTEXT__
-                        __qAlignedNew(newobj, instsize);        /* OBJECT ALLOCATION */
-                        __UNPROTECT_CONTEXT__
-                        if (newobj == nil) {
-                            break;
-                        }
-                        __InstPtr(newobj)->o_class = self;
-                        __qSTORE(newobj, self);
-
-                        if (nInstVars) {
+		    RETURN ( newobj );
+		    break;
+
+		default:
+		    /*
+		     * new:n for non-variable classes only allowed if
+		     * n == 0
+		     */
+		    if (nindexedinstvars == 0) {
+			instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+			__PROTECT_CONTEXT__
+			__qAlignedNew(newobj, instsize);        /* OBJECT ALLOCATION */
+			__UNPROTECT_CONTEXT__
+			if (newobj == nil) {
+			    break;
+			}
+			__InstPtr(newobj)->o_class = self;
+			__qSTORE(newobj, self);
+
+			if (nInstVars) {
 # if defined(memset4) && defined(FAST_OBJECT_MEMSET4) || defined(FAST_MEMSET4)
-                            memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
+			    memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
 # else
 #  if defined(FAST_MEMSET)
-                            /*
-                             * knowing that nil is 0
-                             */
-                            memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+			    /*
+			     * knowing that nil is 0
+			     */
+			    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
 #  else
-                            op = __InstPtr(newobj)->i_instvars;
-                            do {
-                                *op++ = nil;
-                            } while (--nInstVars);
+			    op = __InstPtr(newobj)->i_instvars;
+			    do {
+				*op++ = nil;
+			    } while (--nInstVars);
 #  endif
 # endif
-                        }
-                        RETURN ( newobj );
-                    }
-                    break;
-            }
-        }
+			}
+			RETURN ( newobj );
+		    }
+		    break;
+	    }
+	}
     }
 #endif /* not SCHTEAM */
 %}.
@@ -2846,26 +2941,26 @@
     "
 
     (anInteger isMemberOf:SmallInteger) ifFalse:[
-        "
-         the argument is either not an integer,
-         or a LargeInteger (which means that its definitely too big)
-        "
-        self error:'argument to new: must be Integer' mayProceed:true.
-        ^ nil
+	"
+	 the argument is either not an integer,
+	 or a LargeInteger (which means that its definitely too big)
+	"
+	self error:'argument to new: must be Integer' mayProceed:true.
+	^ nil
     ].
     (anInteger < 0) ifTrue:[
-        "
-         the argument is negative,
-        "
-        self error:'bad (negative) argument to new:'.
-        ^ nil
+	"
+	 the argument is negative,
+	"
+	self error:'bad (negative) argument to new:'.
+	^ nil
     ].
     self isVariable ifFalse:[
-        "
-         this class does not have any indexed instance variables
-        "
-        self error:'class has no indexed instvars - cannot create with new:'.
-        ^ nil
+	"
+	 this class does not have any indexed instance variables
+	"
+	self error:'class has no indexed instvars - cannot create with new:'.
+	^ nil
     ].
     "
      memory allocation failed.
@@ -3004,10 +3099,10 @@
      Behavior>>readFrom: and Behavior>>readFrom:onError:"
 
     ^ self
-	readFromString:aString
-	onError:[
-	    self conversionErrorSignal raiseErrorString:'expected: ' , self name
-	]
+        readFromString:aString
+        onError:[ 
+            self conversionErrorSignal raiseErrorString:'expected: ' , self name 
+        ]
 
     "
      Integer readFromString:'12345678901234567890'
@@ -3188,16 +3283,16 @@
     |dict oldMethod|
 
     newMethod isNil ifTrue:[
-	self error:'invalid method'.
+        self error:'invalid method'.
     ].
 
     dict := self methodDictionary.
     oldMethod := dict at:aSelector ifAbsent:nil.
 
     (Smalltalk
-	    changeRequest:#methodInClass
-	    with:(Array with:self with:aSelector with:oldMethod)) ifFalse:[
-	^ false
+            changeRequest:#methodInClass
+            with:(Array with:self with:aSelector with:oldMethod)) ifFalse:[
+        ^ false
     ].
 
     self setMethodDictionary:(dict at:aSelector putOrAppend:newMethod).
@@ -3228,19 +3323,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.
 
@@ -3480,7 +3575,7 @@
 !
 
 isAbstract
-    "true if this is an abstract class
+    "true if this is an abstract class 
      (has no direct instances, should not be instantiated).
      Usually, this means that it only provides shared protocol for its
      subclasses, which should be used.
@@ -3489,7 +3584,7 @@
      and for documentation.
      To enforce abstractness, a subclass should redefine new, to raise an exception.
      (which some do, but many are too lazy to do)"
-
+    
     ^ false
 !
 
@@ -3557,7 +3652,7 @@
     "a utility class is one which is not to be instantiated,
      but only provides a number of utility functions on the class side.
      It is usually also abstract"
-
+     
     ^ false
 !
 
@@ -3790,12 +3885,12 @@
 
     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
 
@@ -3988,7 +4083,7 @@
 
     coll := OrderedCollection new.
     self withAllSuperclassesDo:[:cls |
-	coll add:cls
+        coll add:cls
     ].
     ^ coll
 
@@ -4574,7 +4669,7 @@
 
     superclass := self superclass.
     superclass notNil ifTrue:[
-	^ superclass allSelectors addAll:(self selectors); yourself.
+        ^ superclass allSelectors addAll:(self selectors); yourself.
     ].
     ^ self selectors asNewIdentitySet
 
--- a/Block.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Block.st	Mon Apr 25 10:19:26 2016 +0100
@@ -858,7 +858,7 @@
 
     Transcript show:anInfoString.
     micros < 1000 ifTrue:[
-	Transcript show:micros; show:' s'.
+	Transcript show:micros; show:' s'.
     ] ifFalse:[
 	micros < 100000 ifTrue:[
 	    millis := (micros / 1000.0) asFixedPointRoundedToScale:2.
@@ -3027,6 +3027,19 @@
     sourcePos := aString  "/ misuse the sourcePosition slot
 !
 
+sourcePosition
+    "Returns the source position withing method's source.
+     The position is 1-based offset of opening bracket.
+     If the source position is not known (because of lack of
+     support in compiler and/or virtual machine or anut other 
+     reason, nil is returned"
+
+    ^ sourcePos
+
+    "Created: / 01-06-2015 / 13:05:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
+!   
+
 sourcePosition:position
     "set the position of the source within my method.
      This interface is for the compiler only."
--- a/BreakPointInterrupt.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/BreakPointInterrupt.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 HaltInterrupt subclass:#BreakPointInterrupt
@@ -45,5 +44,12 @@
 !BreakPointInterrupt class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/BreakPointInterrupt.st,v 1.3 2003-08-29 19:18:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/BreakPointInterrupt.st,v 1.3 2003/08/29 19:18:16 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: BreakPointInterrupt.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/CachingRegistry.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CachingRegistry.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,7 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
+"{ Package: 'stx:libbasic' }"
 "{ Package: 'stx:libbasic' }"
 
 Registry subclass:#CachingRegistry
@@ -94,4 +94,11 @@
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/CachingRegistry.st,v 1.2 2015-04-21 16:01:16 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CachingRegistry.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/CannotResumeError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CannotResumeError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -51,5 +51,9 @@
 
 version_CVS
     ^ '$Header: /cvs/stx/stx/libbasic/CannotResumeError.st,v 1.6 2013-12-24 10:39:51 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CannotResumeError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/CannotReturnError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CannotReturnError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -51,5 +51,9 @@
 
 version_CVS
     ^ '$Header: /cvs/stx/stx/libbasic/CannotReturnError.st,v 1.6 2013-12-24 10:39:59 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CannotReturnError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/CharacterArray.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterArray.st	Mon Apr 25 10:19:26 2016 +0100
@@ -6503,7 +6503,11 @@
         ]
     ].
 
-    str := self species new:newSz.
+    self isText ifTrue:[ 
+        str := Text string: (self string class new: newSz).
+    ] ifFalse:[
+        str := self species new:newSz.
+    ].
 
     hasEmphasis := self hasChangeOfEmphasis.
 
@@ -6557,7 +6561,8 @@
              with:$2) withTabsExpanded
     "
 
-    "Modified: 12.5.1996 / 13:05:10 / cg"
+    "Modified: / 12-05-1996 / 13:05:10 / cg"
+    "Modified: / 21-04-2015 / 15:40:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 withoutAllSpaces
@@ -7644,6 +7649,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- a/CharacterEncoder.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoder.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1674,6 +1674,18 @@
 
 !CharacterEncoder::InverseEncoder methodsFor:'stream support'!
 
+readNext:charactersToRead charactersFrom:stream 
+    ^ decoder readNext:charactersToRead charactersFrom:stream
+
+    "Created: / 05-10-2015 / 09:05:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+readNextCharacterFrom:aStream
+    ^ decoder readNextCharacterFrom:aStream
+
+    "Created: / 05-10-2015 / 09:05:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 readNextInputCharacterFrom:aStream
     ^ decoder readNextInputCharacterFrom:aStream
 ! !
@@ -1805,6 +1817,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- a/CharacterEncoderImplementations__ASCII.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__ASCII.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -241,5 +240,12 @@
 !ASCII class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ASCII.st,v 1.4 2005-03-31 18:12:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ASCII.st,v 1.4 2005/03/31 18:12:07 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CharacterEncoderImplementations__ASCII.st 10807 2012-05-05 21:58:24Z vranyj1 $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__BIG5.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__BIG5.st	Mon Apr 25 10:19:26 2016 +0100
@@ -52,5 +52,8 @@
 !BIG5 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__BIG5.st,v 1.3 2004-03-09 21:59:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__BIG5.st,v 1.3 2004/03/09 21:59:35 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__CNS11643.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__CNS11643.st	Mon Apr 25 10:19:26 2016 +0100
@@ -46,5 +46,8 @@
 !CNS11643 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__CNS11643.st,v 1.3 2004-03-09 21:59:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__CNS11643.st,v 1.3 2004/03/09 21:59:27 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__CP437.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__CP437.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -933,5 +932,9 @@
 !CP437 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__CP437.st,v 1.4 2005-03-31 18:12:18 cg Exp $'
+    ^ '$Id: CharacterEncoderImplementations__CP437.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id:: CharacterEncoderImplementations__CP437.st 10842 2012-09-07 10:49:18Z vranyj1                                           $'
 ! !
--- a/CharacterEncoderImplementations__GB2313_1980.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__GB2313_1980.st	Mon Apr 25 10:19:26 2016 +0100
@@ -52,5 +52,8 @@
 !GB2313_1980 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__GB2313_1980.st,v 1.3 2004-03-09 21:57:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__GB2313_1980.st,v 1.3 2004/03/09 21:57:26 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__HANGUL.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__HANGUL.st	Mon Apr 25 10:19:26 2016 +0100
@@ -46,5 +46,8 @@
 !HANGUL class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__HANGUL.st,v 1.3 2004-03-09 21:57:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__HANGUL.st,v 1.3 2004/03/09 21:57:59 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__ISO10646_1.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__ISO10646_1.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -64,5 +63,12 @@
 !ISO10646_1 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_1.st,v 1.4 2004-03-09 22:00:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_1.st,v 1.4 2004/03/09 22:00:08 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CharacterEncoderImplementations__ISO10646_1.st 10807 2012-05-05 21:58:24Z vranyj1 $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__ISO10646_to_SGML.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__ISO10646_to_SGML.st	Mon Apr 25 10:19:26 2016 +0100
@@ -145,7 +145,7 @@
 
     "
      CharacterEncoderImplementations::ISO10646_to_SGML
-        encodeString:'hello ' 
+        encodeString:'hello ' 
     "
 
     "Modified: / 23-10-2006 / 13:25:27 / cg"
@@ -154,5 +154,8 @@
 !ISO10646_to_SGML class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_SGML.st,v 1.3 2006-10-23 11:25:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_SGML.st,v 1.3 2006/10/23 11:25:11 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__ISO10646_to_UTF8.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__ISO10646_to_UTF8.st	Mon Apr 25 10:19:26 2016 +0100
@@ -424,7 +424,7 @@
     "
 ! !
 
-!ISO10646_to_UTF8 privateMethodsFor:'queries'!
+!ISO10646_to_UTF8 methodsFor:'queries'!
 
 bytesToReadFor:firstByte 
     |bytesToRead|
@@ -442,9 +442,7 @@
     ^bytesToRead
 
     "Created: / 14-06-2005 / 17:17:24 / janfrog"
-! !
-
-!ISO10646_to_UTF8 methodsFor:'queries'!
+!
 
 characterSize:charOrcodePoint
     "return the number of bytes required to encode codePoint"
@@ -482,26 +480,31 @@
     "Created: / 16-06-2005 / 11:45:14 / masca"
 !
 
-readNextCharacterFrom:aStream 
-
-    |firstByte bytesToRead str|
+readNextCharacterFrom:stream
 
-    firstByte := aStream peek. 
-    firstByte ifNil:[^nil].
-    firstByte := firstByte asInteger.
-    bytesToRead := self bytesToReadFor:firstByte.
-    str := self decodeString:(aStream next:bytesToRead).
-    str size > 1 ifTrue:[
-        self error:'Badly coded method'
+    | c bytesYetToRead s |
+    c := stream peek.
+    bytesYetToRead := self bytesToReadFor:c codePoint.
+    bytesYetToRead == 1 ifTrue:[ 
+        stream next.
+        ^ c.
     ].
-    ^ str first
+    s := (String new:1 + bytesYetToRead) writeStream.
+    s nextPutAll:(stream next: bytesYetToRead).
+    ^ self decodeString:s contents
 
     "Created: / 14-06-2005 / 17:03:59 / janfrog"
+    "Modified: / 03-10-2015 / 08:49:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ISO10646_to_UTF8 class methodsFor:'documentation'!
 
 version
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
--- a/CharacterEncoderImplementations__ISO8859_11.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__ISO8859_11.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -596,5 +595,9 @@
 !ISO8859_11 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO8859_11.st,v 1.4 2005-03-31 18:12:32 cg Exp $'
+    ^ '$Id: CharacterEncoderImplementations__ISO8859_11.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id:: CharacterEncoderImplementations__ISO8859_11.st 10842 2012-09-07 10:49:18Z vranyj1                                      $'
 ! !
--- a/CharacterEncoderImplementations__ISO8859_2.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__ISO8859_2.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -766,5 +765,12 @@
 !ISO8859_2 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO8859_2.st,v 1.4 2005-03-31 18:12:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO8859_2.st,v 1.4 2005/03/31 18:12:47 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CharacterEncoderImplementations__ISO8859_2.st 10807 2012-05-05 21:58:24Z vranyj1 $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__JIS0201.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__JIS0201.st	Mon Apr 25 10:19:26 2016 +0100
@@ -558,5 +558,8 @@
 !JIS0201 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0201.st,v 1.3 2004-03-09 21:59:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0201.st,v 1.3 2004/03/09 21:59:06 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__JIS0208.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__JIS0208.st	Mon Apr 25 10:19:26 2016 +0100
@@ -28646,5 +28646,8 @@
 !JIS0208 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0208.st,v 1.4 2008-10-30 19:54:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0208.st,v 1.4 2008/10/30 19:54:58 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__JIS0208_to_EUC.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__JIS0208_to_EUC.st	Mon Apr 25 10:19:26 2016 +0100
@@ -332,5 +332,8 @@
 !JIS0208_to_EUC class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0208_to_EUC.st,v 1.4 2005-07-08 17:15:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0208_to_EUC.st,v 1.4 2005/07/08 17:15:01 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__JIS0208_to_JIS7.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__JIS0208_to_JIS7.st	Mon Apr 25 10:19:26 2016 +0100
@@ -372,5 +372,8 @@
 !JIS0208_to_JIS7 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0208_to_JIS7.st,v 1.7 2004-03-12 09:15:11 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0208_to_JIS7.st,v 1.7 2004/03/12 09:15:11 ca Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__JIS0212.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__JIS0212.st	Mon Apr 25 10:19:26 2016 +0100
@@ -46,5 +46,8 @@
 !JIS0212 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0212.st,v 1.3 2004-03-09 21:58:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JIS0212.st,v 1.3 2004/03/09 21:58:52 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__JOHAB.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__JOHAB.st	Mon Apr 25 10:19:26 2016 +0100
@@ -46,5 +46,8 @@
 !JOHAB class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JOHAB.st,v 1.3 2004-03-09 21:57:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__JOHAB.st,v 1.3 2004/03/09 21:57:37 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__KSC5601.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__KSC5601.st	Mon Apr 25 10:19:26 2016 +0100
@@ -46,5 +46,8 @@
 !KSC5601 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__KSC5601.st,v 1.3 2004-03-09 21:58:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__KSC5601.st,v 1.3 2004/03/09 21:58:35 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Arabic.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Arabic.st	Mon Apr 25 10:19:26 2016 +0100
@@ -584,5 +584,8 @@
 !MAC_Arabic class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Arabic.st,v 1.3 2004-03-09 21:59:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Arabic.st,v 1.3 2004/03/09 21:59:43 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_CentralEuropean.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_CentralEuropean.st	Mon Apr 25 10:19:26 2016 +0100
@@ -373,5 +373,8 @@
 !MAC_CentralEuropean class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_CentralEuropean.st,v 1.3 2004-03-09 21:57:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_CentralEuropean.st,v 1.3 2004/03/09 21:57:41 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Croatian.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Croatian.st	Mon Apr 25 10:19:26 2016 +0100
@@ -399,5 +399,8 @@
 !MAC_Croatian class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Croatian.st,v 1.3 2004-03-09 22:00:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Croatian.st,v 1.3 2004/03/09 22:00:00 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Cyrillic.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Cyrillic.st	Mon Apr 25 10:19:26 2016 +0100
@@ -398,5 +398,8 @@
 !MAC_Cyrillic class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Cyrillic.st,v 1.3 2004-03-09 21:57:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Cyrillic.st,v 1.3 2004/03/09 21:57:56 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Dingbats.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Dingbats.st	Mon Apr 25 10:19:26 2016 +0100
@@ -375,5 +375,8 @@
 !MAC_Dingbats class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Dingbats.st,v 1.3 2004-03-09 22:01:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Dingbats.st,v 1.3 2004/03/09 22:01:02 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Farsi.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Farsi.st	Mon Apr 25 10:19:26 2016 +0100
@@ -569,5 +569,8 @@
 !MAC_Farsi class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Farsi.st,v 1.3 2004-03-09 22:00:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Farsi.st,v 1.3 2004/03/09 22:00:02 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Greek.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Greek.st	Mon Apr 25 10:19:26 2016 +0100
@@ -847,5 +847,8 @@
 !MAC_Greek class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Greek.st,v 1.3 2004-03-09 21:59:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Greek.st,v 1.3 2004/03/09 21:59:52 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Hebrew.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Hebrew.st	Mon Apr 25 10:19:26 2016 +0100
@@ -611,5 +611,8 @@
 !MAC_Hebrew class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Hebrew.st,v 1.3 2004-03-09 22:01:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Hebrew.st,v 1.3 2004/03/09 22:01:14 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Iceland.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Iceland.st	Mon Apr 25 10:19:26 2016 +0100
@@ -417,5 +417,8 @@
 !MAC_Iceland class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Iceland.st,v 1.3 2004-03-09 21:59:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Iceland.st,v 1.3 2004/03/09 21:59:24 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Japanese.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Japanese.st	Mon Apr 25 10:19:26 2016 +0100
@@ -46,5 +46,8 @@
 !MAC_Japanese class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Japanese.st,v 1.3 2004-03-09 21:59:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Japanese.st,v 1.3 2004/03/09 21:59:58 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Korean.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Korean.st	Mon Apr 25 10:19:26 2016 +0100
@@ -46,5 +46,8 @@
 !MAC_Korean class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Korean.st,v 1.3 2004-03-09 21:58:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Korean.st,v 1.3 2004/03/09 21:58:29 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Romanian.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Romanian.st	Mon Apr 25 10:19:26 2016 +0100
@@ -414,5 +414,8 @@
 !MAC_Romanian class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Romanian.st,v 1.3 2004-03-09 21:58:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Romanian.st,v 1.3 2004/03/09 21:58:05 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Symbol.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Symbol.st	Mon Apr 25 10:19:26 2016 +0100
@@ -445,5 +445,8 @@
 !MAC_Symbol class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Symbol.st,v 1.3 2004-03-09 21:57:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Symbol.st,v 1.3 2004/03/09 21:57:44 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Thai.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Thai.st	Mon Apr 25 10:19:26 2016 +0100
@@ -432,5 +432,8 @@
 !MAC_Thai class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Thai.st,v 1.3 2004-03-09 21:59:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Thai.st,v 1.3 2004/03/09 21:59:00 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MAC_Turkish.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MAC_Turkish.st	Mon Apr 25 10:19:26 2016 +0100
@@ -389,5 +389,8 @@
 !MAC_Turkish class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Turkish.st,v 1.3 2004-03-09 21:59:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MAC_Turkish.st,v 1.3 2004/03/09 21:59:55 cg Exp $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MS_Arabic.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_Arabic.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -839,5 +838,9 @@
 !MS_Arabic class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Arabic.st,v 1.4 2005-03-31 18:48:44 cg Exp $'
+    ^ '$Id: CharacterEncoderImplementations__MS_Arabic.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id:: CharacterEncoderImplementations__MS_Arabic.st 10842 2012-09-07 10:49:18Z vranyj1                                       $'
 ! !
--- a/CharacterEncoderImplementations__MS_Baltic.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_Baltic.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -852,5 +851,12 @@
 !MS_Baltic class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Baltic.st,v 1.4 2005-03-31 18:48:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Baltic.st,v 1.4 2005/03/31 18:48:58 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CharacterEncoderImplementations__MS_Baltic.st 10807 2012-05-05 21:58:24Z vranyj1 $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MS_Cyrillic.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_Cyrillic.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -718,5 +717,12 @@
 !MS_Cyrillic class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Cyrillic.st,v 1.4 2005-03-31 18:48:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Cyrillic.st,v 1.4 2005/03/31 18:48:53 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CharacterEncoderImplementations__MS_Cyrillic.st 10807 2012-05-05 21:58:24Z vranyj1 $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MS_EastEuropean.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_EastEuropean.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -813,5 +812,9 @@
 !MS_EastEuropean class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_EastEuropean.st,v 1.4 2005-03-31 18:48:47 cg Exp $'
+    ^ '$Id: CharacterEncoderImplementations__MS_EastEuropean.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id:: CharacterEncoderImplementations__MS_EastEuropean.st 10842 2012-09-07 10:49:18Z vranyj1                                 $'
 ! !
--- a/CharacterEncoderImplementations__MS_Greek.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_Greek.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -671,5 +670,12 @@
 !MS_Greek class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Greek.st,v 1.4 2005-03-31 18:49:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Greek.st,v 1.4 2005/03/31 18:49:01 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CharacterEncoderImplementations__MS_Greek.st 10807 2012-05-05 21:58:24Z vranyj1 $'
 ! !
+
+
+
--- a/CharacterEncoderImplementations__MS_Hebrew.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_Hebrew.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -607,5 +606,9 @@
 !MS_Hebrew class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Hebrew.st,v 1.4 2005-03-31 18:48:50 cg Exp $'
+    ^ '$Id: CharacterEncoderImplementations__MS_Hebrew.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id:: CharacterEncoderImplementations__MS_Hebrew.st 10842 2012-09-07 10:49:18Z vranyj1                                       $'
 ! !
--- a/CharacterEncoderImplementations__MS_Symbol.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_Symbol.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -88,5 +87,9 @@
 !MS_Symbol class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Symbol.st,v 1.5 2005-03-31 18:48:55 cg Exp $'
+    ^ '$Id: CharacterEncoderImplementations__MS_Symbol.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id:: CharacterEncoderImplementations__MS_Symbol.st 10842 2012-09-07 10:49:18Z vranyj1                                       $'
 ! !
--- a/CharacterEncoderImplementations__MS_Turkish.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__MS_Turkish.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: CharacterEncoderImplementations }"
@@ -819,5 +818,9 @@
 !MS_Turkish class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__MS_Turkish.st,v 1.5 2005-03-31 18:49:37 cg Exp $'
+    ^ '$Id: CharacterEncoderImplementations__MS_Turkish.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id:: CharacterEncoderImplementations__MS_Turkish.st 10842 2012-09-07 10:49:18Z vranyj1                                      $'
 ! !
--- a/CharacterEncoderImplementations__NEXT.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterEncoderImplementations__NEXT.st	Mon Apr 25 10:19:26 2016 +0100
@@ -313,5 +313,8 @@
 !NEXT class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__NEXT.st,v 1.3 2004-03-09 22:00:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__NEXT.st,v 1.3 2004/03/09 22:00:52 cg Exp $'
 ! !
+
+
+
--- a/CharacterRangeError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/CharacterRangeError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 DecodingError subclass:#CharacterRangeError
@@ -38,5 +37,12 @@
 !CharacterRangeError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterRangeError.st,v 1.2 2004-03-09 21:58:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterRangeError.st,v 1.2 2004/03/09 21:58:39 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: CharacterRangeError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/Class.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Class.st	Mon Apr 25 10:19:26 2016 +0100
@@ -495,6 +495,8 @@
 ! !
 
 
+
+
 !Class methodsFor:'Compatibility-Dolphin'!
 
 defaultCategoryForDolphinClasses
@@ -703,8 +705,71 @@
         class:self stamp:stampString priorVersion:priorVersion
 !
 
+classVarNamed: aSymbol
+    "Returns the value of class variable named `aSymbol`.
+
+     Warning: This method is here for Squeak/Pharo compatibility.
+     Do not use it in Smalltalk/X code"
+
+    ^ self classVarAt: aSymbol
+
+    "Created: / 17-08-2015 / 13:07:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
+!
+
+classVarNamed: aSymbol put: anObject
+    "Set the value of class variable named `aSymbol` to `anObject`.
+
+     Warning: This method is here for Squeak/Pharo compatibility.
+     Do not use it in Smalltalk/X code"
+
+    self classVarAt: aSymbol put: anObject
+
+    "Created: / 25-07-2015 / 07:25:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (format): / 27-07-2015 / 09:59:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+classVariableNamed: aSymbol
+    "Returns the value of class variable named `aSymbol`.
+
+     Warning: This method is here for Squeak/Pharo compatibility.
+     Do not use it in Smalltalk/X code"
+
+    ^ self classVarAt: aSymbol
+
+    "Created: / 27-07-2015 / 09:44:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+classVariables
+    "Return an array of class variable names.
+
+     Warning: This method is here for Squeak/Pharo compatibility.
+     Do not use it in Smalltalk/X code"
+
+    ^ self classVarNames
+
+    "Created: / 27-07-2015 / 09:36:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+instanceVariables
+    "Return an array of instance variable names.
+
+     Warning: This method is here for Squeak/Pharo compatibility.
+     Do not use it in Smalltalk/X code"
+   
+    ^ self instVarNames
+
+    "Created: / 27-07-2015 / 09:35:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 poolDictionaryNames
     ^ self sharedPoolNames
+!
+
+theMetaClass
+    ^ self theMetaclass
+
+    "Created: / 28-08-2015 / 09:36:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Class methodsFor:'accessing'!
@@ -1817,6 +1882,58 @@
     "Modified: / 06-10-2006 / 13:34:18 / cg"
 !
 
+sourceChecksumFromBinaryRevision
+    | start checksum |
+    revision isNil ifTrue:[ ^ nil ].
+    start:= revision indexOfString: 'SHA1='.
+    start ~~ 0 ifTrue:[ 
+        checksum := ByteArray new: 20.
+        1 to: 20 do: [ :i |
+            | si hi lo |
+
+            si := start + 3 + (i * 2).
+            hi := (revision at: si) digitValue.
+            lo := (revision at: si + 1) digitValue.
+            checksum at:i put: ((hi bitShift:4) bitOr: lo)
+        ]
+    ].
+    ^ checksum
+
+    "
+    Class sourceChecksumFromBinaryRevision
+    "
+
+    "Created: / 26-01-2016 / 11:18:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourceChecksumFromStream: aStream
+    | stream position hash buffer |
+
+    stream := aStream stream.
+    position := stream position.
+    hash := SHA1Stream new.
+    buffer := ByteArray new: 4096.
+    stream position: 0.
+
+    [ stream atEnd ] whileFalse:[ 
+        | read |
+
+        read := stream nextAvailableBytes: buffer size into: buffer startingAt: 1.
+        hash nextPutBytes: read from: buffer startingAt: 1 
+    ].
+    stream position: position.
+    ^ hash hashValue.
+    
+    "
+    Class sourceChecksumFromStream: Class sourceStream
+    Class sourceChecksumFromBinaryRevision            
+
+    (Class sourceChecksumFromStream: Class sourceStream) = (Class sourceChecksumFromBinaryRevision)
+    "
+
+    "Created: / 26-01-2016 / 11:24:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 sourceCodeManager
     "Return my (configured) source code manager."
 
@@ -1982,6 +2099,7 @@
     "Created: / 18-07-2011 / 09:14:38 / cg"
 ! !
 
+
 !Class methodsFor:'adding & removing'!
 
 removeFromSystem
@@ -2922,6 +3040,7 @@
         encoder:encoder
 
     "Modified: / 18-07-2011 / 09:17:17 / cg"
+    "Modified: / 13-04-2015 / 21:15:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileOutOn:outStreamArg withTimeStamp:stampIt withInitialize:initIt withDefinition:withDefinition methodFilter:methodFilter encoder:encoderOrNil
@@ -5413,7 +5532,7 @@
      against the version string as contained in the version method.
      This helps to detect mangled source code."
 
-    |cls meta cannotCheckReason versionMethod info
+    |cls cannotCheckReason versionMethod info
      versionFromCode versionFromSource oldPos pos src rev|
 
     ValidateSourceOnlyOnce == true ifTrue:[
@@ -5427,11 +5546,14 @@
         ].
     ].
 
-    meta := self theMetaclass.
     cls := self theNonMetaclass.
 
     cannotCheckReason := nil.
 
+    (cls sourceChecksumFromBinaryRevision) = (cls sourceChecksumFromStream: aStream) ifTrue:[ 
+        ^ true.
+    ].
+
     versionMethod := self findVersionMethod.
     versionMethod isNil ifTrue:[
         cannotCheckReason := 'no valid version method'.
@@ -5508,6 +5630,7 @@
     ^ false
 
     "Modified: / 29-09-2011 / 14:29:55 / cg"
+    "Modified: / 26-01-2016 / 12:32:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 versionMethodTemplateForSourceCodeManager:aSourceCodeManager
@@ -5797,6 +5920,11 @@
     ^ '$Header$'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$ Id: Class.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !
--- a/ClassDescription.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ClassDescription.st	Mon Apr 25 10:19:26 2016 +0100
@@ -658,6 +658,7 @@
     "Modified: 23.4.1996 / 15:56:54 / cg"
 ! !
 
+
 !ClassDescription methodsFor:'Compatibility-Dolphin'!
 
 methodsFor
@@ -830,6 +831,13 @@
     "Created: / 28.3.1998 / 21:21:52 / cg"
 ! !
 
+!ClassDescription methodsFor:'Compatibility-Squeak'!
+
+subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString category:cat
+    ^ self subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries: '' category:cat
+
+    "Created: / 24-07-2015 / 19:28:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
 
 !ClassDescription methodsFor:'Compatibility-V''Age'!
 
@@ -4331,6 +4339,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- a/Context.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Context.st	Mon Apr 25 10:19:26 2016 +0100
@@ -499,14 +499,14 @@
     |l|
 
     receiver isJavaObject ifTrue:[
-	"/ chances are good that I am a javContext ...
-	self method isJavaMethod ifTrue:[
-	    ^ self javaLineNumber
-	]
+        "/ chances are good that I am a javContext ...
+        self method isJavaMethod ifTrue:[
+            ^ self javaLineNumber
+        ]
     ].
 
     lineNr notNil ifTrue:[
-	l := lineNr bitAnd:16rFFFF.
+        l := lineNr bitAnd:16rFFFF.
     ].
 
 "/    self isJavaContext ifTrue:[ |nr m|
@@ -2600,7 +2600,7 @@
                     ]
                 ].
                 numVars > 0 ifTrue:[
-                    vars := blockNode variablesIncludingInlined: (homeMethod code notNil and:[homeMethod byteCode isNil]).
+                    vars := blockNode variablesIncludingInlined: (homeMethod hasCode and:[homeMethod isDynamic not]).
                     vars notEmptyOrNil ifTrue:[
                         varNames := vars collect:[:var | var name].
                     ]
@@ -2666,7 +2666,7 @@
 
     ^ #()
 
-    "Modified: / 19-08-2013 / 12:13:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 26-12-2015 / 08:20:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 canResume
--- a/ContextError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ContextError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -44,5 +44,9 @@
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/ContextError.st,v 1.5 2013-12-24 10:39:33 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ContextError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/Continuation.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Continuation.st	Mon Apr 25 10:19:26 2016 +0100
@@ -192,5 +192,9 @@
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/Continuation.st,v 1.16 2013-07-25 09:37:35 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: Continuation.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/ControlInterrupt.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ControlInterrupt.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 GenericException subclass:#ControlInterrupt
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Control'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Control'
 !
 
 !ControlInterrupt class methodsFor:'documentation'!
@@ -40,6 +40,7 @@
 "
 ! !
 
+
 !ControlInterrupt class methodsFor:'initialization'!
 
 initialize
@@ -50,6 +51,7 @@
     "
 ! !
 
+
 !ControlInterrupt class methodsFor:'testing'!
 
 isControlInterrupt
@@ -58,10 +60,15 @@
     "Created: / 16.11.2001 / 16:11:11 / cg"
 ! !
 
+
 !ControlInterrupt class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/ControlInterrupt.st,v 1.8 2013-04-27 10:13:40 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ControlInterrupt.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/ControlRequest.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ControlRequest.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Exception subclass:#ControlRequest
@@ -44,5 +43,12 @@
 !ControlRequest class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ControlRequest.st,v 1.4 2003-10-07 13:25:12 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ControlRequest.st,v 1.4 2003/10/07 13:25:12 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: ControlRequest.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/ConversionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ConversionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ProceedableError subclass:#ConversionError
@@ -51,7 +50,14 @@
 !ConversionError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ConversionError.st,v 1.6 2004-08-22 17:47:16 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ConversionError.st,v 1.6 2004/08/22 17:47:16 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: ConversionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 ConversionError initialize!
+
+
+
--- a/DateConversionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/DateConversionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -43,7 +43,14 @@
 !DateConversionError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/DateConversionError.st,v 1.1 2008-08-06 09:23:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/DateConversionError.st,v 1.1 2008/08/06 09:23:17 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: DateConversionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 DateConversionError initialize!
+
+
+
--- a/DecodingError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/DecodingError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 CharacterEncoderError subclass:#DecodingError
@@ -38,5 +37,12 @@
 !DecodingError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/DecodingError.st,v 1.2 2004-03-09 21:59:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/DecodingError.st,v 1.2 2004/03/09 21:59:09 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: DecodingError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/DeepCopyError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/DeepCopyError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -50,6 +50,10 @@
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/DeepCopyError.st,v 1.2 2013-12-24 10:39:41 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: DeepCopyError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/DomainError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/DomainError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ArithmeticError subclass:#DomainError
@@ -55,7 +54,14 @@
 !DomainError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/DomainError.st,v 1.4 2003-08-29 19:14:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/DomainError.st,v 1.4 2003/08/29 19:14:53 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: DomainError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 DomainError initialize!
+
+
+
--- a/ElementBoundsError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ElementBoundsError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Error subclass:#ElementBoundsError
@@ -54,7 +53,14 @@
 !ElementBoundsError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ElementBoundsError.st,v 1.1 2004-04-23 11:16:20 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ElementBoundsError.st,v 1.1 2004/04/23 11:16:20 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: ElementBoundsError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 ElementBoundsError initialize!
+
+
+
--- a/EncodingError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/EncodingError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 CharacterEncoderError subclass:#EncodingError
@@ -38,5 +37,12 @@
 !EncodingError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/EncodingError.st,v 1.2 2004-03-09 21:57:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/EncodingError.st,v 1.2 2004/03/09 21:57:20 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: EncodingError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/EndOfStreamError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/EndOfStreamError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#EndOfStreamError
@@ -64,7 +63,14 @@
 !EndOfStreamError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/EndOfStreamError.st,v 1.1 2005-11-16 08:45:55 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/EndOfStreamError.st,v 1.1 2005/11/16 08:45:55 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: EndOfStreamError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 EndOfStreamError initialize!
+
+
+
--- a/EndOfStreamNotification.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/EndOfStreamNotification.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Notification subclass:#EndOfStreamNotification
@@ -58,5 +57,12 @@
 !EndOfStreamNotification class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/EndOfStreamNotification.st,v 1.3 2005-11-16 08:44:41 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/EndOfStreamNotification.st,v 1.3 2005/11/16 08:44:41 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: EndOfStreamNotification.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/Exception.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Exception.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 GenericException subclass:#Exception
@@ -62,6 +61,13 @@
 !Exception class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Exception.st,v 1.82 2003-10-07 13:25:24 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Exception.st,v 1.82 2003/10/07 13:25:24 stefan Exp $'
+
+!
 
+version_SVN
+    ^ '$Id: Exception.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/ExceptionHandlerSet.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ExceptionHandlerSet.st	Mon Apr 25 10:19:26 2016 +0100
@@ -112,6 +112,7 @@
 "
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'Compatibility-VW5.4'!
 
 on:aSignalOrException handle:aHandler
@@ -122,6 +123,7 @@
     "Created: / 26.7.1999 / 09:51:37 / stefan"
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'adding'!
 
 on:anExceptionHandler do:aHandlerBlock
@@ -137,6 +139,7 @@
     self at:anExceptionHandler put:aHandlerBlock
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'queries'!
 
 accepts:anExceptionHandler
@@ -220,6 +223,7 @@
     ^ false
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'save evaluation'!
 
 handleDo:aBlock
@@ -318,6 +322,7 @@
     "Modified: / 26.7.1999 / 11:36:47 / stefan"
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'testing'!
 
 isExceptionHandler
@@ -327,9 +332,14 @@
     ^ true
 ! !
 
+
 !ExceptionHandlerSet class methodsFor:'documentation'!
 
 version
     ^ '$Header$'
+!
+
+version_SVN
+    ^ '$Id: ExceptionHandlerSet.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/ExecutionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ExecutionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ProceedableError subclass:#ExecutionError
@@ -50,7 +49,14 @@
 !ExecutionError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExecutionError.st,v 1.4 2003-09-05 10:26:58 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExecutionError.st,v 1.4 2003/09/05 10:26:58 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: ExecutionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 ExecutionError initialize!
+
+
+
--- a/ExternalFunctionCallback.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ExternalFunctionCallback.st	Mon Apr 25 10:19:26 2016 +0100
@@ -27,7 +27,7 @@
 # include <ffi.h>
 # define MAX_ARGS    128
 
-# ifdef USE_STANDARD_FFI
+#if ! defined( __MINGW__ )
 #  define __get_ffi_type_sint() &ffi_type_sint
 #  define __get_ffi_type_sint8() &ffi_type_sint8
 #  define __get_ffi_type_sint16() &ffi_type_sint16
--- a/ExternalLibraryFunction.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ExternalLibraryFunction.st	Mon Apr 25 10:19:26 2016 +0100
@@ -28,11 +28,15 @@
 %{
 #define VERBOSE
 
+#ifdef VERBOSE
+# include <stdio.h>
+#endif
+
 #ifdef HAVE_FFI
 # include <ffi.h>
 # define MAX_ARGS    128
 
-# ifdef USE_STANDARD_FFI
+#if ! defined( __MINGW__ )
 #  define __get_ffi_type_sint() &ffi_type_sint
 #  define __get_ffi_type_sint8() &ffi_type_sint8
 #  define __get_ffi_type_sint16() &ffi_type_sint16
@@ -145,7 +149,7 @@
   Synchronous vs. Asynchronous calls:
 
     by default, foreign function calls are synchronous, effectively blocking the whole ST/X system
-    (that is by purpose,because most C-code is not prepared for being interrupted, and also, normal
+    (that is by purpose,because most C-code is not prepared for being interrupted, and also, normal
      code is not prepared for a garbage collector to move objects around, while another C thread might
      access the data...).
     Therefore, the following will block all ST/X activity for 10 seconds
@@ -783,6 +787,8 @@
 	argumentTypes := argumentTypes collect:[:argType | self class ffiTypeSymbolForType:argType].
     ].
     returnType := self class ffiTypeSymbolForType:returnType.
+
+    "Modified: / 07-07-2015 / 22:18:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 linkToModule
@@ -952,6 +958,14 @@
 
     argTypeSymbols := argumentTypes.
     returnTypeSymbol := returnType.
+    returnTypeSymbol isSymbol ifTrue:[ 
+        | returnValueClass0 |
+
+        returnValueClass0 := Smalltalk at: returnTypeSymbol.
+        returnValueClass0 isBehavior ifTrue:[
+            returnValue := returnValueClass0 basicNew.
+        ] 
+    ].
 
     virtual := self isVirtualCPP.
     objectiveC := self isObjectiveC.
@@ -1868,10 +1882,20 @@
 	printf("return pointer: %"_lx_"\n", (INT)(__returnValue.pointerVal));
     }
 # endif
-    if (returnTypeSymbol == @symbol(handle)) {
+    if (returnTypeSymbol == @symbol(handle) || returnTypeSymbol == @symbol(pointer)) {
+        if (__returnValue.pointerVal == NULL) {
+            RETURN ( nil );
+        } else {
+            if (returnValue != nil) {
+            	static struct inlineCache _initialize_ilc = _ILC0;
+                __externalAddressVal(returnValue) = __returnValue.pointerVal;
+                /* Call initialize */
+                (_initialize_ilc.ilc_func)(returnValue, @symbol(initialize), nil, &_initialize_ilc);
+                RETURN ( returnValue );
+            } else {
 	returnValue = __MKEXTERNALADDRESS(__returnValue.pointerVal);
-    } else if (returnTypeSymbol == @symbol(pointer)) {
-	returnValue = __MKEXTERNALBYTES(__returnValue.pointerVal);
+            }
+        }
     } else if (returnTypeSymbol == @symbol(bytePointer)) {
 	returnValue = __MKEXTERNALBYTES(__returnValue.pointerVal);
     } else if (returnTypeSymbol == @symbol(charPointer)) {
@@ -1936,6 +1960,7 @@
 
     "Created: / 01-08-2006 / 13:56:23 / cg"
     "Modified: / 31-03-2016 / 00:03:03 / cg"
+    "Modified: / 07-07-2015 / 22:21:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 tryAgainWithAsyncSafeArguments:argumentsOrNil forCPPInstance:aReceiverOrNil
@@ -2014,11 +2039,16 @@
 !
 
 version_CVS
-    ^ '$Header$'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.97 2015-04-20 10:48:54 cg Exp $'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 !
 
 version_SVN
-    ^ '$ Id: ExternalLibraryFunction.st 10643 2011-06-08 21:53:07Z vranyj1  $'
+    ^ ' Id: ExternalLibraryFunction.st 10643 2011-06-08 21:53:07Z vranyj1  '
 ! !
 
 
--- a/ExternalStream.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ExternalStream.st	Mon Apr 25 10:19:26 2016 +0100
@@ -2767,7 +2767,7 @@
 	    if (_buffered) {
 		__WRITING__(f)
 	    }
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 	    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 		cnt = __win32_fwrite(__stringVal(aString), 1, len, f);
 	    } else
@@ -2792,7 +2792,7 @@
 		} else {
 		    cp = "\n"; len = 1;
 		}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 		    cnt = __win32_fwrite(cp, 1, len, f);
 		} else
@@ -4245,7 +4245,7 @@
 	    if (_buffered) {
 		__WRITING__(f)
 	    }
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 	    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 		cnt = __win32_fwrite(&c, 1, 1, f);
 	    } else
@@ -5921,7 +5921,7 @@
 		    cp = "\n"; len = 1;
 		}
 	    }
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 	    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 		cnt = __win32_fwrite(cp, 1, len, f);
 	    } else
@@ -5976,7 +5976,7 @@
 	    if (__INST(mode) != @symbol(readonly)) {
 		if (_buffered) {
 		    FILEPOINTER f = __FILEVal(fp);
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			__win32_fflush(f);
 		    } else {
@@ -6070,7 +6070,7 @@
 			if (_buffered) {
 			    __WRITING__(f)
 			}
-# ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 			if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			    cnt = __win32_fwrite(buff, 1, nBytes, f);
 			} else
@@ -6243,7 +6243,7 @@
 		    }
 
 		    len = dp - buf;
-# ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite(buf, 1, len, f);
 		    } else
@@ -6253,7 +6253,7 @@
 		    }
 		    free(buf);
 		} else  {  // No EOL conversion needed
-# ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite(stringP, 1, len, f);
 		    } else
@@ -6275,7 +6275,7 @@
 			len = __byteArraySize(aCollection) - offs;
 		    } else
 			goto out;
-# ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite(__stringVal(aCollection), 1, len, f);
 		    } else
@@ -6442,7 +6442,7 @@
 		    }
 
 		    len = dp - buf;
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite(buf, 1, len, f);
 		    } else
@@ -6452,7 +6452,7 @@
 		    }
 		    free(buf);
 		} else  {  // No EOL conversion needed
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite(stringP, 1, len, f);
 		    } else
@@ -6482,7 +6482,7 @@
 			iStop = len;
 		    len = iStop - iStart + 1;
 		    offs += iStart - 1;
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite(__stringVal(aCollection)+iStart-1, 1, len, f);
 		    } else
@@ -6634,7 +6634,7 @@
 		}
 
 		if (extPtr) {
-# ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite(extPtr+offs, 1, len, f);
 		    } else
@@ -6648,7 +6648,7 @@
 		     * So we pass anObject, and the offset to the __WRITEBYTES_OBJ__ macro.
 		     */
 		    offs += nInstBytes;
-# ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 		    if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			cnt = __win32_fwrite((char *)anObject+offs, 1, len, f);
 		    } else
@@ -6800,7 +6800,7 @@
 			if (_buffered) {
 			    __WRITING__(f)
 			}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW__)
 			if ((f == __win32_stdout()) || (f == __win32_stderr())) {
 			    cnt = __win32_fwrite(&c, 1, 1, f);
 			} else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FileDirectory.st	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,837 @@
+"
+ COPYRIGHT (c) 1989 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+"{ Package: 'stx:libbasic' }"
+
+Collection subclass:#FileDirectory
+	instanceVariableNames:'pathName lazy'
+	classVariableNames:'PathOfCurrentDirectory'
+	poolDictionaries:''
+	category:'Compatibility-Squeak'
+!
+
+ArrayedCollection subclass:#DirectoryEntry
+	instanceVariableNames:'name creationTime modificationTime dirFlag fileSize'
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:FileDirectory
+!
+
+!FileDirectory class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1989 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+documentation
+"
+    Notice:
+        This class is obsolete and does work only under UNIX. 
+        Use Filename instead. It is left here for squeak compatibility.
+
+        This class is not available in other ST-systems;
+        in contrast, VisualWorks provides a Filename class.
+        Therefore, Filename has taken over the functionality.
+
+    FileDirectories represent directories in the underlying host system.
+    They provide various methods to create/delete and query for files and/or
+    directories. Also, since FileDirectory inherits from Collection, it
+    provides all enumeration and testing protocol. For example, you can
+    loop over the filenames in a directory using 'aFileDirectory do:[:nm | ...]'.
+
+    [author:]
+        Claus Gittinger
+
+    [see also:]
+        Filename
+        FileStream DirectoryStream OperatingSystem
+"
+! !
+
+!FileDirectory class methodsFor:'initialization'!
+
+initialize
+    "/
+    "/ want to know about image restart
+    "/
+    ObjectMemory addDependent:self
+!
+
+update:something with:aParameter from:changedObject
+    "/
+    "/ currentDirectory may be different when restarted
+    "/
+    something == #earlySystemInstallation ifTrue:[
+        PathOfCurrentDirectory := nil
+    ]
+
+    "Created: / 15.6.1996 / 15:20:21 / cg"
+    "Modified: / 11.12.1998 / 16:28:40 / cg"
+! !
+
+!FileDirectory class methodsFor:'instance creation'!
+
+currentDirectory
+    "create and return a new FileDirectory for the current directory"
+
+    "/ self obsoleteMethodWarning:'use Filename'.
+    ^ self on:(Filename currentDirectory name)
+
+    "
+     FileDirectory currentDirectory contents
+     FileDirectory currentDirectory files
+     FileDirectory currentDirectory isReadable
+     FileDirectory currentDirectory pathName
+    "
+
+    "Modified: / 20-08-2011 / 12:19:51 / cg"
+!
+
+directoryNamed:name
+    "create and return a new FileDirectory for the directory
+     with given pathname"
+
+    "/ self obsoleteMethodWarning:'use Filename'.
+    name asString = '.' ifTrue:[
+        Filename currentDirectory name ~= '.' ifTrue:[
+            ^ self currentDirectory
+        ]
+    ].
+    ^ self on:(name asFilename constructString:'')
+
+    "
+     (FileDirectory directoryNamed:'..') pathName
+     (FileDirectory directoryNamed:'../..') files
+    "
+
+    "Modified: / 20-08-2011 / 12:19:57 / cg"
+!
+
+directoryNamed:name in:aFileDirectory
+    "create and return a new FileDirectory for the directory with given name
+     in another FileDirectory"
+
+    |baseName|
+
+    "/ self obsoleteMethodWarning:'use Filename'.
+
+    name asFilename isAbsolute ifTrue:[
+        ^ self directoryNamed:name
+    ].
+    
+    (aFileDirectory isKindOf:FileDirectory) ifTrue:[
+        baseName := aFileDirectory pathName
+    ] ifFalse:[
+        baseName := aFileDirectory
+    ].
+    ^ self on:((Filename named:baseName) constructString:name)
+
+    "Modified: / 28-04-1997 / 22:34:47 / dq"
+    "Modified: / 20-08-2011 / 12:20:03 / cg"
+!
+
+on:aDirectoryPathName
+    ^ (self basicNew) pathName:aDirectoryPathName
+
+    "Created: / 20-08-2011 / 12:19:28 / cg"
+!
+
+rootDirectory
+    "create and return a new FileDirectory for the root directory"
+
+    "/ self obsoleteMethodWarning:'use Filename'.
+    ^ self on:(Filename rootDirectory name)
+
+    "
+     FileDirectory rootDirectory contents
+     FileDirectory rootDirectory files
+     FileDirectory rootDirectory isReadable
+    "
+
+    "Modified: / 20-08-2011 / 12:20:09 / cg"
+! !
+
+!FileDirectory class methodsFor:'Compatibility-Squeak'!
+
+default
+    ^ (self basicNew) pathName:(Filename defaultDirectory name)
+!
+
+localNameFor:aFileNameString
+    ^ aFileNameString asFilename baseName
+!
+
+pathNameDelimiter
+    ^ Filename separator
+!
+
+slash
+    ^ Filename separator asString
+
+    "Created: / 20-08-2011 / 12:18:27 / cg"
+! !
+
+!FileDirectory class methodsFor:'private'!
+
+fullPathNameOf:name in:path
+    |sep|
+
+    sep := OperatingSystem fileSeparator asString.
+
+    "/ is it an absolute path ?
+
+    (name startsWith:sep) ifTrue:[
+        ^ name
+    ].
+
+    "/ temporary kludge; this and the previous should
+    "/ go into OS isAbsolutePath ..
+
+    OperatingSystem isMSDOSlike ifTrue:[
+        ('[a-zA-Z]:*' match:name) ifTrue:[
+            "/ drive spec ...
+            ^ name
+        ]
+    ].                  
+    ^ path , sep , name
+
+    "Modified: 28.4.1997 / 22:06:17 / cg"
+    "Modified: 28.4.1997 / 22:34:18 / dq"
+! !
+
+!FileDirectory methodsFor:'Compatibility-Squeak'!
+
+assureExistence
+    self asFilename recursiveMakeDirectory
+!
+
+containingDirectory
+    ^ self class
+        directoryNamed:(self asFilename directory pathName)
+!
+
+deleteDirectory:dirName
+    "Squeak/ST80 compatibility"
+
+    ^ self removeDirectory:dirName
+!
+
+deleteFileNamed:fileName
+    "Squeak/ST80 compatibility"
+
+    ^ self removeFile:fileName
+!
+
+directoryEntryFor:name
+    |info|
+
+    info := self infoOf:name.
+    info isNil ifTrue:[
+        info := (self filenameFor:name) linkInfo.
+    ].
+    ^ DirectoryEntry new
+        name:name
+        creationTime:(info creationTime)
+        modificationTime:(info modificationTime)
+        dirFlag:(info isDirectory)
+        fileSize:(info isDirectory)
+
+    "
+     (FileDirectory directoryNamed:'.') entries
+    "
+
+    "Modified: / 29-08-2011 / 08:19:48 / cg"
+!
+
+directoryExists:dir
+    "Squeak/ST80 compatibility"
+
+    |f|
+
+    f := self filenameFor:dir.
+    ^ f exists and:[f isDirectory ].
+!
+
+directoryNames
+    "Squeak/ST80 compatibility"
+
+    ^ self directories
+!
+
+entries
+    ^ self contents collect:[:nm | self directoryEntryFor:nm].
+!
+
+fileExists:dir
+    "Squeak/ST80 compatibility"
+
+    |f|
+
+    f := self filenameFor:dir.
+    ^ f exists and:[f isDirectory not ].
+!
+
+fileNames
+    "Squeak/ST80 compatibility"
+
+    ^ self files
+!
+
+forceNewFileNamed:fn
+    "Squeak/ST80 compatibility"
+
+    |f|
+
+    f := self filenameFor:fn.
+    ^ f writeStream
+!
+
+includesKey:name
+    "Squeak/ST80 compatibility"
+
+    ^ self exists:name
+!
+
+oldFileNamed:fn
+    "Squeak/ST80 compatibility"
+
+    |f|
+
+    f := self filenameFor:fn.
+    ^ f readStream
+!
+
+readOnlyFileNamed:fn
+    "Squeak/ST80 compatibility"
+
+    |f|
+
+    f := self filenameFor:fn.
+    ^ f readStream
+!
+
+recursiveDelete
+    self asFilename recursiveRemove
+! !
+
+!FileDirectory methodsFor:'accessing'!
+
+baseName
+    "return my baseName
+     - thats the directory name without leading parent-dirs"
+
+    lazy ifTrue:[self getFullPathName].
+    ^ pathName asFilename baseName
+!
+
+contents 
+    "return a collection with all files and subdirectories in the receiver.
+     Skips any '.' or '..' entries (UNIX)"
+
+    |coll|
+
+    coll := OrderedCollection new.
+    self do:[:name |
+        name ~= '.' ifTrue:[
+            name ~= '..' ifTrue:[
+                coll add:name
+            ]
+        ]
+    ].
+    coll sort.
+    ^ coll
+
+    "Modified: 20.6.1997 / 17:05:43 / cg"
+!
+
+directories
+    "return a collection with all subdirectories in the receiver directory"
+
+    |coll|
+
+    coll := OrderedCollection new.
+    self directoriesDo:[:name |
+	coll add:name
+    ].
+    coll sort.
+    ^ coll
+!
+
+directoryName
+    "return my directoryName
+     - thats the directory name where I'm in"
+
+    lazy ifTrue:[self getFullPathName].
+    ^ pathName asFilename directoryName
+!
+
+files
+    "return a collection with all plain files in the receiver directory"
+
+    |coll|
+
+    coll := OrderedCollection new.
+    self filesDo:[:name |
+	coll add:name
+    ].
+    coll sort.
+    ^ coll
+!
+
+pathName
+    "return my full pathname"
+
+    lazy ifTrue:[self getFullPathName].
+    ^ pathName
+!
+
+pathName:dirName
+    "set my pathname; return nil if not a valid path; self otherwise"
+
+    pathName := dirName.
+    (dirName startsWith:OperatingSystem fileSeparator) ifFalse:[
+	lazy := true
+    ] ifTrue:[
+	(dirName startsWith:'./') ifFalse:[
+"/        (dirName includes:$.) ifTrue:[
+	    lazy := true
+	]
+    ].
+    ^ self
+! !
+
+!FileDirectory methodsFor:'basic'!
+
+createDirectory:newName
+    "create a new filedirectory as a subdirectory of myself;
+     return true if successful"
+
+    |realName|
+
+    (newName notNil and:[newName notEmpty]) ifTrue:[
+	(newName ~= '.' and:[newName ~= '..']) ifTrue:[
+	    ((newName at:1) == OperatingSystem fileSeparator) ifTrue:[
+		realName := newName copyFrom:2
+	    ] ifFalse:[
+		realName := newName
+	    ].
+	    ^ (self filenameFor:realName) makeDirectory
+	]
+    ].
+    ^ false
+!
+
+link:oldFileName to:newFileName
+    "link oldFileName to newFileName in myself, return true if successful"
+
+    |path1 path2|
+
+    path1 := self pathNameOf:oldFileName.
+    path2 := self pathNameOf:newFileName.
+    ^ OperatingSystem linkFile:path1 to:path2
+!
+
+remove:aFileOrDirectoryName
+    "remove the file or directory from myself; return true if successful"
+
+    ^ (self filenameFor:aFileOrDirectoryName) remove
+!
+
+removeDirectory:dirName
+    "remove the directory 'dirName' from myself; return true if successful.
+     If the directory is not empty, the containing files/directories are also
+     removed."
+
+    ^ (self filenameFor:dirName) recursiveRemove
+!
+
+removeFile:fileName
+    "remove the file 'fileName' from myself; return true if successful"
+
+    ^ (self filenameFor:fileName) remove
+!
+
+renameFile:oldFileName newName:newFileName
+    "rename the file; return true if successful"
+
+    |f1 f2|
+
+    f1 := self filenameFor:oldFileName.
+    f2 := self filenameFor:newFileName.
+    ^ f1 renameTo:f2
+! !
+
+!FileDirectory methodsFor:'converting'!
+
+asFilename
+    "return myself as a filename"
+
+    ^ self pathName asFilename
+!
+
+asFilename:someFile
+    "return a filename for a file named someFile in myself"
+
+    ^ self asFilename construct:someFile
+! !
+
+!FileDirectory methodsFor:'enumerating'!
+
+allDirectoriesDo:aBlock
+    "evaluate the argument, aBlock for every directory name
+     in the directory and in all subdirectories"
+
+    |aStream command line|
+
+    lazy ifTrue:[self getFullPathName].
+    command := 'cd ' , pathName , '; find . -type d -print'.
+    aStream := PipeStream readingFrom:command.
+    aStream isNil ifTrue:[^ nil].
+    [aStream atEnd] whileFalse:[
+	line := aStream nextLine.
+	line notNil ifTrue:[
+	    (line = '.') ifFalse:[
+		"cut off initial ./"
+		line := line copyFrom:3
+	    ].
+	    aBlock value:line
+	]
+    ].
+    aStream close
+!
+
+allFilesDo:aBlock
+    "evaluate the argument, aBlock for every file name in the directory and in all
+     subdirectories"
+
+    |aStream command line|
+
+    lazy ifTrue:[self getFullPathName].
+    command := 'cd ' , pathName , '; find . -print'.
+    aStream := PipeStream readingFrom:command.
+    aStream isNil ifTrue:[^ nil].
+    [aStream atEnd] whileFalse:[
+	line := aStream nextLine.
+	line notNil ifTrue:[
+	    (line = '.') ifFalse:[
+		"cut off initial ./"
+		line := line copyFrom:3
+	    ].
+	    aBlock value:line
+	]
+    ].
+    aStream close
+!
+
+directoriesDo:aBlock
+    "evaluate the argument, aBlock for every subdirectory name in the directory"
+
+    self where:[:name | (self isDirectory:name) ifTrue:[
+			    ((name ~= '.') and:[name ~= '..'])
+			] ifFalse:[
+			    false
+			]
+	       ] do:aBlock
+!
+
+do:aBlock
+    "evaluate the argument, aBlock for every name in the directory"
+
+    self where:[:name | true] do:aBlock
+!
+
+filesDo:aBlock
+    "evaluate the argument, aBlock for every plain file name in the directory"
+
+    self where:[:name | (self isDirectory:name) not] do:aBlock
+!
+
+namesDo:aBlock
+    "evaluate the argument, aBlock for every name in the directory.
+     for ST-80 compatibility"
+
+    self do:aBlock
+!
+
+where:testBlock do:aBlock
+    "evaluate the argument, aBlock for every object in the directory
+     for which testBlock evaluates to true."
+
+    |aStream name|
+
+    ExternalStream openErrorSignal catch:[
+        aStream := DirectoryStream directoryNamed:pathName.
+    ].
+    aStream isNil ifTrue:[^ nil].
+    [aStream atEnd] whileFalse:[
+        name := aStream nextLine.
+        name notNil ifTrue:[
+            (testBlock value:name) ifTrue:[
+                aBlock value:name
+            ]
+        ]
+    ].
+    aStream close
+! !
+
+!FileDirectory methodsFor:'instance creation'!
+
+directoryNamed:aName
+    "create & return a new fileDirectory for a subdirectory in myself"
+
+    ^ self class directoryNamed:aName in:self pathName
+! !
+
+!FileDirectory methodsFor:'printing & storing'!
+
+printOn:aStream
+    "append a user printed representation of the receiver to aStream.
+     The format is suitable for a human - not meant to be read back."
+
+    lazy ifTrue:[self getFullPathName].
+    aStream nextPutAll:'(a FileDirectory pathName:';
+            nextPutAll:pathName;
+            nextPutAll:')'
+!
+
+storeOn:aStream
+    "append a printed representation of the receiver to aStream,
+     which allows reconstructing it via readFrom:"
+
+    lazy ifTrue:[self getFullPathName].
+    aStream nextPutAll:'(FileDirectory directoryNamed:'.
+    aStream nextPutAll:pathName.
+    aStream nextPut:$)
+! !
+
+!FileDirectory methodsFor:'private'!
+
+filenameFor:fileName
+    "return a filename representing the argument, fileName
+     either in myself (if the arg is a releative path) or absolute otherwise."
+
+    ^ pathName asFilename filenameFor:fileName
+!
+
+fullNameFor:fileName
+    "return a filename representing the argument, fileName
+     either in myself (if the arg is a releative path) or absolute otherwise."
+
+    ^ (pathName asFilename filenameFor:fileName) asAbsoluteFilename
+!
+
+getFullPathName
+    "make my pathname be a full pathname - i.e. starting at root"
+
+    |shortPathName|
+
+
+    (pathName = OperatingSystem fileSeparator asString) ifTrue:[
+	lazy := false.
+	^ self
+    ].
+
+    "since currentDirectory is used very often, cache its path here"
+
+    (pathName = '.') ifTrue:[
+	PathOfCurrentDirectory notNil ifTrue:[
+	    pathName := PathOfCurrentDirectory.
+	    lazy := false.
+	    ^ self
+	]
+    ].
+
+    shortPathName := pathName.
+
+    pathName := OperatingSystem pathNameOf:pathName.
+    lazy := false.
+
+    "
+     if it was the current dir, keep name for next query
+    "
+    (shortPathName = '.') ifTrue:[
+	PathOfCurrentDirectory := pathName
+    ]
+!
+
+pathNameOf:fileName
+    "return the pathname for an entry in myself"
+
+    ^ (pathName asFilename construct:fileName) osName
+! !
+
+!FileDirectory methodsFor:'queries'!
+
+accessModeOf:name
+    "return the access-mode bits (rwxrwxrwx) of a file in myself"
+
+    ^ OperatingSystem accessModeOf:(self pathNameOf:name)
+!
+
+changeAccessModeOf:name to:modeBits
+    "set the access-mode bits (rwxrwxrwx) of a file in myself"
+
+    ^ OperatingSystem changeAccessModeOf:(self pathNameOf:name) to:modeBits
+!
+
+exists
+    "return true if this directory exists"
+
+    ^ (Filename named:pathName) isDirectory
+
+    "
+     (FileDirectory directoryNamed:'fooBar') exists
+     (FileDirectory directoryNamed:'/tmp') exists
+    "
+!
+
+exists:name
+    "return true, if the given name exists in myself"
+
+    ^ (self filenameFor:name) exists
+!
+
+id
+    "return the directories file-id (inode number)"
+
+    ^ (Filename named:pathName) id
+!
+
+infoOf:name
+    "return an array filled with file info for the file 'aFileName';
+     return nil if such a file does not exist"
+
+    ^ (self filenameFor:name) info
+!
+
+isDirectory:name
+    "return true, if the given name is that of a directory in myself"
+
+    ^ (self filenameFor:name) isDirectory
+!
+
+isExecutable:name
+    "return true, if the given file is executable"
+
+    ^ (self filenameFor:name) isExecutable
+!
+
+isReadable:name
+    "return true, if the given file is readable"
+
+    ^ (self filenameFor:name) isReadable
+!
+
+isWritable:name
+    "return true, if the given file is readable"
+
+    ^ (self filenameFor:name) isWritable
+!
+
+species
+    "return the type of collection to be returned by collect, select etc."
+
+    ^ OrderedCollection
+!
+
+timeOfLastChange
+    "return the timeStamp of myself"
+
+    ^ (Filename named:pathName) modificationTime
+!
+
+timeOfLastChange:name
+    "return the timeStamp of a file in myself"
+
+    ^ (self filenameFor:name) modificationTime
+!
+
+typeOf:name
+    "return the symbolic type of a file in myself"
+
+    ^ (self filenameFor:name) type
+! !
+
+!FileDirectory methodsFor:'testing'!
+
+isEmpty
+    "return true, if the directory is empty;
+     redefined since '.' and '..' do not count as entries here."
+
+    self do:[:fName |
+	((fName ~= '.') and:[fName ~= '..']) ifTrue:[^ false].
+    ].
+    ^ true
+! !
+
+!FileDirectory::DirectoryEntry methodsFor:'accessing'!
+
+at: index
+    "compatibility interface"
+    "self halt: 'old-style access to DirectoryEntry'"
+    index = 1 ifTrue: [ ^self name ].
+    index = 2 ifTrue: [ ^self creationTime ].
+    index = 3 ifTrue: [ ^self modificationTime ].
+    index = 4 ifTrue:[ ^self isDirectory ].
+    index = 5 ifTrue:[ ^self fileSize ].
+    self error: 'invalid index specified'.
+!
+
+creationTime
+    ^ creationTime
+!
+
+dirFlag
+    ^ dirFlag
+!
+
+fileSize
+    ^ fileSize
+!
+
+modificationTime
+    ^ modificationTime
+!
+
+name
+    ^ name
+!
+
+name:nameArg creationTime:creationTimeArg modificationTime:modificationTimeArg dirFlag:dirFlagArg fileSize:fileSizeArg 
+    name := nameArg.
+    creationTime := creationTimeArg.
+    modificationTime := modificationTimeArg.
+    dirFlag := dirFlagArg.
+    fileSize := fileSizeArg.
+! !
+
+!FileDirectory class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/FileDirectory.st,v 1.54 2013-08-16 11:49:12 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libbasic/FileDirectory.st,v 1.54 2013-08-16 11:49:12 cg Exp $'
+! !
+
+
+FileDirectory initialize!
--- a/FileStream.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/FileStream.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1036,8 +1036,12 @@
 		currentPosition = ftell(f);
 #endif /* ! _LFS_LARGEFILE */
 	    } else {
-		currentPosition = lseek(fileno(f), (off_t)0, SEEK_CUR);
-	    }
+		if (sizeof(off_t) == 8) {
+                    currentPosition = lseek64(fileno(f), (off_t)0, SEEK_CUR);
+                } else {
+                    currentPosition = lseek(fileno(f), (off_t)0, SEEK_CUR);
+                }
+            }
 #endif /* !WIN32 */
 	} while ((currentPosition < 0) && (__threadErrno == EINTR));
 
@@ -1122,6 +1126,11 @@
 		if (__INST(buffered) == true) {
 		    ret = FSEEK(f, nP, SEEK_SET);
 		} else {
+ #if !defined(__BORLANDC__)                
+                    if (sizeof(nP) == 8)
+                        ret = lseek64(fileno(f), nP, SEEK_SET);
+                    else
+#endif
 		    ret = lseek(fileno(f), nP, SEEK_SET);
 		}
 		__threadErrno = errno;
@@ -1212,7 +1221,11 @@
 		ret = fseek(f, 0L, SEEK_END);
 #endif
 	    } else {
+                if (sizeof(off_t) == 8) {
+                    ret = lseek64(fileno(f), (off_t)0, SEEK_END);
+                } else {
 		ret = lseek(fileno(f), (off_t)0, SEEK_END);
+                }
 	    }
 #endif
 	} while ((ret < 0) && (__threadErrno == EINTR));
--- a/HaltInterrupt.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/HaltInterrupt.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 ControlInterrupt subclass:#HaltInterrupt
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Control'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Control'
 !
 
 !HaltInterrupt class methodsFor:'documentation'!
@@ -41,6 +41,7 @@
 "
 ! !
 
+
 !HaltInterrupt class methodsFor:'initialization'!
 
 initialize
@@ -51,10 +52,15 @@
     "
 ! !
 
+
 !HaltInterrupt class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/HaltInterrupt.st,v 1.4 2013-04-27 10:12:51 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: HaltInterrupt.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/HandleRegistry.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/HandleRegistry.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Registry subclass:#HandleRegistry
@@ -73,5 +72,12 @@
 !HandleRegistry class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/HandleRegistry.st,v 1.9 2002-03-04 19:15:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/HandleRegistry.st,v 1.9 2002/03/04 19:15:09 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: HandleRegistry.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/IncompleteNextCountError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/IncompleteNextCountError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#IncompleteNextCountError
@@ -64,7 +63,14 @@
 !IncompleteNextCountError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/IncompleteNextCountError.st,v 1.2 2003-08-29 19:14:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/IncompleteNextCountError.st,v 1.2 2003/08/29 19:14:43 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: IncompleteNextCountError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 IncompleteNextCountError initialize!
+
+
+
--- a/IndexNotFoundError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/IndexNotFoundError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 NotFoundError subclass:#IndexNotFoundError
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Errors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Errors'
 !
 
 !IndexNotFoundError class methodsFor:'documentation'!
@@ -40,6 +40,7 @@
 "
 ! !
 
+
 !IndexNotFoundError class methodsFor:'initialization'!
 
 initialize
@@ -50,10 +51,15 @@
     "
 ! !
 
+
 !IndexNotFoundError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/IndexNotFoundError.st,v 1.4 2013-04-27 10:06:42 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: IndexNotFoundError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/Integer.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Integer.st	Mon Apr 25 10:19:26 2016 +0100
@@ -2679,7 +2679,7 @@
      This may be useful for communication interfaces"
 
     (self bitTest:16r8000000000000000) ifTrue:[
-        ^ (self bitAnd:16rFFFFFFFFFFFFFFFF)-16r10000000000000000
+        ^ (self bitAnd:16rFFFFFFFFFFFFFFFF) - 16r10000000000000000
     ].
     ^ (self bitAnd:16r7FFFFFFFFFFFFFFF)
 
@@ -3478,7 +3478,7 @@
     ^ fibUsingDict value:self
 
     "the running time is mostly dictated by the LargeInteger multiplication performance...
-     (therefore, we get O(n) execution times, even for a linear number of multiplications)
+     (therefore, we get O(n) execution times, even for a linear number of multiplications)
 
      Time millisecondsToRun:[50000 fib_iterative]  312    (DUO 1.7Ghz CPU)
      Time millisecondsToRun:[50000 fib_helper]     109
@@ -4236,6 +4236,7 @@
     "Modified: / 20-01-1998 / 18:05:02 / stefan"
     "Created: / 07-09-2001 / 13:51:33 / cg"
     "Modified: / 02-08-2010 / 12:24:14 / cg"
+    "Modified (comment): / 28-12-2015 / 08:23:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 printOn:aStream base:baseInteger size:sz
@@ -5610,6 +5611,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- a/InvalidByteCodeError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/InvalidByteCodeError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 InvalidCodeError subclass:#InvalidByteCodeError
@@ -50,7 +49,14 @@
 !InvalidByteCodeError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/InvalidByteCodeError.st,v 1.4 2003-09-05 10:28:30 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/InvalidByteCodeError.st,v 1.4 2003/09/05 10:28:30 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: InvalidByteCodeError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 InvalidByteCodeError initialize!
+
+
+
--- a/InvalidCodeError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/InvalidCodeError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ExecutionError subclass:#InvalidCodeError
@@ -50,7 +49,14 @@
 !InvalidCodeError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/InvalidCodeError.st,v 1.4 2003-09-05 10:27:13 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/InvalidCodeError.st,v 1.4 2003/09/05 10:27:13 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: InvalidCodeError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 InvalidCodeError initialize!
+
+
+
--- a/InvalidEncodingError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/InvalidEncodingError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 DecodingError subclass:#InvalidEncodingError
@@ -44,5 +43,12 @@
 !InvalidEncodingError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/InvalidEncodingError.st,v 1.3 2004-03-09 22:00:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/InvalidEncodingError.st,v 1.3 2004/03/09 22:00:59 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: InvalidEncodingError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/InvalidInstructionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/InvalidInstructionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 InvalidCodeError subclass:#InvalidInstructionError
@@ -50,7 +49,14 @@
 !InvalidInstructionError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/InvalidInstructionError.st,v 1.4 2003-09-05 10:27:30 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/InvalidInstructionError.st,v 1.4 2003/09/05 10:27:30 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: InvalidInstructionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 InvalidInstructionError initialize!
+
+
+
--- a/InvalidModeError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/InvalidModeError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#InvalidModeError
@@ -38,5 +37,12 @@
 !InvalidModeError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/InvalidModeError.st,v 1.2 2005-02-02 10:59:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/InvalidModeError.st,v 1.2 2005/02/02 10:59:58 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: InvalidModeError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/InvalidOperationError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/InvalidOperationError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#InvalidOperationError
@@ -38,5 +37,12 @@
 !InvalidOperationError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/InvalidOperationError.st,v 1.2 2005-02-02 11:02:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/InvalidOperationError.st,v 1.2 2005/02/02 11:02:30 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: InvalidOperationError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/InvalidReadError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/InvalidReadError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ReadError subclass:#InvalidReadError
@@ -44,5 +43,12 @@
 !InvalidReadError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/InvalidReadError.st,v 1.3 2005-02-02 11:02:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/InvalidReadError.st,v 1.3 2005/02/02 11:02:06 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: InvalidReadError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/JavaPackage.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/JavaPackage.st	Mon Apr 25 10:19:26 2016 +0100
@@ -20,6 +20,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 NameSpace subclass:#JavaPackage
 	instanceVariableNames:''
 	classVariableNames:''
@@ -100,18 +102,13 @@
                     thisNamespace isBehavior ifFalse:[
                          self error:'name conflict: java package ' , aName , ' vs. global with the same name'.
                     ].
-                    (thisNamespace ~~ JAVA and:[thisNamespace isJavaPackage not]) ifTrue:[
+                    (thisNamespace ~~ JAVA and:[thisNamespace isJavaPackage not and:[(thisNamespace name startsWith: #'JAVA_') not]]) ifTrue:[
                         self error:'name conflict: non-java package ' , aName , 'aleady exists'.
                     ].
                 ]
             ].
             thisNamespace isNil ifTrue:[
-                key == #JAVA ifTrue:[
-                    thisNamespace := self name: #JAVA.
-                ] ifFalse:[
-                    self breakPoint: #jv.
-                    thisNamespace := self name:key
-                ].
+                thisNamespace := self name:key
             ].
         ] ifFalse:[
             thisNamespace isNameSpace ifTrue:[
@@ -139,7 +136,7 @@
 
     "Created: / 08-11-1996 / 13:41:59 / cg"
     "Modified: / 04-01-1997 / 16:50:59 / cg"
-    "Modified: / 13-11-2014 / 16:52:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 11-01-2016 / 22:43:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 name:aStringOrSymbol
--- a/LargeFloat.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/LargeFloat.st	Mon Apr 25 10:19:26 2016 +0100
@@ -735,7 +735,10 @@
 !LargeFloat class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/LargeFloat.st,v 1.7 2004-11-12 12:23:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LargeFloat.st,v 1.7 2004/11/12 12:23:46 cg Exp $'
 ! !
 
 LargeFloat initialize!
+
+
+
--- a/MacFilename.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/MacFilename.st	Mon Apr 25 10:19:26 2016 +0100
@@ -64,5 +64,8 @@
 !MacFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/MacFilename.st,v 1.1 1997-09-17 17:43:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MacFilename.st,v 1.1 1997/09/17 17:43:58 cg Exp $'
 ! !
+
+
+
--- a/MallocFailure.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/MallocFailure.st	Mon Apr 25 10:19:26 2016 +0100
@@ -41,9 +41,14 @@
 "
 ! !
 
+
 !MallocFailure class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/MallocFailure.st,v 1.3 2013-03-13 23:47:08 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: MallocFailure.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
--- a/MappedExternalBytes.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/MappedExternalBytes.st	Mon Apr 25 10:19:26 2016 +0100
@@ -83,5 +83,8 @@
 !MappedExternalBytes class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/MappedExternalBytes.st,v 1.3 2007-02-22 15:27:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MappedExternalBytes.st,v 1.3 2007/02/22 15:27:19 cg Exp $'
 ! !
+
+
+
--- a/MetaNumber.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/MetaNumber.st	Mon Apr 25 10:19:26 2016 +0100
@@ -129,5 +129,11 @@
 
 version
     ^ '$Header$'
+!
+
+version_SVN
+    ^ '$Id: MetaNumber.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
+
+
--- a/Metaclass.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Metaclass.st	Mon Apr 25 10:19:26 2016 +0100
@@ -111,8 +111,6 @@
     "Modified: 23.4.1996 / 15:59:44 / cg"
 ! !
 
-
-
 !Metaclass methodsFor:'Compatibility-ST80'!
 
 comment:aString
@@ -131,6 +129,7 @@
     "Created: / 1.11.1997 / 13:16:45 / cg"
 ! !
 
+
 !Metaclass methodsFor:'autoload check'!
 
 isLoaded
@@ -187,6 +186,12 @@
     "
 !
 
+dllPath
+    ^ myClass dllPath
+
+    "Created: / 19-02-2016 / 14:08:59 / jv"
+!
+
 evaluatorClass
     "return the compiler to use for expression evaluation for this class -
      this can be redefined in special classes, to evaluate expressions with
@@ -938,6 +943,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MethodOverrideTests.st	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,61 @@
+'From Smalltalk/X, Version:6.1.1 on 02-07-2010 at 08:40:49 AM'                  !
+
+"{ Package: 'stx:libbasic' }"
+
+TestCase subclass:#MethodOverrideTests
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Kernel-Tests'
+!
+
+
+!MethodOverrideTests methodsFor:'initialization & release'!
+
+tearDown
+
+    #(methodToBeOverriden_1) do:
+        [:sel|
+        (self respondsTo: sel) ifTrue:
+            [self class removeSelector: sel]].
+
+    "Created: / 17-06-2009 / 19:36:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!MethodOverrideTests methodsFor:'tests'!
+
+test_01
+
+    | oldMethod newMethod |
+    '"{ Package: ''stx:libbasic'' }"
+    !!
+    !!MethodOverridesTest methodsFor:''mock methods''!!
+
+    methodToBeOverriden_1
+        ^0
+        !! !!' readStream fileIn.
+    oldMethod := self class compiledMethodAt:#methodToBeOverriden_1.
+    self assert: self methodToBeOverriden_1 = 0.
+
+
+    '"{ Package: ''stx:goodies/sunit'' }"
+    !!
+    !!MethodOverridesTest methodsFor:''mock methods''!!
+
+    methodToBeOverriden_1
+        ^1
+    !! !!' readStream fileIn.
+
+    self assert: self methodToBeOverriden_1 = 1.
+    newMethod := self class compiledMethodAt:#methodToBeOverriden_1.
+
+    self assert: newMethod overridenMethod == oldMethod.
+
+    "Created: / 17-06-2009 / 19:27:23 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!MethodOverrideTests class methodsFor:'documentation'!
+
+version
+    ^'$Id: MethodOverrideTests.st 10717 2011-10-11 15:53:59Z vranyj1 $'
+! !
--- a/NaiveRomanNumberFormatNotification.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NaiveRomanNumberFormatNotification.st	Mon Apr 25 10:19:26 2016 +0100
@@ -49,5 +49,8 @@
 !NaiveRomanNumberFormatNotification class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NaiveRomanNumberFormatNotification.st,v 1.3 2008-08-06 09:53:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NaiveRomanNumberFormatNotification.st,v 1.3 2008/08/06 09:53:07 cg Exp $'
 ! !
+
+
+
--- a/NoByteCodeError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NoByteCodeError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 InvalidCodeError subclass:#NoByteCodeError
@@ -50,7 +49,14 @@
 !NoByteCodeError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NoByteCodeError.st,v 1.4 2003-09-05 10:27:06 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NoByteCodeError.st,v 1.4 2003/09/05 10:27:06 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: NoByteCodeError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 NoByteCodeError initialize!
+
+
+
--- a/NonBooleanReceiverError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NonBooleanReceiverError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ExecutionError subclass:#NonBooleanReceiverError
@@ -50,7 +49,14 @@
 !NonBooleanReceiverError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NonBooleanReceiverError.st,v 1.4 2003-09-05 10:27:38 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NonBooleanReceiverError.st,v 1.4 2003/09/05 10:27:38 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: NonBooleanReceiverError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 NonBooleanReceiverError initialize!
+
+
+
--- a/NonIntegerIndexError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NonIntegerIndexError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 IndexNotFoundError subclass:#NonIntegerIndexError
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Errors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Errors'
 !
 
 !NonIntegerIndexError class methodsFor:'documentation'!
@@ -41,6 +41,7 @@
 "
 ! !
 
+
 !NonIntegerIndexError class methodsFor:'initialization'!
 
 initialize
@@ -51,10 +52,15 @@
     "
 ! !
 
+
 !NonIntegerIndexError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/NonIntegerIndexError.st,v 1.4 2013-04-27 10:04:41 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: NonIntegerIndexError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/NotANumber.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NotANumber.st	Mon Apr 25 10:19:26 2016 +0100
@@ -157,7 +157,10 @@
 !NotANumber class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NotANumber.st,v 1.2 2003-07-02 09:52:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NotANumber.st,v 1.2 2003/07/02 09:52:32 cg Exp $'
 ! !
 
 NotANumber initialize!
+
+
+
--- a/NotFoundError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NotFoundError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 ProceedableError subclass:#NotFoundError
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Errors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Errors'
 !
 
 !NotFoundError class methodsFor:'documentation'!
@@ -40,6 +40,7 @@
 "
 ! !
 
+
 !NotFoundError class methodsFor:'initialization'!
 
 initialize
@@ -50,10 +51,15 @@
     "
 ! !
 
+
 !NotFoundError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/NotFoundError.st,v 1.5 2013-04-27 10:05:48 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: NotFoundError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/NumberConversionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NumberConversionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -37,5 +37,9 @@
 !NumberConversionError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NumberConversionError.st,v 1.4 2008-08-06 09:53:01 cg Exp $'
+    ^ '$Id: NumberConversionError.st 10808 2012-05-09 15:04:12Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id: NumberConversionError.st 10808 2012-05-09 15:04:12Z vranyj1 $'
 ! !
--- a/NumberFormatError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/NumberFormatError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -37,5 +37,9 @@
 !NumberFormatError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NumberFormatError.st,v 1.3 2008-08-06 09:52:56 cg Exp $'
+    ^ '$Id: NumberFormatError.st 10808 2012-05-09 15:04:12Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id: NumberFormatError.st 10808 2012-05-09 15:04:12Z vranyj1 $'
 ! !
--- a/OSSignalInterrupt.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OSSignalInterrupt.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ProceedableError subclass:#OSSignalInterrupt
@@ -62,7 +61,14 @@
 !OSSignalInterrupt class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OSSignalInterrupt.st,v 1.4 2005-04-11 08:53:28 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OSSignalInterrupt.st,v 1.4 2005/04/11 08:53:28 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: OSSignalInterrupt.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 OSSignalInterrupt initialize!
+
+
+
--- a/Object.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Object.st	Mon Apr 25 10:19:26 2016 +0100
@@ -610,6 +610,14 @@
     ]
 !
 
+flag:aString
+    "Send this message, with a relevant symbol as argument, to flag a message for subsequent retrieval.  For example, you might put the following line in a number of messages:
+     self flag: #returnHereUrgently
+     Then, to retrieve all such messages, browse all senders of #returnHereUrgently."
+
+    "Created: / 21-04-2015 / 15:50:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 inform: aString
     "Display a message for the user to read and then dismiss."
 
@@ -10359,6 +10367,11 @@
     ^ '$Header$'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$ Id: Object.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !
--- a/OpenVMSFileHandle.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OpenVMSFileHandle.st	Mon Apr 25 10:19:26 2016 +0100
@@ -53,5 +53,8 @@
 !OpenVMSFileHandle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFileHandle.st,v 1.1 1999-09-18 11:11:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFileHandle.st,v 1.1 1999/09/18 11:11:28 cg Exp $'
 ! !
+
+
+
--- a/OpenVMSFilename.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OpenVMSFilename.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1170,5 +1170,8 @@
 !OpenVMSFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFilename.st,v 1.18 1997-10-16 10:41:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFilename.st,v 1.18 1997/10/16 10:41:25 cg Exp $'
 ! !
+
+
+
--- a/OsError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Error subclass:#OsError
@@ -44,5 +43,12 @@
 !OsError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsError.st,v 1.3 2003-08-30 12:31:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsError.st,v 1.3 2003/08/30 12:31:08 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OsIllegalOperation.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsIllegalOperation.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OsError subclass:#OsIllegalOperation
@@ -38,5 +37,12 @@
 !OsIllegalOperation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsIllegalOperation.st,v 1.3 2003-08-30 12:31:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsIllegalOperation.st,v 1.3 2003/08/30 12:31:20 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsIllegalOperation.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OsInaccessibleError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsInaccessibleError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OsError subclass:#OsInaccessibleError
@@ -38,5 +37,12 @@
 !OsInaccessibleError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsInaccessibleError.st,v 1.3 2003-08-30 12:31:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsInaccessibleError.st,v 1.3 2003/08/30 12:31:14 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsInaccessibleError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OsInvalidArgumentsError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsInvalidArgumentsError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OsError subclass:#OsInvalidArgumentsError
@@ -38,5 +37,12 @@
 !OsInvalidArgumentsError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsInvalidArgumentsError.st,v 1.3 2003-08-30 12:31:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsInvalidArgumentsError.st,v 1.3 2003/08/30 12:31:17 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsInvalidArgumentsError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OsNeedRetryError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsNeedRetryError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OsError subclass:#OsNeedRetryError
@@ -38,5 +37,12 @@
 !OsNeedRetryError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsNeedRetryError.st,v 1.3 2003-08-30 12:31:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsNeedRetryError.st,v 1.3 2003/08/30 12:31:04 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsNeedRetryError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OsNoResourcesError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsNoResourcesError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OsError subclass:#OsNoResourcesError
@@ -38,5 +37,12 @@
 !OsNoResourcesError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsNoResourcesError.st,v 1.3 2003-08-30 12:31:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsNoResourcesError.st,v 1.3 2003/08/30 12:31:11 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsNoResourcesError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OsNotification.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsNotification.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OsError subclass:#OsNotification
@@ -38,5 +37,12 @@
 !OsNotification class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsNotification.st,v 1.3 2003-08-30 12:31:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsNotification.st,v 1.3 2003/08/30 12:31:22 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsNotification.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OsTransferFaultError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OsTransferFaultError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OsError subclass:#OsTransferFaultError
@@ -38,5 +37,12 @@
 !OsTransferFaultError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OsTransferFaultError.st,v 1.3 2003-08-30 12:31:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OsTransferFaultError.st,v 1.3 2003/08/30 12:31:25 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OsTransferFaultError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/OverflowError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/OverflowError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -41,16 +41,22 @@
 "
 ! !
 
+
 !OverflowError class methodsFor:'initialization'!
 
 initialize
     NotifierString := 'overflow'.
 ! !
 
+
 !OverflowError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/OverflowError.st,v 1.4 2013-03-13 23:43:48 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: OverflowError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/Point.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Point.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1192,7 +1192,14 @@
 
 version
     ^ '$Header$'
+!
+
+version_SVN
+    ^ '$Id: Point.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
 Point initialize!
+
+
+
--- a/PositionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/PositionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#PositionError
@@ -38,5 +37,12 @@
 !PositionError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PositionError.st,v 1.2 2005-02-02 11:02:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PositionError.st,v 1.2 2005/02/02 11:02:33 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: PositionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/PositionOutOfBoundsError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/PositionOutOfBoundsError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#PositionOutOfBoundsError
@@ -44,5 +43,12 @@
 !PositionOutOfBoundsError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PositionOutOfBoundsError.st,v 1.3 2003-08-29 19:14:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PositionOutOfBoundsError.st,v 1.3 2003/08/29 19:14:46 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: PositionOutOfBoundsError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/PositionableStream.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/PositionableStream.st	Mon Apr 25 10:19:26 2016 +0100
@@ -123,6 +123,7 @@
     "Modified: / 13-07-2006 / 20:36:54 / cg"
 ! !
 
+
 !PositionableStream methodsFor:'Compatibility-Dolphin'!
 
 endChunk
@@ -169,6 +170,28 @@
         ^ element
 
     "Created: / 03-10-2014 / 03:06:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+upToAnyOf: aCollection 
+        "Answer a subcollection from the current access position to the 
+        occurrence (if any, but not inclusive) of any object in the collection. If 
+        no matching object is found, answer the entire rest of the receiver."
+        ^self upToAnyOf: aCollection do: [:matchingObject | ]
+
+    "Created: / 21-04-2015 / 17:25:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+upToAnyOf: subcollection do: aBlock
+        "Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of any object in the collection.
+        Evaluate aBlock with this occurence as argument.
+        If no matching object is found, don't evaluate aBlock and answer the entire rest of the receiver."
+        
+        ^self collection species new: 1000 streamContents: [ :stream |
+                | ch |
+                [ self atEnd or: [ (subcollection includes: (ch := self next)) and: [aBlock value: ch. true] ] ] 
+                        whileFalse: [ stream nextPut: ch ] ]
+
+    "Created: / 21-04-2015 / 17:26:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !PositionableStream methodsFor:'accessing'!
@@ -912,6 +935,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- a/PrimitiveFailure.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/PrimitiveFailure.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 ExecutionError subclass:#PrimitiveFailure
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-ExecutionErrors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-ExecutionErrors'
 !
 
 !PrimitiveFailure class methodsFor:'documentation'!
@@ -43,6 +43,7 @@
 "
 ! !
 
+
 !PrimitiveFailure class methodsFor:'initialization'!
 
 initialize
@@ -53,6 +54,7 @@
     "
 ! !
 
+
 !PrimitiveFailure methodsFor:'printing & storing'!
 
 description
@@ -66,10 +68,15 @@
     ^ desc
 ! !
 
+
 !PrimitiveFailure class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/PrimitiveFailure.st,v 1.8 2013-04-27 10:11:13 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: PrimitiveFailure.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/PrivateMetaclass.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/PrivateMetaclass.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1996 by eXept Software AG
               All Rights Reserved
@@ -11,9 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
-
 "{ Package: 'stx:libbasic' }"
 
 Metaclass subclass:#PrivateMetaclass
@@ -132,5 +127,12 @@
 !PrivateMetaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PrivateMetaclass.st,v 1.13 2004-03-05 17:53:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PrivateMetaclass.st,v 1.13 2004/03/05 17:53:16 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: PrivateMetaclass.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/ProceedError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ProceedError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 Warning subclass:#ProceedError
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Errors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Errors'
 !
 
 !ProceedError class methodsFor:'documentation'!
@@ -53,6 +53,7 @@
 
 ! !
 
+
 !ProceedError class methodsFor:'initialization'!
 
 initialize
@@ -66,6 +67,7 @@
 
 ! !
 
+
 !ProceedError methodsFor:'default actions'!
 
 defaultAction
@@ -94,10 +96,15 @@
    "
 ! !
 
+
 !ProceedError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/ProceedError.st,v 1.6 2013-04-19 08:40:03 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ProceedError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/ProjectDefinition.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ProjectDefinition.st	Mon Apr 25 10:19:26 2016 +0100
@@ -103,6 +103,25 @@
       extensionOverwriteInfo. 
       This is used to correctly reinstall an overwritten method, whenever a package is unloaded.
 
+    ## Custom project definition methods
+
+    Some packages may want to compile custom methods when project definition is updated
+    based on project contents - similarly to how #classNamesAndAttributes or #extensionMethodNames
+    are updated.
+
+    To support this, packages mey add extension methods annotated by <method:category:overwrite:>
+    or <method:category:>. The meaning og arguments is the following:
+
+    * method: <Symbol>     - the selector of method which this method generates.
+    * category: <Symbol>   - the category in which to place generated method
+    * overwrite: <Boolean> - specifies whether the method should obe overwritten
+                             or not. Use `false` only for methods which should be
+                             generated once and then left for user to manually tweak.
+                             optional, defaults to `true` (i.e., do owerwrite methods)
+
+    The annotated method is invoked to get the code od the method to generate, i.e., it must
+    return the source code as String. If it returns nil - no method is generated.
+
     ## Build Support Files
 
     To support pre-compilation of a package, ProjectDefinition can generate a set of makefiles and other
@@ -874,6 +893,7 @@
 
 
 
+
 !ProjectDefinition class methodsFor:'accessing - packaging'!
 
 classNames:aCollectionOfClassNames
@@ -1136,6 +1156,7 @@
         ].
 ! !
 
+
 !ProjectDefinition class methodsFor:'accessing - tests'!
 
 excludedFromTestSuite
@@ -1663,6 +1684,8 @@
      If ignoreOldDefinition is true, new code is generated (class/method scan);
      otherwise, new items are added to the existing lists"
 
+    | cls |
+
     aTwoArgBlock
         value:(self classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition ignoreOldDefinition:ignoreOldDefinition)
         value:'description - contents'.
@@ -1700,7 +1723,32 @@
             value: 'description - monticello'.
     ].
 
-    "Modified: / 25-11-2013 / 13:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Add additional custom files"
+    cls := self.
+    [ cls ~~ Object ] whileTrue:[
+        cls class selectorsAndMethodsDo:[:selector :method |
+            | annotation overwrite |
+
+            annotation := method annotationAt: #method:category:overwrite:.
+            annotation notNil ifTrue:[ 
+                overwrite := annotation argumentAt: 3.
+            ] ifFalse:[ 
+                annotation := method annotationAt: #method:category:.
+                overwrite := true.
+            ].
+            (annotation notNil and:[ overwrite or:[ cls class methodDictionary includesKey: (annotation argumentAt:1) ] ]) ifTrue:[
+                | code |
+
+                code := self perform: selector.
+                code notNil ifTrue:[ 
+                    aTwoArgBlock value: code value: (annotation argumentAt: 2)
+                ].
+            ].
+        ].
+        cls := cls superclass.
+    ].
+
+    "Modified: / 12-06-2015 / 07:02:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 forEachDescriptionMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition
@@ -1945,6 +1993,7 @@
     "Modified: / 29-03-2012 / 18:43:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+
 !ProjectDefinition class methodsFor:'defaults'!
 
 applicationTypes
@@ -2181,6 +2230,7 @@
 ! !
 
 
+
 !ProjectDefinition class methodsFor:'description - classes'!
 
 additionalClassNamesAndAttributes
@@ -2474,7 +2524,7 @@
                 sed -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"\''$$rev2\''\"\$$\"/g" $< > .%1.svn.st; \
         fi
         $(MAKE) CC="$(CLASSLIB_CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" STC="$(STC)" STFILE=.%1.svn $(C_RULE);
-        sed -i -e "s/\".%1.svn.st\");/\"\%1.st\");/g" .%1.svn.c
+        sed -i -e "s/\".%1.svn.st\");/\"%1.st\");/g" .%1.svn.c
         $(MAKE) .%1.svn.$(O)
         @mv .%1.svn.$(O) %1.$(O)
 endif
@@ -3952,22 +4002,24 @@
 package_dot_deps_dot_rake_mappings
     |dependencies|
 
-    dependencies := String
-            streamContents:[:s |
-                self allPreRequisites do:[:package |
-                    (self preRequisitesFor:package) do:[:prereq |
-                        s
-                            nextPutAll:('task "%1" => "%2"' bindWith:package with:prereq);
-                            cr
-                    ].
-                    s cr
-                ].
-                self effectivePreRequisites do:[:prereq |
-                    s
-                        nextPutAll:('task "%1" => "%2"' bindWith:self package with:prereq);
-                        cr
-                ].
+    dependencies := String streamContents:[:s |
+        "/ Generate dependencies based on mandatory prereqs to define
+        "/ build order
+        self allPreRequisites asSortedCollection do:[:pkg |
+            (ProjectDefinition definitionClassForPackage:pkg) mandatoryPreRequisites asSortedCollection do:[:prereq |
+                s nextPutAll:'task "'; nextPutAll: pkg; nextPutAll: '" => "'; nextPutAll: prereq; nextPut: $"; cr.
             ].
+            s cr.
+        ].
+        s cr.
+
+        "/ Now make sure all required libraries are included in the build
+        "/ by creating dependency from application to to each prerequisite (both mandatory
+        "/ and referenced)
+        self allPreRequisites asSortedCollection do:[:prereq |
+            s nextPutAll:'task "'; nextPutAll: self package; nextPutAll: '" => "'; nextPutAll: prereq; nextPut: $"; cr.
+        ].
+    ].
 
     ^ (Dictionary new)
         at:'DEPENDENCIES' put:dependencies;
@@ -3975,9 +4027,11 @@
 
     "
         stx_libjava generate_package_dot_deps_dot_rake
+        cvut_fel_izar_application generate_package_dot_deps_dot_rake
     "
 
     "Created: / 24-02-2011 / 22:32:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 02-02-2016 / 09:34:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 replaceMappings: mappings in: fileTemplate
@@ -4701,6 +4755,7 @@
 
     "Created: / 14-09-2006 / 18:40:09 / cg"
     "Modified: / 27-09-2011 / 19:36:12 / cg"
+    "Modified: / 12-09-2015 / 12:33:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 subProjectMingwmakeCalls
@@ -4847,16 +4902,21 @@
 @REM do not edit - automatically generated from ProjectDefinition
 @REM -------
 @SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%%%i in (''hg root'') do SET HGROOT=%%%%i
+@IF "%%HGROOT%%" NEQ "" SET DEFINES=%%DEFINES%% "-DHGROOT=%%HGROOT%%"
 
 make.exe -N -f bc.mak  %%DEFINES%% %%*
 
 %(SKIP_IF_ARG_IS_APP_TARGET)
+@IF "%%1" EQU "test" exit /b 0
 
 %(SUBPROJECT_BMAKE_CALLS)
 '
 
     "Created: / 17-08-2006 / 20:04:14 / cg"
     "Modified: / 04-09-2012 / 11:46:22 / cg"
+    "Modified: / 12-09-2015 / 12:31:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 builder_baseline_dot_rbspec
@@ -4930,6 +4990,7 @@
 make.exe -N -f bc.mak -DUSELCC=1 %%*
 
 %(SKIP_IF_ARG_IS_APP_TARGET)
+@IF "%%1" EQU "test" exit /b 0
 
 %(SUBPROJECT_LCCMAKE_CALLS)
 '
@@ -5050,6 +5111,9 @@
 @REM do not edit - automatically generated from ProjectDefinition
 @REM -------
 @SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%%%i in (''hg root'') do SET HGROOT=%%%%i
+@IF "%%HGROOT%%" NEQ "" SET DEFINES=%%DEFINES%% "-DHGROOT=%%HGROOT%%"
 
 @pushd %(TOP)\rules
 @call find_mingw.bat
@@ -5057,12 +5121,13 @@
 make.exe -N -f bc.mak %DEFINES% %%USEMINGW_ARG%% %%*
 
 %(SKIP_IF_ARG_IS_APP_TARGET)
+@IF "%%1" EQU "test" exit /b 0
 
 %(SUBPROJECT_MINGWMAKE_CALLS)
 '
 
     "Created: / 05-09-2012 / 19:44:51 / cg"
-    "Modified: / 19-03-2013 / 08:54:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-09-2015 / 12:31:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 objectLine_make_dot_spec
@@ -5149,6 +5214,7 @@
 @REM -------
 make.exe -N -f bc.mak -DUSETCC=1 %%*
 
+@IF "%%1" EQU "test" exit /b 0
 %(SKIP_IF_ARG_IS_APP_TARGET)
 
 
@@ -5174,15 +5240,21 @@
     popd
 )
 @SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%%%i in (''hg root'') do SET HGROOT=%%%%i
+@IF "%%HGROOT%%" NEQ "" SET DEFINES=%%DEFINES%% "-DHGROOT=%%HGROOT%%"
+
 
 make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
 
 %(SKIP_IF_ARG_IS_APP_TARGET)
+@IF "%%1" EQU "test" exit /b 0
 
 %(SUBPROJECT_VCMAKE_CALLS)
 '
 
     "Modified: / 04-09-2012 / 11:45:49 / cg"
+    "Modified: / 12-09-2015 / 12:31:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ProjectDefinition class methodsFor:'loading'!
@@ -7134,16 +7206,24 @@
         ].
     ].
 
-    "/ ..but not if they're a Java class
+    "/ ...but not if they're a Java class
     requiredClasses := requiredClasses reject:[:each | each isJavaClass ].
 
+
     "all superclasses of my classes
      and my subProject's classes (if required) are mandatory.
      All shared pools used by my classes are required as well"
     requiredClasses do:[:cls |
-        cls allSuperclassesDo:[:eachSuperclass |
-            (mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new])
-                add: (eachSuperclass name, ' - superclass of ', cls name).
+        (self isAutoloaded: cls) ifFalse:[
+            cls allSuperclassesDo:[:eachSuperclass |
+                (mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new])
+                    add: (eachSuperclass name, ' - superclass of ', cls name).
+            ].
+        ] ifTrue:[ 
+            cls allSuperclassesDo:[:eachSuperclass |
+                (referencedClassesWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new])
+                    add: (eachSuperclass name, ' - superclass of ', cls name).
+            ].
         ].
         cls sharedPools do:[:eachSharedPool |
             (mandatoryClassesForLoadingWithReasons at: eachSharedPool ifAbsentPut:[OrderedSet new])
@@ -7227,7 +7307,7 @@
     "Modified: / 07-08-2006 / 21:56:25 / fm"
     "Created: / 17-11-2010 / 18:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Created: / 06-09-2011 / 08:29:37 / cg"
-    "Modified: / 30-07-2014 / 20:33:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 25-09-2015 / 11:21:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ProjectDefinition class methodsFor:'queries'!
@@ -7982,6 +8062,11 @@
     ^ '$Header$'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  $'
 ! !
--- a/QualifiedName.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/QualifiedName.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1,4 +1,4 @@
-"{ Package: 'stx:libbasic' }"
+"{ Package: '__NoProject__' }"
 
 Object subclass:#QualifiedName
 	instanceVariableNames:'pathString'
--- a/QueryWithoutDefault.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/QueryWithoutDefault.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Query subclass:#QueryWithoutDefault
@@ -83,7 +82,14 @@
 !QueryWithoutDefault class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/QueryWithoutDefault.st,v 1.3 2005-01-20 12:26:17 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/QueryWithoutDefault.st,v 1.3 2005/01/20 12:26:17 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: QueryWithoutDefault.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 QueryWithoutDefault initialize!
+
+
+
--- a/RangeError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/RangeError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -41,16 +41,22 @@
 "
 ! !
 
+
 !RangeError class methodsFor:'initialization'!
 
 initialize
     NotifierString := 'numeric range error'.
 ! !
 
+
 !RangeError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/RangeError.st,v 1.5 2013-03-13 23:43:54 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: RangeError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/ReadError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ReadError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#ReadError
@@ -38,5 +37,12 @@
 !ReadError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadError.st,v 1.2 2005-02-02 10:59:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadError.st,v 1.2 2005/02/02 10:59:36 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ReadError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/ReadOnlySequenceableCollection.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ReadOnlySequenceableCollection.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 SequenceableCollection subclass:#ReadOnlySequenceableCollection
@@ -106,5 +105,12 @@
 !ReadOnlySequenceableCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadOnlySequenceableCollection.st,v 1.4 2005-06-27 10:24:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadOnlySequenceableCollection.st,v 1.4 2005/06/27 10:24:03 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ReadOnlySequenceableCollection.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/RecursionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/RecursionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 Error subclass:#RecursionError
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Errors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Errors'
 !
 
 !RecursionError class methodsFor:'documentation'!
@@ -41,6 +41,7 @@
 "
 ! !
 
+
 !RecursionError class methodsFor:'initialization'!
 
 initialize
@@ -51,6 +52,7 @@
     "
 ! !
 
+
 !RecursionError class methodsFor:'queries'!
 
 mayProceed
@@ -61,10 +63,15 @@
     "Created: / 10.11.2001 / 15:10:56 / cg"
 ! !
 
+
 !RecursionError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/RecursionError.st,v 1.6 2013-04-27 10:09:34 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: RecursionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/RecursiveExceptionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/RecursiveExceptionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 Error subclass:#RecursiveExceptionError
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Errors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Errors'
 !
 
 !RecursiveExceptionError class methodsFor:'documentation'!
@@ -47,6 +47,7 @@
 
 ! !
 
+
 !RecursiveExceptionError class methodsFor:'initialization'!
 
 initialize
@@ -60,6 +61,7 @@
 
 ! !
 
+
 !RecursiveExceptionError class methodsFor:'queries'!
 
 mayProceed
@@ -69,6 +71,7 @@
 
 ! !
 
+
 !RecursiveExceptionError methodsFor:'accessing'!
 
 exception
@@ -78,10 +81,15 @@
     ^ parameter
 ! !
 
+
 !RecursiveExceptionError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/RecursiveExceptionError.st,v 1.6 2013-04-19 08:40:19 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: RecursiveExceptionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/RestartProcessRequest.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/RestartProcessRequest.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ControlRequest subclass:#RestartProcessRequest
@@ -45,5 +44,12 @@
 !RestartProcessRequest class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/RestartProcessRequest.st,v 1.2 2003-08-29 19:18:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/RestartProcessRequest.st,v 1.2 2003/08/29 19:18:11 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: RestartProcessRequest.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/RomanNumberFormatError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/RomanNumberFormatError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -49,5 +49,9 @@
 !RomanNumberFormatError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/RomanNumberFormatError.st,v 1.4 2008-08-06 09:53:04 cg Exp $'
+    ^ '$Id: RomanNumberFormatError.st 10808 2012-05-09 15:04:12Z vranyj1 $'
+!
+
+version_SVN
+    ^ '$Id: RomanNumberFormatError.st 10808 2012-05-09 15:04:12Z vranyj1 $'
 ! !
--- a/SignalError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/SignalError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,9 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
-
 "{ Package: 'stx:libbasic' }"
 
 ProceedableError subclass:#SignalError
@@ -49,5 +46,12 @@
 !SignalError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SignalError.st,v 1.5 2004-04-22 15:28:24 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SignalError.st,v 1.5 2004/04/22 15:28:24 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: SignalError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/Smalltalk.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Smalltalk.st	Mon Apr 25 10:19:26 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -745,6 +743,34 @@
     ^ Initializing not
 !
 
+isInitializing
+    "Return true if the system is currently initializing,;
+     i.e. true during startup and image restart, false during
+     normal work.
+
+     Especially, the whole display/viewing stuff and process scheduling
+     is not working correctly while initializing."
+
+    Initializing isNil ifTrue:[^ true]. "/ if called very early
+    ^ Initializing
+
+    "Created: / 20-04-2016 / 08:21:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+isRestarting
+    "Return true if the system is currently restarting from
+     a snapshot, i.e., when performing Smalltalk-level actions
+     after snapin (such as recreate windows, bitmaps and so on).
+     Return false during normal work.
+
+     Especially, the whole display/viewing stuff and process scheduling
+     is not working correctly while restarting."
+
+    ^ self isInitializing and:[ ImageRestartTime notNil ].
+
+    "Created: / 20-04-2016 / 08:23:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 reinitStandardStreams
     "reinitialize some well-known streams.
      Tis must be done very early during startup, to allow for
@@ -1339,6 +1365,9 @@
         wrongName := true.
     ].
 
+    aClass isBuiltInClass ifTrue:[ 
+        self error: 'Cannot remove builtin class!!'.        
+    ].
     self at:sym put:nil.    "nil it out for compiled accesses"
 
     "/
@@ -3031,7 +3060,11 @@
                 ].
                 cls isJavaClass ifFalse:[
                     cls instAndClassSelectorsAndMethodsDo:[:sel :mthd |
-                        allProjects add:mthd package asSymbol.
+			| package packageAsSymbol |
+
+			package := mthd package.
+			packageAsSymbol := package asSymbol.
+			allProjects add: packageAsSymbol
                     ].
                 ].
             ].
@@ -6494,7 +6527,7 @@
 !
 
 fileInSourceFile:filenameArg lazy:loadLazy silent:beSilent
-    "Try all available programming languages for a matching suffix"
+    "Try all available programming languages"
 
     |filename|
 
@@ -8179,7 +8212,7 @@
 
     "return a full version string"
 
-    ^ 'Smalltalk/X release %1%2 of %3'
+    ^ 'Smalltalk/X jv-branch release %1%2 of %3'
         bindWith:(self versionString)
         with:((ExternalAddress pointerSize == 8)
                         ifTrue:[' (64bit)']
@@ -8211,13 +8244,13 @@
     (lang == #de) ifTrue:[
         proto := 'Willkommen bei %1 (%4Version %2 von %3)'. bit := 'Bit'.
     ] ifFalse:[ (lang == #fr) ifTrue:[
-        proto := 'Salut, Bienvenue à %1 (%4version %2 de %3)'
+        proto := 'Salut, Bienvenue à %1 (%4version %2 de %3)'
     ] ifFalse:[ (lang == #it) ifTrue:[
         proto := 'Ciao, benvenuto al %1 (%4versione %2 di %3)'
     ] ifFalse:[ (lang == #es) ifTrue:[
         proto := 'Hola, bienvenida a %1 (%4version %2 de %3)'
     ] ifFalse:[ (lang == #pt) ifTrue:[
-        proto := 'Olá!!, mem-vindo a %1 (%4version %2 de %3)'
+        proto := 'Ol!!, mem-vindo a %1 (%4version %2 de %3)'
     ] ifFalse:[ (lang == #no) ifTrue:[
         proto := 'Hei, verdenmottakelse til %1 (%4versjon %2 av %3)'
     ]]]]]].
@@ -8233,7 +8266,7 @@
         bitsPerWordString := ''
     ].        
 
-    ^ proto bindWith:('SmallTalk/X' allBold)
+    ^ proto bindWith:('Smalltalk/X jv-branch' allBold)
                 with:(self versionString)
                 with:(self versionDate)
                 with:bitsPerWordString
@@ -8427,7 +8460,7 @@
 
     dateString := String streamContents:[:s | Date today printOn:s language:#en].  "/ MUST be english !!!!
 
-    ^ ('From Smalltalk/X, Version:' , (Smalltalk versionString) , ' on '
+    ^ ('From Smalltalk/X jv-branch, Version:' , (Smalltalk versionString) , ' on '
        , dateString , ' at ' , Time now printString
        )
 !
@@ -8504,11 +8537,16 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header$'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1133 2015-05-22 18:41:08 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header$'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1133 2015-05-22 18:41:08 cg Exp $'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 !
 
 version_SVN
--- a/SmalltalkChunkFileSourceWriter.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/SmalltalkChunkFileSourceWriter.st	Mon Apr 25 10:19:26 2016 +0100
@@ -131,7 +131,7 @@
                             |src|
 
                             src := m source.
-                            src notNil and:[src isWideString]
+                            src notNil and:[src isWideString and:[ src contains: [:c | c codePoint > 16rFF ] ] ]
                         ]]].
 
     any16Bit ifTrue:[
@@ -147,6 +147,7 @@
         encoder:encoder
 
     "Created: / 04-10-2014 / 12:11:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-04-2015 / 21:28:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileOut:aClass on:outStreamArg withTimeStamp:stampIt withInitialize:initIt withDefinition:withDefinition methodFilter:methodFilter encoder:encoderOrNil
@@ -584,7 +585,7 @@
 
     |source possiblyRewrittenSource rewriteQuery|
 
-    source := aMethod source.
+    source := aMethod source asSingleByteStringIfPossible.
     source isNil ifTrue:[
         Class fileOutErrorSignal 
             raiseRequestWith:aMethod mclass
@@ -606,6 +607,8 @@
 "/    Transcript showCR: possiblyRewrittenSource.
 "/].
     ].
+
+    "Modified: / 13-04-2015 / 21:37:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileOutMethods: methods on: stream
@@ -722,6 +725,11 @@
     ^ '$Header$'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$ Id: SmalltalkChunkFileSourceWriter.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !
--- a/SnapshotError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/SnapshotError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Error subclass:#SnapshotError
@@ -44,7 +43,14 @@
 !SnapshotError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SnapshotError.st,v 1.3 2005-03-29 22:25:15 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SnapshotError.st,v 1.3 2005/03/29 22:25:15 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: SnapshotError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 SnapshotError initialize!
+
+
+
--- a/StreamIOError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/StreamIOError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#StreamIOError
@@ -38,5 +37,12 @@
 !StreamIOError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/StreamIOError.st,v 1.2 2005-02-02 11:03:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/StreamIOError.st,v 1.2 2005/02/02 11:03:44 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: StreamIOError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/StreamNotOpenError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/StreamNotOpenError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 StreamError subclass:#StreamNotOpenError
@@ -44,5 +43,12 @@
 !StreamNotOpenError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/StreamNotOpenError.st,v 1.3 2005-02-02 10:59:49 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/StreamNotOpenError.st,v 1.3 2005/02/02 10:59:49 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: StreamNotOpenError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/String.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/String.st	Mon Apr 25 10:19:26 2016 +0100
@@ -45,11 +45,6 @@
  */
 #define INITIALIZE_WITH_SPACE
 
-#ifdef FAST_MEMCHR
-# if !defined(__osx__) && !defined(WIN32)
- char *memchr();
-# endif
-#endif
 %}
 ! !
 
@@ -580,13 +575,16 @@
 	slf = self;
 	cls = __qClass(slf);
 	indx = __intVal(index) - 1;
-	if (cls != String) {
-	    if (indx < 0) goto badIndex;
-	    indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-	}
-	if ((unsigned)indx < (unsigned)(__stringSize(slf))) {
-	    RETURN ( __MKCHARACTER(__stringVal(slf)[indx] & 0xFF) );
-	}
+	if (cls == String) {
+	    fetch:
+	    if ((unsigned)indx < (unsigned)(__stringSize(slf))) {
+	        RETURN ( __MKCHARACTER(__stringVal(slf)[indx] & 0xFF) );
+	    }	    
+	   goto badIndex;
+        }
+	if (indx < 0) goto badIndex;
+	indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+	goto fetch;
     }
 badIndex: ;
 #endif /* ! __SCHTEAM__ */
@@ -1255,7 +1253,7 @@
      'hello world' indexOfAny:'AOE' startingAt:1
      'hello world' indexOfAny:'o' startingAt:6
      'hello world' indexOfAny:'o' startingAt:6
-     'hello world' indexOfAny:'#$' startingAt:6
+     'hello world' indexOfAny:'#$' startingAt:6
     "
 !
 
@@ -1843,17 +1841,41 @@
     long h = me.hash_fnv1a();
     return __c__._RETURN(STInteger._new(h));
 #else
-    extern unsigned int __symbolHash(char *);
-    unsigned char *cp = __stringVal(self);
-    unsigned int h;
-
-    if (!__qIsStringLike(self)) {
-	cp += __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+    /* Following code is inlined FNV1a hash. 
+     * Inlined for speed (to avoid send).
+     * DO NOT use __symbolHash() here as it 
+     * does not handle characters with codepoint 0
+     * properly - see
+     * https://swing.fit.cvut.cz/projects/stx-jv/ticket/65
+     */
+    REGISTER unsigned int h;
+    REGISTER unsigned char *cp;
+    int l;
+
+    cp = __stringVal(self);
+    l = __stringSize(self);
+    if (__qClass(self) == String) {
+	cont:    
+	h = 2166136261U;
+	while (l >= 4) {
+	    l -= 4;
+	    h = (h ^ cp[0]) * 16777619;
+	    h = (h ^ cp[1]) * 16777619;
+	    h = (h ^ cp[2]) * 16777619;
+	    h = (h ^ cp[3]) * 16777619;
+	    cp += 4;
+    	}
+    	while (l--) {
+	    h = (h ^ *cp++) * 16777619;
+    	}
+    	// make it a smallInteger
+    	h = (h ^ (h >> 30)) & 0x3FFFFFFF;
+    	RETURN ( __mkSmallInteger(h));
+    } else {        
+	int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+	cp += n;
+	goto cont;
     }
-    h = __symbolHash(cp);
-    // make sure, it fits into a smallInt
-    h = (h ^ (h >> 30)) & 0x3FFFFFFF;
-    RETURN(__mkSmallInteger(h));
 #endif /* not SCHTEAM */
 %}.
     ^ self primitiveFailed
@@ -1937,31 +1959,34 @@
     long h = me.hash_fnv1a();
     return __c__._RETURN(STInteger._new(h));
 #else
-    REGISTER unsigned int h  = 2166136261u;
-    REGISTER unsigned char *cp = __stringVal(self);
-    INT l  = __stringSize(self);
-
-    if (!__qIsStringLike(self)) {
-	int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
-
-	cp += n;
-	l -= n;
-    }
-
-    while (l >= 4) {
+    REGISTER unsigned int h;
+    REGISTER unsigned char *cp;
+    int l;
+
+    cp = __stringVal(self);
+    l = __stringSize(self);
+    if (__qClass(self) == String) {
+	cont:    
+	h = 2166136261U;
+	while (l >= 4) {
 	l -= 4;
 	h = (h ^ cp[0]) * 16777619;
 	h = (h ^ cp[1]) * 16777619;
 	h = (h ^ cp[2]) * 16777619;
 	h = (h ^ cp[3]) * 16777619;
 	cp += 4;
-    }
-    while (l--) {
+    	}
+    	while (l--) {
 	h = (h ^ *cp++) * 16777619;
+    	}
+    	// make it a smallInteger
+    	h = (h ^ (h >> 30)) & 0x3FFFFFFF;
+    	RETURN ( __mkSmallInteger(h));
+    } else {        
+	int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+	cp += n;
+	goto cont;
     }
-    // make it a smallInteger
-    h = (h ^ (h >> 30)) & 0x3FFFFFFF;
-    RETURN ( __mkSmallInteger(h));
 #endif /* not SCHTEAM */
 %}.
     ^ self primitiveFailed
@@ -3082,10 +3107,10 @@
 	'abcde1234' utf8EncodedOn:w
      ].
      String streamContents:[:w|
-	 'abcde' utf8EncodedOn:w
+	 'abcde' utf8EncodedOn:w
      ].
      String streamContents:[:w|
-	 'abcde' asUnicode16String utf8EncodedOn:w
+	 'abcde' asUnicode16String utf8EncodedOn:w
      ].
     "
 ! !
@@ -3548,8 +3573,8 @@
     "
       'hello world' asUnicode16String errorPrint
       (Character value:356) asString errorPrint
-      'Bnnigheim' errorPrint
-      'Bnnigheim' asUnicodeString errorPrint
+      'Bnnigheim' errorPrint
+      'Bnnigheim' asUnicodeString errorPrint
     "
 !
 
--- a/SubscriptOutOfBoundsError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/SubscriptOutOfBoundsError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 IndexNotFoundError subclass:#SubscriptOutOfBoundsError
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Kernel-Exceptions-Errors'
+    instanceVariableNames: ''
+    classVariableNames: ''
+    poolDictionaries: ''
+    category: 'Kernel-Exceptions-Errors'
 !
 
 !SubscriptOutOfBoundsError class methodsFor:'documentation'!
@@ -41,6 +41,7 @@
 "
 ! !
 
+
 !SubscriptOutOfBoundsError class methodsFor:'initialization'!
 
 initialize
@@ -51,10 +52,15 @@
     "
 ! !
 
+
 !SubscriptOutOfBoundsError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/SubscriptOutOfBoundsError.st,v 1.5 2013-04-27 10:07:39 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: SubscriptOutOfBoundsError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/Symbol.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Symbol.st	Mon Apr 25 10:19:26 2016 +0100
@@ -59,7 +59,7 @@
 	which is a symbol consisting of the user visible name, prefixed by ':<ns>::'.
 	The VM's method lookup algorithm contains special handling code for such constructs.
 	Thus, if two methods are stored as 'foo' and ':NS::foo' are present in a class,
-	any send of 'foo' from wthin the NS-namespace will invoke the second method.
+	any send of 'foo' from wthin the NS-namespace will invoke the second method.
 	Any other send will invoke the first one.
 
 
@@ -453,6 +453,38 @@
     ^ super = something
 !
 
+hash
+    "return an integer useful as a hash-key.
+     This default method uses whichever hash algorithm
+     used in the ST/X VM (which is actually fnv-1a)"
+
+%{  /* NOCONTEXT */
+#ifdef __SCHTEAM__
+    STString me = self.asSTString();
+    long h = me.hash_fnv1a();
+    return __c__._RETURN(STInteger._new(h));
+#else
+    extern unsigned int __symbolHash(char *);
+    unsigned char *cp;
+    unsigned int h;
+
+    cp = __stringVal(self);
+    if (__qClass(self) == Symbol) {    
+	cont:
+	/* Use __symbolHash() to make sure it's the same used by the VM */
+	h = __symbolHash(cp);
+	RETURN(__mkSmallInteger(h));
+    } else {
+	int n = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(self))->c_ninstvars));
+	cp += n;    
+	goto cont;
+    }
+#endif /* not SCHTEAM */
+%}.
+    ^ self primitiveFailed
+
+!
+
 identityHash
     "interned symbols can return a better hash key"
 
--- a/SystemNotification.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/SystemNotification.st	Mon Apr 25 10:19:26 2016 +0100
@@ -37,5 +37,8 @@
 !SystemNotification class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SystemNotification.st,v 1.3 2008-10-04 08:42:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SystemNotification.st,v 1.3 2008/10/04 08:42:18 cg Exp $'
 ! !
+
+
+
--- a/TextCollectorStream.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/TextCollectorStream.st	Mon Apr 25 10:19:26 2016 +0100
@@ -195,5 +195,8 @@
 !TextCollectorStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/TextCollectorStream.st,v 1.2 2006-04-06 10:54:06 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/TextCollectorStream.st,v 1.2 2006/04/06 10:54:06 stefan Exp $'
 ! !
+
+
+
--- a/TimeConversionError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/TimeConversionError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -43,7 +43,14 @@
 !TimeConversionError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/TimeConversionError.st,v 1.1 2008-08-06 09:22:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/TimeConversionError.st,v 1.1 2008/08/06 09:22:57 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: TimeConversionError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 TimeConversionError initialize!
+
+
+
--- a/TimeoutError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/TimeoutError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ProceedableError subclass:#TimeoutError
@@ -67,7 +66,14 @@
 !TimeoutError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/TimeoutError.st,v 1.5 2004-08-22 17:47:07 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/TimeoutError.st,v 1.5 2004/08/22 17:47:07 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: TimeoutError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 TimeoutError initialize!
+
+
+
--- a/UnboundedExternalStream.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UnboundedExternalStream.st	Mon Apr 25 10:19:26 2016 +0100
@@ -71,3 +71,6 @@
 version
     ^ '$Header: /cvs/stx/stx/libbasic/UnboundedExternalStream.st,v 1.9 2015-04-21 16:06:59 cg Exp $'
 ! !
+
+
+
--- a/UndefinedObject.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UndefinedObject.st	Mon Apr 25 10:19:26 2016 +0100
@@ -110,6 +110,7 @@
     "Modified: 3.1.1997 / 15:06:15 / cg"
 ! !
 
+
 !UndefinedObject class methodsFor:'queries'!
 
 canBeSubclassed
@@ -156,6 +157,16 @@
 
 
 
+!UndefinedObject methodsFor:'Compatibility-Squeak'!
+
+subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString category:cat
+    ^ self subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries: '' category:cat
+
+    "Created: / 24-07-2015 / 19:29:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+
+
 !UndefinedObject methodsFor:'converting'!
 
 asBoolean
@@ -299,7 +310,6 @@
     ^ 0
 ! !
 
-
 !UndefinedObject methodsFor:'subclass creation'!
 
 nilSubclass:action
@@ -729,6 +739,7 @@
     ^ aVisitor visitNilWith:aParameter
 ! !
 
+
 !UndefinedObject class methodsFor:'documentation'!
 
 version
--- a/UnderflowError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UnderflowError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -41,16 +41,22 @@
 "
 ! !
 
+
 !UnderflowError class methodsFor:'initialization'!
 
 initialize
     NotifierString := 'underflow'.
 ! !
 
+
 !UnderflowError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/UnderflowError.st,v 1.4 2013-03-13 23:43:59 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: UnderflowError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/UnimplementedFunctionalityError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UnimplementedFunctionalityError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ProceedableError subclass:#UnimplementedFunctionalityError
@@ -63,7 +62,14 @@
 !UnimplementedFunctionalityError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnimplementedFunctionalityError.st,v 1.2 2006-03-03 19:13:11 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnimplementedFunctionalityError.st,v 1.2 2006/03/03 19:13:11 stefan Exp $'
+!
+
+version_SVN
+    ^ '$Id: UnimplementedFunctionalityError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 UnimplementedFunctionalityError initialize!
+
+
+
--- a/UnixFileHandle.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UnixFileHandle.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 OSFileHandle subclass:#UnixFileHandle
@@ -60,5 +59,12 @@
 !UnixFileHandle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixFileHandle.st,v 1.4 2003-08-30 12:36:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixFileHandle.st,v 1.4 2003/08/30 12:36:42 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: UnixFileHandle.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
+
+
+
--- a/UnixOperatingSystem.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UnixOperatingSystem.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9154,30 +9154,31 @@
      NOTE: This is a private interface, please use RandomGenerator!!"
 
 %{
-#if defined(LINUX)
+#ifdef LINUX
+# include <linux/random.h>
 # include <sys/syscall.h>
-# if defined(SYS_getrandom) // getrandom(2) is supported starting with linux 3.17 (2014-10-05)     
-
-# if 1 || !(defined(__GLIBC__) && __GLIBC_PREREQ(2, 23))
-    // getrandom() appears first in GLIBC 2.23
-    // but we define it here until this GLIBC has been deployed on all linux distributions
-    // used by our customers
-
-    inline int getrandom(void *buf, size_t buflen, unsigned int flags) {
-        syscall(SYS_getrandom, buf, buflen, flags);   
-    }
-# endif
-
-    size_t wanted, cnt, gotSoFar = 0;
+# if defined(GRND_RANDOM) && defined(GRND_NONBLOCK) && defined(SYS_getrandom)
+    // getrandom(2) is upported starting with linux 3.17
+
+    int wanted, cnt, gotSoFar = 0;
     char *buffer;
-    INT intBuffer = 0;
-    int wantInteger = 0;
-    
-    if (__isSmallInteger(bufferOrInteger)) {
-        wanted = __smallIntegerVal(bufferOrInteger);
-        if (wanted > sizeof(INT)) goto error;
-        buffer = (char *)&intBuffer;
-        wantInteger = 1;
+
+    if (__isSmallInteger(bufferOrInteger) 
+        && ((wanted = __smallIntegerVal(bufferOrInteger)) <= sizeof(INT))) {
+        INT buf = 0;
+
+	do {
+            cnt = syscall(SYS_getrandom, &buf + gotSoFar, wanted - gotSoFar, 0);
+            if (cnt < 0) {
+                // this should not happen, since getrandom <= 256 bytes
+                // is guaranteed not to interrupt when fetching from zhe urandom pool
+                if (errno != EINTR && errno != EAGAIN)
+                    goto error;
+            } else {
+                gotSoFar = gotSoFar + cnt;
+            }
+        } while (gotSoFar < wanted);
+        RETURN(__mkSmallInteger(buf & _MAX_INT));
     } else if (__isByteArray(bufferOrInteger)) {
         wanted = __byteArraySize(bufferOrInteger);
         buffer = __byteArrayVal(bufferOrInteger);
@@ -9188,7 +9189,7 @@
         goto error;
 
     do {
-        cnt = getrandom(buffer + gotSoFar, wanted - gotSoFar, 0);
+        cnt = syscall(SYS_getrandom, buffer + gotSoFar, wanted - gotSoFar, 0);
         if (cnt < 0) {
             if (errno != EINTR && errno != EAGAIN)
                 goto error;
@@ -9198,12 +9199,10 @@
             gotSoFar = gotSoFar + cnt;
         }
     } while (gotSoFar < wanted);
-    if (wantInteger) {
-        RETURN(__mkSmallInteger(intBuffer & _MAX_INT));
-    }
     RETURN(bufferOrInteger);
-# endif // SYS_getrandom
-#endif
+
+# endif // linux
+#endif  // GRND_RANDOM
 error: ;
 %}.
 
@@ -9605,7 +9604,7 @@
      Codeset := #'utf8-mac'.
      CodesetEncoder := nil.
      OperatingSystem getCodesetEncoder
-     OperatingSystem encodePath:''
+     OperatingSystem encodePath:''
     "
 
     "Modified: / 23-01-2013 / 10:00:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -13130,7 +13129,7 @@
 	    domain:#'AF_INET' type:nil protocol:nil flags:nil
      self getAddressInfo:'www.exept.de' serviceName:nil
 	    domain:#'AF_INET6' type:nil protocol:nil flags:nil
-     self getAddressInfo:'www.baden-wrttemberg.de' serviceName:nil
+     self getAddressInfo:'www.baden-wrttemberg.de' serviceName:nil
 	    domain:#'AF_INET' type:#stream protocol:nil flags:nil
     "
 !
--- a/UnorderedNumbersError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UnorderedNumbersError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -40,16 +40,22 @@
 "
 ! !
 
+
 !UnorderedNumbersError class methodsFor:'initialization'!
 
 initialize
     NotifierString := 'unordered'.
 ! !
 
+
 !UnorderedNumbersError class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/UnorderedNumbersError.st,v 1.5 2013-03-13 23:44:03 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: UnorderedNumbersError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/UserInformation.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/UserInformation.st	Mon Apr 25 10:19:26 2016 +0100
@@ -63,7 +63,14 @@
 !UserInformation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UserInformation.st,v 1.4 2008-10-04 08:42:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UserInformation.st,v 1.4 2008/10/04 08:42:26 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: UserInformation.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 UserInformation initialize!
+
+
+
--- a/WeakValueIdentityDictionary.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/WeakValueIdentityDictionary.st	Mon Apr 25 10:19:26 2016 +0100
@@ -255,3 +255,5 @@
     ^ '$Header$'
 ! !
 
+
+
--- a/Win32OperatingSystem.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/Win32OperatingSystem.st	Mon Apr 25 10:19:26 2016 +0100
@@ -210,6 +210,7 @@
 	privateIn:Win32OperatingSystem
 !
 
+
 Win32OperatingSystem::Win32IOHandle subclass:#Win32SocketHandle
 	instanceVariableNames:''
 	classVariableNames:''
@@ -228,7 +229,10 @@
 %{
 
 # define WINVER 0x0500   /*required for CoInitializeEx*/
-
+# undef  WINVER
+# define WINVER 0x0600   /*required for GetTokenInformation & associated typedefs */
+# undef  WINVER
+# define WINVER 0x0601   /*required for GetTimeZoneInformationForYear & associated typedefs */
 #include "stxOSDefs.h"
 
 #define USE_H_ERRNO
@@ -491,12 +495,17 @@
 
 #define _HANDLEVal(o)        (HANDLE)(__externalAddressVal(o))
 #define _SETHANDLEVal(o, v)  (__externalAddressVal(o) = (v))
-
 #if defined(__BORLANDC__)
-HANDLE _get_osfhandle(int);     // not for MINGW!
-#endif
-
-#if defined(__BORLANDC__) || !defined(TOKEN_EXECUTE)
+HANDLE _get_osfhandle(int);
+#endif
+
+/* Warning: a horrible hack here. For whatever reason, when compiled under 
+ * MINGW64, both __MINGW64__ and __MINGW32__ seems to be defined. As a quick
+ * and dirty hack, use `(defined(__MINGW32__) && !defined(__MINGW64__))` to 
+ * check whether compiling under MINGW32 or MINGW64. 
+ * This has to be solved properly later!
+ */
+#if defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__MINGW64__))
 
 typedef enum _TOKEN_ELEVATION_TYPE {
     TokenElevationTypeDefault = 1,
@@ -504,6 +513,10 @@
     TokenElevationTypeLimited,
 } TOKEN_ELEVATION_TYPE, *PTOKEN_ELEVATION_TYPE;
 
+#endif
+
+#if defined(__BORLANDC__)
+
 typedef struct _TOKEN_ELEVATION {
     DWORD TokenIsElevated;
 } TOKEN_ELEVATION, *PTOKEN_ELEVATION;
@@ -3671,55 +3684,65 @@
 
     cmdFile := aCommand asFilename.
     cmdFile isAbsolute ifTrue:[
-	cmdFile exists ifTrue:[
-	    ^ aCommand
-	].
-	^ nil
+        cmdFile exists ifTrue:[
+            ^ aCommand
+        ].
+        cmdFile suffix isEmpty ifTrue:[ 
+            ((path := cmdFile withSuffix: 'com') exists 
+                or:[ (path := cmdFile withSuffix: 'exe') exists 
+                or:[ (path := cmdFile withSuffix: 'bar') exists ]]) ifTrue:[ 
+                    path isExecutable ifTrue:[
+                        ^ path pathName
+                    ]. 
+                ].
+        ].
+        ^ nil
     ].
 
     (aCommand includes:Filename separator) ifTrue:[
-	path := Filename currentDirectory construct:aCommand.
-	(path exists
-	or:[ (path := path withSuffix:'com') exists
-	or:[ (path := path withSuffix:'exe') exists ]]) ifTrue:[
-	    path isExecutable ifTrue:[
-		^ path pathName
-	    ].
-	].
-	^ nil
+        path := Filename currentDirectory construct:aCommand.
+        (path exists
+        or:[ (path := path withSuffix:'com') exists
+        or:[ (path := path withSuffix:'exe') exists 
+        or:[ (path := path withSuffix:'bat') exists ]]]) ifTrue:[
+            path isExecutable ifTrue:[
+                ^ path pathName
+            ].
+        ].
+        ^ nil
     ].
 
     path := (self getEnvironment:'PATH') ? ''.
     (rentry := self registryEntry key: 'HKEY_CURRENT_USER\Environment') notNil ifTrue:[
-	rpath := rentry valueNamed: 'PATH'.
-	rpath notNil ifTrue:[
-	    path := path , self pathSeparator , rpath
-	].
+        rpath := rentry valueNamed: 'PATH'.
+        rpath notNil ifTrue:[
+            path := path , self pathSeparator , rpath
+        ].
     ].
     path := '.;',path.
 
     (path asCollectionOfSubstringsSeparatedBy:(self pathSeparator)) do:[:eachDirectory |
-	eachDirectory isEmpty ifTrue:[
-	    f := cmdFile
-	] ifFalse:[
-	    f := eachDirectory asFilename construct:aCommand.
-	].
-	f suffix isEmpty ifTrue:[
-	    self executableFileExtensions do:[:ext |
-		ext notEmpty ifTrue:[
-		    fExt := (f pathName , '.' , ext) asFilename.
-		] ifFalse:[
-		    fExt := f.
-		].
-		fExt isExecutable ifTrue:[
-		    ^ fExt pathName
-		].
-	    ].
-	] ifFalse:[
-	    f isExecutable ifTrue:[
-		^ f pathName
-	    ].
-	].
+        eachDirectory isEmpty ifTrue:[
+            f := cmdFile
+        ] ifFalse:[
+            f := eachDirectory asFilename construct:aCommand.
+        ].
+        f suffix isEmpty ifTrue:[
+            self executableFileExtensions do:[:ext |
+                ext notEmpty ifTrue:[
+                    fExt := (f pathName , '.' , ext) asFilename.
+                ] ifFalse:[
+                    fExt := f.
+                ].
+                fExt isExecutable ifTrue:[
+                    ^ fExt pathName
+                ].
+            ].
+        ] ifFalse:[
+            f isExecutable ifTrue:[
+                ^ f pathName
+            ].
+        ].
     ].
     ^ nil
 
@@ -3733,8 +3756,9 @@
      OperatingSystem pathOfCommand:'stx'
     "
 
-    "Modified: / 23-08-2011 / 21:11:47 / jv"
     "Modified: / 20-01-2012 / 13:32:55 / cg"
+    "Modified: / 01-07-2015 / 06:04:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
 !
 
 primExec:commandPath commandLine:commandLine fileDescriptors:fdArray fork:doFork newPgrp:newPgrp inPath:dirName createFlags:flagsOrNil inheritHandles:inheritHandles
@@ -10782,7 +10806,7 @@
 	}
     } else if (__isSmallInteger(anIntegerOrNil)) {
 	int year = __intVal(anIntegerOrNil);
-#if defined(__BORLANDC__) || defined(__MINGW32__)
+#if defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__MINGW64__))
 	{
 	    typedef BOOL (WINAPI *P_GetTimeZoneInformationForYear)(
 					USHORT,
@@ -10975,7 +10999,7 @@
 	_utcOffset = longTime / 10000000;
 	utcOffset = __mkSmallInteger(_utcOffset);
 
-# if defined(__BORLANDC__) || defined(__MINGW32__)
+# if defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__MINGW64__))
 	{
 	    typedef BOOL (WINAPI *P_GetTimeZoneInformationForYear)(
 					USHORT,
--- a/WrongNumberOfArgumentsError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/WrongNumberOfArgumentsError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 ArgumentError subclass:#WrongNumberOfArgumentsError
@@ -56,7 +55,14 @@
 !WrongNumberOfArgumentsError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/WrongNumberOfArgumentsError.st,v 1.5 2003-12-05 15:47:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/WrongNumberOfArgumentsError.st,v 1.5 2003/12/05 15:47:45 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: WrongNumberOfArgumentsError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 WrongNumberOfArgumentsError initialize!
+
+
+
--- a/WrongProceedabilityError.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/WrongProceedabilityError.st	Mon Apr 25 10:19:26 2016 +0100
@@ -9,9 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
-
 "{ Package: 'stx:libbasic' }"
 
 SignalError subclass:#WrongProceedabilityError
@@ -67,7 +64,14 @@
 !WrongProceedabilityError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/WrongProceedabilityError.st,v 1.4 2003-08-29 19:14:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/WrongProceedabilityError.st,v 1.4 2003/08/29 19:14:38 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: WrongProceedabilityError.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 WrongProceedabilityError initialize!
+
+
+
--- a/ZeroDivide.st	Sun Apr 24 17:51:25 2016 +0200
+++ b/ZeroDivide.st	Mon Apr 25 10:19:26 2016 +0100
@@ -65,12 +65,14 @@
 "
 ! !
 
+
 !ZeroDivide class methodsFor:'initialization'!
 
 initialize
     NotifierString := 'division by zero'.
 ! !
 
+
 !ZeroDivide methodsFor:'accessing'!
 
 defaultResumeValue
@@ -123,10 +125,15 @@
     "
 ! !
 
+
 !ZeroDivide class methodsFor:'documentation'!
 
 version
     ^ '$Header: /cvs/stx/stx/libbasic/ZeroDivide.st,v 1.8 2013-01-25 17:19:34 cg Exp $'
+!
+
+version_SVN
+    ^ '$Id: ZeroDivide.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
 
--- a/bmake.bat	Sun Apr 24 17:51:25 2016 +0200
+++ b/bmake.bat	Mon Apr 25 10:19:26 2016 +0100
@@ -4,6 +4,9 @@
 @REM do not edit - automatically generated from ProjectDefinition
 @REM -------
 @SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
 
 make.exe -N -f bc.mak  %DEFINES% %*
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lcmake.bat	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,8 @@
+@REM -------
+@REM make using lcc compiler
+@REM type lcmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+make.exe -N -f bc.mak USELCC=1 %1 %2
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/not_delivered/.cvsignore	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,2 @@
+*.bad
+*.new
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/not_delivered/SysDict.st	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,316 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+Collection subclass:#SystemDictionary
+       instanceVariableNames:'sysId'
+       classVariableNames:''
+       poolDictionaries:''
+       category:'System-Support'
+!
+
+!SystemDictionary class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/not_delivered/SysDict.st,v 1.1 1996/09/12 01:05:30 cg Exp $'
+!
+
+documentation
+"
+    SystemDictionaries are nameSpaces, which are also known in the c-world
+    somehow (i.e. names found in SystemDictionaries may also be known as
+    a c-global).
+
+    As you will notice, this is NOT a Dictionary
+     - my implementation of globals is totally different
+       (due to the need to be able to access globals from c-code as well).
+    However, it provides the known enumeration protocol.
+
+    Instance variables:
+	sysId           <SmallInteger>  the dictionaries id
+"
+! !
+
+!SystemDictionary methodsFor:'accessing'!
+
+at:aKey
+    "retrieve the value stored under aKey, which must be some kind of symbol.
+     Return nil if not present."
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_GET();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_GET(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+at:aKey ifAbsent:aBlock
+    "retrieve the value stored under aKey.
+     If there is none stored this key, return the value of
+     the evaluation of aBlock"
+
+    (self includesKey:aKey) ifTrue:[
+	^ self at:aKey
+    ].
+    ^ aBlock value
+!
+
+at:aKey put:aValue
+    "store the argument aValue under aKey, which must be some kind of symbol."
+
+%{  /* NOCONTEXT */
+    if (__isSmallInteger(__INST(sysId))) {
+	_SYSDICT_SET(__intVal(__INST(sysId)), aKey, aValue, (OBJ *)0);
+	RETURN (aValue);
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+removeKey:aKey
+    "remove the argument from the globals dictionary"
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_REMOVE();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_REMOVE(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+includesKey:aKey
+    "return true, if the key is known"
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_KEYKNOWN();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_KEYKNOWN(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+keyAtValue:anObject
+    "return the symbol under which anObject is stored - or nil"
+
+    self allKeysDo:[:aKey |
+	(self at:aKey) == anObject ifTrue:[^ aKey]
+    ]
+
+    "Smalltalk keyAtValue:Object"
+!
+
+keys
+    "return a collection with all keys in the Smalltalk dictionary"
+
+    |keys|
+
+    keys := IdentitySet new.
+    self allKeysDo:[:k | keys add:k].
+    ^ keys
+! !
+
+!SystemDictionary class methodsFor:'copying'!
+
+shallowCopy
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+!
+
+simpleDeepCopy
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+!
+
+deepCopyUsing:aDictionary
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+!
+
+deepCopy
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+! !
+
+!SystemDictionary methodsFor:'inspecting'!
+
+inspect
+    "redefined to launch a DictionaryInspector on the receiver
+     (instead of the default InspectorView)."
+
+    DictionaryInspectorView isNil ifTrue:[
+	super inspect
+    ] ifFalse:[
+	DictionaryInspectorView openOn:self
+    ]
+! !
+
+!SystemDictionary methodsFor:'enumeration'!
+
+do:aBlock
+    "evaluate the argument, aBlock for all values in the dictionary"
+%{
+    if (__isSmallInteger(__INST(sysId))) {
+	_SYSDICT_DO(__intVal(__INST(sysId)), &aBlock COMMA_CON);
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+
+    "
+     Smalltalk do:[:value | value class name printNL]
+    "
+!
+
+allKeysDo:aBlock
+    "evaluate the argument, aBlock for all keys in the dictionary"
+%{
+    if (__isSmallInteger(__INST(sysId))) {
+	_SYSDICT_KEYSDO(__intVal(__INST(sysId)), &aBlock COMMA_CON);
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+
+    "
+     Smalltalk allKeysDo:[:key | key printNL]
+    "
+!
+
+associationsDo:aBlock
+    "evaluate the argument, aBlock for all key/value pairs 
+     in the dictionary"
+
+    self allKeysDo:[:aKey |
+	aBlock value:(aKey -> (self at:aKey))
+    ]
+
+    "
+     Smalltalk associationsDo:[:assoc | assoc printNL]
+    "
+!
+
+keysAndValuesDo:aBlock
+    "evaluate the two-arg block, aBlock for all keys and values"
+
+    self allKeysDo:[:aKey |
+	aBlock value:aKey value:(self at:aKey)
+    ]
+! !
+
+!SystemDictionary methodsFor:'queries'!
+
+cellAt:aKey
+    "return the address of a global cell
+     - used internally for compiler only"
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_GETCELL();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_GETCELL(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+references:anObject
+    "return true, if I refer to the argument, anObject
+     must be reimplemented since systemDictionaries are no real collections."
+
+    self do:[:o |
+	(o == anObject) ifTrue:[^ true]
+    ].
+    ^ false
+! !
+
+!SystemDictionary class methodsFor: 'binary storage'!
+
+addGlobalsTo:globalDictionary manager: manager
+    |pools|
+
+    pools := Set new.
+    self associationsDo:[:assoc |
+	|value|
+
+	value := assoc value.
+	value == self ifFalse:[
+	    value isClass ifTrue:[
+		value addGlobalsTo:globalDictionary manager:manager.
+		pools addAll:value sharedPools
+	    ] ifFalse:[
+		globalDictionary at:assoc put:self
+	    ].
+	    value isNil ifFalse:[
+		globalDictionary at:value put:self
+	    ]
+	]
+    ].
+
+    pools do:[:poolDictionary|
+	poolDictionary addGlobalsTo:globalDictionary manager:manager
+    ]
+!
+
+storeBinaryDefinitionOf:anObject on:stream manager:manager
+    |string|
+
+    anObject class == Association ifTrue:[
+	string := 'Smalltalk associationAt:', anObject key storeString
+    ] ifFalse: [
+	string := 'Smalltalk at:', (self keyAtValue: anObject) storeString
+    ].
+    stream nextNumber:2 put:string size.
+    string do:[:char | stream nextPut:char asciiValue]
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/not_delivered/SystemDictionary.st	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,321 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+Collection subclass:#SystemDictionary
+       instanceVariableNames:'sysId'
+       classVariableNames:''
+       poolDictionaries:''
+       category:'System-Support'
+!
+
+!SystemDictionary class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/not_delivered/SysDict.st,v 1.1 1996/09/12 01:05:30 cg Exp $'
+!
+
+documentation
+"
+    SystemDictionaries are nameSpaces, which are also known in the c-world
+    somehow (i.e. names found in SystemDictionaries may also be known as
+    a c-global).
+
+    As you will notice, this is NOT a Dictionary
+     - my implementation of globals is totally different
+       (due to the need to be able to access globals from c-code as well).
+    However, it provides the known enumeration protocol.
+
+    Instance variables:
+	sysId           <SmallInteger>  the dictionaries id
+"
+! !
+
+!SystemDictionary methodsFor:'accessing'!
+
+at:aKey
+    "retrieve the value stored under aKey, which must be some kind of symbol.
+     Return nil if not present."
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_GET();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_GET(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+at:aKey ifAbsent:aBlock
+    "retrieve the value stored under aKey.
+     If there is none stored this key, return the value of
+     the evaluation of aBlock"
+
+    (self includesKey:aKey) ifTrue:[
+	^ self at:aKey
+    ].
+    ^ aBlock value
+!
+
+at:aKey put:aValue
+    "store the argument aValue under aKey, which must be some kind of symbol."
+
+%{  /* NOCONTEXT */
+    if (__isSmallInteger(__INST(sysId))) {
+	_SYSDICT_SET(__intVal(__INST(sysId)), aKey, aValue, (OBJ *)0);
+	RETURN (aValue);
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+removeKey:aKey
+    "remove the argument from the globals dictionary"
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_REMOVE();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_REMOVE(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+includesKey:aKey
+    "return true, if the key is known"
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_KEYKNOWN();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_KEYKNOWN(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+keyAtValue:anObject
+    "return the symbol under which anObject is stored - or nil"
+
+    self allKeysDo:[:aKey |
+	(self at:aKey) == anObject ifTrue:[^ aKey]
+    ]
+
+    "Smalltalk keyAtValue:Object"
+!
+
+keys
+    "return a collection with all keys in the Smalltalk dictionary"
+
+    |keys|
+
+    keys := IdentitySet new.
+    self allKeysDo:[:k | keys add:k].
+    ^ keys
+! !
+
+!SystemDictionary class methodsFor:'copying'!
+
+shallowCopy
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+!
+
+simpleDeepCopy
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+!
+
+deepCopyUsing:aDictionary
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+!
+
+deepCopy
+    "redefine copy - there is only one instance of each dictionary"
+
+    ^ self
+! !
+
+!SystemDictionary methodsFor:'inspecting'!
+
+inspect
+    "redefined to launch a DictionaryInspector on the receiver
+     (instead of the default InspectorView)."
+
+    DictionaryInspectorView isNil ifTrue:[
+	super inspect
+    ] ifFalse:[
+	DictionaryInspectorView openOn:self
+    ]
+! !
+
+!SystemDictionary methodsFor:'enumeration'!
+
+do:aBlock
+    "evaluate the argument, aBlock for all values in the dictionary"
+%{
+    if (__isSmallInteger(__INST(sysId))) {
+	_SYSDICT_DO(__intVal(__INST(sysId)), &aBlock COMMA_CON);
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+
+    "
+     Smalltalk do:[:value | value class name printNL]
+    "
+!
+
+allKeysDo:aBlock
+    "evaluate the argument, aBlock for all keys in the dictionary"
+%{
+    if (__isSmallInteger(__INST(sysId))) {
+	_SYSDICT_KEYSDO(__intVal(__INST(sysId)), &aBlock COMMA_CON);
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+
+    "
+     Smalltalk allKeysDo:[:key | key printNL]
+    "
+!
+
+associationsDo:aBlock
+    "evaluate the argument, aBlock for all key/value pairs 
+     in the dictionary"
+
+    self allKeysDo:[:aKey |
+	aBlock value:(aKey -> (self at:aKey))
+    ]
+
+    "
+     Smalltalk associationsDo:[:assoc | assoc printNL]
+    "
+!
+
+keysAndValuesDo:aBlock
+    "evaluate the two-arg block, aBlock for all keys and values"
+
+    self allKeysDo:[:aKey |
+	aBlock value:aKey value:(self at:aKey)
+    ]
+! !
+
+!SystemDictionary methodsFor:'queries'!
+
+cellAt:aKey
+    "return the address of a global cell
+     - used internally for compiler only"
+
+%{  /* NOCONTEXT */
+    extern OBJ _SYSDICT_GETCELL();
+
+    if (__isSmallInteger(__INST(sysId))) {
+	RETURN ( _SYSDICT_GETCELL(__intVal(__INST(sysId)), aKey) );
+    }
+%}.
+    "
+     the receiver is not a valid systemDictionary
+    "
+    self pimitiveFailed
+!
+
+references:anObject
+    "return true, if I refer to the argument, anObject
+     must be reimplemented since systemDictionaries are no real collections."
+
+    self do:[:o |
+	(o == anObject) ifTrue:[^ true]
+    ].
+    ^ false
+! !
+
+!SystemDictionary class methodsFor: 'binary storage'!
+
+addGlobalsTo:globalDictionary manager: manager
+    |pools|
+
+    pools := Set new.
+    self associationsDo:[:assoc |
+	|value|
+
+	value := assoc value.
+	value == self ifFalse:[
+	    value isClass ifTrue:[
+		value addGlobalsTo:globalDictionary manager:manager.
+		pools addAll:value sharedPools
+	    ] ifFalse:[
+		globalDictionary at:assoc put:self
+	    ].
+	    value isNil ifFalse:[
+		globalDictionary at:value put:self
+	    ]
+	]
+    ].
+
+    pools do:[:poolDictionary|
+	poolDictionary addGlobalsTo:globalDictionary manager:manager
+    ]
+!
+
+storeBinaryDefinitionOf:anObject on:stream manager:manager
+    |string|
+
+    anObject class == Association ifTrue:[
+	string := 'Smalltalk associationAt:', anObject key storeString
+    ] ifFalse: [
+	string := 'Smalltalk at:', (self keyAtValue: anObject) storeString
+    ].
+    stream nextNumber:2 put:string size.
+    string do:[:char | stream nextPut:char asciiValue]
+! !
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/not_delivered/VMBehavior.st	Mon Apr 25 10:19:26 2016 +0100
@@ -0,0 +1,615 @@
+"
+ COPYRIGHT (c) 1995 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+Object subclass:#VMBehavior
+	instanceVariableNames:'superclass flags selectorArray methodArray'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Kernel-Classes'
+!
+
+!VMBehavior class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1995 by Claus Gittinger
+	      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
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+documentation
+"
+    This class describes what the VM considers to be a classLike object.
+    Every class in the system inherits from VMBehavior (via Behavior, Class, ClassDescription).
+
+    In contrast to Behavior (which describes smalltalk behavior), the things defined
+    here are valid for all objects for which the VM can do a method lookup.
+    In theory, you can create totally different object systems on top of VMBehavior.
+    This class is purely abstract - therefore, no smalltalk behavior is defined here.
+
+    This is certainly not for normal applications.
+
+    Instance variables:
+
+	superclass        <Class>           where lookup continues when a selector is not
+					    found in the selector array
+					    (i.e. the superclass in Smalltalk terms)
+
+	selectorArray     <Array of Symbol> the selectors for which inst-methods are defined here
+
+	methodArray       <Array of Method> the inst-methods corresponding to the selectors
+
+	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
+"
+! !
+
+!VMBehavior class methodsFor:'initialization'!
+
+initialize
+    self == VMBehavior ifTrue:[
+        self flags:(self flagBehavior).
+    ]
+
+    "
+      self initialize
+    "
+! !
+
+!VMBehavior class methodsFor:'flag bit constants'!
+
+flagBehavior
+    "return the flag code which marks Behavior-like instances.
+     You have to check this single bit in the flag value when
+     checking for behaviors."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(BEHAVIOR_INSTS) );
+%}
+
+    "consistency check:
+     all class-entries must be behaviors;
+     all behaviors must be flagged so (in its class's flags)
+     (otherwise, VM will bark)
+     all non-behaviors may not be flagged
+
+     |bit|
+     bit := Class flagBehavior.
+
+     ObjectMemory allObjectsDo:[:o|
+       o isBehavior ifTrue:[
+	 (o class flags bitTest:bit) ifFalse:[
+	     self halt
+	 ].
+       ] ifFalse:[
+	 (o class flags bitTest:bit) ifTrue:[
+	     self halt
+	 ].
+       ].
+       o class isBehavior ifFalse:[
+	 self halt
+       ] ifTrue:[
+	 (o class class flags bitTest:bit) ifFalse:[
+	     self halt
+	 ]
+       ]
+     ]
+    "
+!
+
+flagBlock
+    "return the flag code which marks Block-like instances.
+     You have to check this single bit in the flag value when
+     checking for blocks."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(BLOCK_INSTS) );
+%}
+!
+
+flagBlockContext
+    "return the flag code which marks BlockContext-like instances.
+     You have to check this single bit in the flag value when
+     checking for blockContexts."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(BCONTEXT_INSTS) );
+%}
+!
+
+flagBytes
+    "return the flag code for byte-valued indexed instances.
+     You have to mask the flag value with indexMask when comparing
+     it with flagBytes."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(BYTEARRAY) );
+%}
+    "
+     Behavior flagBytes    
+    "
+!
+
+flagContext
+    "return the flag code which marks Context-like instances.
+     You have to check this single bit in the flag value when
+     checking for contexts."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(CONTEXT_INSTS) );
+%}
+!
+
+flagDoubles
+    "return the flag code for double-valued indexed instances (i.e. 8-byte reals).
+     You have to mask the flag value with indexMask when comparing
+     it with flagDoubles."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(DOUBLEARRAY) );
+%}
+    "
+     Behavior flagDoubles    
+    "
+!
+
+flagFloat
+    "return the flag code which marks Float-like instances.
+     You have to check this single bit in the flag value when
+     checking for floats."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(FLOAT_INSTS) );
+%}
+!
+
+flagFloats
+    "return the flag code for float-valued indexed instances (i.e. 4-byte reals).
+     You have to mask the flag value with indexMask when comparing
+     it with flagFloats."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(FLOATARRAY) );
+%}
+    "
+     Behavior flagFloats    
+    "
+!
+
+flagLongs
+    "return the flag code for long-valued indexed instances (i.e. 4-byte).
+     You have to mask the flag value with indexMask when comparing
+     it with flagLongs."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(LONGARRAY) );
+%}
+    "
+     Behavior flagLongs    
+    "
+!
+
+flagMethod
+    "return the flag code which marks Method-like instances.
+     You have to check this single bit in the flag value when
+     checking for methods."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(METHOD_INSTS) );
+%}
+!
+
+flagNotIndexed
+    "return the flag code for non-indexed instances.
+     You have to mask the flag value with indexMask when comparing
+     it with flagNotIndexed."
+
+    ^ 0
+!
+
+flagPointers
+    "return the flag code for pointer indexed instances (i.e. Array of object).
+     You have to mask the flag value with indexMask when comparing
+     it with flagPointers."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(POINTERARRAY) );
+%}
+    "
+     Behavior flagPointers    
+    "
+!
+
+flagSymbol
+    "return the flag code which marks Symbol-like instances.
+     You have to check this single bit in the flag value when
+     checking for symbols."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(SYMBOL_INSTS) );
+%}
+!
+
+flagWeakPointers
+    "return the flag code for weak pointer indexed instances (i.e. WeakArray).
+     You have to mask the flag value with indexMask when comparing
+     it with flagWeakPointers."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(WKPOINTERARRAY) );
+%}
+!
+
+flagWords
+    "return the flag code for word-valued indexed instances (i.e. 2-byte).
+     You have to mask the flag value with indexMask when comparing
+     it with flagWords."
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(WORDARRAY) );
+%}
+    "
+     Behavior flagWords    
+    "
+!
+
+maskIndexType
+    "return a mask to extract all index-type bits"
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( _MKSMALLINT(ARRAYMASK) );
+%}
+! !
+
+!VMBehavior class methodsFor:'private'!
+
+basicNew
+    "I dont know how to do this ..."
+
+    ^ self subclassResponsibility
+!
+
+basicNew:size
+    "I dont know how to do this ..."
+
+    ^ self subclassResponsibility
+!
+
+new
+    "I dont know how to do this ..."
+
+    ^ self subclassResponsibility
+!
+
+new:size
+    "I dont know how to do this ..."
+
+    ^ self subclassResponsibility
+! !
+
+!VMBehavior class methodsFor:'queries'!
+
+isBuiltInClass
+    "this class is known by the run-time-system"
+
+    ^ true
+! !
+
+!VMBehavior methodsFor:'accessing'!
+
+flags
+    "return the receivers flag bits"
+
+    ^ flags
+!
+
+methodArray
+    "return the receivers method array.
+     Notice: this is not compatible with ST-80."
+
+    ^ methodArray
+!
+
+selectorArray 
+    "return the receivers selector array.
+     Notice: this is not compatible with ST-80."
+
+    ^ selectorArray
+!
+
+selectors:newSelectors methods:newMethods
+    "set both selector array and method array of the receiver,
+     and flush caches"
+
+    ObjectMemory flushCaches.
+    selectorArray := newSelectors.
+    methodArray := newMethods
+!
+
+superclass
+    "return the receivers superclass"
+
+    ^ superclass
+! !
+
+!VMBehavior methodsFor:'private accessing'!
+
+setFlags:aNumber
+    "set the flags.
+     Do NOT use it."
+
+    flags := aNumber
+!
+
+setMethodArray:anArray
+    "set the method array of the receiver.
+     this method is for special uses only - there will be no recompilation
+     and no change record written here.
+     NOT for general use."
+
+    methodArray := anArray
+!
+
+setSelectorArray:anArray
+    "set the selector array of the receiver.
+     this method is for special uses only - there will be no recompilation
+     and no change record written here.
+     NOT for general use."
+
+    selectorArray := anArray
+!
+
+setSelectors:sels methods:m
+    "set some inst vars. 
+     this method is for special uses only - there will be no recompilation
+     and no change record written here; 
+     Do NOT use it."
+
+    selectorArray := sels.
+    methodArray := m.
+!
+
+setSuperclass:aClass
+    "set the superclass of the receiver.
+     this method is for special uses only - there will be no recompilation
+     and no change record written here. Also, if the receiver class has
+     already been in use, future operation of the system is not guaranteed to
+     be correct, since no caches are flushed.
+     Therefore: do NOT use it; use Behavior>>superclass: (or flush the caches, at least)"
+
+    superclass := aClass
+! !
+
+!VMBehavior methodsFor:'queries'!
+
+cachedLookupMethodFor:aSelector
+    "return the method, which would be executed if aSelector was sent to
+     an instance of the receiver. I.e. the selector arrays of the receiver
+     and all of its superclasses are searched for aSelector.
+     Return the method, or nil if instances do not understand aSelector.
+     This interface provides exactly the same information as #lookupMethodFor:,
+     but uses the lookup-cache in the VM for faster search. 
+     However, keep in mind, that doing a lookup through the cache also adds new
+     entries and can thus slow down the system by polluting the cache with 
+     irrelevant entries. (do NOT loop over all objects calling this method).
+     Does NOT (currently) handle MI"
+
+%{  /* NOCONTEXT */
+    RETURN ( __lookup(self, aSelector, SENDER) );
+%}
+
+    "
+     String cachedLookupMethodFor:#=
+     String cachedLookupMethodFor:#asOrderedCollection
+    "
+!
+
+isBits
+    "return true, if instances have indexed byte or short instance variables.
+     Ignore long, float and double arrays, since ST-80 code using isBits are probably
+     not prepared to handle them correctly."
+
+%{  /* NOCONTEXT */
+
+    REGISTER int flags;
+
+    RETURN ( (((flags = (_intVal(_INST(flags)) & ARRAYMASK)) == BYTEARRAY)
+	     || (flags == WORDARRAY)) ? true : false ); 
+%}
+!
+
+isBytes
+    "return true, if instances have indexed byte instance variables"
+
+    "this could be defined as:
+	^ (flags bitAnd:(VMBehavior maskIndexType)) == VMBehavior flagBytes
+    "
+%{  /* NOCONTEXT */
+
+    RETURN ( ((_intVal(_INST(flags)) & ARRAYMASK) == BYTEARRAY) ? true : false ); 
+%}
+!
+
+isDoubles
+    "return true, if instances have indexed double instance variables"
+
+    "this could be defined as:
+	^ (flags bitAnd:(VMBehavior maskIndexType)) == VMBehavior flagDoubles
+    "
+%{  /* NOCONTEXT */
+
+    RETURN ( ((_intVal(_INST(flags)) & ARRAYMASK) == DOUBLEARRAY) ? true : false ); 
+%}
+!
+
+isFixed
+    "return true, if instances do not have indexed instance variables"
+
+    "this could be defined as:
+	^ self isVariable not
+    "
+
+%{  /* NOCONTEXT */
+
+    RETURN ( (_intVal(_INST(flags)) & ARRAYMASK) ? false : true ); 
+%}
+!
+
+isFloats
+    "return true, if instances have indexed float instance variables"
+
+    "this could be defined as:
+	^ (flags bitAnd:(VMBehavior maskIndexType)) == VMBehavior flagFloats
+    "
+%{  /* NOCONTEXT */
+
+    RETURN ( ((_intVal(_INST(flags)) & ARRAYMASK) == FLOATARRAY) ? true : false ); 
+%}
+!
+
+isLongs
+    "return true, if instances have indexed long instance variables"
+
+    "this could be defined as:
+	^ (flags bitAnd:(VMBehavior maskIndexType)) == VMBehavior flagLongs
+    "
+%{  /* NOCONTEXT */
+
+    RETURN ( ((_intVal(_INST(flags)) & ARRAYMASK) == LONGARRAY) ? true : false ); 
+%}
+!
+
+isPointers
+    "return true, if instances have pointer instance variables 
+     i.e. are either non-indexed or have indexed pointer variables"
+
+    "QUESTION: should we ignore WeakPointers ?"
+
+%{  /* NOCONTEXT */
+
+    REGISTER int flags;
+
+    flags = _intVal(_INST(flags)) & ARRAYMASK;
+    switch (flags) {
+	default:
+	    /* normal objects */
+	    RETURN ( true );
+
+	case BYTEARRAY:
+	case WORDARRAY:
+	case LONGARRAY:
+	case FLOATARRAY:
+	case DOUBLEARRAY:
+	    RETURN (false );
+
+	case WKPOINTERARRAY:
+	    /* what about those ? */
+	    RETURN (true );
+    }
+%}
+!
+
+isVariable
+    "return true, if instances have indexed instance variables"
+
+    "this could be defined as:
+	^ (flags bitAnd:(VMBehavior maskIndexType)) ~~ 0
+     "
+
+%{  /* NOCONTEXT */
+
+    RETURN ( (_intVal(_INST(flags)) & ARRAYMASK) ? true : false ); 
+%}
+!
+
+isWords
+    "return true, if instances have indexed short instance variables"
+
+    "this could be defined as:
+	^ (flags bitAnd:(VMBehavior maskIndexType)) == VMBehavior flagWords
+    "
+%{  /* NOCONTEXT */
+
+    RETURN ( ((_intVal(_INST(flags)) & ARRAYMASK) == WORDARRAY) ? true : false ); 
+%}
+!
+
+lookupMethodFor:aSelector
+    "return the method, which would be executed if aSelector was sent to
+     an instance of the receiver. I.e. the selector arrays of the receiver
+     and all of its superclasses are searched for aSelector.
+     Return the method, or nil if instances do not understand aSelector.
+     EXPERIMENTAL: take care of multiple superclasses."
+
+    |m cls|
+
+    cls := self.
+    [cls notNil] whileTrue:[
+	m := cls compiledMethodAt:aSelector.
+	m notNil ifTrue:[^ m].
+	cls := cls superclass
+    ].
+    ^ nil
+! !
+
+!VMBehavior class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/not_delivered/VMBehavior.st,v 1.1 1996/09/12 01:03:24 cg Exp $'
+! !
+VMBehavior initialize!
+
+
+
+
+
--- a/resources/af.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/af.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/af.rs,v 1.3 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/af.rs,v 1.3 2004/03/15 16:39:09 cg Exp $
 ;
 ; Afrikaans strings
 ;
@@ -48,3 +48,10 @@
 'oct'         'okt'
 'nov'         'nov'
 'dec'         'des'
+
+
+
+
+
+
+
--- a/resources/el.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/el.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-7
 
-; $Header: /cvs/stx/stx/libbasic/resources/el.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/el.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Greek strings
 ;
@@ -48,3 +48,10 @@
 'oct'         ''
 'nov'         ''
 'dec'         ''
+
+
+
+
+
+
+
--- a/resources/eo.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/eo.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding utf8
 
-; $Header: /cvs/stx/stx/libbasic/resources/eo.rs,v 1.3 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/eo.rs,v 1.3 2004/03/15 16:39:09 cg Exp $
 ;
 ; Esperanto strings
 ;
@@ -48,3 +48,10 @@
 'oct'         'okt'
 ; 'nov'         'nov'
 ; 'dec'         'dec'
+
+
+
+
+
+
+
--- a/resources/fr.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/fr.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/fr.rs,v 1.3 2008-02-05 12:23:42 sr Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/fr.rs,v 1.3 2008/02/05 12:23:42 sr Exp $
 ;
 ; French strings
 ;
@@ -50,3 +50,10 @@
 'oct'           'oct'
 'nov'           'nov'
 'dec'           'dc'
+
+
+
+
+
+
+
--- a/resources/hu.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/hu.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding utf-8
 
-; $Header: /cvs/stx/stx/libbasic/resources/hu.rs,v 1.2 2006-10-23 10:20:55 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/hu.rs,v 1.2 2006/10/23 10:20:55 cg Exp $
 ;
 ; Hungarian strings
 ;
@@ -48,3 +48,10 @@
 'oct'           'okt'
 'nov'           'nov'
 'dec'           'dec'
+
+
+
+
+
+
+
--- a/resources/it.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/it.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/it.rs,v 1.4 2006-10-28 14:11:17 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/it.rs,v 1.4 2006/10/28 14:11:17 cg Exp $
 ;
 ; Italian strings
 ;
@@ -54,3 +54,10 @@
 'oct'           'ott'
 'nov'           'nov'
 'dec'           'dic'
+
+
+
+
+
+
+
--- a/resources/ja.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/ja.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding utf-8
 
-; $Header: /cvs/stx/stx/libbasic/resources/ja.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/ja.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Japanese strings
 ;
@@ -59,3 +59,10 @@
 'fri'         '金曜'
 'sat'         '土曜'
 'sun'         '日曜'
+
+
+
+
+
+
+
--- a/resources/nl.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/nl.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/nl.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/nl.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Dutch strings
 ;
@@ -48,3 +48,10 @@
 'oct'           'okt'
 'nov'           'nov'
 'dec'           'dec'
+
+
+
+
+
+
+
--- a/resources/no.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/no.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/no.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/no.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Norwegian strings
 ;
@@ -48,3 +48,10 @@
 'oct'         'okt'
 'nov'         'nov'
 'dec'         'des'
+
+
+
+
+
+
+
--- a/resources/pt.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/pt.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/pt.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/pt.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Portuguese strings
 ;
@@ -49,3 +49,10 @@
 'oct'         'out'
 'nov'         'nov'
 'dec'         'dez'
+
+
+
+
+
+
+
--- a/resources/resources.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/resources.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,7 +1,7 @@
 #encoding ascii
 
 ;
-; $Header: /cvs/stx/stx/libbasic/resources/resources.rs,v 1.8 2008-11-28 16:44:55 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/resources.rs,v 1.8 2008/11/28 16:44:55 cg Exp $
 ;
 
 #if Language == #af
@@ -128,3 +128,10 @@
 #else
 'TIME_FORMAT'                       ? 24
 #endif
+
+
+
+
+
+
+
--- a/resources/ro.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/ro.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-2
 
-; $Header: /cvs/stx/stx/libbasic/resources/ro.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/ro.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Romanian strings
 ;
@@ -48,3 +48,10 @@
 'oct'         'oct'
 'nov'         'noi'
 'dec'         'dec'
+
+
+
+
+
+
+
--- a/resources/ru.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/ru.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-5
 
-; $Header: /cvs/stx/stx/libbasic/resources/ru.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/ru.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Russian strings
 ;
@@ -48,3 +48,10 @@
 'oct'         ''       "/ ???
 'nov'         ''       "/ ???
 'dec'         ''       "/ ???
+
+
+
+
+
+
+
--- a/resources/sv.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/sv.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/sv.rs,v 1.3 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/sv.rs,v 1.3 2004/03/15 16:39:09 cg Exp $
 ;
 ; Swedish strings
 ;
@@ -52,3 +52,10 @@
 'oct'           'okt'
 'nov'           'nov'
 'dec'           'dec'
+
+
+
+
+
+
+
--- a/resources/tr.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/tr.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/tr.rs,v 1.2 2004-03-15 16:39:09 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/tr.rs,v 1.2 2004/03/15 16:39:09 cg Exp $
 ;
 ; Turkish strings
 ;
@@ -48,3 +48,10 @@
 'oct'         'eki'
 'nov'         'kas'
 'dec'         'ara'
+
+
+
+
+
+
+
--- a/resources/zh.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/zh.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding utf8
 
-; $Header: /cvs/stx/stx/libbasic/resources/zh.rs,v 1.2 2008-11-28 16:44:28 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/zh.rs,v 1.2 2008/11/28 16:44:28 cg Exp $
 ;
 ; Chinese simplified
 ; extracted from google by claus - can someone proofread, please.
@@ -48,3 +48,10 @@
 'oct'         '十月'
 'nov'         '十一月'
 'dec'         '十二月'
+
+
+
+
+
+
+
--- a/resources/zh_trad.rs	Sun Apr 24 17:51:25 2016 +0200
+++ b/resources/zh_trad.rs	Mon Apr 25 10:19:26 2016 +0100
@@ -1,6 +1,6 @@
 #encoding utf8
 
-; $Header: /cvs/stx/stx/libbasic/resources/zh_trad.rs,v 1.2 2008-11-28 16:50:03 cg Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/zh_trad.rs,v 1.2 2008/11/28 16:50:03 cg Exp $
 ;
 ; Chinese traditional
 ; this file contains 8bit national characters;
@@ -9,3 +9,10 @@
 #include 'zh.rs'
 
 ; please redefine any differences to traditional chinese below
+
+
+
+
+
+
+
--- a/vms.mak	Sun Apr 24 17:51:25 2016 +0200
+++ b/vms.mak	Mon Apr 25 10:19:26 2016 +0100
@@ -2,7 +2,7 @@
 # DO NOT EDIT 
 # automatically generated from Make.proto
 #
-# $Header: /cvs/stx/stx/libbasic/vms.mak,v 1.9 2001-10-31 15:02:19 cg Exp $
+# $Header: /cvs/stx/stx/libbasic/vms.mak,v 1.9 2001/10/31 15:02:19 cg Exp $
 #
 TOP=..
 LIBNAME=libbasic
@@ -296,3 +296,10 @@
 $(OUTDIR)WriteStream.$(O) WriteStream.$(H): WriteStream.st $(STCHDR)  ../include/PositionableStream.$(H)  ../include/PeekableStream.$(H)  ../include/Stream.$(H)  ../include/Object.$(H) 
 $(OUTDIR)WrongProceedabilityError.$(O) WrongProceedabilityError.$(H): WrongProceedabilityError.st $(STCHDR)  ../include/SignalError.$(H)  ../include/ProceedableError.$(H)  ../include/Error.$(H)  ../include/Exception.$(H)  ../include/GenericException.$(H)  ../include/Object.$(H) 
 # ENDMAKEDEPEND
+
+
+
+
+
+
+