/* Functions to support expandable bitsets.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
- Software Foundation, Inc.
+ Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
bitset
ebitset_init (bitset bset, bitset_bindex n_bits)
{
- bitset_windex size;
-
bset->b.vtable = &ebitset_vtable;
bset->b.csize = EBITSET_ELT_WORDS;
EBITSET_ZERO_SET (bset);
- size = n_bits ? (n_bits + EBITSET_ELT_BITS - 1) / EBITSET_ELT_BITS
- : EBITSET_INITIAL_SIZE;
-
EBITSET_ASIZE (bset) = 0;
EBITSET_ELTS (bset) = 0;
ebitset_resize (bset, n_bits);