pike.git / src / modules / Gz / module.pmod.in

version» Context lines:

pike.git/src/modules/Gz/module.pmod.in:1: - // $Id: module.pmod.in,v 1.10 2003/04/15 13:39:31 marcus Exp $ + // $Id: module.pmod.in,v 1.11 2003/04/15 13:42:34 marcus Exp $   #pike __REAL_VERSION__      inherit @module@;      //! Low-level implementation of read/write support for GZip files   class _file {       static private Stdio.Stream f;    static private inflate inf;    static private deflate def;
pike.git/src/modules/Gz/module.pmod.in:194:    if(!n)    return -1;    pos -= n;    }    return file_pos;    } else {    if(type == SEEK_CUR)    pos += file_pos;    if(pos < 0)    return -1; +  if(pos < file_pos) {    if(!f->seek || f->seek(0)<0)    return -1;    file_pos = 0;    read_buf = "";    crc = crc32(""); -  +  } else +  pos -= file_pos;    while(pos > 0) {    string r = read(pos>16384? 16384:pos);    if(!sizeof(r))    return -1;    pos -= sizeof(r);    }    return file_pos;    }    }