Merged with trunk jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 01 Feb 2010 10:03:06 +0000
branchjv
changeset 17747 f978415ba3d3
parent 17746 2c33aabf3828
child 17748 085c769e2ec9
Merged with trunk
AbstractTime.st
Boolean.st
CharacterArray.st
Collection.st
Date.st
Dictionary.st
DirectoryStream.st
EncodedStream.st
ExternalLibraryFunction.st
Integer.st
KeyedCollection.st
ObjectMemory.st
SequenceableCollection.st
Smalltalk.st
Win32OperatingSystem.st
stx_libbasic.st
--- a/AbstractTime.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/AbstractTime.st	Mon Feb 01 10:03:06 2010 +0000
@@ -409,6 +409,7 @@
     "
 ! !
 
+
 !AbstractTime methodsFor:'abstract'!
 
 hours
@@ -1139,6 +1140,11 @@
 !AbstractTime class methodsFor:'documentation'!
 
 version
-    ^ '$Id: AbstractTime.st 10473 2009-10-24 15:48:19Z vranyj1 $'
+    ^ '$Id: AbstractTime.st 10496 2010-02-01 10:03:06Z vranyj1 $'
+!
+
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.67 2010/01/27 14:09:56 sr Exp §'
 ! !
 
+
--- a/Boolean.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/Boolean.st	Mon Feb 01 10:03:06 2010 +0000
@@ -110,6 +110,8 @@
 ! !
 
 
+
+
 !Boolean methodsFor:'blocked'!
 
 onChangeSend:selector to:someOne
@@ -185,6 +187,7 @@
     ^ self printString
 ! !
 
+
 !Boolean methodsFor:'testing'!
 
 isBoolean
@@ -222,12 +225,13 @@
 !Boolean class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Boolean.st 10480 2009-12-02 21:30:55Z vranyj1 $'
+    ^ '$Id: Boolean.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Boolean.st,v 1.39 2009/10/06 15:16:47 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Boolean.st,v 1.40 2010/01/21 11:48:59 cg Exp §'
 ! !
 
 
 
+
--- a/CharacterArray.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/CharacterArray.st	Mon Feb 01 10:03:06 2010 +0000
@@ -1038,6 +1038,14 @@
     "
 !
 
+substringsSeparatedBy:separatorCharacter
+    ^ self asCollectionOfSubstringsSeparatedBy:separatorCharacter
+
+    "
+     'foo bar, baz' substringsSeparatedBy:$,
+    "
+!
+
 truncateTo:smallSize
     "return myself or a copy shortened to smallSize.  1/18/96 sw"
 
@@ -1497,6 +1505,7 @@
     ^ true
 ! !
 
+
 !CharacterArray methodsFor:'character searching'!
 
 includesMatchCharacters
@@ -2239,7 +2248,7 @@
      Notice, that all singleByte strings are already 0-terminated in ST/X, whereas wide
      strings are not."
 
-    self last codePoint == 0 ifTrue:[^ self ].
+    (self notEmpty and:[self last codePoint == 0]) ifTrue:[^ self ].
     ^ self copyWith:(Character value:0).
 
     "
@@ -4100,6 +4109,7 @@
 ! !
 
 
+
 !CharacterArray methodsFor:'padded copying'!
 
 centerPaddedTo:newSize
@@ -4632,6 +4642,7 @@
     "Modified: 17.4.1997 / 12:50:23 / cg"
 ! !
 
+
 !CharacterArray methodsFor:'special string converting'!
 
 expandPlaceholdersWith:argArrayOrDictionary
@@ -4697,7 +4708,7 @@
      See also bindWith:... for VisualAge compatibility.
      Use %<cr> to insert a CR and %<tab> to insert a TAB."
 
-    |next v key keyAsSymbol
+    |next v key 
      idx   "{ SmallInteger }"
      idx2  "{ SmallInteger }"
      start "{ SmallInteger }"
