Commit 8f420443 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winecfg: Remove an ARRAY_SIZE()-like macro.

parent 48aeef69
...@@ -72,8 +72,6 @@ static const struct ...@@ -72,8 +72,6 @@ static const struct
#endif #endif
}; };
#define NB_VERSIONS (sizeof(win_versions)/sizeof(win_versions[0]))
static const char szKey9x[] = "Software\\Microsoft\\Windows\\CurrentVersion"; static const char szKey9x[] = "Software\\Microsoft\\Windows\\CurrentVersion";
static const char szKeyNT[] = "Software\\Microsoft\\Windows NT\\CurrentVersion"; static const char szKeyNT[] = "Software\\Microsoft\\Windows NT\\CurrentVersion";
static const char szKeyProdNT[] = "System\\CurrentControlSet\\Control\\ProductOptions"; static const char szKeyProdNT[] = "System\\CurrentControlSet\\Control\\ProductOptions";
...@@ -113,7 +111,7 @@ static int get_registry_version(void) ...@@ -113,7 +111,7 @@ static int get_registry_version(void)
} }
major = atoi(ver); major = atoi(ver);
for (i = 0; i < NB_VERSIONS; i++) for (i = 0; i < ARRAY_SIZE(win_versions); i++)
{ {
if (win_versions[i].dwPlatformId != platform) continue; if (win_versions[i].dwPlatformId != platform) continue;
if (win_versions[i].dwMajorVersion != major) continue; if (win_versions[i].dwMajorVersion != major) continue;
...@@ -151,7 +149,7 @@ static void update_comboboxes(HWND dialog) ...@@ -151,7 +149,7 @@ static void update_comboboxes(HWND dialog)
WINE_TRACE("winver is %s\n", winver); WINE_TRACE("winver is %s\n", winver);
/* normalize the version strings */ /* normalize the version strings */
for (i = 0; i < NB_VERSIONS; i++) for (i = 0; i < ARRAY_SIZE(win_versions); i++)
{ {
if (!strcasecmp (win_versions[i].szVersion, winver)) if (!strcasecmp (win_versions[i].szVersion, winver))
{ {
...@@ -181,7 +179,7 @@ init_comboboxes (HWND dialog) ...@@ -181,7 +179,7 @@ init_comboboxes (HWND dialog)
SendDlgItemMessageW (dialog, IDC_WINVER, CB_ADDSTRING, 0, (LPARAM)str); SendDlgItemMessageW (dialog, IDC_WINVER, CB_ADDSTRING, 0, (LPARAM)str);
} }
for (i = 0; i < NB_VERSIONS; i++) for (i = 0; i < ARRAY_SIZE(win_versions); i++)
{ {
SendDlgItemMessageA(dialog, IDC_WINVER, CB_ADDSTRING, SendDlgItemMessageA(dialog, IDC_WINVER, CB_ADDSTRING,
0, (LPARAM) win_versions[i].szDescription); 0, (LPARAM) win_versions[i].szDescription);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment