⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 swab.c

📁 Axis 221 camera embedded programing interface
💻 C
字号:
#include <unistd.h>#include <sys/types.h>#include <byteswap.h>/* Updated implementation based on byteswap.h from Miles Bader * <miles@gnu.org>.  This should be much faster on arches with machine * specific, optimized definitions in include/bits/byteswap.h (i.e. on * x86, use the bswap instruction on i486 and better boxes).  For * platforms that lack such support, this should be no slower than it * was before... */void swab (const void *source, void *dest, ssize_t count){    const unsigned short *from = source, *from_end = from + (count >> 1);    unsigned short junk;    unsigned short *to = dest;    while (from < from_end) {	/* Don't put '*from++'into the bswap_16() macros	 * or mad things will happen on macro expansion */	junk=*from++;	*to++ = bswap_16 (junk);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -