Merge pull request #113 from zyp/progressbar_stdout

progressBar: Use only stdout.
This commit is contained in:
Gwenhael Goavec-Merou 2021-09-21 06:32:08 +02:00 committed by GitHub
commit 8114b7ff74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -40,9 +40,9 @@ void ProgressBar::display(int value, char force)
printInfo("\r" + _mess + ": [", false);
for (int z=0; z < nbEq; z++) {
fputc('=', stderr);
fputc('=', stdout);
}
fprintf(stderr, "%*s", (int)(_progressLen-nbEq), "");
fprintf(stdout, "%*s", (int)(_progressLen-nbEq), "");
char perc_str[11];
snprintf(perc_str, sizeof(perc_str), "] %3.2f%%", percent);
printInfo(perc_str, false);