diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:11:37 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:11:37 -0700 |
commit | 56bcb184fac036a45cb8937238d51778d0a796aa (patch) | |
tree | 7b127418b30e135f8ce27ec136038b5090540820 /inffast.c | |
parent | 25e5325501edade156e897f95afdaa2be78ad9a3 (diff) | |
download | zlib-56bcb184fac036a45cb8937238d51778d0a796aa.tar.gz zlib-56bcb184fac036a45cb8937238d51778d0a796aa.tar.bz2 zlib-56bcb184fac036a45cb8937238d51778d0a796aa.zip |
zlib 0.99v0.99
Diffstat (limited to 'inffast.c')
-rw-r--r-- | inffast.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* inffast.c -- process literals and length/distance pairs fast | 1 | /* inffast.c -- process literals and length/distance pairs fast |
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 | ||
@@ -29,7 +29,8 @@ struct inflate_codes_state {int dummy;}; /* for buggy compilers */ | |||
29 | 29 | ||
30 | int inflate_fast(bl, bd, tl, td, s, z) | 30 | int inflate_fast(bl, bd, tl, td, s, z) |
31 | uInt bl, bd; | 31 | uInt bl, bd; |
32 | inflate_huft *tl, *td; | 32 | inflate_huft *tl; |
33 | inflate_huft *td; /* need separate declaration for Borland C++ */ | ||
33 | inflate_blocks_statef *s; | 34 | inflate_blocks_statef *s; |
34 | z_stream *z; | 35 | z_stream *z; |
35 | { | 36 | { |
@@ -102,7 +103,7 @@ z_stream *z; | |||
102 | } | 103 | } |
103 | else /* else offset after destination */ | 104 | else /* else offset after destination */ |
104 | { | 105 | { |
105 | e = d - (q - s->window); /* bytes from offset to end */ | 106 | e = d - (uInt)(q - s->window); /* bytes from offset to end */ |
106 | r = s->end - e; /* pointer to offset */ | 107 | r = s->end - e; /* pointer to offset */ |
107 | if (c > e) /* if source crosses, */ | 108 | if (c > e) /* if source crosses, */ |
108 | { | 109 | { |
@@ -122,7 +123,7 @@ z_stream *z; | |||
122 | e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop; | 123 | e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop; |
123 | else | 124 | else |
124 | { | 125 | { |
125 | z->msg = "invalid distance code"; | 126 | z->msg = (char*)"invalid distance code"; |
126 | UNGRAB | 127 | UNGRAB |
127 | UPDATE | 128 | UPDATE |
128 | return Z_DATA_ERROR; | 129 | return Z_DATA_ERROR; |
@@ -152,7 +153,7 @@ z_stream *z; | |||
152 | } | 153 | } |
153 | else | 154 | else |
154 | { | 155 | { |
155 | z->msg = "invalid literal/length code"; | 156 | z->msg = (char*)"invalid literal/length code"; |
156 | UNGRAB | 157 | UNGRAB |
157 | UPDATE | 158 | UPDATE |
158 | return Z_DATA_ERROR; | 159 | return Z_DATA_ERROR; |