/* Base bitset stuff.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation,
+ Inc.
+
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _BBITSET_H
#define _BBITSET_H
BITSET_TABLE: Expandable table of pointers to arrays of bits
(variable size, less storage for large sparse sets).
Faster than BITSET_LIST for random access.
- BITSET_VARRAY: Variable array of bits (variable size, fast for
+ BITSET_VARRAY: Variable array of bits (variable size, fast for
dense bitsets).
BITSET_STATS: Wrapper bitset for internal use only. Used for gathering
statistics and/or better run-time checking.
void (*copy) (bitset, bitset);
bool (*disjoint_p) (bitset, bitset);
bool (*equal_p) (bitset, bitset);
- void (*not) (bitset, bitset);
+ void (*not_) (bitset, bitset);
bool (*subset_p) (bitset, bitset);
- void (*and) (bitset, bitset, bitset);
+ void (*and_) (bitset, bitset, bitset);
bool (*and_cmp) (bitset, bitset, bitset);
void (*andn) (bitset, bitset, bitset);
bool (*andn_cmp) (bitset, bitset, bitset);
- void (*or) (bitset, bitset, bitset);
+ void (*or_) (bitset, bitset, bitset);
bool (*or_cmp) (bitset, bitset, bitset);
- void (*xor) (bitset, bitset, bitset);
+ void (*xor_) (bitset, bitset, bitset);
bool (*xor_cmp) (bitset, bitset, bitset);
void (*and_or) (bitset, bitset, bitset, bitset);
#define BITSET_EQUAL_P_(DST, SRC) (SRC)->b.vtable->equal_p (DST, SRC)
/* DST = ~SRC. */
-#define BITSET_NOT_(DST, SRC) (SRC)->b.vtable->not (DST, SRC)
+#define BITSET_NOT_(DST, SRC) (SRC)->b.vtable->not_ (DST, SRC)
/* Return DST == DST | SRC. */
#define BITSET_SUBSET_P_(DST, SRC) (SRC)->b.vtable->subset_p (DST, SRC)
/* DST = SRC1 & SRC2. */
-#define BITSET_AND_(DST, SRC1, SRC2) (SRC1)->b.vtable->and (DST, SRC1, SRC2)
+#define BITSET_AND_(DST, SRC1, SRC2) (SRC1)->b.vtable->and_ (DST, SRC1, SRC2)
#define BITSET_AND_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->and_cmp (DST, SRC1, SRC2)
/* DST = SRC1 & ~SRC2. */
#define BITSET_ANDN_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->andn_cmp (DST, SRC1, SRC2)
/* DST = SRC1 | SRC2. */
-#define BITSET_OR_(DST, SRC1, SRC2) (SRC1)->b.vtable->or (DST, SRC1, SRC2)
+#define BITSET_OR_(DST, SRC1, SRC2) (SRC1)->b.vtable->or_ (DST, SRC1, SRC2)
#define BITSET_OR_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->or_cmp (DST, SRC1, SRC2)
/* DST = SRC1 ^ SRC2. */
-#define BITSET_XOR_(DST, SRC1, SRC2) (SRC1)->b.vtable->xor (DST, SRC1, SRC2)
+#define BITSET_XOR_(DST, SRC1, SRC2) (SRC1)->b.vtable->xor_ (DST, SRC1, SRC2)
#define BITSET_XOR_CMP_(DST, SRC1, SRC2) (SRC1)->b.vtable->xor_cmp (DST, SRC1, SRC2)