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
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 @@
window is a user-supplied window and output buffer that is 64K bytes.
*/
-int ZEXPORT inflateBack9Init_(strm, window, version, stream_size)
-z_stream FAR *strm;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
+int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window,
+ const char *version, int stream_size) {
struct inflate_state FAR *state;
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
@@ -51,8 +47,7 @@ int stream_size;
#ifdef MAKEFIXED
#include <stdio.h>
-void makefixed9(void)
-{
+void makefixed9(void) {
unsigned sym, bits, low, size;
code *next, *lenfix, *distfix;
struct inflate_state state;
@@ -214,13 +209,8 @@ void makefixed9(void)
inflateBack() can also return Z_STREAM_ERROR if the input parameters
are not correct, i.e. strm is Z_NULL or the state was not initialized.
*/
-int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc)
-z_stream FAR *strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
+int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc) {
struct inflate_state FAR *state;
z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
@@ -603,9 +593,7 @@ void FAR *out_desc;
return ret;
}
-int ZEXPORT inflateBack9End(strm)
-z_stream FAR *strm;
-{
+int ZEXPORT inflateBack9End(z_stream FAR *strm) {
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
return Z_STREAM_ERROR;
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 @@
extern "C" {
#endif
-ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
- in_func in, void FAR *in_desc,
- out_func out, void FAR *out_desc));
-ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm));
-ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
- unsigned char FAR *window,
- const char *version,
- int stream_size));
+ZEXTERN int ZEXPORT inflateBack9(z_stream FAR *strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc);
+ZEXTERN int ZEXPORT inflateBack9End(z_stream FAR *strm);
+ZEXTERN int ZEXPORT inflateBack9Init_(z_stream FAR *strm,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size);
#define inflateBack9Init(strm, window) \
inflateBack9Init_((strm), (window), \
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[] =
table index bits. It will differ if the request is greater than the
longest code or if it is less than the shortest code.
*/
-int inflate_table9(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
+int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes,
+ code FAR * FAR *table, unsigned FAR *bits,
+ unsigned short FAR *work) {
unsigned len; /* a code's length in bits */
unsigned sym; /* index of code symbols */
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 {
DISTS
} codetype;
-extern int inflate_table9 OF((codetype type, unsigned short FAR *lens,
- unsigned codes, code FAR * FAR *table,
- unsigned FAR *bits, unsigned short FAR *work));
+extern int inflate_table9(codetype type, unsigned short FAR *lens,
+ unsigned codes, code FAR * FAR *table,
+ unsigned FAR *bits, unsigned short FAR *work);