@@ -4706,81 +4717,87 @@
     stop := self size.
     start := 1.
     [start <= stop] whileTrue:[
-	idx := self indexOf:$% startingAt:start.
-	(idx == 0 or:[idx == stop]) ifTrue:[
-	    aStream nextPutAll:self startingAt:start to:stop.
-	    ^ self.
-	].
-	"found a %"
-	aStream nextPutAll:self startingAt:start to:(idx - 1).
-	next := self at:(idx + 1).
-	(next == $%) ifTrue:[
-	    aStream nextPut:$%.
-	] ifFalse:[
-	next == $< ifTrue:[
-	    idx2 := self indexOf:$> startingAt:idx+2.
-	    key := self copyFrom:idx+2 to:idx2-1.
-	    idx := idx2 - 1.
-	    key := key asSymbolIfInterned.
-	    (#(cr tab nl return lf ff null) includesIdentical:key) ifTrue:[
-		aStream nextPut:(Character perform:key).
-	    ].
-	] ifFalse:[
-	    (next between:$1 and:$9) ifTrue:[
-		v := argArrayOrDictionary at:(next digitValue) ifAbsent:nil
-	    ] ifFalse:[next == $( ifTrue:[
-		idx2 := self indexOf:$) startingAt:idx+2.
-		key := self copyFrom:idx+2 to:idx2-1.
-		idx := idx2 - 1.
-		key:= key asSymbolIfInterned ? key.
-		(keyAsSymbol notNil and:[ argArrayOrDictionary includesKey:keyAsSymbol ]) ifTrue:[
-		    v := argArrayOrDictionary at:keyAsSymbol
-		] ifFalse:[
-		    key isNumeric ifTrue:[
-			key := Integer readFrom:key onError:nil.
-		    ].
-		    v := argArrayOrDictionary at:key ifAbsent:nil
-		].
-	    ] ifFalse:[
-		"so next is a non-numeric single character.
-		 This would not work with Arrays, since they have integer indizes"
-		argArrayOrDictionary isSequenceable ifFalse:[
-		    v := argArrayOrDictionary at:next ifAbsent:[
-			    "try symbol instead of character"
-			    argArrayOrDictionary at:next asSymbol ifAbsent:[String with:$% with:next].
-			 ].
-		] ifTrue:[
-		    v := String with:$% with:next. "No match, keep original sequence"
-		].
-	    ]].
-	    v notNil ifTrue:[
-		v isBlock ifTrue:[
-		    v := v value
-		].
-
-		v printOn:aStream.
-	    ].
-	]].
-	start := idx + 2
+        idx := self indexOf:$% startingAt:start.
+        (idx == 0 or:[idx == stop]) ifTrue:[
+            aStream nextPutAll:self startingAt:start to:stop.
+            ^ self.
+        ].
+        "found a %"
+        aStream nextPutAll:self startingAt:start to:(idx - 1).
+        next := self at:(idx + 1).
+        (next == $%) ifTrue:[
+            aStream nextPut:$%.
+        ] ifFalse:[
+        next == $< ifTrue:[
+            idx2 := self indexOf:$> startingAt:idx+2.
+            key := self copyFrom:idx+2 to:idx2-1.
+            idx := idx2 - 1.
+            key := key asSymbolIfInterned.
+            (#(cr tab nl return lf ff null) includesIdentical:key) ifTrue:[
+                aStream nextPut:(Character perform:key).
+            ].
+        ] ifFalse:[
+            (next between:$1 and:$9) ifTrue:[
+                v := argArrayOrDictionary at:(next digitValue) ifAbsent:nil
+            ] ifFalse:[
+                next == $( ifTrue:[
+                    idx2 := self indexOf:$) startingAt:idx+2.
+                    key := self copyFrom:idx+2 to:idx2-1.
+                    idx := idx2 - 1.
+                    key := key asSymbolIfInterned ? key.
+                    (argArrayOrDictionary includesKey:key) ifTrue:[
+                        v := argArrayOrDictionary at:key
+                    ] ifFalse:[
+                        (key size == 1 and:[ argArrayOrDictionary includesKey:(key at:1)]) ifTrue:[
+                            v := argArrayOrDictionary at:(key at:1)
+                        ] ifFalse:[
+                            key isNumeric ifTrue:[
+                                key := Integer readFrom:key onError:nil.
+                            ].
+                            v := argArrayOrDictionary at:key ifAbsent:nil
+                        ]
+                    ].
+                ] ifFalse:[
+                    "so next is a non-numeric single character.
+                     This would not work with Arrays, since they have integer indizes"
+                    argArrayOrDictionary isSequenceable ifFalse:[
+                        v := argArrayOrDictionary at:next ifAbsent:[
+                                "try symbol instead of character"
+                                argArrayOrDictionary at:next asSymbol ifAbsent:[String with:$% with:next].
+                             ].
+                    ] ifTrue:[
+                        v := String with:$% with:next. "No match, keep original sequence"
+                    ].
+                ]
+            ].
+            v notNil ifTrue:[
+                v isBlock ifTrue:[
+                    v := v value
+                ].
+
+                v printOn:aStream.
+            ].
+        ]].
+        start := idx + 2
     ].
 
     "
      String streamContents:[:s|
-	'hello %1' expandPlaceholdersWith:#('world') on:s.
-	s cr.
-	'hello %1; how is %2' expandPlaceholdersWith:#('world' 'this') on:s.
-	s cr.
-	'hello %2; how is %1' expandPlaceholdersWith:#('world' 'this') on:s.
-	s cr.
-	'%1 plus %2 gives %3 ' expandPlaceholdersWith:#(4 5 9) on:s.
-	s cr.
-	'%%(1)0 gives %(1)0' expandPlaceholdersWith:#(123) on:s.
-	s cr.
-	'%%10 gives %10' expandPlaceholdersWith:#(123) on:s.
-	s cr.
-	'%%(10) gives %(10) %<cr>%<tab>next line' expandPlaceholdersWith:#(123) on:s.
-	s cr.
-	'%test gives %1' expandPlaceholdersWith:#(123) on:s.
+        'hello %1' expandPlaceholdersWith:#('world') on:s.
+        s cr.
+        'hello %1; how is %2' expandPlaceholdersWith:#('world' 'this') on:s.
+        s cr.
+        'hello %2; how is %1' expandPlaceholdersWith:#('world' 'this') on:s.
+        s cr.
+        '%1 plus %2 gives %3 ' expandPlaceholdersWith:#(4 5 9) on:s.
+        s cr.
+        '%%(1)0 gives %(1)0' expandPlaceholdersWith:#(123) on:s.
+        s cr.
+        '%%10 gives %10' expandPlaceholdersWith:#(123) on:s.
+        s cr.
+        '%%(10) gives %(10) %<cr>%<tab>next line' expandPlaceholdersWith:#(123) on:s.
+        s cr.
+        '%test gives %1' expandPlaceholdersWith:#(123) on:s.
      ]
     "
 
@@ -4792,7 +4809,7 @@
      dict at:$a put:'AAAAA'.
      dict at:$b put:[ Time now ].
      String streamContents:[:s|
-	 'hello %1 %a %b' expandPlaceholdersWith:dict on:s.
+         'hello %1 %a %b' expandPlaceholdersWith:dict on:s.
      ].
     "
 !
@@ -5791,11 +5808,11 @@
 !CharacterArray class methodsFor:'documentation'!
 
 version
-    ^ '$Id: CharacterArray.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+    ^ '$Id: CharacterArray.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.426 2009/12/14 13:45:29 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.429 2010/01/29 13:13:09 cg Exp §'
 ! !
 
 CharacterArray initialize!
@@ -5803,3 +5820,4 @@
 
 
 
