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
September 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
2 participants
629 discussions
Start a n
N
ew thread
Francois Gouget : tests: Add support for subtests.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 033196641b0c33c1047234cdb278f6630f226681 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=033196641b0c33c1047234cd…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Aug 27 04:14:29 2019 +0200 tests: Add support for subtests. Some Wine tests run code compiled from another C file, resulting in traces and errors that look like they come from a different test. subtest() allows such tests to declare their subtests so they are recognized by scripts parsing the results such as the TestBot and WineTest website. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/test.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/wine/test.h b/include/wine/test.h index b5aa9c1..bfd893e 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -68,6 +68,7 @@ extern int winetest_report_success; extern const char *winetest_platform; extern void winetest_set_location( const char* file, int line ); +extern void winetest_subtest( const char* name ); extern void winetest_start_todo( int is_todo ); extern int winetest_loop_todo(void); extern void winetest_end_todo(void); @@ -123,17 +124,20 @@ extern void __winetest_cdecl winetest_win_skip( const char *msg, ... ) WINETEST_ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) WINETEST_PRINTF_ATTR(1,2); #ifdef WINETEST_NO_LINE_NUMBERS +# define subtest_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_subtest # define ok_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_ok # define skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_skip # define win_skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_win_skip # define trace_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_trace #else +# define subtest_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_subtest # define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok # define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip # define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip # define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace #endif +#define subtest subtest_(__FILE__, __LINE__) #define ok ok_(__FILE__, __LINE__) #define skip skip_(__FILE__, __LINE__) #define win_skip win_skip_(__FILE__, __LINE__) @@ -308,6 +312,13 @@ void winetest_set_location( const char* file, int line ) data->current_line=line; } +void winetest_subtest( const char* name ) +{ + struct tls_data *data = get_tls_data(); + printf( "%s:%d: Subtest %s\n", + data->current_file, data->current_line, name); +} + int broken( int condition ) { return (strcmp(winetest_platform, "windows") == 0) && condition;
1
0
0
0
Zhiyi Zhang : user32/tests: Remove an extraneous check.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: afdf14084efd09bed0dac34e0f922d79310bf922 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=afdf14084efd09bed0dac34e…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Aug 26 19:57:41 2019 +0800 user32/tests: Remove an extraneous check. Remove a check for SetFocus() return value. It's useless and SetFocus() returns NULL because there is no previous focus window, skipping following tests unintentionally. And cleanup some code. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/dialog.c | 102 +++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 63 deletions(-) diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 070ddce..b72f088 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -148,6 +148,11 @@ static const h_entry hierarchy [] = { {0, 0, 0, 0} }; +static DWORD get_button_style(HWND button) +{ + return GetWindowLongW(button, GWL_STYLE) & BS_TYPEMASK; +} + static BOOL CreateWindows (HINSTANCE hinst) { const h_entry *p = hierarchy; @@ -155,7 +160,7 @@ static BOOL CreateWindows (HINSTANCE hinst) while (p->id != 0) { DWORD style, exstyle; - char ctrlname[9]; + char ctrlname[16]; /* Basically assert that the hierarchy is valid and track the * maximum control number @@ -633,76 +638,47 @@ static void test_WM_NEXTDLGCTL(void) * BS_DEFPUSHBUTTON with out making it default. */ - /* - * Keep the focus on Edit control. - */ - - if ( SetFocus( g_hwndTestDlgEdit ) ) - { - ok ((GetFocus() == g_hwndTestDlgEdit), "Focus didn't set on Edit control\n"); + /* Keep the focus on Edit control. */ + SetFocus(g_hwndTestDlgEdit); + ok((GetFocus() == g_hwndTestDlgEdit), "Focus didn't set on Edit control\n"); - /* - * Test message WM_NEXTDLGCTL - */ - DefDlgProcA( g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0 ); - ok ((GetFocus() == g_hwndTestDlgBut1), "Focus didn't move to first button\n"); + /* Test message WM_NEXTDLGCTL */ + DefDlgProcA(g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0); + ok((GetFocus() == g_hwndTestDlgBut1), "Focus didn't move to first button\n"); - /* - * Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" - */ - dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok ( IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); - - /* - * Check whether the style of the button which got the focus, changed to BS_DEFPUSHBUTTON and - * the style of default button changed to BS_PUSHBUTTON. - */ - if ( IDCANCEL == (LOWORD(dwVal)) ) - { - ok ( ((GetWindowLongA( g_hwndTestDlgBut1, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button1 style not set to BS_DEFPUSHBUTTON\n" ); - - ok ( !((GetWindowLongA( g_hwndTestDlgBut2, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button2's style not changed to BS_PUSHBUTTON\n" ); - } + /* Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" */ + dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); + ok(IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); - /* - * Move focus to Button2 using "WM_NEXTDLGCTL" - */ - DefDlgProcA( g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0 ); - ok ((GetFocus() == g_hwndTestDlgBut2), "Focus didn't move to second button\n"); + /* + * Check whether the style of the button which got the focus, changed to BS_DEFPUSHBUTTON and + * the style of default button changed to BS_PUSHBUTTON. + */ + ok(get_button_style(g_hwndTestDlgBut1) == BS_DEFPUSHBUTTON, "Button1's style not set to BS_DEFPUSHBUTTON"); + ok(get_button_style(g_hwndTestDlgBut2) == BS_PUSHBUTTON, "Button2's style not set to BS_PUSHBUTTON"); - /* - * Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" - */ - dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok ( IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); + /* Move focus to Button2 using "WM_NEXTDLGCTL" */ + DefDlgProcA(g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0); + ok((GetFocus() == g_hwndTestDlgBut2), "Focus didn't move to second button\n"); - /* - * Check whether the style of the button which got the focus, changed to BS_DEFPUSHBUTTON and - * the style of button which lost the focus changed to BS_PUSHBUTTON. - */ - if ( IDCANCEL == (LOWORD(dwVal)) ) - { - ok ( ((GetWindowLongA( g_hwndTestDlgBut2, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button2 style not set to BS_DEFPUSHBUTTON\n" ); + /* Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" */ + dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); + ok(IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); - ok ( !((GetWindowLongA( g_hwndTestDlgBut1, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button1's style not changed to BS_PUSHBUTTON\n" ); - } + /* + * Check whether the style of the button which got the focus, changed to BS_DEFPUSHBUTTON and + * the style of button which lost the focus changed to BS_PUSHBUTTON. + */ + ok(get_button_style(g_hwndTestDlgBut1) == BS_PUSHBUTTON, "Button1's style not set to BS_PUSHBUTTON"); + ok(get_button_style(g_hwndTestDlgBut2) == BS_DEFPUSHBUTTON, "Button2's style not set to BS_DEFPUSHBUTTON"); - /* - * Move focus to Edit control using "WM_NEXTDLGCTL" - */ - DefDlgProcA( g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0 ); - ok ((GetFocus() == g_hwndTestDlgEdit), "Focus didn't move to Edit control\n"); + /* Move focus to Edit control using "WM_NEXTDLGCTL" */ + DefDlgProcA(g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0); + ok((GetFocus() == g_hwndTestDlgEdit), "Focus didn't move to Edit control\n"); - /* - * Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" - */ - dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok ( IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); - } + /* Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" */ + dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); + ok(IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); /* test nested default buttons */
1
0
0
0
Zhiyi Zhang : comctl32/taskdialog: Use BCM_GETIDEALSIZE to calculate button size.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 1527770e3af1a5599fc476ca1e60afdc847ae899 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1527770e3af1a5599fc476ca…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Aug 26 19:57:33 2019 +0800 comctl32/taskdialog: Use BCM_GETIDEALSIZE to calculate button size. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47621
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/taskdialog.c | 58 ++++++++++------------------------------------ 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index 4064fae..3d98c64 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -418,47 +418,11 @@ static void taskdialog_get_label_size(struct taskdialog_info *dialog_info, HWND Free(text); } -static void taskdialog_get_radio_button_size(struct taskdialog_info *dialog_info, HWND hwnd, LONG max_width, SIZE *size) +static void taskdialog_get_button_size(HWND hwnd, LONG max_width, SIZE *size) { - DWORD style = DT_EXPANDTABS | DT_CALCRECT | DT_WORDBREAK; - HFONT hfont, old_hfont; - HDC hdc; - RECT rect = {0}; - INT text_length; - WCHAR *text; - INT text_offset, radio_box_width, radio_box_height; - - hdc = GetDC(hwnd); - hfont = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0); - old_hfont = SelectObject(hdc, hfont); - - radio_box_width = 12 * GetDpiForWindow(hwnd) / 96 + 1; - radio_box_height = 12 * GetDpiForWindow(hwnd) / 96 + 1; - GetCharWidthW(hdc, '0', '0', &text_offset); - text_offset /= 2; - - if (dialog_info->taskconfig->dwFlags & TDF_RTL_LAYOUT) - style |= DT_RIGHT | DT_RTLREADING; - else - style |= DT_LEFT; - - rect.right = max_width - radio_box_width - text_offset; - text_length = GetWindowTextLengthW(hwnd); - text = Alloc((text_length + 1) * sizeof(WCHAR)); - if (!text) - { - size->cx = 0; - size->cy = 0; - return; - } - GetWindowTextW(hwnd, text, text_length + 1); - size->cy = DrawTextW(hdc, text, text_length, &rect, style); - size->cx = min(max_width - radio_box_width - text_offset, rect.right - rect.left); - size->cx += radio_box_width + text_offset; - size->cy = max(size->cy, radio_box_height); - if (old_hfont) SelectObject(hdc, old_hfont); - Free(text); - ReleaseDC(hwnd, hdc); + size->cx = max_width; + size->cy = 0; + SendMessageW(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)size); } static void taskdialog_get_expando_size(struct taskdialog_info *dialog_info, HWND hwnd, SIZE *size) @@ -951,7 +915,7 @@ static void taskdialog_layout(struct taskdialog_info *dialog_info) { x = main_icon_right + h_spacing; y = dialog_height + v_spacing; - taskdialog_get_radio_button_size(dialog_info, dialog_info->radio_buttons[i], dialog_width - x - h_spacing, &size); + taskdialog_get_button_size(dialog_info->radio_buttons[i], dialog_width - x - h_spacing, &size); size.cx = dialog_width - x - h_spacing; SetWindowPos(dialog_info->radio_buttons[i], 0, x, y, size.cx, size.cy, SWP_NOZORDER); dialog_height = y + size.cy; @@ -961,8 +925,11 @@ static void taskdialog_layout(struct taskdialog_info *dialog_info) for (i = 0; i < dialog_info->command_link_count; i++) { x = main_icon_right + h_spacing; - y = dialog_height + v_spacing; - taskdialog_get_label_size(dialog_info, dialog_info->command_links[i], dialog_width - x - h_spacing, &size, FALSE); + y = dialog_height; + /* Only add spacing for the first command links. There is no vertical spacing between command links */ + if (!i) + y += v_spacing; + taskdialog_get_button_size(dialog_info->command_links[i], dialog_width - x - h_spacing, &size); size.cx = dialog_width - x - h_spacing; /* Add spacing */ size.cy += 4; @@ -992,7 +959,7 @@ static void taskdialog_layout(struct taskdialog_info *dialog_info) y = expando_bottom + v_spacing; size.cx = DIALOG_MIN_WIDTH / 2; taskdialog_du_to_px(dialog_info, &size.cx, NULL); - taskdialog_get_radio_button_size(dialog_info, dialog_info->verification_box, size.cx, &size); + taskdialog_get_button_size(dialog_info->verification_box, size.cx, &size); SetWindowPos(dialog_info->verification_box, 0, x, y, size.cx, size.cy, SWP_NOZORDER); expando_right = max(expando_right, x + size.cx); expando_bottom = y + size.cy; @@ -1007,8 +974,7 @@ static void taskdialog_layout(struct taskdialog_info *dialog_info) taskdialog_du_to_px(dialog_info, &button_min_width, &button_height); for (i = 0; i < dialog_info->button_count; i++) { - taskdialog_get_label_size(dialog_info, dialog_info->buttons[i], dialog_width - expando_right - h_spacing * 2, - &size, FALSE); + taskdialog_get_button_size(dialog_info->buttons[i], dialog_width - expando_right - h_spacing * 2, &size); button_layout_infos[i].width = max(size.cx, button_min_width); }
1
0
0
0
Andrew Eikum : ntoskrnl.exe: Add -norelay flag for _vsnprintf.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 6f17f4caad2f4662c8c69e684de936bcc9ab5a0e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6f17f4caad2f4662c8c69e68…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Sep 3 09:49:00 2019 -0500 ntoskrnl.exe: Add -norelay flag for _vsnprintf. Fixes traces from services when relay logging. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index c46891d..955bd00 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -1457,7 +1457,7 @@ @ cdecl _strrev(str) @ cdecl _strset(str long) @ cdecl _strupr(str) -@ cdecl _vsnprintf(ptr long str ptr) +@ cdecl -norelay _vsnprintf(ptr long str ptr) @ cdecl _vsnwprintf(ptr long wstr ptr) @ cdecl _wcsicmp(wstr wstr) @ cdecl _wcslwr(wstr)
1
0
0
0
Francois Gouget : libwine: Like Linux, NetBSD has /proc/self/exe.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 896292a7fef818c640f77b8c18fbb9d3e3034cb0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=896292a7fef818c640f77b8c…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Sep 2 04:16:53 2019 +0200 libwine: Like Linux, NetBSD has /proc/self/exe. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/wine/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/wine/config.c b/libs/wine/config.c index bdf065f..2a3314c 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c @@ -61,7 +61,7 @@ static void fatal_error( const char *err, ... ) __attribute__((noreturn,format( static void fatal_perror( const char *err, ... ) __attribute__((noreturn,format(printf,1,2))); #endif -#if defined(__linux__) || defined(__FreeBSD_kernel__ ) +#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) static const char exe_link[] = "/proc/self/exe"; #elif defined (__FreeBSD__) || defined(__DragonFly__) static const char exe_link[] = "/proc/curproc/file";
1
0
0
0
Francois Gouget : libwine: Fully dereference the /proc/self/ exe symbolic link.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 728b6fc5e65aabeb1bb94954045d739b605a5a1f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=728b6fc5e65aabeb1bb94954…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Sep 2 04:20:40 2019 +0200 libwine: Fully dereference the /proc/self/exe symbolic link. Linux will do it for us but not NetBSD. That is, if foo is an executable that prints the path /proc/self/exe points to, on Linux one gets: $ ./foo /tmp/foo $ ln -s foo bar $ ln -s bar babar $ /tmp/babar /tmp/foo But on NetBSD one gets instead: $ ./foo /tmp/./foo $ ln -s foo bar $ ln -s bar babar $ /tmp/babar /tmp/babar Fully dereferencing /proc/self/exe is necessary to be able to run both 32 and 64 bit executables from the build tree. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/wine/config.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/libs/wine/config.c b/libs/wine/config.c index 3c9110b..bdf065f 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c @@ -164,33 +164,15 @@ static char *get_runtime_libdir(void) /* read a symlink and return its directory */ static char *symlink_dirname( const char *name ) { - char *p, *buffer, *absdir = NULL; - int ret, size; + char *p, *fullpath = realpath( name, NULL ); - for (size = 256; ; size *= 2) + if (fullpath) { - if (!(buffer = malloc( size ))) return NULL; - if ((ret = readlink( name, buffer, size )) == -1) break; - if (ret != size) - { - buffer[ret] = 0; - if (!(p = strrchr( buffer, '/' ))) break; - if (p == buffer) p++; - *p = 0; - if (buffer[0] == '/') return buffer; - /* make it absolute */ - absdir = xmalloc( strlen(name) + strlen(buffer) + 1 ); - strcpy( absdir, name ); - if (!(p = strrchr( absdir, '/' ))) break; - strcpy( p + 1, buffer ); - free( buffer ); - return absdir; - } - free( buffer ); + p = strrchr( fullpath, '/' ); + if (p == fullpath) p++; + if (p) *p = 0; } - free( buffer ); - free( absdir ); - return NULL; + return fullpath; } /* return the directory that contains the main exe at run-time */
1
0
0
0
Fabian Maurer : comctl32/syslink: Properly handle '\r'.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 04f75040ec0da9b3992d68790e60bfd5893a306f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=04f75040ec0da9b3992d6879…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Sep 1 15:23:36 2019 +0200 comctl32/syslink: Properly handle '\r'. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46421
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/syslink.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index b2d3682..78d0fd0 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -565,12 +565,12 @@ static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int x, int *LineLen, { int i; - for (i = 0; i < nFit; i++) if (Text[i] == '\n') break; + for (i = 0; i < nFit; i++) if (Text[i] == '\r' || Text[i] == '\n') break; if (i == *LineLen) return FALSE; /* check if we're in the middle of a word */ - if (Text[i] != '\n' && Text[i] != BreakChar) + if (Text[i] != '\r' && Text[i] != '\n' && Text[i] != BreakChar) { /* search for the beginning of the word */ while (i && Text[i - 1] != BreakChar) i--; @@ -653,6 +653,12 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) /* skip break characters unless they're the first of the doc item */ if(tx != Current->Text || x == SL_LEFTMARGIN) { + if (n && *tx == '\r') + { + tx++; + SkipChars++; + n--; + } if (n && *tx == '\n') { tx++;
1
0
0
0
Zebediah Figura : amstream: Get rid of the DirectDrawMediaStreamImpl typedef.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 2f9e6c0c72e1603fc25a559546c92efdca4fed87 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f9e6c0c72e1603fc25a5595…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Sep 2 20:24:05 2019 -0500 amstream: Get rid of the DirectDrawMediaStreamImpl typedef. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/ddrawstream.c | 67 +++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 33 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2f9e6c0c72e1603fc25a…
1
0
0
0
Zebediah Figura : amstream: Reimplement IPin::EnumMediaTypes() for the primary video stream.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 98c591b2ba53b24e64b001f09d30bb2f66fd2587 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98c591b2ba53b24e64b001f0…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Sep 2 20:24:04 2019 -0500 amstream: Reimplement IPin::EnumMediaTypes() for the primary video stream. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/ddrawstream.c | 146 ++++++++++++++++++++++++++++++++++++++++- dlls/amstream/tests/amstream.c | 24 +++---- 2 files changed, 157 insertions(+), 13 deletions(-) diff --git a/dlls/amstream/ddrawstream.c b/dlls/amstream/ddrawstream.c index 4c00b95..c497d8b 100644 --- a/dlls/amstream/ddrawstream.c +++ b/dlls/amstream/ddrawstream.c @@ -448,6 +448,130 @@ static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStreamImpl_IDirect DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetTimePerFrame }; +struct enum_media_types +{ + IEnumMediaTypes IEnumMediaTypes_iface; + LONG refcount; + unsigned int index; +}; + +static const IEnumMediaTypesVtbl enum_media_types_vtbl; + +static struct enum_media_types *impl_from_IEnumMediaTypes(IEnumMediaTypes *iface) +{ + return CONTAINING_RECORD(iface, struct enum_media_types, IEnumMediaTypes_iface); +} + +static HRESULT WINAPI enum_media_types_QueryInterface(IEnumMediaTypes *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IEnumMediaTypes)) + { + IEnumMediaTypes_AddRef(iface); + *out = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI enum_media_types_AddRef(IEnumMediaTypes *iface) +{ + struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface); + ULONG refcount = InterlockedIncrement(&enum_media_types->refcount); + TRACE("%p increasing refcount to %u.\n", enum_media_types, refcount); + return refcount; +} + +static ULONG WINAPI enum_media_types_Release(IEnumMediaTypes *iface) +{ + struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface); + ULONG refcount = InterlockedDecrement(&enum_media_types->refcount); + TRACE("%p decreasing refcount to %u.\n", enum_media_types, refcount); + if (!refcount) + heap_free(enum_media_types); + return refcount; +} + +static HRESULT WINAPI enum_media_types_Next(IEnumMediaTypes *iface, ULONG count, AM_MEDIA_TYPE **mts, ULONG *ret_count) +{ + struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface); + + TRACE("iface %p, count %u, mts %p, ret_count %p.\n", iface, count, mts, ret_count); + + if (!ret_count) + return E_POINTER; + + if (count && !enum_media_types->index) + { + mts[0] = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); + memset(mts[0], 0, sizeof(AM_MEDIA_TYPE)); + mts[0]->majortype = MEDIATYPE_Video; + mts[0]->subtype = MEDIASUBTYPE_RGB8; + mts[0]->bFixedSizeSamples = TRUE; + mts[0]->lSampleSize = 10000; + ++enum_media_types->index; + *ret_count = 1; + return count == 1 ? S_OK : S_FALSE; + } + + *ret_count = 0; + return count ? S_FALSE : S_OK; +} + +static HRESULT WINAPI enum_media_types_Skip(IEnumMediaTypes *iface, ULONG count) +{ + struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface); + + TRACE("iface %p, count %u.\n", iface, count); + + enum_media_types->index += count; + + return S_OK; +} + +static HRESULT WINAPI enum_media_types_Reset(IEnumMediaTypes *iface) +{ + struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface); + + TRACE("iface %p.\n", iface); + + enum_media_types->index = 0; + return S_OK; +} + +static HRESULT WINAPI enum_media_types_Clone(IEnumMediaTypes *iface, IEnumMediaTypes **out) +{ + struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface); + struct enum_media_types *object; + + TRACE("iface %p, out %p.\n", iface, out); + + if (!(object = heap_alloc(sizeof(*object)))) + return E_OUTOFMEMORY; + + object->IEnumMediaTypes_iface.lpVtbl = &enum_media_types_vtbl; + object->refcount = 1; + object->index = enum_media_types->index; + + *out = &object->IEnumMediaTypes_iface; + return S_OK; +} + +static const IEnumMediaTypesVtbl enum_media_types_vtbl = +{ + enum_media_types_QueryInterface, + enum_media_types_AddRef, + enum_media_types_Release, + enum_media_types_Next, + enum_media_types_Skip, + enum_media_types_Reset, + enum_media_types_Clone, +}; + static inline DirectDrawMediaStreamInputPin *impl_from_DirectDrawMediaStreamInputPin_IPin(IPin *iface) { return CONTAINING_RECORD(iface, DirectDrawMediaStreamInputPin, pin.pin.IPin_iface); @@ -475,6 +599,26 @@ static ULONG WINAPI DirectDrawMediaStreamInputPin_IPin_Release(IPin *iface) return IAMMediaStream_Release(&This->parent->IAMMediaStream_iface); } +static HRESULT WINAPI ddraw_pin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types) +{ + struct enum_media_types *object; + + TRACE("iface %p, enum_media_types %p.\n", iface, enum_media_types); + + if (!enum_media_types) + return E_POINTER; + + if (!(object = heap_alloc(sizeof(*object)))) + return E_OUTOFMEMORY; + + object->IEnumMediaTypes_iface.lpVtbl = &enum_media_types_vtbl; + object->refcount = 1; + object->index = 0; + + *enum_media_types = &object->IEnumMediaTypes_iface; + return S_OK; +} + static const IPinVtbl DirectDrawMediaStreamInputPin_IPin_Vtbl = { DirectDrawMediaStreamInputPin_IPin_QueryInterface, @@ -489,7 +633,7 @@ static const IPinVtbl DirectDrawMediaStreamInputPin_IPin_Vtbl = BasePinImpl_QueryDirection, BasePinImpl_QueryId, BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, + ddraw_pin_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseInputPinImpl_EndOfStream, BaseInputPinImpl_BeginFlush, diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 75862e7..c224d00 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1648,7 +1648,7 @@ static void test_enum_media_types(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); hr = IEnumMediaTypes_Next(enum1, 0, mts, &count); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -1660,15 +1660,15 @@ static void test_enum_media_types(void) CoTaskMemFree(mts[0]); hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(!count, "Got count %u.\n", count); hr = IEnumMediaTypes_Reset(enum1); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(count == 1, "Got count %u.\n", count); CoTaskMemFree(mts[0]); hr = IEnumMediaTypes_Reset(enum1); @@ -1681,8 +1681,8 @@ static void test_enum_media_types(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(!count, "Got count %u.\n", count); hr = IEnumMediaTypes_Next(enum2, 1, mts, &count); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -1801,18 +1801,18 @@ static void test_media_types(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); hr = IEnumMediaTypes_Next(enummt, 1, &pmt, &count); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(count == 1, "Got count %u.\n", count); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Video), "Got major type %s\n", wine_dbgstr_guid(&pmt->majortype)); - todo_wine ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB8), "Got subtype %s\n", + ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB8), "Got subtype %s\n", wine_dbgstr_guid(&pmt->subtype)); - todo_wine ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); + ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - todo_wine ok(pmt->lSampleSize == 10000, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 10000, "Got sample size %u.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &GUID_NULL), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); @@ -1854,7 +1854,7 @@ static void test_media_types(void) CoTaskMemFree(pmt); hr = IEnumMediaTypes_Next(enummt, 1, &pmt, &count); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); IEnumMediaTypes_Release(enummt); IPin_Release(pin);
1
0
0
0
Zebediah Figura : amstream: Move audio and ddraw streams into separate files.
by Alexandre Julliard
03 Sep '19
03 Sep '19
Module: wine Branch: master Commit: 3537f73f21a96f0b0d630170ba079f25495def2d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3537f73f21a96f0b0d630170…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Sep 2 20:24:03 2019 -0500 amstream: Move audio and ddraw streams into separate files. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/Makefile.in | 3 +- dlls/amstream/audiostream.c | 701 +++++++++++++++++++++++++ dlls/amstream/{mediastream.c => ddrawstream.c} | 690 +----------------------- 3 files changed, 705 insertions(+), 689 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3537f73f21a96f0b0d63…
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
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