Merge jv
authorMerge Script
Sun, 03 Apr 2016 07:04:52 +0200
branchjv
changeset 19533 1c9224a6ec00
parent 19529 a7d95a598348 (current diff)
parent 19532 e7cbf86b25d5 (diff)
child 19559 d35a89d5c0ec
Merge
ClassBuilder.st
OSErrorHolder.st
Win32OperatingSystem.st
--- a/ClassBuilder.st	Sat Apr 02 11:05:12 2016 +0100
+++ b/ClassBuilder.st	Sun Apr 03 07:04:52 2016 +0200
@@ -2140,9 +2140,8 @@
 
         ClassBuildWarning new
             className:className;
-            messageText:('%1: name "%2"\should start with an uppercase letter (by convention only)'withCRs
-                            bindWith:className 
-                            with:(names at:idx) allBold);
+            messageText:('Class Name "%1"\should start with an uppercase letter (by convention only)'withCRs
+                            bindWith:className allBold);
             raiseRequest.
 "/        (self confirm:('%1 name "%2" should start with an uppercase letter\(by convention only)\\install anyway ?'
 "/                         bindWith:what with:className) withCRs)
--- a/OSErrorHolder.st	Sat Apr 02 11:05:12 2016 +0100
+++ b/OSErrorHolder.st	Sun Apr 03 07:04:52 2016 +0200
@@ -66,13 +66,6 @@
 
 !OSErrorHolder class methodsFor:'Signal constants'!
 
-signals
-    Signals isNil ifTrue:[
-	self initializeSignals
-    ].
-    ^ Signals
-!
-
 allocRetrySignal
     ^ self signals at:#allocRetrySignal
 !
@@ -181,6 +174,13 @@
     ^ self signals at:signalName
 !
 
+signals
+    Signals isNil ifTrue:[
+	self initializeSignals
+    ].
+    ^ Signals
+!
+
 transferFaultSignal
     ^ self signals at:#transferFaultSignal
 !
@@ -406,6 +406,21 @@
 	in:(thisContext "sender").
 
 "/    ^ self errorReporter reportOn:self
+!
+
+reportProceedableError
+    "Report an error."
+    "Delegate to the receiver's error reporter."
+
+    |signal|
+
+    signal := self class signalNamed:errorCategory.
+    signal
+        raiseRequestWith:self
+        errorString:(parameter isNil ifTrue:[nil] ifFalse:[' - ', parameter printString])
+        in:(thisContext "sender").
+
+"/    ^ self errorReporter reportOn:self
 ! !
 
 !OSErrorHolder methodsFor:'others'!
@@ -437,11 +452,11 @@
 !OSErrorHolder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OSErrorHolder.st,v 1.24 2015-05-16 09:59:00 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/OSErrorHolder.st,v 1.24 2015-05-16 09:59:00 cg Exp $'
+    ^ '$Header$'
 ! !
 
 
--- a/Win32OperatingSystem.st	Sat Apr 02 11:05:12 2016 +0100
+++ b/Win32OperatingSystem.st	Sun Apr 03 07:04:52 2016 +0200
@@ -15627,9 +15627,9 @@
      If no such key exists and createIfAbsent is true, the key is created.
      Otherwise, nil is returned.
      flags may be one of:
-	#KEY_WOW64_64KEY to force access to the 64Bit Windows key,
-	#KEY_WOW64_32KEY to force access to the 32Bit Windows key,
-	or nil, to access the key (32/64) for the current application"
+        #KEY_WOW64_64KEY to force access to the 64Bit Windows key,
+        #KEY_WOW64_32KEY to force access to the 32Bit Windows key,
+        or nil, to access the key (32/64) for the current application"
 
     |subKeyStringZ newEntry subHandle errorNumber disposition|
 
