Smalltalk.st
changeset 5037 24d659c136e1
parent 4970 c5ab8ead5b8e
child 5038 d74e7c71ae75
--- a/Smalltalk.st	Wed Dec 01 19:16:20 1999 +0100
+++ b/Smalltalk.st	Wed Dec 01 19:38:07 1999 +0100
@@ -258,53 +258,56 @@
 initSystemPath
     "setup path where system files are searched for.
      the default path is set to:
-	    .
-	    $HOME                    (if defined)
-	    $HOME/.smalltalk         (if defined & existing)
-	    $SMALLTALK_LIBDIR        (if defined & existing)
-	    $STX_LIBDIR              (if defined & existing)
+            .
+            $HOME                    (if defined)
+            $HOME/.smalltalk         (if defined & existing)
+            $SMALLTALK_LIBDIR        (if defined & existing)
+            $STX_LIBDIR              (if defined & existing)
+            $STX_TOPDIR              (if defined & existing)
 
      unix:
-	    /usr/local/lib/smalltalk (if existing)
-	    /usr/lib/smalltalk       (if existing)
-	    /lib/smalltalk           (if existing)
+            /opt/smalltalk           (if existing)
+            /opt/smalltalk/release   (if existing)
+            /usr/local/lib/smalltalk (if existing)
+            /usr/lib/smalltalk       (if existing)
+            /lib/smalltalk           (if existing)
 
      win32:
-	    \smalltalk                (if existing)
-	    \programs\smalltalk       (if existing)
-	    \programs\exept\smalltalk (if existing)
+            \smalltalk                (if existing)
+            \programs\smalltalk       (if existing)
+            \programs\exept\smalltalk (if existing)
 
      vms:
-	    $stx:lib                 (if existing)
-	    $stx:root                (if existing)
+            $stx:lib                 (if existing)
+            $stx:root                (if existing)
 
      of course, it is possible to add entries from the 'smalltalk.rc'
      startup file; add expressions such as:
-	    Smalltalk systemPath addFirst:'/foo/bar/baz'.
-	or: 
-	    Smalltalk systemPath addLast:'/fee/foe/foo'.
+            Smalltalk systemPath addFirst:'/foo/bar/baz'.
+        or: 
+            Smalltalk systemPath addLast:'/fee/foe/foo'.
 
      However, smalltalk.rc itself must be found along the above path.
     "
 
     ChangeFileName := 'changes'.
     OperatingSystem isVMSlike ifTrue:[
-	BitmapDirName := 'bitmaps.dir'.
-	BinaryDirName := 'binary.dir'.
-	SourceDirName := 'source.dir'.
-	ResourceDirName := 'resources.dir'.
-	FileInDirName := 'filein.dir'.
+        BitmapDirName := 'bitmaps.dir'.
+        BinaryDirName := 'binary.dir'.
+        SourceDirName := 'source.dir'.
+        ResourceDirName := 'resources.dir'.
+        FileInDirName := 'filein.dir'.
     ] ifFalse:[
-	BitmapDirName := 'bitmaps'.
-	BinaryDirName := 'binary'.
-	SourceDirName := 'source'.
-	ResourceDirName := 'resources'.
-	FileInDirName := 'fileIn'.
+        BitmapDirName := 'bitmaps'.
+        BinaryDirName := 'binary'.
+        SourceDirName := 'source'.
+        ResourceDirName := 'resources'.
+        FileInDirName := 'fileIn'.
     ].
 
     SystemPath isNil ifTrue:[
-	SystemPath := OperatingSystem defaultSystemPath.
-	self flushPathCaches
+        SystemPath := OperatingSystem defaultSystemPath.
+        self flushPathCaches
     ]
 
     "
@@ -3981,10 +3984,11 @@
     "/ and enumerate its abbrev.stc files...
     f := Smalltalk getSystemFileName:'packages'.
     f notNil ifTrue:[
-	f := f asFilename.
-	f isDirectory ifTrue:[
-	    self recursiveReadAllAbbreviationsFrom:f.
-	].
+        f := f asFilename.
+        f isDirectory ifTrue:[
+            ('Smalltalk [info]: reading all class abbreviations found under ''' , f pathName ,'''') infoPrintCR.
+            self recursiveReadAllAbbreviationsFrom:f.
+        ].
     ].
 
     "/ old scheme: look for a single file called 'abbrev.stc' in the
@@ -3992,9 +3996,10 @@
 
     aStream := self systemFileStreamFor:'include/abbrev.stc'.
     aStream notNil ifTrue:[
-	self readAbbreviationsFromStream:aStream.
+        ('Smalltalk [info]: reading class abbreviations from ''' , aStream pathName ,'''') infoPrintCR.
+        self readAbbreviationsFromStream:aStream.
     ] ifFalse:[
-	('Smalltalk [warning]: no ''abbrev.stc'' file found') infoPrintCR
+        ('Smalltalk [warning]: no ''abbrev.stc'' file found') infoPrintCR
     ].
     ^ CachedAbbreviations
 
@@ -4013,63 +4018,62 @@
 
     abbrevs := CachedAbbreviations.
 
-    ('Smalltalk [info]: reading class abbreviations from ''' , aStream pathName ,'''') infoPrintCR.
     [aStream atEnd] whileFalse:[
-	line := aStream nextLine.
-	line notNil ifTrue:[
-	    (line startsWith:'#') ifFalse:[
-
-		"/ must do it manually, caring for quoted strings.
+        line := aStream nextLine.
+        line notNil ifTrue:[
+            (line startsWith:'#') ifFalse:[
+
+                "/ must do it manually, caring for quoted strings.
 "/                words := line asCollectionOfWords.
 
-		words := OrderedCollection new.
-		s := line readStream.
-		[s atEnd] whileFalse:[
-		    s skipSeparators.
-		    s peek == $' ifTrue:[
-			s next.
-			w := s upTo:$'.
-			s skipSeparators.
-		    ] ifFalse:[
-			w := s upToSeparator
-		    ].
-		    words add:w
-		].
-		words size >= 2 ifTrue:[
-		    nm := (words at:1) withoutSeparators.
-		    abbrev := (words at:2) withoutSeparators.
-		    nm ~= abbrev ifTrue:[
-			key := nm asSymbol.    
-			oldAbbrev := abbrevs at:key ifAbsent:nil.
-			oldAbbrev notNil ifTrue:[
-			    oldAbbrev ~= abbrev ifTrue:[
-				StandAlone ifFalse:[
-				    ('Smalltalk [warning]: conflict for: ' , nm , ' in abbrev.stc (' , oldAbbrev , ' <-> ' , abbrev , ')') infoPrintCR
-				]
-			    ].
-			] ifFalse:[
-			    cls := self classNamed:abbrev.
-
-			    cls notNil ifTrue:[
-				cls name ~= nm ifTrue:[
-				    "/ ok, there is a class named after this abbrev ...
-				    "/ this is only a conflict, if the other class has no
-				    "/ abbreviation (or the same).
-				    (abbrevs at:(cls name asSymbol) ifAbsent:cls name) = abbrev ifTrue:[
-					cls isNamespace ifFalse:[
-					    StandAlone ifFalse:[
-						('Smalltalk [warning]: conflict for: ' , cls name , ' in abbrev.stc (' , nm , ' -> ' , abbrev , ')') infoPrintCR
-					    ]
-					]
-				    ]
-				]
-			    ].
-			    abbrevs at:nm asSymbol put:abbrev.
-			]
-		    ]
-		]
-	    ]
-	]
+                words := OrderedCollection new.
+                s := line readStream.
+                [s atEnd] whileFalse:[
+                    s skipSeparators.
+                    s peek == $' ifTrue:[
+                        s next.
+                        w := s upTo:$'.
+                        s skipSeparators.
+                    ] ifFalse:[
+                        w := s upToSeparator
+                    ].
+                    words add:w
+                ].
+                words size >= 2 ifTrue:[
+                    nm := (words at:1) withoutSeparators.
+                    abbrev := (words at:2) withoutSeparators.
+                    nm ~= abbrev ifTrue:[
+                        key := nm asSymbol.    
+                        oldAbbrev := abbrevs at:key ifAbsent:nil.
+                        oldAbbrev notNil ifTrue:[
+                            oldAbbrev ~= abbrev ifTrue:[
+                                StandAlone ifFalse:[
+                                    ('Smalltalk [warning]: conflict for: ' , nm , ' in abbrev.stc (' , oldAbbrev , ' <-> ' , abbrev , ')') infoPrintCR
+                                ]
+                            ].
+                        ] ifFalse:[
+                            cls := self classNamed:abbrev.
+
+                            cls notNil ifTrue:[
+                                cls name ~= nm ifTrue:[
+                                    "/ ok, there is a class named after this abbrev ...
+                                    "/ this is only a conflict, if the other class has no
+                                    "/ abbreviation (or the same).
+                                    (abbrevs at:(cls name asSymbol) ifAbsent:cls name) = abbrev ifTrue:[
+                                        cls isNamespace ifFalse:[
+                                            StandAlone ifFalse:[
+                                                ('Smalltalk [warning]: conflict for: ' , cls name , ' in abbrev.stc (' , nm , ' -> ' , abbrev , ')') infoPrintCR
+                                            ]
+                                        ]
+                                    ]
+                                ]
+                            ].
+                            abbrevs at:nm asSymbol put:abbrev.
+                        ]
+                    ]
+                ]
+            ]
+        ]
     ].
 !
 
@@ -4927,5 +4931,5 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.371 1999-11-08 14:40:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.372 1999-12-01 18:38:07 cg Exp $'
 ! !