Fix typos
This commit is contained in:
parent
3458794791
commit
e04a231974
4 changed files with 16 additions and 16 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define LIBMINEZIPER_H
|
||||
|
||||
#include "libmineziper_zip.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
bool detect_overlaps(char* filename);
|
||||
int get_uncompressed_size(zip* in);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,16 @@ typedef struct raw
|
|||
int size;
|
||||
} raw;
|
||||
|
||||
typedef struct LFH
|
||||
{
|
||||
char mb[4]; // CDH_MB "PK\03\04"
|
||||
void* crc32; // TODO TYPE?
|
||||
int size_compressed_data;
|
||||
int size_uncompressed_data;
|
||||
void* filename; // TODO TYPE?
|
||||
void* data;
|
||||
} LFH;
|
||||
|
||||
typedef struct CDH
|
||||
{
|
||||
char mb[4]; // CDH_MB "PK\05\06"
|
||||
|
|
@ -19,21 +29,10 @@ typedef struct CDH
|
|||
void* filename; // TODO TYPE?
|
||||
} CDH;
|
||||
|
||||
typedef struct LFH
|
||||
{
|
||||
char mb[4]; // CDH_MB "PK\03\04"
|
||||
void* crc32; // TODO TYPE?
|
||||
LFH* lfh;
|
||||
int size_compressed_data;
|
||||
int size_uncompressed_data;
|
||||
void* filename; // TODO TYPE?
|
||||
void* data;
|
||||
} LFH;
|
||||
|
||||
typedef struct zip
|
||||
{
|
||||
// compression type
|
||||
CDH* central_directory;
|
||||
CDH* cd;
|
||||
} zip;
|
||||
|
||||
void find_cdh(raw* raw, zip* out);
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ int get_uncompressed_size(zip* in)
|
|||
{
|
||||
int size = 0;
|
||||
|
||||
CDH* cdh = in->central_directory;
|
||||
CDH* cdh = in->cd;
|
||||
while (cdh)
|
||||
{
|
||||
size += cdh->lfh->size_uncompressed_data;
|
||||
cdh = cdh++;
|
||||
size += cdh->lfh->size_uncompressed_data; // TODO overflow
|
||||
cdh++;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ void find_cdh(raw* raw, zip* out)
|
|||
{
|
||||
if (strcmp(se, CDH_MB) == 0)
|
||||
{
|
||||
zip->cdh = se;
|
||||
out->cd = (CDH*) se;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue