Qian Hong : gdi32/tests: Declared system_lang_id as a global variable.

Alexandre Julliard julliard at winehq.org
Fri Oct 19 13:33:53 CDT 2012


Module: wine
Branch: master
Commit: 16f2a1948e095ebb9be6c8ab03f758416befe72d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=16f2a1948e095ebb9be6c8ab03f758416befe72d

Author: Qian Hong <fracting at gmail.com>
Date:   Fri Oct 19 02:13:25 2012 +0800

gdi32/tests: Declared system_lang_id as a global variable.

---

 dlls/gdi32/tests/font.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 4e34a4c..82c0409 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -54,6 +54,7 @@ static BOOL  (WINAPI *pRemoveFontResourceExA)(LPCSTR, DWORD, PVOID);
 
 static HMODULE hgdi32 = 0;
 static const MAT2 mat = { {0,1}, {0,0}, {0,0}, {0,1} };
+static WORD system_lang_id;
 
 static void init(void)
 {
@@ -74,6 +75,8 @@ static void init(void)
     pRemoveFontMemResourceEx = (void *)GetProcAddress(hgdi32, "RemoveFontMemResourceEx");
     pAddFontResourceExA = (void *)GetProcAddress(hgdi32, "AddFontResourceExA");
     pRemoveFontResourceExA = (void *)GetProcAddress(hgdi32, "RemoveFontResourceExA");
+
+    system_lang_id = PRIMARYLANGID(GetSystemDefaultLangID());
 }
 
 static INT CALLBACK is_truetype_font_installed_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam)
@@ -670,7 +673,6 @@ static INT CALLBACK find_font_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DW
 
 static BOOL is_CJK(void)
 {
-    WORD system_lang_id = PRIMARYLANGID(GetSystemDefaultLangID());
     return (system_lang_id == LANG_CHINESE || system_lang_id == LANG_JAPANESE || system_lang_id == LANG_KOREAN);
 }
 
@@ -834,11 +836,9 @@ static void test_bitmap_font_metrics(void)
     HFONT hfont, old_hfont;
     TEXTMETRIC tm;
     INT ret, i, expected_cs, screen_log_pixels, diff, font_res;
-    WORD system_lang_id;
     char face_name[LF_FACESIZE];
     CHARSETINFO csi;
 
-    system_lang_id = PRIMARYLANGID(GetSystemDefaultLangID());
     trace("system language id %04x\n", system_lang_id);
 
     expected_cs = GetACP();
@@ -2421,7 +2421,6 @@ static void test_EnumFontFamiliesEx_default_charset(void)
     LOGFONT gui_font, enum_font;
     DWORD ret;
     HDC hdc;
-    WORD system_lang_id = PRIMARYLANGID(GetSystemDefaultLangID());
 
     ret = GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(gui_font), &gui_font);
     ok(ret, "GetObject failed.\n");




More information about the wine-cvs mailing list