+
--- a/Collection.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/Collection.st	Mon Feb 01 10:03:06 2010 +0000
@@ -736,6 +736,17 @@
     "
      #(1 2 3) third
     "
+!
+
+values
+    "return a collection containing all values of the receiver.
+     This is to make value access to an OrderedDictionary compatible with any-Collection"
+
+    |aCollection|
+
+    aCollection := OrderedCollection new.
+    self do:[:value| aCollection add:value].
+    ^ aCollection
 ! !
 
 !Collection methodsFor:'adding & removing'!
@@ -2379,34 +2390,39 @@
      This method fails if neither the receiver nor aCollection is
      a sequenceable collection (i.e. implements numeric key access)."
 
-    |index  "{ Class: SmallInteger }" 
-     newCollection|
+    |newCollection|
 
     newCollection := self speciesForAdding new.
-
-    index := 1.
-    aCollection isSequenceable ifFalse:[
-        self isSequenceable ifFalse:[
-            "/ mhmh - could use two streams here...
-            ^ self error:'neither collection is sequenceable'.
-        ].
-        aCollection do:[:element |
-            newCollection add:(aTwoArgBlock value:(self at:index) 
-                                            value:element).
-            index := index + 1
-        ]
-    ] ifTrue:[
-        self do:[:element |
-            newCollection add:(aTwoArgBlock value:element 
-                                            value:(aCollection at:index)).
-            index := index + 1
-        ]
+    self with:aCollection do:[:el1 :el2 |
+        newCollection add:(aTwoArgBlock value:el1 value:el2).
     ].
     ^ newCollection as:self species
 
     "
      (1 to:3) with:#(one two three) collect:[:num :sym | (num->sym)] 
-     #(1 2 3) with:#(10 20 30) collect:[:x :y | (x@y)]
+     #(1 2 3) with:#(10 20 30) collect:[:x :y | (x@y)]  
+    "
+!
+
+with:aCollection count:aTwoArgBlock
+    "evaluate the argument, aBlock for successive elements from
+     each the receiver and the argument, aSequenceableCollection.
+     Count, how often the second argument, aTwoArgBlock returns true.
+     This method fails if neither the receiver nor aCollection is
+     a sequenceable collection (i.e. implements numeric key access)."
+
+    |count  "{ Class: SmallInteger }"|
+
+    count := 0.
+    self with:aCollection do:[:el1 :el2 |
+        (aTwoArgBlock value:el1 value:el2) ifTrue:[
+            count := count + 1
+        ]
+    ].
+    ^ count
+
+    "
+     (1 to:3) with:#(1 3 3) count:[:n1 :n2 | n1 = n2]
     "
 !
 
@@ -3628,11 +3644,11 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Collection.st 10494 2010-01-16 11:26:37Z vranyj1 $'
+    ^ '$Id: Collection.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Collection.st,v 1.239 2010/01/11 14:49:11 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Collection.st,v 1.241 2010/01/29 16:41:43 cg Exp §'
 ! !
 
 Collection initialize!
@@ -3641,3 +3657,4 @@
 
 
 
+
--- a/Date.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/Date.st	Mon Feb 01 10:03:06 2010 +0000
@@ -756,6 +756,7 @@
     "
 ! !
 
+
 !Date class methodsFor:'change & update'!
 
 update:something with:aParameter from:changedObject
@@ -1539,6 +1540,13 @@
     "
 ! !
 
+!Date class methodsFor:'spray'!
+
+sprayTypeName
+	#swAdded.
+	^SOAP::XePName xsd: 'date'
+! !
+
 !Date methodsFor:'Compatibility-ANSI'!
 
 dayOfWeek
@@ -2541,6 +2549,11 @@
     ^ self
 !
 
+asNative
+	#swAdded.
+	^self
+!
+
 asTimestamp
     "return an TimeStamp instance, representing midnight of last night"
 
@@ -2611,6 +2624,33 @@
     ^ self addDays:days
 ! !
 
+!Date methodsFor:'printing'!
+
+printUnboundedSchemaStringOn: stream
+	"If a Date is prior to 01 January 1601, or post 31 December 65535, then it cannot be
+	formatted by Windows. ... and the Dolphin printUnboundedDate method does not respect the format string"
+
+	#swAdded.
+	stream
+		display: self year;
+		nextPut: $-;
+		display: (self monthIndex printStringRadix: 10 padTo: 2);
+		nextPut: $-;
+		display: (self dayOfMonth printStringRadix: 10 padTo: 2).
+!
+
+schemaDisplayString
+	"Answer a valid XMLSchema  xsd:date lexical representation"
+	"Assume UTC"
+
+	| stream |
+	#swAdded.
+	stream := String writeStream.
+	self printUnboundedSchemaStringOn: stream.
+	stream nextPut: $Z.
+	^stream contents
+! !
+
 !Date methodsFor:'printing & storing'!
 
 addPrintBindingsTo:aDictionary
@@ -2704,7 +2744,7 @@
     aDictionary at:$m put:msPadded0.
     aDictionary at:$M put:ms.
     aDictionary at:$y put:year.
-    aDictionary at:$Y put:((year \\ 100)printStringLeftPaddedTo:2 with:$0).
+    aDictionary at:$Y put:((year \\ 100) printStringLeftPaddedTo:2 with:$0).
     aDictionary at:$w put:wsPadded0.
     aDictionary at:$W put:ws.
 
@@ -2953,14 +2993,15 @@
 !Date class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Date.st 10480 2009-12-02 21:30:55Z vranyj1 $'
+    ^ '$Id: Date.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Date.st,v 1.129 2009/10/07 15:33:07 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Date.st,v 1.131 2010/01/27 14:10:32 sr Exp §'
 ! !
 
 Date initialize!
 
 
 
+
--- a/Dictionary.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/Dictionary.st	Mon Feb 01 10:03:06 2010 +0000
@@ -535,7 +535,8 @@
 !
 
 values
-    "return a collection containing all values of the receiver"
+    "return a collection containing all values of the receiver.
+     This is to make value access to an OrderedDictionary compatible with any-Collection"
 
     |aCollection|
 
@@ -659,8 +660,10 @@
         See #declareAllNewFrom: which does exactly what this name implies."
 
     self ~~ aDictionaryOrNil ifTrue:[
-        aDictionaryOrNil keysAndValuesDo:[:key :value |
-            self at:key put:value.
+        aDictionaryOrNil notNil ifTrue:[
+            aDictionaryOrNil keysAndValuesDo:[:key :value |
+                self at:key put:value.
+            ].
         ]
     ]
 
@@ -673,10 +676,12 @@
      See also #declareAllFrom:"
 
     self ~~ aDictionaryOrNil ifTrue:[
-        aDictionaryOrNil keysAndValuesDo:[:key :value |
-            (self includesKey:key) ifFalse:[
-                self at:key put:value.
-            ].
+        aDictionaryOrNil notNil ifTrue:[
+            aDictionaryOrNil keysAndValuesDo:[:key :value |
+                (self includesKey:key) ifFalse:[
+                    self at:key put:value.
+                ].
+            ]
         ]
     ]
 
@@ -2044,8 +2049,13 @@
 !Dictionary class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Dictionary.st 10473 2009-10-24 15:48:19Z vranyj1 $'
+    ^ '$Id: Dictionary.st 10496 2010-02-01 10:03:06Z vranyj1 $'
+!
+
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.100 2010/01/29 16:49:03 cg Exp §'
 ! !
 
 Dictionary initialize!
 
+
--- a/DirectoryStream.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/DirectoryStream.st	Mon Feb 01 10:03:06 2010 +0000
@@ -581,7 +581,7 @@
             [
                 nextEntry := nextEntry utf8Decoded.
             ] on:InvalidEncodingError do:[:ex|
-                "maybey there are old filenames in ISO8859-x,
+                "maybe there are old filenames in ISO8859-x,
                  just keep them untranslated"
             ].
         ] ifFalse:[
@@ -692,7 +692,7 @@
 
                 do {
                     __threadErrno = 0;
-                    d = STX_API_CALL2( "FindFirstFile", FindFirstFile, uP.pattern, &uD.data );
+                    d = STX_API_CALL2( "FindFirstFileA", FindFirstFileA, uP.pattern, &uD.data );
                 } while ((d < 0) && (__threadErrno == EINTR));
 
                 if (d == INVALID_HANDLE_VALUE) {
@@ -797,11 +797,12 @@
 !DirectoryStream class methodsFor:'documentation'!
 
 version
-    ^ '$Id: DirectoryStream.st 10480 2009-12-02 21:30:55Z vranyj1 $'
+    ^ '$Id: DirectoryStream.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.70 2009/11/05 14:37:40 stefan Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.71 2010/01/25 17:36:38 cg Exp §'
 ! !
 
 
+
--- a/EncodedStream.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/EncodedStream.st	Mon Feb 01 10:03:06 2010 +0000
@@ -83,6 +83,15 @@
     encoder := something.
 !
 
+pathName
+    "if our base stream hat a pathname, delegate..."
+
+    stream isNil ifTrue:[
+        ^ nil.
+    ].
+    ^ stream pathName.
+!
+
 readStream
     ^ self
 !
@@ -232,11 +241,12 @@
 !EncodedStream class methodsFor:'documentation'!
 
 version
-    ^ '$Id: EncodedStream.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+    ^ '$Id: EncodedStream.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/EncodedStream.st,v 1.16 2009/12/11 16:54:29 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/EncodedStream.st,v 1.17 2010/01/18 13:55:20 stefan Exp §'
 ! !
 
 
+
--- a/ExternalLibraryFunction.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/ExternalLibraryFunction.st	Mon Feb 01 10:03:06 2010 +0000
@@ -585,9 +585,9 @@
 
 ffiTypeSymbolForType:aType
     "map type to one of the ffi-supported ones:
-	sint8, sint16, sint32, sint64
-	uint8, uint16, uint32, uint64
-	bool void pointer handle
+        sint8, sint16, sint32, sint64
+        uint8, uint16, uint32, uint64
+        bool void pointer handle
     "
 
     aType == #sint8           ifTrue:[^ aType ].
@@ -604,6 +604,8 @@
     aType == #void            ifTrue:[^ aType ].
     aType == #bool            ifTrue:[^ aType ].
     aType == #pointer         ifTrue:[^ aType ].
+    aType == #charPointer     ifTrue:[^ aType ].
+    aType == #wcharPointer    ifTrue:[^ aType ].
 
     aType == #int8            ifTrue:[^ #sint8 ].
     aType == #int16           ifTrue:[^ #sint16 ].
@@ -645,17 +647,17 @@
     aType == #unsigned        ifTrue:[^ #uint ].
 
     (aType isString or:[aType isSymbol]) ifFalse:[
-	CType isNil ifTrue:[
-	    self error:'unknown type'.
-	].
-	^ aType typeSymbol.
+        CType isNil ifTrue:[
+            self error:'unknown type'.
+        ].
+        ^ aType typeSymbol.
     ].
 
     (aType endsWith:'*') ifTrue:[
-	^ #pointer.
+        ^ #pointer.
     ].
     (aType endsWith:'Pointer') ifTrue:[
-	^ #pointer.
+        ^ #pointer.
     ].
     ^ aType
 
@@ -1123,6 +1125,27 @@
 	    }
 	    argValuePtr = &(__argValues[i].pointerVal);;
 
+	} else if (typeSymbol == @symbol(wcharPointer)) {
+	    thisType = __get_ffi_type_pointer();
+	    if (__isUnicode16String(arg)) {
+		if (async == true) goto badArgForAsyncCall;
+		__argValues[i].pointerVal = (void *)(__unicode16StringVal(arg));
+	    } else if (__isBytes(arg)) {
+		if (async == true) goto badArgForAsyncCall;
+		__argValues[i].pointerVal = (void *)(__byteArrayVal(arg));
+	    } else if (__isExternalAddressLike(arg)) {
+		__argValues[i].pointerVal = (void *)(__externalAddressVal(arg));
+	    } else if (__isExternalBytesLike(arg)) {
+		__argValues[i].pointerVal = (void *)(__externalBytesVal(arg));
+	    } else {
+		if (arg == nil) {
+		    __argValues[i].pointerVal = (void *)0;
+		} else {
+		    __FAIL__(@symbol(InvalidArgument))
+		}
+	    }
+	    argValuePtr = &(__argValues[i].pointerVal);;
+
 	} else if (typeSymbol == @symbol(floatPointer)) {
 	    thisType = __get_ffi_type_pointer();
 	    if (__isBytes(arg)) {
@@ -1443,13 +1466,14 @@
 !ExternalLibraryFunction class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ExternalLibraryFunction.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+    ^ '$Id: ExternalLibraryFunction.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.75 2009/12/04 20:00:53 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.77 2010/01/26 11:20:13 cg Exp §'
 ! !
 
 ExternalLibraryFunction initialize!
 
 
+
--- a/Integer.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/Integer.st	Mon Feb 01 10:03:06 2010 +0000
@@ -1936,13 +1936,13 @@
 
 changeBit:index to:aBooleanOrNumber
     "return a new number where the specified bit is on or off,
-     sepending on aBooleanOrNumber.
+     depending on aBooleanOrNumber.
      Bits are counted from 1 starting with the least significant.
      The methods name may be missleading: the receiver is not changed,
-     but a new number is returned. Should be named #withBitChanged:to:"
+     but a new number is returned. Should be named #withBit:changedTo:"
 
     (aBooleanOrNumber == 0 or:[aBooleanOrNumber == false]) ifTrue:[
-	^ self clearBit:index
+        ^ self clearBit:index
     ].
     ^ self setBit:index
 
@@ -1952,6 +1952,23 @@
     "
 !
 
+changeMask:mask to:aBooleanOrNumber
+    "return a new number where the specified mask-bit is on or off,
+     depending on aBooleanOrNumber.
+     The methods name may be missleading: the receiver is not changed,
+     but a new number is returned. Should be named #withMask:changedTo:"
+
+    (aBooleanOrNumber == 0 or:[aBooleanOrNumber == false]) ifTrue:[
+        ^ self bitClear:mask
+    ].
+    ^ self bitOr:mask
+
+    "
+     (16r3fffffff changeMask:16r80 to:0) hexPrintString 
+     (16r3fff0000 changeMask:16r80 to:1) hexPrintString
+    "
+!
+
 clearBit:index
     "return a new integer where the specified bit is off.
      Bits are counted from 1 starting with the least significant.
@@ -3944,19 +3961,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 + val2;
     RETURN(__MKINT(rslt));
@@ -3978,19 +3991,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 + val2;
     RETURN(__MKUINT((unsigned)rslt));
@@ -4012,19 +4021,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 & val2;
     RETURN(__MKINT(rslt));
@@ -4046,19 +4051,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 & val2;
     RETURN(__MKUINT(rslt));
@@ -4080,11 +4081,9 @@
 
     if (__isSmallInteger(self)) {
         val = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val = __longIntVal(self);
         if (!val) goto bad;
-    } else {
-        goto bad;
     }
     rslt = ~val;
     RETURN(__MKINT(rslt));
@@ -4106,11 +4105,9 @@
 
     if (__isSmallInteger(self)) {
         val = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val = __longIntVal(self);
         if (!val) goto bad;
-    } else {
-        goto bad;
     }
     rslt = ~val;
     RETURN(__MKUINT(rslt));
@@ -4132,19 +4129,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 | val2;
     RETURN(__MKINT(rslt));
@@ -4166,19 +4159,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 | val2;
     RETURN(__MKUINT(rslt));
@@ -4200,19 +4189,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 ^ val2;
     RETURN(__MKINT(rslt));
@@ -4234,19 +4219,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 ^ val2;
     RETURN(__MKUINT(rslt));
@@ -4268,19 +4249,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 * val2;
     RETURN(__MKINT(rslt));
@@ -4302,19 +4279,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 * val2;
     RETURN(__MKUINT((unsigned)rslt));
@@ -4336,19 +4309,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 - val2;
     RETURN(__MKINT(rslt));
@@ -4370,19 +4339,15 @@
 
     if (__isSmallInteger(self)) {
         val1 = __intVal(self);
-    } else if (__isLargeInteger(self)) {
+    } else {
         val1 = __longIntVal(self);
         if (!val1) goto bad;
-    } else {
-        goto bad;
     }
     if (__isSmallInteger(anInteger)) {
         val2 = __intVal(anInteger);
-    } else if (__isLargeInteger(anInteger)) {
+    } else {
         val2 = __longIntVal(anInteger);
         if (!val2) goto bad;
-    } else {
-        goto bad;
     }
     rslt = val1 - val2;
     RETURN(__MKUINT((unsigned)rslt));
@@ -4734,11 +4699,11 @@
 !Integer class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Integer.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+    ^ '$Id: Integer.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Integer.st,v 1.242 2009/12/11 12:41:23 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Integer.st,v 1.244 2010/01/30 11:39:43 cg Exp §'
 ! !
 
 Integer initialize!
@@ -4746,3 +4711,4 @@
 
 
 
+
--- a/KeyedCollection.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/KeyedCollection.st	Mon Feb 01 10:03:06 2010 +0000
@@ -122,21 +122,6 @@
 
     "Modified: / 19.6.1998 / 00:48:27 / cg"
     "Created: / 19.6.1998 / 00:51:49 / cg"
-!
-
-values
-    "return a collection containing the values of the receiver"
-
-    |valueCollection|
-
-    valueCollection := OrderedCollection new.
-    self do:[:element |
-        valueCollection add:element
-    ].
-    ^ valueCollection
-
-    "Modified: / 19.6.1998 / 00:48:27 / cg"
-    "Created: / 19.6.1998 / 00:52:16 / cg"
 ! !
 
 !KeyedCollection methodsFor:'enumerating'!
@@ -223,5 +208,10 @@
 !KeyedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Id: KeyedCollection.st 10447 2009-06-14 13:09:55Z vranyj1 $'
+    ^ '$Id: KeyedCollection.st 10496 2010-02-01 10:03:06Z vranyj1 $'
+!
+
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libbasic/KeyedCollection.st,v 1.7 2010/01/29 16:42:18 cg Exp §'
 ! !
+
--- a/ObjectMemory.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/ObjectMemory.st	Mon Feb 01 10:03:06 2010 +0000
@@ -1791,14 +1791,14 @@
         oClass := referent class.
         1 to:oClass instSize do:[:i |
             ((referent instVarAt:i) == anObject) ifTrue:[
-                ^ (referent classNameWithArticle , ' [' , (names at:i) allBold, ']').
+                ^ '%1 [%2]' bindWith:referent classNameWithArticle with:(names at:i) allBold.
             ].
         ].
         oClass isVariable ifTrue:[
             oClass isPointers ifTrue:[
                 1 to:referent basicSize do:[:i |
                     ((referent basicAt:i) == anObject) ifTrue:[
-                        ^ (referent classNameWithArticle , ' [' , i printString allBold, ']').
+                        ^ '%1 [%2] (sz=%2)' bindWith:referent classNameWithArticle with:i printString allBold with:referent basicSize printString
                     ]
                 ]
             ]
@@ -4868,16 +4868,19 @@
      This is the filename of the current image (without '.img') or,
      if not running from an image, the default name 'st'"
 
-    |nm|
+    |nm filename suffix|
 
     nm := ImageName.
-    (nm isNil or:[nm isBlank]) ifTrue:[
-	^ 'st'
+    (nm isEmptyOrNil or:[nm isBlank]) ifTrue:[
+        ^ 'st'
     ].
-    ((nm endsWith:'.sav')
-    or:[(nm endsWith:'.img')]) ifTrue:[
-	nm := nm copyWithoutLast:4
+
+    filename := nm asFilename.
+    suffix := filename suffix.
+    (suffix = 'sav' or:[suffix = self suffixForSnapshot]) ifTrue:[
+        ^ filename nameWithoutSuffix.
     ].
+
     ^ nm
 
     "
@@ -4928,7 +4931,7 @@
 !
 
 nameForCrashImage
-    ^ 'crash.img'
+    ^ 'crash', '.', self suffixForSnapshot
 
     "
      ObjectMemory nameForCrashImage
@@ -4942,7 +4945,7 @@
      This is the filename of the current image or,
      if not running from an image, the default name 'st.img'"
 
-    ^ self imageBaseName , '.img'
+    ^ self imageBaseName , '.', self suffixForSnapshot
 
     "
      ObjectMemory nameForSnapshot
@@ -5115,6 +5118,12 @@
     "Modified: / 04-08-2006 / 18:14:45 / cg"
 !
 
+suffixForSnapshot
+    "return the suffix used for snapshot files'"
+
+    ^ 'img'.
+!
+
 writeCrashImage
     "create a 'crash.img' snapshot file containing all of the current state.
      Keep the current image name."
@@ -5225,8 +5234,13 @@
 
 !ObjectMemory::BinaryModuleDescriptor methodsFor:'printing & storing'!
 
-displayString
-    ^ self class name , '(' , name , ')'
+printOn:aStream
+    aStream 
+        nextPutAll:self class name;
+        nextPut:$(.
+
+    name printOn:aStream.
+    aStream nextPut:$).
 ! !
 
 !ObjectMemory::BinaryModuleDescriptor methodsFor:'private-accessing'!
@@ -5245,14 +5259,15 @@
 !ObjectMemory class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ObjectMemory.st 10480 2009-12-02 21:30:55Z vranyj1 $'
+    ^ '$Id: ObjectMemory.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.242 2009/10/14 06:13:29 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.245 2010/01/20 19:44:24 cg Exp §'
 ! !
 
 ObjectMemory initialize!
 
 
 
+
--- a/SequenceableCollection.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/SequenceableCollection.st	Mon Feb 01 10:03:06 2010 +0000
@@ -358,6 +358,13 @@
     ^ self == SequenceableCollection
 ! !
 
+!SequenceableCollection class methodsFor:'spray'!
+
+sprayTypeName
+	#swAdded.
+	^SOAP::XePName prefix: 'soap' local: 'Array'
+! !
+
 !SequenceableCollection methodsFor:'Compatibility-Squeak'!
 
 allButFirst
@@ -638,6 +645,7 @@
     ^ self replaceFrom:start to:stop with:anArray startingAt:repStart
 ! !
 
+
 !SequenceableCollection methodsFor:'accessing'!
 
 after:anObject
@@ -1926,6 +1934,20 @@
     ^ true
 !
 
+isSoapEncSameAs: comparand
+	"Answer whether the receiver and the <Object> argument, comparand,
+	are considered equivalent in terms of the soap-enc rules."
+
+	| size |
+	#swAdded.
+	self == comparand ifTrue: [^true].
+	self species == comparand species ifFalse: [^false].
+	size := self size.
+	size = comparand size ifFalse: [^false].
+	1 to: size do: [:i | ((self at: i) isSoapEncSameAs: (comparand at: i)) ifFalse: [^false]].
+	^true
+!
+
 sameContentsAs:aCollection whenComparedWith:compareBlock
     "return true if the receiver and aCollection represent collections
      with the same contents, using compareSelector to compare elements.
@@ -5852,6 +5874,7 @@
     "Created: 14.2.1997 / 16:13:03 / cg"
 ! !
 
+
 !SequenceableCollection methodsFor:'searching'!
 
 detect:aBlock startingAt:startIndex
@@ -7602,6 +7625,20 @@
     "Modified: 21.8.1997 / 18:32:11 / cg"
 !
 
+sortByApplying:aBlock
+    "Sort my contents inplace based on the value of what aBlock returns for each element.
+     Similar to, but even more flexible than sortBySelector."
+
+    ^ self sort:[:a :b | (aBlock value:a) < (aBlock value:b)]
+
+    "
+     replace all uses of sort as in:
+        ... sort:[:a :b | a foo < b foo]
+     by:
+        ... sortByApplying:[:each | each foo]
+    "
+!
+
 sortBySelector:aSelector
     "Sort my contents inplace based on the value of what aSelector returns when sent to my
      elements. Sorting by a selector is so common, that its worth a separate utility"
@@ -7705,6 +7742,7 @@
     "Modified: 21.8.1997 / 18:30:49 / cg"
 ! !
 
+
 !SequenceableCollection methodsFor:'testing'!
 
 includesKey:anIndex
@@ -7732,14 +7770,15 @@
 !SequenceableCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Id: SequenceableCollection.st 10480 2009-12-02 21:30:55Z vranyj1 $'
+    ^ '$Id: SequenceableCollection.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.289 2009/10/28 15:40:54 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.290 2010/01/20 09:55:32 cg Exp §'
 ! !
 
 SequenceableCollection initialize!
 
 
 
+
--- a/Smalltalk.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/Smalltalk.st	Mon Feb 01 10:03:06 2010 +0000
@@ -2454,7 +2454,7 @@
     packageDirOrStringOrNil notNil ifTrue:[
         packageDir := packageDirOrStringOrNil asFilename.
     ].
-    silent := SilentLoading or:[ StandAlone ].
+    silent := SilentLoading | StandAlone.
 
     "For now: have to read the project definition first!!
      The class library may contain subclasses of classes in prerequisite packages -
@@ -2495,7 +2495,8 @@
     "/ no project-definition class.
     
     "Is there a shared library (.dll or .so) ?"
-    shLibName := aPackageId asPackageId libraryName , ObjectFileLoader sharedLibraryExtension.
+    shLibName := aPackageId asPackageId libraryName asFilename 
+                        withSuffix:ObjectFileLoader sharedLibraryExtension.
 
     binaryClassLibraryFilename := Filename currentDirectory / shLibName.
     binaryClassLibraryFilename exists ifFalse:[
@@ -2511,8 +2512,7 @@
         ]
     ].
     binaryClassLibraryFilename exists ifTrue:[
-        (ObjectFileLoader::SuperClassMissingErrorNotification
-        , ObjectFileLoader::RegistrationFailedErrorNotification) handle:[:ex |
+        ObjectFileLoader::ObjectFileLoadErrorNotification handle:[:ex |
             loadErrorOccurred := true.
             ex proceedWith:true.
         ] do:[
@@ -5632,7 +5632,7 @@
     baseName := aClassLibraryName asFilename withSuffix:(ObjectFileLoader sharedLibrarySuffix).
     baseName exists ifTrue:[
         "/ load local file first...
-        handle := (ObjectFileLoader loadObjectFile:baseName).
+        handle := ObjectFileLoader loadObjectFile:baseName.
         handle notNil ifTrue:[^ true].
     ].
 
@@ -7479,14 +7479,15 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Smalltalk.st 10494 2010-01-16 11:26:37Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ 'Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.920 2010/01/12 14:16:00 cg Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.921 2010/01/18 13:46:56 stefan Exp §'
 !
 
 version_SVN
-    ^ '$Id: Smalltalk.st 10494 2010-01-16 11:26:37Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 ! !
 
+
--- a/Win32OperatingSystem.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/Win32OperatingSystem.st	Mon Feb 01 10:03:06 2010 +0000
@@ -4764,13 +4764,13 @@
 
 getDriveType:aPathName
     "returns:
-	0 -> Unknown
-	1 -> Invalid
-	2 -> removable
-	3 -> fixed
-	4 -> remote
-	5 -> cdrom
-	6 -> ramdisk.
+        0 -> Unknown
+        1 -> Invalid
+        2 -> removable
+        3 -> fixed
+        4 -> remote
+        5 -> cdrom
+        6 -> ramdisk.
     This is a stupid interface - do not use."
 
 %{
@@ -4778,20 +4778,20 @@
 
     if (__isStringLike(aPathName)) {
 #ifdef DO_WRAP_CALLS
-	char _aPathName[MAXPATHLEN];
-
-	strncpy(_aPathName, __stringVal(aPathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
-	do {
-	    __threadErrno = 0;
-	    ret = STX_API_CALL1( "GetDriveType", GetDriveType, _aPathName);
-	} while ((ret < 0) && (__threadErrno == EINTR));
-#else
-	ret = GetFileAttributes((char *) __stringVal(aPathName));
-	if (ret < 0) {
-	    __threadErrno = __WIN32_ERR(GetLastError());
-	}
-#endif
-	RETURN (__MKSMALLINT(ret));
+        char _aPathName[MAXPATHLEN];
+
+        strncpy(_aPathName, __stringVal(aPathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
+        do {
+            __threadErrno = 0;
+            ret = STX_API_CALL1( "GetDriveType", GetDriveType, _aPathName);
+        } while ((ret < 0) && (__threadErrno == EINTR));
+#else
+        ret = GetDriveType((char *) __stringVal(aPathName));
+        if (ret < 0) {
+            __threadErrno = __WIN32_ERR(GetLastError());
+        }
+#endif
+        RETURN (__MKSMALLINT(ret));
     }
 %}.
     ^ self primitiveFailed
@@ -5610,52 +5610,52 @@
 
     if (__isStringLike(aPathName)) {
 #ifdef DO_WRAP_CALLS
-	char _aPathName[MAXPATHLEN];
-
-	strncpy(_aPathName, __stringVal(aPathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
-	do {
-	    __threadErrno = 0;
-	    ret = STX_API_CALL1( "GetFileAttributes", GetFileAttributes, _aPathName);
-	} while ((ret < 0) && (__threadErrno == EINTR));
-#else
-	ret = GetFileAttributes((char *) __stringVal(aPathName));
-	if (ret < 0) {
-	    __threadErrno = __WIN32_ERR(GetLastError());
-	}
-#endif
-	if (ret >= 0) {
-	    RETURN ( __mkSmallInteger(ret) );
-	}
-	__threadErrno = __WIN32_ERR(GetLastError());
-	RETURN (nil);
+        char _aPathName[MAXPATHLEN];
+
+        strncpy(_aPathName, __stringVal(aPathName), MAXPATHLEN-1); _aPathName[MAXPATHLEN-1] = '\0';
+        do {
+            __threadErrno = 0;
+            ret = STX_API_CALL1( "GetFileAttributesA", GetFileAttributesA, _aPathName);
+        } while ((ret < 0) && (__threadErrno == EINTR));
+#else
+        ret = GetFileAttributesA((char *) __stringVal(aPathName));
+        if (ret < 0) {
+            __threadErrno = __WIN32_ERR(GetLastError());
+        }
+#endif
+        if (ret >= 0) {
+            RETURN ( __mkSmallInteger(ret) );
+        }
+        __threadErrno = __WIN32_ERR(GetLastError());
+        RETURN (nil);
     }
 
     if (__isUnicode16String(aPathName)) {
-	wchar_t _wPathName[MAXPATHLEN+1];
-	int i, l;
-
-	l = __unicode16StringSize(aPathName);
-	if (l > MAXPATHLEN) l = MAXPATHLEN;
-	for (i=0; i<l; i++) {
-	    _wPathName[i] = __unicode16StringVal(aPathName)[i];
-	}
-	_wPathName[i] = 0;
+        wchar_t _wPathName[MAXPATHLEN+1];
+        int i, l;
+
+        l = __unicode16StringSize(aPathName);
+        if (l > MAXPATHLEN) l = MAXPATHLEN;
+        for (i=0; i<l; i++) {
+            _wPathName[i] = __unicode16StringVal(aPathName)[i];
+        }
+        _wPathName[i] = 0;
 #ifdef DO_WRAP_CALLS
-	do {
-	    __threadErrno = 0;
-	    ret = STX_API_CALL1( "GetFileAttributesW", GetFileAttributesW, _wPathName);
-	} while ((ret < 0) && (__threadErrno == EINTR));
-#else
-	ret = GetFileAttributesW(_wPathName);
-	if (ret < 0) {
-	    __threadErrno = __WIN32_ERR(GetLastError());
-	}
-#endif
-	if (ret >= 0) {
-	    RETURN ( __mkSmallInteger(ret) );
-	}
-	__threadErrno = __WIN32_ERR(GetLastError());
-	RETURN (nil);
+        do {
+            __threadErrno = 0;
+            ret = STX_API_CALL1( "GetFileAttributesW", GetFileAttributesW, _wPathName);
+        } while ((ret < 0) && (__threadErrno == EINTR));
+#else
+        ret = GetFileAttributesW(_wPathName);
+        if (ret < 0) {
+            __threadErrno = __WIN32_ERR(GetLastError());
+        }
+#endif
+        if (ret >= 0) {
+            RETURN ( __mkSmallInteger(ret) );
+        }
+        __threadErrno = __WIN32_ERR(GetLastError());
+        RETURN (nil);
     }
 %}.
     ^ self primitiveFailed
@@ -7647,16 +7647,17 @@
 !
 
 getNumberOfProcessors
+    "answer the number of physical processors in the system"
 
     %{
-	SYSTEM_INFO sInfo;
-	GetSystemInfo(&sInfo);
-
-	return __mkSmallInteger(sInfo.dwNumberOfProcessors);
+        SYSTEM_INFO sInfo;
+        GetSystemInfo(&sInfo);
+
+        return __mkSmallInteger(sInfo.dwNumberOfProcessors);
     %}.
 
     "
-	self getNumberOfProcessors
+        self getNumberOfProcessors
     "
 !
 
@@ -16416,11 +16417,11 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Win32OperatingSystem.st 10494 2010-01-16 11:26:37Z vranyj1 $'
+    ^ '$Id: Win32OperatingSystem.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.385 2010/01/15 10:06:08 stefan Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.387 2010/01/25 17:36:31 cg Exp §'
 ! !
 
 Win32OperatingSystem initialize!
@@ -16431,3 +16432,4 @@
 
 
 
+
--- a/stx_libbasic.st	Sat Jan 16 11:26:37 2010 +0000
+++ b/stx_libbasic.st	Mon Feb 01 10:03:06 2010 +0000
@@ -508,13 +508,13 @@
     "Return a SVN revision number of myself.
      This number is updated after a commit"
 
-    ^ "$SVN-Revision:"'10492M'"$"
+    ^ "$SVN-Revision:"'10495M'"$"
 ! !
 
 !stx_libbasic class methodsFor:'documentation'!
 
 version
-    ^ '$Id: stx_libbasic.st 10494 2010-01-16 11:26:37Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10496 2010-02-01 10:03:06Z vranyj1 $'
 !
 
 version_CVS