~ubuntu-branches/ubuntu/wily/zlib/wily

« back to all changes in this revision

Viewing changes to infback.c

  • Committer: Package Import Robot
  • Author(s): Mark Brown
  • Date: 2012-06-22 16:55:56 UTC
  • mfrom: (1.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20120622165556-9xuc7gnq4w25b3i0
Yet more s390x cleanup.  Thanks to the s390x porters for thei
prompt an efficient buildd monitoring (closes: #678511).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* infback.c -- inflate using a call-back interface
2
 
 * Copyright (C) 1995-2008 Mark Adler
 
2
 * Copyright (C) 1995-2011 Mark Adler
3
3
 * For conditions of distribution and use, see copyright notice in zlib.h
4
4
 */
5
5
 
42
42
        return Z_STREAM_ERROR;
43
43
    strm->msg = Z_NULL;                 /* in case we return an error */
44
44
    if (strm->zalloc == (alloc_func)0) {
 
45
#ifdef Z_SOLO
 
46
        return Z_STREAM_ERROR;
 
47
#else
45
48
        strm->zalloc = zcalloc;
46
49
        strm->opaque = (voidpf)0;
 
50
#endif
47
51
    }
48
 
    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
 
52
    if (strm->zfree == (free_func)0)
 
53
#ifdef Z_SOLO
 
54
        return Z_STREAM_ERROR;
 
55
#else
 
56
    strm->zfree = zcfree;
 
57
#endif
49
58
    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
50
59
                                               sizeof(struct inflate_state));
51
60
    if (state == Z_NULL) return Z_MEM_ERROR;
55
64
    state->wbits = windowBits;
56
65
    state->wsize = 1U << windowBits;
57
66
    state->window = window;
58
 
    state->write = 0;
 
67
    state->wnext = 0;
59
68
    state->whave = 0;
60
69
    return Z_OK;
61
70
}
394
403
                    PULLBYTE();
395
404
                }
396
405
                if (here.val < 16) {
397
 
                    NEEDBITS(here.bits);
398
406
                    DROPBITS(here.bits);
399
407
                    state->lens[state->have++] = here.val;
400
408
                }