sync to Wine Patch: format_bytes()

svn path=/trunk/; revision=15272
This commit is contained in:
Martin Fuchs 2005-05-14 12:32:44 +00:00
parent 030580a782
commit 0d88632d20

View file

@ -2454,12 +2454,12 @@ static void format_bytes(LPTSTR buffer, LONGLONG bytes)
float fBytes = (float)bytes;
if (bytes >= 1073741824) // 1 GB
if (bytes >= 1073741824) /* 1 GB */
_stprintf(buffer, sFmtGB, fBytes/1073741824.f+.5f);
else if (bytes >= 1048576) // 1 MB
else if (bytes >= 1048576) /* 1 MB */
_stprintf(buffer, sFmtMB, fBytes/1048576.f+.5f);
else if (bytes >= 1024) // 1 kB
_stprintf(buffer, sFmtMB, fBytes/1024.f+.5f);
else if (bytes >= 1024) /* 1 kB */
_stprintf(buffer, sFmtkB, fBytes/1024.f+.5f);
else
_stprintf(buffer, sLongNumFmt, bytes);
}