X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=razf.h;h=60a0c96457304ec5a728a5dcddb61e1f649e5637;hb=3a1bd4d97b4d58148b5a7fd845a3b6a023eecbed;hp=d39177664398164d11407bb613d2c6dd751df18e;hpb=f93dae0d03856955f9424e8b2aaf261304ca647e;p=samtools.git diff --git a/razf.h b/razf.h index d391776..60a0c96 100644 --- a/razf.h +++ b/razf.h @@ -36,7 +36,17 @@ #include #include #include "zlib.h" -#include "zutil.h" + +#ifdef _USE_KNETFILE +#include "knetfile.h" +#endif + +#if ZLIB_VERNUM < 0x1221 +#define _RZ_READONLY +struct _gz_header_s; +typedef struct _gz_header_s _gz_header; +#define gz_header _gz_header +#endif #define WINDOW_BITS 15 @@ -70,7 +80,14 @@ typedef struct RandomAccessZFile { char mode; /* 'w' : write mode; 'r' : read mode */ int file_type; /* plain file or rz file, razf_read support plain file as input too, in this case, razf_read work as buffered fread */ +#ifdef _USE_KNETFILE + union { + knetFile *fpr; + int fpw; + } x; +#else int filedes; /* the file descriptor */ +#endif z_stream *stream; ZBlockIndex *index; int64_t in, out, end, src_end;