Subversion Repositories Kolibri OS

Rev

Rev 3106 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3106 Rev 3412
Line 153... Line 153...
153
}
153
}
154
 
154
 
Line 155... Line 155...
155
//------------------------------------------------------------------------------
155
//------------------------------------------------------------------------------
Line 156... Line 156...
156
 
156
 
157
dword Hex2Symb(char* htmlcolor)
157
:dword Hex2Symb(char* htmlcolor)
158
{
158
{
159
  dword j=0, symbol=0;
159
  dword j=0, symbol=0;
160
  char ch=0x00;
160
  char ch=0x00;
161
  FOR (;j<2;j++)
161
  FOR (;j<2;j++)
Line 169... Line 169...
169
  }
169
  }
170
  wintodos(#symbol);
170
  wintodos(#symbol);
171
  AL=symbol;
171
  AL=symbol;
172
}
172
}
173
>
173
 
174
>
174
:dword ConvertMemSize(unsigned int bytes)
-
 
175
{
-
 
176
  unsigned char size_prefix[8], size_nm[4];
-
 
177
  if (bytes>=1073741824) strcpy(#size_nm, " Gb");
-
 
178
  else if (bytes>=1048576) strcpy(#size_nm, " Mb");
-
 
179
  else if (bytes>=1024) strcpy(#size_nm, " Kb");
-
 
180
  else strcpy(#size_nm, " b ");
-
 
181
  while (bytes>1023) bytes/=1024;
-
 
182
  strcpy(#size_prefix, itoa(bytes));
-
 
183
  strcat(#size_prefix, #size_nm);
-
 
184
  return #size_prefix;
-
 
185
}
-
 
186
>
-
 
187
>
175
188