tiny size decrease yay
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1038 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c810642d49
commit
5e096c1b2b
1 changed files with 7 additions and 4 deletions
|
@ -756,10 +756,13 @@ static BOOL CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
|
||||
static void NSISCALL inttosizestr(int kb, char *str)
|
||||
{
|
||||
str += mystrlen(str);
|
||||
if (kb < 1024) wsprintf(str,"%dKB",kb);
|
||||
else if (kb < 1024*1024) wsprintf(str,"%d.%dMB",kb>>10,((kb*10)>>10)%10);
|
||||
else wsprintf(str,"%d.%dGB%s",kb>>20,((kb*10)>>20)%10,(GetVersion()&0x80000000) ? "+":"");
|
||||
char sh=20;
|
||||
char c='G';
|
||||
char *s="";
|
||||
if (kb < 1024) { sh=0; c='K'; }
|
||||
else if (kb < 1024*1024) { sh=10; c='M'; }
|
||||
else if (GetVersion()&0x80000000) s="+";
|
||||
wsprintf(str+mystrlen(str),"%d.%d%cB%s",kb>>sh,((kb*10)>>sh)%10,c,s);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue