AbstractOperatingSystem.st
branchjv
changeset 21387 e3865533e6a6
parent 21292 21faad473411
parent 21328 4876615e4e0e
child 21783 3cd0c0e8284f
--- a/AbstractOperatingSystem.st	Sun Jan 29 11:04:01 2017 +0000
+++ b/AbstractOperatingSystem.st	Wed Feb 01 11:28:48 2017 +0000
@@ -191,24 +191,24 @@
      global 'OperatingSystem'.
      Programs should never refer to any of my concrete classes directly, as
      they may not (will not) be present when ST/X is executed under anther OS."
-     
+
     |osType|
 
     osType := self getSystemType.
     osType = 'win32' ifTrue:[
-        ^ Win32OperatingSystem
+	^ Win32OperatingSystem
     ].
     osType = 'osx' ifTrue:[
-        ^ OSXOperatingSystem
+	^ OSXOperatingSystem
     ].
     osType = 'os2' ifTrue:[
-        ^ OS2OperatingSystem
+	^ OS2OperatingSystem
     ].
     osType = 'macos' ifTrue:[
-        ^ MacOperatingSystem
+	^ MacOperatingSystem
     ].
     ((osType = 'VMS') or:[osType = 'openVMS']) ifTrue:[
-        ^ OpenVMSOperatingSystem
+	^ OpenVMSOperatingSystem
     ].
     ^ UnixOperatingSystem
 !
@@ -623,22 +623,22 @@
     "open a windows-shell/mac finder/desktop application to present the document contained in aFilenameOrString.
      This is typically used to present help-files, html documents, pdf documents etc.
      operationSymbol is one of:
-        open
-        edit
-        explore
+	open
+	edit
+	explore
      mimeTypeStringArgOrNil is e.g. 'text/html' or: 'application/pdf'.
      If nil is passed in, the file's suffix is used to guess the mime type.
     "
 
     self
-        openApplicationForDocument:aFilenameOrString
-        operation:operationSymbol
-        mimeType:mimeTypeStringArgOrNil
-        inDirectory:nil
-        ifNone:[
-            "/ last resort: use a fileBrowser
-            UserPreferences fileBrowserClass openOn:aFilenameOrString
-        ].
+	openApplicationForDocument:aFilenameOrString
+	operation:operationSymbol
+	mimeType:mimeTypeStringArgOrNil
+	inDirectory:nil
+	ifNone:[
+	    "/ last resort: use a fileBrowser
+	    UserPreferences fileBrowserClass openOn:aFilenameOrString
+	].
 
     "
      self openApplicationForDocument: Filename currentDirectory operation:#open
@@ -656,26 +656,26 @@
     "open a windows-shell/mac finder/desktop application to present the document contained in aFilenameOrString.
      This is typically used to present help-files, html documents, pdf documents etc.
      operationSymbol is one of:
-        open
-        edit
-        explore
+	open
+	edit
+	explore
      mimeTypeStringArgOrNil is e.g. 'text/html' or: 'application/pdf';
      if nil is passed in, the file's suffix is used to guess it.
     "
 
-    ^ self 
-        openApplicationForDocument:aFilenameOrString operation:operationSymbol mimeType:mimeTypeStringArgOrNil 
-        inDirectory:nil ifNone:exceptionBlock
-!
-
-openApplicationForDocument:aFilenameOrString operation:operationSymbol mimeType:mimeTypeStringArgOrNil 
+    ^ self
+	openApplicationForDocument:aFilenameOrString operation:operationSymbol mimeType:mimeTypeStringArgOrNil
+	inDirectory:nil ifNone:exceptionBlock
+!
+
+openApplicationForDocument:aFilenameOrString operation:operationSymbol mimeType:mimeTypeStringArgOrNil
     inDirectory:directoryStringOrFilenameOrNil
     "open a windows-shell/mac finder/desktop application to present the document contained in aFilenameOrString.
      This is typically used to present help-files, html documents, pdf documents etc.
      operationSymbol is one of:
-        open
-        edit
-        explore
+	open
+	edit
+	explore
      mimeTypeStringArgOrNil is e.g. 'text/html' or: 'application/pdf';
      if nil is passed in, the file's suffix is used to guess it.
     "
@@ -685,28 +685,28 @@
     mimeTypeString := mimeTypeStringArgOrNil.
 
     MIMETypes notNil ifTrue:[
-        mimeTypeString isNil ifTrue:[
-            mimeTypeString := MIMETypes mimeTypeForFilename:aFilenameOrString.
-        ].
-        mimeTypeString notNil ifTrue:[
-            openCommand := MIMETypes defaultCommandTemplateToOpenMimeType:mimeTypeString.
-        ].
-    ].                                                                                         
+	mimeTypeString isNil ifTrue:[
+	    mimeTypeString := MIMETypes mimeTypeForFilename:aFilenameOrString.
+	].
+	mimeTypeString notNil ifTrue:[
+	    openCommand := MIMETypes defaultCommandTemplateToOpenMimeType:mimeTypeString.
+	].
+    ].
     openCommand notEmptyOrNil ifTrue:[
-        (openCommand includesSubString:'%1') ifTrue:[
-            openCommand := openCommand bindWith:aFilenameOrString asString.
-        ] ifFalse:[
-            openCommand := openCommand, ' "', aFilenameOrString asString, '"'.
-        ].
-
-        (self
-                startProcess:openCommand
-                inputFrom:nil outputTo:nil
-                errorTo:nil auxFrom:nil
-                environment:nil inDirectory:directoryStringOrFilenameOrNil) notNil
-        ifTrue:[
-            ^ self.
-        ].
+	(openCommand includesSubString:'%1') ifTrue:[
+	    openCommand := openCommand bindWith:aFilenameOrString asString.
+	] ifFalse:[
+	    openCommand := openCommand, ' "', aFilenameOrString asString, '"'.
+	].
+
+	(self
+		startProcess:openCommand
+		inputFrom:nil outputTo:nil
+		errorTo:nil auxFrom:nil
+		environment:nil inDirectory:directoryStringOrFilenameOrNil) notNil
+	ifTrue:[
+	    ^ self.
+	].
     ].
     ExecutionError raiseErrorString:'execution of command failed: ', openCommand.
 
@@ -721,25 +721,25 @@
     "Modified: / 05-02-2011 / 16:13:42 / cg"
 !
 
-openApplicationForDocument:aFilenameOrString operation:operationSymbol mimeType:mimeTypeStringArgOrNil 
+openApplicationForDocument:aFilenameOrString operation:operationSymbol mimeType:mimeTypeStringArgOrNil
     inDirectory:directoryStringOrFilenameOrNil ifNone:exceptionBlock
     "open a windows-shell/mac finder/desktop application to present the document contained in aFilenameOrString.
      This is typically used to present help-files, html documents, pdf documents etc.
      operationSymbol is one of:
