Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
finished 64 bit file offset support. Hopefully rsync can now transfer
[rsync/rsync.git]
/
match.c
diff --git
a/match.c
b/match.c
index
5c88ba5
..
d5ceba3
100644
(file)
--- a/
match.c
+++ b/
match.c
@@
-36,10
+36,10
@@
static int tag_hits;
static int matches;
static int data_transfer;
static int matches;
static int data_transfer;
-static int total_false_alarms
=0
;
-static int total_tag_hits
=0
;
-static int total_matches
=0
;
-static
int total_data_transfer=0
;
+static int total_false_alarms;
+static int total_tag_hits;
+static int total_matches;
+static
off_t total_data_transfer
;
struct target {
struct target {
@@
-47,9
+47,9
@@
struct target {
int i;
};
int i;
};
-static struct target *targets
=NULL
;
+static struct target *targets;
-static tag *tag_table
= NULL
;
+static tag *tag_table;
#define gettag2(s1,s2) (((s1) + (s2)) & 0xFFFF)
#define gettag(sum) gettag2((sum)&0xFFFF,(sum)>>16)
#define gettag2(s1,s2) (((s1) + (s2)) & 0xFFFF)
#define gettag(sum) gettag2((sum)&0xFFFF,(sum)>>16)
@@
-91,14
+91,14
@@
static off_t last_match;
static void matched(int f,struct sum_struct *s,struct map_struct *buf,
static void matched(int f,struct sum_struct *s,struct map_struct *buf,
-
in
t offset,int i)
+
off_
t offset,int i)
{
{
-
in
t n = offset - last_match;
+
off_
t n = offset - last_match;
int j;
if (verbose > 2 && i != -1)
fprintf(FERROR,"match at %d last_match=%d j=%d len=%d n=%d\n",
int j;
if (verbose > 2 && i != -1)
fprintf(FERROR,"match at %d last_match=%d j=%d len=%d n=%d\n",
- (int)offset,(int)last_match,i,(int)s->sums[i].len,n);
+ (int)offset,(int)last_match,i,(int)s->sums[i].len,
(int)
n);
send_token(f,i,buf,last_match,n,i==-1?0:s->sums[i].len);
data_transfer += n;
send_token(f,i,buf,last_match,n,i==-1?0:s->sums[i].len);
data_transfer += n;
@@
-123,7
+123,8
@@
static void matched(int f,struct sum_struct *s,struct map_struct *buf,
static void hash_search(int f,struct sum_struct *s,
struct map_struct *buf,off_t len)
{
static void hash_search(int f,struct sum_struct *s,
struct map_struct *buf,off_t len)
{
- int offset,j,k;
+ off_t offset;
+ int j,k;
int end;
char sum2[SUM_LENGTH];
uint32 s1, s2, sum;
int end;
char sum2[SUM_LENGTH];
uint32 s1, s2, sum;
@@
-156,8
+157,7
@@
static void hash_search(int f,struct sum_struct *s,
j = tag_table[t];
if (verbose > 4)
j = tag_table[t];
if (verbose > 4)
- fprintf(FERROR,"offset=%d sum=%08x\n",
- offset,sum);
+ fprintf(FERROR,"offset=%d sum=%08x\n",(int)offset,sum);
if (j == NULL_TAG) {
goto null_tag;
if (j == NULL_TAG) {
goto null_tag;
@@
-172,7
+172,7
@@
static void hash_search(int f,struct sum_struct *s,
if (verbose > 3)
fprintf(FERROR,"potential match at %d target=%d %d sum=%08x\n",
if (verbose > 3)
fprintf(FERROR,"potential match at %d target=%d %d sum=%08x\n",
- offset,j,i,sum);
+
(int)
offset,j,i,sum);
if (!done_csum2) {
int l = MIN(s->n,len-offset);
if (!done_csum2) {
int l = MIN(s->n,len-offset);
@@
-273,7
+273,7
@@
void match_report(void)
return;
fprintf(FINFO,
return;
fprintf(FINFO,
- "total: matches=%d tag_hits=%d false_alarms=%d data=%d\n",
+ "total: matches=%d tag_hits=%d false_alarms=%d data=%
l
d\n",
total_matches,total_tag_hits,
total_matches,total_tag_hits,
- total_false_alarms,total_data_transfer);
+ total_false_alarms,
(long)
total_data_transfer);
}
}