summaryrefslogtreecommitdiff
path: root/infcodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'infcodes.c')
-rw-r--r--infcodes.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/infcodes.c b/infcodes.c
index 22ce856..6314e80 100644
--- a/infcodes.c
+++ b/infcodes.c
@@ -1,5 +1,5 @@
1/* infcodes.c -- process literals and length/distance pairs 1/* infcodes.c -- process literals and length/distance pairs
2 * Copyright (C) 1995 Mark Adler 2 * Copyright (C) 1995-1996 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
@@ -58,7 +58,8 @@ struct inflate_codes_state {
58 58
59inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) 59inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
60uInt bl, bd; 60uInt bl, bd;
61inflate_huft *tl, *td; 61inflate_huft *tl;
62inflate_huft *td; /* need separate declaration for Borland C++ */
62z_stream *z; 63z_stream *z;
63{ 64{
64 inflate_codes_statef *c; 65 inflate_codes_statef *c;
@@ -152,7 +153,7 @@ int r;
152 break; 153 break;
153 } 154 }
154 c->mode = BADCODE; /* invalid code */ 155 c->mode = BADCODE; /* invalid code */
155 z->msg = "invalid literal/length code"; 156 z->msg = (char*)"invalid literal/length code";
156 r = Z_DATA_ERROR; 157 r = Z_DATA_ERROR;
157 LEAVE 158 LEAVE
158 case LENEXT: /* i: getting length extra (have base) */ 159 case LENEXT: /* i: getting length extra (have base) */
@@ -184,7 +185,7 @@ int r;
184 break; 185 break;
185 } 186 }
186 c->mode = BADCODE; /* invalid code */ 187 c->mode = BADCODE; /* invalid code */
187 z->msg = "invalid distance code"; 188 z->msg = (char*)"invalid distance code";
188 r = Z_DATA_ERROR; 189 r = Z_DATA_ERROR;
189 LEAVE 190 LEAVE
190 case DISTEXT: /* i: getting distance extra */ 191 case DISTEXT: /* i: getting distance extra */
@@ -202,7 +203,7 @@ int r;
202#else 203#else
203 f = q - c->sub.copy.dist; 204 f = q - c->sub.copy.dist;
204 if ((uInt)(q - s->window) < c->sub.copy.dist) 205 if ((uInt)(q - s->window) < c->sub.copy.dist)
205 f = s->end - (c->sub.copy.dist - (q - s->window)); 206 f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));
206#endif 207#endif
207 while (c->len) 208 while (c->len)
208 { 209 {