Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9910824e
Commit
9910824e
authored
May 30, 2003
by
Steven Cole
Committed by
David S. Miller
May 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] More ANSI C cleanup of zlib
More zlib K&R to ANSI C function header conversions.
parent
022c22ef
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
46 deletions
+63
-46
arch/ppc/boot/lib/zlib.c
arch/ppc/boot/lib/zlib.c
+17
-12
arch/ppc64/boot/zlib.c
arch/ppc64/boot/zlib.c
+17
-12
lib/zlib_deflate/deflate.c
lib/zlib_deflate/deflate.c
+29
-22
No files found.
arch/ppc/boot/lib/zlib.c
View file @
9910824e
...
@@ -316,8 +316,9 @@ int inflateReset(
...
@@ -316,8 +316,9 @@ int inflateReset(
}
}
int
inflateEnd
(
z
)
int
inflateEnd
(
z_stream
*
z
;
z_stream
*
z
)
{
{
uLong
c
;
uLong
c
;
...
@@ -332,9 +333,10 @@ z_stream *z;
...
@@ -332,9 +333,10 @@ z_stream *z;
}
}
int
inflateInit2
(
z
,
w
)
int
inflateInit2
(
z_stream
*
z
;
z_stream
*
z
,
int
w
;
int
w
)
{
{
/* initialize state */
/* initialize state */
if
(
z
==
Z_NULL
)
if
(
z
==
Z_NULL
)
...
@@ -378,8 +380,9 @@ int w;
...
@@ -378,8 +380,9 @@ int w;
}
}
int
inflateInit
(
z
)
int
inflateInit
(
z_stream
*
z
;
z_stream
*
z
)
{
{
return
inflateInit2
(
z
,
DEF_WBITS
);
return
inflateInit2
(
z
,
DEF_WBITS
);
}
}
...
@@ -1128,8 +1131,9 @@ local int inflate_addhistory(
...
@@ -1128,8 +1131,9 @@ local int inflate_addhistory(
* At the end of a Deflate-compressed PPP packet, we expect to have seen
* 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.
* a `stored' block type value but not the (zero) length bytes.
*/
*/
local
int
inflate_packet_flush
(
s
)
local
int
inflate_packet_flush
(
inflate_blocks_statef
*
s
;
inflate_blocks_statef
*
s
)
{
{
if
(
s
->
mode
!=
LENS
)
if
(
s
->
mode
!=
LENS
)
return
Z_DATA_ERROR
;
return
Z_DATA_ERROR
;
...
@@ -1592,9 +1596,10 @@ local int inflate_trees_fixed(
...
@@ -1592,9 +1596,10 @@ local int inflate_trees_fixed(
}
}
local
int
inflate_trees_free
(
t
,
z
)
local
int
inflate_trees_free
(
inflate_huft
*
t
;
/* table to free */
inflate_huft
*
t
,
/* table to free */
z_stream
*
z
;
/* for zfree function */
z_stream
*
z
/* for zfree function */
)
/* Free the malloc'ed tables built by huft_build(), which makes a linked
/* 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
list of the tables it made, with the links in a dummy first entry of
each table. */
each table. */
...
...
arch/ppc64/boot/zlib.c
View file @
9910824e
...
@@ -339,8 +339,9 @@ int inflateReset(
...
@@ -339,8 +339,9 @@ int inflateReset(
}
}
int
inflateEnd
(
z
)
int
inflateEnd
(
z_stream
*
z
;
z_stream
*
z
)
{
{
uLong
c
;
uLong
c
;
...
@@ -355,9 +356,10 @@ z_stream *z;
...
@@ -355,9 +356,10 @@ z_stream *z;
}
}
int
inflateInit2
(
z
,
w
)
int
inflateInit2
(
z_stream
*
z
;
z_stream
*
z
,
int
w
;
int
w
)
{
{
/* initialize state */
/* initialize state */
if
(
z
==
Z_NULL
)
if
(
z
==
Z_NULL
)
...
@@ -401,8 +403,9 @@ int w;
...
@@ -401,8 +403,9 @@ int w;
}
}
int
inflateInit
(
z
)
int
inflateInit
(
z_stream
*
z
;
z_stream
*
z
)
{
{
return
inflateInit2
(
z
,
DEF_WBITS
);
return
inflateInit2
(
z
,
DEF_WBITS
);
}
}
...
@@ -1151,8 +1154,9 @@ local int inflate_addhistory(
...
@@ -1151,8 +1154,9 @@ local int inflate_addhistory(
* At the end of a Deflate-compressed PPP packet, we expect to have seen
* 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.
* a `stored' block type value but not the (zero) length bytes.
*/
*/
local
int
inflate_packet_flush
(
s
)
local
int
inflate_packet_flush
(
inflate_blocks_statef
*
s
;
inflate_blocks_statef
*
s
)
{
{
if
(
s
->
mode
!=
LENS
)
if
(
s
->
mode
!=
LENS
)
return
Z_DATA_ERROR
;
return
Z_DATA_ERROR
;
...
@@ -1615,9 +1619,10 @@ local int inflate_trees_fixed(
...
@@ -1615,9 +1619,10 @@ local int inflate_trees_fixed(
}
}
local
int
inflate_trees_free
(
t
,
z
)
local
int
inflate_trees_free
(
inflate_huft
*
t
;
/* table to free */
inflate_huft
*
t
,
/* table to free */
z_stream
*
z
;
/* for zfree function */
z_stream
*
z
/* for zfree function */
)
/* Free the malloc'ed tables built by huft_build(), which makes a linked
/* 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
list of the tables it made, with the links in a dummy first entry of
each table. */
each table. */
...
...
lib/zlib_deflate/deflate.c
View file @
9910824e
...
@@ -255,10 +255,11 @@ int zlib_deflateInit2_(
...
@@ -255,10 +255,11 @@ int zlib_deflateInit2_(
}
}
/* ========================================================================= */
/* ========================================================================= */
int
zlib_deflateSetDictionary
(
strm
,
dictionary
,
dictLength
)
int
zlib_deflateSetDictionary
(
z_streamp
strm
;
z_streamp
strm
,
const
Bytef
*
dictionary
;
const
Bytef
*
dictionary
,
uInt
dictLength
;
uInt
dictLength
)
{
{
deflate_state
*
s
;
deflate_state
*
s
;
uInt
length
=
dictLength
;
uInt
length
=
dictLength
;
...
@@ -298,8 +299,9 @@ int zlib_deflateSetDictionary (strm, dictionary, dictLength)
...
@@ -298,8 +299,9 @@ int zlib_deflateSetDictionary (strm, dictionary, dictLength)
}
}
/* ========================================================================= */
/* ========================================================================= */
int
zlib_deflateReset
(
strm
)
int
zlib_deflateReset
(
z_streamp
strm
;
z_streamp
strm
)
{
{
deflate_state
*
s
;
deflate_state
*
s
;
...
@@ -328,10 +330,11 @@ int zlib_deflateReset (strm)
...
@@ -328,10 +330,11 @@ int zlib_deflateReset (strm)
}
}
/* ========================================================================= */
/* ========================================================================= */
int
zlib_deflateParams
(
strm
,
level
,
strategy
)
int
zlib_deflateParams
(
z_streamp
strm
;
z_streamp
strm
,
int
level
;
int
level
,
int
strategy
;
int
strategy
)
{
{
deflate_state
*
s
;
deflate_state
*
s
;
compress_func
func
;
compress_func
func
;
...
@@ -405,9 +408,10 @@ local void flush_pending(strm)
...
@@ -405,9 +408,10 @@ local void flush_pending(strm)
}
}
/* ========================================================================= */
/* ========================================================================= */
int
zlib_deflate
(
strm
,
flush
)
int
zlib_deflate
(
z_streamp
strm
;
z_streamp
strm
,
int
flush
;
int
flush
)
{
{
int
old_flush
;
/* value of flush param for previous deflate call */
int
old_flush
;
/* value of flush param for previous deflate call */
deflate_state
*
s
;
deflate_state
*
s
;
...
@@ -542,8 +546,9 @@ int zlib_deflate (strm, flush)
...
@@ -542,8 +546,9 @@ int zlib_deflate (strm, flush)
}
}
/* ========================================================================= */
/* ========================================================================= */
int
zlib_deflateEnd
(
strm
)
int
zlib_deflateEnd
(
z_streamp
strm
;
z_streamp
strm
)
{
{
int
status
;
int
status
;
deflate_state
*
s
;
deflate_state
*
s
;
...
@@ -565,9 +570,10 @@ int zlib_deflateEnd (strm)
...
@@ -565,9 +570,10 @@ int zlib_deflateEnd (strm)
/* =========================================================================
/* =========================================================================
* Copy the source state to the destination state.
* Copy the source state to the destination state.
*/
*/
int
zlib_deflateCopy
(
dest
,
source
)
int
zlib_deflateCopy
(
z_streamp
dest
;
z_streamp
dest
,
z_streamp
source
;
z_streamp
source
)
{
{
#ifdef MAXSEG_64K
#ifdef MAXSEG_64K
return
Z_STREAM_ERROR
;
return
Z_STREAM_ERROR
;
...
@@ -624,10 +630,11 @@ int zlib_deflateCopy (dest, source)
...
@@ -624,10 +630,11 @@ int zlib_deflateCopy (dest, source)
* allocating a large strm->next_in buffer and copying from it.
* allocating a large strm->next_in buffer and copying from it.
* (See also flush_pending()).
* (See also flush_pending()).
*/
*/
local
int
read_buf
(
strm
,
buf
,
size
)
local
int
read_buf
(
z_streamp
strm
;
z_streamp
strm
,
Bytef
*
buf
;
Bytef
*
buf
,
unsigned
size
;
unsigned
size
)
{
{
unsigned
len
=
strm
->
avail_in
;
unsigned
len
=
strm
->
avail_in
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment