--- a/NPExtStr.st Mon Sep 22 21:02:08 1997 +0200
+++ b/NPExtStr.st Mon Sep 22 21:04:17 1997 +0200
@@ -68,6 +68,8 @@
!NonPositionableExternalStream class methodsFor:'instance creation'!
forStderr
+ "{ Pragma: +optSpace }"
+
"return a NonPositionableExternalStream object for writing to
Unixes standard error output file descriptor"
@@ -78,6 +80,8 @@
!
forStdin
+ "{ Pragma: +optSpace }"
+
"return a NonPositionableExternalStream object for reading from
Unixes standard input file descriptor"
@@ -88,6 +92,8 @@
!
forStdout
+ "{ Pragma: +optSpace }"
+
"return a NonPositionableExternalStream object for writing to
Unixes standard output file descriptor"
@@ -100,6 +106,8 @@
!NonPositionableExternalStream methodsFor:'error handling'!
positionError
+ "{ Pragma: +optSpace }"
+
"notify that this stream has no concept of a position"
^ PositionErrorSignal raiseRequestWith:self in:thisContext sender
@@ -108,12 +116,16 @@
!NonPositionableExternalStream methodsFor:'positioning'!
position
+ "{ Pragma: +optSpace }"
+
"catch position - there is none here"
^ self positionError
!
position:aPosition
+ "{ Pragma: +optSpace }"
+
"catch position - there is none here"
^ self positionError
@@ -132,24 +144,34 @@
!NonPositionableExternalStream methodsFor:'printing & storing'!
printOn:aStream
+ "{ Pragma: +optSpace }"
+
"append a printed representation of the receiver on aStream"
+ |myName|
+
self == Stdin ifTrue:[
- aStream nextPutAll:'Stdin'.
- ^ self
+ myName := 'Stdin'.
+ ] ifFalse:[
+ self == Stdout ifTrue:[
+ myName := 'Stdout'.
+ ] ifFalse:[
+ self == Stderr ifTrue:[
+ myName := 'Stderr'.
+ ]
+ ]
].
- self == Stdout ifTrue:[
- aStream nextPutAll:'Stdout'.
- ^ self
- ].
- self == Stderr ifTrue:[
- aStream nextPutAll:'Stderr'.
+
+ myName notNil ifTrue:[
+ aStream nextPutAll:myName.
^ self
].
super printOn:aStream
!
storeOn:aStream
+ "{ Pragma: +optSpace }"
+
"append a printed representation of the receiver on aStream, from
which the receiver can be reconstructed."
@@ -164,6 +186,8 @@
!NonPositionableExternalStream methodsFor:'private'!
initializeForStderr
+ "{ Pragma: +optSpace }"
+
"setup for writing to stderr"
mode := #readwrite.
@@ -176,6 +200,8 @@
!
initializeForStdin
+ "{ Pragma: +optSpace }"
+
"setup for reading stdin"
mode := #readonly.
@@ -188,6 +214,8 @@
!
initializeForStdout
+ "{ Pragma: +optSpace }"
+
"setup for writing to stdout"
mode := #readwrite.
@@ -200,6 +228,8 @@
!
reOpen
+ "{ Pragma: +optSpace }"
+
"reopen the stream after an image restart.
If I am one of the standard streams, reopen is easy"
@@ -226,5 +256,5 @@
!NonPositionableExternalStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/NPExtStr.st,v 1.29 1997-09-04 21:02:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/NPExtStr.st,v 1.30 1997-09-22 19:04:17 cg Exp $'
! !
--- a/NonPositionableExternalStream.st Mon Sep 22 21:02:08 1997 +0200
+++ b/NonPositionableExternalStream.st Mon Sep 22 21:04:17 1997 +0200
@@ -68,6 +68,8 @@
!NonPositionableExternalStream class methodsFor:'instance creation'!
forStderr
+ "{ Pragma: +optSpace }"
+
"return a NonPositionableExternalStream object for writing to
Unixes standard error output file descriptor"
@@ -78,6 +80,8 @@
!
forStdin
+ "{ Pragma: +optSpace }"
+
"return a NonPositionableExternalStream object for reading from
Unixes standard input file descriptor"
@@ -88,6 +92,8 @@
!
forStdout
+ "{ Pragma: +optSpace }"
+
"return a NonPositionableExternalStream object for writing to
Unixes standard output file descriptor"
@@ -100,6 +106,8 @@
!NonPositionableExternalStream methodsFor:'error handling'!
positionError
+ "{ Pragma: +optSpace }"
+
"notify that this stream has no concept of a position"
^ PositionErrorSignal raiseRequestWith:self in:thisContext sender
@@ -108,12 +116,16 @@
!NonPositionableExternalStream methodsFor:'positioning'!
position
+ "{ Pragma: +optSpace }"
+
"catch position - there is none here"
^ self positionError
!
position:aPosition
+ "{ Pragma: +optSpace }"
+
"catch position - there is none here"
^ self positionError
@@ -132,24 +144,34 @@
!NonPositionableExternalStream methodsFor:'printing & storing'!
printOn:aStream
+ "{ Pragma: +optSpace }"
+
"append a printed representation of the receiver on aStream"
+ |myName|
+
self == Stdin ifTrue:[
- aStream nextPutAll:'Stdin'.
- ^ self
+ myName := 'Stdin'.
+ ] ifFalse:[
+ self == Stdout ifTrue:[
+ myName := 'Stdout'.
+ ] ifFalse:[
+ self == Stderr ifTrue:[
+ myName := 'Stderr'.
+ ]
+ ]
].
- self == Stdout ifTrue:[
- aStream nextPutAll:'Stdout'.
- ^ self
- ].
- self == Stderr ifTrue:[
- aStream nextPutAll:'Stderr'.
+
+ myName notNil ifTrue:[
+ aStream nextPutAll:myName.
^ self
].
super printOn:aStream
!
storeOn:aStream
+ "{ Pragma: +optSpace }"
+
"append a printed representation of the receiver on aStream, from
which the receiver can be reconstructed."
@@ -164,6 +186,8 @@
!NonPositionableExternalStream methodsFor:'private'!
initializeForStderr
+ "{ Pragma: +optSpace }"
+
"setup for writing to stderr"
mode := #readwrite.
@@ -176,6 +200,8 @@
!
initializeForStdin
+ "{ Pragma: +optSpace }"
+
"setup for reading stdin"
mode := #readonly.
@@ -188,6 +214,8 @@
!
initializeForStdout
+ "{ Pragma: +optSpace }"
+
"setup for writing to stdout"
mode := #readwrite.
@@ -200,6 +228,8 @@
!
reOpen
+ "{ Pragma: +optSpace }"
+
"reopen the stream after an image restart.
If I am one of the standard streams, reopen is easy"
@@ -226,5 +256,5 @@
!NonPositionableExternalStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.29 1997-09-04 21:02:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.30 1997-09-22 19:04:17 cg Exp $'
! !
--- a/OpenVMSFilename.st Mon Sep 22 21:02:08 1997 +0200
+++ b/OpenVMSFilename.st Mon Sep 22 21:04:17 1997 +0200
@@ -239,12 +239,13 @@
sep := $\
].
- "/ although not legal,
+ "/ although not a legal VMS name,
"/ we support the form volume:<unixPath>
"/ this makes your life easier in the FileBrowser
"/ or FileEntry dialogs. However, you should not
"/ place such filenames into your program, since
"/ those are not compatible with UNIX/MSDOS conventions
+ "/ i.e. that should be used for user-entered pathNames only.
"/
idx1 := nameString indexOf:sep.
idx2 := nameString indexOf:$:.
@@ -319,7 +320,11 @@
d isEmpty ifTrue:[
d := nameString copyFrom:idx0 to:(idx-1).
] ifFalse:[
- d := d , '.' , (nameString copyFrom:idx0 to:(idx-1)).
+ (d endsWith:$.) ifTrue:[
+ d := d , (nameString copyFrom:idx0 to:(idx-1)).
+ ] ifFalse:[
+ d := d , '.' , (nameString copyFrom:idx0 to:(idx-1)).
+ ]
].
idx := idx + 1.
@@ -381,7 +386,10 @@
!
directorySuffix
- ^ '.DIR'
+ "Return the suffix for directories.
+ In VMS, all directories have a '.dir' extension."
+
+ ^ 'DIR'
!
isBadCharacter:aCharacter
@@ -1054,5 +1062,5 @@
!OpenVMSFilename class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFilename.st,v 1.10 1997-09-20 21:51:40 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFilename.st,v 1.11 1997-09-22 19:04:17 cg Exp $'
! !