]> sjero.net Git - wget/blobdiff - src/progress.c
[svn] Logging system bugfixes and improvements.
[wget] / src / progress.c
index 3c6922b79fcaa6ccbeb4b325aa4aa5db1ae1c9b5..dc96763667e4831b78b32fbde4c187dc56122d68 100644 (file)
@@ -64,7 +64,7 @@ static struct progress_implementation implementations[] = {
   { "bar", bar_create, bar_update, bar_finish, bar_set_params }
 };
 static struct progress_implementation *current_impl;
-int current_impl_locked;
+static int current_impl_locked;
 
 /* Progress implementation used by default.  Can be overriden in
    wgetrc or by the fallback one.  */
@@ -521,7 +521,7 @@ create_image (struct bar_progress *bp, long dltime)
   int size_legible_len = strlen (size_legible);
 
   /* The progress bar should look like this:
-     xx% [=======>             ] nn.nnn rrK/s ETA 00:00
+     xx% [=======>             ] nn,nnn 12.34K/s ETA 00:00
 
      Calculate the geometry.  The idea is to assign as much room as
      possible to the progress bar.  The other idea is to never let
@@ -647,7 +647,7 @@ create_image (struct bar_progress *bp, long dltime)
        /* Hours not printed: pad with three spaces (two digits and
           colon). */
        APPEND_LITERAL ("   ");
-      else if (eta_hrs >= 10)
+      else if (eta_hrs < 10)
        /* Hours printed with one digit: pad with one space. */
        *p++ = ' ';
       else
@@ -683,8 +683,10 @@ create_image (struct bar_progress *bp, long dltime)
 static void
 display_image (char *buf)
 {
+  int old = log_set_save_context (0);
   logputs (LOG_VERBOSE, "\r");
   logputs (LOG_VERBOSE, buf);
+  log_set_save_context (old);
 }
 
 static void