diff options
Diffstat (limited to 'include/bitset.h')
-rw-r--r-- | include/bitset.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/bitset.h b/include/bitset.h index 6be07d6..4945d5b 100644 --- a/include/bitset.h +++ b/include/bitset.h @@ -3,14 +3,14 @@ #include <limits.h> -#define __MLIB_BITSLOT(x) ((x) / CHAR_BIT) -#define __MLIB_BITMASK(x) (1 << ((x) % CHAR_BIT)) +#define _MLIB_BITSLOT(x) ((x) / CHAR_BIT) +#define _MLIB_BITMASK(x) (1 << ((x) % CHAR_BIT)) #define bitset(name, n) unsigned char name[(n + CHAR_BIT - 1) / CHAR_BIT] -#define CLRBIT(bs, x) ((bs)[__MLIB_BITSLOT(x)] &= ~__MLIB_BITMASK(x)) -#define SETBIT(bs, x) ((bs)[__MLIB_BITSLOT(x)] |= __MLIB_BITMASK(x)) -#define TOGLBIT(bs, x) ((bs)[__MLIB_BITSLOT(x)] ^= __MLIB_BITMASK(x)) -#define TESTBIT(bs, x) ((bool)((bs)[__MLIB_BITSLOT(x)] & __MLIB_BITMASK(x))) +#define CLRBIT(bs, x) ((bs)[_MLIB_BITSLOT(x)] &= ~_MLIB_BITMASK(x)) +#define SETBIT(bs, x) ((bs)[_MLIB_BITSLOT(x)] |= _MLIB_BITMASK(x)) +#define TOGLBIT(bs, x) ((bs)[_MLIB_BITSLOT(x)] ^= _MLIB_BITMASK(x)) +#define TESTBIT(bs, x) ((bool)((bs)[_MLIB_BITSLOT(x)] & _MLIB_BITMASK(x))) #endif /* !MLIB_BITSET_H */ |