21 #if !defined(ZIPARCHIVE_BASELIBCOMPRESSOR_DOT_H)
22 #define ZIPARCHIVE_BASELIBCOMPRESSOR_DOT_H
28 #include "ZipExport.h"
30 #include "ZipCollections.h"
33 namespace ZipArchiveLib
54 m_bDetectLibMemoryLeaks =
true;
73 m_bDecompressionDone =
false;
79 m_bDecompressionDone =
false;
103 static void* _zipalloc(
void* opaque, UINT items, UINT size)
105 void* p =
new char[size * items];
108 CZipPtrList<void*>* list = (CZipPtrList<void*>*) opaque;
123 static void _zipfree(
void* opaque,
void* address)
127 CZipPtrList<void*>* list = (CZipPtrList<void*>*) opaque;
128 CZipPtrListIter iter = list->Find(address);
129 if (list->IteratorValid(iter))
130 list->RemoveAt(iter);
132 delete[] (
char*) address;
150 virtual bool IsCodeErrorOK(
int iErr)
const = 0;
159 void CheckForError(
int iErr)
161 if (!IsCodeErrorOK(iErr))
162 ThrowError(iErr,
true);
173 void SetOpaque(
void** opaque,
const COptions* pOptions);
180 typedef CZipPtrList<void*>::iterator CZipPtrListIter;
182 #if (_MSC_VER > 1000) && (defined ZIP_HAS_DLL)
183 #pragma warning (push)
184 #pragma warning( disable : 4251 ) // needs to have dll-interface to be used by clients of class
187 CZipPtrList<void*> m_list;
189 #if (_MSC_VER > 1000) && (defined ZIP_HAS_DLL)
190 #pragma warning( pop)