CMM: update libraries

git-svn-id: svn://kolibrios.org@5483 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-02-27 01:47:38 +00:00
parent 324f214b01
commit 436e6d2d44
3 changed files with 13 additions and 13 deletions

View File

@ -16,7 +16,6 @@
#include "..\lib\lib.obj\box_lib.h" #include "..\lib\lib.obj\box_lib.h"
#include "..\lib\file_system.h" #include "..\lib\file_system.h"
#include "..\lib\figures.h" #include "..\lib\figures.h"
#include "..\lib\encoding.h"
#include "..\lib\list_box.h" #include "..\lib\list_box.h"
#include "..\lib\copyf.h" #include "..\lib\copyf.h"
#include "..\lib\random.h" #include "..\lib\random.h"

View File

@ -165,15 +165,3 @@ inline fastcall void utf8rutodos( ESI)
} }
:dword ConvertSize(unsigned int bytes)
{
unsigned char size_prefix[8], size_nm[4];
if (bytes>=1073741824) strcpy(#size_nm, " Gb");
else if (bytes>=1048576) strcpy(#size_nm, " Mb");
else if (bytes>=1024) strcpy(#size_nm, " Kb");
else strcpy(#size_nm, " b ");
while (bytes>1023) bytes/=1024;
itoa_(#size_prefix, bytes);
strcat(#size_prefix, #size_nm);
return #size_prefix;
}

View File

@ -234,3 +234,16 @@ enum
} }
return #absolute_path; return #absolute_path;
} }
:dword ConvertSize(unsigned int bytes)
{
unsigned char size_prefix[8], size_nm[4];
if (bytes>=1073741824) strcpy(#size_nm, " Gb");
else if (bytes>=1048576) strcpy(#size_nm, " Mb");
else if (bytes>=1024) strcpy(#size_nm, " Kb");
else strcpy(#size_nm, " b ");
while (bytes>1023) bytes/=1024;
itoa_(#size_prefix, bytes);
strcat(#size_prefix, #size_nm);
return #size_prefix;
}