Skip to content

Commit

Permalink
quazip: fix warnings and drop OF macro
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 24, 2012
1 parent 026f0f7 commit ee84248
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 351 deletions.
17 changes: 8 additions & 9 deletions src/core/quazip/ioapi.h
Expand Up @@ -11,7 +11,6 @@
#ifndef _ZLIBIOAPI_H
#define _ZLIBIOAPI_H


#define ZLIB_FILEFUNC_SEEK_CUR (1)
#define ZLIB_FILEFUNC_SEEK_END (2)
#define ZLIB_FILEFUNC_SEEK_SET (0)
Expand All @@ -38,13 +37,13 @@ extern "C"
{
#endif

typedef voidpf( ZCALLBACK *open_file_func ) OF(( voidpf opaque, voidpf file, 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 uLong( ZCALLBACK *tell_file_func ) OF(( voidpf opaque, voidpf stream ) );
typedef int ( ZCALLBACK *seek_file_func ) OF(( voidpf opaque, voidpf stream, uLong offset, int origin ) );
typedef int ( ZCALLBACK *close_file_func ) OF(( voidpf opaque, voidpf stream ) );
typedef int ( ZCALLBACK *testerror_file_func ) OF(( voidpf opaque, voidpf stream ) );
typedef voidpf( ZCALLBACK *open_file_func )( voidpf opaque, voidpf file, 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 uLong( ZCALLBACK *tell_file_func )( voidpf opaque, voidpf stream );
typedef int ( ZCALLBACK *seek_file_func )( voidpf opaque, voidpf stream, uLong offset, int origin );
typedef int ( ZCALLBACK *close_file_func )( voidpf opaque, voidpf stream );
typedef int ( ZCALLBACK *testerror_file_func )( voidpf opaque, voidpf stream );

typedef struct zlib_filefunc_def_s
{
Expand All @@ -60,7 +59,7 @@ extern "C"



void fill_qiodevice_filefunc OF(( zlib_filefunc_def* pzlib_filefunc_def ) );
void fill_qiodevice_filefunc( zlib_filefunc_def* pzlib_filefunc_def );

#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
Expand Down

0 comments on commit ee84248

Please sign in to comment.