Expand Up
@@ -165,15 +165,10 @@ typedef struct
*/
local int unzlocal_getByte OF ( (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream ,
int * pi ) );
local int unzlocal_getByte ( pzlib_filefunc_def , filestream , pi )
const zlib_filefunc_def * pzlib_filefunc_def ;
voidpf filestream ;
int * pi ;
local int unzlocal_getByte (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream ,
int * pi )
{
unsigned char c ;
int err = ( int )ZREAD ( * pzlib_filefunc_def , filestream , & c , 1 );
Expand All
@@ -195,15 +190,10 @@ int *pi;
/* ===========================================================================
Reads a long in LSB order from the given gz_stream. Sets
*/
local int unzlocal_getShort OF ( (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream ,
uLong * pX ) );
local int unzlocal_getShort ( pzlib_filefunc_def , filestream , pX )
const zlib_filefunc_def * pzlib_filefunc_def ;
voidpf filestream ;
uLong * pX ;
local int unzlocal_getShort (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream ,
uLong * pX )
{
uLong x ;
int i ;
Expand All
@@ -223,15 +213,10 @@ uLong *pX;
return err ;
}
local int unzlocal_getLong OF ( (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream ,
uLong * pX ) );
local int unzlocal_getLong ( pzlib_filefunc_def , filestream , pX )
const zlib_filefunc_def * pzlib_filefunc_def ;
voidpf filestream ;
uLong * pX ;
local int unzlocal_getLong (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream ,
uLong * pX )
{
uLong x ;
int i ;
Expand Down
Expand Up
@@ -261,9 +246,7 @@ uLong *pX;
/* My own strcmpi / strcasecmp */
local int strcmpcasenosensitive_internal ( fileName1 , fileName2 )
const char * fileName1 ;
const char * fileName2 ;
local int strcmpcasenosensitive_internal ( const char * fileName1 , const char * fileName2 )
{
for ( ;; )
{
Expand Down
Expand Up
@@ -304,10 +287,7 @@ const char* fileName2;
(like 1 on Unix, 2 on Windows)
*/
extern int ZEXPORT unzStringFileNameCompare ( fileName1 , fileName2 , iCaseSensitivity )
const char * fileName1 ;
const char * fileName2 ;
int iCaseSensitivity ;
extern int ZEXPORT unzStringFileNameCompare ( const char * fileName1 , const char * fileName2 , int iCaseSensitivity )
{
if ( iCaseSensitivity == 0 )
iCaseSensitivity = CASESENSITIVITYDEFAULTVALUE ;
Expand All
@@ -326,13 +306,9 @@ int iCaseSensitivity;
Locate the Central directory of a zipfile (at the end, just before
the global comment)
*/
local uLong unzlocal_SearchCentralDir OF ( (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream ) );
local uLong unzlocal_SearchCentralDir ( pzlib_filefunc_def , filestream )
const zlib_filefunc_def * pzlib_filefunc_def ;
voidpf filestream ;
local uLong unzlocal_SearchCentralDir (
const zlib_filefunc_def * pzlib_filefunc_def ,
voidpf filestream )
{
unsigned char * buf ;
uLong uSizeFile ;
Expand Down
Expand Up
@@ -396,9 +372,7 @@ voidpf filestream;
Else, the return value is a unzFile Handle, usable with other function
of this unzip package.
*/
extern unzFile ZEXPORT unzOpen2 ( file , pzlib_filefunc_def )
voidpf file ;
zlib_filefunc_def * pzlib_filefunc_def ;
extern unzFile ZEXPORT unzOpen2 ( voidpf file , zlib_filefunc_def * pzlib_filefunc_def )
{
unz_s us ;
unz_s * s ;
Expand Down
Expand Up
@@ -499,8 +473,7 @@ zlib_filefunc_def* pzlib_filefunc_def;
}
extern unzFile ZEXPORT unzOpen ( file )
voidpf file ;
extern unzFile ZEXPORT unzOpen ( voidpf file )
{
return unzOpen2 ( file , NULL );
}
Expand All
@@ -510,8 +483,7 @@ extern unzFile ZEXPORT unzOpen( file )
If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
return UNZ_OK if there is no problem. */
extern int ZEXPORT unzClose ( file )
unzFile file ;
extern int ZEXPORT unzClose ( unzFile file )
{
unz_s * s ;
if ( file == NULL )
Expand All
@@ -531,9 +503,7 @@ extern int ZEXPORT unzClose( file )
Write info about the ZipFile in the *pglobal_info structure.
No preparation of the structure is needed
return UNZ_OK if there is no problem. */
extern int ZEXPORT unzGetGlobalInfo ( file , pglobal_info )
unzFile file ;
unz_global_info * pglobal_info ;
extern int ZEXPORT unzGetGlobalInfo ( unzFile file , unz_global_info * pglobal_info )
{
unz_s * s ;
if ( file == NULL )
Expand All
@@ -547,9 +517,7 @@ unz_global_info *pglobal_info;
/*
Translate date/time from Dos format to tm_unz (readable more easilty)
*/
local void unzlocal_DosDateToTmuDate ( ulDosDate , ptm )
uLong ulDosDate ;
tm_unz * ptm ;
local void unzlocal_DosDateToTmuDate ( uLong ulDosDate , tm_unz * ptm )
{
uLong uDate ;
uDate = ( uLong )( ulDosDate >> 16 );
Expand All
@@ -565,7 +533,7 @@ tm_unz* ptm;
/*
Get Info about the current file in the zipfile, with internal only info
*/
local int unzlocal_GetCurrentFileInfoInternal OF ( ( unzFile file ,
local int unzlocal_GetCurrentFileInfoInternal ( unzFile file ,
unz_file_info * pfile_info ,
unz_file_info_internal
* pfile_info_internal ,
Expand All
@@ -574,23 +542,7 @@ local int unzlocal_GetCurrentFileInfoInternal OF(( unzFile file,
void * extraField ,
uLong extraFieldBufferSize ,
char * szComment ,
uLong commentBufferSize ) );
local int unzlocal_GetCurrentFileInfoInternal ( file ,
pfile_info ,
pfile_info_internal ,
szFileName , fileNameBufferSize ,
extraField , extraFieldBufferSize ,
szComment , commentBufferSize )
unzFile file ;
unz_file_info * pfile_info ;
unz_file_info_internal * pfile_info_internal ;
char * szFileName ;
uLong fileNameBufferSize ;
void * extraField ;
uLong extraFieldBufferSize ;
char * szComment ;
uLong commentBufferSize ;
uLong commentBufferSize )
{
unz_s * s ;
unz_file_info file_info ;
Expand Down
Expand Up
@@ -749,19 +701,15 @@ uLong commentBufferSize;
No preparation of the structure is needed
return UNZ_OK if there is no problem.
*/
extern int ZEXPORT unzGetCurrentFileInfo ( file ,
pfile_info ,
szFileName , fileNameBufferSize ,
extraField , extraFieldBufferSize ,
szComment , commentBufferSize )
unzFile file ;
unz_file_info * pfile_info ;
char * szFileName ;
uLong fileNameBufferSize ;
void * extraField ;
uLong extraFieldBufferSize ;
char * szComment ;
uLong commentBufferSize ;
extern int ZEXPORT unzGetCurrentFileInfo (
unzFile file ,
unz_file_info * pfile_info ,
char * szFileName ,
uLong fileNameBufferSize ,
void * extraField ,
uLong extraFieldBufferSize ,
char * szComment ,
uLong commentBufferSize )
{
return unzlocal_GetCurrentFileInfoInternal ( file , pfile_info , NULL ,
szFileName , fileNameBufferSize ,
Expand All
@@ -773,8 +721,7 @@ uLong commentBufferSize;
Set the current file of the zipfile to the first file.
return UNZ_OK if there is no problem
*/
extern int ZEXPORT unzGoToFirstFile ( file )
unzFile file ;
extern int ZEXPORT unzGoToFirstFile ( unzFile file )
{
int err = UNZ_OK ;
unz_s * s ;
Expand All
@@ -795,8 +742,7 @@ extern int ZEXPORT unzGoToFirstFile( file )
return UNZ_OK if there is no problem
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
*/
extern int ZEXPORT unzGoToNextFile ( file )
unzFile file ;
extern int ZEXPORT unzGoToNextFile ( unzFile file )
{
unz_s * s ;
int err ;
Expand Down
Expand Up
@@ -829,10 +775,7 @@ extern int ZEXPORT unzGoToNextFile( file )
UNZ_OK if the file is found. It becomes the current file.
UNZ_END_OF_LIST_OF_FILE if the file is not found
*/
extern int ZEXPORT unzLocateFile ( file , szFileName , iCaseSensitivity )
unzFile file ;
const char * szFileName ;
int iCaseSensitivity ;
extern int ZEXPORT unzLocateFile ( unzFile file , const char * szFileName , int iCaseSensitivity )
{
unz_s * s ;
int err ;
Expand Down
Expand Up
@@ -908,9 +851,7 @@ typedef struct unz_file_pos_s
} unz_file_pos;
*/
extern int ZEXPORT unzGetFilePos ( file , file_pos )
unzFile file ;
unz_file_pos * file_pos ;
extern int ZEXPORT unzGetFilePos ( unzFile file , unz_file_pos * file_pos )
{
unz_s * s ;
Expand All
@@ -926,9 +867,7 @@ unz_file_pos* file_pos;
return UNZ_OK ;
}
extern int ZEXPORT unzGoToFilePos ( file , file_pos )
unzFile file ;
unz_file_pos * file_pos ;
extern int ZEXPORT unzGoToFilePos ( unzFile file , unz_file_pos * file_pos )
{
unz_s * s ;
int err ;
Expand Down
Expand Up
@@ -962,13 +901,7 @@ unz_file_pos* file_pos;
store in *piSizeVar the size of extra info in local header
(filename and size of extra field data)
*/
local int unzlocal_CheckCurrentFileCoherencyHeader ( s , piSizeVar ,
poffset_local_extrafield ,
psize_local_extrafield )
unz_s * s ;
uInt * piSizeVar ;
uLong * poffset_local_extrafield ;
uInt * psize_local_extrafield ;
local int unzlocal_CheckCurrentFileCoherencyHeader ( unz_s * s , uInt * piSizeVar , uLong * poffset_local_extrafield , uInt * psize_local_extrafield )
{
uLong uMagic , uData , uFlags ;
uLong size_filename ;
Expand Down
Expand Up
@@ -1054,12 +987,7 @@ uInt *psize_local_extrafield;
Open for reading data the current file in the zipfile.
If there is no error and the file is opened, the return value is UNZ_OK.
*/
extern int ZEXPORT unzOpenCurrentFile3 ( file , method , level , raw , password )
unzFile file ;
int * method ;
int * level ;
int raw ;
const char * password ;
extern int ZEXPORT unzOpenCurrentFile3 ( unzFile file , int * method , int * level , int raw , const char * password )
{
int err = UNZ_OK ;
uInt iSizeVar ;
Expand Down
Expand Up
@@ -1199,24 +1127,17 @@ const char* password;
return UNZ_OK ;
}
extern int ZEXPORT unzOpenCurrentFile ( file )
unzFile file ;
extern int ZEXPORT unzOpenCurrentFile ( unzFile file )
{
return unzOpenCurrentFile3 ( file , NULL , NULL , 0 , NULL );
}
extern int ZEXPORT unzOpenCurrentFilePassword ( file , password )
unzFile file ;
const char * password ;
extern int ZEXPORT unzOpenCurrentFilePassword ( unzFile file , const char * password )
{
return unzOpenCurrentFile3 ( file , NULL , NULL , 0 , password );
}
extern int ZEXPORT unzOpenCurrentFile2 ( file , method , level , raw )
unzFile file ;
int * method ;
int * level ;
int raw ;
extern int ZEXPORT unzOpenCurrentFile2 ( unzFile file , int * method , int * level , int raw )
{
return unzOpenCurrentFile3 ( file , method , level , raw , NULL );
}
Expand All
@@ -1231,10 +1152,7 @@ int raw;
return <0 with error code if there is an error
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
extern int ZEXPORT unzReadCurrentFile ( file , buf , len )
unzFile file ;
voidp buf ;
unsigned len ;
extern int ZEXPORT unzReadCurrentFile ( unzFile file , voidp buf , unsigned len )
{
int err = UNZ_OK ;
uInt iRead = 0 ;
Expand Down
Expand Up
@@ -1392,8 +1310,7 @@ unsigned len;
/*
Give the current position in uncompressed data
*/
extern z_off_t ZEXPORT unztell ( file )
unzFile file ;
extern z_off_t ZEXPORT unztell ( unzFile file )
{
unz_s * s ;
file_in_zip_read_info_s * pfile_in_zip_read_info ;
Expand All
@@ -1412,8 +1329,7 @@ extern z_off_t ZEXPORT unztell( file )
/*
return 1 if the end of file was reached, 0 elsewhere
*/
extern int ZEXPORT unzeof ( file )
unzFile file ;
extern int ZEXPORT unzeof ( unzFile file )
{
unz_s * s ;
file_in_zip_read_info_s * pfile_in_zip_read_info ;
Expand Down
Expand Up
@@ -1445,10 +1361,7 @@ extern int ZEXPORT unzeof( file )
the return value is the number of bytes copied in buf, or (if <0)
the error code
*/
extern int ZEXPORT unzGetLocalExtrafield ( file , buf , len )
unzFile file ;
voidp buf ;
unsigned len ;
extern int ZEXPORT unzGetLocalExtrafield ( unzFile file , voidp buf , unsigned len )
{
unz_s * s ;
file_in_zip_read_info_s * pfile_in_zip_read_info ;
Expand Down
Expand Up
@@ -1496,8 +1409,7 @@ unsigned len;
Close the file in zip opened with unzipOpenCurrentFile
Return UNZ_CRCERROR if all the file was read but the CRC is not good
*/
extern int ZEXPORT unzCloseCurrentFile ( file )
unzFile file ;
extern int ZEXPORT unzCloseCurrentFile ( unzFile file )
{
int err = UNZ_OK ;
Expand Down
Expand Up
@@ -1539,10 +1451,7 @@ extern int ZEXPORT unzCloseCurrentFile( file )
uSizeBuf is the size of the szComment buffer.
return the number of byte copied or an error code <0
*/
extern int ZEXPORT unzGetGlobalComment ( file , szComment , uSizeBuf )
unzFile file ;
char * szComment ;
uLong uSizeBuf ;
extern int ZEXPORT unzGetGlobalComment ( unzFile file , char * szComment , uLong uSizeBuf )
{
unz_s * s ;
uLong uReadThis ;
Expand Down
Expand Up
@@ -1570,8 +1479,7 @@ uLong uSizeBuf;
}
/* Additions by RX '2004 */
extern uLong ZEXPORT unzGetOffset ( file )
unzFile file ;
extern uLong ZEXPORT unzGetOffset ( unzFile file )
{
unz_s * s ;
Expand All
@@ -1586,9 +1494,7 @@ extern uLong ZEXPORT unzGetOffset( file )
return s -> pos_in_central_dir ;
}
extern int ZEXPORT unzSetOffset ( file , pos )
unzFile file ;
uLong pos ;
extern int ZEXPORT unzSetOffset ( unzFile file , uLong pos )
{
unz_s * s ;
int err ;
Expand Down