diff options
author | steve <steve@FreeBSD.org> | 1998-02-28 06:04:26 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-02-28 06:04:26 +0000 |
commit | 9f86c0bf8cf1224d46bbefe1d308f2cc8186a79b (patch) | |
tree | f03de58d136ec48f008735e374079754bdfee40f /lib/libz/infcodes.c | |
parent | 5372e3085661ee9071da924c16a5cfdc12f7590d (diff) | |
download | FreeBSD-src-9f86c0bf8cf1224d46bbefe1d308f2cc8186a79b.zip FreeBSD-src-9f86c0bf8cf1224d46bbefe1d308f2cc8186a79b.tar.gz |
Initial import of zlib-1.1.1
PR: 5869
Reviewed by: jdp
Diffstat (limited to 'lib/libz/infcodes.c')
-rw-r--r-- | lib/libz/infcodes.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/libz/infcodes.c b/lib/libz/infcodes.c index 3ae3818..181aa53 100644 --- a/lib/libz/infcodes.c +++ b/lib/libz/infcodes.c @@ -1,5 +1,5 @@ /* infcodes.c -- process literals and length/distance pairs - * Copyright (C) 1995-1996 Mark Adler + * Copyright (C) 1995-1998 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -16,11 +16,7 @@ #define exop word.what.Exop #define bits word.what.Bits -/* inflate codes private state */ -struct inflate_codes_state { - - /* mode */ - enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ +typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ START, /* x: set up for LEN */ LEN, /* i: get length/literal/eob next */ LENEXT, /* i: getting length extra (have base) */ @@ -31,7 +27,13 @@ struct inflate_codes_state { WASH, /* o: got eob, possibly still output waiting */ END, /* x: got eob and all data flushed */ BADCODE} /* x: got error */ - mode; /* current inflate_codes mode */ +inflate_codes_mode; + +/* inflate codes private state */ +struct inflate_codes_state { + + /* mode */ + inflate_codes_mode mode; /* current inflate_codes mode */ /* mode dependent information */ uInt len; @@ -235,6 +237,9 @@ int r; r = Z_STREAM_ERROR; LEAVE } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif } |