aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/CascCommon.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-11-03 01:15:30 +0100
committerShauren <shauren.trinity@gmail.com>2022-11-03 01:15:30 +0100
commitc4564566b0b308f88f3664ec124a8557bdc278f0 (patch)
treef09d604f961e5d605556bc652aea5ec5d505d025 /dep/CascLib/src/CascCommon.h
parent722201e01c7809f1e85eb480499630a7d7d748b5 (diff)
Dep/CascLib: Update to ladislav-zezula/CascLib@136c6e05537bd7123620ddb28671d1f2cf060e0b
Diffstat (limited to 'dep/CascLib/src/CascCommon.h')
-rw-r--r--dep/CascLib/src/CascCommon.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/dep/CascLib/src/CascCommon.h b/dep/CascLib/src/CascCommon.h
index cddd0a8ca0e..44f94b0b40d 100644
--- a/dep/CascLib/src/CascCommon.h
+++ b/dep/CascLib/src/CascCommon.h
@@ -15,10 +15,10 @@
// Compression support
// Include functions from zlib
-#ifndef __SYS_ZLIB
- #include "zlib/zlib.h"
+#ifndef CASC_USE_SYSTEM_ZLIB
+ #include "zlib/zlib.h"
#else
- #include <zlib.h>
+ #include <zlib.h>
#endif
#include "CascPort.h"
@@ -62,6 +62,9 @@
// For CASC_CDN_DOWNLOAD::Flags
#define CASC_CDN_FORCE_DOWNLOAD 0x0001 // Force downloading the file even if in the cache
+// The maximum size of an inline file
+#define CASC_MAX_ONLINE_FILE_SIZE 0x40000000
+
//-----------------------------------------------------------------------------
// In-memory structures
@@ -279,6 +282,7 @@ struct TCascStorage
CASC_LOCK StorageLock; // Lock for multi-threaded operations
LPCTSTR szIndexFormat; // Format of the index file name
+ LPTSTR szCdnHostUrl; // CDN host URL for online storage
LPTSTR szCodeName; // On local storage, this select a product in a multi-product storage. For online storage, this selects a product
LPTSTR szRootPath; // Path where the build file is
LPTSTR szDataPath; // This is the directory where data files are
@@ -382,8 +386,9 @@ struct TCascSearch
TCascSearch(TCascStorage * ahs, LPCTSTR aszListFile, const char * aszMask)
{
// Init the class
+ if(ahs != NULL)
+ hs = ahs->AddRef();
ClassName = CASC_MAGIC_FIND;
- hs = ahs->AddRef();
// Init provider-specific data
pCache = NULL;
@@ -399,7 +404,8 @@ struct TCascSearch
~TCascSearch()
{
// Dereference the CASC storage
- hs = hs->Release();
+ if(hs != NULL)
+ hs = hs->Release();
ClassName = 0;
// Free the rest of the members