[squeak-dev] The Inbox: Graphics-jdr.177.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jan 21 16:50:09 UTC 2011


A new version of Graphics was added to project The Inbox:
http://source.squeak.org/inbox/Graphics-jdr.177.mcz

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

Name: Graphics-jdr.177
Author: jdr
Time: 21 January 2011, 11:48:51.942 am
UUID: 82017dd9-eb5e-4170-b183-14122bb13439
Ancestors: Graphics-jdr.176

Bug reading a truncated file, added pgm extension

=============== Diff against Graphics-jdr.176 ===============

Item was changed:
  ----- Method: PNMReadWriter class>>typicalFileExtensions (in category 'image reading/writing') -----
  typicalFileExtensions
  	"Answer a collection of file extensions (lowercase) which files that I can read might commonly have"
+ 	^#('pbm' 'pgm' 'pnm' 'ppm' 'pam')!
- 	^#('pbm' 'pnm' 'ppm' 'pam')!

Item was changed:
  ----- Method: PNMReadWriter>>cleanLine (in category 'reading') -----
  cleanLine
  	"upTo LF or CR, tab as space"
  
  	| line loop b |
+ 	stream atEnd ifTrue:[self error:'End of Data'].
+ 	
  	line := WriteStream with: ''.
  	loop := true.
  	[loop] whileTrue: [
  		b := stream next.
  		b ifNil:[
  			loop := false		"EOS"
  		]
  		ifNotNil: [
  			(b = (Character cr) or:[b = Character lf]) ifTrue:[
  				loop := false.
  			]
  			ifFalse:[
  				b = (Character tab) ifTrue:[b := Character space].
  				line nextPut: b.
  			]
  		]
  	].
  	^line contents!




More information about the Squeak-dev mailing list