/[bison]/bison/lib/lbitset.c
ViewVC logotype

Diff of /bison/lib/lbitset.c

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

revision 1.4 by akim, Tue Jul 2 13:51:26 2002 UTC revision 1.5 by eggert, Mon Aug 12 14:22:08 2002 UTC
# Line 585  lbitset_set (dst, bitno) Line 585  lbitset_set (dst, bitno)
585    
586    lbitset_elt_find (dst, windex, LBITSET_CREATE);    lbitset_elt_find (dst, windex, LBITSET_CREATE);
587    
588    dst->b.cdata[windex - dst->b.cindex] |= (1 << (bitno % BITSET_WORD_BITS));    dst->b.cdata[windex - dst->b.cindex] |=
589        (bitset_word) 1 << (bitno % BITSET_WORD_BITS);
590  }  }
591    
592    
# Line 600  lbitset_reset (dst, bitno) Line 601  lbitset_reset (dst, bitno)
601    if (!lbitset_elt_find (dst, windex, LBITSET_FIND))    if (!lbitset_elt_find (dst, windex, LBITSET_FIND))
602      return;      return;
603    
604    dst->b.cdata[windex - dst->b.cindex] &= ~(1 << (bitno % BITSET_WORD_BITS));    dst->b.cdata[windex - dst->b.cindex] &=
605        ~((bitset_word) 1 << (bitno % BITSET_WORD_BITS));
606    
607    /* If all the data is zero, perhaps we should unlink it now...  */    /* If all the data is zero, perhaps we should unlink it now...  */
608  }  }
# Line 951  lbitset_op1 (dst, op) Line 953  lbitset_op1 (dst, op)
953          {          {
954            /* Create new elements if they cannot be found.  */            /* Create new elements if they cannot be found.  */
955            elt = lbitset_elt_find (dst, i, LBITSET_CREATE);            elt = lbitset_elt_find (dst, i, LBITSET_CREATE);
956            memset (elt->words, ~0, sizeof (elt->words));            memset (elt->words, -1, sizeof (elt->words));
957          }          }
958        break;        break;
959    

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

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