<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>OGR: cpl_minizip_ioapi.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.2-20100208 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_9403295bfc17f2c2ba80cf17b83e4de3.html">port</a> </div> </div> <div class="contents"> <h1>cpl_minizip_ioapi.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Modified version by Even Rouault. :</span> <a name="l00002"></a>00002 <span class="comment"> - change fill_fopen_filefunc to cpl_fill_fopen_filefunc</span> <a name="l00003"></a>00003 <span class="comment"> - Add support for ZIP64</span> <a name="l00004"></a>00004 <span class="comment"></span> <a name="l00005"></a>00005 <span class="comment"> Copyright (C) 2007-2008 Even Rouault</span> <a name="l00006"></a>00006 <span class="comment"></span> <a name="l00007"></a>00007 <span class="comment"> Original licence available in port/LICENCE_minizip</span> <a name="l00008"></a>00008 <span class="comment">*/</span> <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="comment">/* ioapi.h -- IO base function header for compress/uncompress .zip</span> <a name="l00011"></a>00011 <span class="comment"> files using zlib + zip or unzip API</span> <a name="l00012"></a>00012 <span class="comment"></span> <a name="l00013"></a>00013 <span class="comment"> Version 1.01e, February 12th, 2005</span> <a name="l00014"></a>00014 <span class="comment"></span> <a name="l00015"></a>00015 <span class="comment"> Copyright (C) 1998-2005 Gilles Vollant</span> <a name="l00016"></a>00016 <span class="comment">*/</span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="preprocessor">#ifndef CPL_MINIZIP_IOAPI_H_INCLUDED</span> <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define CPL_MINIZIP_IOAPI_H_INCLUDED</span> <a name="l00020"></a>00020 <span class="preprocessor"></span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="cpl__vsi_8h.html">cpl_vsi.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#define uLong64 vsi_l_offset</span> <a name="l00023"></a>00023 <span class="preprocessor"></span> <a name="l00024"></a>00024 <span class="preprocessor">#define ZLIB_FILEFUNC_SEEK_CUR (1)</span> <a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define ZLIB_FILEFUNC_SEEK_END (2)</span> <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define ZLIB_FILEFUNC_SEEK_SET (0)</span> <a name="l00027"></a>00027 <span class="preprocessor"></span> <a name="l00028"></a>00028 <span class="preprocessor">#define ZLIB_FILEFUNC_MODE_READ (1)</span> <a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define ZLIB_FILEFUNC_MODE_WRITE (2)</span> <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 <span class="preprocessor">#define ZLIB_FILEFUNC_MODE_EXISTING (4)</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define ZLIB_FILEFUNC_MODE_CREATE (8)</span> <a name="l00034"></a>00034 <span class="preprocessor"></span> <a name="l00035"></a>00035 <span class="preprocessor">#ifndef ZCALLBACK</span> <a name="l00036"></a>00036 <span class="preprocessor"></span> <a name="l00037"></a>00037 <span class="preprocessor">#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)</span> <a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define ZCALLBACK CALLBACK</span> <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define ZCALLBACK</span> <a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00043"></a>00043 <span class="preprocessor"></span> <a name="l00044"></a>00044 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00045"></a>00045 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00046"></a>00046 <span class="preprocessor">#endif</span> <a name="l00047"></a>00047 <span class="preprocessor"></span> <a name="l00048"></a>00048 <span class="keyword">typedef</span> voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, <span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">int</span> mode)); <a name="l00049"></a>00049 <span class="keyword">typedef</span> uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, <span class="keywordtype">void</span>* buf, uLong size)); <a name="l00050"></a>00050 <span class="keyword">typedef</span> uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, <span class="keyword">const</span> <span class="keywordtype">void</span>* buf, uLong size)); <a name="l00051"></a>00051 <span class="keyword">typedef</span> uLong64 (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); <a name="l00052"></a>00052 <span class="keyword">typedef</span> long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong64 offset, <span class="keywordtype">int</span> origin)); <a name="l00053"></a>00053 <span class="keyword">typedef</span> int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); <a name="l00054"></a>00054 <span class="keyword">typedef</span> int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); <a name="l00055"></a>00055 <a name="l00056"></a><a class="code" href="structzlib__filefunc__def__s.html">00056</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structzlib__filefunc__def__s.html">zlib_filefunc_def_s</a> <a name="l00057"></a>00057 { <a name="l00058"></a>00058 open_file_func zopen_file; <a name="l00059"></a>00059 read_file_func zread_file; <a name="l00060"></a>00060 write_file_func zwrite_file; <a name="l00061"></a>00061 tell_file_func ztell_file; <a name="l00062"></a>00062 seek_file_func zseek_file; <a name="l00063"></a>00063 close_file_func zclose_file; <a name="l00064"></a>00064 testerror_file_func zerror_file; <a name="l00065"></a>00065 voidpf opaque; <a name="l00066"></a>00066 } <a class="code" href="structzlib__filefunc__def__s.html">zlib_filefunc_def</a>; <a name="l00067"></a>00067 <a name="l00068"></a>00068 <a name="l00069"></a>00069 <a name="l00070"></a>00070 <span class="keywordtype">void</span> cpl_fill_fopen_filefunc OF((<a class="code" href="structzlib__filefunc__def__s.html">zlib_filefunc_def</a>* pzlib_filefunc_def)); <a name="l00071"></a>00071 <a name="l00072"></a>00072 <span class="preprocessor">#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))</span> <a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))</span> <a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))</span> <a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))</span> <a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))</span> <a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))</span> <a name="l00078"></a>00078 <span class="preprocessor"></span> <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00081"></a>00081 <span class="preprocessor"></span>} <a name="l00082"></a>00082 <span class="preprocessor">#endif</span> <a name="l00083"></a>00083 <span class="preprocessor"></span> <a name="l00084"></a>00084 <span class="preprocessor">#endif </span><span class="comment">/* CPL_MINIZIP_IOAPI_H_INCLUDED */</span> </pre></div></div> <hr> Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.6.2-20100208. </body> </html>