-        open
-        edit
-        explore
+	open
+	edit
+	explore
      mimeTypeStringArgOrNil is e.g. 'text/html' or: 'application/pdf';
      if nil is passed in, the file's suffix is used to guess it.
     "
 
     [
-        ^ self 
-            openApplicationForDocument:aFilenameOrString 
-            operation:operationSymbol mimeType:mimeTypeStringArgOrNil 
-            inDirectory:directoryStringOrFilenameOrNil.
+	^ self
+	    openApplicationForDocument:aFilenameOrString
+	    operation:operationSymbol mimeType:mimeTypeStringArgOrNil
+	    inDirectory:directoryStringOrFilenameOrNil.
     ] on:ExecutionError do:[:ex|
-        exceptionBlock value.
+	exceptionBlock value.
     ].
 ! !
 
@@ -907,8 +907,8 @@
 
 !AbstractOperatingSystem class methodsFor:'executing OS commands-implementation'!
 
-exec:aCommandPath withArguments:argArray environment:env fileDescriptors:fds fork:doFork 
-                  newPgrp:newGrp inDirectory:aDirectory showWindow:showWindowBooleanOrNil
+exec:aCommandPath withArguments:argArray environment:env fileDescriptors:fds fork:doFork
+		  newPgrp:newGrp inDirectory:aDirectory showWindow:showWindowBooleanOrNil
     "execute an OS command"
 
     ^ self subclassResponsibility
@@ -955,37 +955,37 @@
     aCommandString isNil ifTrue:[^ nil].
 
     (in := anExternalInStream) isNil ifTrue:[
-        nullStream := Filename nullDevice readWriteStream.
-        in := nullStream.
+	nullStream := Filename nullDevice readWriteStream.
+	in := nullStream.
     ].
     (out := anExternalOutStream) isNil ifTrue:[
-        nullStream isNil ifTrue:[nullStream := Filename nullDevice writeStream].
-        out := nullStream.
+	nullStream isNil ifTrue:[nullStream := Filename nullDevice writeStream].
+	out := nullStream.
     ].
     (err := anExternalErrStream) isNil ifTrue:[
-        err := out
+	err := out
     ].
     anAuxiliaryStream notNil ifTrue:[
-        auxFd := anAuxiliaryStream fileHandle.
+	auxFd := anAuxiliaryStream fileHandle.
     ].
 
     shellAndArgs := self commandAndArgsForOSCommand:aCommandString.
 
     pid := self
-        exec:(shellAndArgs at:1)
-        withArguments:(shellAndArgs at:2)
-        environment:anEvironmentDictionary
-        fileDescriptors:(Array with:in fileHandle
-                               with:out fileHandle
-                               with:err fileHandle
-                               with:auxFd)
-        fork:true
-        newPgrp:newPgrp
-        inDirectory:dir
-        showWindow:(showWindowBooleanOrNil ? (shellAndArgs at:3)).
+	exec:(shellAndArgs at:1)
+	withArguments:(shellAndArgs at:2)
+	environment:anEvironmentDictionary
+	fileDescriptors:(Array with:in fileHandle
+			       with:out fileHandle
+			       with:err fileHandle
+			       with:auxFd)
+	fork:true
+	newPgrp:newPgrp
+	inDirectory:dir
+	showWindow:(showWindowBooleanOrNil ? (shellAndArgs at:3)).
 
     nullStream notNil ifTrue:[
-        nullStream close.
+	nullStream close.
     ].
 
     ^ pid
@@ -1010,7 +1010,7 @@
      The following will no longer work. monitorPid has disappeared
 
      pid notNil ifTrue:[
-         Processor monitorPid:pid action:[:osStatus | sema signal ].
+	 Processor monitorPid:pid action:[:osStatus | sema signal ].
      ].
      in close.
      out close.
@@ -1025,10 +1025,10 @@
      sema := Semaphore new.
 
      Processor
-            monitor:[
-                pid := OperatingSystem startProcess:'(sleep 2; ls -l) > out 2>err'
-            ]
-            action:[:osStatus | sema signal ].
+	    monitor:[
+		pid := OperatingSystem startProcess:'(sleep 2; ls -l) > out 2>err'
+	    ]
+	    action:[:osStatus | sema signal ].
 
      sema wait.
      Transcript showCR:'finished'
@@ -1040,10 +1040,10 @@
      sema := Semaphore new.
 
      Processor
-            monitor:[
-                pid := OperatingSystem startProcess:'(sleep 1; echo 1; sleep 9; ls -l) > out 2>err'
-            ]
-            action:[:osStatus | sema signal ].
+	    monitor:[
+		pid := OperatingSystem startProcess:'(sleep 1; echo 1; sleep 9; ls -l) > out 2>err'
+	    ]
+	    action:[:osStatus | sema signal ].
 
      Delay waitForSeconds:2.
      OperatingSystem terminateProcess:pid.
@@ -1074,7 +1074,7 @@
      The following will no longer work. monitorPid has disappeared
 
      pid notNil ifTrue:[
-         Processor monitorPid:pid action:[:OSstatus | sema signal ].
+	 Processor monitorPid:pid action:[:OSstatus | sema signal ].
      ].
      in close.
      out close.
@@ -1089,10 +1089,10 @@
      sema := Semaphore new.
 
      Processor
-            monitor:[
-                pid := OperatingSystem startProcess:'dir > out 2>err'
-            ]
-            action:[:osStatus | sema signal ].
+	    monitor:[
+		pid := OperatingSystem startProcess:'dir > out 2>err'
+	    ]
+	    action:[:osStatus | sema signal ].
 
      sema wait.
      Transcript showCR:'finished'
@@ -1104,10 +1104,10 @@
      sema := Semaphore new.
 
      Processor
-            monitor:[
-                pid := OperatingSystem startProcess:'(echo 1 & stx --eval "Delay waitForSeconds:100" & dir) >out' withCRs
-            ]
-            action:[:osStatus | sema signal ].
+	    monitor:[
+		pid := OperatingSystem startProcess:'(echo 1 & stx --eval "Delay waitForSeconds:100" & dir) >out' withCRs
+	    ]
+	    action:[:osStatus | sema signal ].
 
      Delay waitForSeconds:5.
      OperatingSystem terminateProcessGroup:pid.
@@ -1120,10 +1120,10 @@
      sema := Semaphore new.
 
      Processor
-            monitor:[
-                pid := OperatingSystem startProcess:{ 'C:\Users\cg\work\stx\projects\smalltalk\stx.com' . '--eval' . '"Delay waitForSeconds:100"' }
-            ]
-            action:[:osStatus | sema signal ].
+	    monitor:[
+		pid := OperatingSystem startProcess:{ 'C:\Users\cg\work\stx\projects\smalltalk\stx.com' . '--eval' . '"Delay waitForSeconds:100"' }
+	    ]
+	    action:[:osStatus | sema signal ].
 
      Delay waitForSeconds:5.
      OperatingSystem terminateProcess:pid.
@@ -1296,16 +1296,16 @@
      Return true if successful, false otherwise."
 
     ^ self
-        executeCommand:aCommandString
-        inputFrom:nil
-        outputTo:nil
-        errorTo:nil
-        auxFrom:nil
-        environment:nil
-        inDirectory:aDirectory
-        lineWise:false
-        showWindow:showWindow
-        onError:[:exitStatus| false]
+	executeCommand:aCommandString
+	inputFrom:nil
+	outputTo:nil
+	errorTo:nil
+	auxFrom:nil
+	environment:nil
+	inDirectory:aDirectory
+	lineWise:false
+	showWindow:showWindow
+	onError:[:exitStatus| false]
 
     "Created: / 18-10-2016 / 15:55:29 / cg"
 !
