diff options
author | jbj <devnull@localhost> | 2003-03-08 23:18:09 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-03-08 23:18:09 +0000 |
commit | 946203d5d9aa29f5b59a94786d04e4a8e34f4832 (patch) | |
tree | 3ed200831eef83984fec93980609400ced82871b /zlib/inflate.c | |
parent | 363bdbfa512829c536cad4dc10d2ad8b3c77772d (diff) | |
download | librpm-tizen-946203d5d9aa29f5b59a94786d04e4a8e34f4832.tar.gz librpm-tizen-946203d5d9aa29f5b59a94786d04e4a8e34f4832.tar.bz2 librpm-tizen-946203d5d9aa29f5b59a94786d04e4a8e34f4832.zip |
Splint fiddles.
CVS patchset: 6665
CVS date: 2003/03/08 23:18:09
Diffstat (limited to 'zlib/inflate.c')
-rw-r--r-- | zlib/inflate.c | 64 |
1 files changed, 23 insertions, 41 deletions
diff --git a/zlib/inflate.c b/zlib/inflate.c index 2e9d13490..44f4e78ff 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -83,16 +83,19 @@ #endif /* function prototypes */ -local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, unsigned out)); +local void fixedtables OF((struct inflate_state FAR *state)) + /*@modifies state @*/; +local int updatewindow OF((z_streamp strm, unsigned out)) + /*@*/; #ifdef BUILDFIXED - void makefixed OF((void)); + void makefixed OF((void)) + /*@*/; #endif local unsigned syncsearch OF((unsigned *have, unsigned char FAR *buf, - unsigned len)); + unsigned len)) + /*@modifies *have @*/; -int ZEXPORT inflateReset(strm) -z_streamp strm; +int ZEXPORT inflateReset(z_streamp strm) { struct inflate_state FAR *state; @@ -111,11 +114,8 @@ z_streamp strm; return Z_OK; } -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version, + int stream_size) { struct inflate_state FAR *state; @@ -150,10 +150,7 @@ int stream_size; return inflateReset(strm); } -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; +int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size) { return inflateInit2_(strm, DEF_WBITS, version, stream_size); } @@ -168,8 +165,7 @@ int stream_size; used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ -local void fixedtables(state) -struct inflate_state FAR *state; +local void fixedtables(struct inflate_state FAR *state) { #ifdef BUILDFIXED static int virgin = 1; @@ -232,7 +228,7 @@ struct inflate_state FAR *state; a.out > inffixed.h */ -void makefixed() +void makefixed(void) { unsigned low, size; struct inflate_state state; @@ -286,9 +282,7 @@ void makefixed() output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow(strm, out) -z_streamp strm; -unsigned out; +local int updatewindow(z_streamp strm, unsigned out) { struct inflate_state FAR *state; unsigned copy, dist; @@ -513,9 +507,7 @@ unsigned out; will return Z_BUF_ERROR if it has not reached the end of the stream. */ -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; +int ZEXPORT inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; unsigned char *next, *put; /* next input and output */ @@ -1054,8 +1046,7 @@ int flush; return ret; } -int ZEXPORT inflateEnd(strm) -z_streamp strm; +int ZEXPORT inflateEnd(z_streamp strm) { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == Z_NULL) @@ -1068,10 +1059,8 @@ z_streamp strm; return Z_OK; } -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, + uInt dictLength) { struct inflate_state FAR *state; unsigned long id; @@ -1113,10 +1102,7 @@ uInt dictLength; called again with more data and the *have state. *have is initialized to zero for the first call. */ -local unsigned syncsearch(have, buf, len) -unsigned *have; -unsigned char FAR *buf; -unsigned len; +local unsigned syncsearch(unsigned *have, unsigned char FAR *buf, unsigned len) { unsigned got; unsigned next; @@ -1136,8 +1122,7 @@ unsigned len; return next; } -int ZEXPORT inflateSync(strm) -z_streamp strm; +int ZEXPORT inflateSync(z_streamp strm) { unsigned len; /* number of bytes to look at or looked at */ unsigned long in, out; /* temporary to save total_in and total_out */ @@ -1187,8 +1172,7 @@ z_streamp strm; block. When decompressing, PPP checks that at the end of input packet, inflate is waiting for these length bytes. */ -int ZEXPORT inflateSyncPoint(strm) -z_streamp strm; +int ZEXPORT inflateSyncPoint(z_streamp strm) { struct inflate_state FAR *state; @@ -1197,9 +1181,7 @@ z_streamp strm; return state->mode == STORED && state->bits == 0; } -int ZEXPORT inflateCopy(dest, source) -z_streamp dest; -z_streamp source; +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { struct inflate_state FAR *state; struct inflate_state FAR *copy; |