More macros added.

FossilOrigin-Name: 046a7487758be6d3c14b76518f9780e24a8e07ec4df59cb3fa6e69cda56b19be
This commit is contained in:
7u83@mail.ru 2014-07-26 15:45:49 +00:00
parent 14332710da
commit ac4e36202e
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@
#define LWTH_GET_FRAGID(th) (th[1])
#define LWTH_GET_LENGTH(th) (ntohl(*((uint32_t*)(th)))&0xffff)
#define LWTH_SET_VERSION(th,v) (th[0] = (th[0]&0x3f) | (v<<6))
#define LWTH_SET_C_FLAG(th,v) (th[0] = (th[0]&0xfd) | (v<<1))
#define LWMSG_GET_TYPE(m) (m[0])