A c program to test if a bit is set in an unsigned long array basically
Posted on 2005-04-25
A c program to test if a bit is set in an unsigned long array
I need something similiar to test_bit() in bitops.h
Basically I have any unsigned long array and I want to know if each bit in this array is set or not.
#define BITS_PER_LONG (sizeof(unsigned long) * 8)
#define BIT_MAP_SIZE ( (256 + BITS_PER_LONG - 1) / BITS_PER_LONG)
unsigned long array[BITMAP_SIZE]
How do I find if each bit is set or not.