X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.h;h=81ccf9f1abb337b5947804d823bba2469baaeeaf;hb=91f07304c9e9687652450f53938d76e1f60ddf76;hp=016f8e3a95448af56f6bc4b6a2d865bc4dc56647;hpb=27ffd42f841c05077780c1a55947c9b8972888ed;p=swftools.git diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 016f8e3..81ccf9f 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -29,6 +29,14 @@ #define FALSE (0) #endif +#ifdef WORDS_BIGENDIAN +#define SWAP16(s) ((U16) ((U8*)&s)[0] | ((U16) ((U8*)&s)[1] << 8)) +#define SWAP32(s) ((U32) ((U8*)&s)[0] | ((U32) ((U8*)&s)[1] << 8) | ((U32) ((U8*)&s)[2] << 16) | ((U32) ((U8*)&s)[3] << 24)) +#else +#define SWAP16(x) x +#define SWAP32(x) x +#endif + // SWF Types typedef unsigned long U32;