Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
d846b098
Commit
d846b098
authored
May 30, 1998
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace BAD with zBAD so it compiles on AIX
parent
1d3754ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
infblock.c
zlib/infblock.c
+7
-7
inflate.c
zlib/inflate.c
+11
-11
infutil.h
zlib/infutil.h
+1
-1
No files found.
zlib/infblock.c
View file @
d846b098
...
@@ -176,7 +176,7 @@ int r;
...
@@ -176,7 +176,7 @@ int r;
break
;
break
;
case
3
:
/* illegal */
case
3
:
/* illegal */
DUMPBITS
(
3
)
DUMPBITS
(
3
)
s
->
mode
=
BAD
;
s
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"invalid block type"
;
z
->
msg
=
(
char
*
)
"invalid block type"
;
r
=
Z_DATA_ERROR
;
r
=
Z_DATA_ERROR
;
LEAVE
LEAVE
...
@@ -186,7 +186,7 @@ int r;
...
@@ -186,7 +186,7 @@ int r;
NEEDBITS
(
32
)
NEEDBITS
(
32
)
if
((((
~
b
)
>>
16
)
&
0xffff
)
!=
(
b
&
0xffff
))
if
((((
~
b
)
>>
16
)
&
0xffff
)
!=
(
b
&
0xffff
))
{
{
s
->
mode
=
BAD
;
s
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"invalid stored block lengths"
;
z
->
msg
=
(
char
*
)
"invalid stored block lengths"
;
r
=
Z_DATA_ERROR
;
r
=
Z_DATA_ERROR
;
LEAVE
LEAVE
...
@@ -219,7 +219,7 @@ int r;
...
@@ -219,7 +219,7 @@ int r;
#ifndef PKZIP_BUG_WORKAROUND
#ifndef PKZIP_BUG_WORKAROUND
if
((
t
&
0x1f
)
>
29
||
((
t
>>
5
)
&
0x1f
)
>
29
)
if
((
t
&
0x1f
)
>
29
||
((
t
>>
5
)
&
0x1f
)
>
29
)
{
{
s
->
mode
=
BAD
;
s
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"too many length or distance symbols"
;
z
->
msg
=
(
char
*
)
"too many length or distance symbols"
;
r
=
Z_DATA_ERROR
;
r
=
Z_DATA_ERROR
;
LEAVE
LEAVE
...
@@ -252,7 +252,7 @@ int r;
...
@@ -252,7 +252,7 @@ int r;
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
r
=
t
;
r
=
t
;
if
(
r
==
Z_DATA_ERROR
)
if
(
r
==
Z_DATA_ERROR
)
s
->
mode
=
BAD
;
s
->
mode
=
z
BAD
;
LEAVE
LEAVE
}
}
s
->
sub
.
trees
.
index
=
0
;
s
->
sub
.
trees
.
index
=
0
;
...
@@ -289,7 +289,7 @@ int r;
...
@@ -289,7 +289,7 @@ int r;
(
c
==
16
&&
i
<
1
))
(
c
==
16
&&
i
<
1
))
{
{
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
s
->
mode
=
BAD
;
s
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"invalid bit length repeat"
;
z
->
msg
=
(
char
*
)
"invalid bit length repeat"
;
r
=
Z_DATA_ERROR
;
r
=
Z_DATA_ERROR
;
LEAVE
LEAVE
...
@@ -317,7 +317,7 @@ int r;
...
@@ -317,7 +317,7 @@ int r;
if
(
t
!=
Z_OK
)
if
(
t
!=
Z_OK
)
{
{
if
(
t
==
(
uInt
)
Z_DATA_ERROR
)
if
(
t
==
(
uInt
)
Z_DATA_ERROR
)
s
->
mode
=
BAD
;
s
->
mode
=
z
BAD
;
r
=
t
;
r
=
t
;
LEAVE
LEAVE
}
}
...
@@ -361,7 +361,7 @@ int r;
...
@@ -361,7 +361,7 @@ int r;
case
DONE
:
case
DONE
:
r
=
Z_STREAM_END
;
r
=
Z_STREAM_END
;
LEAVE
LEAVE
case
BAD
:
case
z
BAD
:
r
=
Z_DATA_ERROR
;
r
=
Z_DATA_ERROR
;
LEAVE
LEAVE
default
:
default
:
...
...
zlib/inflate.c
View file @
d846b098
...
@@ -22,7 +22,7 @@ typedef enum {
...
@@ -22,7 +22,7 @@ typedef enum {
CHECK2
,
/* two check bytes to go */
CHECK2
,
/* two check bytes to go */
CHECK1
,
/* one check byte to go */
CHECK1
,
/* one check byte to go */
DONE
,
/* finished check, done */
DONE
,
/* finished check, done */
BAD
}
/* got an error--stay here */
z
BAD
}
/* got an error--stay here */
inflate_mode
;
inflate_mode
;
/* inflate private state */
/* inflate private state */
...
@@ -38,7 +38,7 @@ struct internal_state {
...
@@ -38,7 +38,7 @@ struct internal_state {
uLong
was
;
/* computed check value */
uLong
was
;
/* computed check value */
uLong
need
;
/* stream check value */
uLong
need
;
/* stream check value */
}
check
;
/* if CHECK, check values to compare */
}
check
;
/* if CHECK, check values to compare */
uInt
marker
;
/* if BAD, inflateSync's marker bytes count */
uInt
marker
;
/* if
z
BAD, inflateSync's marker bytes count */
}
sub
;
/* submode */
}
sub
;
/* submode */
/* mode independent information */
/* mode independent information */
...
@@ -164,14 +164,14 @@ int f;
...
@@ -164,14 +164,14 @@ int f;
NEEDBYTE
NEEDBYTE
if
(((
z
->
state
->
sub
.
method
=
NEXTBYTE
)
&
0xf
)
!=
Z_DEFLATED
)
if
(((
z
->
state
->
sub
.
method
=
NEXTBYTE
)
&
0xf
)
!=
Z_DEFLATED
)
{
{
z
->
state
->
mode
=
BAD
;
z
->
state
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"unknown compression method"
;
z
->
msg
=
(
char
*
)
"unknown compression method"
;
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
break
;
break
;
}
}
if
((
z
->
state
->
sub
.
method
>>
4
)
+
8
>
z
->
state
->
wbits
)
if
((
z
->
state
->
sub
.
method
>>
4
)
+
8
>
z
->
state
->
wbits
)
{
{
z
->
state
->
mode
=
BAD
;
z
->
state
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"invalid window size"
;
z
->
msg
=
(
char
*
)
"invalid window size"
;
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
break
;
break
;
...
@@ -182,7 +182,7 @@ int f;
...
@@ -182,7 +182,7 @@ int f;
b
=
NEXTBYTE
;
b
=
NEXTBYTE
;
if
(((
z
->
state
->
sub
.
method
<<
8
)
+
b
)
%
31
)
if
(((
z
->
state
->
sub
.
method
<<
8
)
+
b
)
%
31
)
{
{
z
->
state
->
mode
=
BAD
;
z
->
state
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"incorrect header check"
;
z
->
msg
=
(
char
*
)
"incorrect header check"
;
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
break
;
break
;
...
@@ -213,7 +213,7 @@ int f;
...
@@ -213,7 +213,7 @@ int f;
z
->
state
->
mode
=
DICT0
;
z
->
state
->
mode
=
DICT0
;
return
Z_NEED_DICT
;
return
Z_NEED_DICT
;
case
DICT0
:
case
DICT0
:
z
->
state
->
mode
=
BAD
;
z
->
state
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"need dictionary"
;
z
->
msg
=
(
char
*
)
"need dictionary"
;
z
->
state
->
sub
.
marker
=
0
;
/* can try inflateSync */
z
->
state
->
sub
.
marker
=
0
;
/* can try inflateSync */
return
Z_STREAM_ERROR
;
return
Z_STREAM_ERROR
;
...
@@ -221,7 +221,7 @@ int f;
...
@@ -221,7 +221,7 @@ int f;
r
=
inflate_blocks
(
z
->
state
->
blocks
,
z
,
r
);
r
=
inflate_blocks
(
z
->
state
->
blocks
,
z
,
r
);
if
(
r
==
Z_DATA_ERROR
)
if
(
r
==
Z_DATA_ERROR
)
{
{
z
->
state
->
mode
=
BAD
;
z
->
state
->
mode
=
z
BAD
;
z
->
state
->
sub
.
marker
=
0
;
/* can try inflateSync */
z
->
state
->
sub
.
marker
=
0
;
/* can try inflateSync */
break
;
break
;
}
}
...
@@ -255,7 +255,7 @@ int f;
...
@@ -255,7 +255,7 @@ int f;
if
(
z
->
state
->
sub
.
check
.
was
!=
z
->
state
->
sub
.
check
.
need
)
if
(
z
->
state
->
sub
.
check
.
was
!=
z
->
state
->
sub
.
check
.
need
)
{
{
z
->
state
->
mode
=
BAD
;
z
->
state
->
mode
=
z
BAD
;
z
->
msg
=
(
char
*
)
"incorrect data check"
;
z
->
msg
=
(
char
*
)
"incorrect data check"
;
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
z
->
state
->
sub
.
marker
=
5
;
/* can't try inflateSync */
break
;
break
;
...
@@ -264,7 +264,7 @@ int f;
...
@@ -264,7 +264,7 @@ int f;
z
->
state
->
mode
=
DONE
;
z
->
state
->
mode
=
DONE
;
case
DONE
:
case
DONE
:
return
Z_STREAM_END
;
return
Z_STREAM_END
;
case
BAD
:
case
z
BAD
:
return
Z_DATA_ERROR
;
return
Z_DATA_ERROR
;
default
:
default
:
return
Z_STREAM_ERROR
;
return
Z_STREAM_ERROR
;
...
@@ -310,9 +310,9 @@ z_streamp z;
...
@@ -310,9 +310,9 @@ z_streamp z;
/* set up */
/* set up */
if
(
z
==
Z_NULL
||
z
->
state
==
Z_NULL
)
if
(
z
==
Z_NULL
||
z
->
state
==
Z_NULL
)
return
Z_STREAM_ERROR
;
return
Z_STREAM_ERROR
;
if
(
z
->
state
->
mode
!=
BAD
)
if
(
z
->
state
->
mode
!=
z
BAD
)
{
{
z
->
state
->
mode
=
BAD
;
z
->
state
->
mode
=
z
BAD
;
z
->
state
->
sub
.
marker
=
0
;
z
->
state
->
sub
.
marker
=
0
;
}
}
if
((
n
=
z
->
avail_in
)
==
0
)
if
((
n
=
z
->
avail_in
)
==
0
)
...
...
zlib/infutil.h
View file @
d846b098
...
@@ -21,7 +21,7 @@ typedef enum {
...
@@ -21,7 +21,7 @@ typedef enum {
CODES
,
/* processing fixed or dynamic block */
CODES
,
/* processing fixed or dynamic block */
DRY
,
/* output remaining window bytes */
DRY
,
/* output remaining window bytes */
DONE
,
/* finished last block, done */
DONE
,
/* finished last block, done */
BAD
}
/* got a data error--stuck here */
z
BAD
}
/* got a data error--stuck here */
inflate_block_mode
;
inflate_block_mode
;
/* inflate blocks semi-private state */
/* inflate blocks semi-private state */
...
...
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