Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 211907
Collapse All | Expand All

(-)src/main.c.orig (-1 / +1 lines)
Lines 911-917 Link Here
911
911
912
  /* Initialize progress.  Have to do this after the options are
912
  /* Initialize progress.  Have to do this after the options are
913
     processed so we know where the log file is.  */
913
     processed so we know where the log file is.  */
914
  if (opt.verbose)
914
  if (!opt.quiet)
915
    set_progress_implementation (opt.progress_type);
915
    set_progress_implementation (opt.progress_type);
916
916
917
  /* Fill in the arguments.  */
917
  /* Fill in the arguments.  */
(-)src/retr.c.orig (-1 / +1 lines)
Lines 221-227 Link Here
221
  if (flags & rb_skip_startpos)
221
  if (flags & rb_skip_startpos)
222
    skip = startpos;
222
    skip = startpos;
223
223
224
  if (opt.verbose)
224
  if (!opt.quiet)
225
    {
225
    {
226
      /* If we're skipping STARTPOS bytes, pass 0 as the INITIAL
226
      /* If we're skipping STARTPOS bytes, pass 0 as the INITIAL
227
         argument to progress_create because the indicator doesn't
227
         argument to progress_create because the indicator doesn't
(-)src/progress.c.orig (-10 / +12 lines)
Lines 289-295 Link Here
289
         been retrieved.  12.8% will round to 12% because the 13% mark
289
         been retrieved.  12.8% will round to 12% because the 13% mark
290
         has not yet been reached.  100% is only shown when done.  */
290
         has not yet been reached.  100% is only shown when done.  */
291
      int percentage = 100.0 * bytes_displayed / dp->total_length;
291
      int percentage = 100.0 * bytes_displayed / dp->total_length;
292
      logprintf (LOG_VERBOSE, "%3d%%", percentage);
292
      logprintf (LOG_NOTQUIET, "%3d%%", percentage);
293
    }
293
    }
294
294
295
  {
295
  {
Lines 323-329 Link Here
323
          wgint bytes_sofar = bytes_displayed - dp->initial_length;
323
          wgint bytes_sofar = bytes_displayed - dp->initial_length;
324
          double eta = dltime * bytes_remaining / bytes_sofar;
324
          double eta = dltime * bytes_remaining / bytes_sofar;
325
          if (eta < INT_MAX - 1)
325
          if (eta < INT_MAX - 1)
326
            logprintf (LOG_VERBOSE, " %s",
326
            logprintf (LOG_NOTQUIET, " %s",
327
                       eta_to_human_short ((int) (eta + 0.5), true));
327
                       eta_to_human_short ((int) (eta + 0.5), true));
328
        }
328
        }
329
    }
329
    }
Lines 331-340 Link Here
331
    {
331
    {
332
      /* When done, print the total download time */
332
      /* When done, print the total download time */
333
      if (dltime >= 10)
333
      if (dltime >= 10)
334
        logprintf (LOG_VERBOSE, "=%s",
334
        logprintf (LOG_NOTQUIET, "=%s",
335
                   eta_to_human_short ((int) (dltime + 0.5), true));
335
                   eta_to_human_short ((int) (dltime + 0.5), true));
336
      else
336
      else
337
        logprintf (LOG_VERBOSE, "=%ss", print_decimal (dltime));
337
        logprintf (LOG_NOTQUIET, "=%ss", print_decimal (dltime));
338
    }
338
    }
339
}
339
}
340
340
Lines 649-655 Link Here
649
  create_image (bp, dltime, true);
649
  create_image (bp, dltime, true);
650
  display_image (bp->buffer);
650
  display_image (bp->buffer);
651
651
652
  logputs (LOG_VERBOSE, "\n\n");
652
  logputs (LOG_NOTQUIET, "\n\n");
653
653
654
  xfree (bp->buffer);
654
  xfree (bp->buffer);
655
  xfree (bp);
655
  xfree (bp);
Lines 784-790 Link Here
784
  char *p = bp->buffer;
784
  char *p = bp->buffer;
785
  wgint size = bp->initial_length + bp->count;
785
  wgint size = bp->initial_length + bp->count;
786
786
787
  const char *size_grouped = with_thousand_seps (size);
787
  const char *size_grouped = with_thousand_seps (size / 1024);
788
  int size_grouped_len = strlen (size_grouped);
788
  int size_grouped_len = strlen (size_grouped);
789
789
790
  struct bar_progress_hist *hist = &bp->hist;
790
  struct bar_progress_hist *hist = &bp->hist;
Lines 829-834 Link Here
829
    APPEND_LITERAL ("    ");
829
    APPEND_LITERAL ("    ");
830
830
831
  /* The progress bar: "[====>      ]" or "[++==>      ]". */
831
  /* The progress bar: "[====>      ]" or "[++==>      ]". */
832
  if (opt.verbose) {
832
  if (progress_size && bp->total_length > 0)
833
  if (progress_size && bp->total_length > 0)
833
    {
834
    {
834
      /* Size of the initial portion. */
835
      /* Size of the initial portion. */
Lines 888-896 Link Here
888
889
889
      ++bp->tick;
890
      ++bp->tick;
890
    }
891
    }
892
  }
891
893
892
  /* " 234,567,890" */
894
  /* " 234,567K" */
893
  sprintf (p, " %-11s", size_grouped);
895
  sprintf (p, " %sK", size_grouped);
894
  move_to_end (p);
896
  move_to_end (p);
895
897
896
  /* " 12.52K/s" */
898
  /* " 12.52K/s" */
Lines 981-988 Link Here
981
display_image (char *buf)
983
display_image (char *buf)
982
{
984
{
983
  bool old = log_set_save_context (false);
985
  bool old = log_set_save_context (false);
984
  logputs (LOG_VERBOSE, "\r");
986
  logputs (LOG_NOTQUIET, "\r");
985
  logputs (LOG_VERBOSE, buf);
987
  logputs (LOG_NOTQUIET, buf);
986
  log_set_save_context (old);
988
  log_set_save_context (old);
987
}
989
}
988
990

Return to bug 211907