13 #if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS))) 14 #define _CRT_SECURE_NO_WARNINGS 17 #if defined(__APPLE__) || defined(IOAPI_NO_64) 19 #define FOPEN_FUNC(filename, mode) fopen(filename, mode) 20 #define FTELLO_FUNC(stream) ftello(stream) 21 #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) 23 #define FOPEN_FUNC(filename, mode) fopen64(filename, mode) 24 #define FTELLO_FUNC(stream) ftello64(stream) 25 #define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) 48 if (offsetTruncated != offset)
62 if ((tell_uLong) ==
MAXU32)
98 const char* mode_fopen = NULL;
108 if ((filename!=NULL) && (mode_fopen != NULL))
109 file = fopen(filename, mode_fopen);
116 const char* mode_fopen = NULL;
126 if ((filename!=NULL) && (mode_fopen != NULL))
127 file =
FOPEN_FUNC((
const char*)filename, mode_fopen);
135 ret = (
uLong)fread(buf, 1, (
size_t)
size, (FILE *)stream);
142 ret = (
uLong)fwrite(buf, 1, (
size_t)
size, (FILE *)stream);
149 ret = ftell((FILE *)stream);
179 if (fseek((FILE *)stream, offset, fseek_origin) != 0)
203 if(
FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0)
213 ret = fclose((FILE *)stream);
220 ret = ferror((FILE *)stream);
234 pzlib_filefunc_def->opaque = NULL;
246 pzlib_filefunc_def->
opaque = NULL;
static ZPOS64_T ftell64_file_func(voidpf opaque, voidpf stream)
close_file_func zclose_file
close_file_func zclose_file
ZPOS64_T call_ztell64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream)
static voidpf fopen_file_func(voidpf opaque, const char *filename, int mode)
static uLong fwrite_file_func(voidpf opaque, voidpf stream, const void *buf, uLong size)
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER
read_file_func zread_file
static long ftell_file_func(voidpf opaque, voidpf stream)
#define ZLIB_FILEFUNC_MODE_READ
static long fseek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
static int fclose_file_func(voidpf opaque, voidpf stream)
static uLong fread_file_func(voidpf opaque, voidpf stream, void *buf, uLong size)
tell64_file_func ztell64_file
seek_file_func zseek32_file
open_file_func zopen32_file
#define ZLIB_FILEFUNC_SEEK_CUR
seek64_file_func zseek64_file
static voidpf fopen_file_func OF((voidpf opaque, const char *filename, int mode))
open_file_func zopen_file
#define ZLIB_FILEFUNC_MODE_CREATE
unsigned long long int ZPOS64_T
#define FTELLO_FUNC(stream)
void fill_fopen64_filefunc(zlib_filefunc64_def *pzlib_filefunc_def)
#define ZLIB_FILEFUNC_MODE_EXISTING
tell_file_func ztell_file
write_file_func zwrite_file
tell_file_func ztell32_file
testerror_file_func zerror_file
testerror_file_func zerror_file
#define FOPEN_FUNC(filename, mode)
write_file_func zwrite_file
zlib_filefunc64_def zfile_func64
#define ZLIB_FILEFUNC_SEEK_END
#define FSEEKO_FUNC(stream, offset, origin)
read_file_func zread_file
static int ferror_file_func(voidpf opaque, voidpf stream)
static voidpf fopen64_file_func(voidpf opaque, const void *filename, int mode)
static long fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin)
void fill_fopen_filefunc(zlib_filefunc_def *pzlib_filefunc_def)
#define ZLIB_FILEFUNC_SEEK_SET
voidpf call_zopen64(const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode)
long call_zseek64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin)
seek_file_func zseek_file
open64_file_func zopen64_file
void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def *p_filefunc64_32, const zlib_filefunc_def *p_filefunc32)