Lines Matching refs:ptr
44 #define as_u8(ptr) (*(uint8_t*)(ptr))
45 #define as_u16(ptr) (*(uint16_t*)(ptr))
46 #define as_u32(ptr) (*(uint32_t*)(ptr))
47 #define as_u64(ptr) (*(uint64_t*)(ptr))
48 #define as_s8(ptr) (*(int8_t*)(ptr))
49 #define as_s16(ptr) (*(int16_t*)(ptr))
50 #define as_s32(ptr) (*(int32_t*)(ptr))
51 #define as_s64(ptr) (*(int64_t*)(ptr))
52 #define as_float(ptr) (*(float_t*)(ptr))
53 #define as_double(ptr) (*(double_t*)(ptr))
55 #define as_u8c(ptr) (*(const uint8_t*)(ptr))
56 #define as_u16c(ptr) (*(const uint16_t*)(ptr))
57 #define as_u32c(ptr) (*(const uint32_t*)(ptr))
58 #define as_u64c(ptr) (*(const uint64_t*)(ptr))
59 #define as_s8c(ptr) (*(const int8_t*)(ptr))
60 #define as_s16c(ptr) (*(const int16_t*)(ptr))
61 #define as_s32c(ptr) (*(const int32_t*)(ptr))
62 #define as_s64c(ptr) (*(const int64_t*)(ptr))
63 #define as_floatc(ptr) (*(const float_t*)(ptr))
64 #define as_doublec(ptr) (*(const double_t*)(ptr))
66 #define _get_triple_le(ptr) (*(uint8_t*)(ptr) | (uint32_t)*((uint8_t*)(ptr) + 1) << 8 | (uint32_t)*((uint8_t*)(ptr) + 2) << 16)
67 #define _get_triple_be(ptr) ((uint32_t)*(uint8_t*)(ptr) << 16 | (uint32_t)*((uint8_t*)(ptr) + 1) << 8 | *((uint8_t*)(ptr) + 2))
68 #define _put_triple_le(ptr,val) do { \
69 uint8_t *_tmp = (uint8_t *)(ptr); \
75 #define _put_triple_be(ptr,val) do { \
76 uint8_t *_tmp = (uint8_t *)(ptr); \
84 #define _get_triple(ptr) _get_triple_le(ptr)
85 #define _get_triple_s(ptr) _get_triple_be(ptr)
86 #define _put_triple(ptr,val) _put_triple_le(ptr,val)
87 #define _put_triple_s(ptr,val) _put_triple_be(ptr,val)
89 #define _get_triple(ptr) _get_triple_be(ptr)
90 #define _get_triple_s(ptr) _get_triple_le(ptr)
91 #define _put_triple(ptr,val) _put_triple_be(ptr,val)
92 #define _put_triple_s(ptr,val) _put_triple_le(ptr,val)