--- a/ExtStream.st Wed Jun 26 09:38:10 1996 +0200
+++ b/ExtStream.st Wed Jun 26 09:39:03 1996 +0200
@@ -211,7 +211,7 @@
%}
! !
-!ExternalStream class methodsFor:'documentation'!
+!ExternalStream class methodsFor:'documentation'!
copyright
"
@@ -331,7 +331,7 @@
"
! !
-!ExternalStream class methodsFor:'initialization'!
+!ExternalStream class methodsFor:'initialization'!
initialize
OpenErrorSignal isNil ifTrue:[
@@ -386,7 +386,7 @@
"Created: 15.6.1996 / 15:19:59 / cg"
! !
-!ExternalStream class methodsFor:'instance creation'!
+!ExternalStream class methodsFor:'instance creation'!
forFileDescriptor:aFileDescriptor mode:mode
|newStream|
@@ -535,7 +535,7 @@
^ newStream
! !
-!ExternalStream class methodsFor:'Signal constants'!
+!ExternalStream class methodsFor:'Signal constants'!
invalidModeSignal
"return the signal raised when doing text-I/O with a binary stream
@@ -575,7 +575,7 @@
^ StreamNotOpenSignal
! !
-!ExternalStream class methodsFor:'error handling'!
+!ExternalStream class methodsFor:'error handling'!
lastErrorNumber
"return the errno of the last error"
@@ -2995,59 +2995,20 @@
"
!
-skipThroughAll:aString
- "search & skip for the sequence given by the argument, aCollection;
- return nil if not found, self otherwise. If successful, the next read
- will return the character after the searchstring."
-
- |buffer len first|
-
- (aString isString and:[binary not]) ifTrue:[
- len := aString size.
- first := aString at:1.
- buffer := String new:len.
- buffer at:1 put:first.
- len := len - 1.
- [true] whileTrue:[
- (self skipThrough:first) isNil ifTrue:[
- ^ nil.
- ].
- (self nextBytes:len into:buffer startingAt:2) == len ifFalse:[
- ^ nil
- ].
- buffer = aString ifTrue:[
- "
- position back, before string
- "
- ^ self
- ].
- ].
- "NOT REACHED"
- ].
- ^ super skipThroughAll:aString
-
- "
- |s|
- s := 'Makefile' asFilename readStream.
- s skipThroughAll:'are'.
- s next:10
- "
-!
-
skipToAll:aString
"skip for the sequence given by the argument, aCollection;
- return nil if not found, self otherwise. On a successful match, next read
- will return characters of aString."
+ return nil if not found, self otherwise.
+ On a successful match, the next read will return characters of aString."
|oldPos|
oldPos := self position.
(self skipThroughAll:aString) isNil ifTrue:[
- "
- restore position
- "
- self position:oldPos.
- ^ nil
+ "
+ restore position
+ "
+ self position:oldPos.
+ ^ nil
].
"
position before match-string
@@ -3059,8 +3020,10 @@
|s|
s := 'Makefile' asFilename readStream.
s skipToAll:'are'.
- s next:10
+ s next:10
"
+
+ "Modified: 26.6.1996 / 09:22:05 / cg"
! !
!ExternalStream methodsFor:'testing'!
@@ -3508,9 +3471,9 @@
^ super nextPutAll:aCollection startingAt:start to:stop
! !
-!ExternalStream class methodsFor:'documentation'!
+!ExternalStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.106 1996-06-18 09:40:53 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.107 1996-06-26 07:39:03 cg Exp $'
! !
ExternalStream initialize!