diff options
author | Nayd <dnpd.dd@gmail.com> | 2015-01-11 22:12:49 +0000 |
---|---|---|
committer | Nayd <dnpd.dd@gmail.com> | 2015-01-11 23:02:19 +0000 |
commit | 31e3dc2e75459f681480ae09641f1087096dfd69 (patch) | |
tree | 70685fc84efd01d450f8bc06a4cb266e6478b694 /dep/CascLib/src/common/Common.cpp | |
parent | 8bbd9133d57fc34b77544cbdd59526ed9ccaa607 (diff) |
Dep/CascLib: Update to https://github.com/ladislav-zezula/CascLib/commit/5d3789af3435534c288c2145e158d422651c7fe1
Closes #13866
Diffstat (limited to 'dep/CascLib/src/common/Common.cpp')
-rw-r--r-- | dep/CascLib/src/common/Common.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/dep/CascLib/src/common/Common.cpp b/dep/CascLib/src/common/Common.cpp index d81c1b6fd89..74f86d44853 100644 --- a/dep/CascLib/src/common/Common.cpp +++ b/dep/CascLib/src/common/Common.cpp @@ -62,20 +62,6 @@ unsigned char AsciiToUpperTable[256] = unsigned char IntToHexChar[] = "0123456789abcdef"; //----------------------------------------------------------------------------- -// Support for memory reallocation - -#if defined(_MSC_VER) && defined(_DEBUG) -void * DbgRealloc(void * ptr, size_t nSize) -{ - // HeapReAlloc does not support NULL as previous block - if(ptr == NULL) - return HeapAlloc(GetProcessHeap, 0, nSize); - - return HeapReAlloc(GetProcessHeap(), 0, ptr, nSize); -} -#endif - -//----------------------------------------------------------------------------- // GetLastError/SetLastError support for non-Windows platform #ifndef PLATFORM_WINDOWS @@ -232,11 +218,14 @@ TCHAR * CombinePath(const TCHAR * szDirectory, const TCHAR * szSubDir) return szFullPath; } -void NormalizeFileName_UpperBkSlash(char * szFileName) +void NormalizeFileName_UpperBkSlash(const char * szSrcFileName, char * szTrgFileName) { + size_t i; + // Normalize the file name: ToLower + BackSlashToSlash - for(size_t i = 0; szFileName[i] != 0; i++) - szFileName[i] = AsciiToUpperTable[szFileName[i]]; + for(i = 0; szSrcFileName[i] != 0; i++) + szTrgFileName[i] = AsciiToUpperTable[szSrcFileName[i]]; + szTrgFileName[i] = 0; } void NormalizeFileName_LowerSlash(char * szFileName) |