MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / adfIsBlockFree

Function adfIsBlockFree

dep/adflib/src/adf_bitm.c:185–199  ·  view source on GitHub ↗

* adfIsBlockFree * */

Source from the content-addressed store, hash-verified

183 *
184 */
185BOOL 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);
192printf("bit=%d, ",sectOfMap%32);
193printf("bitm=%x, ",bitMask[ sectOfMap%32]);
194printf("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/*

Callers 6

adfGetDelEntFunction · 0.85
adfCheckParentFunction · 0.85
adfUndelDirFunction · 0.85
adfUndelFileFunction · 0.85
adfCountFreeBlocksFunction · 0.85
adfGetFreeBlocksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected