Merge jv
authorHG Automerge
Fri, 13 Jan 2017 23:33:10 +0000
branchjv
changeset 21285 7770135c2b54
parent 21252 1b7c2d5523d5 (current diff)
parent 21241 71f5ce80b2ce (diff)
child 21286 4be14939730c
Merge
ExternalStream.st
FileStream.st
NonPositionableExternalStream.st
ProcessorScheduler.st
Project.st
ProjectDefinition.st
UserPreferences.st
Win32OperatingSystem.st
--- a/ExternalStream.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/ExternalStream.st	Fri Jan 13 23:33:10 2017 +0000
@@ -2126,14 +2126,15 @@
     OBJ _handle  = __INST(handle);
 
     if (_handle != nil) {
-	if (__INST(handleType) == @symbol(socketHandle)) {
-	    RETURN (_handle);
-	} else if ((__INST(handleType) == nil)
-		     || (__INST(handleType) == @symbol(filePointer))
-		     || (__INST(handleType) == @symbol(socketFilePointer))
-		     || (__INST(handleType) == @symbol(pipeFilePointer))) {
-	    RETURN ( __MKINT(fileno(__FILEVal(_handle))));
-	}
+        if ((__INST(handleType) == @symbol(fileHandle))
+         || (__INST(handleType) == @symbol(socketHandle))) {
+            RETURN (_handle);
+        } else if ((__INST(handleType) == nil)
+                     || (__INST(handleType) == @symbol(filePointer))
+                     || (__INST(handleType) == @symbol(socketFilePointer))
+                     || (__INST(handleType) == @symbol(pipeFilePointer))) {
+            RETURN ( __MKINT(fileno(__FILEVal(_handle))));
+        }
     }
 %}.
     handle isNil ifTrue:[^ self errorNotOpen].
@@ -5627,18 +5628,18 @@
      We know, that error conditions do not block, so return true for errors."
 
     ^ readAhead notNil
-	or:[handle isNil
-	or:[mode == #writeonly
-	or:[OperatingSystem readCheck:self fileDescriptor]]]
+        or:[handle isNil
+        or:[mode == #writeonly
+        or:[OperatingSystem readCheck:self fileHandle]]]
 
     "
      |pipe|
 
      pipe := PipeStream readingFrom:'(sleep 10; echo hello)'.
      pipe canReadWithoutBlocking ifTrue:[
-	 Transcript showCR:'data available'
+         Transcript showCR:'data available'
      ] ifFalse:[
-	 Transcript showCR:'no data available'
+         Transcript showCR:'no data available'
      ].
      pipe close
     "
@@ -5652,8 +5653,8 @@
      We know, that error conditions do not block, so return true for errors."
 
     ^ handle isNil
-	or:[mode == #readonly
-	or:[OperatingSystem writeCheck:self fileDescriptor]]
+        or:[mode == #readonly
+        or:[OperatingSystem writeCheck:self fileHandle]]
 !
 
 gotErrorOrEOF
@@ -5720,7 +5721,7 @@
     mode == #writeonly ifTrue:[
         ^ self errorWriteOnly
     ].
-    available := OperatingSystem numAvailableForReadOn:self fileDescriptor.
+    available := OperatingSystem numAvailableForReadOn:self fileHandle.
     readAhead notNil ifTrue:[
         available := available + 1
     ].
@@ -5745,7 +5746,7 @@
     handle isNil ifTrue:[^ self errorNotOpen].
     mode == #writeonly ifTrue:[^ self errorWriteOnly].
 
-    fd := self fileDescriptor.
+    fd := self fileHandle.
     (OperatingSystem readCheck:fd) ifTrue:[^ false].
 
     "cannot do a readWait (which means possible suspend),
@@ -5791,7 +5792,7 @@
         ^ self errorNotOpen
     ].
 
-    fd := self fileDescriptor.
+    fd := self fileHandle.
     (OperatingSystem readWriteCheck:fd) ifTrue:[^ false].
 
     wasBlocked := OperatingSystem blockInterrupts.
@@ -5829,7 +5830,7 @@
         ^ self errorNotOpen
     ].
 
-    fd := self fileDescriptor.
+    fd := self fileHandle.
     (OperatingSystem writeExceptionCheck:fd) ifTrue:[^ false].
 
     wasBlocked := OperatingSystem blockInterrupts.
@@ -5870,7 +5871,7 @@
         ^ self errorReadOnly
     ].
 
-    fd := self fileDescriptor.
+    fd := self fileHandle.
     (OperatingSystem writeCheck:fd) ifTrue:[^ false].
 
     wasBlocked := OperatingSystem blockInterrupts.
--- a/FileStream.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/FileStream.st	Fri Jan 13 23:33:10 2017 +0000
@@ -754,19 +754,21 @@
      which is normally retrieved by Filename>>#accessRights
      or FileStreamm>>#accessRights."
 
