Clean code
This commit is contained in:
parent
fe7ca3c37a
commit
3636d3fa0d
3 changed files with 11 additions and 4 deletions
|
|
@ -1,6 +1,9 @@
|
|||
#include "libmineziper.h"
|
||||
|
||||
bool detect_overlaps(char* filename) {}
|
||||
bool detect_overlaps(char* filename)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int get_uncompressed_size(zip* in)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include "libmineziper_zip.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libmineziper_zip.h"
|
||||
|
||||
void get_eocd(raw* raw, zip* out)
|
||||
{
|
||||
if (raw->size < START_EOCD_SEARCH)
|
||||
|
|
@ -11,7 +14,7 @@ void get_eocd(raw* raw, zip* out)
|
|||
{
|
||||
if (strcmp(se, EOCD_SIG) == 0)
|
||||
{
|
||||
out->eocd = se;
|
||||
out->eocd = (EOCD*) se;
|
||||
out->cdh = (CDH**) malloc(out->eocd->number_of_entries * sizeof(CDH*));
|
||||
break;
|
||||
}
|
||||
|
|
@ -30,7 +33,7 @@ void get_cdh(raw* raw, zip* out)
|
|||
|
||||
out->cd = raw->buf + out->eocd->off_cdh;
|
||||
|
||||
CDH* cdh = out->cd;
|
||||
CDH* cdh = (CDH*) out->cd;
|
||||
for (int i = 0; i < out->eocd->number_of_entries; i++)
|
||||
{
|
||||
out->cdh[i] = cdh;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue