From b60bc45088ffa77b00dffca928f99159cbcebd2f Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Wed, 25 Mar 2020 16:39:13 +0100 Subject: CheckWildCard renamed to SFileCheckWildCard to prevent conflict with CascLib --- src/SFileFindFile.cpp | 6 +++--- src/SFileListFile.cpp | 5 ++++- src/StormCommon.h | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/SFileFindFile.cpp b/src/SFileFindFile.cpp index 68e769d..9ff6ca1 100644 --- a/src/SFileFindFile.cpp +++ b/src/SFileFindFile.cpp @@ -39,7 +39,7 @@ static TMPQSearch * IsValidSearchHandle(HANDLE hFind) return NULL; } -bool CheckWildCard(const char * szString, const char * szWildCard) +bool SFileCheckWildCard(const char * szString, const char * szWildCard) { const char * szWildCardPtr; @@ -71,7 +71,7 @@ bool CheckWildCard(const char * szString, const char * szWildCard) if(AsciiToUpperTable[szWildCardPtr[0]] == AsciiToUpperTable[szString[0]]) { - if(CheckWildCard(szString, szWildCardPtr)) + if(SFileCheckWildCard(szString, szWildCardPtr)) return true; } } @@ -253,7 +253,7 @@ static bool DoMPQSearch_FileEntry( if(szFileName != NULL) { // Check the file name against the wildcard - if(CheckWildCard(szFileName + nPrefixLength, hs->szSearchMask)) + if(SFileCheckWildCard(szFileName + nPrefixLength, hs->szSearchMask)) { // Fill the found entry. hash entry and block index are taken from the base MPQ lpFindFileData->dwHashIndex = HASH_ENTRY_FREE; diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp index 57ef7f9..752a592 100644 --- a/src/SFileListFile.cpp +++ b/src/SFileListFile.cpp @@ -42,6 +42,9 @@ typedef bool (*LOAD_LISTFILE)(TListFileHandle * pHandle, void * pvBuffer, DWORD //----------------------------------------------------------------------------- // Local functions (cache) +// In SFileFindFile.cll +bool SFileCheckWildCard(const char * szString, const char * szWildCard); + static char * CopyListLine(char * szListLine, const char * szFileName) { // Copy the string @@ -579,7 +582,7 @@ static bool DoListFileSearch(TListFileCache * pCache, SFILE_FIND_DATA * lpFindFi while((szFileName = ReadListFileLine(pCache, &nLength)) != NULL) { // Check search mask - if(nLength != 0 && CheckWildCard(szFileName, pCache->szWildCard)) + if(nLength != 0 && SFileCheckWildCard(szFileName, pCache->szWildCard)) { if(nLength >= sizeof(lpFindFileData->cFileName)) nLength = sizeof(lpFindFileData->cFileName) - 1; diff --git a/src/StormCommon.h b/src/StormCommon.h index 95b72a3..de88357 100644 --- a/src/StormCommon.h +++ b/src/StormCommon.h @@ -297,7 +297,6 @@ void Patch_Finalize(TMPQPatcher * pPatcher); //----------------------------------------------------------------------------- // Utility functions -bool CheckWildCard(const char * szString, const char * szWildCard); bool IsInternalMpqFileName(const char * szFileName); template -- cgit v1.2.3