-----Original Message----- From: Keith Rollin [mailto:[EMAIL PROTECTED]] Sent: Monday, 7 January 2002 3:12 PM To: Palm Developer Forum Subject: RE: Palm and ARM (Was: PL/I for Palm ?)
> I think it all comes down to what the actual definition of what a > creator ID, database type, or resource type is. If it's a > non-terminated 4-character string, then your WinDrawChars example > should continue to work. If it's a 32-bit scalar, then your example > should break. And I think the OS generally considers it to be the > latter (since it's defined as a UInt32 and not a char[4]). In either > case, using multi-character literals is compiler implementation > defined and not portable. But you can probably expect it to be > defined to be something that causes the lest amount of havoc. Sorry, I was not quite right eather. 1. We need htonl, to htons :-) 2. There isn't as easy as appears. Assuming LSB to MSB order for ARM creatorID we have portability with string interpretation (WinDrawChars etc), while with MSB to LSB order we have an order problem (if (CrID1 > crID2) doesn't work properly if both CrIDs are UInt32). I guess the order is really more important. I would only suggest that the headers for a new PalmOS sdk should have a macro similar to htonl htons, so that for m68k it just returns the source, while for ARM it swaps bytes - this might be a right way to have a portable code. Michael -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
