aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/common/DumpContext.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-02-08 20:57:52 +0100
committerShauren <shauren.trinity@gmail.com>2016-02-08 20:57:52 +0100
commit43642630c7cc8a96009a6cb7edbaa895c41f63c0 (patch)
tree635226da8506d47a04c610f76272356b57eb16de /dep/CascLib/src/common/DumpContext.h
parentf5ccb7b47480cd9064423da8fe2878992175d8b4 (diff)
Dep/CascLib: Update to ladislav-zezula/CascLib@919a2d670cb749c501ee15887a88e9b9a538961b
Diffstat (limited to 'dep/CascLib/src/common/DumpContext.h')
-rw-r--r--dep/CascLib/src/common/DumpContext.h38
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__