pike.git / src / modules / Gz / zlibmod.c

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: zlibmod.c,v 1.60 2003/03/30 19:02:39 per Exp $ + || $Id: zlibmod.c,v 1.61 2003/03/30 20:45:35 nilsson Exp $   */      #include "global.h" - RCSID("$Id: zlibmod.c,v 1.60 2003/03/30 19:02:39 per Exp $"); + RCSID("$Id: zlibmod.c,v 1.61 2003/03/30 20:45:35 nilsson Exp $");      #include "zlib_machine.h"   #include "module.h"      #if !defined(HAVE_LIBZ) && !defined(HAVE_LIBGZ)   #undef HAVE_ZLIB_H   #endif      #ifdef HAVE_ZLIB_H   
pike.git/src/modules/Gz/zlibmod.c:306:    *!    *! @note    *! This program is only available if libz was available and found when    *! Pike was compiled.    *!    *! @seealso    *! @[deflate]    */      /*! @decl void create(int|void magic) +  *! @param magic +  *! The magic value is passed down to inflateInit2 in zlib. Specifically, +  *! if you want to uncompress PKZIP-compressed data, you have to specify +  *! -15 as the argument. What negative arguments does is undocumented as +  *! far as we know. Positive arguments set the maximum dictionary size +  *! though.    */   static void gz_inflate_create(INT32 args)   {    int tmp;    if(THIS->gz.state)    {   /* mt_lock(& THIS->lock); */    inflateEnd(&THIS->gz);   /* mt_unlock(& THIS->lock); */    }
pike.git/src/modules/Gz/zlibmod.c:327:       THIS->gz.zalloc=Z_NULL;    THIS->gz.zfree=Z_NULL;    THIS->gz.opaque=(void *)THIS;    if( args && Pike_sp[-1].type == PIKE_T_INT )    {    tmp=inflateInit2(& THIS->gz, Pike_sp[-1].u.integer);    }    else    { -  pop_n_elems(args); +     tmp=inflateInit( &THIS->gz );    } -  +  pop_n_elems(args); +    /* mt_lock(& THIS->lock); */   /* mt_unlock(& THIS->lock); */    switch(tmp)    {    case Z_OK:    return;       case Z_VERSION_ERROR:    Pike_error("libz not compatible with zlib.h!!!\n");    break;