Re: deprecated FOUR_CHAR_CODE and macintel
Re: deprecated FOUR_CHAR_CODE and macintel
- Subject: Re: deprecated FOUR_CHAR_CODE and macintel
- From: Howard Rodstein <email@hidden>
- Date: Fri, 20 Jan 2006 11:35:21 -0800
>And to follow up, it turns out there is a problem, but only for a
>special case. One of our constants is
>
> '\0\0\e\0'
>
>which ends up being stored in the wrong order. Regular constants with
>characters in all the positions work fine.
I think this byte order problem applies to two- and three-character codes.
This worked under CodeWarrior and Visual C++:
switch(code) {
case 'ABCD'
...
case 'XYZ'
...
case 'PQ'
...
}
Xcode considers 'XYZ' and 'PQ' to be errors so we had to switch to '\0XYZ' and '\0\0PQ'.
However, Visual C++ gets the byte order wrong for '\0XYZ' and '\0\0PQ' (though not for 'ABCD').
I solved this using ifdefs but I wonder if there is a better way.
So the question is, how can one use two-, three- and four-character codes on Mac and Windows without getting warnings or wrong byte order?
Howard Rodstein
WaveMetrics
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden