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
removed old "make dist" target
[rsync/rsync.git]
/
util.c
diff --git
a/util.c
b/util.c
index
34c8f8b
..
15ab69d
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-686,7
+686,7
@@
int u_strcmp(const char *cs1, const char *cs2)
return (int)*s1 - (int)*s2;
}
return (int)*s1 - (int)*s2;
}
-static
int last_pct = -1
;
+static
OFF_T last_ofs
;
void end_progress(void)
{
void end_progress(void)
{
@@
-695,7
+695,7
@@
void end_progress(void)
if (do_progress && !am_server) {
rprintf(FINFO,"\n");
}
if (do_progress && !am_server) {
rprintf(FINFO,"\n");
}
- last_
pct = -1
;
+ last_
ofs = 0
;
}
void show_progress(OFF_T ofs, OFF_T size)
}
void show_progress(OFF_T ofs, OFF_T size)
@@
-703,10
+703,10
@@
void show_progress(OFF_T ofs, OFF_T size)
extern int do_progress, am_server;
if (do_progress && !am_server) {
extern int do_progress, am_server;
if (do_progress && !am_server) {
- i
nt pct = (int)((100.0*ofs)/size + 0.5);
- if (pct != last_pct) {
+ i
f (ofs > last_ofs + 1000) {
+ int pct = (int)((100.0*ofs)/size);
rprintf(FINFO,"%.0f (%d%%)\r", (double)ofs, pct);
rprintf(FINFO,"%.0f (%d%%)\r", (double)ofs, pct);
- last_
pct = pct
;
+ last_
ofs = ofs
;
}
}
}
}
}
}