Be very careful with if and macros...

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@34 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Matt Chapman 2001-09-15 14:01:45 +00:00
parent 8bbba2c59f
commit c1c6abb07a

8
xwin.c
View File

@ -149,10 +149,10 @@ translate_image(int width, int height, uint8 *data)
return out;
}
#define BSWAP16(x) x = (((x & 0xff) << 8) | (x >> 8));
#define BSWAP24(x) x = (((x & 0xff) << 16) | (x >> 16) | ((x >> 8) & 0xff00));
#define BSWAP32(x) x = (((x & 0xff00ff) << 8) | ((x >> 8) & 0xff00ff)); \
x = (x << 16) | (x >> 16);
#define BSWAP16(x) { x = (((x & 0xff) << 8) | (x >> 8)); }
#define BSWAP24(x) { x = (((x & 0xff) << 16) | (x >> 16) | ((x >> 8) & 0xff00)); }
#define BSWAP32(x) { x = (((x & 0xff00ff) << 8) | ((x >> 8) & 0xff00ff)); \
x = (x << 16) | (x >> 16); }
static uint32
translate_colour(uint32 colour)