Displaying 1 result from an estimated 1 matches for "only_lsb_is_on".
Did you mean:
only_lsb_is_one
2000 May 02
0
patch for .samba-2.0.7/source/lib/bitmap.c
...j & 31 && j < bm->n);
- }
- i += 32;
- i &= ~31;
- }
+/*
+ * find bit with 1, from LSB.
+ *
+ * I first saw this hack at X11R3's source code. I don't know where it
+ * came from. --- Kenichi Okuyama.
+ */
+static int
+find_bitmap_one( uint32 bitmaps )
+{
+ uint32 only_lsb_is_one;
+ int result;
- i = 0;
- while (i < ofs) {
- if (~(bm->b[i/32])) {
- j = i;
- do {
- if (!bitmap_query(bm, j)) return j;
- j++;
- } while (j & 31 && j < bm->n);
- }
- i += 32;
- i &= ~31;
- }
+ /* Somebody, tell me if you know. Who first...