[Pkg] The Trunk: Collections-pre.791.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 30 13:49:30 UTC 2018


Patrick Rein uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-pre.791.mcz

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

Name: Collections-pre.791
Author: pre
Time: 30 April 2018, 3:49:17.014101 pm
UUID: f5f76ffb-064c-6e4e-a1ac-c660d0e1fb57
Ancestors: Collections-pre.790

Deprecates the RFC2047 class as the name is too formal. It is replaced by the QEncoding converter.

=============== Diff against Collections-pre.790 ===============

Item was removed:
- QuotedPrintableMimeConverter subclass: #RFC2047MimeConverter
- 	instanceVariableNames: ''
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Collections-Streams'!
- 
- !RFC2047MimeConverter commentStamp: 'pre 4/30/2018 12:13' prior: 0!
- I do q format MIME decoding as specified in RFC 2047 ""MIME Part Three: Message Header Extensions for Non-ASCII Text". See String>>decodeMimeHeader!

Item was removed:
- ----- Method: RFC2047MimeConverter>>encodeChar:to: (in category 'private-encoding') -----
- encodeChar: aChar to: aStream
- 
- 	aChar = Character space
- 		ifTrue: [^ aStream nextPut: $_].
- 	^ super encodeChar: aChar to: aStream!

Item was removed:
- ----- Method: RFC2047MimeConverter>>encodeWord: (in category 'private-encoding') -----
- encodeWord: aString
- 
- 	(aString allSatisfy: [:c | c asciiValue < 128])
- 		ifTrue: [^ aString].
- 	^ String streamContents: [:stream |
- 		stream nextPutAll: '=?iso-8859-1?Q?'.
- 		aString do: [:c | self encodeChar: c to: stream].
- 		stream nextPutAll: '?=']!

Item was removed:
- ----- Method: RFC2047MimeConverter>>isStructuredField: (in category 'private-encoding') -----
- isStructuredField: aString
- 
- 	| fName |
- 	fName := aString copyUpTo: $:.
- 	('Resent' sameAs: (fName copyUpTo: $-))
- 		ifTrue: [fName := fName copyFrom: 8 to: fName size].
- 	^#('Sender' 'From' 'Reply-To' 'To' 'cc' 'bcc') anySatisfy: [:each | fName sameAs: each]!

Item was removed:
- ----- Method: RFC2047MimeConverter>>mimeDecode (in category 'conversion') -----
- mimeDecode
- 	"Do conversion reading from mimeStream writing to dataStream. See String>>decodeMimeHeader"
- 
- 	| c |
- 	[mimeStream atEnd] whileFalse: [
- 		c := mimeStream next.
- 		c = $=
- 			ifTrue: [c := Character value: mimeStream next digitValue * 16
- 				+ mimeStream next digitValue]
- 			ifFalse: [c = $_ ifTrue: [c := $ ]].
- 		dataStream nextPut: c].
- 	^ dataStream!

Item was removed:
- ----- Method: RFC2047MimeConverter>>mimeEncode (in category 'conversion') -----
- mimeEncode
- 	"Do conversion reading from dataStream writing to mimeStream. Break long lines and escape non-7bit chars."
- 
- 	| word pos wasGood isGood max |
- 	true ifTrue: [mimeStream nextPutAll: dataStream upToEnd].
- 	pos := 0.
- 	max := 72.
- 	wasGood := true.
- 	[dataStream atEnd] whileFalse: [
- 		word := self readWord.
- 		isGood := word allSatisfy: [:c | c asciiValue < 128].
- 		wasGood & isGood ifTrue: [
- 			pos + word size < max
- 				ifTrue: [dataStream nextPutAll: word.
- 					pos := pos + word size]
- 				ifFalse: []
- 		]
- 	].
- 	^ mimeStream!

Item was removed:
- ----- Method: RFC2047MimeConverter>>readWord (in category 'private-encoding') -----
- readWord
- 
- 	| strm |
- 	strm := WriteStream on: (String new: 20)
- 	dataStream skipSeparators.
- 	[dataStream atEnd] whileFalse: 
- 		[ | c |
- 		c := dataStream next.
- 		strm nextPut: c.
- 		c isSeparator ifTrue: [^ strm contents]].
- 	^ strm contents!

Item was removed:
- ----- Method: RFC2047MimeConverter>>reservedCharacters (in category 'private-encoding') -----
- reservedCharacters
- 
- 	^ '?=_' !



More information about the Packages mailing list