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.89 2010/06/24 18:56:11 jonasw Exp $ + || $Id: zlibmod.c,v 1.90 2010/07/09 12:52:58 nilsson Exp $   */      #include "global.h"   #include "zlib_machine.h"   #include "module.h"   #include "program.h"   #include "module_support.h"      #if !defined(HAVE_LIBZ) && !defined(HAVE_LIBGZ)   #undef HAVE_ZLIB_H
pike.git/src/modules/Gz/zlibmod.c:78:    *!    *! @note    *! This class is only available if libz was available and found when    *! Pike was compiled.    *!    *! @seealso    *! @[Gz.inflate()]    */      /*! @decl void create(int(-9..9)|void level, int|void strategy,@ -  *! int(8..15) window_size) +  *! int(8..15)|void window_size)    *!    *! This function can also be used to re-initialize a Gz.deflate object    *! so it can be re-used.    *!    *! @param level    *! Indicates the level of effort spent to make the data compress    *! well. Zero means no packing, 2-3 is considered 'fast', 6 is    *! default and higher is considered 'slow' but gives better    *! packing.    *!
pike.git/src/modules/Gz/zlibmod.c:139:    if(THIS->gz.state)    {   /* mt_lock(& THIS->lock); */    deflateEnd(&THIS->gz);   /* mt_unlock(& THIS->lock); */    }       if(args>2)    {    if(sp[2-args].type != T_INT) -  Pike_error("Bad argument 2 to gz->create()\n"); -  wbits = sp[1-args].u.integer; +  Pike_error("Bad argument 3 to gz->create()\n"); +  wbits = sp[2-args].u.integer;    if( wbits == 0 ) wbits = 15;    if( wbits < 8 || wbits > 15 )    Pike_error("Invalid window size for gz_deflate->create().\n");    }       if(args)    {    if(sp[-args].type != T_INT)    Pike_error("Bad argument 1 to gz->create()\n");    THIS->level=sp[-args].u.integer;