Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1423.mcz
==================== Summary ====================
Name: System-mt.1423
Author: mt
Time: 29 August 2023, 2:48:29.917076 pm
UUID: 0b53dd21-5ac2-6c4c-9c1e-100e56354b7d
Ancestors: System-eem.1422
Complement EToys-mt.502
=============== Diff against System-eem.1422 ===============
Item was added:
+ ----- Method: Project>>name: (in category 'accessing') -----
+ name: aString
+ changeSet ifNil: [
+ self flag: #ct. "Can we redirect to #explicitName: here instead of creating change set, or does anyone rely on this side effect?"
+ changeSet := ChangeSet new].
+ (aString isEmpty or: [aString = changeSet name])
+ ifFalse: [changeSet name: (ChangeSet uniqueNameLike: aString)]!
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.502.mcz
==================== Summary ====================
Name: EToys-mt.502
Author: mt
Time: 29 August 2023, 2:47:40.055076 pm
UUID: 76cf1a5f-7b4e-7f48-bbf2-45d619da70e9
Ancestors: EToys-mt.501
For generic project naming, move #name: setter from EToys to System. #name getter is already in System.
=============== Diff against EToys-mt.501 ===============
Item was removed:
- ----- Method: Project>>name: (in category '*Etoys-Squeakland-accessing') -----
- name: aString
- changeSet ifNil: [
- self flag: #ct. "Can we redirect to #explicitName: here instead of creating change set, or does anyone rely on this side effect?"
- changeSet := ChangeSet new].
- (aString isEmpty or: [aString = changeSet name])
- ifFalse: [changeSet name: (ChangeSet uniqueNameLike: aString)]!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.543.mcz
==================== Summary ====================
Name: Graphics-mt.543
Author: mt
Time: 28 August 2023, 2:10:50.349114 pm
UUID: e5d8ceff-fb09-0b41-b8de-2a1dd54d1275
Ancestors: Graphics-mt.542
Fix typo.
=============== Diff against Graphics-mt.542 ===============
Item was changed:
----- Method: Bitmap>>decompress:fromByteArray:at: (in category 'filing') -----
decompress: bm fromByteArray: ba at: index
"Decompress the body of a byteArray encoded by compressToByteArray (qv)...
The format is simply a sequence of run-coded pairs, {N D}*.
N is a run-length * 4 + data code.
D, the data, depends on the data code...
0 skip N words, D is absent
(could be used to skip from one raster line to the next)
1 N words with all 4 bytes = D (1 byte)
2 N words all = D (4 bytes)
3 N words follow in D (4N bytes)
S and N are encoded as follows (see decodeIntFrom:)...
0-223 0-223
224-254 (0-30)*256 + next byte (0-7935)
255 next 4 bytes"
"NOTE: If fed with garbage, this routine could read past the end of ba, but it should fail before writing past the ned of bm."
| i code n anInt data end k pastEnd |
<primitive: 'primitiveDecompressFromByteArray' module: 'MiscPrimitivePlugin'>
<var: #bm type: 'int *'>
<var: #ba type: 'unsigned char *'>
<var: #anInt type: 'unsigned int'> "Force the type, otherwise it is inferred as unsigned char because assigned from ba"
<var: #data type: 'unsigned int'>
i := index. "byteArray read index"
end := ba size.
k := 1. "bitmap write index"
pastEnd := bm size + 1.
[i <= end] whileTrue:
["Decode next run start N"
anInt := ba at: i. i := i+1.
anInt <= 223 ifFalse:
[anInt <= 254
ifTrue: [anInt := (anInt-224)*256 + (ba at: i). i := i+1]
ifFalse: [anInt := 0.
1 to: 4 do: [:j | anInt := (anInt bitShift: 8) + (ba at: i). i := i+1]]].
n := anInt >> 2.
+ (k + n) > pastEnd ifTrue: [^ self primitiveFailed].
- (k + n) > pastEnd ifTrue: [^ self primitiveFail].
code := anInt bitAnd: 3.
code = 0 ifTrue: ["skip"].
code = 1 ifTrue: ["n consecutive words of 4 bytes = the following byte"
data := ba at: i. i := i+1.
data := data bitOr: (data bitShift: 8).
data := data bitOr: (data bitShift: 16).
1 to: n do: [:j | bm at: k put: data. k := k+1]].
code = 2 ifTrue: ["n consecutive words = 4 following bytes"
data := 0.
1 to: 4 do: [:j | data := (data bitShift: 8) bitOr: (ba at: i). i := i+1].
1 to: n do: [:j | bm at: k put: data. k := k+1]].
code = 3 ifTrue: ["n consecutive words from the data..."
1 to: n do:
[:m | data := 0.
1 to: 4 do: [:j | data := (data bitShift: 8) bitOr: (ba at: i). i := i+1].
bm at: k put: data. k := k+1]]]!