Test bit 'pos' in a generic bitmap. Return 1 if the bit is set, * otherwise 0. */
| 3805 | /* Test bit 'pos' in a generic bitmap. Return 1 if the bit is set, |
| 3806 | * otherwise 0. */ |
| 3807 | int bitmapTestBit(unsigned char *bitmap, int pos) { |
| 3808 | off_t byte = pos/8; |
| 3809 | int bit = pos&7; |
| 3810 | return (bitmap[byte] & (1<<bit)) != 0; |
| 3811 | } |
| 3812 | |
| 3813 | /* Set the bit at position 'pos' in a bitmap. */ |
| 3814 | void bitmapSetBit(unsigned char *bitmap, int pos) { |
no outgoing calls
no test coverage detected