Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 410529 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-6 / +3 lines)
Line  Link Here
0
-- a/src/progress.c
0
++ b/src/progress.c
Lines 907-916 create_image (struct bar_progress *bp, double dl_total_time, bool done) Link Here
907
  char *p = bp->buffer;
907
  char *p = bp->buffer;
908
  wgint size = bp->initial_length + bp->count;
908
  wgint size = bp->initial_length + bp->count;
909
909
910
  const char *size_grouped = with_thousand_seps (size);
911
  int size_grouped_len = count_cols (size_grouped);
912
  /* Difference between num cols and num bytes: */
913
  int size_grouped_diff = strlen (size_grouped) - size_grouped_len;
914
  int size_grouped_pad; /* Used to pad the field width for size_grouped. */
910
  int size_grouped_pad; /* Used to pad the field width for size_grouped. */
915
911
916
  struct bar_progress_hist *hist = &bp->hist;
912
  struct bar_progress_hist *hist = &bp->hist;
Lines 1159-1167 create_image (struct bar_progress *bp, double dl_total_time, bool done) Link Here
1159
      move_to_end (p);
1155
      move_to_end (p);
1160
    }
1156
    }
1161
1157
1162
  while (p - bp->buffer - bytes_cols_diff - size_grouped_diff < bp->width)
1158
  while (p - bp->buffer - bytes_cols_diff < bp->width)
1163
    *p++ = ' ';
1159
    *p++ = ' ';
1164
  *p = '\0';
1160
  *p = '\0';
1161
  assert (count_cols (bp->buffer) <= bp->width + 1);
1165
}
1162
}
1166
1163
1167
/* Print the contents of the buffer as a one-line ASCII "image" so
1164
/* Print the contents of the buffer as a one-line ASCII "image" so

Return to bug 410529