-    (OperatingSystem changeAccessModeOfFd:self fileDescriptor to:opaqueData) ifFalse:[
-	^ self fileName accessDeniedError:self
+    (OperatingSystem changeAccessModeOfFd:self fileHandle to:opaqueData) ifFalse:[
+        OperatingSystem accessDeniedErrorSignal
+            raiseRequestWith:self
+            errorString:(' - cannot change access rights: ' , self pathName).
     ].
 
     "
       'Make.proto' asFilename readingFileDo:[:s|
-	  s accessRights:s accessRights
+          s accessRights:s accessRights
       ]
     "
 
     "
       '/' asFilename readingFileDo:[:s|
-	  s accessRights:s accessRights
+          s accessRights:s accessRights
       ]
     "
 ! !
@@ -895,19 +897,19 @@
      Therefore, this method is reimplemented here (from ExternalStream)"
 
     outStream isExternalStream ifTrue:[
-	pos := self position.
-	n := self size - pos.
-	nWritten := OperatingSystem
-			copyFromFd:self fileDescriptor
-			toFd:outStream fileDescriptor
-			startIndex:pos
-			count:n.
-	nWritten > 0 ifTrue:[
-	    self position:pos+nWritten.
-	].
-	nWritten = n ifTrue:[
-	    ^ self
-	].
+        pos := self position.
+        n := self size - pos.
+        nWritten := OperatingSystem
+                        copyFromFd:self fileHandle
+                        toFd:outStream fileHandle
+                        startIndex:pos
+                        count:n.
+        nWritten > 0 ifTrue:[
+            self position:pos+nWritten.
+        ].
+        nWritten = n ifTrue:[
+            ^ self
+        ].
     ].
     ^ super copyToEndInto:outStream bufferSize:bufferSize.
 
--- a/NonPositionableExternalStream.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/NonPositionableExternalStream.st	Fri Jan 13 23:33:10 2017 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -501,7 +499,7 @@
 
     handle notNil ifTrue:[
         "make sure, that no select is performed on closed file descriptors"
-        semasToSignal := Processor disableFd:self fileDescriptor doSignal:false.
+        semasToSignal := Processor disableFd:self fileHandle doSignal:false.
         super closeFile.
 
         "tell the waiters that they must not wait any longer"
--- a/ProcessorScheduler.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/ProcessorScheduler.st	Fri Jan 13 23:33:10 2017 +0000
@@ -2722,11 +2722,11 @@
      otherwise, it will be polled every few milliseconds (MSDOS)."
 
     aStream canBeSelected ifTrue:[
-	"/ can this stream be selected on ?
-	self signal:aSemaphore onInput:aStream fileDescriptor orCheck:nil
+        "/ can this stream be selected on ?
+        self signal:aSemaphore onInput:aStream fileHandle orCheck:nil
     ] ifFalse:[
-	"/ nope - must poll ...
-	self signal:aSemaphore onInput:nil orCheck:[aStream canReadWithoutBlocking]
+        "/ nope - must poll ...
+        self signal:aSemaphore onInput:nil orCheck:[aStream canReadWithoutBlocking]
     ]
 
     "Modified: / 14.12.1999 / 23:58:50 / cg"
@@ -2823,11 +2823,11 @@
      otherwise, it will be polled every few milliseconds (MSDOS)."
 
     aStream canBeSelected ifTrue:[
-	"/ can this stream be selected on ?
-	self signal:aSemaphore onOutput:aStream fileDescriptor orCheck:nil
+        "/ can this stream be selected on ?
+        self signal:aSemaphore onOutput:aStream fileHandle orCheck:nil
     ] ifFalse:[
-	"/ nope - must poll ...
-	self signal:aSemaphore onOutput:nil orCheck:[aStream canWriteWithoutBlocking]
+        "/ nope - must poll ...
+        self signal:aSemaphore onOutput:nil orCheck:[aStream canWriteWithoutBlocking]
     ]
 
     "Modified: / 14.12.1999 / 23:59:19 / cg"
--- a/Project.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/Project.st	Fri Jan 13 23:33:10 2017 +0000
@@ -737,8 +737,7 @@
 !
 
 removeFromSystem
-    "remove the project and all of its classes & patches from the
-     system"
+    "remove the project and all of its classes & patches from the system"
 
     self removeClassesFromSystem.
     AllProjects remove:self ifAbsent:nil.
--- a/ProjectDefinition.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/ProjectDefinition.st	Fri Jan 13 23:33:10 2017 +0000
@@ -4754,7 +4754,7 @@
             s nextPutLine:eachCategory,'_OBJS= \'.
             classNames do:putLineForClassName.
             (eachCategory = 'COMMON' and:[self hasExtensionMethods]) ifTrue:[
-                s nextPutLine:'    $(OUTDIR_SLASH)extensions.$(O) \'.
+                s nextPutLine:'    $(OUTDIR)extensions.$(O) \'.
             ].
 
             s cr.
@@ -5335,7 +5335,7 @@
 
 objectLine_make_dot_spec
 
-    ^'    $(OUTDIR_SLASH)%(CLASSFILE).$(O) \'
+    ^'    $(OUTDIR)%(CLASSFILE).$(O) \'
 
     "Created: / 08-08-2006 / 20:16:46 / fm"
     "Modified: / 23-08-2006 / 11:11:38 / cg"
--- a/UserPreferences.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/UserPreferences.st	Fri Jan 13 23:33:10 2017 +0000
@@ -4069,6 +4069,29 @@
     self 
         at: #'history-manager.allow-edit-of-history'
         put:aBoolean
+!
+
+historyManagerEnabled
+    "automatically add history line comments to accepted methods"
+
+    ^self 
+        at: #'history-manager.enabled'
+        ifAbsent: true 
+!
+
+historyManagerEnabled:aBoolean
+    "automatically add history line comments to accepted methods"
+
+    ^self 
+        at: #'history-manager.enabled'
+        put: aBoolean 
+
+
+    "
+     UserPreferences current historyManagerEnabled
+     UserPreferences current historyManagerEnabled:true
+     UserPreferences current historyManagerEnabled:false
+    "
 ! !
 
 !UserPreferences methodsFor:'accessing-prefs-code'!
--- a/Win32OperatingSystem.st	Thu Jan 12 09:42:50 2017 +0000
+++ b/Win32OperatingSystem.st	Fri Jan 13 23:33:10 2017 +0000
@@ -11986,6 +11986,10 @@
     ^ OSProcessStatus pid:pid status:status code:code core:core
 !
 
+isBlockingOn:fd
+    ^ true
+!
+
 numAvailableForReadOn:fd
     "return the number of bytes available for reading, without blocking."