summaryrefslogtreecommitdiff
path: root/src/htszlib.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2012-03-19 12:51:31 +0000
committerXavier Roche <xroche@users.noreply.github.com>2012-03-19 12:51:31 +0000
commit25adbdabb47499fe641c7bd9595024ff82667058 (patch)
tree4200bb5e746bc1c0606de615ec99f0a247d4d9ba /src/htszlib.c
parentad5b7acc19290ff91e0f42a0de448a26760fcf99 (diff)
httrack 3.30.1
Diffstat (limited to 'src/htszlib.c')
-rw-r--r--src/htszlib.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/htszlib.c b/src/htszlib.c
index d138a1c..faf4e88 100644
--- a/src/htszlib.c
+++ b/src/htszlib.c
@@ -42,23 +42,26 @@ Please visit our Website: http://www.httrack.com
#include "htsbase.h"
#include "htscore.h"
-#if HTS_USEZLIB
+#include "htszlib.h"
+#if HTS_USEZLIB
/* zlib */
+/*
#include <zlib.h>
#include "htszlib.h"
+*/
/*
Unpack file into a new file
Return value: size of the new file, or -1 if an error occured
*/
int hts_zunpack(char* filename,char* newfile) {
- if (filename && newfile) {
+ if (gz_is_available && filename && newfile) {
if (filename[0] && newfile[0]) {
gzFile gz = gzopen (filename, "rb");
if (gz) {
FILE* fpout=fopen(fconv(newfile),"wb");
- int size=0;
+ INTsys size=0;
if (fpout) {
int nr;
do {
@@ -66,7 +69,7 @@ int hts_zunpack(char* filename,char* newfile) {
nr=gzread (gz, buff, 1024);
if (nr>0) {
size+=nr;
- if ((int)fwrite(buff,1,nr,fpout) != nr)
+ if ((INTsys)fwrite(buff,1,nr,fpout) != nr)
nr=size=-1;
}
} while(nr>0);