From 77761e819506075b28c1b4eaf3fb295cc544c838 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 3 Apr 2016 10:21:30 +0200 Subject: Dep/CascLib: Update to ladislav-zezula/CascLib@d477d30f7c2b3a306fd07c92929950639335fb3f --- dep/CascLib/src/CascFindFile.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'dep/CascLib/src/CascFindFile.cpp') diff --git a/dep/CascLib/src/CascFindFile.cpp b/dep/CascLib/src/CascFindFile.cpp index bea2e308747..1016dffdb45 100644 --- a/dep/CascLib/src/CascFindFile.cpp +++ b/dep/CascLib/src/CascFindFile.cpp @@ -66,7 +66,7 @@ static TCascSearch * AllocateSearchHandle(TCascStorage * hs, const TCHAR * szLis // Initialize the structure memset(pSearch, 0, cbToAllocate); pSearch->szClassName = "TCascSearch"; - + // Save the search handle pSearch->hs = hs; hs->dwRefCount++; @@ -94,7 +94,7 @@ static TCascSearch * AllocateSearchHandle(TCascStorage * hs, const TCHAR * szLis return NULL; } } - + return pSearch; } @@ -132,7 +132,7 @@ static bool DoStorageSearch_RootFile(TCascSearch * pSearch, PCASC_FIND_DATA pFin ByteIndex = (DWORD)(EncodingIndex / 8); BitMask = 1 << (EncodingIndex & 0x07); pSearch->BitArray[ByteIndex] |= BitMask; - + // Locate the index entry IndexKey.pbData = GET_INDEX_KEY(pEncodingEntry); IndexKey.cbData = MD5_HASH_SIZE; @@ -199,7 +199,7 @@ static bool DoStorageSearch_EncodingKey(TCascSearch * pSearch, PCASC_FIND_DATA p // Go to the next encoding entry pSearch->IndexLevel1++; } - + // Nameless search ended return false; } @@ -212,7 +212,7 @@ static bool DoStorageSearch(TCascSearch * pSearch, PCASC_FIND_DATA pFindData) // Does the search specify listfile? if(pSearch->szListFile != NULL) pSearch->pCache = ListFile_OpenExternal(pSearch->szListFile); - + // Move the search phase to the listfile searching pSearch->IndexLevel1 = 0; pSearch->dwState++; @@ -260,7 +260,7 @@ HANDLE WINAPI CascFindFirstFile( nError = ERROR_INVALID_HANDLE; if(szMask == NULL || pFindData == NULL) nError = ERROR_INVALID_PARAMETER; - + // Init the search structure and search handle if(nError == ERROR_SUCCESS) { @@ -286,7 +286,7 @@ HANDLE WINAPI CascFindFirstFile( FreeSearchHandle(pSearch); pSearch = NULL; } - + return (HANDLE)pSearch; } @@ -306,7 +306,7 @@ bool WINAPI CascFindNextFile( // Perform search return DoStorageSearch(pSearch, pFindData); } - + bool WINAPI CascFindClose(HANDLE hFind) { TCascSearch * pSearch; -- cgit v1.2.3