The Trunk: Files-ul.51.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Files-ul.51.mcz

commits-2
Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.51.mcz

==================== Summary ====================

Name: Files-ul.51
Author: ul
Time: 8 December 2009, 7:04:22 am
UUID: 32264a5d-8b26-8745-8aae-2084ba6a1725
Ancestors: Files-nice.50, Files-ul.50

- buffer friendly #skip:

=============== Diff against Files-nice.50 ===============

Item was changed:
  ----- Method: StandardFileStream>>skip: (in category 'read, write, position') -----
  skip: n
  "Set the character position to n characters from the current position.
  Error if not enough characters left in the file.  1/31/96 sw"
 
+ collection ifNotNil: [
+ position < readLimit ifTrue: [
+ | newPosition |
+ ((newPosition := position + n) >= 0 and: [ newPosition < readLimit ])
+ ifTrue: [
+ position := newPosition.
+ ^self ] ] ].
  self position: self position + n!