diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:33 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:33 -0700 |
commit | 7850e4e406dce1f7a819297eeb151d1ca18e7cd9 (patch) | |
tree | d4befddacae46b06c4924193904de533099610b4 /infcodes.c | |
parent | ebd3c2c0e734fc99a1360014ea52ed04fe6aade4 (diff) | |
download | zlib-1.0.7.tar.gz zlib-1.0.7.tar.bz2 zlib-1.0.7.zip |
zlib 1.0.7v1.0.7
Diffstat (limited to 'infcodes.c')
-rw-r--r-- | infcodes.c | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -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-1996 Mark Adler | 2 | * Copyright (C) 1995-1998 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 | ||
@@ -16,11 +16,7 @@ | |||
16 | #define exop word.what.Exop | 16 | #define exop word.what.Exop |
17 | #define bits word.what.Bits | 17 | #define bits word.what.Bits |
18 | 18 | ||
19 | /* inflate codes private state */ | 19 | typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ |
20 | struct inflate_codes_state { | ||
21 | |||
22 | /* mode */ | ||
23 | enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ | ||
24 | START, /* x: set up for LEN */ | 20 | START, /* x: set up for LEN */ |
25 | LEN, /* i: get length/literal/eob next */ | 21 | LEN, /* i: get length/literal/eob next */ |
26 | LENEXT, /* i: getting length extra (have base) */ | 22 | LENEXT, /* i: getting length extra (have base) */ |
@@ -31,7 +27,13 @@ struct inflate_codes_state { | |||
31 | WASH, /* o: got eob, possibly still output waiting */ | 27 | WASH, /* o: got eob, possibly still output waiting */ |
32 | END, /* x: got eob and all data flushed */ | 28 | END, /* x: got eob and all data flushed */ |
33 | BADCODE} /* x: got error */ | 29 | BADCODE} /* x: got error */ |
34 | mode; /* current inflate_codes mode */ | 30 | inflate_codes_mode; |
31 | |||
32 | /* inflate codes private state */ | ||
33 | struct inflate_codes_state { | ||
34 | |||
35 | /* mode */ | ||
36 | inflate_codes_mode mode; /* current inflate_codes mode */ | ||
35 | 37 | ||
36 | /* mode dependent information */ | 38 | /* mode dependent information */ |
37 | uInt len; | 39 | uInt len; |
@@ -235,6 +237,9 @@ int r; | |||
235 | r = Z_STREAM_ERROR; | 237 | r = Z_STREAM_ERROR; |
236 | LEAVE | 238 | LEAVE |
237 | } | 239 | } |
240 | #ifdef NEED_DUMMY_RETURN | ||
241 | return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ | ||
242 | #endif | ||
238 | } | 243 | } |
239 | 244 | ||
240 | 245 | ||