Cleanup: catchup after ranema of `__getConfigurationString()` to `__getBuildDateString()` jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 17 Jan 2018 22:03:19 +0000
branchjv
changeset 23098 078e5d40fb7f
parent 23097 d619cf99365a
child 23099 0cdcdf123327
Cleanup: catchup after ranema of `__getConfigurationString()` to `__getBuildDateString()` ...in `stx:librun`
Smalltalk.st
--- a/Smalltalk.st	Thu Jan 11 23:40:14 2018 +0000
+++ b/Smalltalk.st	Wed Jan 17 22:03:19 2018 +0000
@@ -238,7 +238,7 @@
         case the show starts in Smalltalk>>restart."
 
     OrderedCollection initialize.
-    
+
     Smalltalk at:#Compiler put:ByteCodeCompiler.
     Compiler isNil ifTrue:[
         "
@@ -606,7 +606,7 @@
     idx := CommandLineArguments indexOfAny:#('--noShellArgs' '--noshellargs').
     (idx ~~ 0) ifTrue:[
         CommandLineArguments removeIndex:idx.
-    ] ifFalse:[   
+    ] ifFalse:[
         CommandLineArguments isEmpty ifTrue:[
             shellArgs := OperatingSystem getEnvironment:'STX_DEFAULT_ARGS'.
             shellArgs notEmptyOrNil ifTrue:[
@@ -623,7 +623,7 @@
         ].
     ].
 
-    self initializeVerboseFlags.    
+    self initializeVerboseFlags.
 
     Error handle:[:ex |
         StandAlone ifTrue:[
@@ -651,8 +651,8 @@
         IgnoreAssertions := true.
     ] ifFalse:[
         IgnoreAssertions := false.
-    ].    
-    
+    ].
+
     (idx := CommandLineArguments indexOf:'--ignoreHalt') ~~ 0 ifTrue:[
         IgnoreHalt := true.
         CommandLineArguments removeIndex:idx
@@ -700,7 +700,7 @@
         VerboseStartup := true.
         Logger notNil ifTrue:[
             Logger loggingThreshold: Logger severityALL.
-        ].    
+        ].
         CommandLineArguments removeIndex:idx.
     ].
 
@@ -714,7 +714,7 @@
         Verbose := VerboseLoading := VerboseStartup := false.
         Logger notNil ifTrue:[
             Logger loggingThreshold: Logger severityNONE
-        ].    
+        ].
     ].
 
     idx := CommandLineArguments indexOf:'--debug'.
@@ -1390,8 +1390,8 @@
         wrongName := true.
     ].
 
-    aClass isBuiltInClass ifTrue:[ 
-        self error: 'Cannot remove builtin class!!'.        
+    aClass isBuiltInClass ifTrue:[
+        self error: 'Cannot remove builtin class!!'.
     ].
     self at:sym put:nil.    "nil it out for compiled accesses"
 
@@ -1549,7 +1549,7 @@
     |tuples|
 
     tuples := aCollectionOfClasses collect:[:eachClass|
-                Array 
+                Array
                     with:eachClass name asSymbol
                     with:eachClass nameSpace
                     with:(
@@ -2041,7 +2041,7 @@
         ].
         already size > numClassesHintTimes2 ifTrue:[
             NumberOfClassesHint := (already size // 2) + 10
-        ].    
+        ].
     ].
 !
 
@@ -2366,7 +2366,7 @@
         aBlock value.
         ^ self.
     ].
-    
+
     sav := SilentLoading.
     SilentLoading := true.
     aBlock ensure:[ SilentLoading := sav ].
@@ -2402,14 +2402,14 @@
      The package is either located in packageDirOrStringOrNil, or in the current directory (if nil).
      Answer true, if the load succeeded, false if it failed"
 
-    |packageDirOrNil binaryClassLibraryFilename projectDefinitionFilename 
+    |packageDirOrNil binaryClassLibraryFilename projectDefinitionFilename
      projectDefinitionClass projectDefinitionClassName silent somethingHasBeenLoaded
      loadOK errorInInitialize|
 
     packageDirOrStringOrNil notNil ifTrue:[
         packageDirOrNil := packageDirOrStringOrNil asFilename.
     ].
-    silent := VerboseLoading not 
+    silent := VerboseLoading not
                 and:[SilentLoading or:[StandAlone or:[InfoPrinting not]]].
 
     "For now: have to read the project definition first!!
@@ -2450,7 +2450,7 @@
             projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString.
             projectDefinitionClass notNil ifTrue:[
                 projectDefinitionClass
-                    checkForLoad; 
+                    checkForLoad;
                     loadPreRequisitesAsAutoloaded:doLoadAsAutoloaded.
             ].
         ].
