Skip to content

Commit

Permalink
Correct % processed for Windows large files
Browse files Browse the repository at this point in the history
  • Loading branch information
ibmmqmet committed Sep 26, 2019
1 parent bd17f75 commit e190bbf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,6 @@ Aug 2019 (v5.1.3)

Aug 2019 (v5.1.4)
* Newer compilers have changed bitfield structure padding layouts

Sep 2019 (v5.1.5)
* Percentage processed was not showing correctly for very large files on Windows
Binary file modified bin/aix/convH
Binary file not shown.
Binary file modified bin/aix/mqsmfcsv
Binary file not shown.
Binary file modified bin/linux/convH
Binary file not shown.
Binary file modified bin/linux/mqsmfcsv
Binary file not shown.
Binary file modified bin/win/mqsmfcsv.exe
Binary file not shown.
7 changes: 5 additions & 2 deletions src/mqsmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,10 +1396,13 @@ static char *getFormatRate(myoff_t pos)
static char formatPercentString[10];
static char *getFormatPercent(myoff_t totalFileSize,myoff_t pos)
{
float f;
if (streamInput) {
strcpy(formatPercentString,"");
} else {
sprintf(formatPercentString,"[%5.2f%%]", (float)(100.0*pos)/totalFileSize);
} else {
f = (float)((100.0*pos)/totalFileSize);
if (f==0) f = +0.00; /* To deal with calculation sometimes returning -0.0 */
sprintf(formatPercentString,"[%5.2f%%]", f);
}
return formatPercentString;
}
Expand Down

0 comments on commit e190bbf

Please sign in to comment.