@@ -1412,36 +1412,36 @@
      avoid blocking on pipes.
 
      Special for windows:
-        you can control (have to - sigh) if a window should be shown for the command or not.
-        This is the OS's H_SHOWWINDOW argument.
-        If you pass nil as showWindow-argument, the OS's default is used for the particular
-        command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
-        executables will not.
-        However, some command-line executables show a window, even if they should not.
-        (and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
-         a shell command opens a cmd-window, whereas in windows7 it did not)
-        In this case, pass an explicit false argument to suppress it.
-        This argument is ignored on Unix systems.
-        See examples below."
-
-        |osProcess|
-
-        osProcess := OSProcess new
-            command:aCommandStringOrArray;
-            inStream:anInStream;
-            outStream:anOutStream;
-            errorStream:anErrStream;
-            auxStream:anAuxStream;
-            environment:environmentDictionary;
-            directory:dirOrNil;
-            lineWise:lineWise;
-            showWindow:showWindowBooleanOrNil.
-
-        osProcess execute ifFalse:[
-            aBlock value:osProcess exitStatus.
-            ^ false.
-        ].
-        ^ true.
+	you can control (have to - sigh) if a window should be shown for the command or not.
+	This is the OS's H_SHOWWINDOW argument.
+	If you pass nil as showWindow-argument, the OS's default is used for the particular
+	command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
+	executables will not.
+	However, some command-line executables show a window, even if they should not.
+	(and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
+	 a shell command opens a cmd-window, whereas in windows7 it did not)
+	In this case, pass an explicit false argument to suppress it.
+	This argument is ignored on Unix systems.
+	See examples below."
+
+	|osProcess|
+
+	osProcess := OSProcess new
+	    command:aCommandStringOrArray;
+	    inStream:anInStream;
+	    outStream:anOutStream;
+	    errorStream:anErrStream;
+	    auxStream:anAuxStream;
+	    environment:environmentDictionary;
+	    directory:dirOrNil;
+	    lineWise:lineWise;
+	    showWindow:showWindowBooleanOrNil.
+
+	osProcess execute ifFalse:[
+	    aBlock value:osProcess exitStatus.
+	    ^ false.
+	].
+	^ true.
 !
 
 executeCommand:aCommandStringOrArray inputFrom:anInStream outputTo:anOutStream
@@ -1468,53 +1468,53 @@
      avoid blocking on pipes"
 
     ^ self
-        executeCommand:aCommandStringOrArray inputFrom:anInStream outputTo:anOutStream
-        errorTo:anErrStream auxFrom:anAuxStream environment:environmentDictionary
-        inDirectory:dirOrNil lineWise:lineWise showWindow:false onError:aBlock
-
-    "
-        |outStream errStream|
-
-        outStream := '' writeStream.
-
-        OperatingSystem executeCommand:'ls -l'
-                        inputFrom:'abc' readStream
-                        outputTo:outStream
-                        errorTo:nil
-                        inDirectory:nil
-                        lineWise:true
-                        onError:[:exitStatus | ^ false].
-        outStream contents
-    "
-
-    "
-        |outStream errStream|
-
-        outStream := #[] writeStream.
-
-        OperatingSystem executeCommand:'cat'
-                        inputFrom:(ByteArray new:5000000) readStream
-                        outputTo:outStream
-                        errorTo:nil
-                        inDirectory:nil
-                        lineWise:false
-                        onError:[:exitStatus | ^ false].
-        outStream size
-    "
-
-    "
-        |outStream errStream|
-
-        outStream := '' writeStream.
-
-        OperatingSystem executeCommand:'gpg -s --batch --no-tty --passphrase-fd 0 /tmp/passwd'
-                        inputFrom:'bla' readStream
-                        outputTo:outStream
-                        errorTo:nil
-                        inDirectory:nil
-                        lineWise:true
-                        onError:[:exitStatus |  false].
-        outStream contents
+	executeCommand:aCommandStringOrArray inputFrom:anInStream outputTo:anOutStream
+	errorTo:anErrStream auxFrom:anAuxStream environment:environmentDictionary
+	inDirectory:dirOrNil lineWise:lineWise showWindow:false onError:aBlock
+
+    "
+	|outStream errStream|
+
+	outStream := '' writeStream.
+
+	OperatingSystem executeCommand:'ls -l'
+			inputFrom:'abc' readStream
+			outputTo:outStream
+			errorTo:nil
+			inDirectory:nil
+			lineWise:true
+			onError:[:exitStatus | ^ false].
+	outStream contents
+    "
+
+    "
+	|outStream errStream|
+
+	outStream := #[] writeStream.
+
+	OperatingSystem executeCommand:'cat'
+			inputFrom:(ByteArray new:5000000) readStream
+			outputTo:outStream
+			errorTo:nil
+			inDirectory:nil
+			lineWise:false
+			onError:[:exitStatus | ^ false].
+	outStream size
+    "
+
+    "
+	|outStream errStream|
+
+	outStream := '' writeStream.
+
+	OperatingSystem executeCommand:'gpg -s --batch --no-tty --passphrase-fd 0 /tmp/passwd'
+			inputFrom:'bla' readStream
+			outputTo:outStream
+			errorTo:nil
+			inDirectory:nil
+			lineWise:true
+			onError:[:exitStatus |  false].
+	outStream contents
     "
 
     "Modified: / 11-02-2007 / 20:54:39 / cg"
@@ -1544,66 +1544,66 @@
      avoid blocking on pipes.
 
      Special for windows:
-        you can control (have to - sigh) if a window should be shown for the command or not.
-        This is the OS's H_SHOWWINDOW argument.
-        If you pass nil as showWindow-argument, the OS's default is used for the particular
-        command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
-        executables will not.
-        However, some command-line executables show a window, even if they should not.
-        (and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
-         a shell command opens a cmd-window, whereas in windows7 it did not)
-        In this case, pass an explicit false argument to suppress it.
-        This argument is ignored on Unix systems.
-        See examples below."
+	you can control (have to - sigh) if a window should be shown for the command or not.
+	This is the OS's H_SHOWWINDOW argument.
+	If you pass nil as showWindow-argument, the OS's default is used for the particular
+	command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
+	executables will not.
+	However, some command-line executables show a window, even if they should not.
+	(and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
+	 a shell command opens a cmd-window, whereas in windows7 it did not)
+	In this case, pass an explicit false argument to suppress it.
+	This argument is ignored on Unix systems.
+	See examples below."
 
     ^ self
