Compare commits
No commits in common. "main" and "develop" have entirely different histories.
@ -17,23 +17,13 @@
|
|||||||
#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
||||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||||
#ifdef __TARGET_OS__Web
|
|
||||||
#define FTELLO_FUNC(stream) ftell(stream)
|
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
|
|
||||||
#else
|
|
||||||
#define FTELLO_FUNC(stream) ftello(stream)
|
#define FTELLO_FUNC(stream) ftello(stream)
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
||||||
#ifdef __TARGET_OS__Web
|
|
||||||
#define FTELLO_FUNC(stream) ftell64(stream)
|
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseek64(stream, offset, origin)
|
|
||||||
#else
|
|
||||||
#define FTELLO_FUNC(stream) ftello64(stream)
|
#define FTELLO_FUNC(stream) ftello64(stream)
|
||||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
|
#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include "ioapi.h"
|
#include "ioapi.h"
|
||||||
|
@ -530,7 +530,7 @@ int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,passwo
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MINIZIP_ENABLE_MAIN
|
|
||||||
int main(argc,argv)
|
int main(argc,argv)
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
@ -658,6 +658,3 @@ int main(argc,argv)
|
|||||||
|
|
||||||
return ret_value;
|
return ret_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -583,8 +583,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
|||||||
*/
|
*/
|
||||||
local unzFile unzOpenInternal (const void *path,
|
local unzFile unzOpenInternal (const void *path,
|
||||||
zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
|
zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
|
||||||
int is64bitOpenFunction,
|
int is64bitOpenFunction)
|
||||||
unsigned int basicOffset)
|
|
||||||
{
|
{
|
||||||
unz64_s us;
|
unz64_s us;
|
||||||
unz64_s *s;
|
unz64_s *s;
|
||||||
@ -621,14 +620,6 @@ local unzFile unzOpenInternal (const void *path,
|
|||||||
if (us.filestream==NULL)
|
if (us.filestream==NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (ZSEEK64(us.z_filefunc,
|
|
||||||
us.filestream,
|
|
||||||
basicOffset,
|
|
||||||
ZLIB_FILEFUNC_SEEK_SET)!=0)
|
|
||||||
{
|
|
||||||
err=UNZ_ERRNO;
|
|
||||||
}
|
|
||||||
|
|
||||||
central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream);
|
central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream);
|
||||||
if (central_pos)
|
if (central_pos)
|
||||||
{
|
{
|
||||||
@ -778,10 +769,10 @@ extern unzFile ZEXPORT unzOpen2 (const char *path,
|
|||||||
{
|
{
|
||||||
zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
|
zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
|
||||||
fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);
|
fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);
|
||||||
return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 0, 0);
|
return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return unzOpenInternal(path, NULL, 0, 0);
|
return unzOpenInternal(path, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern unzFile ZEXPORT unzOpen2_64 (const void *path,
|
extern unzFile ZEXPORT unzOpen2_64 (const void *path,
|
||||||
@ -793,25 +784,20 @@ extern unzFile ZEXPORT unzOpen2_64 (const void *path,
|
|||||||
zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;
|
zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;
|
||||||
zlib_filefunc64_32_def_fill.ztell32_file = NULL;
|
zlib_filefunc64_32_def_fill.ztell32_file = NULL;
|
||||||
zlib_filefunc64_32_def_fill.zseek32_file = NULL;
|
zlib_filefunc64_32_def_fill.zseek32_file = NULL;
|
||||||
return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 1, 0);
|
return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return unzOpenInternal(path, NULL, 1, 0);
|
return unzOpenInternal(path, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern unzFile ZEXPORT unzOpen (const char *path)
|
extern unzFile ZEXPORT unzOpen (const char *path)
|
||||||
{
|
{
|
||||||
return unzOpenInternal(path, NULL, 0, 0);
|
return unzOpenInternal(path, NULL, 0);
|
||||||
}
|
|
||||||
|
|
||||||
extern unzFile ZEXPORT unzOpenOffset (const char *path, unsigned int basicOffset)
|
|
||||||
{
|
|
||||||
return unzOpenInternal(path, NULL, 0, basicOffset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern unzFile ZEXPORT unzOpen64 (const void *path)
|
extern unzFile ZEXPORT unzOpen64 (const void *path)
|
||||||
{
|
{
|
||||||
return unzOpenInternal(path, NULL, 1, 0);
|
return unzOpenInternal(path, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -164,7 +164,6 @@ extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
|
|||||||
|
|
||||||
|
|
||||||
extern unzFile ZEXPORT unzOpen OF((const char *path));
|
extern unzFile ZEXPORT unzOpen OF((const char *path));
|
||||||
extern unzFile ZEXPORT unzOpenOffset OF((const char *path, unsigned int basicOffset));
|
|
||||||
extern unzFile ZEXPORT unzOpen64 OF((const void *path));
|
extern unzFile ZEXPORT unzOpen64 OF((const void *path));
|
||||||
/*
|
/*
|
||||||
Open a Zip file. path contain the full pathname (by example,
|
Open a Zip file. path contain the full pathname (by example,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user