| 279 | } |
| 280 | |
| 281 | static 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 | |
| 311 | static DWORD LoadHashArray( |
| 312 | PCASC_BLOB pBlob, |
no test coverage detected