[svn] Print download rate even when percentages are not available.

Published in <sxs1yqjd4ct.fsf@florida.arsdigita.de>.
This commit is contained in:
hniksic 2001-04-23 08:28:34 -07:00
parent 38120f75ef
commit 6ba7711d6a
2 changed files with 26 additions and 25 deletions

View File

@ -1,3 +1,8 @@
2001-04-23 Hrvoje Niksic <hniksic@arsdigita.com>
* retr.c (show_progress): Print the download rate even when the
percentages are not available.
2001-04-21 Hrvoje Niksic <hniksic@arsdigita.com>
* ftp.c (getftp): Adjust expected_bytes if the length is

View File

@ -182,8 +182,6 @@ show_progress (long res, long expected, enum spflags flags)
int any_output = 0;
if (flags == SP_FINISH)
{
if (expected)
{
int dot = ndot;
char *tmpstr = (char *)alloca (2 * opt.dots_in_line + 1);
@ -197,13 +195,13 @@ show_progress (long res, long expected, enum spflags flags)
}
*tmpp = '\0';
logputs (LOG_VERBOSE, tmpstr);
if (expected)
print_percentage (nrow * line_bytes + ndot * opt.dot_bytes + offs,
expected);
logprintf (LOG_VERBOSE, " @%s",
rate (ndot * opt.dot_bytes
+ offs - (initial_skip % line_bytes),
time_offset, 1));
}
logputs (LOG_VERBOSE, "\n\n");
return 0;
}
@ -255,12 +253,10 @@ show_progress (long res, long expected, enum spflags flags)
ndot = 0;
++nrow;
if (expected)
{
print_percentage (nrow * line_bytes, expected);
logprintf (LOG_VERBOSE, " @%s",
rate (line_bytes - (initial_skip % line_bytes),
time_offset, 1));
}
initial_skip = 0;
logprintf (LOG_VERBOSE, "\n%5ldK", nrow * line_bytes / 1024);
}