1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-22 17:48:01 +02:00

Linux fixes, misc fixes

This commit is contained in:
Brian Fiete 2019-10-09 16:20:09 -07:00
parent 609dbfa256
commit c97b074fee
12 changed files with 131 additions and 68 deletions

View file

@ -416,7 +416,7 @@ void Beefy::BFFatalError(const StringImpl& message, const StringImpl& file, int
#endif
#ifdef _DEBUG
OutputDebugStrF("FATAL ERROR: %s\n", message.c_str());
OutputDebugStrF("FATAL ERROR: %s\n", message.c_str());
_wassert(UTF8Decode(message).c_str(), UTF8Decode(file).c_str(), line);
#else
String error = StrFormat("%s in %s:%d", message.c_str(), file.c_str(), line);

View file

@ -64,3 +64,14 @@ int ZEXPORT compress (dest, destLen, source, sourceLen)
{
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}
/* ===========================================================================
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
uLong ZEXPORT compressBound(sourceLen)
uLong sourceLen;
{
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
(sourceLen >> 25) + 13;
}

View file

@ -2,6 +2,10 @@
#include "CritSect.h"
#include "util/Dictionary.h"
#ifdef DEF_BF_ALLOCDEBUG
#define USE_BF_ALLOCDEBUG
#endif
#pragma warning(disable:4996)
#include <cstdio>
#include "AllocDebug.h"

View file

@ -111,7 +111,7 @@ public:
public:
Entry** mHashHeads;
const int cDefaultHashSize = 17;
static const int cDefaultHashSize = 17;
int mHashSize;
int mCount;