X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7d7d6663698dd4cb27a695ada3fd09d141005e5e..1168b32295f6acde7a777d9519723fe276155b6b:/lib/bitset.h diff --git a/lib/bitset.h b/lib/bitset.h index 3f13ffd4..fbc7b778 100644 --- a/lib/bitset.h +++ b/lib/bitset.h @@ -1,20 +1,21 @@ /* Generic bitsets. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + + Copyright (C) 2002-2004, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ #ifndef _BITSET_H #define _BITSET_H @@ -26,6 +27,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "obstack.h" #include +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + /* Attributes used to select a bitset implementation. */ enum bitset_attr {BITSET_FIXED = 1, /* Bitset size fixed. */ BITSET_VARIABLE = 2, /* Bitset size variable. */ @@ -309,8 +314,8 @@ extern void bitset_dump (FILE *, bitset); */ #define BITSET_FOR_EACH(ITER, BSET, INDEX, MIN) \ for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \ - (ITER.num == BITSET_LIST_SIZE) \ - && (ITER.num = bitset_list (BSET, ITER.list, \ + (ITER.num == BITSET_LIST_SIZE) \ + && (ITER.num = bitset_list (BSET, ITER.list, \ BITSET_LIST_SIZE, &ITER.next));) \ for (ITER.i = 0; \ ITER.i < ITER.num && ((INDEX) = ITER.list[ITER.i], 1); \ @@ -331,7 +336,7 @@ extern void bitset_dump (FILE *, bitset); */ #define BITSET_FOR_EACH_REVERSE(ITER, BSET, INDEX, MIN) \ for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \ - (ITER.num == BITSET_LIST_SIZE) \ + (ITER.num == BITSET_LIST_SIZE) \ && (ITER.num = bitset_list_reverse (BSET, ITER.list, \ BITSET_LIST_SIZE, &ITER.next));) \ for (ITER.i = 0; \ @@ -371,10 +376,10 @@ extern void bitset_stats_enable (void); extern void bitset_stats_disable (void); /* Read bitset stats file of accummulated stats. */ -void bitset_stats_read (const char *filename); +void bitset_stats_read (const char *file_name); /* Write bitset stats file of accummulated stats. */ -void bitset_stats_write (const char *filename); +void bitset_stats_write (const char *file_name); /* Dump bitset stats. */ extern void bitset_stats_dump (FILE *); @@ -386,4 +391,3 @@ extern void debug_bitset (bitset); extern void debug_bitset_stats (void); #endif /* _BITSET_H */ -