]> sjero.net Git - wget/commitdiff
[svn] Applied Jonas Jensen's patch to correctly calculate the number of bytes
authorhniksic <devnull@localhost>
Thu, 1 Mar 2001 22:25:20 +0000 (14:25 -0800)
committerhniksic <devnull@localhost>
Thu, 1 Mar 2001 22:25:20 +0000 (14:25 -0800)
in the first line of the download that.
Published in <sxsu25hioxj.fsf@florida.arsdigita.de>.

src/ChangeLog
src/retr.c

index 0283864fe25bf0f2a922a19ea35e70b88c87d082..46c4f61fbc16c610b18724453cf10c307afd99df 100644 (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>
 
        * 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  <hniksic@arsdigita.com>
 
        * ftp.c (ftp_loop): Reset con.
index 0e4535e8bfdad9a14da72ffb0f5ea9754c45e882..b0297378e3932e9cb1a563e25cc95b812a31f902 100644 (file)
@@ -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);