removed private atoi implementations
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5837 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f3350670fb
commit
5b490c9e49
4 changed files with 4 additions and 131 deletions
|
@ -58,7 +58,6 @@ unsigned int uWndWidth, uWndHeight;
|
|||
void *oldProc;
|
||||
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
HBITMAP __stdcall LoadBitmapFile(long right, long bottom, BITMAP *bBitmap);
|
||||
int __stdcall myatoi(char *s);
|
||||
COLORREF GetColor();
|
||||
void __stdcall GetXY(LPPOINT lpPoint);
|
||||
|
||||
|
@ -594,51 +593,6 @@ void __stdcall GetXY(LPPOINT lpPoint) {
|
|||
lpPoint->y = (unsigned int)iPosTemp;
|
||||
}
|
||||
|
||||
int __stdcall myatoi(char *s)
|
||||
{
|
||||
unsigned int v=0;
|
||||
if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
|
||||
{
|
||||
s+=2;
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++;
|
||||
if (c >= '0' && c <= '9') c-='0';
|
||||
else if (c >= 'a' && c <= 'f') c-='a'-10;
|
||||
else if (c >= 'A' && c <= 'F') c-='A'-10;
|
||||
else break;
|
||||
v<<=4;
|
||||
v+=c;
|
||||
}
|
||||
}
|
||||
else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
|
||||
{
|
||||
s++;
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++;
|
||||
if (c >= '0' && c <= '7') c-='0';
|
||||
else break;
|
||||
v<<=3;
|
||||
v+=c;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int sign=0;
|
||||
if (*s == '-') { s++; sign++; }
|
||||
for (;;)
|
||||
{
|
||||
int c=*s++ - '0';
|
||||
if (c < 0 || c > 9) break;
|
||||
v*=10;
|
||||
v+=c;
|
||||
}
|
||||
if (sign) return -(int) v;
|
||||
}
|
||||
return (int)v;
|
||||
}
|
||||
|
||||
extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
|
||||
g_hInstance=hInst;
|
||||
switch (ul_reason_for_call) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue