15 #include "../ports/system.h"
36 const char* mode_fopen = NULL;
46 if ((filename!=NULL) && (mode_fopen != NULL))
53 return (
uLong)fread(buf, 1, (
size_t)size, (
FILE* )stream);
58 return (
uLong)fwrite(buf, 1, (
size_t)size, (
FILE* )stream);
63 return ftell((
FILE* )stream);
82 return fseek((
FILE* )stream, offset, fseek_origin);
87 return fclose((
FILE* )stream);
92 return ferror((
FILE* )stream);
104 pzlib_filefunc_def->
opaque = NULL;
static uLong ZCALLBACK fwrite_file_func(voidpf opaque, voidpf stream, const void *buf, uLong size)
testerror_file_func zerror_file
write_file_func zwrite_file
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER
#define ZLIB_FILEFUNC_MODE_READ
static long ZCALLBACK ftell_file_func(voidpf opaque, voidpf stream)
#define ZLIB_FILEFUNC_SEEK_CUR
static int ZCALLBACK ferror_file_func(voidpf opaque, voidpf stream)
typedef voidpf(ZCALLBACK *open_file_func) OF((voidpf opaque
read_file_func zread_file
seek_file_func zseek_file
#define ZLIB_FILEFUNC_MODE_CREATE
void fill_fopen_filefunc(zlib_filefunc_def *pzlib_filefunc_def)
tell_file_func ztell_file
#define ZLIB_FILEFUNC_MODE_EXISTING
close_file_func zclose_file
static int ZCALLBACK fclose_file_func(voidpf opaque, voidpf stream)
static long ZCALLBACK fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin)
open_file_func zopen_file
static voidpf ZCALLBACK fopen_file_func(voidpf opaque, const char *filename, int mode)
FILE * Sys_Fopen(const char *filename, const char *mode)
#define ZLIB_FILEFUNC_SEEK_END
static uLong ZCALLBACK fread_file_func(voidpf opaque, voidpf stream, void *buf, uLong size)
#define ZLIB_FILEFUNC_SEEK_SET
typedef uLong(ZCALLBACK *read_file_func) OF((voidpf opaque