-        executeCommand:aCommandStringOrArray inputFrom:anInStream outputTo:anOutStream
-        errorTo:anErrStream auxFrom:anAuxStream environment:environmentDictionary
-        inDirectory:dirOrNil lineWise:lineWise newPgrp:true showWindow:showWindowBooleanOrNil onError:aBlock
-
-    "
-        |outStream errStream|
-
-        outStream := '' writeStream.
-
-        OperatingSystem executeCommand:'ls -l'
-                        inputFrom:'abc' readStream
-                        outputTo:outStream
-                        errorTo:nil
-                        inDirectory:nil
-                        lineWise:true
-                        onError:[:exitStatus | ^ false].
-        outStream contents
-    "
-
-    "
-        |outStream errStream|
-
-        outStream := #[] writeStream.
-
-        OperatingSystem executeCommand:'cat'
-                        inputFrom:(ByteArray new:5000000) readStream
-                        outputTo:outStream
-                        errorTo:nil
-                        inDirectory:nil
-                        lineWise:false
-                        onError:[:exitStatus | ^ false].
-        outStream size
-    "
-
-    "
-        |outStream errStream|
-
-        outStream := '' writeStream.
-
-        OperatingSystem executeCommand:'gpg -s --batch --no-tty --passphrase-fd 0 /tmp/passwd'
-                        inputFrom:'bla' readStream
-                        outputTo:outStream
-                        errorTo:nil
-                        inDirectory:nil
-                        lineWise:true
-                        onError:[:exitStatus |  false].
-        outStream contents
+	executeCommand:aCommandStringOrArray inputFrom:anInStream outputTo:anOutStream
+	errorTo:anErrStream auxFrom:anAuxStream environment:environmentDictionary
+	inDirectory:dirOrNil lineWise:lineWise newPgrp:true showWindow:showWindowBooleanOrNil onError:aBlock
+
+    "
+	|outStream errStream|
+
+	outStream := '' writeStream.
+
+	OperatingSystem executeCommand:'ls -l'
+			inputFrom:'abc' readStream
+			outputTo:outStream
+			errorTo:nil
+			inDirectory:nil
+			lineWise:true
+			onError:[:exitStatus | ^ false].
+	outStream contents
+    "
+
+    "
+	|outStream errStream|
+
+	outStream := #[] writeStream.
+
+	OperatingSystem executeCommand:'cat'
+			inputFrom:(ByteArray new:5000000) readStream
+			outputTo:outStream
+			errorTo:nil
+			inDirectory:nil
+			lineWise:false
+			onError:[:exitStatus | ^ false].
+	outStream size
+    "
+
+    "
+	|outStream errStream|
+
+	outStream := '' writeStream.
+
+	OperatingSystem executeCommand:'gpg -s --batch --no-tty --passphrase-fd 0 /tmp/passwd'
+			inputFrom:'bla' readStream
+			outputTo:outStream
+			errorTo:nil
+			inDirectory:nil
+			lineWise:true
+			onError:[:exitStatus |  false].
+	outStream contents
     "
 
     "Modified: / 08-11-2016 / 21:33:00 / cg"
@@ -1624,16 +1624,16 @@
 
 executeCommand:aCommandString inputFrom:anInStream outputTo:anOutStream errorTo:anErrStream auxFrom:anAuxStream inDirectory:dirOrNil lineWise:lineWise showWindow:showWindow onError:aBlock
     ^ self
-        executeCommand:aCommandString
-        inputFrom:anInStream
-        outputTo:anOutStream
-        errorTo:anErrStream
-        auxFrom:anAuxStream
-        environment:nil
-        inDirectory:dirOrNil
-        lineWise:lineWise
-        showWindow:showWindow
-        onError:aBlock
+	executeCommand:aCommandString
+	inputFrom:anInStream
+	outputTo:anOutStream
+	errorTo:anErrStream
+	auxFrom:anAuxStream
+	environment:nil
+	inDirectory:dirOrNil
+	lineWise:lineWise
+	showWindow:showWindow
+	onError:aBlock
 !
 
 executeCommand:aCommandString inputFrom:anInStream outputTo:anOutStream errorTo:anErrStream environment:env onError:aBlock
@@ -1715,59 +1715,59 @@
      (containing the exit status) as argument."
 
     ^ self
-        executeCommand:aCommandString
-        inputFrom:anInStream
-        outputTo:anOutStream
-        errorTo:anErrStream
-        auxFrom:nil
-        environment:env
-        inDirectory:nil
-        lineWise:false
-        showWindow:showWindow
-        onError:aBlock
-
-    "
-        OperatingSystem
-            executeCommand:'dir'
-            inputFrom:nil
-            outputTo:nil
-            errorTo:nil
-            onError:[:status | Transcript flash]
-
-        OperatingSystem
-            executeCommand:'foo'
-            inputFrom:nil
-            outputTo:nil
-            errorTo:nil
-            onError:[:status | Transcript flash]
-    "
-    "
-        |outStr errStr|
-
-        outStr := '' writeStream.
-        errStr := '' writeStream.
-        OperatingSystem
-            executeCommand:'ls'
-            inputFrom:nil
-            outputTo:outStr
-            errorTo:errStr
-            onError:[:status | Transcript flash].
-        Transcript show:'out:'; showCR:outStr contents.
-        Transcript show:'err:'; showCR:errStr contents.
-    "
-    "
-        |outStr errStr|
-
-        outStr := '' writeStream.
-        errStr := '' writeStream.
-        OperatingSystem
-            executeCommand:'ls /fooBar'
-            inputFrom:nil
-            outputTo:outStr
-            errorTo:errStr
-            onError:[:status | Transcript flash].
-        Transcript show:'out:'; showCR:outStr contents.
-        Transcript show:'err:'; showCR:errStr contents.
+	executeCommand:aCommandString
+	inputFrom:anInStream
+	outputTo:anOutStream
+	errorTo:anErrStream
+	auxFrom:nil
+	environment:env
+	inDirectory:nil
+	lineWise:false
+	showWindow:showWindow
+	onError:aBlock
+
+    "
+	OperatingSystem
+	    executeCommand:'dir'
+	    inputFrom:nil
+	    outputTo:nil
+	    errorTo:nil
+	    onError:[:status | Transcript flash]
+
+	OperatingSystem
+	    executeCommand:'foo'
+	    inputFrom:nil
+	    outputTo:nil
+	    errorTo:nil
+	    onError:[:status | Transcript flash]
+    "
+    "
+	|outStr errStr|
+
+	outStr := '' writeStream.
+	errStr := '' writeStream.
+	OperatingSystem
+	    executeCommand:'ls'
+	    inputFrom:nil
+	    outputTo:outStr
+	    errorTo:errStr
+	    onError:[:status | Transcript flash].
+	Transcript show:'out:'; showCR:outStr contents.
+	Transcript show:'err:'; showCR:errStr contents.
+    "
+    "
+	|outStr errStr|
+
+	outStr := '' writeStream.
+	errStr := '' writeStream.
+	OperatingSystem
+	    executeCommand:'ls /fooBar'
+	    inputFrom:nil
+	    outputTo:outStr
+	    errorTo:errStr
+	    onError:[:status | Transcript flash].
+	Transcript show:'out:'; showCR:outStr contents.
+	Transcript show:'err:'; showCR:errStr contents.
     "
 
     "Modified: / 10.11.1998 / 20:51:39 / cg"
@@ -1846,16 +1846,16 @@
      error resp. - i.e. usually, i/o will be from/to the terminal"
 
     ^ self
