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:
kichik 2008-12-12 17:47:14 +00:00
parent f3350670fb
commit 5b490c9e49
4 changed files with 4 additions and 131 deletions

View file

@ -12,8 +12,6 @@
#include <plugin.h> // nsis plugin.h
int myatoi(char *s);
HINSTANCE g_hInstance;
HWND g_hwndParent;
@ -61,7 +59,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(hwndDlg, IDC_APPICON, STM_SETICON, (LPARAM)LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(103)), 0);
// set font
if (dofont && !popstring(temp)) {
size = myatoi(temp);
size = myatou(temp);
if (!popstring(temp)) {
LOGFONT f = {0,};
if (lstrcmp(temp, "MS Shell Dlg")) {
@ -159,7 +157,7 @@ void __declspec(dllexport) LangDialog(HWND hwndParent, int string_size,
pop_empty_string = TRUE;
} else {
// use counts languages
langs_num = myatoi(temp);
langs_num = myatou(temp);
}
// zero languages?
@ -187,7 +185,7 @@ void __declspec(dllexport) LangDialog(HWND hwndParent, int string_size,
if (docp)
{
if (popstring(temp)) { visible_langs_num = 0; break; }
langs[visible_langs_num].cp = myatoi(temp);
langs[visible_langs_num].cp = myatou(temp);
}
if (!docp || langs[visible_langs_num].cp == GetACP() || langs[visible_langs_num].cp == 0)
@ -236,15 +234,3 @@ BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
g_hInstance=hInst;
return TRUE;
}
int myatoi(char *s)
{
unsigned int v=0;
for (;;) {
int c=*s++ - '0';
if (c < 0 || c > 9) break;
v*=10;
v+=c;
}
return (int)v;
}