Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
- Subject: Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
- From: Markus Hitter <email@hidden>
- Date: Sat, 14 Jan 2006 01:04:34 +0100
Am 13.01.2006 um 22:17 schrieb Kirk Kerekes:
This is an 8-byte file consisting of a Mac-style Type and Creator.
Can anyone provide an authoritative answer as to how this is stored
on OS-X/intel?
Little-endian? (Host)
Big-endian? (PPC-style)
There are so many questions of this type, here and elsewhere.
They are four single bytes, representing four characters. If you swap
bytes there, you change the sequence of those characters, but not
their value.
Even if you interpret them as an integer number, endianess doesn't
matter as long as you don't do calculations with them. ('APPL' +
'FMWK') * 3 anybody?
Could somebody please try to explain why people think four-character
constants are subject for endianess issues?
Thanks,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden