#include "bitset_std.h"
-#if defined(__GNUC__) && defined(__i386__)
+/* #if defined(__GNUC__) && defined(__i386__) */
+#if 0
#include "bitset_ia32.h"
#endif
static INLINE void bitset_set(bitset_t *bs, unsigned long bit)
{
unsigned long *unit = _bitset_get_unit(bs, bit);
- _bitset_inside_set(*unit, bit & BS_UNIT_MASK);
+ _bitset_inside_set(unit, bit & BS_UNIT_MASK);
}
/**
* @param file The stream.
* @param bs The bitset.
*/
-static INLINE void bitset_fprint(FILE *file, bitset_t *bs)
+static INLINE void bitset_fprint(FILE *file, const bitset_t *bs)
{
const char *prefix = "";
int i;
BINARY_OP(or)
BINARY_OP(xor)
-
#endif
* @param unit A pointer to the unit.
* @return The Number of leading zeroes.
*/
-#define _bitset_inside_ntz(unit_ptr) _std_bitset_inside_ntz(unit_ptr)
-static INLINE int _std_bitset_ntz(unsigned long *unit_ptr)
+#define _bitset_inside_ntz(unit_ptr) _bitset_std_inside_ntz(unit_ptr)
+static INLINE int _bitset_std_inside_ntz(unsigned long *unit_ptr)
{
unsigned long data = *unit_ptr;
return 32 - nlz(~data & (data - 1));
* @return 1, if the bit is set, 0 otherise.
*/
#define _bitset_inside_is_set(unit_ptr,bit) \
-(((*unit_ptr) & (1 << (bit))) != NULL)
+ (((*unit_ptr) & (1 << (bit))) != 0)
/**
* count the number of bits set in a unit.