winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2023
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
865 discussions
Start a n
N
ew thread
Victor Chiletto : msvcrt: Simplify set_lc_locale_name.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: d71e93949869b215cacf185afbabd560f058694d URL:
https://gitlab.winehq.org/wine/wine/-/commit/d71e93949869b215cacf185afbabd5…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Wed Jul 12 01:47:43 2023 -0300 msvcrt: Simplify set_lc_locale_name. --- dlls/msvcrt/locale.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 12c9bba506c..89118535494 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -471,32 +471,20 @@ static BOOL init_category_name(const char *name, int len, } #if _MSVCR_VER >= 110 -static inline BOOL set_lc_locale_name(pthreadlocinfo locinfo, int cat) +static inline BOOL set_lc_locale_name(pthreadlocinfo locinfo, int cat, WCHAR *sname) { - LCID lcid = locinfo->lc_handle[cat]; - WCHAR buf[100]; - int len; - locinfo->lc_category[cat].wrefcount = malloc(sizeof(int)); if(!locinfo->lc_category[cat].wrefcount) return FALSE; *locinfo->lc_category[cat].wrefcount = 1; - len = GetLocaleInfoW(lcid, LOCALE_SISO639LANGNAME - |LOCALE_NOUSEROVERRIDE, buf, 100); - if(!len) return FALSE; - - if(LocaleNameToLCID(buf, LOCALE_ALLOW_NEUTRAL_NAMES) != lcid) - len = LCIDToLocaleName(lcid, buf, 100, LOCALE_ALLOW_NEUTRAL_NAMES); - - if(!len || !(locinfo->lc_name[cat] = malloc(len*sizeof(wchar_t)))) + if(!(locinfo->lc_name[cat] = wcsdup(sname))) return FALSE; - memcpy(locinfo->lc_name[cat], buf, len*sizeof(wchar_t)); return TRUE; } #else -static inline BOOL set_lc_locale_name(pthreadlocinfo locinfo, int cat) +static inline BOOL set_lc_locale_name(pthreadlocinfo locinfo, int cat, WCHAR *sname) { return TRUE; } @@ -531,7 +519,7 @@ static BOOL update_threadlocinfo_category(WCHAR *sname, unsigned short cp, locinfo->lc_handle[category] = LocaleNameToLCID(sname, LCID_CONVERSION_FLAGS); - set_lc_locale_name(locinfo, category); + set_lc_locale_name(locinfo, category, sname); if(!locinfo->lc_category[category].locale) { char buf[256];
1
0
0
0
Victor Chiletto : msvcrt: Skip exhaustive locale search with valid snames.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 72c3b8f3a0a9020ce3f2667fb63b94d45828c2dd URL:
https://gitlab.winehq.org/wine/wine/-/commit/72c3b8f3a0a9020ce3f2667fb63b94…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Mon Jun 12 16:51:02 2023 -0300 msvcrt: Skip exhaustive locale search with valid snames. --- dlls/msvcr110/tests/msvcr110.c | 4 ++-- dlls/msvcr120/tests/msvcr120.c | 4 ++-- dlls/msvcrt/locale.c | 31 ++++++++++++++++++++++--------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/dlls/msvcr110/tests/msvcr110.c b/dlls/msvcr110/tests/msvcr110.c index 60d876e3bfc..35ba370bb49 100644 --- a/dlls/msvcr110/tests/msvcr110.c +++ b/dlls/msvcr110/tests/msvcr110.c @@ -153,14 +153,14 @@ static void test_setlocale(void) ok(!ret, "setlocale(en-us.1250) succeeded (%s)\n", ret); ret = p_setlocale(LC_ALL, "zh-Hans"); - todo_wine ok((ret != NULL + ok((ret != NULL || broken(ret == NULL)), /* Vista */ "expected success, but got NULL\n"); if (ret) ok(!strcmp(ret, "zh-Hans"), "setlocale zh-Hans failed\n"); ret = p_setlocale(LC_ALL, "zh-Hant"); - todo_wine ok((ret != NULL + ok((ret != NULL || broken(ret == NULL)), /* Vista */ "expected success, but got NULL\n"); if (ret) diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 04870632853..838338c83f8 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -598,11 +598,11 @@ static void test____lc_locale_name_func(void) p_setlocale(LC_ALL, "zh-Hans"); lc_names = p____lc_locale_name_func(); - todo_wine ok(!lstrcmpW(lc_names[1], L"zh-Hans"), "lc_names[1] expected zh-Hans got %s\n", wine_dbgstr_w(lc_names[1])); + ok(!lstrcmpW(lc_names[1], L"zh-Hans"), "lc_names[1] expected zh-Hans got %s\n", wine_dbgstr_w(lc_names[1])); p_setlocale(LC_ALL, "zh-Hant"); lc_names = p____lc_locale_name_func(); - todo_wine ok(!lstrcmpW(lc_names[1], L"zh-Hant"), "lc_names[1] expected zh-Hant got %s\n", wine_dbgstr_w(lc_names[1])); + ok(!lstrcmpW(lc_names[1], L"zh-Hant"), "lc_names[1] expected zh-Hant got %s\n", wine_dbgstr_w(lc_names[1])); p_setlocale(LC_ALL, "C"); lc_names = p____lc_locale_name_func(); diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index cfcd4410b52..12c9bba506c 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -343,6 +343,7 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m if(!locale[0] || (cp == locale && !region)) { GetUserDefaultLocaleName(sname, sname_size); } else { + WCHAR wbuf[LOCALE_NAME_MAX_LENGTH]; locale_search_t search; memset(&search, 0, sizeof(locale_search_t)); @@ -364,21 +365,33 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m if(!cp && !region) { remap_synonym(search.search_language); +#if _MSVCR_VER >= 110 search.allow_sname = TRUE; +#endif + } + + MultiByteToWideChar(CP_ACP, 0, search.search_language, -1, wbuf, LOCALE_NAME_MAX_LENGTH); + if (search.allow_sname && IsValidLocaleName(wbuf)) + { + search.match_flags = FOUND_SNAME; + wcsncpy(sname, wbuf, sname_size); } + else + { + EnumSystemLocalesEx( find_best_locale_proc, 0, (LPARAM)&search, NULL); - EnumSystemLocalesEx( find_best_locale_proc, 0, (LPARAM)&search, NULL); + if (!search.match_flags) + return FALSE; - if (!search.match_flags) - return FALSE; + /* If we were given something that didn't match, fail */ + if (search.search_language[0] && !(search.match_flags & (FOUND_SNAME | FOUND_LANGUAGE))) + return FALSE; + if (search.search_country[0] && !(search.match_flags & FOUND_COUNTRY)) + return FALSE; - /* If we were given something that didn't match, fail */ - if (search.search_language[0] && !(search.match_flags & (FOUND_SNAME | FOUND_LANGUAGE))) - return FALSE; - if (search.search_country[0] && !(search.match_flags & FOUND_COUNTRY)) - return FALSE; + LCIDToLocaleName(search.found_lang_id, sname, sname_size, LOCALE_ALLOW_NEUTRAL_NAMES); + } - LCIDToLocaleName(search.found_lang_id, sname, sname_size, LOCALE_ALLOW_NEUTRAL_NAMES); is_sname = (search.match_flags & FOUND_SNAME) != 0; }
1
0
0
0
Victor Chiletto : msvcrt: Convert locale_to_LCID to snames.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 45dd09d0cf63892a5518ab718e32aea450580cf8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/45dd09d0cf63892a5518ab718e32ae…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Wed Jun 7 12:41:42 2023 -0300 msvcrt: Convert locale_to_LCID to snames. --- dlls/msvcrt/locale.c | 95 ++++++++++++++++++++++++---------------------------- dlls/msvcrt/mbcs.c | 3 +- dlls/msvcrt/msvcrt.h | 5 ++- 3 files changed, 48 insertions(+), 55 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 845de26155c..cfcd4410b52 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -321,28 +321,27 @@ find_best_locale_proc( WCHAR *name, DWORD locale_flags, LPARAM lParam ) return CONTINUE_LOOKING; } -/* Internal: Find the LCID for a locale specification */ -LCID locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *sname) +/* Internal: Find the sname for a locale specification */ +BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_match, WCHAR *sname, int sname_size) { thread_data_t *data = msvcrt_get_thread_data(); const char *cp, *region; BOOL is_sname = FALSE; DWORD locale_cp; - LCID lcid; if (!strcmp(locale, data->cached_locale)) { if (codepage) *codepage = data->cached_cp; if (sname) - *sname = data->cached_sname; - return data->cached_lcid; + wcsncpy(sname, data->cached_sname, sname_size); + return TRUE; } cp = strchr(locale, '.'); region = strchr(locale, '_'); if(!locale[0] || (cp == locale && !region)) { - lcid = GetUserDefaultLCID(); + GetUserDefaultLocaleName(sname, sname_size); } else { locale_search_t search; @@ -371,26 +370,26 @@ LCID locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *sname) EnumSystemLocalesEx( find_best_locale_proc, 0, (LPARAM)&search, NULL); if (!search.match_flags) - return -1; + return FALSE; /* If we were given something that didn't match, fail */ if (search.search_language[0] && !(search.match_flags & (FOUND_SNAME | FOUND_LANGUAGE))) - return -1; + return FALSE; if (search.search_country[0] && !(search.match_flags & FOUND_COUNTRY)) - return -1; + return FALSE; - lcid = MAKELCID(search.found_lang_id, SORT_DEFAULT); + LCIDToLocaleName(search.found_lang_id, sname, sname_size, LOCALE_ALLOW_NEUTRAL_NAMES); is_sname = (search.match_flags & FOUND_SNAME) != 0; } /* Obtain code page */ if (!cp || !cp[1] || !_strnicmp(cp, ".ACP", 4)) { - GetLocaleInfoW(lcid, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, + GetLocaleInfoEx(sname, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, (WCHAR *)&locale_cp, sizeof(DWORD)/sizeof(WCHAR)); if (!locale_cp) locale_cp = GetACP(); } else if (!_strnicmp(cp, ".OCP", 4)) { - GetLocaleInfoW(lcid, LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER, + GetLocaleInfoEx(sname, LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER, (WCHAR *)&locale_cp, sizeof(DWORD)/sizeof(WCHAR)); #if _MSVCR_VER >= 140 } else if (!_strnicmp(cp, ".UTF-8", 6) @@ -401,24 +400,23 @@ LCID locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *sname) locale_cp = atoi(cp + 1); } if (!IsValidCodePage(locale_cp)) - return -1; + return FALSE; if (!locale_cp) - return -1; + return FALSE; if (codepage) *codepage = locale_cp; - if (sname) - *sname = is_sname; + if (sname_match) + *sname_match = is_sname; if (strlen(locale) < sizeof(data->cached_locale)) { strcpy(data->cached_locale, locale); - data->cached_lcid = lcid; data->cached_cp = locale_cp; - data->cached_sname = is_sname; + wcscpy(data->cached_sname, sname); } - return lcid; + return TRUE; } static void copy_threadlocinfo_category(pthreadlocinfo locinfo, @@ -1286,7 +1284,6 @@ static pthreadlocinfo create_locinfo(int category, locale_sname[0] = NULL; cp[0] = CP_ACP; } else if (locale[0] == 'L' && locale[1] == 'C' && locale[2] == '_') { - LCID lcid; const char *p; while(1) { @@ -1311,34 +1308,31 @@ static pthreadlocinfo create_locinfo(int category, p = strchr(locale, ';'); if(locale[0]=='C' && (locale[1]==';' || locale[1]=='\0')) { - lcid = 0; locale_sname[i] = NULL; cp[i] = CP_ACP; - } else if(p) { - memcpy(buf, locale, p-locale); - buf[p-locale] = '\0'; - lcid = locale_to_LCID(buf, &cp[i], &sname_match); - if(sname_match) { - locale_name[i] = locale; - locale_len[i] = p-locale; - } } else { - lcid = locale_to_LCID(locale, &cp[i], &sname_match); - if(sname_match) { - locale_name[i] = locale; - locale_len[i] = strlen(locale); + BOOL locale_found = FALSE; + + if(p) { + memcpy(buf, locale, p-locale); + buf[p-locale] = '\0'; + locale_found = locale_to_sname(buf, &cp[i], &sname_match, wbuf, LOCALE_NAME_MAX_LENGTH); + locale_sname[i] = wcsdup(wbuf); + if(sname_match) { + locale_name[i] = locale; + locale_len[i] = p-locale; + } + } else { + locale_found = locale_to_sname(buf, &cp[i], &sname_match, wbuf, LOCALE_NAME_MAX_LENGTH); + locale_sname[i] = wcsdup(wbuf); + if(sname_match) { + locale_name[i] = locale; + locale_len[i] = strlen(locale); + } } - } - - if(lcid == -1) - goto fail; - if(lcid) { - int sname_size = LCIDToLocaleName(lcid, NULL, 0, LCID_CONVERSION_FLAGS); - locale_sname[i] = malloc(sname_size * sizeof(WCHAR)); - if(!locale_sname[i]) + if(!locale_found || !locale_sname[i]) goto fail; - LCIDToLocaleName(lcid, locale_sname[i], sname_size, LCID_CONVERSION_FLAGS); } if(!p || *(p+1)!='L' || *(p+2)!='C' || *(p+3)!='_') @@ -1347,16 +1341,15 @@ static pthreadlocinfo create_locinfo(int category, locale = p+1; } } else { - LCID lcid = locale_to_LCID(locale, &cp[0], &sname_match); - if(lcid == -1) + BOOL locale_found = locale_to_sname(locale, &cp[0], &sname_match, wbuf, LOCALE_NAME_MAX_LENGTH); + + if(!locale_found) return NULL; - if(lcid) { - int sname_size = LCIDToLocaleName(lcid, NULL, 0, LCID_CONVERSION_FLAGS); - locale_sname[0] = malloc(sname_size * sizeof(WCHAR)); - if(!locale_sname[0]) - return NULL; - LCIDToLocaleName(lcid, locale_sname[0], sname_size, LCID_CONVERSION_FLAGS); - } + + locale_sname[0] = wcsdup(wbuf); + if(!locale_sname[0]) + return NULL; + if(sname_match) { locale_name[0] = locale; locale_len[0] = strlen(locale); diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 16c5c378be7..8598bceb029 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -252,8 +252,9 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo) } if(lcid == -1) { + WCHAR wbuf[LOCALE_NAME_MAX_LENGTH]; sprintf(bufA, ".%d", newcp); - mbcinfo->mblcid = locale_to_LCID(bufA, NULL, NULL); + mbcinfo->mblcid = locale_to_sname(bufA, NULL, NULL, wbuf, LOCALE_NAME_MAX_LENGTH) ? LocaleNameToLCID(wbuf, LOCALE_ALLOW_NEUTRAL_NAMES) : -1; } else { mbcinfo->mblcid = lcid; } diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 1d2db6a4d87..42c41c2200c 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -170,8 +170,7 @@ struct __thread_data { int processing_throw; frame_info *frame_info_head; void *unk8[6]; - LCID cached_lcid; - BOOL cached_sname; + WCHAR cached_sname[LOCALE_NAME_MAX_LENGTH]; int unk9[2]; DWORD cached_cp; char cached_locale[131]; @@ -186,7 +185,7 @@ typedef struct __thread_data thread_data_t; extern thread_data_t *CDECL msvcrt_get_thread_data(void) DECLSPEC_HIDDEN; -LCID locale_to_LCID(const char*, unsigned short*, BOOL*) DECLSPEC_HIDDEN; +BOOL locale_to_sname(const char*, unsigned short*, BOOL*, WCHAR*, int) DECLSPEC_HIDDEN; extern _locale_t MSVCRT_locale DECLSPEC_HIDDEN; extern __lc_time_data cloc_time_data DECLSPEC_HIDDEN; extern unsigned int MSVCRT___lc_codepage;
1
0
0
0
Victor Chiletto : msvcrt: Use snames instead of LCIDs in create_locinfo.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 24a2b625545f1875b5c3177f2b9da1b7299b864f URL:
https://gitlab.winehq.org/wine/wine/-/commit/24a2b625545f1875b5c3177f2b9da1…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Thu Jun 8 15:14:57 2023 -0300 msvcrt: Use snames instead of LCIDs in create_locinfo. --- dlls/msvcr110/tests/msvcr110.c | 12 +- dlls/msvcrt/locale.c | 459 ++++++++++++++++++++++------------------- 2 files changed, 257 insertions(+), 214 deletions(-)
1
0
0
0
Victor Chiletto : msvcr120/tests: Check ___lc_locale_name_func with neutral Chinese locales.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 969e3626bbcc7bd9ad6bca2d368f0bb67e306786 URL:
https://gitlab.winehq.org/wine/wine/-/commit/969e3626bbcc7bd9ad6bca2d368f0b…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Wed Jun 7 17:46:59 2023 -0300 msvcr120/tests: Check ___lc_locale_name_func with neutral Chinese locales. --- dlls/msvcr120/tests/msvcr120.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index e5a5ff0435d..04870632853 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -596,6 +596,14 @@ static void test____lc_locale_name_func(void) } } + p_setlocale(LC_ALL, "zh-Hans"); + lc_names = p____lc_locale_name_func(); + todo_wine ok(!lstrcmpW(lc_names[1], L"zh-Hans"), "lc_names[1] expected zh-Hans got %s\n", wine_dbgstr_w(lc_names[1])); + + p_setlocale(LC_ALL, "zh-Hant"); + lc_names = p____lc_locale_name_func(); + todo_wine ok(!lstrcmpW(lc_names[1], L"zh-Hant"), "lc_names[1] expected zh-Hant got %s\n", wine_dbgstr_w(lc_names[1])); + p_setlocale(LC_ALL, "C"); lc_names = p____lc_locale_name_func(); ok(!lc_names[1], "___lc_locale_name_func()[1] = %s\n", wine_dbgstr_w(lc_names[1]));
1
0
0
0
Victor Chiletto : msvcr110/tests: Add tests for new setlocale behaviors.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: fbbe8e26be898770e98307ed3a9789ba06b5cff9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fbbe8e26be898770e98307ed3a9789…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Mon Jun 5 19:59:14 2023 -0300 msvcr110/tests: Add tests for new setlocale behaviors. A bunch of locales had changes >= msvcr 110. --- dlls/msvcr110/tests/msvcr110.c | 78 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/dlls/msvcr110/tests/msvcr110.c b/dlls/msvcr110/tests/msvcr110.c index 255c68b0796..cf76720d806 100644 --- a/dlls/msvcr110/tests/msvcr110.c +++ b/dlls/msvcr110/tests/msvcr110.c @@ -152,6 +152,84 @@ static void test_setlocale(void) ret = p_setlocale(LC_ALL, "en-us.1250"); ok(!ret, "setlocale(en-us.1250) succeeded (%s)\n", ret); + ret = p_setlocale(LC_ALL, "zh-Hans"); + todo_wine ok((ret != NULL + || broken(ret == NULL)), /* Vista */ + "expected success, but got NULL\n"); + if (ret) + ok(!strcmp(ret, "zh-Hans"), "setlocale zh-Hans failed\n"); + + ret = p_setlocale(LC_ALL, "zh-Hant"); + todo_wine ok((ret != NULL + || broken(ret == NULL)), /* Vista */ + "expected success, but got NULL\n"); + if (ret) + ok(!strcmp(ret, "zh-Hant"), "setlocale zh-Hant failed\n"); + + /* used to return Chinese (Simplified)_China.936 */ + ret = p_setlocale(LC_ALL, "chinese"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Chinese_China.936") + || broken(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")) /* Vista */ + || broken(!strcmp(ret, "Chinese_People's Republic of China.936"))), /* 7 */ + "setlocale chinese failed, got %s\n", ret); + + /* used to return Chinese (Simplified)_China.936 */ + ret = p_setlocale(LC_ALL, "Chinese_China.936"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Chinese_China.936") + || broken(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")) /* Vista */ + || broken(!strcmp(ret, "Chinese_People's Republic of China.936"))), /* 7 */ + "setlocale Chinese_China.936 failed, got %s\n", ret); + + /* used to return Chinese (Simplified)_China.936 */ + ret = p_setlocale(LC_ALL, "chinese-simplified"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Chinese_China.936") + || broken(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936"))), /* Vista */ + "setlocale chinese-simplified failed, got %s\n", ret); + + /* used to return Chinese (Simplified)_China.936 */ + ret = p_setlocale(LC_ALL, "chs"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Chinese_China.936") + || broken(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936"))), /* Vista */ + "setlocale chs failed, got %s\n", ret); + + /* used to return Chinese (Traditional)_Taiwan.950 */ + ret = p_setlocale(LC_ALL, "cht"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Chinese (Traditional)_Hong Kong SAR.950") + || broken(!strcmp(ret, "Chinese (Traditional)_Taiwan.950"))), /* Vista - 7 */ + "setlocale cht failed, got %s\n", ret); + + /* used to return Chinese (Traditional)_Taiwan.950 */ + ret = p_setlocale(LC_ALL, "chinese-traditional"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Chinese (Traditional)_Hong Kong SAR.950") + || broken(!strcmp(ret, "Chinese (Traditional)_Taiwan.950"))), /* Vista - 7 */ + "setlocale chinese-traditional failed, got %s\n", ret); + + ret = p_setlocale(LC_ALL, "norwegian-nynorsk"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Norwegian Nynorsk_Norway.1252") + || broken(!strcmp(ret, "Norwegian (Nynorsk)_Norway.1252"))), /* Vista - 7 */ + "setlocale norwegian-nynorsk failed, got %s\n", ret); + + ret = p_setlocale(LC_ALL, "non"); + ok(ret != NULL, "expected success, but got NULL\n"); + if (ret) + todo_wine ok((!strcmp(ret, "Norwegian Nynorsk_Norway.1252") + || broken(!strcmp(ret, "Norwegian (Nynorsk)_Norway.1252"))), /* Vista - 7 */ + "setlocale norwegian-nynorsk failed, got %s\n", ret); + p_setlocale(LC_ALL, "C"); }
1
0
0
0
Alexandre Julliard : gitlab: Install the gstreamer packages from deb-multimedia.org.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: ac6a2f2c19caa2aa07e524ffd529c5c66c0754d1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ac6a2f2c19caa2aa07e524ffd529c5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 12 19:00:22 2023 +0200 gitlab: Install the gstreamer packages from
deb-multimedia.org
. The standard bookworm packages don't support multilib. --- tools/gitlab/image.docker | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/gitlab/image.docker b/tools/gitlab/image.docker index c7f9bcd1c08..50607d13872 100644 --- a/tools/gitlab/image.docker +++ b/tools/gitlab/image.docker @@ -23,7 +23,6 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ libgl1-mesa-dev:amd64 libgl1-mesa-dev:i386 \ libgnutls28-dev:amd64 libgnutls28-dev:i386 \ libgphoto2-dev:amd64 libgphoto2-dev:i386 \ - libgstreamer-plugins-base1.0-dev:i386 \ libice-dev:amd64 libice-dev:i386 \ libkrb5-dev:amd64 libkrb5-dev:i386 \ libosmesa6-dev:amd64 libosmesa6-dev:i386 \ @@ -52,8 +51,15 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ unixodbc-dev:amd64 unixodbc-dev:i386 \ x11proto-dev && \ apt-get install -y ccache netbase curl ca-certificates xserver-xorg-video-dummy xserver-xorg xfonts-base xinit fvwm \ - winbind fonts-liberation2 fonts-noto-core fonts-noto-cjk pulseaudio libasound2-plugins:amd64 libasound2-plugins:i386 \ - libmjpegutils-2.1-0:amd64 libmjpegutils-2.1-0:i386 gstreamer1.0-libav:amd64 gstreamer1.0-libav:i386 \ + winbind fonts-liberation2 fonts-noto-core fonts-noto-cjk pulseaudio && \ + curl -O
https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multi…
&& \ + dpkg -i deb-multimedia-keyring_2016.8.1_all.deb && \ + echo 'deb
https://www.deb-multimedia.org
bookworm main' >> /etc/apt/sources.list && \ + apt-get update && \ + apt-get install -y libgstreamer-plugins-base1.0-dev:amd64 libgstreamer-plugins-base1.0-dev:i386 \ + libasound2-plugins:amd64 libasound2-plugins:i386 \ + libmjpegutils-2.1-0:amd64 libmjpegutils-2.1-0:i386 \ + gstreamer1.0-libav:amd64 gstreamer1.0-libav:i386 \ gstreamer1.0-plugins-base:amd64 gstreamer1.0-plugins-good:amd64 gstreamer1.0-plugins-bad:amd64 gstreamer1.0-plugins-ugly:amd64 \ gstreamer1.0-plugins-base:i386 gstreamer1.0-plugins-good:i386 gstreamer1.0-plugins-bad:i386 gstreamer1.0-plugins-ugly:i386 && \ apt-get clean && \
1
0
0
0
Alexandre Julliard : dxdiagn: Use nameless unions/structs.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 990000928fcb967fa98a59596a9b853e947fe0a1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/990000928fcb967fa98a59596a9b85…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 12 15:47:55 2023 +0200 dxdiagn: Use nameless unions/structs. --- dlls/dxdiagn/provider.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 0df10ea56ef..696acf7dc51 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -22,8 +22,6 @@ #define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT #include "dxdiag_private.h" #include "winver.h" #include "objidl.h" @@ -792,7 +790,7 @@ static BOOL get_texture_memory(GUID *adapter, DWORD *available_mem) if (SUCCEEDED(hr)) { dd_caps.dwCaps = DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; - dd_caps.dwCaps2 = dd_caps.dwCaps3 = dd_caps.u1.dwCaps4 = 0; + dd_caps.dwCaps2 = dd_caps.dwCaps3 = dd_caps.dwCaps4 = 0; hr = IDirectDraw7_GetAvailableVidMem(pDirectDraw, &dd_caps, available_mem, NULL); IDirectDraw7_Release(pDirectDraw); if (SUCCEEDED(hr)) @@ -887,8 +885,8 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node goto cleanup; swprintf(buffer, ARRAY_SIZE(buffer), L"%u.%u.%04u.%04u", - HIWORD(adapter_info.DriverVersion.u.HighPart), LOWORD(adapter_info.DriverVersion.u.HighPart), - HIWORD(adapter_info.DriverVersion.u.LowPart), LOWORD(adapter_info.DriverVersion.u.LowPart)); + HIWORD(adapter_info.DriverVersion.HighPart), LOWORD(adapter_info.DriverVersion.HighPart), + HIWORD(adapter_info.DriverVersion.LowPart), LOWORD(adapter_info.DriverVersion.LowPart)); hr = add_bstr_property(display_adapter, L"szDriverVersion", buffer); if (FAILED(hr)) @@ -1154,7 +1152,7 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container return S_OK; dd_caps.dwCaps = DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; - dd_caps.dwCaps2 = dd_caps.dwCaps3 = dd_caps.u1.dwCaps4 = 0; + dd_caps.dwCaps2 = dd_caps.dwCaps3 = dd_caps.dwCaps4 = 0; hr = IDirectDraw7_GetAvailableVidMem(pDirectDraw, &dd_caps, &tmp, NULL); if (SUCCEEDED(hr)) { @@ -1190,7 +1188,7 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container if (surface_descr.dwFlags & DDSD_PIXELFORMAT) { hr = add_ui4_property(display_adapter, L"dwBpp", - surface_descr.u4.ddpfPixelFormat.u1.dwRGBBitCount); + surface_descr.ddpfPixelFormat.dwRGBBitCount); if (FAILED(hr)) goto cleanup; }
1
0
0
0
Alexandre Julliard : dmusic: Use nameless unions/structs.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 43ed6c6d670910f001ae4aa20c312a85c7316141 URL:
https://gitlab.winehq.org/wine/wine/-/commit/43ed6c6d670910f001ae4aa20c312a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 12 15:47:38 2023 +0200 dmusic: Use nameless unions/structs. --- dlls/dmusic/dmusic_private.h | 3 --- dlls/dmusic/port.c | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/dmusic/dmusic_private.h b/dlls/dmusic/dmusic_private.h index 1b91f4bac94..d6abf1d1f81 100644 --- a/dlls/dmusic/dmusic_private.h +++ b/dlls/dmusic/dmusic_private.h @@ -25,9 +25,6 @@ #include <stdarg.h> #define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - #include "windef.h" #include "winbase.h" #include "winnt.h" diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index 8549c62c4b1..225191d5905 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -725,18 +725,18 @@ static HRESULT WINAPI IKsControlImpl_KsProperty(IKsControl *iface, KSPROPERTY *p ULONG prop_len, void *data, ULONG data_len, ULONG *ret_len) { TRACE("(%p, %p, %lu, %p, %lu, %p)\n", iface, prop, prop_len, data, data_len, ret_len); - TRACE("prop = %s - %lu - %lu\n", debugstr_guid(&prop->u.s.Set), prop->u.s.Id, prop->u.s.Flags); + TRACE("prop = %s - %lu - %lu\n", debugstr_guid(&prop->Set), prop->Id, prop->Flags); - if (prop->u.s.Flags != KSPROPERTY_TYPE_GET) + if (prop->Flags != KSPROPERTY_TYPE_GET) { - FIXME("prop flags %lu not yet supported\n", prop->u.s.Flags); + FIXME("prop flags %lu not yet supported\n", prop->Flags); return S_FALSE; } if (data_len < sizeof(DWORD)) return E_NOT_SUFFICIENT_BUFFER; - FIXME("Unknown property %s\n", debugstr_guid(&prop->u.s.Set)); + FIXME("Unknown property %s\n", debugstr_guid(&prop->Set)); *(DWORD*)data = FALSE; *ret_len = sizeof(DWORD);
1
0
0
0
Alexandre Julliard : dmsynth: Use nameless unions/structs.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 2bf29480c51a7fff73433978e79a785bedd06aea URL:
https://gitlab.winehq.org/wine/wine/-/commit/2bf29480c51a7fff73433978e79a78…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 12 15:47:23 2023 +0200 dmsynth: Use nameless unions/structs. --- dlls/dmsynth/synth.c | 21 +++++++++------------ dlls/dmsynth/synthsink.c | 12 +++++------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 3631bcfe784..b579c15c66e 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -20,9 +20,6 @@ */ #define COBJMACROS - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT #include "objbase.h" #include "initguid.h" #include "dmksctrl.h" @@ -656,45 +653,45 @@ static HRESULT WINAPI DMSynthImpl_IKsControl_KsProperty(IKsControl* iface, PKSPR { TRACE("(%p, %p, %lu, %p, %lu, %p)\n", iface, Property, PropertyLength, PropertyData, DataLength, BytesReturned); - TRACE("Property = %s - %lu - %lu\n", debugstr_guid(&Property->u.s.Set), Property->u.s.Id, Property->u.s.Flags); + TRACE("Property = %s - %lu - %lu\n", debugstr_guid(&Property->Set), Property->Id, Property->Flags); - if (Property->u.s.Flags != KSPROPERTY_TYPE_GET) + if (Property->Flags != KSPROPERTY_TYPE_GET) { - FIXME("Property flags %lu not yet supported\n", Property->u.s.Flags); + FIXME("Property flags %lu not yet supported\n", Property->Flags); return S_FALSE; } if (DataLength < sizeof(DWORD)) return E_NOT_SUFFICIENT_BUFFER; - if (IsEqualGUID(&Property->u.s.Set, &GUID_DMUS_PROP_INSTRUMENT2)) + if (IsEqualGUID(&Property->Set, &GUID_DMUS_PROP_INSTRUMENT2)) { *(DWORD*)PropertyData = TRUE; *BytesReturned = sizeof(DWORD); } - else if (IsEqualGUID(&Property->u.s.Set, &GUID_DMUS_PROP_DLS2)) + else if (IsEqualGUID(&Property->Set, &GUID_DMUS_PROP_DLS2)) { *(DWORD*)PropertyData = TRUE; *BytesReturned = sizeof(DWORD); } - else if (IsEqualGUID(&Property->u.s.Set, &GUID_DMUS_PROP_GM_Hardware)) + else if (IsEqualGUID(&Property->Set, &GUID_DMUS_PROP_GM_Hardware)) { *(DWORD*)PropertyData = FALSE; *BytesReturned = sizeof(DWORD); } - else if (IsEqualGUID(&Property->u.s.Set, &GUID_DMUS_PROP_GS_Hardware)) + else if (IsEqualGUID(&Property->Set, &GUID_DMUS_PROP_GS_Hardware)) { *(DWORD*)PropertyData = FALSE; *BytesReturned = sizeof(DWORD); } - else if (IsEqualGUID(&Property->u.s.Set, &GUID_DMUS_PROP_XG_Hardware)) + else if (IsEqualGUID(&Property->Set, &GUID_DMUS_PROP_XG_Hardware)) { *(DWORD*)PropertyData = FALSE; *BytesReturned = sizeof(DWORD); } else { - FIXME("Unknown property %s\n", debugstr_guid(&Property->u.s.Set)); + FIXME("Unknown property %s\n", debugstr_guid(&Property->Set)); *(DWORD*)PropertyData = FALSE; *BytesReturned = sizeof(DWORD); } diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index a277a05bafb..825ad86013c 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define NONAMELESSUNION -#define NONAMELESSSTRUCT #include "dmsynth_private.h" #include "initguid.h" #include "uuids.h" @@ -245,25 +243,25 @@ static HRESULT WINAPI DMSynthSinkImpl_IKsControl_KsProperty(IKsControl* iface, P { TRACE("(%p, %p, %lu, %p, %lu, %p)\n", iface, Property, PropertyLength, PropertyData, DataLength, BytesReturned); - TRACE("Property = %s - %lu - %lu\n", debugstr_guid(&Property->u.s.Set), Property->u.s.Id, Property->u.s.Flags); + TRACE("Property = %s - %lu - %lu\n", debugstr_guid(&Property->Set), Property->Id, Property->Flags); - if (Property->u.s.Flags != KSPROPERTY_TYPE_GET) + if (Property->Flags != KSPROPERTY_TYPE_GET) { - FIXME("Property flags %lu not yet supported\n", Property->u.s.Flags); + FIXME("Property flags %lu not yet supported\n", Property->Flags); return S_FALSE; } if (DataLength < sizeof(DWORD)) return E_NOT_SUFFICIENT_BUFFER; - if (IsEqualGUID(&Property->u.s.Set, &GUID_DMUS_PROP_SinkUsesDSound)) + if (IsEqualGUID(&Property->Set, &GUID_DMUS_PROP_SinkUsesDSound)) { *(DWORD*)PropertyData = TRUE; *BytesReturned = sizeof(DWORD); } else { - FIXME("Unknown property %s\n", debugstr_guid(&Property->u.s.Set)); + FIXME("Unknown property %s\n", debugstr_guid(&Property->Set)); *(DWORD*)PropertyData = FALSE; *BytesReturned = sizeof(DWORD); }
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200