75 const char* mode_fopen = NULL;
85 if ((filename!=NULL) && (mode_fopen != NULL))
86 file = fopen(filename, mode_fopen);
99 ret = (
uLong)fread(buf, 1, (
size_t)
size, (FILE *)stream);
112 ret = (
uLong)fwrite(buf, 1, (
size_t)
size, (FILE *)stream);
122 ret = ftell((FILE *)stream);
149 fseek((FILE *)stream, offset, fseek_origin);
159 ret = fclose((FILE *)stream);
169 ret = ferror((FILE *)stream);
183 pzlib_filefunc_def->opaque = NULL;
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER
int ZCALLBACK fclose_file_func(voidpf opaque, voidpf stream)
int ZCALLBACK ferror_file_func(voidpf opaque, voidpf stream)
#define ZLIB_FILEFUNC_MODE_READ
#define ZLIB_FILEFUNC_SEEK_CUR
long ZCALLBACK ftell_file_func(voidpf opaque, voidpf stream)
typedef voidpf(ZCALLBACK *open_file_func) OF((voidpf opaque
voidpf ZCALLBACK fopen_file_func(voidpf opaque, const char *filename, int mode)
#define ZLIB_FILEFUNC_MODE_CREATE
#define ZLIB_FILEFUNC_MODE_EXISTING
open_file_func zopen_file
long ZCALLBACK fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin)
uLong ZCALLBACK fwrite_file_func(voidpf opaque, voidpf stream, const void *buf, uLong size)
uLong ZCALLBACK fread_file_func(voidpf opaque, voidpf stream, void *buf, uLong size)
voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char *filename, int mode))
#define ZLIB_FILEFUNC_SEEK_END
void fill_fopen_filefunc(zlib_filefunc_def *pzlib_filefunc_def)
#define ZLIB_FILEFUNC_SEEK_SET
typedef uLong(ZCALLBACK *read_file_func) OF((voidpf opaque