1 #ifndef _KVI_BYTEORDER_H_
2 #define _KVI_BYTEORDER_H_
33 namespace KviByteOrder
45 ((i & 0xff00) << 40) |
46 ((i & 0xff0000) << 24) |
47 ((i & 0xff000000) << 8) |
48 ((i >> 8) & 0xff000000) |
49 ((i >> 24) & 0xff0000) |
50 ((i >> 40) & 0xff00) |
63 return ((i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24));
75 return ((i << 8) | (i >> 8));
90 #ifdef BIG_ENDIAN_MACHINE_BYTE_ORDER
185 #define LOCAL_CPU_LITTLE_ENDIAN 1
281 #endif // !_KVI_BYTEORDER_H_
kvi_u32_t localCpuToNetworkByteOrder32(kvi_u32_t u)
Definition: KviByteOrder.h:252
kvi_u32_t localCpuToLittleEndian32(kvi_u32_t u)
Definition: KviByteOrder.h:192
kvi_u16_t littleEndianToLocalCpu16(kvi_u16_t u)
Definition: KviByteOrder.h:202
kvi_u64_t littleEndianToLocalCpu64(kvi_u64_t u)
Definition: KviByteOrder.h:212
kvi_u16_t localCpuToLittleEndian16(kvi_u16_t u)
Definition: KviByteOrder.h:187
kvi_u32_t bigEndianToLocalCpu32(kvi_u32_t u)
Definition: KviByteOrder.h:237
kvi_u16_t bigEndianToLocalCpu16(kvi_u16_t u)
Definition: KviByteOrder.h:232
kvi_u64_t networkByteOrderToLocalCpu64(kvi_u64_t u)
Definition: KviByteOrder.h:272
#define i
Definition: detector.cpp:73
kvi_u64_t swap64(kvi_u64_t i)
Swaps the endianness of a kvi_u64_t.
Definition: KviByteOrder.h:41
kvi_u32_t swap32(kvi_u32_t i)
Swaps the endianness of a kvi_u32_t.
Definition: KviByteOrder.h:60
kvi_u16_t swap16(kvi_u16_t i)
Swaps the endianness of a kvi_u16_t.
Definition: KviByteOrder.h:72
unsigned long long int kvi_u64_t
Definition: kvi_inttypes.h:66
kvi_u32_t littleEndianToLocalCpu32(kvi_u32_t u)
Definition: KviByteOrder.h:207
kvi_u32_t localCpuToBigEndian32(kvi_u32_t u)
Definition: KviByteOrder.h:222
#define u
Definition: detector.cpp:85
kvi_u16_t networkByteOrderToLocalCpu16(kvi_u16_t u)
Definition: KviByteOrder.h:262
kvi_u16_t localCpuToBigEndian16(kvi_u16_t u)
Definition: KviByteOrder.h:217
kvi_u64_t bigEndianToLocalCpu64(kvi_u64_t u)
Definition: KviByteOrder.h:242
kvi_u64_t localCpuToNetworkByteOrder64(kvi_u64_t u)
Definition: KviByteOrder.h:257
kvi_u64_t localCpuToLittleEndian64(kvi_u64_t u)
Definition: KviByteOrder.h:197
This file contains compile time settings.
kvi_u16_t localCpuToNetworkByteOrder16(kvi_u16_t u)
Definition: KviByteOrder.h:247
kvi_u64_t localCpuToBigEndian64(kvi_u64_t u)
Definition: KviByteOrder.h:227
kvi_u32_t networkByteOrderToLocalCpu32(kvi_u32_t u)
Definition: KviByteOrder.h:267