rename write to wwrite to avoid variable shadowing.

This commit is contained in:
christos 2006-01-14 20:26:05 +00:00
parent 8e71b08aa2
commit 8f50ba1350
1 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: inffast.c,v 1.1.1.1 2006/01/14 20:10:29 christos Exp $ */
/* $NetBSD: inffast.c,v 1.2 2006/01/14 20:26:05 christos Exp $ */
/* inffast.c -- fast decoding
* Copyright (C) 1995-2004 Mark Adler
@ -81,7 +81,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
#endif
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
unsigned write; /* window write index */
unsigned wwrite; /* window write index */
unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
unsigned long hold; /* local strm->hold */
unsigned bits; /* local strm->bits */
@ -108,7 +108,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
#endif
wsize = state->wsize;
whave = state->whave;
write = state->write;
wwrite = state->write;
window = state->window;
hold = state->hold;
bits = state->bits;
@ -194,7 +194,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
break;
}
from = window - OFF;
if (write == 0) { /* very common case */
if (wwrite == 0) { /* very common case */
from += wsize - op;
if (op < len) { /* some from window */
len -= op;
@ -204,17 +204,17 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
from = out - dist; /* rest from output */
}
}
else if (write < op) { /* wrap around window */
from += wsize + write - op;
op -= write;
else if (wwrite < op) { /* wrap around window */
from += wsize + wwrite - op;
op -= wwrite;
if (op < len) { /* some from end of window */
len -= op;
do {
PUP(out) = PUP(from);
} while (--op);
from = window - OFF;
if (write < len) { /* some from start of window */
op = write;
if (wwrite < len) { /* some from start of window */
op = wwrite;
len -= op;
do {
PUP(out) = PUP(from);
@ -224,7 +224,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else { /* contiguous in window */
from += write - op;
from += wwrite - op;
if (op < len) { /* some from window */
len -= op;
do {