Smalltalk.st
changeset 122 1680ab5285c4
parent 95 d22739a0c6e9
child 146 7c684e19ddc7
--- a/Smalltalk.st	Mon Aug 22 14:14:03 1994 +0200
+++ b/Smalltalk.st	Mon Aug 22 14:14:23 1994 +0200
@@ -16,7 +16,8 @@
                            StartupClass StartupSelector StartupArguments
                            CachedAbbreviations
                            SilentLoading Initializing
-                           StandAlone'
+                           StandAlone
+                           LogDoits'
        poolDictionaries:''
        category:'System-Support'
 !
@@ -25,7 +26,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
              All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.19 1994-08-05 01:02:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.20 1994-08-22 12:14:23 claus Exp $
 '!
 
 "
@@ -54,7 +55,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.19 1994-08-05 01:02:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.20 1994-08-22 12:14:23 claus Exp $
 "
 !
 
@@ -90,6 +91,10 @@
 
         SilentLoading   <Boolean>       suppresses messages during fileIn and in compiler
                                         (can be set to true from a customized main)
+
+        LogDoits        <Boolean>       if true, doits are also logged in the changes
+                                        file. Default is false, since the changes file
+                                        may become huge ...
 "
 ! !
 
@@ -146,7 +151,7 @@
      Smalltalk versionString
     "
 "
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.19 1994-08-05 01:02:39 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.20 1994-08-22 12:14:23 claus Exp $
 "
 !
 
@@ -290,6 +295,12 @@
     "Smalltalk initialize"
 !
 
+initUserPreferences
+    "setup other stuff"
+
+    LogDoits := false
+!
+
 initGlobalsFromEnvironment
     "setup globals from the shell-environment"
 
@@ -1220,6 +1231,30 @@
     ^ LanguageTerritory
 !
 
+logDoits
+    "return true if doits should go into the changes file
+     as well as changes - by default, this is off, since
+     it can blow up the changes file enormously ...
+    "
+
+    ^ LogDoits
+
+    "
+     LogDoits := false
+     LogDoits := true
+    "
+!
+
+logDoits:aBoolean
+    "turn on/off logging of doits in the changes file.
+     By default, this is off, since it can blow up the 
+     changes file enormously ...
+    "
+
+    LogDoits := aBoolean
+
+!
+
 systemPath
     "return a collection of directorynames, where smalltalk
      looks for system files 
@@ -1281,12 +1316,14 @@
         [aStream atEnd] whileFalse:[
             line := aStream nextLine.
             line notNil ifTrue:[
-                (line countWords == 2) ifTrue:[
-                    index := line indexOfSeparatorStartingAt:1.
-                    (index ~~ 0) ifTrue:[
-                        thisName := line copyTo:(index - 1).
-                        abbrev := (line copyFrom:index) withoutSeparators.
-                        CachedAbbreviations at:thisName put:abbrev.
+                (line startsWith:'#') ifFalse:[
+                    (line countWords == 2) ifTrue:[
+                        index := line indexOfSeparatorStartingAt:1.
+                        (index ~~ 0) ifTrue:[
+                            thisName := line copyTo:(index - 1).
+                            abbrev := (line copyFrom:index) withoutSeparators.
+                            CachedAbbreviations at:thisName put:abbrev.
+                        ]
                     ]
                 ]
             ]
@@ -1305,7 +1342,8 @@
     ].
     ^ CachedAbbreviations
 
-    "
+    "flush with:
+
      CachedAbbreviations := nil
     "
 !
@@ -1379,7 +1417,19 @@
     "read in the named file - look for it in some standard places;
      return true if ok, false if failed"
 
-    |aStream|
+    |aStream path|
+
+    "
+     an object or shared object ?
+    "
+    ((aFileName endsWith:'.o')
+    or:[(aFileName endsWith:'.obj')
+    or:[aFileName endsWith:'.so']]) ifTrue:[
+        ObjectFileLoader isNil ifTrue:[^ false].
+	path := self getSystemFileName:aFileName.
+	path isNil ifTrue:[^ false].
+	^ ObjectFileLoader loadObjectFile:aFileName
+    ].
 
     aStream := self systemFileStreamFor:aFileName.
     aStream isNil ifTrue:[^ false].