Test bit 'pos' in a generic bitmap. Return 1 if the bit is set, * otherwise 0. */
| 3864 | /* Test bit 'pos' in a generic bitmap. Return 1 if the bit is set, |
| 3865 | * otherwise 0. */ |
| 3866 | int bitmapTestBit(unsigned char *bitmap, int pos) { |
| 3867 | off_t byte = pos/8; |
| 3868 | int bit = pos&7; |
| 3869 | return (bitmap[byte] & (1<<bit)) != 0; |
| 3870 | } |
| 3871 | |
| 3872 | /* Set the bit at position 'pos' in a bitmap. */ |
| 3873 | void bitmapSetBit(unsigned char *bitmap, int pos) { |
no outgoing calls
no test coverage detected