summaryrefslogtreecommitdiff
path: root/thirdparty/minizip/ioapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/minizip/ioapi.h')
-rw-r--r--thirdparty/minizip/ioapi.h41
1 files changed, 19 insertions, 22 deletions
diff --git a/thirdparty/minizip/ioapi.h b/thirdparty/minizip/ioapi.h
index cb6cb7e766..8309c4cf8f 100644
--- a/thirdparty/minizip/ioapi.h
+++ b/thirdparty/minizip/ioapi.h
@@ -1,11 +1,12 @@
-/* this file is part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+/* ioapi.h -- IO base function header for compress/uncompress .zip
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
- For more info read LICENSE-MiniZip.txt
+ For more info read MiniZip_info.txt
Changes
@@ -40,6 +41,7 @@
#endif
#include <stdio.h>
+#include <stdlib.h>
#include "zlib.h"
#if defined(USE_FILE32API)
@@ -122,14 +124,14 @@ extern "C" {
-typedef voidpf (ZCALLBACK *open_file_func) (voidpf opaque, const char* filename, int mode);
-typedef uLong (ZCALLBACK *read_file_func) (voidpf opaque, voidpf stream, void* buf, uLong size);
-typedef uLong (ZCALLBACK *write_file_func) (voidpf opaque, voidpf stream, const void* buf, uLong size);
-typedef int (ZCALLBACK *close_file_func) (voidpf opaque, voidpf stream);
-typedef int (ZCALLBACK *testerror_file_func) (voidpf opaque, voidpf stream);
+typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
+typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
+typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream);
-typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin);
+typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
+typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
/* here is the "old" 32 bits structure structure */
@@ -143,13 +145,11 @@ typedef struct zlib_filefunc_def_s
close_file_func zclose_file;
testerror_file_func zerror_file;
voidpf opaque;
- alloc_func alloc_mem;
- free_func free_mem;
} zlib_filefunc_def;
-typedef ZPOS64_T (ZCALLBACK *tell64_file_func) (voidpf opaque, voidpf stream);
-typedef long (ZCALLBACK *seek64_file_func) (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin);
-typedef voidpf (ZCALLBACK *open64_file_func) (voidpf opaque, const void* filename, int mode);
+typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream));
+typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode));
typedef struct zlib_filefunc64_def_s
{
@@ -161,13 +161,10 @@ typedef struct zlib_filefunc64_def_s
close_file_func zclose_file;
testerror_file_func zerror_file;
voidpf opaque;
- alloc_func alloc_mem;
- free_func free_mem;
-
} zlib_filefunc64_def;
-void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def);
-void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def);
+void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
/* now internal definition, only for zip.c and unzip.h */
typedef struct zlib_filefunc64_32_def_s
@@ -186,9 +183,9 @@ typedef struct zlib_filefunc64_32_def_s
#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
-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);
-ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream);
+voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
+long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
+ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);