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

Function ListFile_CheckFormat

src/External/CascLib/src/common/ListFile.cpp:63–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63static void ListFile_CheckFormat(PLISTFILE_CACHE pCache)
64{
65 const size_t nSizeLimit = 0x20;
66
67 // Only if the listfile is greater than 2 MB
68 if((pCache->pEnd - pCache->pBegin) > nSizeLimit)
69 {
70 char * szPtr = pCache->pBegin;
71 size_t nDigitCount = 0;
72
73 // Calculate the amount of digits
74 while(nDigitCount <= nSizeLimit && '0' <= szPtr[nDigitCount] && szPtr[nDigitCount] <= '9')
75 nDigitCount++;
76
77 // There must be a semicolon after
78 if(nDigitCount <= 10 && szPtr[nDigitCount] == ';')
79 {
80 pCache->Flags |= LISTFILE_FLAG_USES_FILEDATAID;
81 }
82 }
83}
84
85static int ListFile_GetFileDataId(PLISTFILE_CACHE pCache, PDWORD PtrFileDataId)
86{

Callers 1

ListFile_OpenExternalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected