--- a/PPStream.st Sat Nov 01 00:34:30 2014 +0000
+++ b/PPStream.st Mon Nov 03 09:10:56 2014 +0000
@@ -8,6 +8,7 @@
!
+
!PPStream methodsFor:'accessing'!
collection
@@ -38,6 +39,14 @@
position := anInteger
!
+size
+ "
+ The same implementation as a ReadStream. Implemented here for compatibility with Smalltalk/X
+ that has different implementation in a ReadStream
+ "
+ ^readLimit
+!
+
uncheckedPeek
"An unchecked version of peek that throws an error if we try to peek over the end of the stream, even faster than #peek."
@@ -64,29 +73,23 @@
!PPStream methodsFor:'queries'!
insideCRLF
- (position < 1) ifTrue: [ ^ false ].
-
- ^ (self peek = (Character codePoint: 10)) and: [ self peekBack = (Character codePoint: 13) ]
+ (position < 1) ifTrue: [ ^ false ].
+
+ ^ (self peek = (Character codePoint: 10)) and: [ self peekBack = (Character codePoint: 13) ]
+!
- "Modified: / 03-10-2014 / 23:52:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+isEndOfLine
+ self atEnd ifTrue: [ ^ true ].
+ self insideCRLF ifTrue: [ ^ false ].
+ ^ (self peek = (Character codePoint: 13) or: [ self peek = (Character codePoint: 10)]).
!
isStartOfLine
- (position = 0) ifTrue: [ ^ true ].
-
- self insideCRLF ifTrue: [ ^ false ].
-
- ^ (self peekBack = (Character codePoint: 13)) or: [ self peekBack = (Character codePoint: 10)].
+ (position = 0) ifTrue: [ ^ true ].
- "Modified: / 03-10-2014 / 23:52:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-size
- ^ readLimit
- "DO NOT REMOVE this method event though in Pharo it is the same as
- inherited. This is required for Smalltalk/X compatibility"
-
- "Created: / 08-10-2014 / 12:25:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ self insideCRLF ifTrue: [ ^ false ].
+
+ ^ (self peekBack = (Character codePoint: 13)) or: [ self peekBack = (Character codePoint: 10)].
! !
!PPStream class methodsFor:'documentation'!