This commit is contained in:
2021-09-03 17:34:28 +02:00
parent a718d69368
commit f1b31100db
2 changed files with 7 additions and 11 deletions

View File

@ -1323,11 +1323,15 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname,
}
}
// Swap bits from source and write to dest
int oldProgress = 0;
while (!feof(src)) {
// print progress
printf("%d%%\r", (int)(((double)(dstFilePos) / srcSize) * 100));
fflush(stdout);
int progress = (int)(((double)(dstFilePos) / srcSize) * 100);
if (oldProgress != progress) {
printf("%d%%\r", );
fflush(stdout);
oldProgress = progress;
}
// pof: exit early to discard footer
if (isPof && dstFilePos >= pofFooterOfst) {
break;