MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / recoverBitmapQuery

Function recoverBitmapQuery

modules/dasSQLITE/sqlite/shell.c:13881–13889  ·  view source on GitHub ↗

** Query bitmap object pMap for the state of the bit associated with page ** iPg. Return 1 if it is set, or 0 otherwise. */

Source from the content-addressed store, hash-verified

13879** iPg. Return 1 if it is set, or 0 otherwise.
13880*/
13881static int recoverBitmapQuery(RecoverBitmap *pMap, i64 iPg){
13882 int ret = 1;
13883 if( iPg<=pMap->nPg && iPg>0 ){
13884 int iElem = (iPg / 32);
13885 int iBit = (iPg % 32);
13886 ret = (pMap->aElem[iElem] & (((u32)1) << iBit)) ? 1 : 0;
13887 }
13888 return ret;
13889}
13890
13891/*
13892** Set the recover handle error to the error code and message returned by

Callers 3

recoverPageIsUsedFunction · 0.85
recoverLostAndFound3StepFunction · 0.85
recoverLostAndFound2StepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected