18 #define MAKE_OFFSET64(hi, lo) (((ULONGLONG)hi << 32) | (ULONGLONG)lo)
21 #define ALIGN_TO_SIZE(x, a) (((x) + (a)-1) & ~((a)-1))
34 void CopyString(
char * szTarget,
const char * szSource,
size_t cchLength);
35 void CopyString(
wchar_t * szTarget,
const char * szSource,
size_t cchLength);
36 void CopyString(
char * szTarget,
const wchar_t * szSource,
size_t cchLength);
38 char *
CascNewStr(
const char * szString,
size_t nCharsToReserve);
39 wchar_t *
CascNewStr(
const wchar_t * szString,
size_t nCharsToReserve);
61 bool CheckWildCard(
const char * szString,
const char * szWildCard);
82 const TCHAR * szIndexPath,
89 #endif // __COMMON_H__
size_t NormalizeFileName_UpperBkSlash(char *szNormName, const char *szFileName, size_t cchMaxChars)
Definition: Common.cpp:250
void CalculateDataBlockHash(void *pvDataBlock, DWORD cbDataBlock, LPBYTE md5_hash)
Definition: Common.cpp:512
bool DirectoryExists(const TCHAR *szDirectory)
Definition: Directory.cpp:18
unsigned long long ULONGLONG
Definition: CascPort.h:144
DWORD * PDWORD
Definition: CascPort.h:151
int ConvertStringToInt32(const TCHAR *szString, size_t nMaxDigits, PDWORD PtrValue)
Definition: Common.cpp:303
char TCHAR
Definition: CascPort.h:148
unsigned char IntToHexChar[]
Definition: Common.cpp:62
bool CheckWildCard(const char *szString, const char *szWildCard)
Definition: Common.cpp:426
BYTE * LPBYTE
Definition: CascPort.h:152
int ScanIndexDirectory(const TCHAR *szIndexPath, INDEX_FILE_FOUND pfnOnFileFound, PDWORD IndexArray, PDWORD OldIndexArray, void *pvContext)
Definition: Directory.cpp:41
#define bool
Definition: CascPort.h:16
TCHAR * CascNewStrFromAnsi(const char *szBegin, const char *szEnd)
Definition: Common.cpp:140
ULONGLONG CalcFileNameHash(const char *szFileName)
Definition: Common.cpp:260
const wchar_t * GetPlainFileName(const wchar_t *szFileName)
Definition: Common.cpp:398
unsigned char AsciiToLowerTable_Slash[256]
Definition: Common.cpp:20
int ConvertDigitToInt32(const TCHAR *szString, PDWORD PtrValue)
Definition: Common.cpp:275
int ConvertStringToInt08(const char *szString, PDWORD PtrValue)
Definition: Common.cpp:287
char * CascNewStr(const char *szString, size_t nCharsToReserve)
Definition: Common.cpp:102
unsigned int DWORD
Definition: CascPort.h:139
char * StringFromBinary(LPBYTE pbBinary, size_t cbBinary, char *szBuffer)
Definition: Common.cpp:372
bool(* INDEX_FILE_FOUND)(const TCHAR *szFileName, PDWORD IndexArray, PDWORD OldIndexArray, void *pvContext)
Definition: Common.h:77
size_t NormalizeFileName_LowerSlash(char *szNormName, const char *szFileName, size_t cchMaxChars)
Definition: Common.cpp:255
TCHAR * CombinePathAndString(const TCHAR *szPath, const char *szString, size_t nLength)
Definition: Common.cpp:219
unsigned char AsciiToUpperTable_BkSlash[256]
Definition: Common.cpp:42
bool VerifyDataBlockHash(void *pvDataBlock, DWORD cbDataBlock, LPBYTE expected_md5)
Definition: Common.cpp:494
void CopyString(char *szTarget, const char *szSource, size_t cchLength)
Definition: Common.cpp:84
ULONGLONG HashStringJenkins(const char *szFileName)
int ConvertStringToBinary(const char *szString, size_t nMaxDigits, LPBYTE pbBinary)
Definition: Common.cpp:338
char * StringFromMD5(LPBYTE md5, char *szBuffer)
Definition: Common.cpp:390
bool IsValidMD5(LPBYTE pbMd5)
Definition: Common.cpp:484
TCHAR * CombinePath(const TCHAR *szPath, const TCHAR *szSubDir)
Definition: Common.cpp:157