1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Applied Jonas Jensen's patch to correctly calculate the number of bytes

in the first line of the download that.
Published in <sxsu25hioxj.fsf@florida.arsdigita.de>.
This commit is contained in:
hniksic 2001-03-01 14:25:20 -08:00
parent f9dd5e1d13
commit 71a53ffe25
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2001-03-01 Jonas Jensen <bones@huleboer.dk>
* retr.c (show_progress): Correctly calculate the number of bytes
in the first line of the download that have been actually
downloaded in this run.
2001-02-23 Dan Harkless <wget@harkless.org> 2001-02-23 Dan Harkless <wget@harkless.org>
* main.c (print_help): --help documentation for -N said it would * main.c (print_help): --help documentation for -N said it would
@ -50,6 +56,7 @@
characters. characters.
(skip_uname): Ditto. (skip_uname): Ditto.
>>>>>>> 1.123
2001-02-11 Hrvoje Niksic <hniksic@arsdigita.com> 2001-02-11 Hrvoje Niksic <hniksic@arsdigita.com>
* ftp.c (ftp_loop): Reset con. * ftp.c (ftp_loop): Reset con.

View File

@ -198,7 +198,8 @@ show_progress (long res, long expected, enum spflags flags)
print_percentage (nrow * line_bytes + ndot * opt.dot_bytes + offs, print_percentage (nrow * line_bytes + ndot * opt.dot_bytes + offs,
expected); expected);
logprintf (LOG_VERBOSE, " @%s", logprintf (LOG_VERBOSE, " @%s",
rate (ndot * opt.dot_bytes + offs - initial_skip, rate (ndot * opt.dot_bytes
+ offs - (initial_skip % line_bytes),
time_offset, 1)); time_offset, 1));
} }
logputs (LOG_VERBOSE, "\n\n"); logputs (LOG_VERBOSE, "\n\n");
@ -255,7 +256,8 @@ show_progress (long res, long expected, enum spflags flags)
{ {
print_percentage (nrow * line_bytes, expected); print_percentage (nrow * line_bytes, expected);
logprintf (LOG_VERBOSE, " @%s", logprintf (LOG_VERBOSE, " @%s",
rate (line_bytes - initial_skip, time_offset, 1)); rate (line_bytes - (initial_skip % line_bytes),
time_offset, 1));
} }
initial_skip = 0; initial_skip = 0;
logprintf (LOG_VERBOSE, "\n%5ldK", nrow * line_bytes / 1024); logprintf (LOG_VERBOSE, "\n%5ldK", nrow * line_bytes / 1024);