2 * This testing program makes sure the bitops functions work
4 * Copyright (C) 2001 by Theodore Ts'o.
7 * This file may be redistributed under the terms of the GNU Public
12 /* #define _EXT2_USE_C_VERSIONS_ */
22 #include <sys/types.h>
30 unsigned char bitarray[] = {
31 0x80, 0xF0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x10, 0x20, 0x00, 0x00
34 main(int argc, char **argv)
38 size = sizeof(bitarray)*8;
39 i = ext2fs_find_first_bit_set(bitarray, size);
41 printf("Bit set: %d\n", i);
42 i = ext2fs_find_next_bit_set(bitarray, size, i+1);