summaryrefslogtreecommitdiff
path: root/inffast.c
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2015-06-05 18:34:42 +0200
committerHans Kristian Rosbach <hk-git@circlestorm.org>2015-06-05 18:35:25 +0200
commit814535421783abb5d5f95073f528bbf434f192bc (patch)
tree5e999fb701b534c509dfc32047b3bef0c32e84ba /inffast.c
parent4d2c00852d3d6629c3162602b083f9b462153473 (diff)
Revert "Replace 'unsigned long' with most suitable fixed-size type."
This commit was cherry-picked and was not done, resulting in a few problems with gcc on 64bit windows. This reverts commit edd7a72e056b994458ff040d4740b16b35336b60. Conflicts: arch/x86/crc_folding.c arch/x86/fill_window_sse.c deflate.c deflate.h match.c trees.c
Diffstat (limited to 'inffast.c')
-rw-r--r--inffast.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/inffast.c b/inffast.c
index 7c5040e..b7e72d4 100644
--- a/inffast.c
+++ b/inffast.c
@@ -76,22 +76,22 @@
void ZLIB_INTERNAL inflate_fast(z_stream *strm, unsigned start) {
/* start: inflate()'s starting value for strm->avail_out */
struct inflate_state *state;
- const unsigned char *in; /* local strm->next_in */
- const unsigned char *last; /* have enough input while in < last */
- unsigned char *out; /* local strm->next_out */
- unsigned char *beg; /* inflate()'s initial strm->next_out */
- unsigned char *end; /* while out < end, enough space available */
+ const unsigned char *in; /* local strm->next_in */
+ const unsigned char *last; /* have enough input while in < last */
+ unsigned char *out; /* local strm->next_out */
+ unsigned char *beg; /* inflate()'s initial strm->next_out */
+ unsigned char *end; /* while out < end, enough space available */
#ifdef INFLATE_STRICT
unsigned dmax; /* maximum distance from zlib header */
#endif
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
unsigned wnext; /* window write index */
- unsigned char *window; /* allocated sliding window, if wsize != 0 */
- uint32_t hold; /* local strm->hold */
+ unsigned char *window; /* allocated sliding window, if wsize != 0 */
+ unsigned long hold; /* local strm->hold */
unsigned bits; /* local strm->bits */
- code const *lcode; /* local strm->lencode */
- code const *dcode; /* local strm->distcode */
+ code const *lcode; /* local strm->lencode */
+ code const *dcode; /* local strm->distcode */
unsigned lmask; /* mask for first level of length codes */
unsigned dmask; /* mask for first level of distance codes */
code here; /* retrieved table entry */
@@ -126,9 +126,9 @@ void ZLIB_INTERNAL inflate_fast(z_stream *strm, unsigned start) {
input data or output space */
do {
if (bits < 15) {
- hold += (uint32_t)(PUP(in)) << bits;
+ hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
- hold += (uint32_t)(PUP(in)) << bits;
+ hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
here = lcode[hold & lmask];
@@ -145,7 +145,7 @@ void ZLIB_INTERNAL inflate_fast(z_stream *strm, unsigned start) {
op &= 15; /* number of extra bits */
if (op) {
if (bits < op) {
- hold += (uint32_t)(PUP(in)) << bits;
+ hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
len += BITS(op);
@@ -153,9 +153,9 @@ void ZLIB_INTERNAL inflate_fast(z_stream *strm, unsigned start) {
}
Tracevv((stderr, "inflate: length %u\n", len));
if (bits < 15) {
- hold += (uint32_t)(PUP(in)) << bits;
+ hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
- hold += (uint32_t)(PUP(in)) << bits;
+ hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
here = dcode[hold & dmask];
@@ -166,10 +166,10 @@ void ZLIB_INTERNAL inflate_fast(z_stream *strm, unsigned start) {
dist = (unsigned)(here.val);
op &= 15; /* number of extra bits */
if (bits < op) {
- hold += (uint32_t)(PUP(in)) << bits;
+ hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
if (bits < op) {
- hold += (uint32_t)(PUP(in)) << bits;
+ hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
}