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
nexedi
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
Hide 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(
}
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. */
...
...
arch/ppc64/boot/zlib.c
View file @
9910824e
...
...
@@ -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. */
...
...
lib/zlib_deflate/deflate.c
View file @
9910824e
...
...
@@ -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
;
...
...
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