[Pythonmac-SIG] Read Strings from Resources
Opstad, Dave
Dave.Opstad at monotypeimaging.com
Wed Dec 22 16:55:45 CET 2004
On 12/22/04 1:51 AM, "Jack Jansen" <Jack.Jansen at cwi.nl> wrote:
> On 22 Dec 2004, at 00:22, Opstad, Dave wrote:
>
>> According to MacTypes.r (in the last Universal Headers revision), the
>> Rez format for a 'STR#' resource is as follows:
>>
>> --------------------
>> type 'STR#' {
>> integer = $$Countof(StringArray);
>> array StringArray {
>> pstring; /* String */
>> };
>> };
>> --------------------
>>
>> So it looks like a 2-byte count followed by an array of Pascal strings.
>
> Ah yes. And now that I see this I seem to remember that the pstrings
> are padded to a 2-byte boundary.
Hmmm, I'd be a bit surprised if there was such alignment padding. Pascal
string lengths are one byte, so after the single integer listed above
everything else should just be byte-aligned.
Dave
More information about the Pythonmac-SIG
mailing list