summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-05-19 16:02:04 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-05-19 16:02:04 +0000
commit1433170ef4e88c4c433fd25df3864973e0e62a54 (patch)
tree1f34282f7ad759f6c8025b42f3048e6249ec7e24
parent063acf016081ae9c2b096595564f0399f6ea19b5 (diff)
removed gz_is_available flag (zlib is mandatory)
-rw-r--r--src/htsback.c2
-rw-r--r--src/htslib.c2
-rw-r--r--src/htsmodules.c7
-rw-r--r--src/htsmodules.h2
-rw-r--r--src/htszlib.c2
-rw-r--r--src/htszlib.h1
6 files changed, 4 insertions, 12 deletions
diff --git a/src/htsback.c b/src/htsback.c
index 55bf041..611e97f 100644
--- a/src/htsback.c
+++ b/src/htsback.c
@@ -499,7 +499,7 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
/* décompression */
#if HTS_USEZLIB
- if (gz_is_available && back[p].r.compressed) {
+ if (back[p].r.compressed) {
if (back[p].r.size > 0) {
//if ( (back[p].r.adr) && (back[p].r.size>0) ) {
// stats
diff --git a/src/htslib.c b/src/htslib.c
index eb20aae..fe9f240 100644
--- a/src/htslib.c
+++ b/src/htslib.c
@@ -1103,7 +1103,7 @@ int http_sendhead(httrackp * opt, t_cookie * cookie, int mode, char *xsend,
if (retour->req.http11) {
#if HTS_USEZLIB
//strcatbuff(buff,"Accept-Encoding: gzip, deflate, compress, identity"H_CRLF);
- if (gz_is_available && (!retour->req.range_used)
+ if ((!retour->req.range_used)
&& (!retour->req.nocompression))
strcatbuff(buff, "Accept-Encoding: " "gzip" /* gzip if the preffered encoding */
", " "identity;q=0.9" H_CRLF);
diff --git a/src/htsmodules.c b/src/htsmodules.c
index 338140a..c322d83 100644
--- a/src/htsmodules.c
+++ b/src/htsmodules.c
@@ -56,8 +56,6 @@ extern int fspc(httrackp * opt, FILE * fp, const char *type);
/* >>> Put all modules variables here */
-int gz_is_available = 0;
-
#if 0
t_gzopen gzopen = NULL;
t_gzread gzread = NULL;
@@ -257,12 +255,9 @@ void htspe_init(void) {
}
#endif
- /* Zlib is now statically linked */
- gz_is_available = 1;
-
/* Options availability */
sprintf(WHAT_is_available, "%s%s%s", V6_is_available ? "" : "-noV6",
- gz_is_available ? "" : "-nozip",
+ "",
#if HTS_USEOPENSSL
""
#else
diff --git a/src/htsmodules.h b/src/htsmodules.h
index b982241..db340d8 100644
--- a/src/htsmodules.h
+++ b/src/htsmodules.h
@@ -135,8 +135,6 @@ extern void htspe_init(void);
extern void htspe_uninit(void);
extern int hts_parse_externals(htsmoduleStruct * str);
-extern int gz_is_available;
-
/*extern int swf_is_available;*/
extern int SSL_is_available;
extern int V6_is_available;
diff --git a/src/htszlib.c b/src/htszlib.c
index f4a30b4..f78d778 100644
--- a/src/htszlib.c
+++ b/src/htszlib.c
@@ -56,7 +56,7 @@ int hts_zunpack(char *filename, char *newfile) {
int ret = -1;
char catbuff[CATBUFF_SIZE];
- if (gz_is_available && filename && newfile) {
+ if (filename && newfile) {
if (filename[0] && newfile[0]) {
// not: NOT an UTF-8 filename
gzFile gz = gzopen(filename, "rb");
diff --git a/src/htszlib.h b/src/htszlib.h
index 5c317b6..57004d6 100644
--- a/src/htszlib.h
+++ b/src/htszlib.h
@@ -46,7 +46,6 @@ Please visit our Website: http://www.httrack.com
/* Library internal definictions */
#ifdef HTS_INTERNAL_BYTECODE
-extern int gz_is_available;
extern int hts_zunpack(char *filename, char *newfile);
extern int hts_extract_meta(const char *path);
extern const char *hts_get_zerror(int err);