-        executeCommand:aCommandString
-        inputFrom:anInStream
-        outputTo:anOutStream
-        errorTo:anErrStream
-        auxFrom:nil
-        environment:nil
-        inDirectory:dirOrNil
-        lineWise:lineWise
-        showWindow:showWindow
-        onError:aBlock
+	executeCommand:aCommandString
+	inputFrom:anInStream
+	outputTo:anOutStream
+	errorTo:anErrStream
+	auxFrom:nil
+	environment:nil
+	inDirectory:dirOrNil
+	lineWise:lineWise
+	showWindow:showWindow
+	onError:aBlock
 !
 
 executeCommand:aCommandString inputFrom:anInStream outputTo:anOutStream errorTo:anErrStream inDirectory:dirOrNil onError:aBlock
@@ -1940,59 +1940,59 @@
      (containing the exit status) as argument."
 
     ^ self
-        executeCommand:aCommandString
-        inputFrom:anInStream
-        outputTo:anOutStream
-        errorTo:anErrStream
-        auxFrom:nil
-        environment:nil
-        inDirectory:dir
-        lineWise:false
-        showWindow:showWindow
-        onError:aBlock
-
-    "
-        OperatingSystem
-            executeCommand:'dir'
-            inputFrom:nil
-            outputTo:nil
-            errorTo:nil
-            onError:[:status | Transcript flash]
-
-        OperatingSystem
-            executeCommand:'foo'
-            inputFrom:nil
-            outputTo:nil
-            errorTo:nil
-            onError:[:status | Transcript flash]
-    "
-    "
-        |outStr errStr|
-
-        outStr := '' writeStream.
-        errStr := '' writeStream.
-        OperatingSystem
-            executeCommand:'ls'
-            inputFrom:nil
-            outputTo:outStr
-            errorTo:errStr
-            onError:[:status | Transcript flash].
-        Transcript show:'out:'; showCR:outStr contents.
-        Transcript show:'err:'; showCR:errStr contents.
-    "
-    "
-        |outStr errStr|
-
-        outStr := '' writeStream.
-        errStr := '' writeStream.
-        OperatingSystem
-            executeCommand:'ls /fooBar'
-            inputFrom:nil
-            outputTo:outStr
-            errorTo:errStr
-            onError:[:status | Transcript flash].
-        Transcript show:'out:'; showCR:outStr contents.
-        Transcript show:'err:'; showCR:errStr contents.
+	executeCommand:aCommandString
+	inputFrom:anInStream
+	outputTo:anOutStream
+	errorTo:anErrStream
+	auxFrom:nil
+	environment:nil
+	inDirectory:dir
+	lineWise:false
+	showWindow:showWindow
+	onError:aBlock
+
+    "
+	OperatingSystem
+	    executeCommand:'dir'
+	    inputFrom:nil
+	    outputTo:nil
+	    errorTo:nil
+	    onError:[:status | Transcript flash]
+
+	OperatingSystem
+	    executeCommand:'foo'
+	    inputFrom:nil
+	    outputTo:nil
+	    errorTo:nil
+	    onError:[:status | Transcript flash]
+    "
+    "
+	|outStr errStr|
+
+	outStr := '' writeStream.
+	errStr := '' writeStream.
+	OperatingSystem
+	    executeCommand:'ls'
+	    inputFrom:nil
+	    outputTo:outStr
+	    errorTo:errStr
+	    onError:[:status | Transcript flash].
+	Transcript show:'out:'; showCR:outStr contents.
+	Transcript show:'err:'; showCR:errStr contents.
+    "
+    "
+	|outStr errStr|
+
+	outStr := '' writeStream.
+	errStr := '' writeStream.
+	OperatingSystem
+	    executeCommand:'ls /fooBar'
+	    inputFrom:nil
+	    outputTo:outStr
+	    errorTo:errStr
+	    onError:[:status | Transcript flash].
+	Transcript show:'out:'; showCR:outStr contents.
+	Transcript show:'err:'; showCR:errStr contents.
     "
 
     "Modified: / 10.11.1998 / 20:51:39 / cg"
@@ -2077,59 +2077,59 @@
      (containing the exit status) as argument."
 
     ^ self
-        executeCommand:aCommandString
-        inputFrom:anInStream
-        outputTo:anOutStream
-        errorTo:anErrStream
-        auxFrom:nil
-        environment:nil
-        inDirectory:nil
-        lineWise:false
-        showWindow:showWindow
-        onError:aBlock
-
-    "
-        OperatingSystem
-            executeCommand:'dir'
-            inputFrom:nil
-            outputTo:nil
-            errorTo:nil
-            onError:[:status | Transcript flash]
-
-        OperatingSystem
-            executeCommand:'foo'
-            inputFrom:nil
-            outputTo:nil
-            errorTo:nil
-            onError:[:status | Transcript flash]
-    "
-    "
-        |outStr errStr|
-
-        outStr := '' writeStream.
-        errStr := '' writeStream.
-        OperatingSystem
-            executeCommand:'ls'
-            inputFrom:nil
-            outputTo:outStr
-            errorTo:errStr
-            onError:[:status | Transcript flash].
-        Transcript show:'out:'; showCR:outStr contents.
-        Transcript show:'err:'; showCR:errStr contents.
-    "
-    "
-        |outStr errStr|
-
-        outStr := '' writeStream.
-        errStr := '' writeStream.
-        OperatingSystem
-            executeCommand:'ls /fooBar'
-            inputFrom:nil
-            outputTo:outStr
-            errorTo:errStr
-            onError:[:status | Transcript flash].
-        Transcript show:'out:'; showCR:outStr contents.
-        Transcript show:'err:'; showCR:errStr contents.
+	executeCommand:aCommandString
+	inputFrom:anInStream
+	outputTo:anOutStream
+	errorTo:anErrStream
+	auxFrom:nil
+	environment:nil
+	inDirectory:nil
+	lineWise:false
+	showWindow:showWindow
+	onError:aBlock
+
+    "
+	OperatingSystem
+	    executeCommand:'dir'
+	    inputFrom:nil
+	    outputTo:nil
+	    errorTo:nil
+	    onError:[:status | Transcript flash]
+
+	OperatingSystem
+	    executeCommand:'foo'
+	    inputFrom:nil
+	    outputTo:nil
+	    errorTo:nil
+	    onError:[:status | Transcript flash]
+    "
+    "
+	|outStr errStr|
+
+	outStr := '' writeStream.
+	errStr := '' writeStream.
+	OperatingSystem
+	    executeCommand:'ls'
+	    inputFrom:nil
+	    outputTo:outStr
+	    errorTo:errStr
+	    onError:[:status | Transcript flash].
+	Transcript show:'out:'; showCR:outStr contents.
+	Transcript show:'err:'; showCR:errStr contents.
+    "
+    "
+	|outStr errStr|
+
+	outStr := '' writeStream.
+	errStr := '' writeStream.
+	OperatingSystem
+	    executeCommand:'ls /fooBar'
+	    inputFrom:nil
+	    outputTo:outStr
+	    errorTo:errStr
+	    onError:[:status | Transcript flash].
+	Transcript show:'out:'; showCR:outStr contents.
+	Transcript show:'err:'; showCR:errStr contents.
     "
 
     "Modified: / 10.11.1998 / 20:51:39 / cg"
