]> sjero.net Git - wget/blobdiff - src/progress.c
[svn] Logging system bugfixes and improvements.
[wget] / src / progress.c
index 9b42c47bdb71fc80cbdd73170c342795ac47e8b6..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.  */
@@ -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