summaryrefslogtreecommitdiffstats
path: root/src/c4groupentrycore.h
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2018-08-15 22:46:40 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2018-08-15 23:15:15 +0200
commit0d1ae015fef8e15442dafa61b9c8d929ce467969 (patch)
treea8d56fd12f5c5366e1f6fa3ecc20c78c0202f747 /src/c4groupentrycore.h
parente04f662a42c75cb202684e7254d3b7600e6e1756 (diff)
downloadcc4group-0d1ae015fef8e15442dafa61b9c8d929ce467969.tar.gz
cc4group-0d1ae015fef8e15442dafa61b9c8d929ce467969.zip
Refactor code into a library and implement basic file management methods
Diffstat (limited to 'src/c4groupentrycore.h')
-rw-r--r--src/c4groupentrycore.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/c4groupentrycore.h b/src/c4groupentrycore.h
new file mode 100644
index 0000000..c77a5d1
--- /dev/null
+++ b/src/c4groupentrycore.h
@@ -0,0 +1,26 @@
+#pragma once
+#include <stdint.h>
+
+typedef enum {
+ C4GroupEntryCore_NoCRC = 0,
+ C4GroupEntryCore_ContentsCRC = 1,
+ C4GroupEntryCore_ContentsFileNameCRC = 2
+} C4GroupEntryCore_HasCRC;
+
+typedef struct {
+ char FileName[257];
+ uint8_t Reserved1[3];
+ int32_t Packed;
+ int32_t Directory;
+ int32_t Size;
+ int32_t Reserved2;
+ int32_t Offset;
+ int32_t Modified;
+ uint8_t HasCRC;
+ uint32_t CRC;
+ uint8_t Executable;
+ uint8_t Reserved3[26];
+} __attribute__((__packed__)) C4GroupEntryCore;
+
+void C4GroupEntryCore_init(C4GroupEntryCore* const this);
+void C4GroupEntryCore_setFileName(C4GroupEntryCore* const this, const char* const fileName);