Lines Matching refs:top
34 size_t top; /* index of top word allocated */ member
49 ret->top = 0; in bitmap_new()
68 b->top = 0; in bitmap_zero()
74 if (b->top >= b->len) in bitmap_test_bit()
76 if (b->len == 0 || (n / BITMAP_BITS) > b->top) in bitmap_test_bit()
87 if (b->top >= b->len || n > BITMAP_MAX) in reserve()
109 if (offset > b->top) in bitmap_set_bit()
110 b->top = offset; in bitmap_set_bit()
119 if (b->top >= b->len) in retop()
121 while (b->top > 0 && b->d[b->top] == 0) in retop()
122 b->top--; in retop()
130 if (b->top >= b->len || n > BITMAP_MAX) in bitmap_clear_bit()
133 if (offset > b->top) in bitmap_clear_bit()
147 if (b->top >= b->len) in bitmap_nbits()
149 if (b->len == 0 || (b->top == 0 && b->d[0] == 0)) in bitmap_nbits()
152 w = b->d[b->top]; in bitmap_nbits()
153 bits = (b->top + 1) * BITMAP_BITS; in bitmap_nbits()
173 if (l < need || b->top >= b->len) in bitmap_to_string()
178 for (i = k = 0; i < b->top + 1; i++) { in bitmap_to_string()
202 b->top = offset = ((l + (BITMAP_BYTES - 1)) / BITMAP_BYTES) - 1; in bitmap_from_string()