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
68207537
Commit
68207537
authored
Feb 28, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed sum_table -> hash_table.
parent
fbbe9a01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
match.c
match.c
+8
-8
No files found.
match.c
View file @
68207537
...
...
@@ -38,7 +38,7 @@ static int total_matches;
extern
struct
stats
stats
;
static
uint32
tablesize
;
static
int32
*
sum
_table
;
static
int32
*
hash
_table
;
#define SUM2HASH(sum) ((sum)%tablesize)
...
...
@@ -54,18 +54,18 @@ static void build_hash_table(struct sum_struct *s)
if
(
tablesize
<
65537
)
tablesize
=
65537
;
/* a prime number */
if
(
tablesize
!=
prior_size
)
{
free
(
sum
_table
);
sum
_table
=
new_array
(
int32
,
tablesize
);
if
(
!
sum
_table
)
free
(
hash
_table
);
hash
_table
=
new_array
(
int32
,
tablesize
);
if
(
!
hash
_table
)
out_of_memory
(
"build_hash_table"
);
}
memset
(
sum_table
,
0xFF
,
tablesize
*
sizeof
sum
_table
[
0
]);
memset
(
hash_table
,
0xFF
,
tablesize
*
sizeof
hash
_table
[
0
]);
for
(
i
=
0
;
i
<
s
->
count
;
i
++
)
{
uint32
t
=
SUM2HASH
(
s
->
sums
[
i
].
sum1
);
s
->
sums
[
i
].
chain
=
sum
_table
[
t
];
sum
_table
[
t
]
=
i
;
s
->
sums
[
i
].
chain
=
hash
_table
[
t
];
hash
_table
[
t
]
=
i
;
}
}
...
...
@@ -166,7 +166,7 @@ static void hash_search(int f,struct sum_struct *s,
if
(
verbose
>
4
)
rprintf
(
FINFO
,
"offset=%.0f sum=%08x
\n
"
,(
double
)
offset
,
sum
);
i
=
sum
_table
[
SUM2HASH
(
sum
)];
i
=
hash
_table
[
SUM2HASH
(
sum
)];
if
(
i
<
0
)
goto
null_hash
;
...
...
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