summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2023-04-15 01:18:06 -0700
committerMark Adler <madler@alumni.caltech.edu>2023-04-15 21:18:52 -0700
commitc4aa356742e03af6670c043905cd2c96f515ad72 (patch)
tree00d7887ae3af633455b3402226896d2e0db73911
parente9d5486e6635141f589e110fd789648aa08e9544 (diff)
downloadzlib-c4aa356742e03af6670c043905cd2c96f515ad72.tar.gz
zlib-c4aa356742e03af6670c043905cd2c96f515ad72.tar.bz2
zlib-c4aa356742e03af6670c043905cd2c96f515ad72.zip
Remove K&R function definitions from infback9.
-rw-r--r--contrib/infback9/infback9.c24
-rw-r--r--contrib/infback9/infback9.h16
-rw-r--r--contrib/infback9/inftree9.c11
-rw-r--r--contrib/infback9/inftree9.h6
4 files changed, 20 insertions, 37 deletions
diff --git a/contrib/infback9/infback9.c b/contrib/infback9/infback9.c
index 05fb3e3..742a392 100644
--- a/contrib/infback9/infback9.c
+++ b/contrib/infback9/infback9.c
@@ -16,12 +16,8 @@
16 16
17 window is a user-supplied window and output buffer that is 64K bytes. 17 window is a user-supplied window and output buffer that is 64K bytes.
18 */ 18 */
19int ZEXPORT inflateBack9Init_(strm, window, version, stream_size) 19int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window,
20z_stream FAR *strm; 20 const char *version, int stream_size) {
21unsigned char FAR *window;
22const char *version;
23int stream_size;
24{
25 struct inflate_state FAR *state; 21 struct inflate_state FAR *state;
26 22
27 if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || 23 if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
@@ -51,8 +47,7 @@ int stream_size;
51#ifdef MAKEFIXED 47#ifdef MAKEFIXED
52#include <stdio.h> 48#include <stdio.h>
53 49
54void makefixed9(void) 50void makefixed9(void) {
55{
56 unsigned sym, bits, low, size; 51 unsigned sym, bits, low, size;
57 code *next, *lenfix, *distfix; 52 code *next, *lenfix, *distfix;
58 struct inflate_state state; 53 struct inflate_state state;
@@ -214,13 +209,8 @@ void makefixed9(void)
214 inflateBack() can also return Z_STREAM_ERROR if the input parameters 209 inflateBack() can also return Z_STREAM_ERROR if the input parameters
215 are not correct, i.e. strm is Z_NULL or the state was not initialized. 210 are not correct, i.e. strm is Z_NULL or the state was not initialized.
216 */ 211 */
217int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc) 212int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc,
218z_stream FAR *strm; 213 out_func out, void FAR *out_desc) {
219in_func in;
220void FAR *in_desc;
221out_func out;
222void FAR *out_desc;
223{
224 struct inflate_state FAR *state; 214 struct inflate_state FAR *state;
225 z_const unsigned char FAR *next; /* next input */ 215 z_const unsigned char FAR *next; /* next input */
226 unsigned char FAR *put; /* next output */ 216 unsigned char FAR *put; /* next output */
@@ -603,9 +593,7 @@ void FAR *out_desc;
603 return ret; 593 return ret;
604} 594}
605 595
606int ZEXPORT inflateBack9End(strm) 596int ZEXPORT inflateBack9End(z_stream FAR *strm) {
607z_stream FAR *strm;
608{
609 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) 597 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
610 return Z_STREAM_ERROR; 598 return Z_STREAM_ERROR;
611 ZFREE(strm, strm->state); 599 ZFREE(strm, strm->state);
diff --git a/contrib/infback9/infback9.h b/contrib/infback9/infback9.h
index 1073c0a..8371b4e 100644
--- a/contrib/infback9/infback9.h
+++ b/contrib/infback9/infback9.h
@@ -20,14 +20,14 @@
20extern "C" { 20extern "C" {
21#endif 21#endif
22 22
23ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm, 23ZEXTERN int ZEXPORT inflateBack9(z_stream FAR *strm,
24 in_func in, void FAR *in_desc, 24 in_func in, void FAR *in_desc,
25 out_func out, void FAR *out_desc)); 25 out_func out, void FAR *out_desc);
26ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm)); 26ZEXTERN int ZEXPORT inflateBack9End(z_stream FAR *strm);
27ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm, 27ZEXTERN int ZEXPORT inflateBack9Init_(z_stream FAR *strm,
28 unsigned char FAR *window, 28 unsigned char FAR *window,
29 const char *version, 29 const char *version,
30 int stream_size)); 30 int stream_size);
31#define inflateBack9Init(strm, window) \ 31#define inflateBack9Init(strm, window) \
32 inflateBack9Init_((strm), (window), \ 32 inflateBack9Init_((strm), (window), \
33 ZLIB_VERSION, sizeof(z_stream)) 33 ZLIB_VERSION, sizeof(z_stream))
diff --git a/contrib/infback9/inftree9.c b/contrib/infback9/inftree9.c
index 01a91f8..4faec86 100644
--- a/contrib/infback9/inftree9.c
+++ b/contrib/infback9/inftree9.c
@@ -29,14 +29,9 @@ const char inflate9_copyright[] =
29 table index bits. It will differ if the request is greater than the 29 table index bits. It will differ if the request is greater than the
30 longest code or if it is less than the shortest code. 30 longest code or if it is less than the shortest code.
31 */ 31 */
32int inflate_table9(type, lens, codes, table, bits, work) 32int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes,
33codetype type; 33 code FAR * FAR *table, unsigned FAR *bits,
34unsigned short FAR *lens; 34 unsigned short FAR *work) {
35unsigned codes;
36code FAR * FAR *table;
37unsigned FAR *bits;
38unsigned short FAR *work;
39{
40 unsigned len; /* a code's length in bits */ 35 unsigned len; /* a code's length in bits */
41 unsigned sym; /* index of code symbols */ 36 unsigned sym; /* index of code symbols */
42 unsigned min, max; /* minimum and maximum code lengths */ 37 unsigned min, max; /* minimum and maximum code lengths */
diff --git a/contrib/infback9/inftree9.h b/contrib/infback9/inftree9.h
index 3b39497..2c1252f 100644
--- a/contrib/infback9/inftree9.h
+++ b/contrib/infback9/inftree9.h
@@ -56,6 +56,6 @@ typedef enum {
56 DISTS 56 DISTS
57} codetype; 57} codetype;
58 58
59extern int inflate_table9 OF((codetype type, unsigned short FAR *lens, 59extern int inflate_table9(codetype type, unsigned short FAR *lens,
60 unsigned codes, code FAR * FAR *table, 60 unsigned codes, code FAR * FAR *table,
61 unsigned FAR *bits, unsigned short FAR *work)); 61 unsigned FAR *bits, unsigned short FAR *work);