pike.git
/
src
/
modules
/
Gz
/
zlibmod.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Gz/zlibmod.c:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: zlibmod.c,v 1.
22
1999
/
06
/
10
20
:
08
:
47
hubbe Exp $");
+
RCSID("$Id: zlibmod.c,v 1.
23
2001
/
02
/
08
19
:
09
:
18
hubbe Exp $");
#include "zlib_machine.h" #if !defined(HAVE_LIBZ) && !defined(HAVE_LIBGZ) #undef HAVE_ZLIB_H #endif #ifdef HAVE_ZLIB_H #include "interpret.h"
pike.git/src/modules/Gz/zlibmod.c:267:
{ char *loc; int ret; loc=low_make_buf_space(BUF,buf); THREADS_ALLOW(); this->gz.next_out=(Bytef *)loc; this->gz.avail_out=BUF; ret=inflate(& this->gz, flush); THREADS_DISALLOW(); low_make_buf_space(-this->gz.avail_out,buf);
+
+
/* BUG WORKAROUND -Hubbe */
+
if(ret == Z_BUF_ERROR) ret=Z_OK;
+
if(ret != Z_OK) { fail=ret; break; } } while(!this->gz.avail_out || flush==Z_FINISH || this->gz.avail_in); } mt_unlock(& this->lock); return fail; }
pike.git/src/modules/Gz/zlibmod.c:301:
error("Too few arguments to gz_inflate->inflate()\n"); if(sp[-args].type != T_STRING) error("Bad argument 1 to gz_inflate->inflate()\n"); data=sp[-args].u.string; this->gz.next_in=(Bytef *)data->str; this->gz.avail_in=data->len;
-
fail=do_inflate(&buf,this,Z_
PARTIAL
_FLUSH);
+
fail=do_inflate(&buf,this,Z_
SYNC
_FLUSH);
pop_n_elems(args); if(fail != Z_OK && fail != Z_STREAM_END) { free(buf.s.str); if(THIS->gz.msg) error("Error in gz_inflate->inflate(): %s\n",THIS->gz.msg); else error("Error in gz_inflate->inflate(): %d\n",fail); }