aboutsummaryrefslogtreecommitdiff
path: root/infback.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2023-04-14 01:42:03 -0700
committerMark Adler <madler@alumni.caltech.edu>2023-04-15 21:17:31 -0700
commite9d5486e6635141f589e110fd789648aa08e9544 (patch)
treea78b9ccd92b05af7cd5776b688d9c3eb3a81a40a /infback.c
parent5799c14c8526bf1aaa130c021982f831d155b46d (diff)
downloadzlib-e9d5486e6635141f589e110fd789648aa08e9544.tar.gz
zlib-e9d5486e6635141f589e110fd789648aa08e9544.tar.bz2
zlib-e9d5486e6635141f589e110fd789648aa08e9544.zip
Remove K&R function definitions from zlib.
C2X has removed K&R definitions from the C function syntax. Though the standard has not yet been approved, some high-profile compilers are now issuing warnings when such definitions are encountered.
Diffstat (limited to 'infback.c')
-rw-r--r--infback.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/infback.c b/infback.c
index babeaf1..e7b25b3 100644
--- a/infback.c
+++ b/infback.c
@@ -15,9 +15,6 @@
15#include "inflate.h" 15#include "inflate.h"
16#include "inffast.h" 16#include "inffast.h"
17 17
18/* function prototypes */
19local void fixedtables OF((struct inflate_state FAR *state));
20
21/* 18/*
22 strm provides memory allocation functions in zalloc and zfree, or 19 strm provides memory allocation functions in zalloc and zfree, or
23 Z_NULL to use the library memory allocation functions. 20 Z_NULL to use the library memory allocation functions.
@@ -25,13 +22,9 @@ local void fixedtables OF((struct inflate_state FAR *state));
25 windowBits is in the range 8..15, and window is a user-supplied 22 windowBits is in the range 8..15, and window is a user-supplied
26 window and output buffer that is 2**windowBits bytes. 23 window and output buffer that is 2**windowBits bytes.
27 */ 24 */
28int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) 25int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
29z_streamp strm; 26 unsigned char FAR *window, const char *version,
30int windowBits; 27 int stream_size) {
31unsigned char FAR *window;
32const char *version;
33int stream_size;
34{
35 struct inflate_state FAR *state; 28 struct inflate_state FAR *state;
36 29
37 if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || 30 if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
@@ -80,9 +73,7 @@ int stream_size;
80 used for threaded applications, since the rewriting of the tables and virgin 73 used for threaded applications, since the rewriting of the tables and virgin
81 may not be thread-safe. 74 may not be thread-safe.
82 */ 75 */
83local void fixedtables(state) 76local void fixedtables(struct inflate_state FAR *state) {
84struct inflate_state FAR *state;
85{
86#ifdef BUILDFIXED 77#ifdef BUILDFIXED
87 static int virgin = 1; 78 static int virgin = 1;
88 static code *lenfix, *distfix; 79 static code *lenfix, *distfix;
@@ -248,13 +239,8 @@ struct inflate_state FAR *state;
248 inflateBack() can also return Z_STREAM_ERROR if the input parameters 239 inflateBack() can also return Z_STREAM_ERROR if the input parameters
249 are not correct, i.e. strm is Z_NULL or the state was not initialized. 240 are not correct, i.e. strm is Z_NULL or the state was not initialized.
250 */ 241 */
251int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) 242int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc,
252z_streamp strm; 243 out_func out, void FAR *out_desc) {
253in_func in;
254void FAR *in_desc;
255out_func out;
256void FAR *out_desc;
257{
258 struct inflate_state FAR *state; 244 struct inflate_state FAR *state;
259 z_const unsigned char FAR *next; /* next input */ 245 z_const unsigned char FAR *next; /* next input */
260 unsigned char FAR *put; /* next output */ 246 unsigned char FAR *put; /* next output */
@@ -632,9 +618,7 @@ void FAR *out_desc;
632 return ret; 618 return ret;
633} 619}
634 620
635int ZEXPORT inflateBackEnd(strm) 621int ZEXPORT inflateBackEnd(z_streamp strm) {
636z_streamp strm;
637{
638 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) 622 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
639 return Z_STREAM_ERROR; 623 return Z_STREAM_ERROR;
640 ZFREE(strm, strm->state); 624 ZFREE(strm, strm->state);