|
|
@ -278,6 +278,35 @@ struct stream
|
|
|
|
} while (0)
|
|
|
|
} while (0)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
#if defined(B_ENDIAN) || defined(NEED_ALIGN)
|
|
|
|
|
|
|
|
#define out_uint64_le(s, v) do \
|
|
|
|
|
|
|
|
{ \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 0); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 8); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 16); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 24); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 32); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 40); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 48); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
*((s)->p) = (unsigned char)((v) >> 56); \
|
|
|
|
|
|
|
|
(s)->p++; \
|
|
|
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define out_uint64_le(s, v) do \
|
|
|
|
|
|
|
|
{ \
|
|
|
|
|
|
|
|
*((tui64*)((s)->p)) = (v); \
|
|
|
|
|
|
|
|
(s)->p += 8; \
|
|
|
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
#define out_uint32_be(s, v) do \
|
|
|
|
#define out_uint32_be(s, v) do \
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
|