1 /* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */
11 liekweg - Feb 27, 2002: Created.
20 * the type of a bit set
22 typedef long int bs_t;
24 /** set bit in a bit set */
25 # define bs_set(bs, i) (bs) |= (0x00000001 << i)
27 /** get bit in a bit set */
28 # define bs_get(bs, i) (bs) & (0x00000001 << i)
30 /** logical AND of two bit sets */
31 # define bs_and(bsa, bsb) (bsa) &= (bsb)
33 /** logical OR of two bit sets */
34 # define bs_or(bsa, bsb) (bsa) |= (bsb)
36 /** logical XOR of two bit sets */
37 # define bs_xor(bsa, bsb) (bsa) ^= (bsb)
39 /** returns TRUE if at least one bit is set */
40 # define bs_zro(bs) (0x00000000 != bs)
42 # endif /* ndef _BS_H_ */