Let's pretend those sector bitmap macros weren't horribly broken

This commit is contained in:
shermp
2019-01-02 17:19:42 +13:00
parent 8f45a52fca
commit f060efa24c

View File

@@ -6,9 +6,9 @@
/* The following bit array macros adapted from
http://www.mathcs.emory.edu/~cheung/Courses/255/Syllabus/1-C-intro/bit-array.html */
#define VHD_SETBIT(A,k) ( A[(k/8)] |= (1 << (k%8)) )
#define VHD_CLEARBIT(A,k) ( A[(k/8)] &= ~(1 << (k%8)) )
#define VHD_TESTBIT(A,k) ( A[(k/8)] & (1 << (k%8)) )
#define VHD_SETBIT(A,k) ( A[(k/8)] |= (0x80 >> (k%8)) )
#define VHD_CLEARBIT(A,k) ( A[(k/8)] &= ~(0x80 >> (k%8)) )
#define VHD_TESTBIT(A,k) ( A[(k/8)] & (0x80 >> (k%8)) )
extern uint8_t VFT_CONECTIX_COOKIE[];
extern uint8_t VFT_CREATOR[];