Go to the source code of this file.
Defines |
#define | OSL_MAKEBYTE(nl, nh) ((sal_uInt8)(((nl) & 0x0F) | (((nh) & 0x0F) << 4))) |
| Determine the platform byte order as _BIG_ENDIAN, _LITTLE_ENDIAN, ...
|
#define | OSL_LONIBBLE(b) ((sal_uInt8)((b) & 0x0F)) |
#define | OSL_HINIBBLE(b) ((sal_uInt8)(((b) >> 4) & 0x0F)) |
#define | OSL_MAKEWORD(bl, bh) ((sal_uInt16)((bl) & 0xFF) | (((sal_uInt16)(bh) & 0xFF) << 8)) |
#define | OSL_LOBYTE(w) ((sal_uInt8)((sal_uInt16)(w) & 0xFF)) |
#define | OSL_HIBYTE(w) ((sal_uInt8)(((sal_uInt16)(w) >> 8) & 0xFF)) |
#define | OSL_MAKEDWORD(wl, wh) ((sal_uInt32)((wl) & 0xFFFF) | (((sal_uInt32)(wh) & 0xFFFF) << 16)) |
#define | OSL_LOWORD(d) ((sal_uInt16)((sal_uInt32)(d) & 0xFFFF)) |
#define | OSL_HIWORD(d) ((sal_uInt16)(((sal_uInt32)(d) >> 16) & 0xFFFF)) |
#define | OSL_NETWORD(w) OSL_MAKEWORD(OSL_HIBYTE(w),OSL_LOBYTE(w)) |
| Define macros for swapping between host and network byte order.
|
#define | OSL_NETDWORD(d) OSL_MAKEDWORD(OSL_NETWORD(OSL_HIWORD(d)),OSL_NETWORD(OSL_LOWORD(d))) |
#define | OSL_SWAPWORD(w) OSL_MAKEWORD(OSL_HIBYTE(w),OSL_LOBYTE(w)) |
| Define macros for swapping between byte orders.
|
#define | OSL_SWAPDWORD(d) OSL_MAKEDWORD(OSL_SWAPWORD(OSL_HIWORD(d)),OSL_SWAPWORD(OSL_LOWORD(d))) |
Define Documentation
#define OSL_HIBYTE |
( |
|
w | ) |
((sal_uInt8)(((sal_uInt16)(w) >> 8) & 0xFF)) |
#define OSL_HINIBBLE |
( |
|
b | ) |
((sal_uInt8)(((b) >> 4) & 0x0F)) |
#define OSL_HIWORD |
( |
|
d | ) |
((sal_uInt16)(((sal_uInt32)(d) >> 16) & 0xFFFF)) |
#define OSL_LOBYTE |
( |
|
w | ) |
((sal_uInt8)((sal_uInt16)(w) & 0xFF)) |
#define OSL_LONIBBLE |
( |
|
b | ) |
((sal_uInt8)((b) & 0x0F)) |
#define OSL_LOWORD |
( |
|
d | ) |
((sal_uInt16)((sal_uInt32)(d) & 0xFFFF)) |
#define OSL_MAKEBYTE |
( |
|
nl, |
|
|
|
nh |
|
) |
| ((sal_uInt8)(((nl) & 0x0F) | (((nh) & 0x0F) << 4))) |
Determine the platform byte order as _BIG_ENDIAN, _LITTLE_ENDIAN, ...
Check supported platform. Define the determined byte order as OSL_BIGENDIAN or OSL_LITENDIAN. Define macros for byte order manipulation.
#define OSL_MAKEDWORD |
( |
|
wl, |
|
|
|
wh |
|
) |
| ((sal_uInt32)((wl) & 0xFFFF) | (((sal_uInt32)(wh) & 0xFFFF) << 16)) |
#define OSL_MAKEWORD |
( |
|
bl, |
|
|
|
bh |
|
) |
| ((sal_uInt16)((bl) & 0xFF) | (((sal_uInt16)(bh) & 0xFF) << 8)) |
#define OSL_NETDWORD |
( |
|
d | ) |
OSL_MAKEDWORD(OSL_NETWORD(OSL_HIWORD(d)),OSL_NETWORD(OSL_LOWORD(d))) |
#define OSL_NETWORD |
( |
|
w | ) |
OSL_MAKEWORD(OSL_HIBYTE(w),OSL_LOBYTE(w)) |
Define macros for swapping between host and network byte order.
#define OSL_SWAPDWORD |
( |
|
d | ) |
OSL_MAKEDWORD(OSL_SWAPWORD(OSL_HIWORD(d)),OSL_SWAPWORD(OSL_LOWORD(d))) |
#define OSL_SWAPWORD |
( |
|
w | ) |
OSL_MAKEWORD(OSL_HIBYTE(w),OSL_LOBYTE(w)) |
Define macros for swapping between byte orders.