Mercurial > libdvdread4.hg
comparison bswap.h @ 27:98951f8ec89c src
cosmetics: Sync indentation and similar changes from libdvdread 0.9.5.
author | diego |
---|---|
date | Thu, 25 Sep 2008 09:17:42 +0000 |
parents | ac07d427fbc6 |
children | 80045db7439a |
comparison
equal
deleted
inserted
replaced
26:0d82d0f30c98 | 27:98951f8ec89c |
---|---|
72 * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such | 72 * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such |
73 * functionality! | 73 * functionality! |
74 */ | 74 */ |
75 | 75 |
76 #elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__) || defined(__BEOS__) | 76 #elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__) || defined(__BEOS__) |
77 #define B2N_16(x) \ | 77 #define B2N_16(x) \ |
78 x = ((((x) & 0xff00) >> 8) | \ | 78 x = ((((x) & 0xff00) >> 8) | \ |
79 (((x) & 0x00ff) << 8)) | 79 (((x) & 0x00ff) << 8)) |
80 #define B2N_32(x) \ | 80 #define B2N_32(x) \ |
81 x = ((((x) & 0xff000000) >> 24) | \ | 81 x = ((((x) & 0xff000000) >> 24) | \ |
82 (((x) & 0x00ff0000) >> 8) | \ | 82 (((x) & 0x00ff0000) >> 8) | \ |
83 (((x) & 0x0000ff00) << 8) | \ | 83 (((x) & 0x0000ff00) << 8) | \ |
84 (((x) & 0x000000ff) << 24)) | 84 (((x) & 0x000000ff) << 24)) |
85 #define B2N_64(x) \ | 85 #define B2N_64(x) \ |
86 x = ((((x) & 0xff00000000000000ULL) >> 56) | \ | 86 x = ((((x) & 0xff00000000000000ULL) >> 56) | \ |
87 (((x) & 0x00ff000000000000ULL) >> 40) | \ | 87 (((x) & 0x00ff000000000000ULL) >> 40) | \ |
88 (((x) & 0x0000ff0000000000ULL) >> 24) | \ | 88 (((x) & 0x0000ff0000000000ULL) >> 24) | \ |
89 (((x) & 0x000000ff00000000ULL) >> 8) | \ | 89 (((x) & 0x000000ff00000000ULL) >> 8) | \ |
90 (((x) & 0x00000000ff000000ULL) << 8) | \ | 90 (((x) & 0x00000000ff000000ULL) << 8) | \ |