zlib 0.99

This commit is contained in:
Mark Adler
2011-09-09 23:11:37 -07:00
parent 25e5325501
commit 56bcb184fa
33 changed files with 1833 additions and 775 deletions

View File

@@ -1,5 +1,5 @@
/* infcodes.c -- process literals and length/distance pairs
* Copyright (C) 1995 Mark Adler
* Copyright (C) 1995-1996 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -58,7 +58,8 @@ struct inflate_codes_state {
inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
uInt bl, bd;
inflate_huft *tl, *td;
inflate_huft *tl;
inflate_huft *td; /* need separate declaration for Borland C++ */
z_stream *z;
{
inflate_codes_statef *c;
@@ -152,7 +153,7 @@ int r;
break;
}
c->mode = BADCODE; /* invalid code */
z->msg = "invalid literal/length code";
z->msg = (char*)"invalid literal/length code";
r = Z_DATA_ERROR;
LEAVE
case LENEXT: /* i: getting length extra (have base) */
@@ -184,7 +185,7 @@ int r;
break;
}
c->mode = BADCODE; /* invalid code */
z->msg = "invalid distance code";
z->msg = (char*)"invalid distance code";
r = Z_DATA_ERROR;
LEAVE
case DISTEXT: /* i: getting distance extra */
@@ -202,7 +203,7 @@ int r;
#else
f = q - c->sub.copy.dist;
if ((uInt)(q - s->window) < c->sub.copy.dist)
f = s->end - (c->sub.copy.dist - (q - s->window));
f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));
#endif
while (c->len)
{