[Pkg] The Trunk: Collections-nice.449.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jul 20 15:20:19 UTC 2011


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

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

Name: Collections-nice.449
Author: nice
Time: 20 July 2011, 5:19:37.262 pm
UUID: 1db0f500-0a4b-4ed7-8c60-2f266436dc49
Ancestors: Collections-nice.448

Change the way to print Character delete (from Pharo).
Format macToSqueak and use byte arrays.

=============== Diff against Collections-nice.448 ===============

Item was changed:
  ----- Method: Character>>macToSqueak (in category 'converting') -----
  macToSqueak
  	"Convert the receiver from MacRoman to Squeak encoding"
  	| asciiValue |
  	value < 128 ifTrue: [^ self].
  	value > 255 ifTrue: [^ self].
+ 	asciiValue := #[
+ 		196 197 199 201 209 214 220 225 224 226 228 227 229 231 233 232	"80-8F"
+ 		234 235 237 236 238 239 241 243 242 244 246 245 250 249 251 252	"90-9F"
+ 		134 176 162 163 167 149 182 223 174 169 153 180 168 128 198 216	"A0-AF"
+ 		129 177 138 141 165 181 142 143 144 154 157 170 186 158 230 248	"B0-BF"
+ 		191 161 172 166 131 173 178 171 187 133 160 192 195 213 140 156	"C0-CF"
+ 		150 151 147 148 145 146 247 179 255 159 185 164 139 155 188 189	"D0-DF"
+ 		135 183 130 132 137 194 202 193 203 200 205 206 207 204 211 212	"E0-EF"
+ 		190 210 218 219 217 208 136 152 175 215 221 222 184 240 253 254 ]	"F0-FF"
+ 			at: self asciiValue - 127.
+ 	^ Character value: asciiValue.!
- 	asciiValue := #(196 197 199 201 209 214 220 225 224 226 228 227 229 231 233 232 234 235 237 236 238 239 241 243 242 244 246 245 250 249 251 252 134 176 162 163 167 149 182 223 174 169 153 180 168 128 198 216 129 177 138 141 165 181 142 143 144 154 157 170 186 158 230 248 191 161 172 166 131 173 178 171 187 133 160 192 195 213 140 156 150 151 147 148 145 146 247 179 255 159 185 164 139 155 188 189 135 183 130 132 137 194 202 193 203 200 205 206 207 204 211 212 190 210 218 219 217 208 136 152 175 215 221 222 184 240 253 254 ) at: self asciiValue - 127.
- 	^ Character value: asciiValue.
- !

Item was changed:
  ----- Method: Character>>printOn: (in category 'printing') -----
  printOn: aStream
  	| name |
+ 	(value > 32 and: [value ~= 127])
- 	value > 32
  		ifTrue: [ aStream nextPut: $$; nextPut: self ]
  		ifFalse: [
  			name := self class constantNameFor: self.
  			name notNil
  				ifTrue: [ aStream nextPutAll: self class name; space; nextPutAll: name ]
  				ifFalse: [ aStream nextPutAll: self class name; nextPutAll: ' value: '; print: value ] ].!

Item was changed:
  ----- Method: Character>>shouldBePrintedAsLiteral (in category 'testing') -----
  shouldBePrintedAsLiteral
  
+ 	^(value between: 33 and: 255) and: [value ~= 127]!
- 	^value between: 33 and: 255!

Item was changed:
  ----- Method: Character>>squeakToMac (in category 'converting') -----
  squeakToMac
  	"Convert the receiver from Squeak to MacRoman encoding."
  	value < 128 ifTrue: [^ self].
  	value > 255 ifTrue: [^ self].
+ 	^ Character value: (#[
- 	^ Character value: (#(
  		173 176 226 196 227 201 160 224 246 228 178 220 206 179 182 183	"80-8F"
  		184 212 213 210 211 165 208 209 247 170 185 221 207 186 189 217	"90-9F"
  		202 193 162 163 219 180 195 164 172 169 187 199 194 197 168 248	"A0-AF"
  		161 177 198 215 171 181 166 225 252 218 188 200 222 223 240 192 	"B0-BF"
  		203 231 229 204 128 129 174 130 233 131 230 232 237 234 235 236 	"C0-CF"
  		245 132 241 238 239 205 133 249 175 244 242 243 134 250 251 167	"D0-DF"
  		136 135 137 139 138 140 190 141 143 142 144 145 147 146 148 149	"E0-EF"
  		253 150 152 151 153 155 154 214 191 157 156 158 159 254 255 216	"F0-FF"
+ 	] at: value - 127)
- 	) at: value - 127)
  !



More information about the Packages mailing list