@@ -15648,60 +15648,60 @@
     int _disposition = 0;
 
     if (flags != nil) {
-	if (flags == @symbol(KEY_WOW64_64KEY)) {
-	    _flags = KEY_WOW64_64KEY;
-	} else if (flags == @symbol(KEY_WOW64_32KEY)) {
-	    _flags = KEY_WOW64_32KEY;
-	} else {
-	    errorNumber = @symbol(badArgument2);
-	    goto out;
-	}
+        if (flags == @symbol(KEY_WOW64_64KEY)) {
+            _flags = KEY_WOW64_64KEY;
+        } else if (flags == @symbol(KEY_WOW64_32KEY)) {
+            _flags = KEY_WOW64_32KEY;
+        } else {
+            errorNumber = @symbol(badArgument2);
+            goto out;
+        }
     }
 
     if (__isExternalAddressLike(__INST(handle))
-	&& __isUnicode16String(subKeyStringZ)) {
-	myKey = (HKEY)__externalAddressVal(__INST(handle));
-	if (createIfAbsent == true) {
-	    _retVal = RegCreateKeyExW(myKey,
-			__unicode16StringVal(subKeyStringZ),
-			0,      // reserved
-			NULL,   // class
-			0,      // options
-			KEY_ALL_ACCESS|_flags,   // rights
-			NULL,   // securityAttributes - handle cannot be inherited
-			&subKey,
-			&_disposition);  // disposition (created vs. opened)
-	    disposition = _disposition == REG_CREATED_NEW_KEY ? true : false;
-	} else {
-	    _retVal = RegOpenKeyExW(myKey,
-			__unicode16StringVal(subKeyStringZ),
-			0,
-			KEY_ALL_ACCESS|_flags,
-			&subKey);
-	    disposition = false;
-	}
-	if (_retVal == ERROR_SUCCESS) {
-	    subHandle = __MKEXTERNALADDRESS(subKey);
-	} else {
-	    if ((_retVal != ERROR_PATH_NOT_FOUND)
-	     && (_retVal != ERROR_FILE_NOT_FOUND)) {
-		errorNumber = __MKSMALLINT(_retVal);
-	    }
-	}
+        && __isUnicode16String(subKeyStringZ)) {
+        myKey = (HKEY)__externalAddressVal(__INST(handle));
+        if (createIfAbsent == true) {
+            _retVal = RegCreateKeyExW(myKey,
+                        __unicode16StringVal(subKeyStringZ),
+                        0,      // reserved
+                        NULL,   // class
+                        0,      // options
+                        KEY_ALL_ACCESS|_flags,   // rights
+                        NULL,   // securityAttributes - handle cannot be inherited
+                        &subKey,
+                        &_disposition);  // disposition (created vs. opened)
+            disposition = _disposition == REG_CREATED_NEW_KEY ? true : false;
+        } else {
+            _retVal = RegOpenKeyExW(myKey,
+                        __unicode16StringVal(subKeyStringZ),
+                        0,
+                        KEY_ALL_ACCESS|_flags,
+                        &subKey);
+            disposition = false;
+        }
+        if (_retVal == ERROR_SUCCESS) {
+            subHandle = __MKEXTERNALADDRESS(subKey);
+        } else {
+            if ((_retVal != ERROR_PATH_NOT_FOUND)
+             && (_retVal != ERROR_FILE_NOT_FOUND)) {
+                errorNumber = __MKSMALLINT(_retVal);
+            }
+        }
     }
 out:;
 %}.
     subHandle notNil ifTrue:[
-	newEntry := self class basicNew
-			setHandle:subHandle
-			path:((path ? '?') , self class separator asString , subKeyString)
-			isNew:disposition.
-
-	newEntry registerForFinalization.
-	^ newEntry.
+        newEntry := self class basicNew
+                        setHandle:subHandle
+                        path:((path ? '?') , self class separator asString , subKeyString)
+                        isNew:disposition.
+
+        newEntry registerForFinalization.
+        ^ newEntry.
     ].
     errorNumber notNil ifTrue:[
-	(OperatingSystem errorHolderForNumber:errorNumber) reportError.
+        (OperatingSystem errorHolderForNumber:errorNumber) reportProceedableError.
     ].
     ^ nil
 
@@ -16228,13 +16228,13 @@
 
     idx := 0.
     [true] whileTrue:[
-	subEntry := self subKeyAtIndex:idx.
-	subEntry isNil ifTrue:[
-	    ^self
-	].
-	aBlock value:subEntry.
-	subEntry close.
-	idx := idx + 1.
+        subEntry := self subKeyAtIndex:idx.
+        subEntry isNil ifTrue:[
+            ^self
+        ].
+        aBlock value:subEntry.
+        subEntry close.
+        idx := idx + 1.
     ]
 
     "
@@ -16242,7 +16242,19 @@
 
      top := self key:'HKEY_LOCAL_MACHINE'.
      top subKeysDo:[:subEntry |
-	Transcript showCR:subEntry path
+        Transcript showCR:subEntry path
+     ]
+    "
+    "
+     |top sub|
+
+     top := self key:'HKEY_LOCAL_MACHINE'.
+     OSErrorHolder noPermissionsSignal handle:[:ex |
+        ex proceed
+     ] do:[
+         top subKeysDo:[:subEntry |
+            Transcript showCR:subEntry path
+         ]
      ]
     "
 !