X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/48b16bbc0492820cf1fdb683b289c77f4cdadb3d..c843aaab352ab1f40c7d218fb5bb2c6fd6fd3a88:/lib/bitset_stats.c diff --git a/lib/bitset_stats.c b/lib/bitset_stats.c index 0b59865d..d71b91a0 100644 --- a/lib/bitset_stats.c +++ b/lib/bitset_stats.c @@ -1,10 +1,11 @@ /* Bitset statistics. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 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 + 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 + 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, @@ -13,28 +14,24 @@ 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. -*/ + along with this program. If not, see . */ /* This file is a wrapper bitset implementation for the other bitset implementations. It provides bitset compatibility checking and statistics gathering without having to instrument the bitset implementations. When statistics gathering is enabled, the bitset operations get vectored through here and we then call the appropriate - routines. -*/ + routines. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include + +#include "bitset_stats.h" #include "bbitset.h" #include "abitset.h" #include "ebitset.h" #include "lbitset.h" #include "vbitset.h" -#include "bitset_stats.h" #include #include #include @@ -696,6 +693,9 @@ bitset_stats_init (bitset bset, bitset_bindex n_bits, enum bitset_type type) we are a wrapper over. */ switch (type) { + default: + abort (); + case BITSET_ARRAY: bytes = abitset_bytes (n_bits); sbset = xcalloc (1, bytes); @@ -719,9 +719,6 @@ bitset_stats_init (bitset bset, bitset_bindex n_bits, enum bitset_type type) sbset = xcalloc (1, bytes); vbitset_init (sbset, n_bits); break; - - default: - abort (); } bset->s.bset = sbset;