Home | History | Annotate | Download | only in lib

Lines Matching refs:bset

164 /* Unlink element ELT from bitset BSET.  */
166 lbitset_elt_unlink (bitset bset, lbitset_elt *elt)
177 if (LBITSET_HEAD (bset) == elt)
178 LBITSET_HEAD (bset) = next;
179 if (LBITSET_TAIL (bset) == elt)
180 LBITSET_TAIL (bset) = prev;
185 if (LBITSET_CURRENT (bset) == elt)
189 bset->b.cdata = next->words;
190 bset->b.cindex = next->index;
194 bset->b.cdata = prev->words;
195 bset->b.cindex = prev->index;
199 bset->b.csize = 0;
200 bset->b.cdata = 0;
208 /* Cut the chain of bitset BSET before element ELT and free the
211 lbitset_prune (bitset bset, lbitset_elt *elt)
220 LBITSET_TAIL (bset) = elt->prev;
221 bset->b.cdata = elt->prev->words;
222 bset->b.cindex = elt->prev->index;
227 LBITSET_HEAD (bset) = 0;
228 LBITSET_TAIL (bset) = 0;
229 bset->b.cdata = 0;
230 bset->b.csize = 0;
257 lbitset_elt_link (bitset bset, lbitset_elt *elt)
263 if (bset->b.csize)
264 current = LBITSET_CURRENT (bset);
266 current = LBITSET_HEAD (bset);
269 if (LBITSET_HEAD (bset) == 0)
272 LBITSET_HEAD (bset) = elt;
273 LBITSET_TAIL (bset) = elt;
278 else if (windex < bset->b.cindex)
287 LBITSET_HEAD (bset) = elt;
304 LBITSET_TAIL (bset) = elt;
312 bset->b.cindex = windex;
313 bset->b.csize = LBITSET_ELT_WORDS;
314 bset->b.cdata = elt->words;
319 lbitset_elt_find (bitset bset, bitset_windex windex,
325 if (bset->b.csize)
327 current = LBITSET_CURRENT (bset);
329 if ((windex - bset->b.cindex) < bset->b.csize)
334 current = LBITSET_HEAD (bset);
339 if (windex < bset->b.cindex)
357 bset->b.cindex = elt->index;
358 bset->b.csize = LBITSET_ELT_WORDS;
359 bset->b.cdata = elt->words;
377 lbitset_elt_link (bset, elt);
388 lbitset_weed (bitset bset)
393 for (elt = LBITSET_HEAD (bset); elt; elt = next)
397 lbitset_elt_unlink (bset, elt);
404 lbitset_zero (bitset bset)
408 head = LBITSET_HEAD (bset);
413 lbitset_prune (bset, head);
559 lbitset_free (bitset bset)
561 lbitset_zero (bset);
565 /* Find list of up to NUM bits set in BSET starting from and including
569 lbitset_list_reverse (bitset bset, bitset_bindex *list,
582 elt = LBITSET_TAIL (bset);
660 /* Find list of up to NUM bits set in BSET starting from and including
664 lbitset_list (bitset bset, bitset_bindex *list,
674 head = LBITSET_HEAD (bset);
1354 lbitset_init (bitset bset, bitset_bindex n_bits ATTRIBUTE_UNUSED)
1356 BITSET_NBITS_ (bset) = n_bits;
1357 bset->b.vtable = &lbitset_vtable;
1358 return bset;
1376 debug_lbitset (bitset bset)
1381 if (!bset)
1384 for (elt = LBITSET_HEAD (bset); elt; elt = elt->next)