From 71a53ffe25f0c7120717cd1e61f87f55934c4bd2 Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 1 Mar 2001 14:25:20 -0800 Subject: [PATCH] [svn] Applied Jonas Jensen's patch to correctly calculate the number of bytes in the first line of the download that. Published in . --- src/ChangeLog | 7 +++++++ src/retr.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0283864f..46c4f61f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2001-03-01 Jonas Jensen + + * 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 * main.c (print_help): --help documentation for -N said it would @@ -50,6 +56,7 @@ characters. (skip_uname): Ditto. +>>>>>>> 1.123 2001-02-11 Hrvoje Niksic * ftp.c (ftp_loop): Reset con. diff --git a/src/retr.c b/src/retr.c index 0e4535e8..b0297378 100644 --- a/src/retr.c +++ b/src/retr.c @@ -198,7 +198,8 @@ show_progress (long res, long expected, enum spflags flags) print_percentage (nrow * line_bytes + ndot * opt.dot_bytes + offs, expected); 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)); } logputs (LOG_VERBOSE, "\n\n"); @@ -255,7 +256,8 @@ show_progress (long res, long expected, enum spflags flags) { print_percentage (nrow * line_bytes, expected); 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; logprintf (LOG_VERBOSE, "\n%5ldK", nrow * line_bytes / 1024); -- 2.39.2