@@ -2473,8 +2473,8 @@
                     Error handle:[:ex |
                         "/ catch error during initialization;
                         ex suspendedContext withAllSendersDo:[:sender |
-                            (sender selector == #initialize 
-                                and:[sender receiver isBehavior 
+                            (sender selector == #initialize
+                                and:[sender receiver isBehavior
                                 and:[sender receiver name = projectDefinitionClassName]]
                             ) ifTrue:[
                                 errorInInitialize := true
@@ -2538,7 +2538,7 @@
 
     extensionsLoaded := false.
     ProgrammingLanguage allDo:[:programmingLanguage|
-        "/ evaluating or here - want all extensions to be loaded    
+        "/ evaluating or here - want all extensions to be loaded
         extensionsLoaded := extensionsLoaded | (self loadExtensionsForPackage:aPackageId language: programmingLanguage)
     ].
     ^ extensionsLoaded
@@ -2637,7 +2637,7 @@
 
     extensionsLoaded := false.
     ProgrammingLanguage allDo:[:programmingLanguage|
-        "/ evaluating or here - want all extensions to be loaded    
+        "/ evaluating or here - want all extensions to be loaded
         extensionsLoaded := extensionsLoaded | (self loadExtensionsFromDirectory: packageDirOrString language: programmingLanguage)
     ].
     ^ extensionsLoaded
@@ -2706,7 +2706,7 @@
                 sourceCodeManager notNil ifTrue:[
                     PackageLoadError handle:[:ex2 |
                         ex reject
-                    ] do:[    
+                    ] do:[
                         ^ sourceCodeManager loadPackageWithId:packageString fromRepositoryAsAutoloaded:doLoadAsAutoloaded
                     ].
                 ].
@@ -3034,8 +3034,8 @@
     ^ implementors
 
     "
-     Smalltalk allImplementorsOf:#isNil   
-     (Smalltalk allImplementorsOf:#add:) size 
+     Smalltalk allImplementorsOf:#isNil
+     (Smalltalk allImplementorsOf:#add:) size
     "
 
     "Modified: / 30-04-2016 / 17:37:39 / cg"
@@ -3822,7 +3822,7 @@
     ParserFlags warnDollarInIdentifier:false.
     ParserFlags warnUnderscoreInIdentifier:false.
     ParserFlags allowOldStyleAssignment:false.
-    
+
     "/ add bindings for arguments
     Workspace workspaceVariableAt:('_$0') put:CommandName.
     Workspace workspaceVariableAt:('_$n') put:CommandLineArguments size.
@@ -3845,7 +3845,7 @@
     startBlocks notNil ifTrue:[
         Logger info: 'Executing start blocks'.
         startBlocks copy do:[:aBlock|
-            startBlocks remove: aBlock.    
+            startBlocks remove: aBlock.
             aBlock on: Error do:[:ex |
                 Logger error: 'Error when executing start block: %1' with: ex description.
                 InfoPrinting == true ifTrue:[
@@ -3873,14 +3873,14 @@
 
 lateOpenDisplay
     "this is called when a view is opened without a display being already opened."
-    
+
     Smalltalk openDisplay.
-    Display notNil ifTrue:[ 
+    Display notNil ifTrue:[
         IsRepl ifFalse:[
             Display exitOnLastClose:true.
         ].
         "/ Processor exitWhenNoMoreUserProcesses:true.
-    ].            
+    ].
 !
 
 mainStartup:graphicalMode
@@ -4130,13 +4130,13 @@
     "/ provide a Display, if needed
     (Smalltalk at:#Screen) currentScreenQuerySignal handle:[:ex |
         Display isNil ifTrue:[ self lateOpenDisplay ].
-        ex proceedWith:Display.    
-    ] do:aBlock    
+        ex proceedWith:Display.
+    ] do:aBlock
 !
 
 readEvalPrintLoop
     "say hello, then go into a read-eval-print loop"
-    
+
     "{ Pragma: +optSpace }"
 
     Transcript showCR:(self hello).
@@ -4390,14 +4390,14 @@
 start
     "low level entry from the VM's main.
      After initializeSystem, this is the very first real entry into the Smalltalk world.
-     Analyzes the command line and checks what to do 
+     Analyzes the command line and checks what to do
      (i.e. script/repl/eval or full blown IDE).
      Also handles --load and various debug options.
-     Caveat: 
+     Caveat:
         this has become too complicated and desperately needs a rewrite.
 
      Also:
-        Be very careful when changing things here; 
+        Be very careful when changing things here;
         especially be careful to ensure that the scripting options are robust against any
         missing packages; so the error handlers should not depend on any stream, logger etc. features.
      "
@@ -4411,8 +4411,8 @@
 
     idx := CommandLineArguments indexOf:'--debug'.
     (idx ~~ 0) ifTrue:[
-        CommandLineArguments removeAtIndex:idx.    
-    ].    
+        CommandLineArguments removeAtIndex:idx.
+    ].
 
     "
      while reading patches- and rc-file, do not add things into change-file
@@ -4450,7 +4450,7 @@
                 arg := CommandLineArguments at:idx + 1.
                 CommandLineArguments removeAtIndex:idx+1; removeAtIndex:idx.
                 (arg asCollectionOfSubstringsSeparatedByAny:',;') do:[:each |
-                    self packagePath addLast:each.                    
+                    self packagePath addLast:each.
                     VerboseStartup ifTrue:[
                         ('Smalltalk [info]: add to packagePath: "', arg, '".') infoPrintCR.
                     ].
@@ -4500,7 +4500,7 @@
 
                     "/ set workspace variables
                     self defineCommandLineAsWorkspaceVariablesForScripts.
-                    
+
                     "/ provide a Display, if needed
                     self providingDisplayDo:[
                         VerboseStartup ifTrue:[
@@ -4527,7 +4527,7 @@
                                     "/ thisContext fullPrintAll.
                                     MiniDebugger enterException:ex.
                                     ex proceed.
-                                ].    
+                                ].
                                 Silent ifFalse:[ 'user interrupt.' errorPrintCR ].
                                 self exit:128+(OperatingSystem sigINT).
                             ] do:[
@@ -4546,7 +4546,7 @@
                             ].
                         ].
                     ].
-                    
+
                     "/ after the script, if Screen has been opened and there are any open windows,
                     "/ then do not exit
 false ifTrue:[
@@ -4591,7 +4591,7 @@
                     idx := CommandLineArguments indexOfAny:#('-F' '--filter').
                     (isFilter := (idx ~~ 0)) ifFalse:[
                         idx := CommandLineArguments indexOfAny:#('-R' '--repl').
-                        (isRepl := (idx ~~ 0)) ifFalse:[   
+                        (isRepl := (idx ~~ 0)) ifFalse:[
                             idx := CommandLineArguments indexOfAny:#('--run').
                             isRunMain := (idx ~~ 0)
                         ].
@@ -4601,7 +4601,7 @@
 
             (isEval | isPrint | isFilter | isRepl | isRunMain) ifTrue:[
                 |args|
-                
+
                 VerboseStartup ifTrue:[
                     ('Smalltalk [info]: eval/filter/print or repl') infoPrintCR.
                 ].
@@ -4657,7 +4657,7 @@
                         Debugger := nil.
                     ].
                 ].
-                
+
                 process := [
                     self providingDisplayDo:[
                         isRepl ifTrue:[
@@ -4666,7 +4666,7 @@
                             self readEvalPrintLoop.
                             self exit.
                         ].
-                        
+
                         Processor exitWhenNoMoreUserProcesses:true.
 
                         NoHandlerError handle:[:ex |
@@ -4675,7 +4675,7 @@
                             ] ifFalse:[
                                 Silent ifFalse:[
                                     'Smalltalk [error]: ' _errorPrint. ex description _errorPrintCR.
-                                ].    
+                                ].
                                 (VerboseStartup or:[ObjectMemory debugPrinting]) ifTrue:[
                                     ex suspendedContext fullPrintAll.
                                 ].
@@ -4695,7 +4695,7 @@
                                 self exit:128+(OperatingSystem sigINT).
                             ] do:[
                                 |filterCode filterStart filterEnd|
-                                
+
                                 isFilter ifTrue:[
                                     "/ --filter - apply code to each input line.
                                     "/ compile code only once
@@ -4716,13 +4716,13 @@
                                             StandAlone := true.
                                             self exitWithErrorMessage:'--filter must be followed by 1 or 3 expression arg(s)'
                                         ].
-                                    ].    
-                                    filterStart notEmptyOrNil ifTrue:[ 
+                                    ].
+                                    filterStart notEmptyOrNil ifTrue:[
                                         VerboseStartup ifTrue:[
                                             ('Smalltalk [info]: eval: "', filterStart, '"...') infoPrintCR.
                                         ].
-                                        Compiler evaluate:filterStart notifying:(EvalScriptingErrorHandler new source:filterStart) 
-                                    ].    
+                                        Compiler evaluate:filterStart notifying:(EvalScriptingErrorHandler new source:filterStart)
+                                    ].
                                     VerboseStartup ifTrue:[
                                         ('Smalltalk [info]: compile: "', filterCode, '"...') infoPrintCR.
                                     ].
@@ -4737,12 +4737,12 @@
                                         line := Stdin nextLine.
                                         line doIt:line.
                                     ].
-                                    filterEnd notEmptyOrNil ifTrue:[ 
+                                    filterEnd notEmptyOrNil ifTrue:[
                                         VerboseStartup ifTrue:[
                                             ('Smalltalk [info]: eval: "', filterEnd, '"...') infoPrintCR.
                                         ].
-                                        Compiler evaluate:filterEnd notifying:(EvalScriptingErrorHandler new source:filterEnd) 
-                                    ].    
+                                        Compiler evaluate:filterEnd notifying:(EvalScriptingErrorHandler new source:filterEnd)
+                                    ].
                                 ] ifFalse:[
                                     (isPrint | isEval) ifTrue:[
                                         "/ --print or --eval
@@ -4767,24 +4767,24 @@
                                         ].
                                         (class respondsTo:#main:) ifTrue:[
                                             class main:CommandLineArguments.
-                                        ] ifFalse:[    
+                                        ] ifFalse:[
                                             (class respondsTo:#main) ifTrue:[
                                                 class main.
-                                            ] ifFalse:[    
+                                            ] ifFalse:[
                                                 (class respondsTo:#start) ifTrue:[
                                                     class start.
-                                                ] ifFalse:[    
+                                                ] ifFalse:[
                                                     StandAlone := true.
                                                     self exitWithErrorMessage:'class has no "main:", "main" or "start" method.'
-                                                ].    
-                                            ].    
-                                        ].    
-                                    ].    
+                                                ].
+                                            ].
+                                        ].
+                                    ].
                                 ].
                             ].
                         ].
                     ].
