Beruflich Dokumente
Kultur Dokumente
#define MY_CPU_BE
#endif
#if defined(MY_CPU_LE) && defined(MY_CPU_BE)
Stop_Compiling_Bad_Endian
#endif
#ifdef MY_CPU_LE_UNALIGN
#define
#define
#define
#define
#define
#define
GetUi16(p)
GetUi32(p)
GetUi64(p)
SetUi16(p,
SetUi32(p,
SetUi64(p,
#else
#define GetUi16(p) (((const Byte *)(p))[0] | ((UInt16)((const Byte *)(p))[1] <<
8))
#define GetUi32(p) (
((const
((UInt32)((const
((UInt32)((const
((UInt32)((const
\
Byte
Byte
Byte
Byte
*)(p))[0]
| \
*)(p))[1] << 8) | \
*)(p))[2] << 16) | \
*)(p))[3] << 24))
(d); \
8); \
16); \
24); }
intrinsic(_byteswap_ulong)
intrinsic(_byteswap_uint64)
GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p))
GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p))
#else
#define GetBe32(p) (
((UInt32)((const
((UInt32)((const
((UInt32)((const
((const
\
Byte
Byte
Byte
Byte
*)(p))[0]
*)(p))[1]
*)(p))[2]
*)(p))[3]
<< 24) | \
<< 16) | \
<< 8) | \
)