Nicolas Cellier uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-nice.75.mcz==================== Summary ====================
Name: Files-nice.75
Author: nice
Time: 19 March 2010, 7:20:45.018 pm
UUID: f57e8994-da41-034e-965d-147528eab731
Ancestors: Files-cmm.74
Let nextPut: answer the put object.
Same for nextPutAll:, answer the collection argument
=============== Diff against Files-cmm.74 ===============
Item was changed:
----- Method: CompressedSourceStream>>nextPutAll: (in category 'access') -----
nextPutAll: str
| n nInSeg |
n := str size.
n <= (writeLimit - position) ifTrue:
["All characters fit in buffer"
collection replaceFrom: position + 1 to: position + n with: str.
dirty := true.
position := position + n.
readLimit := readLimit max: position.
endOfFile := endOfFile max: self position.
^ str].
"Write what fits in segment. Then (after positioning) write what remains"
nInSeg := writeLimit - position.
nInSeg = 0
ifTrue: [self position: self position.
self nextPutAll: str]
ifFalse: [self nextPutAll: (str first: nInSeg).
self position: self position.
+ self nextPutAll: (str allButFirst: nInSeg)].
+ ^str
- self nextPutAll: (str allButFirst: nInSeg)]
!
Item was changed:
----- Method: HtmlFileStream>>nextPutAll: (in category 'read, write, position') -----
nextPutAll: aString
"Write the whole string, translating as we go. 4/6/96 tk"
"Slow, but faster than using aString asHtml?"
+ ^aString do: [:each | self nextPut: each].!
- aString do: [:each | self nextPut: each].!