14 #ifndef _CRT_SECURE_NO_WARNINGS
15 #define _CRT_SECURE_NO_WARNINGS
37 uLong offsetTruncated = (uLong)offset;
38 if (offsetTruncated != offset)
52 if ((tell_uLong) == ((uLong)-1))
88 const char* mode_fopen = NULL;
98 if ((filename!=NULL) && (mode_fopen != NULL))
99 file = fopen(filename, mode_fopen);
107 const char* mode_fopen = NULL;
117 if ((filename!=NULL) && (mode_fopen != NULL))
119 file = fopen((
const char*)filename, mode_fopen);
130 ret = (uLong)fread(buf, 1, (
size_t)size, (FILE *)stream);
137 ret = (uLong)fwrite(buf, 1, (
size_t)size, (FILE *)stream);
144 ret = ftell((FILE *)stream);
152 ret = ftell((FILE *)stream);
176 if (fseek((FILE *)stream, offset, fseek_origin) != 0)
200 if(fseek((FILE *)stream, offset, fseek_origin) != 0)
212 ret = fclose((FILE *)stream);
219 ret = ferror((FILE *)stream);
232 pzlib_filefunc_def->
opaque = NULL;
245 pzlib_filefunc_def->
opaque = NULL;
void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def *p_filefunc64_32, const zlib_filefunc_def *p_filefunc32)
static ZPOS64_T ftell64_file_func(voidpf opaque, voidpf stream)
static long fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin)
static int fclose_file_func(voidpf opaque, voidpf stream)
static long ftell_file_func(voidpf opaque, voidpf stream)
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)
static uLong fread_file_func(voidpf opaque, voidpf stream, void *buf, uLong size)
static long fseek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
long call_zseek64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin)
void fill_fopen64_filefunc(zlib_filefunc64_def *pzlib_filefunc_def)
void fill_fopen_filefunc(zlib_filefunc_def *pzlib_filefunc_def)
voidpf call_zopen64(const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode)
static int ferror_file_func(voidpf opaque, voidpf stream)
ZPOS64_T call_ztell64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream)
static voidpf fopen64_file_func(voidpf opaque, const void *filename, int mode)
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER
#define ZLIB_FILEFUNC_MODE_EXISTING
#define ZLIB_FILEFUNC_SEEK_CUR
#define ZLIB_FILEFUNC_SEEK_SET
voidpf open_file_func OF((voidpf opaque, const char *filename, int mode))
#define ZLIB_FILEFUNC_MODE_CREATE
#define ZLIB_FILEFUNC_SEEK_END
#define ZLIB_FILEFUNC_MODE_READ
unsigned long long int ZPOS64_T
seek_file_func zseek32_file
zlib_filefunc64_def zfile_func64
open_file_func zopen32_file
tell_file_func ztell32_file
write_file_func zwrite_file
open64_file_func zopen64_file
read_file_func zread_file
tell64_file_func ztell64_file
close_file_func zclose_file
seek64_file_func zseek64_file
testerror_file_func zerror_file
seek_file_func zseek_file
open_file_func zopen_file
testerror_file_func zerror_file
write_file_func zwrite_file
read_file_func zread_file
close_file_func zclose_file
tell_file_func ztell_file