📄 pmacros.h
字号:
#ifndef __PMACROS_HEADER_INCLUDED__#define __PMACROS_HEADER_INCLUDED__#define bswap16(x) \ ((u_int16_t)( \ (((u_int16_t)(x) & (u_int16_t)0x00ffU) << 8) | \ (((u_int16_t)(x) & (u_int16_t)0xff00U) >> 8) ))#define bswap32(x) \ ((u_int32_t)( \ (((u_int32_t)(x) & (u_int32_t)0x000000ffUL) << 24) | \ (((u_int32_t)(x) & (u_int32_t)0x0000ff00UL) << 8) | \ (((u_int32_t)(x) & (u_int32_t)0x00ff0000UL) >> 8) | \ (((u_int32_t)(x) & (u_int32_t)0xff000000UL) >> 24) ))#if __BYTE_ORDER == __LITTLE_ENDIAN#define __swap_16(x) bswap16(x)#define __swap_32(x) bswap32(x)#elif __BYTE_ORDER == __BIG_ENDIAN#define __swap_16(x) (x)#define __swap_32(x) (x)#else#error "couldn't determine endianness"#endif/* Use to initialise constants */#define __constant_htons(x) __swap_16(x)#define __constant_ntohs(x) __swap_16(x)#define __constant_htonl(x) __swap_32(x)#define __constant_ntohl(x) __swap_32(x)#endif /* __PMACROS_HEADER_INCLUDED__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -