endian.h
来自「BIOS Open Platform!」· C头文件 代码 · 共 19 行
H
19 行
#define __bswap32(x) \ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))static int little_endian(void){ static short one=1; return *(char *)&one==1;}static unsigned int ntohl(unsigned int netlong){ if(little_endian()) return __bswap32(netlong); return netlong;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?