void save_manager::state_entry::flip_data() { UINT16 *data16; UINT32 *data32; UINT64 *data64; int count; switch (m_typesize) { case 2: data16 = (UINT16 *)m_data; for (count = 0; count < m_typecount; count++) data16[count] = FLIPENDIAN_INT16(data16[count]); break; case 4: data32 = (UINT32 *)m_data; for (count = 0; count < m_typecount; count++) data32[count] = FLIPENDIAN_INT32(data32[count]); break; case 8: data64 = (UINT64 *)m_data; for (count = 0; count < m_typecount; count++) data64[count] = FLIPENDIAN_INT64(data64[count]); break; } }
INLINE void flip_data(state_entry *entry) { UINT16 *data16; UINT32 *data32; UINT64 *data64; int count; switch (entry->typesize) { case 2: data16 = (UINT16 *)entry->data; for (count = 0; count < entry->typecount; count++) data16[count] = FLIPENDIAN_INT16(data16[count]); break; case 4: data32 = (UINT32 *)entry->data; for (count = 0; count < entry->typecount; count++) data32[count] = FLIPENDIAN_INT32(data32[count]); break; case 8: data64 = (UINT64 *)entry->data; for (count = 0; count < entry->typecount; count++) data64[count] = FLIPENDIAN_INT64(data64[count]); break; } }
static void ss_c4(UINT8 *data, UINT32 size) { UINT32 *convert = (UINT32 *)data; unsigned i; for (i = 0; i < size; i++) convert[i] = FLIPENDIAN_INT32(convert[i]); }
static UINT32 ni_ntohl(UINT32 x) { return FLIPENDIAN_INT32(x); }
static UINT32 ni_htonl(UINT32 x) { return FLIPENDIAN_INT32(x); }