-                    
+
                     "/ after the script, if Screen has been opened and there are any open windows,
                     "/ then do not exit
 false ifTrue:[
@@ -4805,8 +4805,8 @@
                     VerboseStartup ifTrue:[
                         ('Smalltalk [info]: script/repl/eval finished.') infoPrintCR.
                     ].
-                    
-                ] newProcess.    
+
+                ] newProcess.
                 process priority:(Processor userSchedulingPriority).
                 process name:'main'.
                 process beGroupLeader.
@@ -5408,7 +5408,7 @@
     <resource: #obsolete>
 
     self obsoleteFeatureWarning:'Use `UserPreferences current languageTerritory: ...`'      .
-    
+
     "
      Time now
 
@@ -5723,7 +5723,7 @@
     "
      self installAutoloadedClassesFromAbbrevFile:('../../goodies/communication/abbrev.stc' asFilename)
     "
-    
+
     "Created: / 29-07-2011 / 20:39:21 / cg"
 !
 
@@ -6918,7 +6918,7 @@
         oldRealPath := RealSystemPath.
         RealSystemPath := nil.
     ].
-    
+
     [
         (Class updateChangeFileQuerySignal , Class updateChangeListQuerySignal) answer:logged do:[
             "JV: Changed to give ProgrammingLanguage to choose
@@ -7030,29 +7030,29 @@
     "{ Pragma: +optSpace }"
 
     |topDirectory|
-    
+
     (topDirectory := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[
         topDirectory := topDirectory asFilename.
         (topDirectory directory / 'stc') exists ifTrue:[
             topDirectory := topDirectory directory.
-        ] ifFalse:[    
+        ] ifFalse:[
             (topDirectory directory directory / 'stc') exists ifTrue:[
                 topDirectory := topDirectory directory directory.
-            ] ifFalse:[    
+            ] ifFalse:[
                 (topDirectory directory directory directory / 'stc') exists ifTrue:[
                     topDirectory := topDirectory directory directory directory.
                 ] ifFalse:[
                     topDirectory := nil
-                ].    
-            ].    
-        ].    
+                ].
+            ].
+        ].
         topDirectory notNil ifTrue:[
             "/ one above "stx"
-            topDirectory := topDirectory directory pathName. 
+            topDirectory := topDirectory directory pathName.
             (PackagePath includes:topDirectory) ifFalse:[
                 PackagePath add:topDirectory
-            ]    
-        ]    
+            ]
+        ]
     ].
 !
 
