H:/Class/11756/HLab/sphinxbase-0.4/include/byteorder.h File Reference
Go to the source code of this file.
Define Documentation
#define SWAP_BE_16 |
( |
x |
|
) |
SWAP_INT16(x) |
#define SWAP_BE_32 |
( |
x |
|
) |
SWAP_INT32(x) |
#define SWAP_BE_64 |
( |
x |
|
) |
SWAP_FLOAT64(x) |
#define SWAP_FLOAT32 |
( |
x |
|
) |
SWAP_INT32((int32 *) x) |
#define SWAP_FLOAT64 |
( |
x |
|
) |
|
Value:{ int *low = (int *) (x), *high = (int *) (x) + 1,\
temp;\
SWAP_INT32(low); SWAP_INT32(high);\
temp = *low; *low = *high; *high = temp;}
#define SWAP_INT16 |
( |
x |
|
) |
*(x) = ((0x00ff & (*(x))>>8) | (0xff00 & (*(x))<<8)) |
Value:*(x) = ((0x000000ff & (*(x))>>24) | \
(0x0000ff00 & (*(x))>>8) | \
(0x00ff0000 & (*(x))<<8) | \
(0xff000000 & (*(x))<<24))