bit.h

来自「掌握如何用C来实现各种算法」· C头文件 代码 · 共 26 行

H
26
字号
/*****************************************************************************
*                                                                            *
*  --------------------------------- bit.h --------------------------------  *
*                                                                            *
*****************************************************************************/

#ifndef BIT_H
#define BIT_H

/*****************************************************************************
*                                                                            *
*  --------------------------- Public Interface ---------------------------  *
*                                                                            *
*****************************************************************************/

int bit_get(const unsigned char *bits, int pos);

void bit_set(unsigned char *bits, int pos, int state);

void bit_xor(const unsigned char *bits1, const unsigned char *bits2, unsigned
   char *bitsx, int size);

void bit_rot_left(unsigned char *bits, int size, int count);

#endif

⌨️ 快捷键说明

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