Author: dchapyshev Date: Sat Aug 15 12:01:28 2009 New Revision: 42689
URL: http://svn.reactos.org/svn/reactos?rev=42689&view=rev Log: - Partially sync locale.c with Wine
Modified: trunk/reactos/lib/sdk/crt/locale/locale.c
Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.c... ============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Sat Aug 15 12:01:28 2009 @@ -234,7 +234,8 @@ res->match_flags = flags; res->found_lang_id = LangID; } - if (flags & (FOUND_LANGUAGE & FOUND_COUNTRY & FOUND_CODEPAGE)) + if ((flags & (FOUND_LANGUAGE | FOUND_COUNTRY | FOUND_CODEPAGE)) == + (FOUND_LANGUAGE | FOUND_COUNTRY | FOUND_CODEPAGE)) { TRACE(":found exact locale match\n"); return STOP_LOOKING; @@ -316,7 +317,7 @@ { int i; char str[3]; - unsigned char *traverse = (unsigned char *)cp.LeadByte; + unsigned char *traverse = cp.LeadByte;
memset(MSVCRT_current_ctype, 0, sizeof(MSVCRT__ctype)); MSVCRT___lc_codepage = codepage; @@ -387,8 +388,8 @@ { MSVCRT_current_lc_all[0] = 'C'; MSVCRT_current_lc_all[1] = '\0'; - MSVCRT___lc_codepage = 1252; - MSVCRT___lc_collate_cp = 1252; + MSVCRT___lc_codepage = GetACP(); + MSVCRT___lc_collate_cp = GetACP();
switch (category) { case MSVCRT_LC_ALL: