X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.h;h=81ccf9f1abb337b5947804d823bba2469baaeeaf;hb=5591193a032de5fe7b6f61954c19b51a3709507e;hp=016f8e3a95448af56f6bc4b6a2d865bc4dc56647;hpb=81bfd1b7109cfb1d375466b2c96daa70df2edd41;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;