107 |
bitset_windex offset = index - bset->b.cindex; |
bitset_windex offset = index - bset->b.cindex; |
108 |
|
|
109 |
if (offset < bset->b.csize) |
if (offset < bset->b.csize) |
110 |
bset->b.cdata[offset] |= (1 << (bitno % BITSET_WORD_BITS)); |
bset->b.cdata[offset] |= ((bitset_word) 1 << (bitno % BITSET_WORD_BITS)); |
111 |
else |
else |
112 |
BITSET_SET_ (bset, bitno); |
BITSET_SET_ (bset, bitno); |
113 |
} |
} |
122 |
bitset_windex offset = index - bset->b.cindex; |
bitset_windex offset = index - bset->b.cindex; |
123 |
|
|
124 |
if (offset < bset->b.csize) |
if (offset < bset->b.csize) |
125 |
bset->b.cdata[offset] &= ~(1 << (bitno % BITSET_WORD_BITS)); |
bset->b.cdata[offset] &= ~((bitset_word) 1 << (bitno % BITSET_WORD_BITS)); |
126 |
else |
else |
127 |
BITSET_RESET_ (bset, bitno); |
BITSET_RESET_ (bset, bitno); |
128 |
} |
} |
154 |
bitset_windex _offset = _index - (bset)->b.cindex; \ |
bitset_windex _offset = _index - (bset)->b.cindex; \ |
155 |
\ |
\ |
156 |
if (_offset < (bset)->b.csize) \ |
if (_offset < (bset)->b.csize) \ |
157 |
(bset)->b.cdata[_offset] |= (1 << (_bitno % BITSET_WORD_BITS)); \ |
(bset)->b.cdata[_offset] |= \ |
158 |
|
((bitset_word) 1 << (_bitno % BITSET_WORD_BITS)); \ |
159 |
else \ |
else \ |
160 |
BITSET_SET_ ((bset), _bitno); \ |
BITSET_SET_ ((bset), _bitno); \ |
161 |
} while (0) |
} while (0) |
170 |
bitset_windex _offset = _index - (bset)->b.cindex; \ |
bitset_windex _offset = _index - (bset)->b.cindex; \ |
171 |
\ |
\ |
172 |
if (_offset < (bset)->b.csize) \ |
if (_offset < (bset)->b.csize) \ |
173 |
(bset)->b.cdata[_offset] &= ~(1 << (_bitno % BITSET_WORD_BITS)); \ |
(bset)->b.cdata[_offset] &= \ |
174 |
|
~((bitset_word) 1 << (_bitno % BITSET_WORD_BITS)); \ |
175 |
else \ |
else \ |
176 |
BITSET_RESET_ ((bset), _bitno); \ |
BITSET_RESET_ ((bset), _bitno); \ |
177 |
} while (0) |
} while (0) |
180 |
/* Test bit BITNO in bitset BSET. */ |
/* Test bit BITNO in bitset BSET. */ |
181 |
#define bitset_test(bset, bitno) \ |
#define bitset_test(bset, bitno) \ |
182 |
(((((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex) < (bset)->b.csize) \ |
(((((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex) < (bset)->b.csize) \ |
183 |
? ((bset)->b.cdata[(((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex)] \ |
? (((int) \ |
184 |
>> ((bitno) % BITSET_WORD_BITS)) & 1 \ |
((bset)->b.cdata[(((bitno) / BITSET_WORD_BITS) - (bset)->b.cindex)] \ |
185 |
: (unsigned int) BITSET_TEST_ ((bset), (bitno))) |
>> ((bitno) % BITSET_WORD_BITS))) \ |
186 |
|
& 1) \ |
187 |
|
: BITSET_TEST_ ((bset), (bitno))) |
188 |
#endif |
#endif |
189 |
|
|
190 |
|
|