Compare commits

..

No commits in common. "main" and "develop" have entirely different histories.

4 changed files with 12 additions and 40 deletions

View File

@ -17,22 +17,12 @@
#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
#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 FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
#endif
#define FTELLO_FUNC(stream) ftello(stream)
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
#else
#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 FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
#endif
#define FTELLO_FUNC(stream) ftello64(stream)
#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
#endif

View File

@ -530,7 +530,7 @@ int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,passwo
return 1;
}
#if MINIZIP_ENABLE_MAIN
int main(argc,argv)
int argc;
char *argv[];
@ -658,6 +658,3 @@ int main(argc,argv)
return ret_value;
}
#endif

View File

@ -583,8 +583,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
*/
local unzFile unzOpenInternal (const void *path,
zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
int is64bitOpenFunction,
unsigned int basicOffset)
int is64bitOpenFunction)
{
unz64_s us;
unz64_s *s;
@ -621,14 +620,6 @@ local unzFile unzOpenInternal (const void *path,
if (us.filestream==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);
if (central_pos)
{
@ -778,10 +769,10 @@ extern unzFile ZEXPORT unzOpen2 (const char *path,
{
zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
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
return unzOpenInternal(path, NULL, 0, 0);
return unzOpenInternal(path, NULL, 0);
}
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.ztell32_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
return unzOpenInternal(path, NULL, 1, 0);
return unzOpenInternal(path, NULL, 1);
}
extern unzFile ZEXPORT unzOpen (const char *path)
{
return unzOpenInternal(path, NULL, 0, 0);
}
extern unzFile ZEXPORT unzOpenOffset (const char *path, unsigned int basicOffset)
{
return unzOpenInternal(path, NULL, 0, basicOffset);
return unzOpenInternal(path, NULL, 0);
}
extern unzFile ZEXPORT unzOpen64 (const void *path)
{
return unzOpenInternal(path, NULL, 1, 0);
return unzOpenInternal(path, NULL, 1);
}
/*

View File

@ -164,7 +164,6 @@ extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
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));
/*
Open a Zip file. path contain the full pathname (by example,