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
January 2016
----- 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
2 participants
627 discussions
Start a n
N
ew thread
Francois Gouget : shell32/tests: Trace the last ShellExecute command whenever a corresponding test fails.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: c133ef732617a2f0faf481e4e812a62db34f8e23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c133ef732617a2f0faf481e4e…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Jan 22 18:01:55 2016 +0100 shell32/tests: Trace the last ShellExecute command whenever a corresponding test fails. okShell() serves to encapsulate handling of shell_call and also provides a means for further extensions. Remove the shell_call static initialization to not hide potential use-before-assignment compiler warnings. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shlexec.c | 85 +++++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index a1e797c..7225631 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -93,7 +93,29 @@ static void strcat_param(char* str, const char* name, const char* param) static int _todo_wait = 0; #define todo_wait for (_todo_wait = 1; _todo_wait; _todo_wait = 0) -static char shell_call[2048]=""; +static char shell_call[2048]; +static int shell_call_traced; +static void WINETEST_PRINTF_ATTR(2,3) _okShell(int condition, const char *msg, ...) +{ + va_list valist; + + /* Note: if winetest_debug > 1 the ShellExecute() command has already been + * traced. + */ + if (!condition && winetest_debug <= 1 && !shell_call_traced) + { + printf("Called %s\n", shell_call); + shell_call_traced=1; + } + + va_start(valist, msg); + winetest_vok(condition, msg, valist); + va_end(valist); +} +#define okShell_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : _okShell +#define okShell okShell_(__FILE__, __LINE__) + + static int bad_shellexecute = 0; static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR filename, LPCSTR parameters, LPCSTR directory) { @@ -102,6 +124,7 @@ static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR fi if(!verb) rcEmpty = shell_execute_(file, line, "", filename, parameters, directory); + shell_call_traced=0; strcpy(shell_call, "ShellExecute("); strcat_param(shell_call, "verb", verb); strcat_param(shell_call, "file", filename); @@ -109,7 +132,10 @@ static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR fi strcat_param(shell_call, "dir", directory); strcat(shell_call, ")"); if (winetest_debug > 1) + { trace_(file, line)("Called %s\n", shell_call); + shell_call_traced=1; + } DeleteFileA(child_file); SetLastError(0xcafebabe); @@ -138,11 +164,11 @@ static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR fi } } if (!_todo_wait) - ok_(file, line)(wait_rc==WAIT_OBJECT_0 || rc <= 32, - "%s WaitForSingleObject returned %d\n", shell_call, wait_rc); + okShell_(file, line)(wait_rc==WAIT_OBJECT_0 || rc <= 32, + "WaitForSingleObject returned %d\n", wait_rc); else todo_wine - ok_(file, line)(wait_rc==WAIT_OBJECT_0 || rc <= 32, - "%s WaitForSingleObject returned %d\n", shell_call, wait_rc); + okShell_(file, line)(wait_rc==WAIT_OBJECT_0 || rc <= 32, + "WaitForSingleObject returned %d\n", wait_rc); } /* The child process may have changed the result file, so let profile * functions know about it @@ -155,8 +181,9 @@ static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR fi { if (rc != rcEmpty && rcEmpty == SE_ERR_NOASSOC) /* NT4 */ bad_shellexecute = 1; - ok_(file, line)(rc == rcEmpty || broken(rc != rcEmpty && rcEmpty == SE_ERR_NOASSOC) /* NT4 */, - "%s Got different return value with empty string: %lu %lu\n", shell_call, rc, rcEmpty); + okShell_(file, line)(rc == rcEmpty || + broken(rc != rcEmpty && rcEmpty == SE_ERR_NOASSOC) /* NT4 */, + "Got different return value with empty string: %lu %lu\n", rc, rcEmpty); } return rc; @@ -177,6 +204,7 @@ static INT_PTR shell_execute_ex_(const char* file, int line, /* Add some flags so we can wait for the child process */ mask |= SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE; + shell_call_traced=0; strcpy(shell_call, "ShellExecuteEx("); sprintf(smask, "0x%x", mask); strcat_param(shell_call, "mask", smask); @@ -187,7 +215,10 @@ static INT_PTR shell_execute_ex_(const char* file, int line, strcat_param(shell_call, "class", class); strcat(shell_call, ")"); if (winetest_debug > 1) + { trace_(file, line)("Called %s\n", shell_call); + shell_call_traced=1; + } sei.cbSize=sizeof(sei); sei.fMask=mask; @@ -209,8 +240,9 @@ static INT_PTR shell_execute_ex_(const char* file, int line, SetLastError(0xcafebabe); success=ShellExecuteExA(&sei); rc=(INT_PTR)sei.hInstApp; - ok_(file, line)((success && rc > 32) || (!success && rc <= 32), - "%s rc=%d and hInstApp=%ld is not allowed\n", shell_call, success, rc); + okShell_(file, line)((success && rc > 32) || (!success && rc <= 32), + "rc=%d and hInstApp=%ld is not allowed\n", + success, rc); if (rc > 32) { @@ -218,16 +250,21 @@ static INT_PTR shell_execute_ex_(const char* file, int line, if (sei.hProcess!=NULL) { wait_rc=WaitForSingleObject(sei.hProcess, 5000); - ok_(file, line)(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject(hProcess) returned %d\n", wait_rc); + okShell_(file, line)(wait_rc==WAIT_OBJECT_0, + "WaitForSingleObject(hProcess) returned %d\n", + wait_rc); } wait_rc=WaitForSingleObject(hEvent, 5000); if (!_todo_wait) - ok_(file, line)(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait_rc); + okShell_(file, line)(wait_rc==WAIT_OBJECT_0, + "WaitForSingleObject returned %d\n", wait_rc); else todo_wine - ok_(file, line)(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait_rc); + okShell_(file, line)(wait_rc==WAIT_OBJECT_0, + "WaitForSingleObject returned %d\n", wait_rc); } else - ok_(file, line)(sei.hProcess==NULL, "%s returned a process handle %p\n", shell_call, sei.hProcess); + okShell_(file, line)(sei.hProcess==NULL, + "returned a process handle %p\n", sei.hProcess); /* The child process may have changed the result file, so let profile * functions know about it @@ -731,12 +768,12 @@ static void _okChildString(const char* file, int line, const char* key, const ch result=getChildString("Arguments", key); if (!result) { - ok_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); + okShell_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); return; } - ok_(file, line)(lstrcmpiA(result, expected) == 0 || - broken(lstrcmpiA(result, bad) == 0), - "%s expected '%s', got '%s'\n", key, expected, result); + okShell_(file, line)(lstrcmpiA(result, expected) == 0 || + broken(lstrcmpiA(result, bad) == 0), + "%s expected '%s', got '%s'\n", key, expected, result); } static void _okChildPath(const char* file, int line, const char* key, const char* expected) @@ -745,27 +782,27 @@ static void _okChildPath(const char* file, int line, const char* key, const char result=getChildString("Arguments", key); if (!result) { - ok_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); + okShell_(file,line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); return; } - ok_(file, line)(StrCmpPath(result, expected) == 0, - "%s expected '%s', got '%s'\n", key, expected, result); + okShell_(file,line)(StrCmpPath(result, expected) == 0, + "%s expected '%s', got '%s'\n", key, expected, result); } static void _okChildInt(const char* file, int line, const char* key, int expected) { INT result; result=GetPrivateProfileIntA("Arguments", key, expected, child_file); - ok_(file, line)(result == expected, - "%s expected %d, but got %d\n", key, expected, result); + okShell_(file,line)(result == expected, + "%s expected %d, but got %d\n", key, expected, result); } static void _okChildIntBroken(const char* file, int line, const char* key, int expected) { INT result; result=GetPrivateProfileIntA("Arguments", key, expected, child_file); - ok_(file, line)(result == expected || broken(result != expected), - "%s expected %d, but got %d\n", key, expected, result); + okShell_(file,line)(result == expected || broken(result != expected), + "%s expected %d, but got %d\n", key, expected, result); } #define okChildString(key, expected) _okChildString(__FILE__, __LINE__, (key), (expected), (expected))
1
0
0
0
Nikolay Sivov : dwrite: Implement DetermineMinWidth() using line breaking info.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: f27b99ec2f4a7cade70e51a5a3e0193ff7499d4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f27b99ec2f4a7cade70e51a5a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 26 15:44:48 2016 +0300 dwrite: Implement DetermineMinWidth() using line breaking info. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 51 +++++++++++++++++++++++----------------------- dlls/dwrite/tests/layout.c | 42 +++++++++++++++++++++++++++++++++----- 2 files changed, 62 insertions(+), 31 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index da08b39..0300166 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3229,23 +3229,12 @@ static HRESULT WINAPI dwritetextlayout_GetClusterMetrics(IDWriteTextLayout2 *ifa return max_count >= This->cluster_count ? S_OK : E_NOT_SUFFICIENT_BUFFER; } -/* Only to be used with DetermineMinWidth() to find the longest cluster sequence that we don't want to try - too hard to break. */ -static inline BOOL is_terminal_cluster(struct dwrite_textlayout *layout, UINT32 index) -{ - if (layout->clustermetrics[index].isWhitespace || layout->clustermetrics[index].isNewline || - (index == layout->cluster_count - 1)) - return TRUE; - /* check next one */ - return (index < layout->cluster_count - 1) && layout->clustermetrics[index+1].isWhitespace; -} - static HRESULT WINAPI dwritetextlayout_DetermineMinWidth(IDWriteTextLayout2 *iface, FLOAT* min_width) { struct dwrite_textlayout *This = impl_from_IDWriteTextLayout2(iface); + UINT32 start; FLOAT width; HRESULT hr; - UINT32 i; TRACE("(%p)->(%p)\n", This, min_width); @@ -3260,20 +3249,30 @@ static HRESULT WINAPI dwritetextlayout_DetermineMinWidth(IDWriteTextLayout2 *ifa if (FAILED(hr)) return hr; - for (i = 0; i < This->cluster_count;) { - if (is_terminal_cluster(This, i)) { - width = This->clustermetrics[i].width; - i++; - } - else { - width = 0.0f; - while (!is_terminal_cluster(This, i)) { - width += This->clustermetrics[i].width; - i++; - } - /* count last one too */ - width += This->clustermetrics[i].width; - } + /* Find widest word without emergency breaking between clusters, trailing whitespaces + preceding breaking point do not contribute to word width. */ + for (start = 0; start < This->cluster_count;) { + UINT32 end = start, j, next; + + /* Last cluster always could be wrapped after. */ + while (!This->clustermetrics[end].canWrapLineAfter) + end++; + /* make is so current cluster range that we can wrap after is [start,end) */ + end++; + + next = end; + + /* Ignore trailing whitespace clusters, in case of single space range will + be reduced to empty range, or [start,start+1). */ + while ((end - 1) >= start && This->clustermetrics[end-1].isWhitespace) + end--; + + /* check if cluster range exceeds last minimal width */ + width = 0.0f; + for (j = start; j < end; j++) + width += This->clustermetrics[j].width; + + start = next; if (width > This->minwidth) This->minwidth = width; diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index c04e73a..7d83c1a 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -2347,10 +2347,21 @@ if (hr == S_OK) { static void test_DetermineMinWidth(void) { + struct minwidth_test { + const WCHAR text[10]; /* text to create a layout for */ + const WCHAR mintext[10]; /* text that represents sequence of minimal width */ + } minwidth_tests[] = { + { {' ','a','b',' ',0}, {'a','b',0} }, + { {'a','\n',' ',' ',0}, {'a',0} }, + { {'a','\n',' ',' ','b',0}, {'b',0} }, + { {'a','b','c','\n',' ',' ','b',0}, {'a','b','c',0} }, + }; static const WCHAR strW[] = {'a','b','c','d',0}; + DWRITE_CLUSTER_METRICS metrics[10]; IDWriteTextFormat *format; IDWriteTextLayout *layout; IDWriteFactory *factory; + UINT32 count, i, j; FLOAT minwidth; HRESULT hr; @@ -2365,13 +2376,34 @@ static void test_DetermineMinWidth(void) hr = IDWriteTextLayout_DetermineMinWidth(layout, NULL); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + IDWriteTextLayout_Release(layout); - minwidth = 0.0; - hr = IDWriteTextLayout_DetermineMinWidth(layout, &minwidth); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(minwidth > 0.0, "got %.2f\n", minwidth); + for (i = 0; i < sizeof(minwidth_tests)/sizeof(minwidth_tests[0]); i++) { + FLOAT width = 0.0f; + + /* measure expected width */ + hr = IDWriteFactory_CreateTextLayout(factory, minwidth_tests[i].mintext, lstrlenW(minwidth_tests[i].mintext), format, 1000.0f, 1000.0f, &layout); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, sizeof(metrics)/sizeof(metrics[0]), &count); + ok(hr == S_OK, "got 0x%08x\n", hr); + + for (j = 0; j < count; j++) + width += metrics[j].width; + + IDWriteTextLayout_Release(layout); + + hr = IDWriteFactory_CreateTextLayout(factory, minwidth_tests[i].text, lstrlenW(minwidth_tests[i].text), format, 1000.0f, 1000.0f, &layout); + ok(hr == S_OK, "got 0x%08x\n", hr); + + minwidth = 0.0f; + hr = IDWriteTextLayout_DetermineMinWidth(layout, &minwidth); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(minwidth == width, "test %u: expected width %f, got %f\n", i, width, minwidth); + + IDWriteTextLayout_Release(layout); + } - IDWriteTextLayout_Release(layout); IDWriteTextFormat_Release(format); IDWriteFactory_Release(factory); }
1
0
0
0
Nikolay Sivov : dwrite: Fix setting canWrapLineAfter cluster flag.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: 2975ae9cbf6d07988da686f99f03b26fbd9bb925 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2975ae9cbf6d07988da686f99…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 26 15:44:47 2016 +0300 dwrite: Fix setting canWrapLineAfter cluster flag. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 6 +++--- dlls/dwrite/tests/layout.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 27b02dc..da08b39 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -603,10 +603,10 @@ static inline void init_cluster_metrics(const struct dwrite_textlayout *layout, position = run->descr.textPosition + stop_position; if (stop_glyph == run->glyphcount) - breakcondition = get_effective_breakpoint(layout, stop_position).breakConditionAfter; + breakcondition = get_effective_breakpoint(layout, position).breakConditionAfter; else { - breakcondition = get_effective_breakpoint(layout, stop_position).breakConditionBefore; - if (stop_position) position = stop_position - 1; + breakcondition = get_effective_breakpoint(layout, position).breakConditionBefore; + if (stop_position) position -= 1; } metrics->canWrapLineAfter = breakcondition == DWRITE_BREAK_CONDITION_CAN_BREAK || diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index 00da357..c04e73a 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -1907,6 +1907,7 @@ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); ok(count == 2, "got %u\n", count); ok(metrics[0].isWhitespace == 0, "got %d\n", metrics[0].isWhitespace); + ok(metrics[0].canWrapLineAfter == 0, "got %d\n", metrics[0].canWrapLineAfter); ok(metrics[1].isWhitespace == 1, "got %d\n", metrics[1].isWhitespace); ok(metrics[1].canWrapLineAfter == 1, "got %d\n", metrics[1].canWrapLineAfter); IDWriteTextLayout_Release(layout); @@ -1990,6 +1991,10 @@ todo_wine { for (i = 0; i < count; i++) { ok(metrics[i].length == 1, "%d: got %d\n", i, metrics[i].length); ok(metrics[i].isSoftHyphen == (i == count - 1), "%d: got %d\n", i, metrics[i].isSoftHyphen); + if (metrics[i].isNewline) { + ok(metrics[i].width == 0.0f, "%u: got width %f\n", i, metrics[i].width); + ok(metrics[i].canWrapLineAfter == 1, "%u: got %d\n", i, metrics[i].canWrapLineAfter); + } } IDWriteTextLayout_Release(layout);
1
0
0
0
Nikolay Sivov : dwrite: Reuse linebreaking isSoftHyphen flag for cluster metrics.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: d171185062e89ecfb9ffb01f545ae12a37694d53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d171185062e89ecfb9ffb01f5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 26 15:44:46 2016 +0300 dwrite: Reuse linebreaking isSoftHyphen flag for cluster metrics. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/analyzer.c | 2 +- dlls/dwrite/layout.c | 5 +++-- dlls/dwrite/tests/analyzer.c | 18 ++++++++++++++++++ dlls/dwrite/tests/layout.c | 14 ++++++++------ 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 885cd76..2eb495e 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -348,7 +348,7 @@ static HRESULT analyze_linebreaks(const WCHAR *text, UINT32 count, DWRITE_LINE_B breakpoints[i].breakConditionBefore = DWRITE_BREAK_CONDITION_CAN_BREAK; breakpoints[i].breakConditionAfter = DWRITE_BREAK_CONDITION_CAN_BREAK; breakpoints[i].isWhitespace = !!isspaceW(text[i]); - breakpoints[i].isSoftHyphen = FALSE; + breakpoints[i].isSoftHyphen = text[i] == 0x00ad /* Unicode Soft Hyphen */; breakpoints[i].padding = 0; /* LB1 - resolve some classes. TODO: use external algorithms for these classes. */ diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 241616b..27b02dc 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -612,9 +612,10 @@ static inline void init_cluster_metrics(const struct dwrite_textlayout *layout, metrics->canWrapLineAfter = breakcondition == DWRITE_BREAK_CONDITION_CAN_BREAK || breakcondition == DWRITE_BREAK_CONDITION_MUST_BREAK; if (metrics->length == 1) { - metrics->isWhitespace = get_effective_breakpoint(layout, position).isWhitespace; + DWRITE_LINE_BREAKPOINT bp = get_effective_breakpoint(layout, position); + metrics->isWhitespace = bp.isWhitespace; metrics->isNewline = FALSE /* FIXME */; - metrics->isSoftHyphen = layout->str[position] == 0x00ad /* Unicode Soft Hyphen */; + metrics->isSoftHyphen = bp.isSoftHyphen; } else { metrics->isWhitespace = FALSE; diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c index 1519289..fa0d7eb 100644 --- a/dlls/dwrite/tests/analyzer.c +++ b/dlls/dwrite/tests/analyzer.c @@ -988,6 +988,24 @@ static struct linebreaks_test linebreaks_tests[] = { { DWRITE_BREAK_CONDITION_MUST_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, } }, + /* Soft hyphen, visible word dividers */ + { {'A',0xad,'B',0x5be,'C',0xf0b,'D',0x1361,'E',0x17d8,'F',0x17da,'G',0}, + { + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 1 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + } + }, { { 0 } } }; diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index f036633..00da357 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -1666,13 +1666,13 @@ static void test_GetClusterMetrics(void) /* SP - SPACE */ 0x20 }; static const WCHAR str5W[] = {'a','\r','b','\n','c','\n','\r','d','\r','\n','e',0xb,'f',0xc, - 'g',0x0085,'h',0x2028,'i',0x2029,0}; + 'g',0x0085,'h',0x2028,'i',0x2029,0xad,0}; static const WCHAR str3W[] = {0x2066,')',')',0x661,'(',0x627,')',0}; static const WCHAR str2W[] = {0x202a,0x202c,'a',0}; static const WCHAR strW[] = {'a','b','c','d',0}; static const WCHAR str4W[] = {'a',' ',0}; DWRITE_INLINE_OBJECT_METRICS inline_metrics; - DWRITE_CLUSTER_METRICS metrics[20]; + DWRITE_CLUSTER_METRICS metrics[21]; IDWriteTextLayout1 *layout1; IDWriteInlineObject *trimm; IDWriteTextFormat *format; @@ -1955,14 +1955,14 @@ todo_wine IDWriteTextLayout_Release(layout); /* isNewline tests */ - hr = IDWriteFactory_CreateTextLayout(factory, str5W, 20, format, 100.0, 200.0, &layout); + hr = IDWriteFactory_CreateTextLayout(factory, str5W, lstrlenW(str5W), format, 100.0f, 200.0f, &layout); ok(hr == S_OK, "got 0x%08x\n", hr); count = 0; memset(metrics, 0, sizeof(metrics)); - hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 20, &count); + hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, sizeof(metrics)/sizeof(metrics[0]), &count); ok(hr == S_OK, "got 0x%08x\n", hr); - ok(count == 20, "got %u\n", count); + ok(count == 21, "got %u\n", count); todo_wine { ok(metrics[1].isNewline == 1, "got %d\n", metrics[1].isNewline); @@ -1987,8 +1987,10 @@ todo_wine { ok(metrics[16].isNewline == 0, "got %d\n", metrics[16].isNewline); ok(metrics[18].isNewline == 0, "got %d\n", metrics[18].isNewline); - for (i = 0; i < count; i++) + for (i = 0; i < count; i++) { ok(metrics[i].length == 1, "%d: got %d\n", i, metrics[i].length); + ok(metrics[i].isSoftHyphen == (i == count - 1), "%d: got %d\n", i, metrics[i].isSoftHyphen); + } IDWriteTextLayout_Release(layout);
1
0
0
0
Nikolay Sivov : dwrite: Reuse linebreaking whitespace flag when filling cluster metrics.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: 00766538c57e62549c4fbdce6b3c99a2d4791658 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00766538c57e62549c4fbdce6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 26 15:44:45 2016 +0300 dwrite: Reuse linebreaking whitespace flag when filling cluster metrics. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index b6f4a65..241616b 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -612,10 +612,7 @@ static inline void init_cluster_metrics(const struct dwrite_textlayout *layout, metrics->canWrapLineAfter = breakcondition == DWRITE_BREAK_CONDITION_CAN_BREAK || breakcondition == DWRITE_BREAK_CONDITION_MUST_BREAK; if (metrics->length == 1) { - WORD type = 0; - - GetStringTypeW(CT_CTYPE1, &layout->str[position], 1, &type); - metrics->isWhitespace = !!(type & C1_SPACE); + metrics->isWhitespace = get_effective_breakpoint(layout, position).isWhitespace; metrics->isNewline = FALSE /* FIXME */; metrics->isSoftHyphen = layout->str[position] == 0x00ad /* Unicode Soft Hyphen */; }
1
0
0
0
Nikolay Sivov : dwrite: Zero width space U+200b is not a whitespace from analyzer/ layout point of view.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: 0b7f857845229aefa582f1cc1c67c84eb49ec39e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b7f857845229aefa582f1cc1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 26 15:44:44 2016 +0300 dwrite: Zero width space U+200b is not a whitespace from analyzer/layout point of view. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/analyzer.c | 2 +- dlls/dwrite/tests/analyzer.c | 66 ++++++++++++++++++++++++++++---------------- dlls/dwrite/tests/layout.c | 23 +++++++++++++++ 3 files changed, 66 insertions(+), 25 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 094fb69..885cd76 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -347,7 +347,7 @@ static HRESULT analyze_linebreaks(const WCHAR *text, UINT32 count, DWRITE_LINE_B breakpoints[i].breakConditionBefore = DWRITE_BREAK_CONDITION_CAN_BREAK; breakpoints[i].breakConditionAfter = DWRITE_BREAK_CONDITION_CAN_BREAK; - breakpoints[i].isWhitespace = break_class[i] == b_BK || break_class[i] == b_ZW || break_class[i] == b_SP || isspaceW(text[i]); + breakpoints[i].isWhitespace = !!isspaceW(text[i]); breakpoints[i].isSoftHyphen = FALSE; breakpoints[i].padding = 0; diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c index cee9934..1519289 100644 --- a/dlls/dwrite/tests/analyzer.c +++ b/dlls/dwrite/tests/analyzer.c @@ -966,21 +966,26 @@ struct linebreaks_test { }; static struct linebreaks_test linebreaks_tests[] = { - { {'A','-','B',' ','C',0x58a,'D',0x2010,'E',0x2012,'F',0x2013,'\t',0}, + { {'A','-','B',' ','C',0x58a,'D',0x2010,'E',0x2012,'F',0x2013,'\t',0xc,0xb,0x2028,0x2029,0x200b,0}, { - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, TRUE, FALSE }, - { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, FALSE, FALSE }, - { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, TRUE, FALSE } + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 1, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_CAN_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 0, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, 1, 0 }, + { DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, DWRITE_BREAK_CONDITION_MUST_BREAK, 1, 0 }, + { DWRITE_BREAK_CONDITION_MUST_BREAK, DWRITE_BREAK_CONDITION_MUST_BREAK, 1, 0 }, + { DWRITE_BREAK_CONDITION_MUST_BREAK, DWRITE_BREAK_CONDITION_MUST_BREAK, 1, 0 }, + { DWRITE_BREAK_CONDITION_MUST_BREAK, DWRITE_BREAK_CONDITION_MUST_BREAK, 1, 0 }, + { DWRITE_BREAK_CONDITION_MUST_BREAK, DWRITE_BREAK_CONDITION_CAN_BREAK, 0, 0 }, } }, { { 0 } } @@ -988,6 +993,7 @@ static struct linebreaks_test linebreaks_tests[] = { static void compare_breakpoints(const struct linebreaks_test *test, DWRITE_LINE_BREAKPOINT *actual) { + static const char *conditions[] = {"N","CB","NB","B"}; const WCHAR *text = test->text; int cmp = memcmp(test->bp, actual, sizeof(*actual)*BREAKPOINT_COUNT); ok(!cmp, "%s: got wrong breakpoint data\n", wine_dbgstr_w(test->text)); @@ -995,16 +1001,16 @@ static void compare_breakpoints(const struct linebreaks_test *test, DWRITE_LINE_ int i = 0; while (*text) { ok(!memcmp(&test->bp[i], &actual[i], sizeof(*actual)), - "%s: got (%d, %d, %d, %d), expected (%d, %d, %d, %d)\n", + "%s: got [%s, %s] (%s, %s), expected [%s, %s] (%s, %s)\n", wine_dbgstr_wn(&test->text[i], 1), - g_actual_bp[i].breakConditionBefore, - g_actual_bp[i].breakConditionAfter, - g_actual_bp[i].isWhitespace, - g_actual_bp[i].isSoftHyphen, - test->bp[i].breakConditionBefore, - test->bp[i].breakConditionAfter, - test->bp[i].isWhitespace, - test->bp[i].isSoftHyphen); + conditions[g_actual_bp[i].breakConditionBefore], + conditions[g_actual_bp[i].breakConditionAfter], + g_actual_bp[i].isWhitespace ? "WS" : "0", + g_actual_bp[i].isSoftHyphen ? "SHY" : "0", + conditions[test->bp[i].breakConditionBefore], + conditions[test->bp[i].breakConditionAfter], + test->bp[i].isWhitespace ? "WS" : "0", + test->bp[i].isSoftHyphen ? "SHY" : "0"); text++; i++; } @@ -1016,6 +1022,7 @@ static void test_AnalyzeLineBreakpoints(void) static const WCHAR emptyW[] = {0}; const struct linebreaks_test *ptr = linebreaks_tests; IDWriteTextAnalyzer *analyzer; + UINT32 i = 0; HRESULT hr; hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); @@ -1027,13 +1034,24 @@ static void test_AnalyzeLineBreakpoints(void) while (*ptr->text) { + UINT32 len; + g_source = ptr->text; + len = lstrlenW(g_source); + + if (len > BREAKPOINT_COUNT) { + ok(0, "test %u: increase BREAKPOINT_COUNT to at least %u\n", i, len); + i++; + ptr++; + continue; + } memset(g_actual_bp, 0, sizeof(g_actual_bp)); - hr = IDWriteTextAnalyzer_AnalyzeLineBreakpoints(analyzer, &analysissource, 0, lstrlenW(g_source), &analysissink); + hr = IDWriteTextAnalyzer_AnalyzeLineBreakpoints(analyzer, &analysissource, 0, len, &analysissink); ok(hr == S_OK, "got 0x%08x\n", hr); compare_breakpoints(ptr, g_actual_bp); + i++; ptr++; } diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index cbc222f..f036633 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -1660,6 +1660,11 @@ static void test_typography(void) static void test_GetClusterMetrics(void) { + static const WCHAR str_white_spaceW[] = { + /* BK - FORM FEED, LINE TABULATION, LINE SEP, PARA SEP */ 0xc, 0xb, 0x2028, 0x2029, + /* ZW - ZERO WIDTH SPACE */ 0x200b, + /* SP - SPACE */ 0x20 + }; static const WCHAR str5W[] = {'a','\r','b','\n','c','\n','\r','d','\r','\n','e',0xb,'f',0xc, 'g',0x0085,'h',0x2028,'i',0x2029,0}; static const WCHAR str3W[] = {0x2066,')',')',0x661,'(',0x627,')',0}; @@ -1987,6 +1992,24 @@ todo_wine { IDWriteTextLayout_Release(layout); + /* Test whitespace resolution from linebreaking classes BK, ZW, and SP */ + hr = IDWriteFactory_CreateTextLayout(factory, str_white_spaceW, sizeof(str_white_spaceW)/sizeof(WCHAR), format, + 100.0f, 200.0f, &layout); + ok(hr == S_OK, "got 0x%08x\n", hr); + + count = 0; + memset(metrics, 0, sizeof(metrics)); + hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 20, &count); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(count == 6, "got %u\n", count); + + ok(metrics[0].isWhitespace == 1, "got %d\n", metrics[0].isWhitespace); + ok(metrics[1].isWhitespace == 1, "got %d\n", metrics[1].isWhitespace); + ok(metrics[2].isWhitespace == 1, "got %d\n", metrics[2].isWhitespace); + ok(metrics[3].isWhitespace == 1, "got %d\n", metrics[3].isWhitespace); + ok(metrics[4].isWhitespace == 0, "got %d\n", metrics[4].isWhitespace); + ok(metrics[5].isWhitespace == 1, "got %d\n", metrics[5].isWhitespace); + IDWriteInlineObject_Release(trimm); IDWriteTextFormat_Release(format); IDWriteFactory_Release(factory);
1
0
0
0
Nikolay Sivov : po: Update Russian translation.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: 36917d884417f996fe5670f791181bb0eb21a8fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36917d884417f996fe5670f79…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 26 15:31:49 2016 +0300 po: Update Russian translation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ru.po | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/po/ru.po b/po/ru.po index f47c8fd..9367c41 100644 --- a/po/ru.po +++ b/po/ru.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
http://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2015-12-23 01:22+0300\n" +"PO-Revision-Date: 2016-01-26 15:30+0300\n" "Last-Translator: Nikolay Sivov <nsivov(a)codeweavers.com>\n" "Language-Team: Russian\n" "Language: ru\n" @@ -13041,8 +13041,6 @@ msgstr "" "приложения, так и глобально." #: winecfg.rc:159 -#, fuzzy -#| msgid "&Add application..." msgid "Add appli&cation..." msgstr "&Добавить приложение..." @@ -13105,7 +13103,7 @@ msgstr "Новое замещение для библиотеки:" #: winecfg.rc:196 msgid "A&dd" -msgstr "" +msgstr "&Добавить" #: winecfg.rc:197 msgid "Existing &overrides:" @@ -13129,17 +13127,15 @@ msgstr "&Встроенная (Wine)" #: winecfg.rc:210 msgid "&Native (Windows)" -msgstr "С&торонняя (Windows)" +msgstr "&Сторонняя (Windows)" #: winecfg.rc:211 -#, fuzzy -#| msgid "Bui<in then Native" msgid "Buil&tin then Native" -msgstr "В&строенная, затем сторонняя" +msgstr "Вс&троенная, затем сторонняя" #: winecfg.rc:212 msgid "Nati&ve then Builtin" -msgstr "Ст&оронняя, затем встроенная" +msgstr "Сто&ронняя, затем встроенная" #: winecfg.rc:220 msgid "Select Drive Letter" @@ -13158,26 +13154,20 @@ msgstr "" "редактироваться." #: winecfg.rc:236 -#, fuzzy -#| msgid "&Add..." msgid "A&dd..." msgstr "&Добавить..." #: winecfg.rc:238 -#, fuzzy -#| msgid "Autodetect" msgid "Aut&odetect" -msgstr "Автоопределение" +msgstr "&Автоопределение" #: winecfg.rc:241 msgid "&Path:" msgstr "&Путь:" #: winecfg.rc:248 winecfg.rc:38 -#, fuzzy -#| msgid "Show &Advanced" msgid "Show Advan&ced" -msgstr "&Дополнительно" +msgstr "До&полнительно" #: winecfg.rc:249 msgid "De&vice:" @@ -13196,10 +13186,8 @@ msgid "S&erial:" msgstr "Сер. &номер:" #: winecfg.rc:258 -#, fuzzy -#| msgid "Show &dot files" msgid "&Show dot files" -msgstr "Показывать файлы, начинающиеся с точки" +msgstr "Показывать файлы, начинающиеся с &точки" #: winecfg.rc:265 msgid "Driver diagnostics" @@ -13278,10 +13266,8 @@ msgid "Select the Unix target directory, please." msgstr "Выберите целевой каталог в системе." #: winecfg.rc:37 -#, fuzzy -#| msgid "Hide &Advanced" msgid "Hide Advan&ced" -msgstr "Скрыть дополнительные" +msgstr "&Скрыть доп. настройки" #: winecfg.rc:39 msgid "(No Theme)"
1
0
0
0
Hans Leidekker : msi: Include the dialog in the check for duplicate event subscriptions.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: 8fe7ee31a1cb4665068a94ea108716e4df6a4402 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fe7ee31a1cb4665068a94ea1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 26 11:16:05 2016 +0100 msi: Include the dialog in the check for duplicate event subscriptions. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/dialog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 245bfdc..b0f0e5d 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -704,11 +704,13 @@ static void event_subscribe( msi_dialog *dialog, const WCHAR *event, const WCHAR { struct subscriber *sub; - TRACE("event %s control %s attribute %s\n", debugstr_w(event), debugstr_w(control), debugstr_w(attribute)); + TRACE("dialog %s event %s control %s attribute %s\n", debugstr_w(dialog->name), debugstr_w(event), + debugstr_w(control), debugstr_w(attribute)); LIST_FOR_EACH_ENTRY( sub, &dialog->package->subscriptions, struct subscriber, entry ) { - if (!strcmpiW( sub->event, event ) && + if (sub->dialog == dialog && + !strcmpiW( sub->event, event ) && !strcmpiW( sub->control, control ) && !strcmpiW( sub->attribute, attribute )) {
1
0
0
0
Hans Leidekker : wininet/tests: Fix test failures.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: 05eae360d750d6102d2ff5e4a5e3b809ae3fced6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05eae360d750d6102d2ff5e4a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 26 11:14:31 2016 +0100 wininet/tests: Fix test failures. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wininet/tests/http.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 5db930b..ee347f9 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -5809,15 +5809,33 @@ static void init_status_tests(void) static void WINAPI header_cb( HINTERNET handle, DWORD_PTR ctx, DWORD status, LPVOID info, DWORD len ) { - if (status == INTERNET_STATUS_REQUEST_COMPLETE) SetEvent( (HANDLE)ctx ); + BOOL ret; + DWORD index, size; + char buf[256]; + + if (status == INTERNET_STATUS_SENDING_REQUEST) + { + ret = HttpAddRequestHeadersA( handle, "winetest: winetest", ~0u, HTTP_ADDREQ_FLAG_ADD ); + ok( ret, "HttpAddRequestHeadersA failed %u\n", GetLastError() ); + SetEvent( (HANDLE)ctx ); + } + else if (status == INTERNET_STATUS_REQUEST_SENT) + { + index = 0; + size = sizeof(buf); + ret = HttpQueryInfoA( handle, HTTP_QUERY_RAW_HEADERS_CRLF|HTTP_QUERY_FLAG_REQUEST_HEADERS, + buf, &size, &index ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( strstr( buf, "winetest: winetest" ) != NULL, "header missing\n" ); + SetEvent( (HANDLE)ctx ); + } } static void test_concurrent_header_access(void) { HINTERNET ses, con, req; - DWORD index, len, err; + DWORD err; BOOL ret; - char buf[128]; HANDLE wait = CreateEventW( NULL, FALSE, FALSE, NULL ); ses = InternetOpenA( "winetest", 0, NULL, NULL, INTERNET_FLAG_ASYNC ); @@ -5838,16 +5856,7 @@ static void test_concurrent_header_access(void) ok( !ret, "HttpSendRequestA succeeded\n" ); ok( err == ERROR_IO_PENDING, "got %u\n", ERROR_IO_PENDING ); - ret = HttpAddRequestHeadersA( req, "winetest: winetest", ~0u, HTTP_ADDREQ_FLAG_ADD ); - ok( ret, "HttpAddRequestHeadersA failed %u\n", GetLastError() ); - - index = 0; - len = sizeof(buf); - ret = HttpQueryInfoA( req, HTTP_QUERY_RAW_HEADERS_CRLF|HTTP_QUERY_FLAG_REQUEST_HEADERS, - buf, &len, &index ); - ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); - ok( strstr( buf, "winetest: winetest" ) != NULL, "header missing\n" ); - + WaitForSingleObject( wait, 5000 ); WaitForSingleObject( wait, 5000 ); InternetCloseHandle( req );
1
0
0
0
Huw Davies : bcrypt/tests: Fix incorrect null termination.
by Alexandre Julliard
26 Jan '16
26 Jan '16
Module: wine Branch: master Commit: b2e902b84063ba1aa0c6cad3079a438097b596fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b2e902b84063ba1aa0c6cad30…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jan 26 09:30:02 2016 +0000 bcrypt/tests: Fix incorrect null termination. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/bcrypt/tests/bcrypt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c index edf478c..5435d4b 100644 --- a/dlls/bcrypt/tests/bcrypt.c +++ b/dlls/bcrypt/tests/bcrypt.c @@ -68,15 +68,15 @@ static void test_BCryptGetFipsAlgorithmMode(void) ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got 0x%x\n", ret); } -static const char *format_hash(const UCHAR *bytes, ULONG size, char *buf) +static void format_hash(const UCHAR *bytes, ULONG size, char *buf) { ULONG i; + buf[0] = '\0'; for (i = 0; i < size; i++) { - buf += sprintf(buf, "%02x", bytes[i]); + sprintf(buf + i * 2, "%02x", bytes[i]); } - buf[i * 2] = 0; - return buf; + return; } static void test_sha1(void)
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
63
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
Results per page:
10
25
50
100
200