Lines Matching refs:top
33 size_t top; /* index of top word allocated */ member
48 ret->top = 0; in bitmap_new()
66 b->top = 0; in bitmap_zero()
72 if (b->top >= b->len) in bitmap_test_bit()
74 if (b->len == 0 || (n / BITMAP_BITS) > b->top) in bitmap_test_bit()
85 if (b->top >= b->len || n > BITMAP_MAX) in reserve()
107 if (offset > b->top) in bitmap_set_bit()
108 b->top = offset; in bitmap_set_bit()
117 if (b->top >= b->len) in retop()
119 while (b->top > 0 && b->d[b->top] == 0) in retop()
120 b->top--; in retop()
128 if (b->top >= b->len || n > BITMAP_MAX) in bitmap_clear_bit()
131 if (offset > b->top) in bitmap_clear_bit()
145 if (b->top >= b->len) in bitmap_nbits()
147 if (b->len == 0 || (b->top == 0 && b->d[0] == 0)) in bitmap_nbits()
150 w = b->d[b->top]; in bitmap_nbits()
151 bits = (b->top + 1) * BITMAP_BITS; in bitmap_nbits()
171 if (l < need || b->top >= b->len) in bitmap_to_string()
176 for (i = k = 0; i < b->top + 1; i++) { in bitmap_to_string()
200 b->top = offset = ((l + (BITMAP_BYTES - 1)) / BITMAP_BYTES) - 1; in bitmap_from_string()