+#ifdef WORDS_BIGENDIAN +#define GET_BE_WORD(x) (x) +#else +#define GET_BE_WORD(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8)) +#endif
This could be replaced by CoreFoundation's CFSwapInt16BigToHost, which might be a bit more efficient...
Pierre.