diff options
author | Lopfest <lopfest@gmail.com> | 2016-02-20 23:59:56 +0100 |
---|---|---|
committer | Lopfest <lopfest@gmail.com> | 2016-02-20 23:59:56 +0100 |
commit | facdc62b433787326673a4db05aab76d75e1283f (patch) | |
tree | f76f4e3467e3fe909da8b4e5bc5962712642e493 /dep/CascLib/src/common/DumpContext.h | |
parent | d11eb335c996b398f4f8bdb10558dfba9af637f4 (diff) | |
parent | 716c952cb9f7bc0f75308bb4a716cdfe7de17281 (diff) |
Merge remote-tracking branch 'upstream/6.x' into HEAD
Diffstat (limited to 'dep/CascLib/src/common/DumpContext.h')
-rw-r--r-- | dep/CascLib/src/common/DumpContext.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dep/CascLib/src/common/DumpContext.h b/dep/CascLib/src/common/DumpContext.h new file mode 100644 index 00000000000..6f725f5b942 --- /dev/null +++ b/dep/CascLib/src/common/DumpContext.h @@ -0,0 +1,38 @@ +/*****************************************************************************/ +/* DumpContext.h Copyright (c) Ladislav Zezula 2015 */ +/*---------------------------------------------------------------------------*/ +/* Interface for TDumpContext */ +/*---------------------------------------------------------------------------*/ +/* Date Ver Who Comment */ +/* -------- ---- --- ------- */ +/* 16.03.15 1.00 Lad Created */ +/*****************************************************************************/ + +#ifndef __DUMP_CONTEXT_H__ +#define __DUMP_CONTEXT_H__ + +//----------------------------------------------------------------------------- +// Defines + +// Size of the buffer for the dump context +#define CASC_DUMP_BUFFER_SIZE 0x10000 + +// Structure for dump context +struct TDumpContext +{ + TFileStream * pStream; // Pointer to the open stream + LPBYTE pbBufferBegin; // Begin of the dump buffer + LPBYTE pbBufferPtr; // Current dump buffer pointer + LPBYTE pbBufferEnd; // End of the dump buffer + + BYTE DumpBuffer[CASC_DUMP_BUFFER_SIZE]; // Dump buffer +}; + +//----------------------------------------------------------------------------- +// Dump context functions + +TDumpContext * CreateDumpContext(struct _TCascStorage * hs, const TCHAR * szNameFormat); +int dump_print(TDumpContext * dc, const char * szFormat, ...); +int dump_close(TDumpContext * dc); + +#endif // __DUMP_CONTEXT_H__ |