home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Bit set, clear, and test operations
- **
- ** public domain snippet by Bob Stout
- */
-
- typedef enum {ERROR = -1, FALSE, TRUE} LOGICAL;
-
- #define BOOL(x) (!(!(x)))
-
- #define BitSet(arg,posn) ((arg) | (1L << (posn)))
- #define BitClr(arg,posn) ((arg) & ~(1L << (posn)))
- #define BitTst(arg,posn) BOOL((arg) & (1L << (posn)))
-