[BUG][FIX] crlf fix fix
Michael Rueger
Michael.Rueger.-ND at disney.com
Fri Feb 25 20:49:17 UTC 2000
...ooops sorry,
forgot one method.
Michael
--
"To improve is to change, to be perfect is to change often."
Winston Churchill
+------------------------------------------------------------+
| Michael Rueger |
| Phone: ++1 (818) 623 3283 Fax: ++1 (818) 623 3559 |
+---------- Michael.Rueger.-ND at corp.go.com ------------------+
-------------- next part --------------
"Change Set: CrLf-fix-mir
Date: 25 February 2000
Author: Michael Rueger
Fixes a bug in CrLfFileStream preventing from correctly detecting lineEndConvention for a crlf file.
"!
!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!
basicNext
"Answer the next byte from this file, or nil if at the end of the file."
| count |
count _ self primRead: fileID into: buffer1 startingAt: 1 count: 1.
count = 1
ifTrue: [^ buffer1 at: 1]
ifFalse: [^ nil].
! !
!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!
next
"Answer the next byte from this file, or nil if at the end of the file."
^self basicNext! !
!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!
peek
"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil. "
| next |
self atEnd ifTrue: [^ nil].
next _ self basicNext.
self position: self position - 1.
^ next! !
More information about the Squeak-dev
mailing list
|