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

version» Context lines:

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.30 2000/08/08 10:41:46 grubba Exp $"); + RCSID("$Id: zlibmod.c,v 1.31 2000/08/17 15:41:30 grubba 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:112:    /* recommended by the zlib people */    (this->gz.avail_out =    this->gz.avail_in+this->gz.avail_in/1000+42),    buf);       THREADS_ALLOW();    ret=deflate(& this->gz, flush);    THREADS_DISALLOW();       /* Absorb any unused space /Hubbe */ -  low_make_buf_space(-this->gz.avail_out,buf); +  low_make_buf_space(-((ptrdiff_t)this->gz.avail_out), buf);       /* we don't care about Z_BUF_ERROR here; it won't happen. */    }    while (ret==Z_OK && flush==Z_FINISH);       mt_unlock(& this->lock);    return ret;   }      static void gz_deflate(INT32 args)
pike.git/src/modules/Gz/zlibmod.c:262:    do    {    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); +  low_make_buf_space(-((ptrdiff_t)this->gz.avail_out), buf);    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;   }