~ubuntu-branches/debian/sid/stella/sid

« back to all changes in this revision

Viewing changes to src/zlib/gzread.c

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2013-06-28 09:53:13 UTC
  • mfrom: (1.3.6)
  • Revision ID: package-import@ubuntu.com-20130628095313-j8jkkgxpvx1t18ym
Tags: 3.9-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* gzread.c -- zlib functions for reading gzip files
2
 
 * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler
 
2
 * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
3
3
 * For conditions of distribution and use, see copyright notice in zlib.h
4
4
 */
5
5
 
58
58
        return -1;
59
59
    if (state->eof == 0) {
60
60
        if (strm->avail_in) {       /* copy what's there to the start */
61
 
            unsigned char *p = state->in, *q = strm->next_in;
 
61
            unsigned char *p = state->in;
 
62
            unsigned const char *q = strm->next_in;
62
63
            unsigned n = strm->avail_in;
63
64
            do {
64
65
                *p++ = *q++;
359
360
        /* large len -- decompress directly into user buffer */
360
361
        else {  /* state->how == GZIP */
361
362
            strm->avail_out = len;
362
 
            strm->next_out = (Bytef *)buf;
 
363
            strm->next_out = (unsigned char *)buf;
363
364
            if (gz_decomp(state) == -1)
364
365
                return -1;
365
366
            n = state->x.have;
378
379
}
379
380
 
380
381
/* -- see zlib.h -- */
381
 
#undef gzgetc
 
382
#ifdef Z_PREFIX_SET
 
383
#  undef z_gzgetc
 
384
#else
 
385
#  undef gzgetc
 
386
#endif
382
387
int ZEXPORT gzgetc(
383
388
    gzFile file)
384
389
{