[BUG] Parsing zlib.h

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[BUG] Parsing zlib.h

Reinout Heeck-2
Hi all,

I am trying to parse a new version of the zlib.h (version 1.2.3) which
is available at: http://www.gzip.org/zlib/ but I get the always
enlightening syntax error. It looks like the macro OF (define OF(args)  
args) is not correctly applied on the headerfile. Below is the contents
of the Syntax Error window. I can see that the syntax is not correct but
it is incorrectly preprocessed from the headerfile.

Cham

typedef unsigned char Byte;typedef unsigned int uInt;typedef unsigned
long uLong;typedef Byte  Bytef;typedef char  charf;typedef int  
intf;typedef uInt  uIntf;typedef uLong  uLongf;typedef void
const*voidpc;typedef void *voidpf;typedef void*voidp;typedef
voidpf(*alloc_func)(voidpf opaque,uInt items,uInt size);typedef
void(*free_func)(voidpf opaque,voidpf address);struct
internal_state;typedef struct z_stream_s{Bytef*next_in;uInt
avail_in;uLong total_in;Bytef*next_out;uInt avail_out;uLong
total_out;char*msg;struct internal_state *state;alloc_func
zalloc;free_func zfree;voidpf opaque;int data_type;uLong adler;uLong
reserved;}z_stream;typedef z_stream *z_streamp;typedef struct
gz_header_s{int text;uLong time;int xflags;int os;Bytef*extra;uInt
extra_len;uInt extra_max;Bytef*name;uInt name_max;Bytef*comment;uInt
comm_max;int hcrc;int done;}gz_header;typedef gz_header
*gz_headerp;extern const char* zlibVersion(void);extern int  
deflate(z_streamp strm,int flush);extern int  deflateEnd(z_streamp
strm);extern int  inflate(z_streamp strm,int flush);extern int  
inflateEnd(z_streamp strm);extern int  deflateSetDictionary(z_streamp
strm,const Bytef*dictionary,uInt dictLength)
syntax error ->
);;extern int  deflateCopy(z_streamp dest,z_streamp source));extern int  
deflateReset(z_streamp strm);extern int  deflateParams(z_streamp
strm,int level,int strategy));;extern int  deflateTune(z_streamp
strm,int good_length,int max_lazy,int nice_length,int
max_chain));/;extern uLong  deflateBound(z_streamp strm,uLong
sourceLen));extern int  deflatePrime(z_streamp strm,int bits,int
value));;extern int  deflateSetHeader(z_streamp strm,gz_headerp
head));extern int  inflateSetDictionary(z_streamp strm,const
Bytef*dictionary,uInt dictLength));;extern int  inflateSync(z_streamp
strm);extern int  inflateCopy(z_streamp dest,z_streamp source));extern
int  inflateReset(z_streamp strm);extern int  inflatePrime(z_streamp
strm,int bits,int value));;extern int  inflateGetHeader(z_streamp
strm,gz_headerp head));typedef unsigned(*in_func)(void *,unsigned char
**);typedef int(*out_func)(void *,unsigned char *,unsigned);extern int  
inflateBack(z_streamp strm,in_func in,void *in_desc,out_func out,void
*out_desc));;extern int  inflateBackEnd(z_streamp strm);extern uLong  
zlibCompileFlags(void);extern int  
compress(Bytef*dest,uLongf*destLen,const Bytef*source,uLong
sourceLen));extern int  compress2(Bytef*dest,uLongf*destLen,const
Bytef*source,uLong sourceLen,int level));;extern uLong  
compressBound(uLong sourceLen);extern int  
uncompress(Bytef*dest,uLongf*destLen,const Bytef*source,uLong
sourceLen));typedef voidp gzFile;extern gzFile  gzopen(const
char*path,const char*mode);extern gzFile  gzdopen(int fd,const
char*mode);extern int  gzsetparams(gzFile file,int level,int
strategy);extern int  gzread(gzFile file,voidp buf,unsigned len);extern
int  gzwrite(gzFile file,voidpc buf,unsigned len));extern int  
gzprintf(gzFile file,const char*format,...);extern int  gzputs(gzFile
file,const char*s);extern char* gzgets(gzFile file,char*buf,int
len);extern int  gzputc(gzFile file,int c);extern int  gzgetc(gzFile
file);extern int  gzungetc(int c,gzFile file);extern int  gzflush(gzFile
file,int flush);extern long  gzseek(gzFile file,long offset,int
whence));extern int  gzrewind(gzFile file);extern long  gztell(gzFile
file);extern int  gzeof(gzFile file);extern int  gzdirect(gzFile
file);extern int  gzclose(gzFile file);extern const char* gzerror(gzFile
file,int*errnum);extern void  gzclearerr(gzFile file);extern uLong  
adler32(uLong adler,const Bytef*buf,uInt len);extern uLong  
adler32_combine(uLong adler1,uLong adler2,long len2));extern uLong  
crc32(uLong crc,const Bytef*buf,uInt len);extern uLong  
crc32_combine(uLong crc1,uLong crc2,long len2);extern int  
deflateInit_(z_streamp strm,int level,const char*version,int
stream_size));extern int  inflateInit_(z_streamp strm,const
char*version,int stream_size));extern int  deflateInit2_(z_streamp
strm,int level,int method,int windowBits,int memLevel,int strategy,const
char*version,int stream_size));;extern int  inflateInit2_(z_streamp
strm,int windowBits,const char*version,int stream_size));extern int  
inflateBackInit_(z_streamp strm,int windowBits,unsigned char
*window,const char*version,int stream_size));;struct internal_state{int
dummy;};extern const char* zError(int);extern int  
inflateSyncPoint(z_streamp z);extern const uLongf* get_crc_table(void);