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
43b06eea
Commit
43b06eea
authored
Jul 02, 1998
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output progress % every 1k instead of every 1%, this is better for
large files.
parent
067857e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
util.c
util.c
+5
-5
No files found.
util.c
View file @
43b06eea
...
...
@@ -686,7 +686,7 @@ int u_strcmp(const char *cs1, const char *cs2)
return
(
int
)
*
s1
-
(
int
)
*
s2
;
}
static
int
last_pct
=
-
1
;
static
OFF_T
last_ofs
;
void
end_progress
(
void
)
{
...
...
@@ -695,7 +695,7 @@ void end_progress(void)
if
(
do_progress
&&
!
am_server
)
{
rprintf
(
FINFO
,
"
\n
"
);
}
last_
pct
=
-
1
;
last_
ofs
=
0
;
}
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
)
{
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
);
last_
pct
=
pct
;
last_
ofs
=
ofs
;
}
}
}
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