summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
81fe8b2)
Do not assume that bitset_windex is the same width as unsigned.
(abitset_unused_clear): Do not assume that bitset_word is the same
width as int.
(abitset_op1): Use -1, not ~0, as memset arg (for portability to one's
complement hosts!).
bitcnt = bitno % BITSET_WORD_BITS;
bitoff = windex * BITSET_WORD_BITS;
bitcnt = bitno % BITSET_WORD_BITS;
bitoff = windex * BITSET_WORD_BITS;
- for (; windex != ~0U; windex--, bitoff -= BITSET_WORD_BITS,
- bitcnt = BITSET_WORD_BITS - 1)
{
word = srcp[windex] << (BITSET_WORD_BITS - 1 - bitcnt);
for (; word; bitcnt--)
{
word = srcp[windex] << (BITSET_WORD_BITS - 1 - bitcnt);
for (; word; bitcnt--)
+ bitoff -= BITSET_WORD_BITS;
+ bitcnt = BITSET_WORD_BITS - 1;
*next = n_bits - (bitoff + 1);
return count;
*next = n_bits - (bitoff + 1);
return count;
last_bit = ABITSET_N_BITS (dst) % BITSET_WORD_BITS;
if (last_bit)
ABITSET_WORDS (dst)[dst->b.csize - 1] &=
last_bit = ABITSET_N_BITS (dst) % BITSET_WORD_BITS;
if (last_bit)
ABITSET_WORDS (dst)[dst->b.csize - 1] &=
- (bitset_word) ((1 << last_bit) - 1);
+ ((bitset_word) 1 << last_bit) - 1;
break;
case BITSET_OP_ONES:
break;
case BITSET_OP_ONES:
- memset (dstp, ~0, bytes);
+ memset (dstp, -1, bytes);
abitset_unused_clear (dst);
break;
abitset_unused_clear (dst);
break;