From: Florent Kermarrec Date: Wed, 10 Jun 2020 07:15:59 +0000 (+0200) Subject: software/libbase/progress: avoid \t in progress bar, reduce HASHES_PER_LINE. X-Git-Tag: 24jan2021_ls180~198 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d45cfc1e15c1c4e824cbdb47b69713f0d409c1ae;p=litex.git software/libbase/progress: avoid \t in progress bar, reduce HASHES_PER_LINE. --- diff --git a/litex/soc/software/libbase/progress.c b/litex/soc/software/libbase/progress.c index d8521fce..36836e14 100644 --- a/litex/soc/software/libbase/progress.c +++ b/litex/soc/software/libbase/progress.c @@ -25,7 +25,7 @@ #include #define FILESIZE_MAX 100000000 -#define HASHES_PER_LINE 65 +#define HASHES_PER_LINE 60 static int printed; static int progress_max; @@ -48,7 +48,7 @@ void show_progress(int now) while (printed < now) { if (!(printed % HASHES_PER_LINE) && printed) - printf("\n\t"); + printf("\n"); printf("#"); printed++; } @@ -60,7 +60,7 @@ void init_progression_bar(int max) progress_max = max; spin = 0; if (progress_max && progress_max != FILESIZE_MAX) - printf("\t[%*s]\r\t[", HASHES_PER_LINE, ""); + printf("[%*s]\r[", HASHES_PER_LINE, ""); else - printf("\t"); + printf(""); }