diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:25:17 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:25:17 -0700 |
commit | abf180a067223611620dd97dd5681df7c7fa7c9b (patch) | |
tree | 48ce6022aa1670380c098bd0abed2ac4aa1d9ca0 /contrib/minizip/ioapi.h | |
parent | 9c3a5830218c4e7fff23b8fc4386269db77a03a9 (diff) | |
download | zlib-abf180a067223611620dd97dd5681df7c7fa7c9b.tar.gz zlib-abf180a067223611620dd97dd5681df7c7fa7c9b.tar.bz2 zlib-abf180a067223611620dd97dd5681df7c7fa7c9b.zip |
zlib 1.2.3v1.2.3
Diffstat (limited to 'contrib/minizip/ioapi.h')
-rw-r--r-- | contrib/minizip/ioapi.h | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/contrib/minizip/ioapi.h b/contrib/minizip/ioapi.h index e73a3b2..7d457ba 100644 --- a/contrib/minizip/ioapi.h +++ b/contrib/minizip/ioapi.h | |||
@@ -1,75 +1,75 @@ | |||
1 | /* ioapi.h -- IO base function header for compress/uncompress .zip | 1 | /* ioapi.h -- IO base function header for compress/uncompress .zip |
2 | files using zlib + zip or unzip API | 2 | files using zlib + zip or unzip API |
3 | 3 | ||
4 | Version 1.01e, February 12th, 2005 | 4 | Version 1.01e, February 12th, 2005 |
5 | 5 | ||
6 | Copyright (C) 1998-2005 Gilles Vollant | 6 | Copyright (C) 1998-2005 Gilles Vollant |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _ZLIBIOAPI_H | 9 | #ifndef _ZLIBIOAPI_H |
10 | #define _ZLIBIOAPI_H | 10 | #define _ZLIBIOAPI_H |
11 | 11 | ||
12 | 12 | ||
13 | #define ZLIB_FILEFUNC_SEEK_CUR (1) | 13 | #define ZLIB_FILEFUNC_SEEK_CUR (1) |
14 | #define ZLIB_FILEFUNC_SEEK_END (2) | 14 | #define ZLIB_FILEFUNC_SEEK_END (2) |
15 | #define ZLIB_FILEFUNC_SEEK_SET (0) | 15 | #define ZLIB_FILEFUNC_SEEK_SET (0) |
16 | 16 | ||
17 | #define ZLIB_FILEFUNC_MODE_READ (1) | 17 | #define ZLIB_FILEFUNC_MODE_READ (1) |
18 | #define ZLIB_FILEFUNC_MODE_WRITE (2) | 18 | #define ZLIB_FILEFUNC_MODE_WRITE (2) |
19 | #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) | 19 | #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) |
20 | 20 | ||
21 | #define ZLIB_FILEFUNC_MODE_EXISTING (4) | 21 | #define ZLIB_FILEFUNC_MODE_EXISTING (4) |
22 | #define ZLIB_FILEFUNC_MODE_CREATE (8) | 22 | #define ZLIB_FILEFUNC_MODE_CREATE (8) |
23 | 23 | ||
24 | 24 | ||
25 | #ifndef ZCALLBACK | 25 | #ifndef ZCALLBACK |
26 | 26 | ||
27 | #if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) | 27 | #if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) |
28 | #define ZCALLBACK CALLBACK | 28 | #define ZCALLBACK CALLBACK |
29 | #else | 29 | #else |
30 | #define ZCALLBACK | 30 | #define ZCALLBACK |
31 | #endif | 31 | #endif |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #ifdef __cplusplus | 34 | #ifdef __cplusplus |
35 | extern "C" { | 35 | extern "C" { |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); | 38 | typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); |
39 | typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); | 39 | typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); |
40 | typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); | 40 | typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); |
41 | typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); | 41 | typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); |
42 | typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); | 42 | typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); |
43 | typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); | 43 | typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); |
44 | typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); | 44 | typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); |
45 | 45 | ||
46 | typedef struct zlib_filefunc_def_s | 46 | typedef struct zlib_filefunc_def_s |
47 | { | 47 | { |
48 | open_file_func zopen_file; | 48 | open_file_func zopen_file; |
49 | read_file_func zread_file; | 49 | read_file_func zread_file; |
50 | write_file_func zwrite_file; | 50 | write_file_func zwrite_file; |
51 | tell_file_func ztell_file; | 51 | tell_file_func ztell_file; |
52 | seek_file_func zseek_file; | 52 | seek_file_func zseek_file; |
53 | close_file_func zclose_file; | 53 | close_file_func zclose_file; |
54 | testerror_file_func zerror_file; | 54 | testerror_file_func zerror_file; |
55 | voidpf opaque; | 55 | voidpf opaque; |
56 | } zlib_filefunc_def; | 56 | } zlib_filefunc_def; |
57 | 57 | ||
58 | 58 | ||
59 | 59 | ||
60 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); | 60 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); |
61 | 61 | ||
62 | #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) | 62 | #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) |
63 | #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) | 63 | #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) |
64 | #define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) | 64 | #define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) |
65 | #define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) | 65 | #define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) |
66 | #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) | 66 | #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) |
67 | #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) | 67 | #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) |
68 | 68 | ||
69 | 69 | ||
70 | #ifdef __cplusplus | 70 | #ifdef __cplusplus |
71 | } | 71 | } |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #endif | 74 | #endif |
75 | 75 | ||