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
November 2010
----- 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
866 discussions
Start a n
N
ew thread
Eric Pouech : wineconsole: Added support for curses window resizing.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: e39a48faf1ef47ccf580a8aefd7e7188aec8faa6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e39a48faf1ef47ccf580a8aef…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Nov 15 21:36:08 2010 +0100 wineconsole: Added support for curses window resizing. --- programs/wineconsole/curses.c | 56 ++++++++++++++++++++++++++++------------ 1 files changed, 39 insertions(+), 17 deletions(-) diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c index 5038bce..35c5907 100644 --- a/programs/wineconsole/curses.c +++ b/programs/wineconsole/curses.c @@ -25,8 +25,6 @@ * functions which can be implemented as macros) * - finish buffer scrolling (mainly, need to decide of a nice way for * requesting the UP/DOWN operations - * - Resizing (unix) terminal does not change (Win32) console size. - * - Initial console size comes from registry and not from terminal size. */ #include "config.h" @@ -80,6 +78,7 @@ struct inner_data_curse int allow_scroll; }; +static CRITICAL_SECTION WCCURSES_CritSect; static void *nc_handle = NULL; @@ -416,6 +415,18 @@ static void WCCURSES_SetFont(struct inner_data* data, const WCHAR* font, } /****************************************************************** + * WCCURSES_Resize + * + */ +static void WCCURSES_Resize(struct inner_data* data) +{ + int width, height; + + getmaxyx(stdscr, height, width); + WINECON_ResizeWithContainer(data, width, height); +} + +/****************************************************************** * WCCURSES_ScrollV * * @@ -767,7 +778,12 @@ static unsigned WCCURSES_FillCode(struct inner_data* data, INPUT_RECORD* ir, int case KEY_MOUSE: numEvent = WCCURSES_FillMouse(ir); break; - +#ifdef KEY_RESIZE + case KEY_RESIZE: + WCCURSES_Resize(data); + break; +#endif + case KEY_MOVE: case KEY_NEXT: case KEY_OPEN: @@ -785,9 +801,6 @@ static unsigned WCCURSES_FillCode(struct inner_data* data, INPUT_RECORD* ir, int case KEY_SCOMMAND: case KEY_SCOPY: case KEY_SCREATE: -#ifdef KEY_RESIZE - case KEY_RESIZE: -#endif goto notFound; case KEY_SDC: @@ -872,16 +885,20 @@ static DWORD CALLBACK input_thread( void *arg ) if (pfd[1].revents & (POLLHUP|POLLERR)) break; if (!(pfd[0].revents & POLLIN)) continue; - if ((inchar = wgetch(stdscr)) == ERR) continue; - - WINE_TRACE("Got o%o (0x%x)\n", inchar,inchar); + /* we're called from input thread (not main thread), so force unique access */ + EnterCriticalSection(&WCCURSES_CritSect); + if ((inchar = wgetch(stdscr)) != ERR) + { + WINE_TRACE("Got o%o (0x%x)\n", inchar,inchar); - if (inchar >= KEY_MIN && inchar <= KEY_MAX) - numEvent = WCCURSES_FillCode(data, ir, inchar); - else - numEvent = WCCURSES_FillSimpleChar(ir, inchar); + if (inchar >= KEY_MIN && inchar <= KEY_MAX) + numEvent = WCCURSES_FillCode(data, ir, inchar); + else + numEvent = WCCURSES_FillSimpleChar(ir, inchar); - if (numEvent) WriteConsoleInputW(data->hConIn, ir, numEvent, &n); + if (numEvent) WriteConsoleInputW(data->hConIn, ir, numEvent, &n); + } + LeaveCriticalSection(&WCCURSES_CritSect); } close( PRIVATE(data)->sync_pipe[0] ); return 0; @@ -924,14 +941,19 @@ static void WCCURSES_DeleteBackend(struct inner_data* data) */ static int WCCURSES_MainLoop(struct inner_data* data) { - DWORD id; + DWORD id; + BOOL cont = TRUE; + + WCCURSES_Resize(data); if (pipe( PRIVATE(data)->sync_pipe ) == -1) return 0; PRIVATE(data)->input_thread = CreateThread( NULL, 0, input_thread, data, 0, &id ); - while (WaitForSingleObject(data->hSynchro, INFINITE) == WAIT_OBJECT_0) + while (cont && WaitForSingleObject(data->hSynchro, INFINITE) == WAIT_OBJECT_0) { - if (!WINECON_GrabChanges(data)) break; + EnterCriticalSection(&WCCURSES_CritSect); + cont = WINECON_GrabChanges(data); + LeaveCriticalSection(&WCCURSES_CritSect); } close( PRIVATE(data)->sync_pipe[1] );
1
0
0
0
Eric Pouech : wineconsole: Properly handle (user) -window resizing wrt the console.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: 70f24d6cc1398fbd3f00aa412627cc3574891e7f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70f24d6cc1398fbd3f00aa412…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Nov 15 21:36:02 2010 +0100 wineconsole: Properly handle (user)-window resizing wrt the console. --- programs/wineconsole/user.c | 5 +++++ programs/wineconsole/winecon_private.h | 2 ++ programs/wineconsole/wineconsole.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 0 deletions(-) diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c index 86106c5..dc60ffd 100644 --- a/programs/wineconsole/user.c +++ b/programs/wineconsole/user.c @@ -778,6 +778,7 @@ static void WCUSER_Paint(const struct inner_data* data) { PAINTSTRUCT ps; + if (data->in_set_config) return; /* in order to avoid some flicker */ BeginPaint(data->hWnd, &ps); BitBlt(ps.hdc, 0, 0, data->curcfg.win_width * data->curcfg.cell_width, @@ -1329,6 +1330,10 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM if (!HIWORD(lParam)) return DefWindowProcW(hWnd, uMsg, wParam, lParam); WCUSER_SetMenuDetails(data, GetSystemMenu(data->hWnd, FALSE)); break; + case WM_SIZE: + WINECON_ResizeWithContainer(data, LOWORD(lParam) / data->curcfg.cell_width, + HIWORD(lParam) / data->curcfg.cell_height); + break; default: return DefWindowProcW(hWnd, uMsg, wParam, lParam); } diff --git a/programs/wineconsole/winecon_private.h b/programs/wineconsole/winecon_private.h index a9a462a..8f08ff4 100644 --- a/programs/wineconsole/winecon_private.h +++ b/programs/wineconsole/winecon_private.h @@ -60,6 +60,7 @@ struct inner_data { HANDLE hSynchro; /* waitable handle signalled by server when something in server has been modified */ HWND hWnd; /* handle of 'user' window or NULL for 'curses' */ INT nCmdShow; /* argument of WinMain */ + BOOL in_set_config; /* to handle re-entrant calls to WINECON_SetConfig */ int (*fnMainLoop)(struct inner_data* data); void (*fnPosCursor)(const struct inner_data* data); @@ -77,6 +78,7 @@ struct inner_data { /* from wineconsole.c */ extern void WINECON_Fatal(const char* msg); +extern void WINECON_ResizeWithContainer(struct inner_data* data, int width, int height); extern int WINECON_GetHistorySize(HANDLE hConIn); extern int WINECON_GetHistoryMode(HANDLE hConIn); extern BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len); diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 0830d43..410d163 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -82,6 +82,34 @@ static void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm) } /****************************************************************** + * WINECON_ResizeWithContainer + * + * For console embedded in a container (e.g. user in a win32 window, or (n)curses + * in a TERM, perform resize of console (screen buffer and window) to fit in + * (new) container size. + */ +void WINECON_ResizeWithContainer(struct inner_data* data, int width, int height) +{ + struct config_data cfg; + + if (data->in_set_config) return; + + cfg = data->curcfg; + cfg.win_width = width; + cfg.win_height = height; + + /* auto size screen-buffer if it's now smaller than window */ + if (cfg.sb_width < cfg.win_width) cfg.sb_width = cfg.win_width; + if (cfg.sb_height < cfg.win_height) cfg.sb_height = cfg.win_height; + + /* and reset window pos so that we don't display outside of the screen-buffer */ + if (cfg.win_pos.X + cfg.win_width > cfg.sb_width) cfg.win_pos.X = cfg.sb_width - cfg.win_width; + if (cfg.win_pos.Y + cfg.win_height > cfg.sb_height) cfg.win_pos.Y = cfg.sb_height - cfg.win_height; + + WINECON_SetConfig(data, &cfg); +} + +/****************************************************************** * WINECON_SetHistorySize * * @@ -336,6 +364,8 @@ int WINECON_GrabChanges(struct inner_data* data) */ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cfg) { + if (data->in_set_config) return; + data->in_set_config = TRUE; if (data->curcfg.cursor_size != cfg->cursor_size || data->curcfg.cursor_visible != cfg->cursor_visible) { @@ -467,6 +497,7 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf * in order to get data correctly updated */ WINECON_GrabChanges(data); + data->in_set_config = FALSE; } /******************************************************************
1
0
0
0
Eric Pouech : wineconsole: Properly manage window position (in wineconsole) from within wineserver.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: 544dbb518eef48ea26ae43816494ebe5d328170a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=544dbb518eef48ea26ae43816…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Nov 15 21:35:55 2010 +0100 wineconsole: Properly manage window position (in wineconsole) from within wineserver. --- programs/wineconsole/curses.c | 15 +++---- programs/wineconsole/user.c | 65 +++++++++++++------------------ programs/wineconsole/winecon_private.h | 1 - programs/wineconsole/wineconsole.c | 58 ++++++++++------------------ 4 files changed, 54 insertions(+), 85 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=544dbb518eef48ea26ae4…
1
0
0
0
Greg Geldorp : ws2_32/tests: NT4 and Win2000 print IPv6 addresses a little bit differently.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: b53edc6dcc30cdae2900c37dfc79ec56c166668f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b53edc6dcc30cdae2900c37df…
Author: Greg Geldorp <ggeldorp(a)vmware.com> Date: Tue Nov 16 11:13:07 2010 +0100 ws2_32/tests: NT4 and Win2000 print IPv6 addresses a little bit differently. --- dlls/ws2_32/tests/sock.c | 69 ++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 57 insertions(+), 12 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index fd61e78..6843846 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1350,8 +1350,13 @@ static void test_WSAAddressToStringA(void) CHAR expect6_1[] = "::1"; CHAR expect6_2[] = "20ab::1"; CHAR expect6_3[] = "[20ab::2001]:33274"; + CHAR expect6_3_nt[] = "20ab::2001@33274"; + CHAR expect6_3_w2k[] = "20ab::2001"; CHAR expect6_3_2[] = "[20ab::2001%4660]:33274"; + CHAR expect6_3_2_nt[] = "4660/20ab::2001@33274"; + CHAR expect6_3_2_w2k[] = "20ab::2001%4660"; CHAR expect6_3_3[] = "20ab::2001%4660"; + CHAR expect6_3_3_nt[] = "4660/20ab::2001"; len = 0; @@ -1454,8 +1459,14 @@ static void test_WSAAddressToStringA(void) ret = WSAAddressToStringA( (SOCKADDR*)&sockaddr6, sizeof(sockaddr6), NULL, address6, &len ); ok( !ret, "WSAAddressToStringA() failed unexpectedly: %d\n", WSAGetLastError() ); - ok( !strcmp( address6, expect6_3 ), "Expected: %s, got: %s\n", expect6_3, address6 ); - ok( len == sizeof(expect6_3), "Got size %d\n", len); + ok( !strcmp( address6, expect6_3 ) || + broken( !strcmp( address6, expect6_3_nt ) ) || /* NT4 */ + broken( !strcmp( address6, expect6_3_w2k ) ), /* Win2000 */ + "Expected: %s, got: %s\n", expect6_3, address6 ); + ok( len == sizeof(expect6_3) || + broken( len == sizeof(expect6_3_nt) ) || /* NT4 */ + broken( len == sizeof(expect6_3_w2k) ), /* Win2000 */ + "Got size %d\n", len); /* Test IPv6 address, port number and scope_id */ len = sizeof(address6); @@ -1467,8 +1478,14 @@ static void test_WSAAddressToStringA(void) ret = WSAAddressToStringA( (SOCKADDR*)&sockaddr6, sizeof(sockaddr6), NULL, address6, &len ); ok( !ret, "WSAAddressToStringA() failed unexpectedly: %d\n", WSAGetLastError() ); - ok( !strcmp( address6, expect6_3_2 ), "Expected: %s, got: %s\n", expect6_3_2, address6 ); - ok( len == sizeof(expect6_3_2), "Got size %d\n", len); + ok( !strcmp( address6, expect6_3_2 ) || + broken( !strcmp( address6, expect6_3_2_nt ) ) || /* NT4 */ + broken( !strcmp( address6, expect6_3_2_w2k ) ), /* Win2000 */ + "Expected: %s, got: %s\n", expect6_3_2, address6 ); + ok( len == sizeof(expect6_3_2) || + broken( len == sizeof(expect6_3_2_nt) ) || /* NT4 */ + broken( len == sizeof(expect6_3_2_w2k) ), /* Win2000 */ + "Got size %d\n", len); /* Test IPv6 address and scope_id */ len = sizeof(address6); @@ -1480,8 +1497,12 @@ static void test_WSAAddressToStringA(void) ret = WSAAddressToStringA( (SOCKADDR*)&sockaddr6, sizeof(sockaddr6), NULL, address6, &len ); ok( !ret, "WSAAddressToStringA() failed unexpectedly: %d\n", WSAGetLastError() ); - ok( !strcmp( address6, expect6_3_3 ), "Expected: %s, got: %s\n", expect6_3_3, address6 ); - ok( len == sizeof(expect6_3_3), "Got size %d\n", len); + ok( !strcmp( address6, expect6_3_3 ) || + broken( !strcmp( address6, expect6_3_3_nt ) ), /* NT4 */ + "Expected: %s, got: %s\n", expect6_3_3, address6 ); + ok( len == sizeof(expect6_3_3) || + broken( len == sizeof(expect6_3_3_nt) ), /* NT4 */ + "Got size %d\n", len); end: if (v6 != INVALID_SOCKET) @@ -1513,8 +1534,13 @@ static void test_WSAAddressToStringW(void) WCHAR expect6_1[] = {':',':','1',0}; WCHAR expect6_2[] = {'2','0','a','b',':',':','1',0}; WCHAR expect6_3[] = {'[','2','0','a','b',':',':','2','0','0','1',']',':','3','3','2','7','4',0}; + WCHAR expect6_3_nt[] = {'2','0','a','b',':',':','2','0','0','1','@','3','3','2','7','4',0}; + WCHAR expect6_3_w2k[] = {'2','0','a','b',':',':','2','0','0','1',0}; WCHAR expect6_3_2[] = {'[','2','0','a','b',':',':','2','0','0','1','%','4','6','6','0',']',':','3','3','2','7','4',0}; + WCHAR expect6_3_2_nt[] = {'4','6','6','0','/','2','0','a','b',':',':','2','0','0','1','@','3','3','2','7','4',0}; + WCHAR expect6_3_2_w2k[] = {'2','0','a','b',':',':','2','0','0','1','%','4','6','6','0',0}; WCHAR expect6_3_3[] = {'2','0','a','b',':',':','2','0','0','1','%','6','5','5','3','4',0}; + WCHAR expect6_3_3_nt[] = {'6','5','5','3','4','/','2','0','a','b',':',':','2','0','0','1',0}; len = 0; @@ -1619,8 +1645,15 @@ static void test_WSAAddressToStringW(void) ret = WSAAddressToStringW( (SOCKADDR*)&sockaddr6, sizeof(sockaddr6), NULL, address6, &len ); ok( !ret, "WSAAddressToStringW() failed unexpectedly: %d\n", WSAGetLastError() ); - ok( !lstrcmpW( address6, expect6_3 ), "Wrong string returned\n" ); - ok( len == sizeof(expect6_3)/sizeof(WCHAR), "Got %d\n", len); + ok( !lstrcmpW( address6, expect6_3 ) || + broken( !lstrcmpW( address6, expect6_3_nt ) ) || /* NT4 */ + broken( !lstrcmpW( address6, expect6_3_w2k ) ), /* Win2000 */ + "Expected: %s, got: %s\n", wine_dbgstr_w(expect6_3), + wine_dbgstr_w(address6) ); + ok( len == sizeof(expect6_3)/sizeof(WCHAR) || + broken(len == sizeof(expect6_3_nt)/sizeof(WCHAR) ) || /* NT4 */ + broken(len == sizeof(expect6_3_w2k)/sizeof(WCHAR) ), /* Win2000 */ + "Got %d\n", len); /* Test IPv6 address, port number and scope_id */ len = sizeof(address6)/sizeof(WCHAR); @@ -1632,8 +1665,15 @@ static void test_WSAAddressToStringW(void) ret = WSAAddressToStringW( (SOCKADDR*)&sockaddr6, sizeof(sockaddr6), NULL, address6, &len ); ok( !ret, "WSAAddressToStringW() failed unexpectedly: %d\n", WSAGetLastError() ); - ok( !lstrcmpW( address6, expect6_3_2 ), "Wrong string returned\n" ); - ok( len == sizeof(expect6_3_2)/sizeof(WCHAR), "Got %d\n", len); + ok( !lstrcmpW( address6, expect6_3_2 ) || + broken( !lstrcmpW( address6, expect6_3_2_nt ) ) || /* NT4 */ + broken( !lstrcmpW( address6, expect6_3_2_w2k ) ), /* Win2000 */ + "Expected: %s, got: %s\n", wine_dbgstr_w(expect6_3_2), + wine_dbgstr_w(address6) ); + ok( len == sizeof(expect6_3_2)/sizeof(WCHAR) || + broken( len == sizeof(expect6_3_2_nt)/sizeof(WCHAR) ) || /* NT4 */ + broken( len == sizeof(expect6_3_2_w2k)/sizeof(WCHAR) ), /* Win2000 */ + "Got %d\n", len); /* Test IPv6 address and scope_id */ len = sizeof(address6)/sizeof(WCHAR); @@ -1645,8 +1685,13 @@ static void test_WSAAddressToStringW(void) ret = WSAAddressToStringW( (SOCKADDR*)&sockaddr6, sizeof(sockaddr6), NULL, address6, &len ); ok( !ret, "WSAAddressToStringW() failed unexpectedly: %d\n", WSAGetLastError() ); - ok( !lstrcmpW( address6, expect6_3_3 ), "Wrong string returned\n" ); - ok( len == sizeof(expect6_3_3)/sizeof(WCHAR), "Got %d\n", len); + ok( !lstrcmpW( address6, expect6_3_3 ) || + broken( !lstrcmpW( address6, expect6_3_3_nt ) ), /* NT4 */ + "Expected: %s, got: %s\n", wine_dbgstr_w(expect6_3_3), + wine_dbgstr_w(address6) ); + ok( len == sizeof(expect6_3_3)/sizeof(WCHAR) || + broken( len == sizeof(expect6_3_3_nt)/sizeof(WCHAR) ), /* NT4 */ + "Got %d\n", len); end: if (v6 != INVALID_SOCKET)
1
0
0
0
Adam Martinson : msxml3: Add functions to get the dt:dt of a node.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: a1d69fcba798d5d3bbcf0870d3aceff583b6b995 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a1d69fcba798d5d3bbcf0870d…
Author: Adam Martinson <amartinson(a)codeweavers.com> Date: Mon Nov 15 18:16:51 2010 -0600 msxml3: Add functions to get the dt:dt of a node. --- dlls/msxml3/msxml_private.h | 1 + dlls/msxml3/schema.c | 102 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 87 insertions(+), 16 deletions(-) diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index 15c8b94..9980fdd 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -266,6 +266,7 @@ extern HRESULT node_get_base_name(xmlnode*,BSTR*); extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document); extern HRESULT SchemaCache_validate_tree(IXMLDOMSchemaCollection2* iface, xmlNodePtr tree); +extern XDR_DT SchemaCache_get_node_dt(IXMLDOMSchemaCollection2* iface, xmlNodePtr node); extern XDR_DT dt_get_type(xmlChar const* str, int len /* calculated if -1 */); extern xmlChar const* dt_get_str(XDR_DT dt); diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index b931295..ec31719 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -341,6 +341,23 @@ xmlChar const* dt_get_str(XDR_DT dt) return DT_string_table[dt]; } +static inline xmlChar const* get_node_nsURI(xmlNodePtr node) +{ + return (node->ns != NULL)? node->ns->href : NULL; +} + +static inline cache_entry* get_entry(schema_cache* This, xmlChar const* nsURI) +{ + return (!nsURI)? xmlHashLookup(This->cache, BAD_CAST "") : + xmlHashLookup(This->cache, nsURI); +} + +static inline xmlSchemaPtr get_node_schema(schema_cache* This, xmlNodePtr node) +{ + cache_entry* entry = get_entry(This, get_node_nsURI(node)); + return (!entry)? NULL : entry->schema; +} + xmlExternalEntityLoader _external_entity_loader = NULL; static xmlParserInputPtr external_entity_loader(const char *URL, const char *ID, @@ -981,6 +998,40 @@ static const struct IXMLDOMSchemaCollection2Vtbl schema_cache_vtbl = schema_cache_getDeclaration }; +static xmlSchemaElementPtr lookup_schema_elemDecl(xmlSchemaPtr schema, xmlNodePtr node) +{ + xmlSchemaElementPtr decl = NULL; + xmlChar const* nsURI = get_node_nsURI(node); + + TRACE("(%p, %p)\n", schema, node); + + if (xmlStrEqual(nsURI, schema->targetNamespace)) + decl = xmlHashLookup(schema->elemDecl, node->name); + + if (!decl && xmlHashSize(schema->schemasImports) > 1) + { + FIXME("declaration not found in main schema - need to check schema imports!\n"); + /*xmlSchemaImportPtr import; + if (nsURI == NULL) + import = xmlHashLookup(schema->schemasImports, XML_SCHEMAS_NO_NAMESPACE); + else + import = xmlHashLookup(schema->schemasImports, node->ns->href); + + if (import != NULL) + decl = xmlHashLookup(import->schema->elemDecl, node->name);*/ + } + + return decl; +} + +static inline xmlNodePtr lookup_schema_element(xmlSchemaPtr schema, xmlNodePtr node) +{ + xmlSchemaElementPtr decl = lookup_schema_elemDecl(schema, node); + while (decl != NULL && decl->refDecl != NULL) + decl = decl->refDecl; + return (decl != NULL)? decl->node : NULL; +} + static void LIBXML2_LOG_CALLBACK validate_error(void* ctx, char const* msg, ...) { va_list ap; @@ -1007,35 +1058,26 @@ static void validate_serror(void* ctx, xmlErrorPtr err) HRESULT SchemaCache_validate_tree(IXMLDOMSchemaCollection2* iface, xmlNodePtr tree) { schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface); - cache_entry* entry; - xmlChar const* ns = NULL; + xmlSchemaPtr schema; + TRACE("(%p, %p)\n", This, tree); if (!tree) return E_POINTER; - if ((xmlNodePtr)tree->doc == tree) - { - xmlNodePtr root = xmlDocGetRootElement(tree->doc); - if (root && root->ns) - ns = root->ns->href; - } - else if (tree->ns) - { - ns = tree->ns->href; - } + if (tree->type == XML_DOCUMENT_NODE) + tree = xmlDocGetRootElement(tree->doc); - entry = (ns != NULL)? xmlHashLookup(This->cache, ns) : - xmlHashLookup(This->cache, BAD_CAST ""); + schema = get_node_schema(This, tree); /* TODO: if the ns is not in the cache, and it's a URL, * do we try to load from that? */ - if (entry) + if (schema) { xmlSchemaValidCtxtPtr svctx; int err; /* TODO: if validateOnLoad property is false, * we probably need to validate the schema here. */ - svctx = xmlSchemaNewValidCtxt(entry->schema); + svctx = xmlSchemaNewValidCtxt(schema); xmlSchemaSetValidErrors(svctx, validate_error, validate_warning, NULL); #ifdef HAVE_XMLSCHEMASSETVALIDSTRUCTUREDERRORS xmlSchemaSetValidStructuredErrors(svctx, validate_serror, NULL); @@ -1053,6 +1095,34 @@ HRESULT SchemaCache_validate_tree(IXMLDOMSchemaCollection2* iface, xmlNodePtr tr return E_FAIL; } +XDR_DT SchemaCache_get_node_dt(IXMLDOMSchemaCollection2* iface, xmlNodePtr node) +{ + schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface); + xmlSchemaPtr schema = get_node_schema(This, node); + XDR_DT dt = DT_INVALID; + + TRACE("(%p, %p)\n", This, node); + + if (node->ns && xmlStrEqual(node->ns->href, DT_nsURI)) + { + dt = dt_get_type(node->name, -1); + } + else if (schema) + { + xmlChar* str; + xmlNodePtr schema_node = lookup_schema_element(schema, node); + + str = xmlGetNsProp(schema_node, BAD_CAST "dt", DT_nsURI); + if (str) + { + dt = dt_get_type(str, -1); + xmlFree(str); + } + } + + return dt; +} + HRESULT SchemaCache_create(IUnknown* pUnkOuter, void** ppObj) { schema_cache* This = heap_alloc(sizeof(schema_cache));
1
0
0
0
Gerald Pfeifer : msxml3: Remove practically unused variable from XDR_to_XSD_doc.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: 7fe77b63695604238fe8853da5fbaa89dda0f1e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7fe77b63695604238fe8853da…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Tue Nov 16 02:18:54 2010 +0100 msxml3: Remove practically unused variable from XDR_to_XSD_doc. --- dlls/msxml3/xdr.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/xdr.c b/dlls/msxml3/xdr.c index c7f012b..3f1bad5 100644 --- a/dlls/msxml3/xdr.c +++ b/dlls/msxml3/xdr.c @@ -820,11 +820,10 @@ static xmlNodePtr XDR_E_Schema(xmlNodePtr xdr, xmlNodePtr parent, xmlChar const* xmlDocPtr XDR_to_XSD_doc(xmlDocPtr xdr_doc, xmlChar const* nsURI) { xmlDocPtr xsd_doc = xmlNewDoc(NULL); - xmlNodePtr root; TRACE("(%p)\n", xdr_doc); - root = XDR_E_Schema(get_schema((xmlNodePtr)xdr_doc), (xmlNodePtr)xsd_doc, nsURI); + XDR_E_Schema(get_schema((xmlNodePtr)xdr_doc), (xmlNodePtr)xsd_doc, nsURI); return xsd_doc; }
1
0
0
0
Adam Martinson : msxml3: Add XDR datatypes enum and string table.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: 4ec6da6ef195a339939e8aedbdcb3f458ebb2143 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ec6da6ef195a339939e8aedb…
Author: Adam Martinson <amartinson(a)codeweavers.com> Date: Mon Nov 15 18:16:10 2010 -0600 msxml3: Add XDR datatypes enum and string table. --- dlls/msxml3/msxml_private.h | 48 +++++++++ dlls/msxml3/schema.c | 240 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 288 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index f6d8355..15c8b94 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -68,6 +68,51 @@ typedef enum tid_t { LAST_tid } tid_t; +/* The XDR datatypes (urn:schemas-microsoft-com:datatypes) + * These are actually valid for XSD schemas as well + * See datatypes.xsd + */ +typedef enum _XDR_DT { + DT_INVALID = -1, + DT_BIN_BASE64, + DT_BIN_HEX, + DT_BOOLEAN, + DT_CHAR, + DT_DATE, + DT_DATE_TZ, + DT_DATETIME, + DT_DATETIME_TZ, + DT_ENTITY, + DT_ENTITIES, + DT_ENUMERATION, + DT_FIXED_14_4, + DT_FLOAT, + DT_I1, + DT_I2, + DT_I4, + DT_I8, + DT_ID, + DT_IDREF, + DT_IDREFS, + DT_INT, + DT_NMTOKEN, + DT_NMTOKENS, + DT_NOTATION, + DT_NUMBER, + DT_R4, + DT_R8, + DT_STRING, + DT_TIME, + DT_TIME_TZ, + DT_UI1, + DT_UI2, + DT_UI4, + DT_UI8, + DT_URI, + DT_UUID +} XDR_DT; +#define DT__N_TYPES (DT_UUID+1) + extern HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo); extern void release_typelib(void); @@ -222,6 +267,9 @@ extern HRESULT node_get_base_name(xmlnode*,BSTR*); extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document); extern HRESULT SchemaCache_validate_tree(IXMLDOMSchemaCollection2* iface, xmlNodePtr tree); +extern XDR_DT dt_get_type(xmlChar const* str, int len /* calculated if -1 */); +extern xmlChar const* dt_get_str(XDR_DT dt); + extern BSTR EnsureCorrectEOL(BSTR); static inline BSTR bstr_from_xmlChar(const xmlChar *str) diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index f3fd7a9..b931295 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -101,6 +101,246 @@ typedef struct _cache_index_data BSTR* out; } cache_index_data; +/* datatypes lookup stuff + * generated with help from gperf */ +#define DT_MIN_STR_LEN 2 +#define DT_MAX_STR_LEN 11 +#define DT_MIN_HASH_VALUE 2 +#define DT_MAX_HASH_VALUE 115 + +static const xmlChar DT_bin_base64[] = "bin.base64"; +static const xmlChar DT_bin_hex[] = "bin.hex"; +static const xmlChar DT_boolean[] = "boolean"; +static const xmlChar DT_char[] = "char"; +static const xmlChar DT_date[] = "date"; +static const xmlChar DT_date_tz[] = "date.tz"; +static const xmlChar DT_dateTime[] = "dateTime"; +static const xmlChar DT_dateTime_tz[] = "dateTime.tz"; +static const xmlChar DT_entity[] = "entity"; +static const xmlChar DT_entities[] = "entities"; +static const xmlChar DT_enumeration[] = "enumeration"; +static const xmlChar DT_fixed_14_4[] = "fixed.14.4"; +static const xmlChar DT_float[] = "float"; +static const xmlChar DT_i1[] = "i1"; +static const xmlChar DT_i2[] = "i2"; +static const xmlChar DT_i4[] = "i4"; +static const xmlChar DT_i8[] = "i8"; +static const xmlChar DT_id[] = "id"; +static const xmlChar DT_idref[] = "idref"; +static const xmlChar DT_idrefs[] = "idrefs"; +static const xmlChar DT_int[] = "int"; +static const xmlChar DT_nmtoken[] = "nmtoken"; +static const xmlChar DT_nmtokens[] = "nmtokens"; +static const xmlChar DT_notation[] = "notation"; +static const xmlChar DT_number[] = "number"; +static const xmlChar DT_r4[] = "r4"; +static const xmlChar DT_r8[] = "r8"; +static const xmlChar DT_string[] = "string"; +static const xmlChar DT_time[] = "time"; +static const xmlChar DT_time_tz[] = "time.tz"; +static const xmlChar DT_ui1[] = "ui1"; +static const xmlChar DT_ui2[] = "ui2"; +static const xmlChar DT_ui4[] = "ui4"; +static const xmlChar DT_ui8[] = "ui8"; +static const xmlChar DT_uri[] = "uri"; +static const xmlChar DT_uuid[] = "uuid"; + +static DWORD dt_hash( xmlChar const* str, int len /* calculated if -1 */) +{ + static const BYTE assoc_values[] = + { + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 10, 116, 116, 55, + 45, 116, 5, 116, 0, 116, 0, 116, 116, 116, + 116, 116, 116, 116, 116, 5, 0, 0, 20, 0, + 0, 10, 0, 0, 116, 0, 0, 0, 15, 5, + 116, 116, 10, 0, 0, 0, 116, 116, 0, 0, + 10, 116, 116, 116, 116, 116, 116, 5, 0, 0, + 20, 0, 0, 10, 0, 0, 116, 0, 0, 0, + 15, 5, 116, 116, 10, 0, 0, 0, 116, 116, + 0, 0, 10, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116 + }; + DWORD hval = (len == -1)? xmlStrlen(str) : len; + + switch (hval) + { + default: + hval += assoc_values[str[10]]; + /*FALLTHROUGH*/ + case 10: + hval += assoc_values[str[9]]; + /*FALLTHROUGH*/ + case 9: + hval += assoc_values[str[8]]; + /*FALLTHROUGH*/ + case 8: + hval += assoc_values[str[7]]; + /*FALLTHROUGH*/ + case 7: + hval += assoc_values[str[6]]; + /*FALLTHROUGH*/ + case 6: + hval += assoc_values[str[5]]; + /*FALLTHROUGH*/ + case 5: + hval += assoc_values[str[4]]; + /*FALLTHROUGH*/ + case 4: + hval += assoc_values[str[3]]; + /*FALLTHROUGH*/ + case 3: + hval += assoc_values[str[2]]; + /*FALLTHROUGH*/ + case 2: + hval += assoc_values[str[1]]; + /*FALLTHROUGH*/ + case 1: + hval += assoc_values[str[0]]; + break; + } + return hval; +} + +static const xmlChar const* DT_string_table[DT__N_TYPES] = +{ + DT_bin_base64, + DT_bin_hex, + DT_boolean, + DT_char, + DT_date, + DT_date_tz, + DT_dateTime, + DT_dateTime_tz, + DT_entity, + DT_entities, + DT_enumeration, + DT_fixed_14_4, + DT_float, + DT_i1, + DT_i2, + DT_i4, + DT_i8, + DT_id, + DT_idref, + DT_idrefs, + DT_int, + DT_nmtoken, + DT_nmtokens, + DT_notation, + DT_number, + DT_r4, + DT_r8, + DT_string, + DT_time, + DT_time_tz, + DT_ui1, + DT_ui2, + DT_ui4, + DT_ui8, + DT_uri, + DT_uuid +}; + +static const XDR_DT DT_lookup_table[] = +{ + -1, -1, + DT_I8, + DT_UI8, + DT_TIME, + -1, -1, + DT_I4, + DT_UI4, + -1, -1, -1, + DT_R8, + DT_URI, + -1, + DT_FLOAT, + -1, + DT_R4, + DT_INT, + DT_CHAR, + -1, + DT_ENTITY, + DT_ID, + DT_ENTITIES, + DT_UUID, + -1, -1, + DT_TIME_TZ, + -1, + DT_DATE, + -1, + DT_NUMBER, + DT_BIN_HEX, + DT_DATETIME, + -1, + DT_IDREF, + DT_IDREFS, + DT_BOOLEAN, + -1, -1, -1, + DT_STRING, + DT_NMTOKEN, + DT_NMTOKENS, + -1, + DT_BIN_BASE64, + -1, + DT_I2, + DT_UI2, + -1, -1, -1, + DT_DATE_TZ, + DT_NOTATION, + -1, -1, + DT_DATETIME_TZ, + DT_I1, + DT_UI1, + -1, -1, + DT_ENUMERATION, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + DT_FIXED_14_4 +}; + +XDR_DT dt_get_type(xmlChar const* str, int len /* calculated if -1 */) +{ + DWORD hash = dt_hash(str, len); + XDR_DT dt = DT_INVALID; + + if (hash <= DT_MAX_HASH_VALUE) + dt = DT_lookup_table[hash]; + + if (dt != DT_INVALID && xmlStrcasecmp(str, DT_string_table[dt]) == 0) + return dt; + + return DT_INVALID; +} + +xmlChar const* dt_get_str(XDR_DT dt) +{ + if (dt == DT_INVALID) + return NULL; + + return DT_string_table[dt]; +} + xmlExternalEntityLoader _external_entity_loader = NULL; static xmlParserInputPtr external_entity_loader(const char *URL, const char *ID,
1
0
0
0
Adam Martinson : msxml3: Move schema cache into the domdoc_properties struct.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: b7cdaba817b85fcc21486b7ec8de6aa44dfa7ef0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7cdaba817b85fcc21486b7ec…
Author: Adam Martinson <amartinson(a)codeweavers.com> Date: Mon Nov 15 18:15:24 2010 -0600 msxml3: Move schema cache into the domdoc_properties struct. --- dlls/msxml3/domdoc.c | 27 +++++--- dlls/msxml3/tests/domdoc.c | 172 ++++++++++++++++++++++++++++++-------------- 2 files changed, 134 insertions(+), 65 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b7cdaba817b85fcc21486…
1
0
0
0
Adam Martinson : msxml3: Fix a datatypes.xsd oops.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: bc56bbfbb43d23780553b8a72262d62b81b2e97b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc56bbfbb43d23780553b8a72…
Author: Adam Martinson <amartinson(a)codeweavers.com> Date: Mon Nov 15 18:15:04 2010 -0600 msxml3: Fix a datatypes.xsd oops. --- dlls/msxml3/datatypes.xsd | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msxml3/datatypes.xsd b/dlls/msxml3/datatypes.xsd index 493c0d0..9e0479d 100644 --- a/dlls/msxml3/datatypes.xsd +++ b/dlls/msxml3/datatypes.xsd @@ -37,7 +37,7 @@ <xsd:restriction base="xsd:base64Binary"/> </xsd:simpleType> - <!-- <xsd:element name="bin.base64" type="dt:bin.base64"/> --> + <xsd:element name="bin.base64" type="dt:bin.base64"/> <xsd:simpleType name="bin.hex"> <xsd:annotation>
1
0
0
0
Hans Leidekker : msi: Forward MsiInstallMissingComponentA to MsiInstallMissingComponentW.
by Alexandre Julliard
16 Nov '10
16 Nov '10
Module: wine Branch: master Commit: c3030532d4d193554f3e6f430025605a9e717ad1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3030532d4d193554f3e6f430…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Nov 16 09:07:36 2010 +0100 msi: Forward MsiInstallMissingComponentA to MsiInstallMissingComponentW. --- dlls/msi/msi.c | 25 +++++++++++++++++++++++++ dlls/msi/msi.spec | 2 +- 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 9e2225c..dcd8e8e 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -3770,6 +3770,31 @@ UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler, } /*********************************************************************** + * MsiInstallMissingComponentA [MSI.@] + */ +UINT WINAPI MsiInstallMissingComponentA( LPCSTR product, LPCSTR component, INSTALLSTATE state ) +{ + UINT r; + WCHAR *productW = NULL, *componentW = NULL; + + TRACE("%s, %s, %d\n", debugstr_a(product), debugstr_a(component), state); + + if (product && !(productW = strdupAtoW( product ))) + return ERROR_OUTOFMEMORY; + + if (component && !(componentW = strdupAtoW( component ))) + { + msi_free( productW ); + return ERROR_OUTOFMEMORY; + } + + r = MsiInstallMissingComponentW( productW, componentW, state ); + msi_free( productW ); + msi_free( componentW ); + return r; +} + +/*********************************************************************** * MsiInstallMissingComponentW [MSI.@] */ UINT WINAPI MsiInstallMissingComponentW(LPCWSTR szProduct, LPCWSTR szComponent, INSTALLSTATE eInstallState) diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec index fd047f8..c1e3553 100644 --- a/dlls/msi/msi.spec +++ b/dlls/msi/msi.spec @@ -76,7 +76,7 @@ 80 stdcall MsiGetTargetPathW(long wstr ptr ptr) 81 stdcall MsiGetUserInfoA(str ptr ptr ptr ptr ptr ptr) 82 stdcall MsiGetUserInfoW(wstr ptr ptr ptr ptr ptr ptr) -83 stub MsiInstallMissingComponentA +83 stdcall MsiInstallMissingComponentA(str str long) 84 stdcall MsiInstallMissingComponentW(wstr wstr long) 85 stub MsiInstallMissingFileA 86 stub MsiInstallMissingFileW
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200