@@ -2277,30 +2277,30 @@
      hardwiring any 'cd ..' command strings into your applictions.
 
      Special for windows:
-        you can control (have to - sigh) if a window should be shown for the command or not.
-        This is the OS's H_SHOWWINDOW argument.
-        If you pass nil as showWindow-argument, the OS's default is used for the particular
-        command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
-        executables will not.
-        However, some command-line executables show a window, even if they should not.
-        (and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
-         a shell command opens a cmd-window, whereas in windows7 it did not)
-        In this case, pass an explicit false argument to suppress it.
-        This argument is ignored on Unix systems.
-        See examples below."
+	you can control (have to - sigh) if a window should be shown for the command or not.
+	This is the OS's H_SHOWWINDOW argument.
+	If you pass nil as showWindow-argument, the OS's default is used for the particular
+	command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
+	executables will not.
+	However, some command-line executables show a window, even if they should not.
+	(and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
+	 a shell command opens a cmd-window, whereas in windows7 it did not)
+	In this case, pass an explicit false argument to suppress it.
+	This argument is ignored on Unix systems.
+	See examples below."
 
      ^ self
-        executeCommand:aCommandString
-        inputFrom:nil
-        outputTo:outStreamOrNil
-        errorTo:errStreamOrNil
-        auxFrom:nil
-        environment:nil
-        inDirectory:aDirectory
-        lineWise:false
-        newPgrp:true
-        showWindow:showWindowBooleanOrNil
-        onError:[:status| false]
+	executeCommand:aCommandString
+	inputFrom:nil
+	outputTo:outStreamOrNil
+	errorTo:errStreamOrNil
+	auxFrom:nil
+	environment:nil
+	inDirectory:aDirectory
+	lineWise:false
+	newPgrp:true
+	showWindow:showWindowBooleanOrNil
+	onError:[:status| false]
 
     "
      OperatingSystem executeCommand:'tdump date.obj' inDirectory:'c:\winstx\stx\libbasic\objbc'.
@@ -2346,36 +2346,36 @@
      If aCommandString is a String, the commandString is passed to a shell for execution
      - see the description of 'sh -c' in your UNIX manual ('cmd.com' in your MSDOS manual).
      If aCommandString is an Array, the first element is the command to be executed,
-     and the other elements are the arguments to the command. 
+     and the other elements are the arguments to the command.
      No shell is invoked in this case.
      This blocks the current thread until the command has finished.
      Return true if successful, false otherwise.
 
      Special for windows:
-        you can control (have to - sigh) if a window should be shown for the command or not.
-        This is the OS's H_SHOWWINDOW argument.
-        If you pass nil as showWindow-argument, the OS's default is used for the particular
-        command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
-        executables will not.
-        However, some command-line executables show a window, even if they should not.
-        (and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
-         a shell command opens a cmd-window, whereas in windows7 it did not)
-        In this case, pass an explicit false argument to suppress it.
-        This argument is ignored on Unix systems.
-        See examples below.
+	you can control (have to - sigh) if a window should be shown for the command or not.
+	This is the OS's H_SHOWWINDOW argument.
+	If you pass nil as showWindow-argument, the OS's default is used for the particular
+	command, which is correct most of the time: i.e. a notepad will open its window, other (non-UI)
+	executables will not.
+	However, some command-line executables show a window, even if they should not.
+	(and also, there seems to be an inconsistency between windows7 and newer windows: in newer,
+	 a shell command opens a cmd-window, whereas in windows7 it did not)
+	In this case, pass an explicit false argument to suppress it.
+	This argument is ignored on Unix systems.
+	See examples below.
     "
 
      ^ self
-        executeCommand:aCommandString
-        inputFrom:nil
-        outputTo:nil
-        errorTo:nil
-        auxFrom:nil
-        environment:nil
-        inDirectory:nil
-        lineWise:false
-        showWindow:aBooleanOrNil
-        onError:[:status| false]
+	executeCommand:aCommandString
+	inputFrom:nil
+	outputTo:nil
+	errorTo:nil
+	auxFrom:nil
+	environment:nil
+	inDirectory:nil
+	lineWise:false
+	showWindow:aBooleanOrNil
+	onError:[:status| false]
 
     "unix:
 
@@ -2569,12 +2569,12 @@
 
     path := self pathOfCommand:(self nameOfSTXExecutable).
     path isNil ifTrue:[
-        './stx' asFilename exists ifTrue:[
-            path := './stx'
-        ].
-        path isNil ifTrue:[
-             'OperatingSystem [warning]: cannot figure out my executable''s path' infoPrintCR.
-        ].
+	'./stx' asFilename exists ifTrue:[
+	    path := './stx'
+	].
+	path isNil ifTrue:[
+	     'OperatingSystem [warning]: cannot figure out my executable''s path' infoPrintCR.
+	].
     ].
     ^ path
 
@@ -2596,14 +2596,14 @@
      Can be used on UNIX with fork or on other systems to chain to another program."
 
     ^ self
-        exec:aCommandPath
-        withArguments:argArray
-        environment:nil
-        fileDescriptors:#(0 1 2)
-        fork:false
-        newPgrp:false
-        inDirectory:nil
-        showWindow:false
+	exec:aCommandPath
+	withArguments:argArray
+	environment:nil
+	fileDescriptors:#(0 1 2)
+	fork:false
+	newPgrp:false
+	inDirectory:nil
+	showWindow:false
 
     "/ never reached ...
 
@@ -2614,9 +2614,9 @@
     <resource: #obsolete>
     "execute an OS command"
 
-    ^ self 
-        exec:aCommandPath withArguments:argArray environment:env fileDescriptors:fds fork:doFork 
-        newPgrp:newGrp inDirectory:aDirectory showWindow:false
+    ^ self
+	exec:aCommandPath withArguments:argArray environment:env fileDescriptors:fds fork:doFork
+	newPgrp:newGrp inDirectory:aDirectory showWindow:false
 
     "Created: / 12.11.1998 / 14:46:15 / cg"
 !
@@ -2624,14 +2624,14 @@
 exec:aCommandPath withArguments:argArray fileDescriptors:fileDescriptors fork:doFork newPgrp:newPgrp inDirectory:aDirectory
     <resource: #obsolete>
     ^ self
-        exec:aCommandPath
-        withArguments:argArray
-        environment:nil
-        fileDescriptors:fileDescriptors
-        fork:doFork
-        newPgrp:newPgrp
-        inDirectory:aDirectory
-        showWindow:false
+	exec:aCommandPath
+	withArguments:argArray
+	environment:nil
+	fileDescriptors:fileDescriptors
+	fork:doFork
+	newPgrp:newPgrp
+	inDirectory:aDirectory
+	showWindow:false
 !
 
 exec:aCommandPath withArguments:argArray fork:doFork
@@ -2642,25 +2642,25 @@
      (typically, the terminal window)"
 
     ^ self
-        exec:aCommandPath
-        withArguments:argArray
-        environment:nil
-        fileDescriptors:#(0 1 2)
-        fork:doFork
-        newPgrp:false
-        inDirectory:nil
-        showWindow:false
+	exec:aCommandPath
+	withArguments:argArray
+	environment:nil
+	fileDescriptors:#(0 1 2)
+	fork:doFork
+	newPgrp:false
+	inDirectory:nil
+	showWindow:false
     "
      |id|
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        'I am the child'.
-        OperatingSystem
-            exec:'/bin/ls'
-            withArguments:#('ls' '/tmp')
-            fork:false.
-        'not reached'.
+	'I am the child'.
+	OperatingSystem
+	    exec:'/bin/ls'
+	    withArguments:#('ls' '/tmp')
+	    fork:false.
+	'not reached'.
      ]
     "
 
@@ -2669,12 +2669,12 @@
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        'I am the child'.
-        OperatingSystem
-            exec:'/bin/sh'
-            withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2')
-            fork:false.
-        'not reached'.
+	'I am the child'.
+	OperatingSystem
+	    exec:'/bin/sh'
+	    withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2')
+	    fork:false.
+	'not reached'.
      ].
      id printNL.
      (Delay forSeconds:3.5) wait.
@@ -2695,25 +2695,25 @@
      (typically, the terminal window)"
 
     ^ self
-        exec:aCommandPath
-        withArguments:argArray
-        environment:nil
-        fileDescriptors:#(0 1 2)
-        fork:doFork
-        newPgrp:false
-        inDirectory:aDirectory
-        showWindow:false
+	exec:aCommandPath
+	withArguments:argArray
+	environment:nil
+	fileDescriptors:#(0 1 2)
+	fork:doFork
+	newPgrp:false
+	inDirectory:aDirectory
+	showWindow:false
     "
      |id|
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        'I am the child'.
-        OperatingSystem
-            exec:'/bin/ls'
-            withArguments:#('ls' '/tmp')
-            fork:false.
-        'not reached'.
+	'I am the child'.
+	OperatingSystem
+	    exec:'/bin/ls'
+	    withArguments:#('ls' '/tmp')
+	    fork:false.
+	'not reached'.
      ]
     "
 
@@ -2722,12 +2722,12 @@
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        'I am the child'.
-        OperatingSystem
-            exec:'/bin/sh'
-            withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2')
-            fork:false.
-        'not reached'.
+	'I am the child'.
+	OperatingSystem
+	    exec:'/bin/sh'
+	    withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2')
+	    fork:false.
+	'not reached'.
      ].
      id printNL.
      (Delay forSeconds:3.5) wait.
@@ -2750,14 +2750,14 @@
      Can be used on UNIX with fork or on other systems to chain to another program."
 
     ^ self
-        exec:aCommandPath
-        withArguments:argArray
-        environment:nil
-        fileDescriptors:#(0 1 2)
-        fork:false
-        newPgrp:false
-        inDirectory:nil
-        showWindow:showWindowBooleanOrNil
+	exec:aCommandPath
+	withArguments:argArray
+	environment:nil
+	fileDescriptors:#(0 1 2)
+	fork:false
+	newPgrp:false
+	inDirectory:nil
+	showWindow:showWindowBooleanOrNil
 
     "/ never reached ...
 
@@ -2767,10 +2767,10 @@
 startProcess:aCommandString
     <resource: #obsolete>
 
-    ^ self 
-        startProcess:aCommandString inputFrom:nil outputTo:nil
-        errorTo:nil auxFrom:nil environment:nil 
-        inDirectory:nil newPgrp:true showWindow:nil
+    ^ self
+	startProcess:aCommandString inputFrom:nil outputTo:nil
+	errorTo:nil auxFrom:nil environment:nil
+	inDirectory:nil newPgrp:true showWindow:nil
 
     "
      |pid|
@@ -2790,11 +2790,11 @@
      |pid|
 
      pid := OperatingSystem
-                startProcess:'dir/l'
-                inputFrom:nil
-                outputTo:Stdout
-                errorTo:nil
-                inDirectory:nil.
+		startProcess:'dir/l'
+		inputFrom:nil
+		outputTo:Stdout
+		errorTo:nil
+		inDirectory:nil.
      (Delay forSeconds:2) wait.
      OperatingSystem killProcess:pid.
     "
@@ -2807,9 +2807,9 @@
     <resource: #obsolete>
 
     ^ self
-        startProcess:aCommandString inputFrom:nil outputTo:nil
-        errorTo:nil auxFrom:nil environment:nil 
-        inDirectory:aDirectory newPgrp:true showWindow:nil
+	startProcess:aCommandString inputFrom:nil outputTo:nil
+	errorTo:nil auxFrom:nil environment:nil
+	inDirectory:aDirectory newPgrp:true showWindow:nil
     "
      |pid|
 
@@ -2826,31 +2826,31 @@
 startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream errorTo:anExternalErrStream
     <resource: #obsolete>
 
-    ^ self 
-        startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
-        errorTo:anExternalErrStream auxFrom:nil environment:nil 
-        inDirectory:nil newPgrp:true showWindow:nil
+    ^ self
+	startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
+	errorTo:anExternalErrStream auxFrom:nil environment:nil
+	inDirectory:nil newPgrp:true showWindow:nil
 !
 
 startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
     errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment inDirectory:dir
     <resource: #obsolete>
 
-    ^ self 
-        startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
-        errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment 
-        inDirectory:dir newPgrp:true showWindow:nil
+    ^ self
+	startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
+	errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment
+	inDirectory:dir newPgrp:true showWindow:nil
 !
 
 startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
-    errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment 
+    errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment
     inDirectory:dir showWindow:showWindowBooleanOrNil
     <resource: #obsolete>
 
     ^ self
-        startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
-        errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment 
-        inDirectory:dir newPgrp:true showWindow:showWindowBooleanOrNil
+	startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
+	errorTo:anExternalErrStream auxFrom:anExternalAuxStreamOrNil environment:environment
+	inDirectory:dir newPgrp:true showWindow:showWindowBooleanOrNil
 
     "Modified: / 08-11-2016 / 21:24:27 / cg"
 !
@@ -2859,19 +2859,19 @@
     errorTo:anExternalErrStream auxFrom:anAuxiliaryStream inDirectory:dir
     <resource: #obsolete>
 
-    ^ self 
-        startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
-        errorTo:anExternalErrStream auxFrom:nil environment:nil
-        inDirectory:dir newPgrp:true showWindow:nil
+    ^ self
+	startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
+	errorTo:anExternalErrStream auxFrom:nil environment:nil
+	inDirectory:dir newPgrp:true showWindow:nil
 !
 
 startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream errorTo:anExternalErrStream inDirectory:dir
     <resource: #obsolete>
 
     ^ self
-        startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
-        errorTo:anExternalErrStream auxFrom:nil environment:nil 
-        inDirectory:dir newPgrp:true showWindow:nil
+	startProcess:aCommandString inputFrom:anExternalInStream outputTo:anExternalOutStream
+	errorTo:anExternalErrStream auxFrom:nil environment:nil
+	inDirectory:dir newPgrp:true showWindow:nil
 ! !
 
 !AbstractOperatingSystem class methodsFor:'file access'!
@@ -3009,14 +3009,14 @@
 
     self createDirectory:dirName.
     (self isDirectory:dirName) ifFalse:[
-        nextDirName := dirName asFilename directoryName.
-        dirName ~= nextDirName ifTrue:[
-            osErrorHolder := self recursiveCreateDirectory:nextDirName.
-            osErrorHolder notNil ifTrue:[ 
-                ^ osErrorHolder.
-            ].
-        ].
-        ^ self createDirectory:dirName.
+	nextDirName := dirName asFilename directoryName.
+	dirName ~= nextDirName ifTrue:[
+	    osErrorHolder := self recursiveCreateDirectory:nextDirName.
+	    osErrorHolder notNil ifTrue:[
+		^ osErrorHolder.
+	    ].
+	].
+	^ self createDirectory:dirName.
     ].
     ^ nil.
 
@@ -3369,9 +3369,9 @@
 
      The info object returned is OS-specific, however it responds to at
      least
-        #isFor32BitArchitecture
-        #isFor64BitArchitecture ... returns true, if the given object is for
-                                     32bit, 64bit architecture respectively
+	#isFor32BitArchitecture
+	#isFor64BitArchitecture ... returns true, if the given object is for
+				     32bit, 64bit architecture respectively
     "
     ^ self subclassResponsibility
 
@@ -4200,7 +4200,7 @@
 
 getCCDefine
     <resource: #obsolete>
-    
+
     "return a string which was used to identify the C-Compiler used
      when STX was compiled, and which should be passed down when compiling methods.
      For example, on linux, this is '__GNUC__';
@@ -4435,7 +4435,7 @@
 
 getNetworkMACAddresses
     "return a dictionary with key:name of interface and
-                            value:the MAC address for each interface"
+			    value:the MAC address for each interface"
 
     self subclassResponsibility
 !
@@ -4456,7 +4456,7 @@
 
 getOSDefine
     <resource: #obsolete>
-    
+
     "return a string which was used to identify this machine when stx was
      compiled, and which should be passed down when compiling methods.
      For example, on linux, this is '-D__linux__'."
@@ -4626,7 +4626,7 @@
 
 getPlatformDefine
     <resource: #obsolete>
-    
+
     "return a string which defines the platform,
      and which should be passed down when compiling methods.
      For example, on all unices, this is '-DUNIX'."
@@ -5186,7 +5186,7 @@
             (packagePath includes:each) ifFalse:[
                 packagePath addFirst:each.
             ].
-        ].
+	].
     ].
 
     "/ $HOME/.smalltalk/packages (on Windows %USERPROFILE%\.smalltalk\packages)
@@ -5701,6 +5701,13 @@
 	    domainSymbol = @symbol(AF_PACKET);
 	    break;
 #endif
+#ifdef AF_LINK
+# if AF_LINK != AF_PACKET
+	case AF_LINK:
+	    domainSymbol = @symbol(AF_LINK);
+	    break;
+# endif
+#endif
 #ifdef AF_ASH
 	case AF_ASH:
 	    domainSymbol = @symbol(AF_ASH);
@@ -6159,6 +6166,16 @@
 		socketSize = __mkSmallInteger( sizeof(struct sockaddr_isdn) );
 		break;
 #endif
+#ifdef WANT__AF_PACKET
+	    case AF_PACKET:
+		socketSize = __mkSmallInteger( sizeof(struct sockaddr_ll) );
+		break;
+#endif
+#ifdef WANT__AF_LINK
+	    case AF_LINK:
+		socketSize = __mkSmallInteger( sizeof(struct sockaddr_dl) );
+		break;
+#endif
 #ifdef WANT__AF_SYSTEM
 	    case AF_SYSTEM:
 		socketSize = __mkSmallInteger( sizeof(struct sockaddr_sys) );
@@ -6316,6 +6333,8 @@
 	#AF_CLUSTER
 	#AF_12844
 	#AF_NETDES
+	#AF_PACKET
+	#AF_LINK
        ) select:[:sym | (AbstractOperatingSystem domainCodeOf:sym) isInteger ]
 
     "
@@ -6552,10 +6571,10 @@
      Notice, that the # of cycles has to be multiplied by the cycle time (1/cpu-frequency).
 
      For x86:
-        the CPU cycle count register value is returned (RDTSC instruction).
-        answer 0 if RDTSC instruction is not supported (which is unlikely, nowadays).
+	the CPU cycle count register value is returned (RDTSC instruction).
+	answer 0 if RDTSC instruction is not supported (which is unlikely, nowadays).
      For others:
-        answer 0"
+	answer 0"
 
 %{  /* NOCONTEXT */
     unsigned INT low, high;
@@ -6616,8 +6635,8 @@
      Use the millisecondTimeXXX:-methods to compare and add time deltas - these know about the wrap.
 
      BAD DESIGN:
-        This should be changed to return some instance of RelativeTime,
-        and these computations moved there.
+	This should be changed to return some instance of RelativeTime,
+	and these computations moved there.
 
      Do not use this method in application code since it is an internal (private)
      interface. For compatibility with ST-80, use Time millisecondClockValue.
@@ -6682,9 +6701,9 @@
      This should really be moved to some RelativeTime class."
 
     (msTime1 > msTime2) ifTrue:[
-        ^ (msTime1 - msTime2) <= (SmallInteger maxVal // 4).
+	^ (msTime1 - msTime2) <= (SmallInteger maxVal // 4).
     ] ifFalse:[
-        ^ (msTime2 - msTime1) > ((SmallInteger maxVal // 4) + 1)
+	^ (msTime2 - msTime1) > ((SmallInteger maxVal // 4) + 1)
     ].
 !
 
@@ -6699,8 +6718,8 @@
 
     sum := msTime1 + msTime2.
     (sum > (SmallInteger maxVal // 2)) ifTrue:[
-        self assert:(sum <= SmallInteger maxVal) message:'overflow in timer computation'.
-        ^ sum - (SmallInteger maxVal // 2 + 1).
+	self assert:(sum <= SmallInteger maxVal) message:'overflow in timer computation'.
+	^ sum - (SmallInteger maxVal // 2 + 1).
     ].
     (sum < 0) ifTrue:[^ sum + (SmallInteger maxVal // 2 + 1)].
     ^ sum
@@ -6721,13 +6740,13 @@
     diff := msTime1 - msTime2.
 
     diff < (SmallInteger maxVal // -4) ifTrue:[
-        ^ diff + (SmallInteger maxVal // 2) + 1.
+	^ diff + (SmallInteger maxVal // 2) + 1.
     ].
 
     diff <= (SmallInteger maxVal // 4) ifTrue:[
-        ^ diff.
+	^ diff.
     ] ifFalse:[
-        ^ diff - (SmallInteger maxVal // 2 + 1).
+	^ diff - (SmallInteger maxVal // 2 + 1).
     ].
 
 
@@ -6986,7 +7005,7 @@
     "/ fallBack dummy
 
     aNumber == self getUserID ifTrue:[
-        ^ self getLoginName
+	^ self getLoginName
     ].
 
     ^ '? (' , aNumber printString , ')'