--- a/XWorkstation.st Fri Feb 28 18:40:12 2003 +0100
+++ b/XWorkstation.st Sun Mar 02 19:37:17 2003 +0100
@@ -549,14 +549,14 @@
X specific: search the requestCode in '/usr/lib/X11/XErrorDB',
and append the name of the corresponding X-request
"
- s := '/usr/lib/X11/XErrorDB' asFilename readStream.
+ s := '/usr/lib/X11/XErrorDB' asFilename readStreamOrNil.
s notNil ifTrue:[
- match := 'XRequest.' , requestCode printString.
- line := s peekForLineStartingWith:match.
- line notNil ifTrue:[
- string := string , ' in ' , (line copyFrom:(line indexOf:$:)+1)
- ].
- s close.
+ match := 'XRequest.' , requestCode printString.
+ line := s peekForLineStartingWith:match.
+ line notNil ifTrue:[
+ string := string , ' in ' , (line copyFrom:(line indexOf:$:)+1)
+ ].
+ s close.
].
^ string
!
@@ -2373,26 +2373,26 @@
|aStream list line index colorName|
- aStream := FileStream readonlyFileNamed:'/usr/lib/X11/rgb.txt'.
+ aStream := '/usr/lib/X11/rgb.txt' asFilename readStreamOrNil.
aStream isNil ifTrue:[^ nil].
list := OrderedCollection new.
[aStream atEnd] whileFalse:[
- line := aStream nextLine.
- line notNil ifTrue:[
- "skip the r/g/b numbers"
- index := 1.
- [(line at:index) isSeparator] whileTrue:[index := index + 1].
- [(line at:index) isDigit] whileTrue:[index := index + 1].
- [(line at:index) isSeparator] whileTrue:[index := index + 1].
- [(line at:index) isDigit] whileTrue:[index := index + 1].
- [(line at:index) isSeparator] whileTrue:[index := index + 1].
- [(line at:index) isDigit] whileTrue:[index := index + 1].
- [(line at:index) isSeparator] whileTrue:[index := index + 1].
- colorName := line copyFrom:index.
- ((colorName occurrencesOf:(Character space)) == 0) ifTrue:[
- list add:colorName
- ]
- ]
+ line := aStream nextLine.
+ line notNil ifTrue:[
+ "skip the r/g/b numbers"
+ index := 1.
+ [(line at:index) isSeparator] whileTrue:[index := index + 1].
+ [(line at:index) isDigit] whileTrue:[index := index + 1].
+ [(line at:index) isSeparator] whileTrue:[index := index + 1].
+ [(line at:index) isDigit] whileTrue:[index := index + 1].
+ [(line at:index) isSeparator] whileTrue:[index := index + 1].
+ [(line at:index) isDigit] whileTrue:[index := index + 1].
+ [(line at:index) isSeparator] whileTrue:[index := index + 1].
+ colorName := line copyFrom:index.
+ ((colorName occurrencesOf:(Character space)) == 0) ifTrue:[
+ list add:colorName
+ ]
+ ]
].
aStream close.
^ list sort
@@ -11001,7 +11001,7 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.428 2003-02-25 09:30:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.429 2003-03-02 18:37:17 stefan Exp $'
! !
XWorkstation initialize!