summaryrefslogtreecommitdiffstats
path: root/src/c4groupentrycore.c
blob: d178653287ce1902df3a74106f8e0a3bea73512a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "c4groupentrycore.h"
#include <string.h>
#include <time.h>
#include <assert.h>

static_assert(sizeof(C4GroupEntryCore) == 316, "The size of the C4GroupEntryCore struct must be 316");


void C4GroupEntryCore_init(C4GroupEntryCore* const this)
{
	memset(this->FileName, 0, sizeof(this->FileName));
	memset(this->Reserved1, 0, sizeof(this->Reserved1));
	this->Packed = 0;
	this->Directory = 0;
	this->Size = 0;
	this->Reserved2 = 0;
	this->Offset = 0;
	this->Modified = time(NULL);
	this->HasCRC = C4GroupEntryCore_NoCRC;
	this->CRC = 0;
	this->Executable = 0;
	memset(this->Reserved3, 0, sizeof(this->Reserved3));
}

void C4GroupEntryCore_setFileName(C4GroupEntryCore* const this, const char* const fileName)
{
	strncpy(this->FileName, fileName, sizeof(this->FileName) - 1);
}