[squeak-dev] The Trunk: Installer-Core-nice.394.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jul 24 20:42:18 UTC 2014


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

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

Name: Installer-Core-nice.394
Author: nice
Time: 24 July 2014, 10:41:53.896 pm
UUID: 4b5836b6-86f9-4ece-8533-508a079ebb06
Ancestors: Installer-Core-cmm.393

Replace usage of ReadWriteStream for piping transformations by alternate WriteStream converted to ReadStream.

=============== Diff against Installer-Core-cmm.393 ===============

Item was changed:
  ----- Method: InstallerInternetBased>>extractFromHtml:option: (in category 'as yet unclassified') -----
  extractFromHtml: html option: allOrLast
  
  	|  start stop test in |
  
  	start := self markersBegin.
  	stop :=  self markersEnd.
  	test := self markersTest.
  			 
+ 	in := WriteStream with: String new.
- 	in := ReadWriteStream with: String new.
  		
  	[ html upToAll: start; atEnd ] 
  		whileFalse: [
  			| chunk |
  			(allOrLast == #last) ifTrue: [ in resetToStart ]. 
  			chunk := html upToAll: stop.
  			self isSkipLoadingTestsSet ifTrue: [ chunk := chunk readStream upToAll: test ].
  			in nextPutAll: chunk. 
  		 ].
  
+ 	^self removeHtmlMarkupFrom: in readStream
- 	^self removeHtmlMarkupFrom: in reset
  	 
  !

Item was changed:
  ----- Method: InstallerInternetBased>>removeHtmlMarkupFrom: (in category 'as yet unclassified') -----
  removeHtmlMarkupFrom: in 
  
  	| out |
+ 	out := WriteStream on: (String new: 100).
- 	out := ReadWriteStream on: (String new: 100).
  	[ in atEnd ] whileFalse: [ 
  		out nextPutAll: (in upTo: $<).
  		(((in upTo: $>) asLowercase beginsWith: 'br') and: [ (in peek = Character cr) ]) ifTrue: [ in next ].	
  	].
  	
+ 	^self replaceEntitiesIn: out readStream.
- 	^self replaceEntitiesIn: out reset.
  !

Item was changed:
  ----- Method: InstallerInternetBased>>replaceEntitiesIn: (in category 'url') -----
  replaceEntitiesIn: in
  
  	| out |
+ 	out := WriteStream on: (String new: 100).
- 	out := ReadWriteStream on: (String new: 100).
  	[ in atEnd ] whileFalse: [ 
  		out nextPutAll: ((in upTo: $&) replaceAll: Character lf with: Character cr).
  		in atEnd ifFalse: [ out nextPutAll: (self class entities at: (in upTo: $;) ifAbsent: '?') ].	
  	].
  
+ 	^out readStream!
- 	^out reset!



More information about the Squeak-dev mailing list