/[bison]/bison/lib/bbitset.h
ViewVC logotype

Diff of /bison/lib/bbitset.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by akim, Tue Jul 2 13:51:26 2002 UTC revision 1.4 by eggert, Mon Aug 12 14:13:56 2002 UTC
# Line 45  enum bitset_alloc_type {BITSET_MALLOC, B Line 45  enum bitset_alloc_type {BITSET_MALLOC, B
45    
46  /* Data type used to store a word of bits.  */  /* Data type used to store a word of bits.  */
47  typedef unsigned long bitset_word;  typedef unsigned long bitset_word;
48  #define BITSET_WORD_BITS ((unsigned) CHAR_BIT * sizeof (bitset_word))  #define BITSET_WORD_BITS ((unsigned) (CHAR_BIT * sizeof (bitset_word)))
49    
50  /* Bit index.  */  /* Bit index.  In theory we might need a type wider than size_t, but
51  typedef unsigned long bitset_bindex;     in practice we lose at most a factor of CHAR_BIT by going with
52       size_t, and that is good enough.  */
53    typedef size_t bitset_bindex;
54    
55  /* Word index.  */  /* Word index.  */
56  typedef unsigned long bitset_windex;  typedef size_t bitset_windex;
57    
58  #define BITSET_INDEX_MAX ((1U << (BITSET_WORD_BITS - 1)))  #define BITSET_INDEX_MAX ((bitset_word) 1 << (BITSET_WORD_BITS - 1))
59    
60  #define BITSET_MSB (1U << (BITSET_WORD_BITS - 1))  #define BITSET_MSB ((bitset_word) 1 << (BITSET_WORD_BITS - 1))
61    
62  #define BITSET_LIST_SIZE 1024  #define BITSET_LIST_SIZE 1024
63    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26