@@ -7060,14 +7060,14 @@
     "{ Pragma: +optSpace }"
 
     |workspaceDirectory|
-    
+
     (workspaceDirectory := UserPreferences current workspaceDirectory) notNil ifTrue:[
         (workspaceDirectory := workspaceDirectory asFilename) exists ifTrue:[
-            workspaceDirectory := workspaceDirectory pathName. 
+            workspaceDirectory := workspaceDirectory pathName.
             (PackagePath includes:workspaceDirectory) ifFalse:[
                 PackagePath addFirst:workspaceDirectory
-            ]    
-        ]    
+            ]
+        ]
     ].
 !
 
@@ -8407,17 +8407,17 @@
 
     Smalltalk realSystemPath do:[:dirName |
         |packageDir|
-        
+
         packageDir := dirName asFilename / 'packages'.
         (packageDir exists and:[packageDir isDirectory]) ifTrue:[
             packageDir directoryContentsAsFilenames sort do:[:fn |
-                |item base nm path parentPath parent isLibrary isApplication isAlreadyLoaded 
+                |item base nm path parentPath parent isLibrary isApplication isAlreadyLoaded
                  defClass target type nameComponents packageName packageID|
 
-                ((fn suffix = 'mcz') 
-                or:[ fn isDirectory   
-                or:[ (fn baseName startsWith:'.')   
-                or:[ (fn baseName = 'README') ]]]) ifFalse:[    
+                ((fn suffix = 'mcz')
+                or:[ fn isDirectory
+                or:[ (fn baseName startsWith:'.')
+                or:[ (fn baseName = 'README') ]]]) ifFalse:[
                     base := fn withoutSuffix baseName.
                     (base startsWith:'lib') ifTrue:[
                         nm := (base copyFrom:4).
@@ -8435,19 +8435,19 @@
                         (fn suffix = 'mcz') ifTrue:[
                             packageName := fn withoutSuffix.
                             target := fn.
-                        ] ifFalse:[ 
+                        ] ifFalse:[
                             ( #('dll' 'so' 'sl' 'dylib') includes:(fn suffix)) ifTrue:[
                                 (base startsWith:'lib') ifTrue:[
                                     nm := base copyFrom:4.
                                 ] ifFalse:[
                                     nm := base.
-                                ].    
-                            ]. 
+                                ].
+                            ].
                             nameComponents := nm asCollectionOfSubstringsSeparatedBy:$_.
                             packageName := nameComponents first.
                             nameComponents size > 1 ifTrue:[
                                 packageName := packageName,':',((nameComponents from:2) asStringWith:'/')
-                            ]. 
+                            ].
                         ].
                         packageName notNil ifTrue:[
                             aBlock value:packageName value:type value:fn .
@@ -8557,11 +8557,11 @@
      this smalltalk was compiled."
 
 %{  /* NOCONTEXT */
-    extern char *__getConfigurationString();
-
-    RETURN (__MKSTRING(__getConfigurationString() COMMA_SND));
+    extern char *__getBuildTargetString(void);
+
+    RETURN (__MKSTRING(__getBuildTargetString()));
 %}.
-    ^ 'unknownOS/unknownCONF:unknownPACK'
+    self primitiveFailed.
 
     "
      Smalltalk configuration
@@ -8643,7 +8643,7 @@
         with:(self versionDate)
 
     "
-     Smalltalk fullVersionString 
+     Smalltalk fullVersionString
     "
 
     "Created: / 27.10.1997 / 17:03:09 / cg"
@@ -8687,7 +8687,7 @@
         bitsPerWordString := (ExternalAddress pointerSize * 8) printString,bit,' '.
     ] ifFalse:[
         bitsPerWordString := ''
-    ].        
+    ].
 
     ^ proto bindWith:('Smalltalk/X jv-branch' allBold)
                 with:(self versionString)
@@ -8696,7 +8696,7 @@
 
     "
      Smalltalk language:#us.
-     Smalltalk hello 
+     Smalltalk hello
 
      Smalltalk language:#de.
      Smalltalk hello
@@ -8763,7 +8763,7 @@
      ST/X revision Naming is:
         <major>.<minor>.<revision>.<release>"
 
-    ^ 8 
+    ^ 8
 
     "
      Smalltalk majorVersionNr
@@ -8783,7 +8783,7 @@
      ST/X revision Naming is:
         <major>.<minor>.<revision>.<release>"
 
-    ^ 0 
+    ^ 0
 
     "
      Smalltalk minorVersionNr
@@ -8847,7 +8847,7 @@
      ST/X revision Naming is:
         <major>.<minor>.<revision>.<release>"
 
-    ^ 0 
+    ^ 0
 
     "
      Smalltalk revisionNr
@@ -8915,7 +8915,6 @@
 
 %{  /* NOCONTEXT */
     extern char *__getBuildDateString();
-
     RETURN (__MKSTRING(__getBuildDateString() COMMA_SND) );
 %}.
     ^ 'today'