MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / CheckConfigFileVariable

Function CheckConfigFileVariable

src/External/CascLib/src/CascFiles.cpp:281–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281static bool CheckConfigFileVariable(
282 TCascStorage * hs, // Pointer to storage structure
283 const char * szLinePtr, // Pointer to the begin of the line
284 const char * szLineEnd, // Pointer to the end of the line
285 const char * szVarName, // Pointer to the variable to check
286 PARSE_VARIABLE PfnParseProc, // Pointer to the parsing function
287 void * pvParseParam) // Pointer to the parameter passed to parsing function
288{
289 char szVariableName[MAX_VAR_NAME];
290
291 // Capture the variable from the line
292 szLinePtr = CaptureSingleString(szLinePtr, szLineEnd, szVariableName, sizeof(szVariableName));
293 if(szLinePtr == NULL)
294 return false;
295
296 // Verify whether this is the variable
297 if(!CascCheckWildCard(szVariableName, szVarName))
298 return false;
299
300 // Skip the spaces and '='
301 while (szLinePtr < szLineEnd && (IsWhiteSpace(szLinePtr) || szLinePtr[0] == '='))
302 szLinePtr++;
303
304 // Call the parsing function only if there is some data
305 if(szLinePtr >= szLineEnd)
306 return false;
307
308 return (PfnParseProc(hs, szVariableName, szLinePtr, szLineEnd, pvParseParam) == ERROR_SUCCESS);
309}
310
311static DWORD LoadHashArray(
312 PCASC_BLOB pBlob,

Callers 2

ParseFile_CdnConfigFunction · 0.85
ParseFile_CdnBuildFunction · 0.85

Calls 3

CaptureSingleStringFunction · 0.85
CascCheckWildCardFunction · 0.85
IsWhiteSpaceFunction · 0.85

Tested by

no test coverage detected