Skip to content

Commit

Permalink
should be feature complete, w3.mc still fails for some reason
Browse files Browse the repository at this point in the history
added interactive mode and checking the env for angle constants
  • Loading branch information
Yves Vandriessche committed Jan 13, 2012
1 parent 8b8e115 commit 4470719
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bitmask.h
@@ -0,0 +1,10 @@
#include <limits.h>

// from the comp.lang.c FAQ

#define BITMASK(b) (1 << ((b) % CHAR_BIT))
#define BITSLOT(b) ((b) / CHAR_BIT)
#define BITSET(a, b) ((a)[BITSLOT(b)] |= BITMASK(b))
#define BITCLEAR(a, b) ((a)[BITSLOT(b)] &= ~BITMASK(b))
#define BITTEST(a, b) ((a)[BITSLOT(b)] & BITMASK(b))
#define BITNSLOTS(nb) ((nb + CHAR_BIT - 1) / CHAR_BIT)

0 comments on commit 4470719

Please sign in to comment.