Commit 9910824e authored by Steven Cole's avatar Steven Cole Committed by David S. Miller

[PATCH] More ANSI C cleanup of zlib

More zlib K&R to ANSI C function header conversions.
parent 022c22ef
......@@ -316,8 +316,9 @@ int inflateReset(
}
int inflateEnd(z)
z_stream *z;
int inflateEnd(
z_stream *z
)
{
uLong c;
......@@ -332,9 +333,10 @@ z_stream *z;
}
int inflateInit2(z, w)
z_stream *z;
int w;
int inflateInit2(
z_stream *z,
int w
)
{
/* initialize state */
if (z == Z_NULL)
......@@ -378,8 +380,9 @@ int w;
}
int inflateInit(z)
z_stream *z;
int inflateInit(
z_stream *z
)
{
return inflateInit2(z, DEF_WBITS);
}
......@@ -1128,8 +1131,9 @@ local int inflate_addhistory(
* At the end of a Deflate-compressed PPP packet, we expect to have seen
* a `stored' block type value but not the (zero) length bytes.
*/
local int inflate_packet_flush(s)
inflate_blocks_statef *s;
local int inflate_packet_flush(
inflate_blocks_statef *s
)
{
if (s->mode != LENS)
return Z_DATA_ERROR;
......@@ -1592,9 +1596,10 @@ local int inflate_trees_fixed(
}
local int inflate_trees_free(t, z)
inflate_huft *t; /* table to free */
z_stream *z; /* for zfree function */
local int inflate_trees_free(
inflate_huft *t, /* table to free */
z_stream *z /* for zfree function */
)
/* Free the malloc'ed tables built by huft_build(), which makes a linked
list of the tables it made, with the links in a dummy first entry of
each table. */
......
......@@ -339,8 +339,9 @@ int inflateReset(
}
int inflateEnd(z)
z_stream *z;
int inflateEnd(
z_stream *z
)
{
uLong c;
......@@ -355,9 +356,10 @@ z_stream *z;
}
int inflateInit2(z, w)
z_stream *z;
int w;
int inflateInit2(
z_stream *z,
int w
)
{
/* initialize state */
if (z == Z_NULL)
......@@ -401,8 +403,9 @@ int w;
}
int inflateInit(z)
z_stream *z;
int inflateInit(
z_stream *z
)
{
return inflateInit2(z, DEF_WBITS);
}
......@@ -1151,8 +1154,9 @@ local int inflate_addhistory(
* At the end of a Deflate-compressed PPP packet, we expect to have seen
* a `stored' block type value but not the (zero) length bytes.
*/
local int inflate_packet_flush(s)
inflate_blocks_statef *s;
local int inflate_packet_flush(
inflate_blocks_statef *s
)
{
if (s->mode != LENS)
return Z_DATA_ERROR;
......@@ -1615,9 +1619,10 @@ local int inflate_trees_fixed(
}
local int inflate_trees_free(t, z)
inflate_huft *t; /* table to free */
z_stream *z; /* for zfree function */
local int inflate_trees_free(
inflate_huft *t, /* table to free */
z_stream *z /* for zfree function */
)
/* Free the malloc'ed tables built by huft_build(), which makes a linked
list of the tables it made, with the links in a dummy first entry of
each table. */
......
......@@ -255,10 +255,11 @@ int zlib_deflateInit2_(
}
/* ========================================================================= */
int zlib_deflateSetDictionary (strm, dictionary, dictLength)
z_streamp strm;
const Bytef *dictionary;
uInt dictLength;
int zlib_deflateSetDictionary(
z_streamp strm,
const Bytef *dictionary,
uInt dictLength
)
{
deflate_state *s;
uInt length = dictLength;
......@@ -298,8 +299,9 @@ int zlib_deflateSetDictionary (strm, dictionary, dictLength)
}
/* ========================================================================= */
int zlib_deflateReset (strm)
z_streamp strm;
int zlib_deflateReset(
z_streamp strm
)
{
deflate_state *s;
......@@ -328,10 +330,11 @@ int zlib_deflateReset (strm)
}
/* ========================================================================= */
int zlib_deflateParams(strm, level, strategy)
z_streamp strm;
int level;
int strategy;
int zlib_deflateParams(
z_streamp strm,
int level,
int strategy
)
{
deflate_state *s;
compress_func func;
......@@ -405,9 +408,10 @@ local void flush_pending(strm)
}
/* ========================================================================= */
int zlib_deflate (strm, flush)
z_streamp strm;
int flush;
int zlib_deflate(
z_streamp strm,
int flush
)
{
int old_flush; /* value of flush param for previous deflate call */
deflate_state *s;
......@@ -542,8 +546,9 @@ int zlib_deflate (strm, flush)
}
/* ========================================================================= */
int zlib_deflateEnd (strm)
z_streamp strm;
int zlib_deflateEnd(
z_streamp strm
)
{
int status;
deflate_state *s;
......@@ -565,9 +570,10 @@ int zlib_deflateEnd (strm)
/* =========================================================================
* Copy the source state to the destination state.
*/
int zlib_deflateCopy (dest, source)
z_streamp dest;
z_streamp source;
int zlib_deflateCopy (
z_streamp dest,
z_streamp source
)
{
#ifdef MAXSEG_64K
return Z_STREAM_ERROR;
......@@ -624,10 +630,11 @@ int zlib_deflateCopy (dest, source)
* allocating a large strm->next_in buffer and copying from it.
* (See also flush_pending()).
*/
local int read_buf(strm, buf, size)
z_streamp strm;
Bytef *buf;
unsigned size;
local int read_buf(
z_streamp strm,
Bytef *buf,
unsigned size
)
{
unsigned len = strm->avail_in;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment