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
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
December 2019
----- 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
635 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Don't depend on how __lc_time_data was allocated in _W_Getmonths.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: 9571b362418e4491916ac79b430e5bee4b9a0aa4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9571b362418e4491916ac79b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Dec 4 15:30:13 2019 +0100 msvcrt: Don't depend on how __lc_time_data was allocated in _W_Getmonths. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/locale.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 0e3e55b609..52052a4502 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -568,11 +568,14 @@ MSVCRT_wchar_t* CDECL _W_Getmonths(void) { MSVCRT___lc_time_data *cur = get_locinfo()->lc_time_curr; MSVCRT_wchar_t *out; - int i, len, size; + int i, len, size = 0; TRACE("\n"); - size = cur->wstr.names.am-cur->wstr.names.short_mon[0]; + for(i=0; i<12; i++) { + size += strlenW(cur->wstr.names.short_mon[i]) + 1; + size += strlenW(cur->wstr.names.mon[i]) + 1; + } out = MSVCRT_malloc((size+1)*sizeof(*out)); if(!out) return NULL;
1
0
0
0
Piotr Caban : msvcrt: Don't depend on how __lc_time_data was allocated in _Getmonths.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: e4f3dea2e835f8791b015dd4e6b7a7e224b2c0ba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4f3dea2e835f8791b015dd4…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Dec 4 15:30:08 2019 +0100 msvcrt: Don't depend on how __lc_time_data was allocated in _Getmonths. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/locale.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 617d1fffb3..0e3e55b609 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -530,12 +530,15 @@ MSVCRT_wchar_t* CDECL _W_Getdays(void) char* CDECL _Getmonths(void) { MSVCRT___lc_time_data *cur = get_locinfo()->lc_time_curr; - int i, len, size; + int i, len, size = 0; char *out; TRACE("\n"); - size = cur->str.names.am-cur->str.names.short_mon[0]; + for(i=0; i<12; i++) { + size += strlen(cur->str.names.short_mon[i]) + 1; + size += strlen(cur->str.names.mon[i]) + 1; + } out = MSVCRT_malloc(size+1); if(!out) return NULL;
1
0
0
0
Piotr Caban : msvcrt: Don't depend on how __lc_time_data was allocated in _W_Getdays.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: 2d23512da1c4311b828eff9622a32d65102b2b63 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d23512da1c4311b828eff96…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Dec 4 15:30:03 2019 +0100 msvcrt: Don't depend on how __lc_time_data was allocated in _W_Getdays. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/locale.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index e0c6253044..617d1fffb3 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -494,11 +494,14 @@ MSVCRT_wchar_t* CDECL _W_Getdays(void) { MSVCRT___lc_time_data *cur = get_locinfo()->lc_time_curr; MSVCRT_wchar_t *out; - int i, len, size; + int i, len, size = 0; TRACE("\n"); - size = cur->wstr.names.short_mon[0]-cur->wstr.names.short_wday[0]; + for(i=0; i<7; i++) { + size += strlenW(cur->wstr.names.short_wday[i]) + 1; + size += strlenW(cur->wstr.names.wday[i]) + 1; + } out = MSVCRT_malloc((size+1)*sizeof(*out)); if(!out) return NULL;
1
0
0
0
Piotr Caban : msvcrt: Don't depend on how __lc_time_data was allocated in _Getdays.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: 66d702668a6aae4987466a898d072de32c6e0522 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66d702668a6aae4987466a89…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Dec 4 15:29:59 2019 +0100 msvcrt: Don't depend on how __lc_time_data was allocated in _Getdays. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/locale.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 6f2a83cc7c..e0c6253044 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -456,12 +456,15 @@ static inline char* construct_lc_all(MSVCRT_pthreadlocinfo locinfo) { char* CDECL _Getdays(void) { MSVCRT___lc_time_data *cur = get_locinfo()->lc_time_curr; - int i, len, size; + int i, len, size = 0; char *out; TRACE("\n"); - size = cur->str.names.short_mon[0]-cur->str.names.short_wday[0]; + for(i=0; i<7; i++) { + size += strlen(cur->str.names.short_wday[i]) + 1; + size += strlen(cur->str.names.wday[i]) + 1; + } out = MSVCRT_malloc(size+1); if(!out) return NULL;
1
0
0
0
Jeff Smith : msvcrt: Factor out code for creating lc_time_data structure.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: dba7dac4588c5e994d5d7afb388e9997c388c7b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dba7dac4588c5e994d5d7afb…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Dec 4 15:29:55 2019 +0100 msvcrt: Factor out code for creating lc_time_data structure. Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/locale.c | 167 +++++++++++++++++++++++++++------------------------ 1 file changed, 87 insertions(+), 80 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index fc41f05da2..6f2a83cc7c 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -910,8 +910,7 @@ static inline BOOL category_needs_update(int cat, int user_cat, return lcid!=locinfo->lc_handle[cat] || cp!=locinfo->lc_id[cat].wCodePage; } -static MSVCRT_pthreadlocinfo create_locinfo(int category, - const char *locale, MSVCRT_pthreadlocinfo old_locinfo) +static MSVCRT___lc_time_data* create_time_data(LCID lcid) { static const DWORD time_data[] = { LOCALE_SABBREVDAYNAME7, LOCALE_SABBREVDAYNAME1, LOCALE_SABBREVDAYNAME2, @@ -930,11 +929,6 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, LOCALE_SSHORTDATE, LOCALE_SLONGDATE, LOCALE_STIMEFORMAT }; - static const char collate[] = "COLLATE="; - static const char ctype[] = "CTYPE="; - static const char monetary[] = "MONETARY="; - static const char numeric[] = "NUMERIC="; - static const char time[] = "TIME="; static const char cloc_short_date[] = "MM/dd/yy"; static const MSVCRT_wchar_t cloc_short_dateW[] = {'M','M','/','d','d','/','y','y',0}; static const char cloc_long_date[] = "dddd, MMMM dd, yyyy"; @@ -942,8 +936,91 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, static const char cloc_time[] = "HH:mm:ss"; static const MSVCRT_wchar_t cloc_timeW[] = {'H','H',':','m','m',':','s','s',0}; + MSVCRT___lc_time_data *cur; + const DWORD flags = lcid ? 0 : LOCALE_NOUSEROVERRIDE; + const LCID lcid_tmp = lcid ? lcid : MAKELCID(LANG_ENGLISH, SORT_DEFAULT); + int i, ret, size; + + size = sizeof(MSVCRT___lc_time_data); + for(i=0; i<ARRAY_SIZE(time_data); i++) { + if(time_data[i]==LOCALE_SSHORTDATE && !lcid) { + size += sizeof(cloc_short_date) + sizeof(cloc_short_dateW); + }else if(time_data[i]==LOCALE_SLONGDATE && !lcid) { + size += sizeof(cloc_long_date) + sizeof(cloc_long_dateW); + }else { + ret = GetLocaleInfoA(lcid_tmp, time_data[i]|flags, NULL, 0); + if(!ret) + return NULL; + size += ret; + + ret = GetLocaleInfoW(lcid_tmp, time_data[i]|flags, NULL, 0); + if(!ret) + return NULL; + size += ret*sizeof(MSVCRT_wchar_t); + } + } +#if _MSVCR_VER >= 110 + size += LCIDToLocaleName(lcid, NULL, 0, 0)*sizeof(MSVCRT_wchar_t); +#endif + + cur = MSVCRT_malloc(size); + if(!cur) + return NULL; + + ret = 0; + for(i=0; i<ARRAY_SIZE(time_data); i++) { + cur->str.str[i] = &cur->data[ret]; + if(time_data[i]==LOCALE_SSHORTDATE && !lcid) { + memcpy(&cur->data[ret], cloc_short_date, sizeof(cloc_short_date)); + ret += sizeof(cloc_short_date); + }else if(time_data[i]==LOCALE_SLONGDATE && !lcid) { + memcpy(&cur->data[ret], cloc_long_date, sizeof(cloc_long_date)); + ret += sizeof(cloc_long_date); + }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid) { + memcpy(&cur->data[ret], cloc_time, sizeof(cloc_time)); + ret += sizeof(cloc_time); + }else { + ret += GetLocaleInfoA(lcid_tmp, time_data[i]|flags, + &cur->data[ret], size-ret); + } + } + for(i=0; i<ARRAY_SIZE(time_data); i++) { + cur->wstr.wstr[i] = (MSVCRT_wchar_t*)&cur->data[ret]; + if(time_data[i]==LOCALE_SSHORTDATE && !lcid) { + memcpy(&cur->data[ret], cloc_short_dateW, sizeof(cloc_short_dateW)); + ret += sizeof(cloc_short_dateW); + }else if(time_data[i]==LOCALE_SLONGDATE && !lcid) { + memcpy(&cur->data[ret], cloc_long_dateW, sizeof(cloc_long_dateW)); + ret += sizeof(cloc_long_dateW); + }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid) { + memcpy(&cur->data[ret], cloc_timeW, sizeof(cloc_timeW)); + ret += sizeof(cloc_timeW); + }else { + ret += GetLocaleInfoW(lcid_tmp, time_data[i]|flags, + (MSVCRT_wchar_t*)&cur->data[ret], size-ret)*sizeof(MSVCRT_wchar_t); + } + } +#if _MSVCR_VER >= 110 + cur->locname = (MSVCRT_wchar_t*)&cur->data[ret]; + LCIDToLocaleName(lcid, cur->locname, (size-ret)/sizeof(MSVCRT_wchar_t), 0); +#else + cur->lcid = lcid; +#endif + + return cur; +} + +static MSVCRT_pthreadlocinfo create_locinfo(int category, + const char *locale, MSVCRT_pthreadlocinfo old_locinfo) +{ + static const char collate[] = "COLLATE="; + static const char ctype[] = "CTYPE="; + static const char monetary[] = "MONETARY="; + static const char numeric[] = "NUMERIC="; + static const char time[] = "TIME="; + MSVCRT_pthreadlocinfo locinfo; - LCID lcid[6] = { 0 }, lcid_tmp; + LCID lcid[6] = { 0 }; unsigned short cp[6] = { 0 }; const char *locale_name[6] = { 0 }; int locale_len[6] = { 0 }; @@ -952,7 +1029,7 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, #if _MSVCR_VER >= 100 MSVCRT_wchar_t wbuf[256]; #endif - int i, ret, size; + int i; TRACE("(%d %s)\n", category, locale); @@ -1588,8 +1665,6 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, locinfo->lc_handle[MSVCRT_LC_TIME] = old_locinfo->lc_handle[MSVCRT_LC_TIME]; locinfo->lc_id[MSVCRT_LC_TIME].wCodePage = old_locinfo->lc_id[MSVCRT_LC_TIME].wCodePage; } else { - DWORD flags = lcid[MSVCRT_LC_TIME] ? 0 : LOCALE_NOUSEROVERRIDE; - if(lcid[MSVCRT_LC_TIME] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_TIME)) { if(!update_threadlocinfo_category(lcid[MSVCRT_LC_TIME], cp[MSVCRT_LC_TIME], locinfo, MSVCRT_LC_TIME)) { @@ -1604,79 +1679,11 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, } else locinfo->lc_category[MSVCRT_LC_TIME].locale = MSVCRT__strdup("C"); - size = sizeof(MSVCRT___lc_time_data); - lcid_tmp = lcid[MSVCRT_LC_TIME] ? lcid[MSVCRT_LC_TIME] : MAKELCID(LANG_ENGLISH, SORT_DEFAULT); - for(i=0; i<ARRAY_SIZE(time_data); i++) { - if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { - size += sizeof(cloc_short_date) + sizeof(cloc_short_dateW); - }else if(time_data[i]==LOCALE_SLONGDATE && !lcid[MSVCRT_LC_TIME]) { - size += sizeof(cloc_long_date) + sizeof(cloc_long_dateW); - }else { - ret = GetLocaleInfoA(lcid_tmp, time_data[i]|flags, NULL, 0); - if(!ret) { - free_locinfo(locinfo); - return NULL; - } - size += ret; - - ret = GetLocaleInfoW(lcid_tmp, time_data[i]|flags, NULL, 0); - if(!ret) { - free_locinfo(locinfo); - return NULL; - } - size += ret*sizeof(MSVCRT_wchar_t); - } - } -#if _MSVCR_VER >= 110 - size += LCIDToLocaleName(lcid[MSVCRT_LC_TIME], NULL, 0, 0)*sizeof(MSVCRT_wchar_t); -#endif - - locinfo->lc_time_curr = MSVCRT_malloc(size); + locinfo->lc_time_curr = create_time_data(lcid[MSVCRT_LC_TIME]); if(!locinfo->lc_time_curr) { free_locinfo(locinfo); return NULL; } - - ret = 0; - for(i=0; i<ARRAY_SIZE(time_data); i++) { - locinfo->lc_time_curr->str.str[i] = &locinfo->lc_time_curr->data[ret]; - if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { - memcpy(&locinfo->lc_time_curr->data[ret], cloc_short_date, sizeof(cloc_short_date)); - ret += sizeof(cloc_short_date); - }else if(time_data[i]==LOCALE_SLONGDATE && !lcid[MSVCRT_LC_TIME]) { - memcpy(&locinfo->lc_time_curr->data[ret], cloc_long_date, sizeof(cloc_long_date)); - ret += sizeof(cloc_long_date); - }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid[MSVCRT_LC_TIME]) { - memcpy(&locinfo->lc_time_curr->data[ret], cloc_time, sizeof(cloc_time)); - ret += sizeof(cloc_time); - }else { - ret += GetLocaleInfoA(lcid_tmp, time_data[i]|flags, - &locinfo->lc_time_curr->data[ret], size-ret); - } - } - for(i=0; i<ARRAY_SIZE(time_data); i++) { - locinfo->lc_time_curr->wstr.wstr[i] = (MSVCRT_wchar_t*)&locinfo->lc_time_curr->data[ret]; - if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { - memcpy(&locinfo->lc_time_curr->data[ret], cloc_short_dateW, sizeof(cloc_short_dateW)); - ret += sizeof(cloc_short_dateW); - }else if(time_data[i]==LOCALE_SLONGDATE && !lcid[MSVCRT_LC_TIME]) { - memcpy(&locinfo->lc_time_curr->data[ret], cloc_long_dateW, sizeof(cloc_long_dateW)); - ret += sizeof(cloc_long_dateW); - }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid[MSVCRT_LC_TIME]) { - memcpy(&locinfo->lc_time_curr->data[ret], cloc_timeW, sizeof(cloc_timeW)); - ret += sizeof(cloc_timeW); - }else { - ret += GetLocaleInfoW(lcid_tmp, time_data[i]|flags, - (MSVCRT_wchar_t*)&locinfo->lc_time_curr->data[ret], size-ret)*sizeof(MSVCRT_wchar_t); - } - } -#if _MSVCR_VER >= 110 - locinfo->lc_time_curr->locname = (MSVCRT_wchar_t*)&locinfo->lc_time_curr->data[ret]; - LCIDToLocaleName(lcid[MSVCRT_LC_TIME], locinfo->lc_time_curr->locname, - (size-ret)/sizeof(MSVCRT_wchar_t), 0); -#else - locinfo->lc_time_curr->lcid = lcid[MSVCRT_LC_TIME]; -#endif } return locinfo;
1
0
0
0
Jeff Smith : ucrtbase: Improve strftime special test cases for %c %r formats.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: a1ce35cfda936825a4fe63520d9958c0bd218e13 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a1ce35cfda936825a4fe6352…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Dec 4 15:29:47 2019 +0100 ucrtbase: Improve strftime special test cases for %c %r formats. Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ucrtbase/tests/misc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c index 083be42f42..a3a20aa9b1 100644 --- a/dlls/ucrtbase/tests/misc.c +++ b/dlls/ucrtbase/tests/misc.c @@ -29,6 +29,7 @@ #include <fcntl.h> #include <time.h> #include <direct.h> +#include <locale.h> #include <windef.h> #include <winbase.h> @@ -162,6 +163,7 @@ static int* (CDECL *p_errno)(void); static char* (CDECL *p_asctime)(const struct tm *); static size_t (__cdecl *p_strftime)(char *, size_t, const char *, const struct tm *); static size_t (__cdecl *p__Strftime)(char*, size_t, const char*, const struct tm*, void*); +static char* (__cdecl *p_setlocale)(int, const char*); static struct tm* (__cdecl *p__gmtime32)(const __time32_t*); static void (CDECL *p_exit)(int); static int (CDECL *p__crt_atexit)(void (CDECL*)(void)); @@ -538,6 +540,7 @@ static BOOL init(void) p_asctime = (void*)GetProcAddress(module, "asctime"); p_strftime = (void*)GetProcAddress(module, "strftime"); p__Strftime = (void*)GetProcAddress(module, "_Strftime"); + p_setlocale = (void*)GetProcAddress(module, "setlocale"); p__gmtime32 = (void*)GetProcAddress(module, "_gmtime32"); p__crt_atexit = (void*)GetProcAddress(module, "_crt_atexit"); p_exit = (void*)GetProcAddress(module, "exit"); @@ -1185,6 +1188,18 @@ static void test_strftime(void) i, j, buf, tests_yweek[i].ret[j]); } } + + if(!p_setlocale(LC_ALL, "fr-FR")) { + win_skip("fr-FR locale not available\n"); + return; + } + ret = p_strftime(buf, sizeof(buf), "%c", &epoch); + ok(ret == 19, "ret = %d\n", ret); + ok(!strcmp(buf, "01/01/1970 00:00:00"), "buf = \"%s\", expected \"%s\"\n", buf, "01/01/1970 00:00:00"); + ret = p_strftime(buf, sizeof(buf), "%r", &epoch); + todo_wine ok(ret == 8, "ret = %d\n", ret); + todo_wine ok(!strcmp(buf, "00:00:00"), "buf = \"%s\", expected \"%s\"\n", buf, "00:00:00"); + p_setlocale(LC_ALL, "C"); } static LONG* get_failures_counter(HANDLE *map)
1
0
0
0
Nikolay Sivov : comctl32/listview: Fix LVM_GETITEM for out-of-range iSubItem case.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: 37c3810557b5819cf3bc375be27c4cf090cf02a9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37c3810557b5819cf3bc375b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Dec 4 12:55:56 2019 +0300 comctl32/listview: Fix LVM_GETITEM for out-of-range iSubItem case. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=44842
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/listview.c | 41 ++++++++++----------- dlls/comctl32/tests/listview.c | 81 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 23 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=37c3810557b5819cf3bc…
1
0
0
0
Nikolay Sivov : comctl32/tests: Merge header items test with existing function.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: 8f9e1ae705e26589c24927a78847efaf80f2a30a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8f9e1ae705e26589c24927a7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Dec 4 12:55:55 2019 +0300 comctl32/tests: Merge header items test with existing function. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/listview.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 48cd614380..dc923c0b6e 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1546,6 +1546,19 @@ static void test_columns(void) "get subitem text after column added", FALSE); DestroyWindow(hwnd); + + /* Columns are not created right away. */ + hwnd = create_listview_control(LVS_REPORT); + ok(hwnd != NULL, "Failed to create a listview window.\n"); + + insert_item(hwnd, 0); + + header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0); + ok(IsWindow(header), "Expected header handle.\n"); + rc = SendMessageA(header, HDM_GETITEMCOUNT, 0, 0); + ok(!rc, "Unexpected column count.\n"); + + DestroyWindow(hwnd); } /* test setting imagelist between WM_NCCREATE and WM_CREATE */ @@ -3939,25 +3952,6 @@ static void test_getitemposition(void) DestroyWindow(hwnd); } -static void test_columnscreation(void) -{ - HWND hwnd, header; - DWORD r; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - insert_item(hwnd, 0); - - /* headers columns aren't created automatically */ - header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "Expected header handle\n"); - r = SendMessageA(header, HDM_GETITEMCOUNT, 0, 0); - expect(0, r); - - DestroyWindow(hwnd); -} - static void test_getitemrect(void) { HWND hwnd; @@ -6577,7 +6571,6 @@ START_TEST(listview) test_hittest(); test_getviewrect(); test_getitemposition(); - test_columnscreation(); test_editbox(); test_notifyformat(); test_indentation(); @@ -6632,7 +6625,6 @@ START_TEST(listview) test_ownerdata(); test_norecompute(); test_nosortheader(); - test_columnscreation(); test_indentation(); test_finditem(); test_hover();
1
0
0
0
Gijs Vermeulen : msvcrt: Optimize _strlwr implementation in C locale.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: e44d935cc6747f283528700f4a923a947a740dbd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e44d935cc6747f283528700f…
Author: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Date: Wed Dec 4 10:04:46 2019 +0100 msvcrt: Optimize _strlwr implementation in C locale. Tests by Ambrož Bizjak. Signed-off-by: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/string.c | 24 +++++++++++++++++++++--- dlls/msvcrt/tests/string.c | 8 ++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index fa5f7022c1..b78d93a917 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -56,6 +56,7 @@ char* CDECL MSVCRT__strdup(const char* str) */ int CDECL MSVCRT__strlwr_s_l(char *str, MSVCRT_size_t len, MSVCRT__locale_t locale) { + MSVCRT_pthreadlocinfo locinfo; char *ptr = str; if (!str || !len) @@ -77,10 +78,27 @@ int CDECL MSVCRT__strlwr_s_l(char *str, MSVCRT_size_t len, MSVCRT__locale_t loca return MSVCRT_EINVAL; } - while (*str) + if(!locale) + locinfo = get_locinfo(); + else + locinfo = locale->locinfo; + + if(!locinfo->lc_handle[MSVCRT_LC_CTYPE]) { - *str = MSVCRT__tolower_l((unsigned char)*str, locale); - str++; + while (*str) + { + if (*str >= 'A' && *str <= 'Z') + *str -= 'A' - 'a'; + str++; + } + } + else + { + while (*str) + { + *str = MSVCRT__tolower_l((unsigned char)*str, locale); + str++; + } } return 0; diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index d14c7f009c..f4c4657791 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -2411,6 +2411,9 @@ static void test__strlwr_s(void) ok(!memcmp(buffer, "gorrister\0ELLEN", sizeof("gorrister\0ELLEN")), "Expected the output buffer to be \"gorrister\\0ELLEN\", got \"%s\"\n", buffer); + + ret = p_strlwr_s((char *)"already_lowercase", sizeof("already_lowercase")); + ok(ret == 0, "Expected _strlwr_s to return 0, got %d\n", ret); } static void test_wcsncat_s(void) @@ -3596,6 +3599,7 @@ static void test__memicmp_l(void) static void test__strupr(void) { const char str[] = "123"; + const char *const_p; char str2[4]; char *mem, *p; DWORD prot; @@ -3614,6 +3618,10 @@ static void test__strupr(void) ok(p == mem, "_strupr returned %p\n", p); ok(!strcmp(mem, "123"), "mem = %s\n", mem); + const_p = "ALREADY_UPPERCASE"; + p = _strupr((char *)const_p); + ok(p == const_p, "_strupr returned %p\n", p); + if(!setlocale(LC_ALL, "english")) { VirtualFree(mem, sizeof(str), MEM_RELEASE); win_skip("English locale _strupr tests\n");
1
0
0
0
Alexandre Julliard : user32: Forward string calls to kernelbase.
by Alexandre Julliard
04 Dec '19
04 Dec '19
Module: wine Branch: master Commit: aa827393311987319998a5dc1860e4696d495114 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa827393311987319998a5dc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 3 08:53:44 2019 +0100 user32: Forward string calls to kernelbase. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/Makefile.in | 2 +- dlls/user32/lstr.c | 321 ------------------------------------------------ dlls/user32/resource.c | 3 +- dlls/user32/user32.spec | 44 +++---- 4 files changed, 24 insertions(+), 346 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=aa827393311987319998…
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
64
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
Results per page:
10
25
50
100
200