diff options
author | Tom Tromey <tromey@redhat.com> | 2002-03-11 22:11:18 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-03-11 22:11:18 +0000 |
commit | e1b56469bfadaf43c8af59bdfdd199ba9d6b7f14 (patch) | |
tree | f1412386f2b8672f1b5cfdf967e1abcd29d60ca9 /zlib/infcodes.c | |
parent | 932b4e3e24e2c7f608af4e69cfacea8a25a4f1e0 (diff) | |
download | gcc-e1b56469bfadaf43c8af59bdfdd199ba9d6b7f14.zip gcc-e1b56469bfadaf43c8af59bdfdd199ba9d6b7f14.tar.gz gcc-e1b56469bfadaf43c8af59bdfdd199ba9d6b7f14.tar.bz2 |
* ChangeLog.gcj: Imported 1.1.4, while preserving local changes.
From-SVN: r50612
Diffstat (limited to 'zlib/infcodes.c')
-rw-r--r-- | zlib/infcodes.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/zlib/infcodes.c b/zlib/infcodes.c index d4e5ee9..9abe541 100644 --- a/zlib/infcodes.c +++ b/zlib/infcodes.c @@ -1,5 +1,5 @@ /* infcodes.c -- process literals and length/distance pairs - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -196,15 +196,9 @@ int r; Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); c->mode = COPY; case COPY: /* o: copying bytes in window, waiting for space */ -#ifndef __TURBOC__ /* Turbo C bug for following expression */ - f = (uInt)(q - s->window) < c->sub.copy.dist ? - s->end - (c->sub.copy.dist - (q - s->window)) : - q - c->sub.copy.dist; -#else f = q - c->sub.copy.dist; - if ((uInt)(q - s->window) < c->sub.copy.dist) - f = s->end - (c->sub.copy.dist - (uInt)(q - s->window)); -#endif + while (f < s->window) /* modulo window size-"while" instead */ + f += s->end - s->window; /* of "if" handles invalid distances */ while (c->len) { NEEDOUT |