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

Function ListFile_CreateCache

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

Source from the content-addressed store, hash-verified

32// Creating the listfile cache for the given amount of data
33
34static PLISTFILE_CACHE ListFile_CreateCache(DWORD dwFileSize)
35{
36 PLISTFILE_CACHE pCache;
37
38 // Allocate cache for one file block
39 pCache = (PLISTFILE_CACHE)CASC_ALLOC<BYTE>(sizeof(LISTFILE_CACHE) + dwFileSize);
40 if(pCache != NULL)
41 {
42 // Set the initial pointers
43 pCache->pBegin =
44 pCache->pPos = (char *)(pCache + 1);
45 pCache->pEnd = pCache->pBegin + dwFileSize;
46 pCache->Flags = 0;
47 }
48
49 // Return the cache
50 return pCache;
51}
52
53static char * ListFile_SkipSpaces(PLISTFILE_CACHE pCache)
54{

Callers 2

ListFile_OpenExternalFunction · 0.85
ListFile_FromBufferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected