[squeak-dev] The Trunk: Graphics-nice.293.mcz

commits at source.squeak.org commits at source.squeak.org
Sat May 17 20:50:38 UTC 2014


Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.293.mcz

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

Name: Graphics-nice.293
Author: nice
Time: 17 May 2014, 10:49:09.105 pm
UUID: adb6fa29-fffc-4ec4-ab16-77ff98702aca
Ancestors: Graphics-nice.292

Merge Graphics-jdr.177 rotting in inbox since 21 January 2011: added pgm extension.
While at it, simplify cleanLine (it can now answer nil, but sole sender is protected).

=============== Diff against Graphics-nice.292 ===============

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"
  
+ 	^stream nextLine ifNotNil: [:line | line replaceAll: Character tab with: Character space]!
- 	| line loop b |
- 	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