* adfIsBlockFree * */
| 183 | * |
| 184 | */ |
| 185 | BOOL adfIsBlockFree(struct Volume* vol, SECTNUM nSect) |
| 186 | { |
| 187 | int sectOfMap = nSect-2; |
| 188 | int block = sectOfMap/(127*32); |
| 189 | int indexInMap = (sectOfMap/32)%127; |
| 190 | |
| 191 | /*printf("sect=%d block=%d ind=%d, ",sectOfMap,block,indexInMap); |
| 192 | printf("bit=%d, ",sectOfMap%32); |
| 193 | printf("bitm=%x, ",bitMask[ sectOfMap%32]); |
| 194 | printf("res=%x, ",vol->bitmapTable[ block ]->map[ indexInMap ] |
| 195 | & bitMask[ sectOfMap%32 ]); |
| 196 | */ |
| 197 | return ( (vol->bitmapTable[ block ]->map[ indexInMap ] |
| 198 | & bitMask[ sectOfMap%32 ])!=0 ); |
| 199 | } |
| 200 | |
| 201 | |
| 202 | /* |
no outgoing calls
no test coverage detected