Commit 0697c5dc authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Partial fix for setlocale/create_locale.

parent 117faee9
...@@ -282,7 +282,7 @@ static BOOL update_threadlocinfo_category(LCID lcid, MSVCRT__locale_t loc, int c ...@@ -282,7 +282,7 @@ static BOOL update_threadlocinfo_category(LCID lcid, MSVCRT__locale_t loc, int c
char buf[256], *p; char buf[256], *p;
int len; int len;
if(GetLocaleInfoA(lcid, LOCALE_ILANGUAGE, buf, 256)) { if(GetLocaleInfoA(lcid, LOCALE_ILANGUAGE|LOCALE_NOUSEROVERRIDE, buf, 256)) {
p = buf; p = buf;
loc->locinfo->lc_id[category].wLanguage = 0; loc->locinfo->lc_id[category].wLanguage = 0;
...@@ -301,17 +301,21 @@ static BOOL update_threadlocinfo_category(LCID lcid, MSVCRT__locale_t loc, int c ...@@ -301,17 +301,21 @@ static BOOL update_threadlocinfo_category(LCID lcid, MSVCRT__locale_t loc, int c
loc->locinfo->lc_id[category].wLanguage; loc->locinfo->lc_id[category].wLanguage;
} }
if(GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, buf, 256)) if(GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lc_id[category].wCodePage = atoi(buf); loc->locinfo->lc_id[category].wCodePage = atoi(buf);
loc->locinfo->lc_handle[category] = lcid; loc->locinfo->lc_handle[category] = lcid;
len = 0; len = 0;
len += GetLocaleInfoA(lcid, LOCALE_SLANGUAGE, buf, 256); len += GetLocaleInfoA(lcid, LOCALE_SENGLANGUAGE
|LOCALE_NOUSEROVERRIDE, buf, 256);
buf[len-1] = '_'; buf[len-1] = '_';
len += GetLocaleInfoA(lcid, LOCALE_SCOUNTRY, &buf[len], 256-len); len += GetLocaleInfoA(lcid, LOCALE_SENGCOUNTRY
|LOCALE_NOUSEROVERRIDE, &buf[len], 256-len);
buf[len-1] = '.'; buf[len-1] = '.';
len += GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, &buf[len], 256-len); len += GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE
|LOCALE_NOUSEROVERRIDE, &buf[len], 256-len);
loc->locinfo->lc_category[category].locale = MSVCRT_malloc(sizeof(char[len])); loc->locinfo->lc_category[category].locale = MSVCRT_malloc(sizeof(char[len]));
loc->locinfo->lc_category[category].refcount = MSVCRT_malloc(sizeof(int)); loc->locinfo->lc_category[category].refcount = MSVCRT_malloc(sizeof(int));
...@@ -792,7 +796,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -792,7 +796,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
*loc->locinfo->lconv_intl_refcount = 1; *loc->locinfo->lconv_intl_refcount = 1;
*loc->locinfo->lconv_mon_refcount = 1; *loc->locinfo->lconv_mon_refcount = 1;
i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SINTLSYMBOL, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SINTLSYMBOL
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->int_curr_symbol = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->int_curr_symbol = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->int_curr_symbol, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->int_curr_symbol, buf, sizeof(char[i]));
else { else {
...@@ -800,7 +805,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -800,7 +805,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SCURRENCY, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SCURRENCY
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->currency_symbol = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->currency_symbol = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->currency_symbol, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->currency_symbol, buf, sizeof(char[i]));
else { else {
...@@ -808,7 +814,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -808,7 +814,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONDECIMALSEP, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONDECIMALSEP
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->mon_decimal_point = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->mon_decimal_point = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->mon_decimal_point, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->mon_decimal_point, buf, sizeof(char[i]));
else { else {
...@@ -816,7 +823,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -816,7 +823,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONTHOUSANDSEP, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONTHOUSANDSEP
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->mon_thousands_sep = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->mon_thousands_sep = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->mon_thousands_sep, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->mon_thousands_sep, buf, sizeof(char[i]));
else { else {
...@@ -824,7 +832,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -824,7 +832,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONGROUPING, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONGROUPING
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i>1) if(i>1)
i = i/2 + (buf[i-2]=='0'?0:1); i = i/2 + (buf[i-2]=='0'?0:1);
if(i && (loc->locinfo->lconv->mon_grouping = MSVCRT_malloc(sizeof(char[i])))) { if(i && (loc->locinfo->lconv->mon_grouping = MSVCRT_malloc(sizeof(char[i])))) {
...@@ -838,7 +847,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -838,7 +847,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SPOSITIVESIGN, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SPOSITIVESIGN
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->positive_sign = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->positive_sign = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->positive_sign, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->positive_sign, buf, sizeof(char[i]));
else { else {
...@@ -846,7 +856,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -846,7 +856,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SNEGATIVESIGN, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SNEGATIVESIGN
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->negative_sign = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->negative_sign = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->negative_sign, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->negative_sign, buf, sizeof(char[i]));
else { else {
...@@ -854,56 +865,64 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -854,56 +865,64 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IINTLCURRDIGITS, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IINTLCURRDIGITS
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->int_frac_digits = atoi(buf); loc->locinfo->lconv->int_frac_digits = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_ICURRDIGITS, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_ICURRDIGITS
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->frac_digits = atoi(buf); loc->locinfo->lconv->frac_digits = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSYMPRECEDES, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSYMPRECEDES
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->p_cs_precedes = atoi(buf); loc->locinfo->lconv->p_cs_precedes = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSEPBYSPACE, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSEPBYSPACE
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->p_sep_by_space = atoi(buf); loc->locinfo->lconv->p_sep_by_space = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSYMPRECEDES, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSYMPRECEDES
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->n_cs_precedes = atoi(buf); loc->locinfo->lconv->n_cs_precedes = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSEPBYSPACE, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSEPBYSPACE
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->n_sep_by_space = atoi(buf); loc->locinfo->lconv->n_sep_by_space = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSIGNPOSN, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSIGNPOSN
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->p_sign_posn = atoi(buf); loc->locinfo->lconv->p_sign_posn = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
return NULL; return NULL;
} }
if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSIGNPOSN, buf, 256)) if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSIGNPOSN
|LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->n_sign_posn = atoi(buf); loc->locinfo->lconv->n_sign_posn = atoi(buf);
else { else {
_free_locale(loc); _free_locale(loc);
...@@ -962,7 +981,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -962,7 +981,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
*loc->locinfo->lconv_intl_refcount = 1; *loc->locinfo->lconv_intl_refcount = 1;
*loc->locinfo->lconv_num_refcount = 1; *loc->locinfo->lconv_num_refcount = 1;
i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_SDECIMAL, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_SDECIMAL
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->decimal_point = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->decimal_point = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->decimal_point, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->decimal_point, buf, sizeof(char[i]));
else { else {
...@@ -970,7 +990,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -970,7 +990,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_STHOUSAND, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_STHOUSAND
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i && (loc->locinfo->lconv->thousands_sep = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->thousands_sep = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->thousands_sep, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->thousands_sep, buf, sizeof(char[i]));
else { else {
...@@ -978,7 +999,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -978,7 +999,8 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
return NULL; return NULL;
} }
i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_SGROUPING, buf, 256); i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_SGROUPING
|LOCALE_NOUSEROVERRIDE, buf, 256);
if(i>1) if(i>1)
i = i/2 + (buf[i-2]=='0'?0:1); i = i/2 + (buf[i-2]=='0'?0:1);
if(i && (loc->locinfo->lconv->grouping = MSVCRT_malloc(sizeof(char[i])))) { if(i && (loc->locinfo->lconv->grouping = MSVCRT_malloc(sizeof(char[i])))) {
......
...@@ -75,7 +75,7 @@ static void test_setlocale(void) ...@@ -75,7 +75,7 @@ static void test_setlocale(void)
ok(!strcmp(ret, lc_all), "ret = %s\n", ret); ok(!strcmp(ret, lc_all), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "German"); ret = setlocale(LC_ALL, "German");
todo_wine ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret);
/* This test shows that _country_synonyms table is incorrect */ /* This test shows that _country_synonyms table is incorrect */
/* It translates "America" to "US" */ /* It translates "America" to "US" */
...@@ -165,22 +165,22 @@ static void test_setlocale(void) ...@@ -165,22 +165,22 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "dea"); ret = setlocale(LC_ALL, "dea");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "German_Austria.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "German_Austria.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "des"); ret = setlocale(LC_ALL, "des");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "German_Switzerland.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "German_Switzerland.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "deu"); ret = setlocale(LC_ALL, "deu");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "dutch"); ret = setlocale(LC_ALL, "dutch");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Dutch_Netherlands.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "Dutch_Netherlands.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "dutch-belgian"); ret = setlocale(LC_ALL, "dutch-belgian");
todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -191,7 +191,7 @@ static void test_setlocale(void) ...@@ -191,7 +191,7 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "ena"); ret = setlocale(LC_ALL, "ena");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "English_Australia.1252") ok(!strcmp(ret, "English_Australia.1252")
|| broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "ell"); ret = setlocale(LC_ALL, "ell");
...@@ -202,7 +202,7 @@ static void test_setlocale(void) ...@@ -202,7 +202,7 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "enc"); ret = setlocale(LC_ALL, "enc");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "English_Canada.1252") ok(!strcmp(ret, "English_Canada.1252")
|| broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "eng"); ret = setlocale(LC_ALL, "eng");
...@@ -214,18 +214,18 @@ static void test_setlocale(void) ...@@ -214,18 +214,18 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "enu"); ret = setlocale(LC_ALL, "enu");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "enz"); ret = setlocale(LC_ALL, "enz");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "English_New Zealand.1252") ok(!strcmp(ret, "English_New Zealand.1252")
|| broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "english"); ret = setlocale(LC_ALL, "english");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "english-american"); ret = setlocale(LC_ALL, "english-american");
todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -269,18 +269,18 @@ static void test_setlocale(void) ...@@ -269,18 +269,18 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "esm"); ret = setlocale(LC_ALL, "esm");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Spanish_Mexico.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "Spanish_Mexico.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "esn"); ret = setlocale(LC_ALL, "esn");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Spanish_Spain.1252") ok(!strcmp(ret, "Spanish_Spain.1252")
|| broken(!strcmp(ret, "Spanish - Modern Sort_Spain.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "Spanish - Modern Sort_Spain.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "esp"); ret = setlocale(LC_ALL, "esp");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Spanish_Spain.1252") ok(!strcmp(ret, "Spanish_Spain.1252")
|| broken(!strcmp(ret, "Spanish - Traditional Sort_Spain.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "Spanish - Traditional Sort_Spain.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "fin"); ret = setlocale(LC_ALL, "fin");
...@@ -296,24 +296,24 @@ static void test_setlocale(void) ...@@ -296,24 +296,24 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "fra"); ret = setlocale(LC_ALL, "fra");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "French_France.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "French_France.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "frb"); ret = setlocale(LC_ALL, "frb");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "French_Belgium.1252") ok(!strcmp(ret, "French_Belgium.1252")
|| broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "frc"); ret = setlocale(LC_ALL, "frc");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "French_Canada.1252") ok(!strcmp(ret, "French_Canada.1252")
|| broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "french"); ret = setlocale(LC_ALL, "french");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "French_France.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "French_France.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "french-belgian"); ret = setlocale(LC_ALL, "french-belgian");
todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -336,13 +336,13 @@ static void test_setlocale(void) ...@@ -336,13 +336,13 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "frs"); ret = setlocale(LC_ALL, "frs");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "French_Switzerland.1252") ok(!strcmp(ret, "French_Switzerland.1252")
|| broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "german"); ret = setlocale(LC_ALL, "german");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "german-austrian"); ret = setlocale(LC_ALL, "german-austrian");
todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -384,12 +384,12 @@ static void test_setlocale(void) ...@@ -384,12 +384,12 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "ita"); ret = setlocale(LC_ALL, "ita");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Italian_Italy.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "Italian_Italy.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "italian"); ret = setlocale(LC_ALL, "italian");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Italian_Italy.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "Italian_Italy.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "italian-swiss"); ret = setlocale(LC_ALL, "italian-swiss");
todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); todo_wine ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -399,7 +399,7 @@ static void test_setlocale(void) ...@@ -399,7 +399,7 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "its"); ret = setlocale(LC_ALL, "its");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Italian_Switzerland.1252") || broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret); ok(!strcmp(ret, "Italian_Switzerland.1252") || broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "japanese"); ret = setlocale(LC_ALL, "japanese");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -424,13 +424,13 @@ static void test_setlocale(void) ...@@ -424,13 +424,13 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "nlb"); ret = setlocale(LC_ALL, "nlb");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Dutch_Belgium.1252") ok(!strcmp(ret, "Dutch_Belgium.1252")
|| broken(!strcmp(ret, "Dutch_Netherlands.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "Dutch_Netherlands.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "nld"); ret = setlocale(LC_ALL, "nld");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Dutch_Netherlands.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "Dutch_Netherlands.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "non"); ret = setlocale(LC_ALL, "non");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -443,7 +443,7 @@ static void test_setlocale(void) ...@@ -443,7 +443,7 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "nor"); ret = setlocale(LC_ALL, "nor");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Norwegian (Bokml)_Norway.1252") ok(!strcmp(ret, "Norwegian (Bokml)_Norway.1252")
|| broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "norwegian-bokmal"); ret = setlocale(LC_ALL, "norwegian-bokmal");
...@@ -483,12 +483,12 @@ static void test_setlocale(void) ...@@ -483,12 +483,12 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "ptb"); ret = setlocale(LC_ALL, "ptb");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Portuguese_Brazil.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "Portuguese_Brazil.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "ptg"); ret = setlocale(LC_ALL, "ptg");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Portuguese_Portugal.1252"), "ret = %s\n", ret); ok(!strcmp(ret, "Portuguese_Portugal.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "rus"); ret = setlocale(LC_ALL, "rus");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
...@@ -513,7 +513,7 @@ static void test_setlocale(void) ...@@ -513,7 +513,7 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "spanish"); ret = setlocale(LC_ALL, "spanish");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret) if(ret)
todo_wine ok(!strcmp(ret, "Spanish_Spain.1252") ok(!strcmp(ret, "Spanish_Spain.1252")
|| broken(!strcmp(ret, "Spanish - Traditional Sort_Spain.1252")), "ret = %s\n", ret); || broken(!strcmp(ret, "Spanish - Traditional Sort_Spain.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "spanish-mexican"); ret = setlocale(LC_ALL, "spanish-mexican");
......
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