Smalltalk.st
changeset 19788 5b67ddd14655
parent 19681 ec20967ae600
child 19811 65fec19facb0
child 19856 c1e41278b22e
child 19983 13727216870b
--- a/Smalltalk.st	Wed May 11 16:25:54 2016 +0200
+++ b/Smalltalk.st	Wed May 11 17:56:31 2016 +0200
@@ -3796,44 +3796,44 @@
     imageName := ObjectMemory imageName.
     thisIsARestart := imageName notNil.
 
-    graphicalMode ifTrue:[
-	Display isNil ifTrue:[
-	    (StartupClass notNil
-	    and:[ (StartupClass perform:#isHeadless ifNotUnderstood:false) ]) ifFalse:[
-		self openDisplay.
-	    ].
-	].
+    true "graphicalMode" ifTrue:[
+        Display isNil ifTrue:[
+            (StartupClass notNil
+            and:[ (StartupClass perform:#isHeadless ifNotUnderstood:false) ]) ifFalse:[
+                self openDisplay.
+            ].
+        ].
     ].
 
     StandAlone ifFalse:[
-	"
-	 enable the graphical debugger/inspector
-	 (they could have been (re)defined as autoloaded in the patches file)
-	"
-	self initStandardTools.
+        "
+         enable the graphical debugger/inspector
+         (they could have been (re)defined as autoloaded in the patches file)
+        "
+        self initStandardTools.
     ].
 
     "
      if there is a display, start its event dispatcher
     "
     Display notNil ifTrue:[
-	Display deviceIOTimeoutErrorSignal handlerBlock:[:ex |
-	    SaveEmergencyImage == true ifTrue:[
-		'Display [warning]: broken display connection - emergency save in ''crash.img''.' infoPrintCR.
-		ObjectMemory primSnapShotOn:'crash.img'.
-	    ].
-	    'Display [warning]: broken display connection - exit.' infoPrintCR.
-	    self exit:11.
-	].
-	Display startDispatch.
+        Display deviceIOTimeoutErrorSignal handlerBlock:[:ex |
+            SaveEmergencyImage == true ifTrue:[
+                'Display [warning]: broken display connection - emergency save in ''crash.img''.' infoPrintCR.
+                ObjectMemory primSnapShotOn:'crash.img'.
+            ].
+            'Display [warning]: broken display connection - exit.' infoPrintCR.
+            self exit:11.
+        ].
+        Display startDispatch.
     ].
 
     idx := CommandLineArguments indexOf:'--browserWindow:'.
     IsPlugin := (idx ~~ 0).
     IsPlugin ifTrue:[
-	'Smalltalk [info]: startup browser window...' infoPrintCR.
-	self browserWindowStartup.
-	"/ not reached
+        'Smalltalk [info]: startup browser window...' infoPrintCR.
+        self browserWindowStartup.
+        "/ not reached
     ].
 
     Initializing := false.
@@ -3844,49 +3844,49 @@
     "/ Therefore, it is now done by an extra user-process.
 
     process := [
-	'Smalltalk [info]: startup process 1 active.' infoPrintCR.
-	StartBlocks notNil ifTrue:[
-	    self executeStartBlocks.
-	    StartBlocks := nil.
-	].
-	ImageStartBlocks notNil ifTrue:[
-	    'Smalltalk [info]: execute imageStartBlocks...' infoPrintCR.
-	    ImageStartBlocks do:[:aBlock|
-		aBlock value
-	    ].
-	].
-	StandAlone ifFalse:[
-	    (SilentLoading == true) ifFalse:[   "i.e. undefined counts as false"
-		thisIsARestart ifTrue:[
-		    Transcript cr.
-		    Transcript showCR:('Smalltalk restarted from:'
-					, imageName
-					, ' (saved '
-					, ObjectMemory imageSaveTime printString
-					, ')' ).
-		] ifFalse:[
-		    Transcript showCR:(self hello).
-		    Transcript showCR:(self copyrightString).
-		].
-		Transcript cr.
-	    ].
-
-	    DemoMode==true ifTrue:[
-		Transcript showCR:'*** Restricted use:                              ***'.
-		Transcript showCR:'*** This program may be used for education only. ***'.
-		Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE  ***'.
-		Transcript showCR:'*** for more details.                            ***'.
-		Transcript cr.
-	    ].
-	].
-
-	thisIsARestart ifTrue:[
-	    "/
-	    "/ the final late notification - users can now assume that
-	    "/ views, forms etc. have been recreated.
-
-	    ObjectMemory changed:#returnFromSnapshot.
-	]
+        'Smalltalk [info]: startup process 1 active.' infoPrintCR.
+        StartBlocks notNil ifTrue:[
+            self executeStartBlocks.
+            StartBlocks := nil.
+        ].
+        ImageStartBlocks notNil ifTrue:[
+            'Smalltalk [info]: execute imageStartBlocks...' infoPrintCR.
+            ImageStartBlocks do:[:aBlock|
+                aBlock value
+            ].
+        ].
+        StandAlone ifFalse:[
+            (SilentLoading == true) ifFalse:[   "i.e. undefined counts as false"
+                thisIsARestart ifTrue:[
+                    Transcript cr.
+                    Transcript showCR:('Smalltalk restarted from:'
+                                        , imageName
+                                        , ' (saved '
+                                        , ObjectMemory imageSaveTime printString
+                                        , ')' ).
+                ] ifFalse:[
+                    Transcript showCR:(self hello).
+                    Transcript showCR:(self copyrightString).
+                ].
+                Transcript cr.
+            ].
+
+            DemoMode==true ifTrue:[
+                Transcript showCR:'*** Restricted use:                              ***'.
+                Transcript showCR:'*** This program may be used for education only. ***'.
+                Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE  ***'.
+                Transcript showCR:'*** for more details.                            ***'.
+                Transcript cr.
+            ].
+        ].
+
+        thisIsARestart ifTrue:[
+            "/
+            "/ the final late notification - users can now assume that
+            "/ views, forms etc. have been recreated.
+
+            ObjectMemory changed:#returnFromSnapshot.
+        ]
 
     ] newProcess.
 
@@ -3903,67 +3903,67 @@
     "/ message.
 
     (StartupClass notNil and:[StartupSelector notNil]) ifTrue:[
-	"
-	 allow more customization by reading an image specific rc-file
-	"
-	thisIsARestart ifTrue:[
-	    (imageName asFilename hasSuffix:'img') ifTrue:[
-		imageName := imageName copyButLast:4
-	    ].
-	    self fileIn:(imageName , '.rc')
-	].
+        "
+         allow more customization by reading an image specific rc-file
+        "
+        thisIsARestart ifTrue:[
+            (imageName asFilename hasSuffix:'img') ifTrue:[
+                imageName := imageName copyButLast:4
+            ].
+            self fileIn:(imageName , '.rc')
+        ].
 
 "/        Display notNil ifTrue:[
 "/            Display exitOnLastClose:true.
 "/        ].
 "/        Processor exitWhenNoMoreUserProcesses:true.
 
-	process := [
-	    'Smalltalk [info]: startup process 2 active.' infoPrintCR.
-	    StandAlone ifTrue:[
-		AbortOperationRequest handle:[:ex |
-		    'Smalltalk [info]: aborted - exit.' infoPrintCR.
-		    OperatingSystem exit:1
-		] do:[
-		    ('Smalltalk [info]: call ',StartupSelector,' of ',StartupClass name,' (1)') infoPrintCR.
-		    StartupClass perform:StartupSelector withArguments:StartupArguments.
-		]
-	    ] ifFalse:[
-		('Smalltalk [info]: call ',StartupSelector,' of ',StartupClass name,' (2)') infoPrintCR.
-		StartupClass perform:StartupSelector withArguments:StartupArguments.
-	    ].
-
-	    "/
-	    "/ non-GUI apps exit after the startup;
-	    "/ assume that GUI apps have created & opened some view ...
-	    "/
-	    Display isNil ifTrue:[
-		'Smalltalk [info]: no Display - exit.' infoPrintCR.
-		Smalltalk exit:11.
-	    ].
+        process := [
+            'Smalltalk [info]: startup process 2 active.' infoPrintCR.
+            StandAlone ifTrue:[
+                AbortOperationRequest handle:[:ex |
+                    'Smalltalk [info]: aborted - exit.' infoPrintCR.
+                    OperatingSystem exit:1
+                ] do:[
+                    ('Smalltalk [info]: call ',StartupSelector,' of ',StartupClass name,' (1)') infoPrintCR.
+                    StartupClass perform:StartupSelector withArguments:StartupArguments.
+                ]
+            ] ifFalse:[
+                ('Smalltalk [info]: call ',StartupSelector,' of ',StartupClass name,' (2)') infoPrintCR.
+                StartupClass perform:StartupSelector withArguments:StartupArguments.
+            ].
+
+            "/
+            "/ non-GUI apps exit after the startup;
+            "/ assume that GUI apps have created & opened some view ...
+            "/
+            Display isNil ifTrue:[
+                'Smalltalk [info]: no Display - exit.' infoPrintCR.
+                Smalltalk exit:11.
+            ].
 "/            "/
 "/            "/ GUI apps exit after the last user process has finished
 "/            "/
 "/            Display exitOnLastClose:true.
 "/            Processor exitWhenNoMoreUserProcesses:true.
-	] newProcess.
-	process priority:(Processor userSchedulingPriority).
-	process name:'main'.
-	process beGroupLeader.
-	process resume.
-	process := nil.    "do not refer to process"
+        ] newProcess.
+        process priority:(Processor userSchedulingPriority).
+        process name:'main'.
+        process beGroupLeader.
+        process resume.
+        process := nil.    "do not refer to process"
     ].
 
     StandAlone ifTrue:[
-	Display notNil ifTrue:[
-	    FlyByHelp notNil ifTrue:[
-		FlyByHelp start
-	    ].
-	].
+        Display notNil ifTrue:[
+            FlyByHelp notNil ifTrue:[
+                FlyByHelp start
+            ].
+        ].
     ].
 
     Display notNil ifTrue:[
-	Display exitOnLastClose:true.
+        Display exitOnLastClose:true.
     ].
     "
      if view-classes exist, start dispatching;
@@ -3973,14 +3973,14 @@
      or:[process notNil
      or:[HeadlessOperation
      or:[StandAlone]]]) ifTrue:[
-	Processor exitWhenNoMoreUserProcesses:true.
-	Processor dispatchLoop.
-	"done - the last process finished"
-	'Smalltalk [info]: last process finished - exit.' infoPrintCR.
+        Processor exitWhenNoMoreUserProcesses:true.
+        Processor dispatchLoop.
+        "done - the last process finished"
+        'Smalltalk [info]: last process finished - exit.' infoPrintCR.
     ] ifFalse:[
-	StandAlone ifFalse:[
-	    self readEvalPrint
-	]
+        StandAlone ifFalse:[
+            self readEvalPrint
+        ]
     ].
 
     self exit