You've already forked lazarus-ccr
RxFPC:RxPrettySizeName - round
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7023 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1154,18 +1154,38 @@ end;
|
|||||||
function RxPrettySizeName(ASize: Int64): string;
|
function RxPrettySizeName(ASize: Int64): string;
|
||||||
begin
|
begin
|
||||||
if ASize div (1024 * 1024 * 1024 * 1024) > 0 then
|
if ASize div (1024 * 1024 * 1024 * 1024) > 0 then
|
||||||
Result := IntToStr(ASize div (1024 * 1024 * 1024 * 1024)) + ' ' +sRxTerraByte
|
begin
|
||||||
|
if ASize mod (1024 * 1024 * 1024 * 1024) <> 0 then
|
||||||
|
Result := IntToStr(1 + ASize div (1024 * 1024 * 1024 * 1024)) + ' ' +sRxTerraByte
|
||||||
|
else
|
||||||
|
Result := IntToStr(ASize div (1024 * 1024 * 1024 * 1024)) + ' ' +sRxTerraByte
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if ASize div (1024 * 1024 * 1024) > 0 then
|
if ASize div (1024 * 1024 * 1024) > 0 then
|
||||||
Result := IntToStr(ASize div (1024 * 1024 * 1024)) + ' ' +sRxGigaByte
|
begin
|
||||||
|
if ASize mod (1024 * 1024 * 1024) > 0 then
|
||||||
|
Result := IntToStr(1 + ASize div (1024 * 1024 * 1024)) + ' ' +sRxGigaByte
|
||||||
|
else
|
||||||
|
Result := IntToStr(ASize div (1024 * 1024 * 1024)) + ' ' +sRxGigaByte
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if ASize div (1024 * 1024) > 0 then
|
if ASize div (1024 * 1024) > 0 then
|
||||||
Result := IntToStr(ASize div (1024 * 1024)) + ' ' +sRxMegaByte
|
begin
|
||||||
|
if ASize mod (1024 * 1024) > 0 then
|
||||||
|
Result := IntToStr(1 + ASize div (1024 * 1024)) + ' ' +sRxMegaByte
|
||||||
|
else
|
||||||
|
Result := IntToStr(ASize div (1024 * 1024)) + ' ' +sRxMegaByte
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if ASize div 1024 > 0 then
|
if ASize div 1024 > 0 then
|
||||||
Result := IntToStr(ASize div (1024)) + ' ' +sRxKiloByte
|
begin
|
||||||
|
if ASize mod 1024 > 0 then
|
||||||
|
Result := IntToStr(1 + ASize div (1024)) + ' ' +sRxKiloByte
|
||||||
|
else
|
||||||
|
Result := IntToStr(ASize div (1024)) + ' ' +sRxKiloByte
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Result := IntToStr(ASize div (1024)) + ' ' +sRxByte;
|
Result := IntToStr(ASize) + ' ' +sRxByte;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Reference in New Issue
Block a user