From julliard at winehq.org Mon Sep 3 13:18:50 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:18:50 -0500 Subject: Francois Gouget : testbot/doc: Add a diagram of the WineTestBot schema. Message-ID: Module: tools Branch: master Commit: c82cc26ca9b8991164eda01a5a5de686eb2871b3 URL: http://source.winehq.org/git/tools.git/?a=commit;h=c82cc26ca9b8991164eda01a5a5de686eb2871b3 Author: Francois Gouget Date: Fri Aug 31 17:39:58 2012 +0200 testbot/doc: Add a diagram of the WineTestBot schema. --- testbot/doc/winetestbot-schema.dia | 2927 ++++++++++++++++++++++++++++++++++++ 1 files changed, 2927 insertions(+), 0 deletions(-) Diff: http://source.winehq.org/git/tools.git/?a=commitdiff;h=c82cc26ca9b8991164eda01a5a5de686eb2871b3 From julliard at winehq.org Mon Sep 3 13:19:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:11 -0500 Subject: Marcus Meissner : gameux: Move SysFreeString to success branches (Coverity) . Message-ID: Module: wine Branch: master Commit: c7355f7921495c056ae2b9393d55f0f8ff01bfdb URL: http://source.winehq.org/git/wine.git/?a=commit;h=c7355f7921495c056ae2b9393d55f0f8ff01bfdb Author: Marcus Meissner Date: Sun Sep 2 14:47:15 2012 +0200 gameux: Move SysFreeString to success branches (Coverity). --- dlls/gameux/gamestatistics.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index f069708..619c616 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -240,10 +240,9 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats) { TRACE(" storing statistic %d: name: %s\n", j, debugstr_w(V_BSTR(&vValue))); hr = IXMLDOMElement_setAttribute(statisticsElement, bstrName, vValue); + SysFreeString(V_BSTR(&vValue)); } - SysFreeString(V_BSTR(&vValue)); - if(SUCCEEDED(hr)) { V_VT(&vValue) = VT_BSTR; @@ -256,10 +255,9 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats) { TRACE(" storing statistic %d: name: %s\n", j, debugstr_w(V_BSTR(&vValue))); hr = IXMLDOMElement_setAttribute(statisticsElement, bstrValue, vValue); + SysFreeString(V_BSTR(&vValue)); } - SysFreeString(V_BSTR(&vValue)); - if(SUCCEEDED(hr)) hr = IXMLDOMNode_appendChild(categoryNode, statisticsNode, &statisticsNode); From julliard at winehq.org Mon Sep 3 13:19:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:11 -0500 Subject: Marcus Meissner : quartz: Handle freeing pins in error case (Coverity). Message-ID: Module: wine Branch: master Commit: 791bc1cb93a2b17af2ef969df30b19bf5cec3afc URL: http://source.winehq.org/git/wine.git/?a=commit;h=791bc1cb93a2b17af2ef969df30b19bf5cec3afc Author: Marcus Meissner Date: Sun Sep 2 14:57:15 2012 +0200 quartz: Handle freeing pins in error case (Coverity). --- dlls/quartz/filtergraph.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 1cc1df9..239cf0b 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -906,12 +906,13 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, IEnumPins* penumpins; IEnumMoniker* pEnumMoniker; GUID tab[2]; - ULONG nb; + ULONG nb = 0; IMoniker* pMoniker; ULONG pin; PIN_INFO PinInfo; CLSID FilterCLSID; PIN_DIRECTION dir; + unsigned int i = 0; TRACE("(%p/%p)->(%p, %p)\n", This, iface, ppinOut, ppinIn); @@ -1012,7 +1013,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, { VARIANT var; GUID clsid; - IPin** ppins; + IPin** ppins = NULL; IPin* ppinfilter = NULL; IBaseFilter* pfilter = NULL; IAMGraphBuilderCallback *callback = NULL; @@ -1104,7 +1105,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, hr = GetInternalConnections(pfilter, ppinfilter, &ppins, &nb); if (SUCCEEDED(hr)) { - unsigned int i; if (nb == 0) { IPin_Disconnect(ppinfilter); IPin_Disconnect(ppinOut); @@ -1157,6 +1157,8 @@ error: IFilterGraph2_RemoveFilter(iface, pfilter); IBaseFilter_Release(pfilter); } + while (++i < nb) IPin_Release(ppins[i]); + CoTaskMemFree(ppins); } out: From julliard at winehq.org Mon Sep 3 13:19:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:11 -0500 Subject: Marcus Meissner : dinput: Added some missing free/close in disabled case ( Coverity). Message-ID: Module: wine Branch: master Commit: e10a658c0cde12f7713d9e4c13e1a35b5108202d URL: http://source.winehq.org/git/wine.git/?a=commit;h=e10a658c0cde12f7713d9e4c13e1a35b5108202d Author: Marcus Meissner Date: Sun Sep 2 15:01:27 2012 +0200 dinput: Added some missing free/close in disabled case (Coverity). --- dlls/dinput/joystick_linuxinput.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 341e169..466b6bf 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -251,7 +251,13 @@ static void find_joydevs(void) else joydev.name = joydev.device; - if (device_disabled_registry(joydev.name)) continue; + if (device_disabled_registry(joydev.name)) { + close(fd); + HeapFree(GetProcessHeap(), 0, joydev.name); + if (joydev.name != joydev.device) + HeapFree(GetProcessHeap(), 0, joydev.device); + continue; + } joydev.guid = DInput_Wine_Joystick_Base_GUID; joydev.guid.Data3 += have_joydevs; From julliard at winehq.org Mon Sep 3 13:19:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:11 -0500 Subject: Marcus Meissner : shell32: Use characters not bytes in one place (Coverity) . Message-ID: Module: wine Branch: master Commit: 006ee88278ff455075165b29fa53c0ab989f6db2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=006ee88278ff455075165b29fa53c0ab989f6db2 Author: Marcus Meissner Date: Sun Sep 2 15:12:34 2012 +0200 shell32: Use characters not bytes in one place (Coverity). --- dlls/shell32/shlexec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index e351d86..a1599e4 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1430,7 +1430,7 @@ static BOOL SHELL_translate_idlist( LPSHELLEXECUTEINFOW sei, LPWSTR wszParameter BOOL appKnownSingular = FALSE; /* last chance to translate IDList: now also allow CLSID paths */ - if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW(sei->lpIDList, buffer, sizeof(buffer)))) { + if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW(sei->lpIDList, buffer, sizeof(buffer)/sizeof(WCHAR)))) { if (buffer[0]==':' && buffer[1]==':') { /* open shell folder for the specified class GUID */ if (strlenW(buffer) + 1 > parametersLen) From julliard at winehq.org Mon Sep 3 13:19:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:11 -0500 Subject: Philip Pemberton : kernel32: Scan for SCSI scanners and printers. Message-ID: Module: wine Branch: master Commit: e3e1ddcf2fe7ed597cf38177220d75ef15d47405 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e3e1ddcf2fe7ed597cf38177220d75ef15d47405 Author: Philip Pemberton Date: Sun Sep 2 17:11:13 2012 +0100 kernel32: Scan for SCSI scanners and printers. --- dlls/kernel32/oldconfig.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/oldconfig.c b/dlls/kernel32/oldconfig.c index 02dac06..4a5355d 100644 --- a/dlls/kernel32/oldconfig.c +++ b/dlls/kernel32/oldconfig.c @@ -374,6 +374,8 @@ static void create_hardware_branch(void) else if (strncmp(dev.type, "Sequential-Access", 17) == 0) nType = DRIVE_REMOVABLE; else if (strncmp(dev.type, "CD-ROM", 6) == 0) nType = DRIVE_CDROM; else if (strncmp(dev.type, "Processor", 9) == 0) nType = DRIVE_NO_ROOT_DIR; + else if (strncmp(dev.type, "Scanner", 7) == 0) nType = DRIVE_NO_ROOT_DIR; + else if (strncmp(dev.type, "Printer", 7) == 0) nType = DRIVE_NO_ROOT_DIR; else continue; strcpy(cDevModel, dev.vendor); From julliard at winehq.org Mon Sep 3 13:19:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:11 -0500 Subject: Jason Edmeades : cmd: for loops did not respect boundaries. Message-ID: Module: wine Branch: master Commit: 3a25888f38dbfed5d80368aaea4c2bd4f601dc7b URL: http://source.winehq.org/git/wine.git/?a=commit;h=3a25888f38dbfed5d80368aaea4c2bd4f601dc7b Author: Jason Edmeades Date: Sun Sep 2 22:08:57 2012 +0100 cmd: for loops did not respect boundaries. --- programs/cmd/builtins.c | 2 +- programs/cmd/tests/test_builtins.cmd | 18 ++++++++++++------ programs/cmd/tests/test_builtins.cmd.exp | 19 +++++++++++++++++++ 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index ebb1c80..e28ff10 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1364,7 +1364,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { WINE_TRACE("FOR /L provided range from %d to %d step %d\n", numbers[0], numbers[2], numbers[1]); for (i=numbers[0]; - (numbers[1]<0)? i>numbers[2] : i=numbers[2] : i<=numbers[2]; i=i + numbers[1]) { sprintfW(thisNum, fmt, i); diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 6295f9e..4856578 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -673,12 +673,18 @@ for /L %%i in (1,2,a) do echo %%i echo ErrorLevel %ErrorLevel% for /L %%i in (1,a,b) do echo %%i echo ErrorLevel %ErrorLevel% -rem FIXME: following test cases cannot be currently tested due to an inconsistent/buggy 'for /L' parsing. -rem for /L %%i in (a,2,b) do echo %%i -rem for /L %%i in (1,1,1) do echo %%i -rem for /L %%i in (1,-2,-1) do echo %%i -rem for /L %%i in (-1,-1,-1) do echo %%i -rem for /L %%i in (1,2, 3) do echo %%i +rem Test boundaries +for /l %%i in (1,1,4) do echo %%i +for /l %%i in (1,2,4) do echo %%i +for /l %%i in (4,-1,1) do echo %%i +for /l %%i in (4,-2,1) do echo %%i +for /l %%i in (1,-1,4) do echo %%i +for /l %%i in (4,1,1) do echo %%i +for /L %%i in (a,2,b) do echo %%i +for /L %%i in (1,1,1) do echo %%i +for /L %%i in (1,-2,-1) do echo %%i +for /L %%i in (-1,-1,-1) do echo %%i +for /L %%i in (1,2, 3) do echo %%i echo --- for /a rem No output when using "set expr" syntax, unless in interactive mode rem Need to use "set envvar=expr" to use in a batch script diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index bb75515..0011d35 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -471,6 +471,25 @@ bar -1 @todo_wine at ErrorLevel 0 @todo_wine at ErrorLevel 0 +1 +2 +3 +4 +1 +3 +4 +3 +2 +1 +4 +2 +0 +1 +1 +-1 +-1 +1 +3 --- for /a ------ individual operations 0 From julliard at winehq.org Mon Sep 3 13:19:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:11 -0500 Subject: Jason Edmeades : cmd: for / l with zero iterations failed to skip its commands. Message-ID: Module: wine Branch: master Commit: 1a9413b98a04358935424c54a73fa8b38f03832e URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a9413b98a04358935424c54a73fa8b38f03832e Author: Jason Edmeades Date: Sun Sep 2 23:25:21 2012 +0100 cmd: for /l with zero iterations failed to skip its commands. --- programs/cmd/builtins.c | 18 +++++++++++------- programs/cmd/tests/test_builtins.cmd | 5 +++++ programs/cmd/tests/test_builtins.cmd.exp | 4 ++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index e28ff10..a83947b 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -968,7 +968,7 @@ void WCMD_echo (const WCHAR *command) */ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, const WCHAR *variable, const WCHAR *value, - BOOL isIF, BOOL conditionTRUE) + BOOL isIF, BOOL executecmds) { CMD_LIST *curPosition = *cmdList; int myDepth = (*cmdList)->bracketDepth; @@ -976,13 +976,13 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, WINE_TRACE("cmdList(%p), firstCmd(%p), with variable '%s'='%s', doIt(%d)\n", cmdList, wine_dbgstr_w(firstcmd), wine_dbgstr_w(variable), wine_dbgstr_w(value), - conditionTRUE); + executecmds); /* Skip leading whitespace between condition and the command */ while (firstcmd && *firstcmd && (*firstcmd==' ' || *firstcmd=='\t')) firstcmd++; /* Process the first command, if there is one */ - if (conditionTRUE && firstcmd && *firstcmd) { + if (executecmds && firstcmd && *firstcmd) { WCHAR *command = WCMD_strdupW(firstcmd); WCMD_execute (firstcmd, (*cmdList)->redirects, variable, value, cmdList); HeapFree(GetProcessHeap(), 0, command); @@ -994,9 +994,7 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, /* Process any other parts of the command */ if (*cmdList) { - BOOL processThese = TRUE; - - if (isIF) processThese = conditionTRUE; + BOOL processThese = executecmds; while (*cmdList) { static const WCHAR ifElse[] = {'e','l','s','e'}; @@ -1372,8 +1370,14 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { thisCmdStart = cmdStart; WCMD_part_execute(&thisCmdStart, firstCmd, variable, thisNum, FALSE, TRUE); - cmdEnd = thisCmdStart; } + + /* Now skip over the subsequent commands if we did not perform the for loop */ + if (thisCmdStart == cmdStart) { + WINE_TRACE("Skipping for loop commands due to no valid iterations\n"); + WCMD_part_execute(&thisCmdStart, firstCmd, variable, thisNum, FALSE, FALSE); + } + cmdEnd = thisCmdStart; } /* When the loop ends, either something like a GOTO or EXIT /b has terminated diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 4856578..36bc73f 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -685,6 +685,11 @@ for /L %%i in (1,1,1) do echo %%i for /L %%i in (1,-2,-1) do echo %%i for /L %%i in (-1,-1,-1) do echo %%i for /L %%i in (1,2, 3) do echo %%i +rem Test zero iteration skips the body of the for +for /L %%i in (2,2,1) do ( + echo %%i + echo FAILED +) echo --- for /a rem No output when using "set expr" syntax, unless in interactive mode rem Need to use "set envvar=expr" to use in a batch script diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 0011d35..c444be6 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -469,8 +469,8 @@ bar 2 1 -1 - at todo_wine@ErrorLevel 0 - at todo_wine@ErrorLevel 0 +ErrorLevel 0 +ErrorLevel 0 1 2 3 From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Remove PixelFormatDesc typedef. Message-ID: Module: wine Branch: master Commit: 8da881161544f5ab717ce5cdce90930c8bd9a7e0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8da881161544f5ab717ce5cdce90930c8bd9a7e0 Author: Rico Sch?ller Date: Mon Sep 3 09:57:41 2012 +0200 d3dx9: Remove PixelFormatDesc typedef. --- dlls/d3dx9_36/d3dx9_36_private.h | 16 ++++++++-------- dlls/d3dx9_36/surface.c | 32 +++++++++++++++++--------------- dlls/d3dx9_36/texture.c | 10 +++++----- dlls/d3dx9_36/util.c | 7 +++---- dlls/d3dx9_36/volume.c | 2 +- 5 files changed, 34 insertions(+), 33 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=8da881161544f5ab717ce5cdce90930c8bd9a7e0 From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Remove FormatType typedef. Message-ID: Module: wine Branch: master Commit: 587468dc6d48d5446b7b228834077ca42984f0c7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=587468dc6d48d5446b7b228834077ca42984f0c7 Author: Rico Sch?ller Date: Mon Sep 3 09:57:45 2012 +0200 d3dx9: Remove FormatType typedef. --- dlls/d3dx9_36/d3dx9_36_private.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36_private.h b/dlls/d3dx9_36/d3dx9_36_private.h index a5b3070..f6f797e 100644 --- a/dlls/d3dx9_36/d3dx9_36_private.h +++ b/dlls/d3dx9_36/d3dx9_36_private.h @@ -45,10 +45,10 @@ struct volume }; /* for internal use */ -typedef enum _FormatType { +enum format_type { FORMAT_ARGB, /* unsigned */ FORMAT_UNKNOWN -} FormatType; +}; struct pixel_format_desc { D3DFORMAT format; @@ -58,7 +58,7 @@ struct pixel_format_desc { UINT block_width; UINT block_height; UINT block_byte_count; - FormatType type; + enum format_type type; void (*from_rgba)(const struct vec4 *src, struct vec4 *dst); void (*to_rgba)(const struct vec4 *src, struct vec4 *dst); }; From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Don' t use memcpy in ID3DXConstantTable::GetDesc(). Message-ID: Module: wine Branch: master Commit: 792cd67bf194ae8797566c87528288a3de95c63a URL: http://source.winehq.org/git/wine.git/?a=commit;h=792cd67bf194ae8797566c87528288a3de95c63a Author: Rico Sch?ller Date: Mon Sep 3 09:57:49 2012 +0200 d3dx9: Don't use memcpy in ID3DXConstantTable::GetDesc(). --- dlls/d3dx9_36/shader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 33b86f6..766b897 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -914,7 +914,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_GetDesc(ID3DXConstantTable *iface, if (!desc) return D3DERR_INVALIDCALL; - memcpy(desc, &This->desc, sizeof(This->desc)); + *desc = This->desc; return D3D_OK; } From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: Michael Stefaniuc : include/windowsx.h: Avoid a TRUE: FALSE conditional expression. Message-ID: Module: wine Branch: master Commit: c21000ea81a63d4ed7c4810dc12d2bccd72edada URL: http://source.winehq.org/git/wine.git/?a=commit;h=c21000ea81a63d4ed7c4810dc12d2bccd72edada Author: Michael Stefaniuc Date: Mon Sep 3 10:41:28 2012 +0200 include/windowsx.h: Avoid a TRUE:FALSE conditional expression. --- include/windowsx.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/windowsx.h b/include/windowsx.h index 2920229..0f84622 100644 --- a/include/windowsx.h +++ b/include/windowsx.h @@ -232,7 +232,7 @@ extern "C" { ((UINT)SendMessage((hwndCtl), BM_SETSTATE, (WPARAM)(int)(state), 0L)) #define Button_SetStyle(hwndCtl, style, fRedraw) \ - ((void)SendMessage((hwndCtl), BM_SETSTYLE, (WPARAM)LOWORD(style), MAKELPARAM(((fRedraw) ? TRUE : FALSE), 0))) + ((void)SendMessage((hwndCtl), BM_SETSTYLE, (WPARAM)LOWORD(style), MAKELPARAM((fRedraw) != 0, 0))) #define Button_SetText(hwndCtl, lpsz) \ SetWindowText((hwndCtl), (lpsz)) From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: Jacek Caban : urlmon: Added better debug traces for BINDSTATUS values. Message-ID: Module: wine Branch: master Commit: 3636a2527946e0a85d288ffbe0950092e2f6ba07 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3636a2527946e0a85d288ffbe0950092e2f6ba07 Author: Jacek Caban Date: Mon Sep 3 13:58:18 2012 +0200 urlmon: Added better debug traces for BINDSTATUS values. --- dlls/urlmon/bindctx.c | 2 +- dlls/urlmon/binding.c | 3 +- dlls/urlmon/bindprot.c | 2 +- dlls/urlmon/urlmon_main.c | 61 +++++++++++++++++++++++++++++++++++++++++++++ dlls/urlmon/urlmon_main.h | 2 + 5 files changed, 67 insertions(+), 3 deletions(-) diff --git a/dlls/urlmon/bindctx.c b/dlls/urlmon/bindctx.c index 9ddf96a..79260ef 100644 --- a/dlls/urlmon/bindctx.c +++ b/dlls/urlmon/bindctx.c @@ -158,7 +158,7 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallbackEx *iface { BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); - TRACE("%p)->(%u %u %u %s)\n", This, ulProgress, ulProgressMax, ulStatusCode, + TRACE("%p)->(%u %u %s %s)\n", This, ulProgress, ulProgressMax, debugstr_bindstatus(ulStatusCode), debugstr_w(szStatusText)); return IBindStatusCallback_OnProgress(This->callback, ulProgress, diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 4988cea..3cb49f1 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -980,7 +980,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink { Binding *This = impl_from_IInternetProtocolSink(iface); - TRACE("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText)); + TRACE("(%p)->(%s %s)\n", This, debugstr_bindstatus(ulStatusCode), debugstr_w(szStatusText)); switch(ulStatusCode) { case BINDSTATUS_FINDINGRESOURCE: @@ -1133,6 +1133,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *i TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult)); stop_binding(This, hrResult, szResult); + IInternetProtocolEx_Terminate(&This->protocol->IInternetProtocolEx_iface, 0); return S_OK; } diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 043ff85..603002d 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -822,7 +822,7 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportProgress(IInternetProtocolSink * { BindProtocol *This = impl_from_IInternetProtocolSinkHandler(iface); - TRACE("(%p)->(%u %s)\n", This, status_code, debugstr_w(status_text)); + TRACE("(%p)->(%s %s)\n", This, debugstr_bindstatus(status_code), debugstr_w(status_text)); if(!This->protocol_sink) return S_OK; diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index f2abe13..7fb2090 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -166,6 +166,67 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) return TRUE; } +const char *debugstr_bindstatus(ULONG status) +{ + switch(status) { +#define X(x) case x: return #x; break + X(BINDSTATUS_FINDINGRESOURCE); + X(BINDSTATUS_CONNECTING); + X(BINDSTATUS_REDIRECTING); + X(BINDSTATUS_BEGINDOWNLOADDATA); + X(BINDSTATUS_DOWNLOADINGDATA); + X(BINDSTATUS_ENDDOWNLOADDATA); + X(BINDSTATUS_BEGINDOWNLOADCOMPONENTS); + X(BINDSTATUS_INSTALLINGCOMPONENTS); + X(BINDSTATUS_ENDDOWNLOADCOMPONENTS); + X(BINDSTATUS_USINGCACHEDCOPY); + X(BINDSTATUS_SENDINGREQUEST); + X(BINDSTATUS_CLASSIDAVAILABLE); + X(BINDSTATUS_MIMETYPEAVAILABLE); + X(BINDSTATUS_CACHEFILENAMEAVAILABLE); + X(BINDSTATUS_BEGINSYNCOPERATION); + X(BINDSTATUS_ENDSYNCOPERATION); + X(BINDSTATUS_BEGINUPLOADDATA); + X(BINDSTATUS_UPLOADINGDATA); + X(BINDSTATUS_ENDUPLOADINGDATA); + X(BINDSTATUS_PROTOCOLCLASSID); + X(BINDSTATUS_ENCODING); + X(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE); + X(BINDSTATUS_CLASSINSTALLLOCATION); + X(BINDSTATUS_DECODING); + X(BINDSTATUS_LOADINGMIMEHANDLER); + X(BINDSTATUS_CONTENTDISPOSITIONATTACH); + X(BINDSTATUS_FILTERREPORTMIMETYPE); + X(BINDSTATUS_CLSIDCANINSTANTIATE); + X(BINDSTATUS_IUNKNOWNAVAILABLE); + X(BINDSTATUS_DIRECTBIND); + X(BINDSTATUS_RAWMIMETYPE); + X(BINDSTATUS_PROXYDETECTING); + X(BINDSTATUS_ACCEPTRANGES); + X(BINDSTATUS_COOKIE_SENT); + X(BINDSTATUS_COMPACT_POLICY_RECEIVED); + X(BINDSTATUS_COOKIE_SUPPRESSED); + X(BINDSTATUS_COOKIE_STATE_UNKNOWN); + X(BINDSTATUS_COOKIE_STATE_ACCEPT); + X(BINDSTATUS_COOKIE_STATE_REJECT); + X(BINDSTATUS_COOKIE_STATE_PROMPT); + X(BINDSTATUS_COOKIE_STATE_LEASH); + X(BINDSTATUS_COOKIE_STATE_DOWNGRADE); + X(BINDSTATUS_POLICY_HREF); + X(BINDSTATUS_P3P_HEADER); + X(BINDSTATUS_SESSION_COOKIE_RECEIVED); + X(BINDSTATUS_PERSISTENT_COOKIE_RECEIVED); + X(BINDSTATUS_SESSION_COOKIES_ALLOWED); + X(BINDSTATUS_CACHECONTROL); + X(BINDSTATUS_CONTENTDISPOSITIONFILENAME); + X(BINDSTATUS_MIMETEXTPLAINMISMATCH); + X(BINDSTATUS_PUBLISHERAVAILABLE); + X(BINDSTATUS_DISPLAYNAMEAVAILABLE); +#undef X + default: + return wine_dbg_sprintf("(invalid status %u)", status); + } +} /*********************************************************************** * DllInstall (URLMON.@) diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h index 4231307..7260e94 100644 --- a/dlls/urlmon/urlmon_main.h +++ b/dlls/urlmon/urlmon_main.h @@ -221,6 +221,8 @@ tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN; HWND get_notif_hwnd(void) DECLSPEC_HIDDEN; void release_notif_hwnd(HWND) DECLSPEC_HIDDEN; +const char *debugstr_bindstatus(ULONG) DECLSPEC_HIDDEN; + static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len); From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: Jacek Caban : urlmon: Process pending tasks before exiting Start function. Message-ID: Module: wine Branch: master Commit: 8bf9d8e90d870bc7a3b994864e409554bf4db01e URL: http://source.winehq.org/git/wine.git/?a=commit;h=8bf9d8e90d870bc7a3b994864e409554bf4db01e Author: Jacek Caban Date: Mon Sep 3 13:58:30 2012 +0200 urlmon: Process pending tasks before exiting Start function. --- dlls/urlmon/bindprot.c | 48 ++++++++++++++++++++++++++++-------------------- 1 files changed, 28 insertions(+), 20 deletions(-) diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 603002d..48c9130 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -34,32 +34,38 @@ struct _task_header_t { #define WM_MK_CONTINUE (WM_USER+101) #define WM_MK_RELEASE (WM_USER+102) -static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +static void process_tasks(BindProtocol *This) { - switch(msg) { - case WM_MK_CONTINUE: { - BindProtocol *This = (BindProtocol*)lParam; - task_header_t *task; + task_header_t *task; - while(1) { - EnterCriticalSection(&This->section); + while(1) { + EnterCriticalSection(&This->section); - task = This->task_queue_head; - if(task) { - This->task_queue_head = task->next; - if(!This->task_queue_head) - This->task_queue_tail = NULL; - } + task = This->task_queue_head; + if(task) { + This->task_queue_head = task->next; + if(!This->task_queue_head) + This->task_queue_tail = NULL; + } - LeaveCriticalSection(&This->section); + LeaveCriticalSection(&This->section); - if(!task) - break; + if(!task) + break; - This->continue_call++; - task->proc(This, task); - This->continue_call--; - } + This->continue_call++; + task->proc(This, task); + This->continue_call--; + } +} + +static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) { + case WM_MK_CONTINUE: { + BindProtocol *This = (BindProtocol*)lParam; + + process_tasks(This); IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); return 0; @@ -543,6 +549,8 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr &This->IInternetBindInfo_iface, 0, 0); } + if(SUCCEEDED(hres)) + process_tasks(This); return hres; } From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: Jacek Caban : urlmon: Avoid direct notifications from callbacks from Read call. Message-ID: Module: wine Branch: master Commit: 719ab21d751558811c66f050f9c5151c474452a9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=719ab21d751558811c66f050f9c5151c474452a9 Author: Jacek Caban Date: Mon Sep 3 13:58:55 2012 +0200 urlmon: Avoid direct notifications from callbacks from Read call. --- dlls/urlmon/bindprot.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 48c9130..60912a4 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -171,9 +171,14 @@ static void push_task(BindProtocol *This, task_header_t *task, task_proc_t proc) } } +static inline BOOL is_apartment_thread(BindProtocol *This) +{ + return This->apartment_thread == GetCurrentThreadId(); +} + static inline BOOL do_direct_notif(BindProtocol *This) { - return !(This->pi & PI_APARTMENTTHREADED) || (This->apartment_thread == GetCurrentThreadId() && !This->continue_call); + return !(This->pi & PI_APARTMENTTHREADED) || (is_apartment_thread(This) && !This->continue_call); } static HRESULT handle_mime_filter(BindProtocol *This, IInternetProtocol *mime_filter) @@ -735,7 +740,11 @@ static HRESULT WINAPI ProtocolHandler_Read(IInternetProtocol *iface, void *pv, if(read < cb) { ULONG cread = 0; + if(is_apartment_thread(This)) + This->continue_call++; hres = IInternetProtocol_Read(This->protocol, (BYTE*)pv+read, cb-read, &cread); + if(is_apartment_thread(This)) + This->continue_call--; read += cread; } From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: Jacek Caban : urlmon: Added more tests. Message-ID: Module: wine Branch: master Commit: 3cd189c0c07c2ecaccbf387e68b3a5775c809cd5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3cd189c0c07c2ecaccbf387e68b3a5775c809cd5 Author: Jacek Caban Date: Mon Sep 3 13:59:08 2012 +0200 urlmon: Added more tests. --- dlls/urlmon/tests/url.c | 55 ++++++++++++++++++++++++++++++++++------------ 1 files changed, 40 insertions(+), 15 deletions(-) diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index 5be3f02..a929ace 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -218,6 +218,7 @@ static LPCWSTR urls[] = { MK_URL, https_urlW, ftp_urlW, + winetest_urlW, winetest_urlW }; @@ -231,7 +232,8 @@ static enum { MK_TEST, HTTPS_TEST, FTP_TEST, - WINETEST_TEST + WINETEST_TEST, + WINETEST_SYNC_TEST } test_protocol; static enum { @@ -705,6 +707,9 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, CHECK_CALLED(Obj_OnProgress_SENDINGREQUEST); else CHECK_CALLED(OnProgress_SENDINGREQUEST); + case WINETEST_SYNC_TEST: + IInternetProtocolSink_AddRef(pOIProtSink); + protocol_sink = pOIProtSink; default: break; } @@ -848,9 +853,14 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE); else CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); + }else if(test_protocol == WINETEST_SYNC_TEST) { + SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); + hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextHtml); + ok(hres == S_OK, + "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); + CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); }else { - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml); + hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml); ok(hres == S_OK, "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); } @@ -862,7 +872,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, SET_EXPECT(Read); if(bind_to_object) { - if(test_protocol != FILE_TEST && test_protocol != MK_TEST) + if(test_protocol != FILE_TEST && test_protocol != MK_TEST && test_protocol != WINETEST_SYNC_TEST) SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA); if(test_protocol == FILE_TEST) @@ -887,7 +897,8 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, SET_EXPECT(LockRequest); if(!filedwl_api) SET_EXPECT(OnDataAvailable); - SET_EXPECT(OnStopBinding); + if(test_protocol != WINETEST_SYNC_TEST) /* Set in Read after ReportResult call */ + SET_EXPECT(OnStopBinding); } hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13); @@ -911,7 +922,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, CHECK_CALLED(OnObjectAvailable); CHECK_CALLED(Obj_OnStopBinding); }else { - if(test_protocol != FILE_TEST && test_protocol != MK_TEST) + if(test_protocol != FILE_TEST && test_protocol != MK_TEST && test_protocol != WINETEST_SYNC_TEST) CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); if(test_protocol == FILE_TEST) @@ -928,17 +939,19 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL); ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); CHECK_CALLED(Read); - }else if(!bind_to_object && test_protocol == ABOUT_TEST) { + }else if(!bind_to_object && test_protocol == FILE_TEST) { SET_EXPECT(Read); hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13); ok(hres == S_OK, "ReportData failed: %08x\n", hres); CHECK_CALLED(Read); } - SET_EXPECT(Terminate); - hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - CHECK_CALLED(Terminate); + if(test_protocol != WINETEST_SYNC_TEST) { + SET_EXPECT(Terminate); + hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); + ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + CHECK_CALLED(Terminate); + } return S_OK; } @@ -1119,6 +1132,8 @@ static HRESULT WINAPI Protocol_Resume(IInternetProtocol *iface) static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead) { + HRESULT hres; + static const char data[] = ""; CHECK_EXPECT2(Read); @@ -1139,8 +1154,6 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv, } if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - HRESULT hres; - static int pending = TRUE; pending = !pending; @@ -1184,6 +1197,13 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv, return S_FALSE; } + if(test_protocol == WINETEST_SYNC_TEST) { + hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL); + ok(hres == S_OK, "ReportResult failed: %08x\n", hres); + + SET_EXPECT(OnStopBinding); + } + ok(*pcbRead == 0, "*pcbRead=%d, expected 0\n", *pcbRead); read += *pcbRead = sizeof(data)-1; memcpy(pv, data, sizeof(data)); @@ -2917,7 +2937,8 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) if(is_urlmon_protocol(test_protocol)) SET_EXPECT(SetPriority); SET_EXPECT(Start); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) + if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST + || test_protocol == WINETEST_SYNC_TEST) SET_EXPECT(Terminate); if(tymed != TYMED_FILE || (test_protocol != ABOUT_TEST && test_protocol != ITS_TEST)) SET_EXPECT(UnlockRequest); @@ -3057,7 +3078,8 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) if(is_urlmon_protocol(test_protocol)) CHECK_CALLED(SetPriority); CHECK_CALLED(Start); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { + if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST + || test_protocol == WINETEST_SYNC_TEST) { if(tymed == TYMED_FILE) CLEAR_CALLED(Read); CHECK_CALLED(Terminate); @@ -3959,6 +3981,9 @@ START_TEST(url) trace("emulated about test (to object)...\n"); test_BindToObject(ABOUT_TEST, BINDTEST_EMULATE); + trace("emulalated test reporting result in read...\n"); + test_BindToStorage(WINETEST_SYNC_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); + trace("file test...\n"); test_BindToStorage(FILE_TEST, 0, TYMED_ISTREAM); From julliard at winehq.org Mon Sep 3 13:19:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:12 -0500 Subject: Jacek Caban : jscript: Fixed argument conversion in disp_call_value when ' this' is specified. Message-ID: Module: wine Branch: master Commit: 7fec767864f89f60e68b3d08654d269d286c4ba3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7fec767864f89f60e68b3d08654d269d286c4ba3 Author: Jacek Caban Date: Mon Sep 3 15:47:14 2012 +0200 jscript: Fixed argument conversion in disp_call_value when 'this' is specified. --- dlls/jscript/dispex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 501ce4a..3e28c90 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -1170,7 +1170,7 @@ HRESULT disp_call_value(script_ctx_t *ctx, IDispatch *disp, IDispatch *jsthis, W } for(i=0; i Module: wine Branch: master Commit: 481a8036ea8193743a7f8c87b3d1a667917093fe URL: http://source.winehq.org/git/wine.git/?a=commit;h=481a8036ea8193743a7f8c87b3d1a667917093fe Author: Dan Kegel Date: Fri Aug 31 08:00:24 2012 -0700 msvcr100: Add wmemmove_s and wmemcpy_s. --- configure | 1 + configure.ac | 1 + dlls/msvcr100/msvcr100.c | 55 +++++++++ dlls/msvcr100/msvcr100.spec | 4 +- dlls/msvcr100/tests/Makefile.in | 9 ++ dlls/msvcr100/tests/msvcr100.c | 257 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 325 insertions(+), 2 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=481a8036ea8193743a7f8c87b3d1a667917093fe From julliard at winehq.org Mon Sep 3 13:19:13 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:13 -0500 Subject: Daniel Jelinski : comctl32/listview: Do not draw unnecessary grid lines. Message-ID: Module: wine Branch: master Commit: e389326bddcf42915e436ed030c1a12d9e982c84 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e389326bddcf42915e436ed030c1a12d9e982c84 Author: Daniel Jelinski Date: Fri Aug 31 21:15:32 2012 +0200 comctl32/listview: Do not draw unnecessary grid lines. --- dlls/comctl32/listview.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index e1b9a71..3c9a0cb 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4943,10 +4943,7 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) itemheight = LISTVIEW_CalculateItemHeight(infoPtr); rcItem.left = infoPtr->rcList.left; rcItem.right = infoPtr->rcList.right; - rcItem.bottom = rcItem.top = Origin.y - 1; - MoveToEx(hdc, rcItem.left, rcItem.top, NULL); - LineTo(hdc, rcItem.right, rcItem.top); - for(y=itemheight-1+Origin.y; y<=infoPtr->rcList.bottom; y+=itemheight) + for(y = Origin.y > 1 ? Origin.y - 1 : itemheight - 1 + Origin.y % itemheight; y<=infoPtr->rcList.bottom; y+=itemheight) { rcItem.bottom = rcItem.top = y; TRACE("horz rcItem=%s\n", wine_dbgstr_rect(&rcItem)); From julliard at winehq.org Mon Sep 3 13:19:13 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:13 -0500 Subject: Alexandre Julliard : winex11: Only create the client window when the pixel format is changed. Message-ID: Module: wine Branch: master Commit: d596b62d95f20d59e13e76aaac5e9652e4dda8cc URL: http://source.winehq.org/git/wine.git/?a=commit;h=d596b62d95f20d59e13e76aaac5e9652e4dda8cc Author: Alexandre Julliard Date: Thu Aug 30 16:18:46 2012 +0200 winex11: Only create the client window when the pixel format is changed. --- dlls/winex11.drv/systray.c | 3 +-- dlls/winex11.drv/window.c | 12 ++---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c index 89b89a4..7efc63d 100644 --- a/dlls/winex11.drv/systray.c +++ b/dlls/winex11.drv/systray.c @@ -542,7 +542,6 @@ static void dock_systray_icon( Display *display, struct tray_icon *icon, Window attr.background_pixmap = ParentRelative; attr.bit_gravity = ForgetGravity; XChangeWindowAttributes( display, data->whole_window, CWBackPixmap | CWBitGravity, &attr ); - XChangeWindowAttributes( display, data->client_window, CWBackPixmap | CWBitGravity, &attr ); } /* dock systray windows again with the new owner */ @@ -619,7 +618,7 @@ static BOOL modify_icon( struct tray_icon *icon, NOTIFYICONDATAW *nid ) else { struct x11drv_win_data *data = X11DRV_get_win_data( icon->window ); - if (data) XClearArea( gdi_display, data->client_window, 0, 0, 0, 0, True ); + if (data) XClearArea( gdi_display, data->whole_window, 0, 0, 0, 0, True ); } } } diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 52c18cf..ec51d37 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1697,13 +1697,6 @@ static Window create_whole_window( Display *display, struct x11drv_win_data *dat visual, mask, &attr ); if (!data->whole_window) goto done; - if (!create_client_window( display, data, NULL )) - { - XDestroyWindow( display, data->whole_window ); - data->whole_window = 0; - goto done; - } - set_initial_wm_hints( display, data ); set_wm_hints( display, data ); @@ -1758,7 +1751,7 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data TRACE( "win %p xwin %lx/%lx\n", data->hwnd, data->whole_window, data->client_window ); XDeleteContext( display, data->whole_window, winContext ); - XDeleteContext( display, data->client_window, winContext ); + if (data->client_window) XDeleteContext( display, data->client_window, winContext ); if (!already_destroyed) XDestroyWindow( display, data->whole_window ); data->whole_window = data->client_window = 0; data->wm_state = WithdrawnState; @@ -1886,11 +1879,10 @@ static struct x11drv_win_data *create_desktop_win_data( Display *display, HWND h struct x11drv_win_data *data; if (!(data = alloc_win_data( display, hwnd ))) return NULL; - data->whole_window = data->client_window = root_window; + data->whole_window = root_window; data->managed = TRUE; SetPropA( data->hwnd, managed_prop, (HANDLE)1 ); SetPropA( data->hwnd, whole_window_prop, (HANDLE)root_window ); - SetPropA( data->hwnd, client_window_prop, (HANDLE)root_window ); set_initial_wm_hints( display, data ); return data; } From julliard at winehq.org Mon Sep 3 13:19:13 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:13 -0500 Subject: Alexandre Julliard : winex11: Store the OpenGL drawable in a separate structure with its own context. Message-ID: Module: wine Branch: master Commit: fbac3194a5b90fd05fc3c367ed797a592a9be7b2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fbac3194a5b90fd05fc3c367ed797a592a9be7b2 Author: Alexandre Julliard Date: Thu Aug 30 17:46:33 2012 +0200 winex11: Store the OpenGL drawable in a separate structure with its own context. --- dlls/winex11.drv/window.c | 247 ++++++++++++++++++++-------------------- dlls/winex11.drv/x11drv.h | 5 +- dlls/winex11.drv/x11drv_main.c | 1 + 3 files changed, 125 insertions(+), 128 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=fbac3194a5b90fd05fc3c367ed797a592a9be7b2 From julliard at winehq.org Mon Sep 3 13:19:13 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:13 -0500 Subject: Alexandre Julliard : winex11: Treat the client window as an OpenGL drawable . Message-ID: Module: wine Branch: master Commit: ef034e71e2ce225284a90b05cf001787d994a322 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ef034e71e2ce225284a90b05cf001787d994a322 Author: Alexandre Julliard Date: Thu Aug 30 18:17:05 2012 +0200 winex11: Treat the client window as an OpenGL drawable. --- dlls/winex11.drv/window.c | 176 +++++++++++++++------------------------------ dlls/winex11.drv/x11drv.h | 3 - 2 files changed, 58 insertions(+), 121 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=ef034e71e2ce225284a90b05cf001787d994a322 From julliard at winehq.org Mon Sep 3 13:19:14 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:14 -0500 Subject: Alexandre Julliard : winex11: Move the GL drawable management to opengl.c. Message-ID: Module: wine Branch: master Commit: 9f042298f793d5a2f6687e323cc6ef903a990a8b URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f042298f793d5a2f6687e323cc6ef903a990a8b Author: Alexandre Julliard Date: Fri Aug 31 12:22:03 2012 +0200 winex11: Move the GL drawable management to opengl.c. --- dlls/winex11.drv/opengl.c | 303 ++++++++++++++++++++++++++++++++++----- dlls/winex11.drv/window.c | 230 +------------------------------ dlls/winex11.drv/x11drv.h | 24 +--- dlls/winex11.drv/x11drv_main.c | 1 - 4 files changed, 270 insertions(+), 288 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=9f042298f793d5a2f6687e323cc6ef903a990a8b From julliard at winehq.org Mon Sep 3 13:19:14 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:14 -0500 Subject: Jacek Caban : mshtml: Moved getting frame by name to separated function. Message-ID: Module: wine Branch: master Commit: d3b77c4507fccfeeb7cf18e4e915be17426be6b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3b77c4507fccfeeb7cf18e4e915be17426be6b1 Author: Jacek Caban Date: Mon Sep 3 17:34:44 2012 +0200 mshtml: Moved getting frame by name to separated function. --- dlls/mshtml/htmlwindow.c | 127 ++++++++++++++++++++++++++------------------- 1 files changed, 73 insertions(+), 54 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index c45df2c..a95425a 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -322,108 +322,127 @@ static HRESULT WINAPI HTMLWindow2_Invoke(IHTMLWindow2 *iface, DISPID dispIdMembe pDispParams, pVarResult, pExcepInfo, puArgErr); } -static HRESULT get_frame_by_index(nsIDOMWindowCollection *nsFrames, PRUint32 index, HTMLOuterWindow **ret) +static HRESULT get_frame_by_index(HTMLOuterWindow *This, PRUint32 index, HTMLOuterWindow **ret) { + nsIDOMWindowCollection *nsframes; + nsIDOMWindow *nswindow; PRUint32 length; - nsIDOMWindow *nsWindow; nsresult nsres; - nsres = nsIDOMWindowCollection_GetLength(nsFrames, &length); + nsres = nsIDOMWindow_GetFrames(This->nswindow, &nsframes); if(NS_FAILED(nsres)) { - FIXME("nsIDOMWindowCollection_GetLength failed: 0x%08x\n", nsres); + FIXME("nsIDOMWindow_GetFrames failed: 0x%08x\n", nsres); return E_FAIL; } - if(index >= length) + nsres = nsIDOMWindowCollection_GetLength(nsframes, &length); + assert(nsres == NS_OK); + + if(index >= length) { + nsIDOMWindowCollection_Release(nsframes); return DISP_E_MEMBERNOTFOUND; + } - nsres = nsIDOMWindowCollection_Item(nsFrames, index, &nsWindow); + nsres = nsIDOMWindowCollection_Item(nsframes, index, &nswindow); + nsIDOMWindowCollection_Release(nsframes); if(NS_FAILED(nsres)) { FIXME("nsIDOMWindowCollection_Item failed: 0x%08x\n", nsres); return E_FAIL; } - *ret = nswindow_to_window(nsWindow); - - nsIDOMWindow_Release(nsWindow); + *ret = nswindow_to_window(nswindow); + nsIDOMWindow_Release(nswindow); return S_OK; } -static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, VARIANT *pvarResult) +static HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, HTMLOuterWindow **ret) { - HTMLWindow *This = impl_from_IHTMLWindow2(iface); - nsIDOMWindowCollection *nsFrames; + nsIDOMWindowCollection *nsframes; HTMLOuterWindow *window = NULL; - HRESULT hres = S_OK; + PRUint32 length, i; nsresult nsres; + HRESULT hres = S_OK; - TRACE("(%p)->(%p %p)\n", This, pvarIndex, pvarResult); - - nsres = nsIDOMWindow_GetFrames(This->outer_window->nswindow, &nsFrames); + nsres = nsIDOMWindow_GetFrames(This->nswindow, &nsframes); if(NS_FAILED(nsres)) { FIXME("nsIDOMWindow_GetFrames failed: 0x%08x\n", nsres); return E_FAIL; } + nsres = nsIDOMWindowCollection_GetLength(nsframes, &length); + assert(nsres == NS_OK); + + for(i = 0; i < length && !window; ++i) { + HTMLOuterWindow *window_iter; + nsIDOMWindow *nswindow; + BSTR id; + + nsres = nsIDOMWindowCollection_Item(nsframes, i, &nswindow); + if(NS_FAILED(nsres)) { + FIXME("nsIDOMWindowCollection_Item failed: 0x%08x\n", nsres); + hres = E_FAIL; + break; + } + + window_iter = nswindow_to_window(nswindow); + + nsIDOMWindow_Release(nswindow); + + hres = IHTMLElement_get_id(&window_iter->frame_element->element.IHTMLElement_iface, &id); + if(FAILED(hres)) { + FIXME("IHTMLElement_get_id failed: 0x%08x\n", hres); + break; + } + + if(id && !strcmpiW(id, name)) + window = window_iter; + + SysFreeString(id); + } + + nsIDOMWindowCollection_Release(nsframes); + if(FAILED(hres)) + return hres; + + *ret = window; + return NS_OK; +} + +static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, VARIANT *pvarResult) +{ + HTMLWindow *This = impl_from_IHTMLWindow2(iface); + HTMLOuterWindow *window = NULL; + HRESULT hres; + + TRACE("(%p)->(%p %p)\n", This, pvarIndex, pvarResult); + switch(V_VT(pvarIndex)) { case VT_I4: { int index = V_I4(pvarIndex); TRACE("Getting index %d\n", index); if(index < 0) - break; - hres = get_frame_by_index(nsFrames, index, &window); + return DISP_E_MEMBERNOTFOUND; + hres = get_frame_by_index(This->outer_window, index, &window); break; } case VT_UINT: { unsigned int index = V_UINT(pvarIndex); TRACE("Getting index %u\n", index); - hres = get_frame_by_index(nsFrames, index, &window); + hres = get_frame_by_index(This->outer_window, index, &window); break; } case VT_BSTR: { BSTR str = V_BSTR(pvarIndex); - PRUint32 length, i; - TRACE("Getting name %s\n", wine_dbgstr_w(str)); - - nsIDOMWindowCollection_GetLength(nsFrames, &length); - - window = NULL; - for(i = 0; i < length && !window; ++i) { - HTMLOuterWindow *cur_window; - nsIDOMWindow *nsWindow; - BSTR id; - - nsres = nsIDOMWindowCollection_Item(nsFrames, i, &nsWindow); - if(NS_FAILED(nsres)) { - FIXME("nsIDOMWindowCollection_Item failed: 0x%08x\n", nsres); - hres = E_FAIL; - break; - } - - cur_window = nswindow_to_window(nsWindow); - - nsIDOMWindow_Release(nsWindow); - - hres = IHTMLElement_get_id(&cur_window->frame_element->element.IHTMLElement_iface, &id); - if(FAILED(hres)) { - FIXME("IHTMLElement_get_id failed: 0x%08x\n", hres); - break; - } - - if(!strcmpW(id, str)) - window = cur_window; - - SysFreeString(id); - } + hres = get_frame_by_name(This->outer_window, str, &window); break; } default: - hres = E_INVALIDARG; + WARN("Invalid index %s\n", debugstr_variant(pvarIndex)); + return E_INVALIDARG; } - nsIDOMWindowCollection_Release(nsFrames); if(FAILED(hres)) return hres; if(!window) From julliard at winehq.org Mon Sep 3 13:19:14 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:14 -0500 Subject: Jacek Caban : mshtml: Open targeted anchors in existing frames if available . Message-ID: Module: wine Branch: master Commit: a5354174437aca0fc4c11da8d411bd7e710c44c6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5354174437aca0fc4c11da8d411bd7e710c44c6 Author: Jacek Caban Date: Mon Sep 3 12:52:15 2012 +0200 mshtml: Open targeted anchors in existing frames if available. --- dlls/mshtml/htmlanchor.c | 13 +++++++++++-- dlls/mshtml/htmlwindow.c | 7 +++++-- dlls/mshtml/mshtml_private.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index 4575d14..d9b9417 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -96,9 +96,18 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This) nsAString_Finish(&target_str); return S_OK; }else { - hres = navigate_anchor_window(This, target); + HTMLOuterWindow *top_window; + + get_top_window(This->element.node.doc->basedoc.window, &top_window); + + hres = get_frame_by_name(top_window, target, TRUE, &window); + if(FAILED(hres) || !window) { + hres = navigate_anchor_window(This, target); + nsAString_Finish(&target_str); + return hres; + } + nsAString_Finish(&target_str); - return hres; } } } diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index a95425a..1a12acc 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -356,7 +356,7 @@ static HRESULT get_frame_by_index(HTMLOuterWindow *This, PRUint32 index, HTMLOut return S_OK; } -static HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, HTMLOuterWindow **ret) +HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, BOOL deep, HTMLOuterWindow **ret) { nsIDOMWindowCollection *nsframes; HTMLOuterWindow *window = NULL; @@ -399,6 +399,9 @@ static HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, HTMLO window = window_iter; SysFreeString(id); + + if(!window && deep) + get_frame_by_name(window_iter, name, TRUE, &window); } nsIDOMWindowCollection_Release(nsframes); @@ -435,7 +438,7 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, case VT_BSTR: { BSTR str = V_BSTR(pvarIndex); TRACE("Getting name %s\n", wine_dbgstr_w(str)); - hres = get_frame_by_name(This->outer_window, str, &window); + hres = get_frame_by_name(This->outer_window, str, FALSE, &window); break; } default: diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 39b491e..2fecc12 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -906,6 +906,7 @@ void set_script_mode(HTMLOuterWindow*,SCRIPTMODE) DECLSPEC_HIDDEN; BOOL find_global_prop(HTMLInnerWindow*,BSTR,DWORD,ScriptHost**,DISPID*) DECLSPEC_HIDDEN; IDispatch *get_script_disp(ScriptHost*) DECLSPEC_HIDDEN; HRESULT search_window_props(HTMLInnerWindow*,BSTR,DWORD,DISPID*) DECLSPEC_HIDDEN; +HRESULT get_frame_by_name(HTMLOuterWindow*,const WCHAR*,BOOL,HTMLOuterWindow**) DECLSPEC_HIDDEN; HRESULT wrap_iface(IUnknown*,IUnknown*,IUnknown**) DECLSPEC_HIDDEN; From julliard at winehq.org Mon Sep 3 13:19:14 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:14 -0500 Subject: Jacek Caban : mshtml: Use nsIDOMWindowCollection:: NamedItem in get_window_by_name. Message-ID: Module: wine Branch: master Commit: 2dcb37e5203c68c4db99f7045729639021d0357a URL: http://source.winehq.org/git/wine.git/?a=commit;h=2dcb37e5203c68c4db99f7045729639021d0357a Author: Jacek Caban Date: Mon Sep 3 12:52:27 2012 +0200 mshtml: Use nsIDOMWindowCollection::NamedItem in get_window_by_name. --- dlls/mshtml/htmlwindow.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 1a12acc..2ec4a7f 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -360,6 +360,8 @@ HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, BOOL deep, H { nsIDOMWindowCollection *nsframes; HTMLOuterWindow *window = NULL; + nsIDOMWindow *nswindow; + nsAString name_str; PRUint32 length, i; nsresult nsres; HRESULT hres = S_OK; @@ -370,12 +372,24 @@ HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, BOOL deep, H return E_FAIL; } + nsAString_InitDepend(&name_str, name); + nsres = nsIDOMWindowCollection_NamedItem(nsframes, &name_str, &nswindow); + nsAString_Finish(&name_str); + if(NS_FAILED(nsres)) { + nsIDOMWindowCollection_Release(nsframes); + return E_FAIL; + } + + if(nswindow) { + *ret = nswindow_to_window(nswindow); + return S_OK; + } + nsres = nsIDOMWindowCollection_GetLength(nsframes, &length); assert(nsres == NS_OK); for(i = 0; i < length && !window; ++i) { HTMLOuterWindow *window_iter; - nsIDOMWindow *nswindow; BSTR id; nsres = nsIDOMWindowCollection_Item(nsframes, i, &nswindow); From julliard at winehq.org Mon Sep 3 13:19:14 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:14 -0500 Subject: Jacek Caban : mshtml.idl: Added IHTMLIFrameElement2 and IHTMLIFrameElement3 declarations. Message-ID: Module: wine Branch: master Commit: d71ce1a282bd9b188fff467c4cfd77739bc7e613 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d71ce1a282bd9b188fff467c4cfd77739bc7e613 Author: Jacek Caban Date: Mon Sep 3 12:52:42 2012 +0200 mshtml.idl: Added IHTMLIFrameElement2 and IHTMLIFrameElement3 declarations. --- include/mshtmdid.h | 6 ++++ include/mshtml.idl | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 0 deletions(-) diff --git a/include/mshtmdid.h b/include/mshtmdid.h index ade23f4..9e33845 100644 --- a/include/mshtmdid.h +++ b/include/mshtmdid.h @@ -2884,6 +2884,12 @@ #define DISPID_IHTMLIFRAMEELEMENT2_HEIGHT STDPROPID_XOBJ_HEIGHT #define DISPID_IHTMLIFRAMEELEMENT2_WIDTH STDPROPID_XOBJ_WIDTH +/* IHTMLIFrameElement3 */ +#define DISPID_IHTMLIFRAMEELEMENT3_CONTENTDOCUMENT DISPID_IE8_IFRAME +#define DISPID_IHTMLIFRAMEELEMENT3_IE8_SRC DISPID_IE8_IFRAME+1 +#define DISPID_IHTMLIFRAMEELEMENT3_IE8_LONGDESC DISPID_IE8_IFRAME+2 +#define DISPID_IHTMLIFRAMEELEMENT3_IE8_FRAMEBORDER DISPID_IE8_IFRAME+3 + /* IHTMLStyleElement */ #define DISPID_IHTMLSTYLEELEMENT_TYPE DISPID_STYLEELEMENT+2 #define DISPID_IHTMLSTYLEELEMENT_READYSTATE DISPID_A_READYSTATE diff --git a/include/mshtml.idl b/include/mshtml.idl index 6618ac3..f71ecac 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -17159,6 +17159,63 @@ interface IHTMLIFrameElement : IDispatch } /***************************************************************************** + * IHTMLIFrameElement2 interface + */ +[ + odl, + oleautomation, + dual, + uuid(3050f4e6-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLIFrameElement2 : IDispatch +{ + [propput, id(DISPID_IHTMLIFRAMEELEMENT2_HEIGHT)] + HRESULT height([in] VARIANT v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT2_HEIGHT)] + HRESULT height([out, retval] VARIANT *p); + + [propput, id(DISPID_IHTMLIFRAMEELEMENT2_WIDTH)] + HRESULT width([in] VARIANT v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT2_WIDTH)] + HRESULT width([out, retval] VARIANT *p); +} + +/***************************************************************************** + * IHTMLIFrameElement3 interface + */ +[ + odl, + oleautomation, + dual, + uuid(30510433-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLIFrameElement3 : IDispatch +{ + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_CONTENTDOCUMENT)] + HRESULT contentDocument([out, retval] IDispatch **p); + + [propput, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_SRC)] + HRESULT src([in] BSTR v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_SRC)] + HRESULT src([out, retval] BSTR *p); + + [propput, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_LONGDESC)] + HRESULT longDesc([in] BSTR v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_LONGDESC)] + HRESULT longDesc([out, retval] BSTR *p); + + [propput, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_FRAMEBORDER)] + HRESULT frameBorder([in] BSTR v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_FRAMEBORDER)] + HRESULT frameBorder([out, retval] BSTR *p); +} + +/***************************************************************************** * DispHTMLIFrame dispinterface */ [ @@ -17200,6 +17257,27 @@ methods: [propget, id(DISPID_IHTMLIFRAMEELEMENT2_WIDTH)] VARIANT width(); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_CONTENTDOCUMENT)] + IDispatch *contentDocument(); + + [propput, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_SRC)] + void ie8_src(BSTR v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_SRC)] + BSTR ie8_src(); + + [propput, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_LONGDESC)] + void ie8_longDesc(BSTR v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_LONGDESC)] + BSTR ie8_longDesc(); + + [propput, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_FRAMEBORDER)] + void ie8_frameBorder(BSTR v); + + [propget, id(DISPID_IHTMLIFRAMEELEMENT3_IE8_FRAMEBORDER)] + BSTR ie8_frameBorder(); } /***************************************************************************** From julliard at winehq.org Mon Sep 3 13:19:14 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:14 -0500 Subject: Jacek Caban : mshtml: Added IHTMLIFrameElement2 stub implementation. Message-ID: Module: wine Branch: master Commit: 12a35ac9de888a303580629c6204bbfb4ad5c9b3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=12a35ac9de888a303580629c6204bbfb4ad5c9b3 Author: Jacek Caban Date: Mon Sep 3 12:52:53 2012 +0200 mshtml: Added IHTMLIFrameElement2 stub implementation. --- dlls/mshtml/htmliframe.c | 107 ++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/dom.c | 1 + 3 files changed, 109 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/htmliframe.c b/dlls/mshtml/htmliframe.c index 3cae237..dccc7d0 100644 --- a/dlls/mshtml/htmliframe.c +++ b/dlls/mshtml/htmliframe.c @@ -34,6 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); typedef struct { HTMLFrameBase framebase; IHTMLIFrameElement IHTMLIFrameElement_iface; + IHTMLIFrameElement2 IHTMLIFrameElement2_iface; } HTMLIFrame; static inline HTMLIFrame *impl_from_IHTMLIFrameElement(IHTMLIFrameElement *iface) @@ -153,6 +154,107 @@ static const IHTMLIFrameElementVtbl HTMLIFrameElementVtbl = { HTMLIFrameElement_get_align }; +static inline HTMLIFrame *impl_from_IHTMLIFrameElement2(IHTMLIFrameElement2 *iface) +{ + return CONTAINING_RECORD(iface, HTMLIFrame, IHTMLIFrameElement2_iface); +} + +static HRESULT WINAPI HTMLIFrameElement2_QueryInterface(IHTMLIFrameElement2 *iface, + REFIID riid, void **ppv) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + + return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv); +} + +static ULONG WINAPI HTMLIFrameElement2_AddRef(IHTMLIFrameElement2 *iface) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + + return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface); +} + +static ULONG WINAPI HTMLIFrameElement2_Release(IHTMLIFrameElement2 *iface) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + + return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface); +} + +static HRESULT WINAPI HTMLIFrameElement2_GetTypeInfoCount(IHTMLIFrameElement2 *iface, UINT *pctinfo) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + return IDispatchEx_GetTypeInfoCount(&This->framebase.element.node.dispex.IDispatchEx_iface, + pctinfo); +} + +static HRESULT WINAPI HTMLIFrameElement2_GetTypeInfo(IHTMLIFrameElement2 *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + return IDispatchEx_GetTypeInfo(&This->framebase.element.node.dispex.IDispatchEx_iface, iTInfo, + lcid, ppTInfo); +} + +static HRESULT WINAPI HTMLIFrameElement2_GetIDsOfNames(IHTMLIFrameElement2 *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + return IDispatchEx_GetIDsOfNames(&This->framebase.element.node.dispex.IDispatchEx_iface, riid, + rgszNames, cNames, lcid, rgDispId); +} + +static HRESULT WINAPI HTMLIFrameElement2_Invoke(IHTMLIFrameElement2 *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + return IDispatchEx_Invoke(&This->framebase.element.node.dispex.IDispatchEx_iface, dispIdMember, + riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); +} + +static HRESULT WINAPI HTMLIFrameElement2_put_height(IHTMLIFrameElement2 *iface, VARIANT v) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement2_get_height(IHTMLIFrameElement2 *iface, VARIANT *p) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement2_put_width(IHTMLIFrameElement2 *iface, VARIANT v) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement2_get_width(IHTMLIFrameElement2 *iface, VARIANT *p) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static const IHTMLIFrameElement2Vtbl HTMLIFrameElement2Vtbl = { + HTMLIFrameElement2_QueryInterface, + HTMLIFrameElement2_AddRef, + HTMLIFrameElement2_Release, + HTMLIFrameElement2_GetTypeInfoCount, + HTMLIFrameElement2_GetTypeInfo, + HTMLIFrameElement2_GetIDsOfNames, + HTMLIFrameElement2_Invoke, + HTMLIFrameElement2_put_height, + HTMLIFrameElement2_get_height, + HTMLIFrameElement2_put_width, + HTMLIFrameElement2_get_width +}; + static inline HTMLIFrame *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLIFrame, framebase.element.node); @@ -165,6 +267,9 @@ static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) if(IsEqualGUID(&IID_IHTMLIFrameElement, riid)) { TRACE("(%p)->(IID_IHTMLIFrameElement %p)\n", This, ppv); *ppv = &This->IHTMLIFrameElement_iface; + }else if(IsEqualGUID(&IID_IHTMLIFrameElement2, riid)) { + TRACE("(%p)->(IID_IHTMLIFrameElement2 %p)\n", This, ppv); + *ppv = &This->IHTMLIFrameElement2_iface; }else { return HTMLFrameBase_QI(&This->framebase, riid, ppv); } @@ -266,6 +371,7 @@ static const tid_t HTMLIFrame_iface_tids[] = { IHTMLFrameBase_tid, IHTMLFrameBase2_tid, IHTMLIFrameElement_tid, + IHTMLIFrameElement2_tid, 0 }; @@ -285,6 +391,7 @@ HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTML return E_OUTOFMEMORY; ret->IHTMLIFrameElement_iface.lpVtbl = &HTMLIFrameElementVtbl; + ret->IHTMLIFrameElement2_iface.lpVtbl = &HTMLIFrameElement2Vtbl; ret->framebase.element.node.vtbl = &HTMLIFrameImplVtbl; HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrame_dispex); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 2fecc12..8b5f841 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -146,6 +146,7 @@ typedef struct event_target_t event_target_t; XIID(IHTMLGenericElement) \ XIID(IHTMLHeadElement) \ XIID(IHTMLIFrameElement) \ + XIID(IHTMLIFrameElement2) \ XIID(IHTMLImageElementFactory) \ XIID(IHTMLImgElement) \ XIID(IHTMLInputElement) \ diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 760580e..1b7de75 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -336,6 +336,7 @@ static const IID * const iframe_iids[] = { &IID_IHTMLFrameBase, &IID_IHTMLFrameBase2, &IID_IHTMLIFrameElement, + &IID_IHTMLIFrameElement2, &IID_IConnectionPointContainer, NULL }; From julliard at winehq.org Mon Sep 3 13:19:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:15 -0500 Subject: Jacek Caban : mshtml: Added IHTMLIFrameElement3 stub implementation. Message-ID: Module: wine Branch: master Commit: fcc3a77ae5e8be2fa6d540cdde5569a9d384635d URL: http://source.winehq.org/git/wine.git/?a=commit;h=fcc3a77ae5e8be2fa6d540cdde5569a9d384635d Author: Jacek Caban Date: Mon Sep 3 13:16:57 2012 +0200 mshtml: Added IHTMLIFrameElement3 stub implementation. --- dlls/mshtml/htmliframe.c | 131 ++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 1 + 2 files changed, 132 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/htmliframe.c b/dlls/mshtml/htmliframe.c index dccc7d0..faeb8f3 100644 --- a/dlls/mshtml/htmliframe.c +++ b/dlls/mshtml/htmliframe.c @@ -35,6 +35,7 @@ typedef struct { HTMLFrameBase framebase; IHTMLIFrameElement IHTMLIFrameElement_iface; IHTMLIFrameElement2 IHTMLIFrameElement2_iface; + IHTMLIFrameElement3 IHTMLIFrameElement3_iface; } HTMLIFrame; static inline HTMLIFrame *impl_from_IHTMLIFrameElement(IHTMLIFrameElement *iface) @@ -255,6 +256,131 @@ static const IHTMLIFrameElement2Vtbl HTMLIFrameElement2Vtbl = { HTMLIFrameElement2_get_width }; +static inline HTMLIFrame *impl_from_IHTMLIFrameElement3(IHTMLIFrameElement3 *iface) +{ + return CONTAINING_RECORD(iface, HTMLIFrame, IHTMLIFrameElement3_iface); +} + +static HRESULT WINAPI HTMLIFrameElement3_QueryInterface(IHTMLIFrameElement3 *iface, + REFIID riid, void **ppv) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + + return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv); +} + +static ULONG WINAPI HTMLIFrameElement3_AddRef(IHTMLIFrameElement3 *iface) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + + return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface); +} + +static ULONG WINAPI HTMLIFrameElement3_Release(IHTMLIFrameElement3 *iface) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + + return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface); +} + +static HRESULT WINAPI HTMLIFrameElement3_GetTypeInfoCount(IHTMLIFrameElement3 *iface, UINT *pctinfo) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + return IDispatchEx_GetTypeInfoCount(&This->framebase.element.node.dispex.IDispatchEx_iface, + pctinfo); +} + +static HRESULT WINAPI HTMLIFrameElement3_GetTypeInfo(IHTMLIFrameElement3 *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + return IDispatchEx_GetTypeInfo(&This->framebase.element.node.dispex.IDispatchEx_iface, iTInfo, + lcid, ppTInfo); +} + +static HRESULT WINAPI HTMLIFrameElement3_GetIDsOfNames(IHTMLIFrameElement3 *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + return IDispatchEx_GetIDsOfNames(&This->framebase.element.node.dispex.IDispatchEx_iface, riid, + rgszNames, cNames, lcid, rgDispId); +} + +static HRESULT WINAPI HTMLIFrameElement3_Invoke(IHTMLIFrameElement3 *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + return IDispatchEx_Invoke(&This->framebase.element.node.dispex.IDispatchEx_iface, dispIdMember, + riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); +} + +static HRESULT WINAPI HTMLIFrameElement3_get_contentDocument(IHTMLIFrameElement3 *iface, IDispatch **p) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement3_put_src(IHTMLIFrameElement3 *iface, BSTR v) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement3_get_src(IHTMLIFrameElement3 *iface, BSTR *p) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement3_put_longDesc(IHTMLIFrameElement3 *iface, BSTR v) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement3_get_longDesc(IHTMLIFrameElement3 *iface, BSTR *p) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement3_put_frameBorder(IHTMLIFrameElement3 *iface, BSTR v) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLIFrameElement3_get_frameBorder(IHTMLIFrameElement3 *iface, BSTR *p) +{ + HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static const IHTMLIFrameElement3Vtbl HTMLIFrameElement3Vtbl = { + HTMLIFrameElement3_QueryInterface, + HTMLIFrameElement3_AddRef, + HTMLIFrameElement3_Release, + HTMLIFrameElement3_GetTypeInfoCount, + HTMLIFrameElement3_GetTypeInfo, + HTMLIFrameElement3_GetIDsOfNames, + HTMLIFrameElement3_Invoke, + HTMLIFrameElement3_get_contentDocument, + HTMLIFrameElement3_put_src, + HTMLIFrameElement3_get_src, + HTMLIFrameElement3_put_longDesc, + HTMLIFrameElement3_get_longDesc, + HTMLIFrameElement3_put_frameBorder, + HTMLIFrameElement3_get_frameBorder +}; + static inline HTMLIFrame *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLIFrame, framebase.element.node); @@ -270,6 +396,9 @@ static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) }else if(IsEqualGUID(&IID_IHTMLIFrameElement2, riid)) { TRACE("(%p)->(IID_IHTMLIFrameElement2 %p)\n", This, ppv); *ppv = &This->IHTMLIFrameElement2_iface; + }else if(IsEqualGUID(&IID_IHTMLIFrameElement3, riid)) { + TRACE("(%p)->(IID_IHTMLIFrameElement3 %p)\n", This, ppv); + *ppv = &This->IHTMLIFrameElement3_iface; }else { return HTMLFrameBase_QI(&This->framebase, riid, ppv); } @@ -372,6 +501,7 @@ static const tid_t HTMLIFrame_iface_tids[] = { IHTMLFrameBase2_tid, IHTMLIFrameElement_tid, IHTMLIFrameElement2_tid, + IHTMLIFrameElement3_tid, 0 }; @@ -392,6 +522,7 @@ HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTML ret->IHTMLIFrameElement_iface.lpVtbl = &HTMLIFrameElementVtbl; ret->IHTMLIFrameElement2_iface.lpVtbl = &HTMLIFrameElement2Vtbl; + ret->IHTMLIFrameElement3_iface.lpVtbl = &HTMLIFrameElement3Vtbl; ret->framebase.element.node.vtbl = &HTMLIFrameImplVtbl; HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrame_dispex); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 8b5f841..f23dc10 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -147,6 +147,7 @@ typedef struct event_target_t event_target_t; XIID(IHTMLHeadElement) \ XIID(IHTMLIFrameElement) \ XIID(IHTMLIFrameElement2) \ + XIID(IHTMLIFrameElement3) \ XIID(IHTMLImageElementFactory) \ XIID(IHTMLImgElement) \ XIID(IHTMLInputElement) \ From julliard at winehq.org Mon Sep 3 13:19:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:15 -0500 Subject: Marcus Meissner : gdiplus: Avoid uninitialized usage of bitmap (Coverity). Message-ID: Module: wine Branch: master Commit: 5ae8629fca1eefc6cc16d5c8843e0888205ff179 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5ae8629fca1eefc6cc16d5c8843e0888205ff179 Author: Marcus Meissner Date: Mon Sep 3 18:56:47 2012 +0200 gdiplus: Avoid uninitialized usage of bitmap (Coverity). --- dlls/gdiplus/image.c | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index c3a542b..b657969 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -3124,17 +3124,19 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, UINT active_fr IWICBitmapSource_Release(source); } - bitmap->metadata_reader = NULL; - if (IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&block_reader) == S_OK) - { - UINT block_count = 0; - if (IWICMetadataBlockReader_GetCount(block_reader, &block_count) == S_OK && block_count) - IWICMetadataBlockReader_GetReaderByIndex(block_reader, 0, &bitmap->metadata_reader); - IWICMetadataBlockReader_Release(block_reader); - } + if (SUCCEEDED(hr)) { + bitmap->metadata_reader = NULL; + if (IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&block_reader) == S_OK) + { + UINT block_count = 0; + if (IWICMetadataBlockReader_GetCount(block_reader, &block_count) == S_OK && block_count) + IWICMetadataBlockReader_GetReaderByIndex(block_reader, 0, &bitmap->metadata_reader); + IWICMetadataBlockReader_Release(block_reader); + } - palette = get_palette(frame, palette_type); - IWICBitmapFrameDecode_Release(frame); + palette = get_palette(frame, palette_type); + IWICBitmapFrameDecode_Release(frame); + } } IWICBitmapDecoder_Release(decoder); From julliard at winehq.org Mon Sep 3 13:19:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:15 -0500 Subject: Marcus Meissner : dinput: No need for null ptr check of pKeyboard. Message-ID: Module: wine Branch: master Commit: 439605634e193ba0147058afc40b2d15c2fce7e5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=439605634e193ba0147058afc40b2d15c2fce7e5 Author: Marcus Meissner Date: Mon Sep 3 19:02:54 2012 +0200 dinput: No need for null ptr check of pKeyboard. --- dlls/dinput/tests/keyboard.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/tests/keyboard.c b/dlls/dinput/tests/keyboard.c index 5d32abe..4cd36c4 100644 --- a/dlls/dinput/tests/keyboard.c +++ b/dlls/dinput/tests/keyboard.c @@ -190,7 +190,7 @@ static void test_capabilities(LPDIRECTINPUT pDI, HWND hwnd) ok (LOWORD(HIBYTE(caps.dwDevType)) != DIDEVTYPEKEYBOARD_UNKNOWN, "GetCapabilities invalid device subtype for dwDevType: 0x%08x\n", caps.dwDevType); - if (pKeyboard) IUnknown_Release(pKeyboard); + IUnknown_Release(pKeyboard); } static void keyboard_tests(DWORD version) From julliard at winehq.org Mon Sep 3 13:19:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:15 -0500 Subject: Marcus Meissner : msctf: Also free the sink in the non-source branch ( Coverity). Message-ID: Module: wine Branch: master Commit: 2288851c90197398e9cae200deaff34c29af6754 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2288851c90197398e9cae200deaff34c29af6754 Author: Marcus Meissner Date: Mon Sep 3 19:07:55 2012 +0200 msctf: Also free the sink in the non-source branch (Coverity). --- dlls/msctf/tests/inputprocessor.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index a732730..027795d 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -1901,10 +1901,9 @@ static void test_TStoApplicationText(void) { hr = ITfSource_UnadviseSink(source, editSinkCookie); ok(SUCCEEDED(hr),"Failed to unadvise Sink\n"); - ITfTextEditSink_Release(sink); ITfSource_Release(source); } - + ITfTextEditSink_Release(sink); ITfContext_Release(cxt); ITfDocumentMgr_Release(dm); ITfEditSession_Release(es); From julliard at winehq.org Mon Sep 3 13:19:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:15 -0500 Subject: Marcus Meissner : joy.cpl: Added missing break; (Coverity). Message-ID: Module: wine Branch: master Commit: bf8c45f3edc73a99226b45eb5d43ba5da391d6f6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf8c45f3edc73a99226b45eb5d43ba5da391d6f6 Author: Marcus Meissner Date: Mon Sep 3 19:23:07 2012 +0200 joy.cpl: Added missing break; (Coverity). --- dlls/joy.cpl/main.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/joy.cpl/main.c b/dlls/joy.cpl/main.c index e72f93d..dec83ff 100644 --- a/dlls/joy.cpl/main.c +++ b/dlls/joy.cpl/main.c @@ -310,6 +310,7 @@ static INT_PTR CALLBACK list_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM initialize_disabled_joysticks_list(hwnd); } } + break; case IDC_JOYSTICKLIST: EnableWindow(GetDlgItem(hwnd, IDC_BUTTONENABLE), FALSE); From julliard at winehq.org Mon Sep 3 13:19:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 03 Sep 2012 13:19:15 -0500 Subject: Marcus Meissner : wbemprox: Break out of loop when out of memory (Coverity) . Message-ID: Module: wine Branch: master Commit: 54f06e6b8425ec1a35f46ba491d5b70ba5ad7c69 URL: http://source.winehq.org/git/wine.git/?a=commit;h=54f06e6b8425ec1a35f46ba491d5b70ba5ad7c69 Author: Marcus Meissner Date: Mon Sep 3 19:23:25 2012 +0200 wbemprox: Break out of loop when out of memory (Coverity). --- dlls/wbemprox/builtin.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 19afa0c..01a7da4 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -924,6 +924,11 @@ static void fill_service( struct table *table ) service = OpenServiceW(manager, services[i].lpServiceName, GENERIC_READ); QueryServiceConfigW(service, NULL, 0, &size); config = heap_alloc(size); + if (!config) + { + CloseServiceHandle(service); + break; + } if (QueryServiceConfigW(service, config, size, &size)) startmode = config->dwStartType; else From jnewman at winehq.org Tue Sep 4 09:37:22 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Tue, 04 Sep 2012 09:37:22 -0500 Subject: =?UTF-8?Q?=C5=81ukasz=20Wojni=C5=82owicz=20?=: Polish translation for release 1.5.12 Message-ID: Module: website Branch: master Commit: 9742656520f44dcc3e1460c4abc0950455f9bf1f URL: http://source.winehq.org/git/website.git/?a=commit;h=9742656520f44dcc3e1460c4abc0950455f9bf1f Author: ?ukasz Wojni?owicz Date: Sat Sep 1 08:56:17 2012 +0200 Polish translation for release 1.5.12 --- news/pl/2012083101.xml | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/news/pl/2012083101.xml b/news/pl/2012083101.xml new file mode 100644 index 0000000..f64a5c9 --- /dev/null +++ b/news/pl/2012083101.xml @@ -0,0 +1,15 @@ + +Sierpie? 31, 2012 +Wydano Wine 1.5.12 + +

Wydanie rozwojowe Wine 1.5.12 jest ju? dost?pne.

+

Co nowego w tym wydaniu: +

    +
  • Wsparcie dla wy??czania poszczeg?lnych joystick?w.
  • +
  • Lepsze wsparcie dla tablic sta?ych D3DX9.
  • +
  • Pewne ulepszenia w XRandR.
  • +
  • Rozmaite poprawki b??d?w.
  • +

+

?r?d?o jest ju? dost?pne. +Paczki binarne s? w trakcie budowy i uka?? si? wkr?tce w przeznaczonych dla nich pobieralniach. +

From jnewman at winehq.org Tue Sep 4 09:37:22 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Tue, 04 Sep 2012 09:37:22 -0500 Subject: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: French translation for release 1.5.12 Message-ID: Module: website Branch: master Commit: 81d387adee7260ef6146de5399f7506446e03315 URL: http://source.winehq.org/git/website.git/?a=commit;h=81d387adee7260ef6146de5399f7506446e03315 Author: Fr?d?ric Delanoy Date: Sun Sep 2 02:10:21 2012 +0200 French translation for release 1.5.12 --- news/fr/2012083101.xml | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/news/fr/2012083101.xml b/news/fr/2012083101.xml new file mode 100644 index 0000000..d45bda2 --- /dev/null +++ b/news/fr/2012083101.xml @@ -0,0 +1,14 @@ + +31 ao?t 2012 +Sortie de Wine 1.5.12 + +

La version de d?veloppement 1.5.12 de Wine est disponible.

+

Nouveaut?s de cette version : +

    +
  • Prise en charge de la d?sactivation de joysticks individuels.
  • +
  • Meilleure prise en charge des tables de constantes D3DX9.
  • +
  • Quelques am?liorations XRandR.
  • +
  • Diverses corrections de bogues.
  • +

+

Le code source est disponible d?s ? pr?sent. Les paquets binaires sont en cours de construction, et appara?tront sous peu sur leurs sites de t?l?chargement respectifs. +

From jnewman at winehq.org Tue Sep 4 09:37:22 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Tue, 04 Sep 2012 09:37:22 -0500 Subject: Kyle Auble : Clean up some links Message-ID: Module: website Branch: master Commit: 57651136b7ff5d0deb24922fb6fca54faba9fad8 URL: http://source.winehq.org/git/website.git/?a=commit;h=57651136b7ff5d0deb24922fb6fca54faba9fad8 Author: Kyle Auble Date: Sun Sep 2 22:33:19 2012 -0700 Clean up some links --- templates/en/history.template | 3 ++- templates/he/history.template | 3 ++- templates/pl/about.template | 11 ++++++----- templates/pt/about.template | 11 ++++++----- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/templates/en/history.template b/templates/en/history.template index 29a0983..2d5cb72 100644 --- a/templates/en/history.template +++ b/templates/en/history.template @@ -252,7 +252,8 @@ and finish those important user interfaces and documentation bits. Previous: About Wine - Why Wine is so important :Next + Why Wine is so important : + Next diff --git a/templates/he/history.template b/templates/he/history.template index e89ea73..f25fbfb 100644 --- a/templates/he/history.template +++ b/templates/he/history.template @@ -224,7 +224,8 @@ and finish those important user interfaces and documentation bits. ?????: ?? ????? Wine - ???? Wine ?? ?? ????? :??? + ???? Wine ?? ?? ????? : + ??? diff --git a/templates/pl/about.template b/templates/pl/about.template index c09acba..f8a72f0 100644 --- a/templates/pl/about.template +++ b/templates/pl/about.template @@ -34,10 +34,10 @@ Julliard kieruje projektem Wine, i mo?na si? z nim skontaktowa? przez e-mail

Zebrali?my r?wnie? kr?tk? list? zasob?w aby pom?c ci zrozumie? ten projekt:

From jnewman at winehq.org Tue Sep 4 09:37:22 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Tue, 04 Sep 2012 09:37:22 -0500 Subject: Kyle Auble : Delete moved acknowledgement pages Message-ID: Module: website Branch: master Commit: dac02682581cfaf8477aa9dcd5620f21e1f5b534 URL: http://source.winehq.org/git/website.git/?a=commit;h=dac02682581cfaf8477aa9dcd5620f21e1f5b534 Author: Kyle Auble Date: Sun Sep 2 22:33:54 2012 -0700 Delete moved acknowledgement pages --- templates/de/acknowledgement.template | 209 -------------------------------- templates/en/acknowledgement.template | 207 ------------------------------- templates/he/acknowledgement.template | 195 ------------------------------ templates/pl/acknowledgement.template | 206 ------------------------------- templates/pt/acknowledgement.template | 214 --------------------------------- 5 files changed, 0 insertions(+), 1031 deletions(-) Diff: http://source.winehq.org/git/website.git/?a=commitdiff;h=dac02682581cfaf8477aa9dcd5620f21e1f5b534 From jnewman at winehq.org Tue Sep 4 09:37:22 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Tue, 04 Sep 2012 09:37:22 -0500 Subject: Kyle Auble : Move Spanish patch guide to wiki Message-ID: Module: website Branch: master Commit: f418f863859805a1dba5c57a9bcd29ac8a0e1522 URL: http://source.winehq.org/git/website.git/?a=commit;h=f418f863859805a1dba5c57a9bcd29ac8a0e1522 Author: Kyle Auble Date: Sun Sep 2 22:34:04 2012 -0700 Move Spanish patch guide to wiki --- templates/es/sending_patches.template | 119 --------------------------------- 1 files changed, 0 insertions(+), 119 deletions(-) diff --git a/templates/es/sending_patches.template b/templates/es/sending_patches.template deleted file mode 100644 index 38cbb58..0000000 --- a/templates/es/sending_patches.template +++ /dev/null @@ -1,119 +0,0 @@ - - - -

Generando y enviando parches

- -

Nota: esto es una referencia r?pida sobre como enviarnos -parches. Para obtener instrucciones detalladas por favor vea el -cap?tulo -Pr?ctica de -codificaci?n en nuestra documentaci?n en linea. -

- -

Por favor envie los parches a la lista de correo de parches de -Wine, -wine-patches at winehq.org . -(Tenga en cuenta que si usted no est? suscrito -a la lista de correo, los administradores de la lista de correo -deben comprobar primero su env?o para asegurarse de que no se trata de spam -antes de que se pueda aceptar el parche. -No habr? ning?n intento de aplicar los parches que no aparezcan en el grupo de noticias -o en cualquier otro lugar que no sea el ?rbol Git) -

- -

Al presentar parches, por favor:

-
    -
  • Incluya una entrada del fichero de cambios (ChangeLog) con su - nombre real, direcci?n de correo electr?nico y - una descripci?n de lo que hace el parche. - -
  • Mantenga el parche peque?o y el punto del cambio claro. - -
  • Env?e un arreglo o grupo de cambios relacionados por parche. - -
  • Genere su parche de nuevo con la versi?n m?s reciente de Wine desde el ?rbol Git WineHQ (v?ase m?s adelante). - -
  • Pon a prueba tu parche, y si es posible escribe una prueba que demuestre que es correcto. - -
  • Tenga cuidado de no corromper el parche a trav?s de envolturas de l?nea. - -
  • Evite innecesariamente cambios de formateo del c?digo. - -
  • No mezcle tabuladores y espacios porque hace que la salida diff sea ilegible, use identaci?n consistente. - -
  • Use C est?ndar, evite comentarios C++ y declaraciones de variables en l?nea. - -
  • Lea el diff y aseg?rese de que contenga s?lo lo que quiere en ?l. -
- -

Los parches aceptados se publicar?n en la lista de correo wine-cvs . - -

Los parches con problemas evidentes pueden recibir una respuesta en wine-devel. - -

Algunos parches no podr?n recibir ninguna respuesta. En ese caso, su parche - puede considerarse Obviamente No Correcto, y puede hacer lo siguiente: - -

    -
  • Compruebe el parche usted mismo, y piense en lo que se puede hacer para - aclarar el parche (pistas en la lista anterior). - -
  • Escribir un correo electr?nico a wine-devel, explicando el parche y solicitud para que sea - examinado por cualquier persona encargada de revisar. - -
  • Pida consejo acerca de su parche en #winehackers. - -
  • A menos que ya existe uno, abra un bug en bugzilla describiendo el - problema que est? tratando de resolver (por ejemplo: ./configure falla en Solaris, - etc) y adjuntar su parche. - - -

    - Si el parche no ha recibido una respuesta en 3 d?as del WineHQ Git confirma - que tu parche tiene una gran oportunidad de estar en esta categor?a. -
    - Tal vez le resulte dif?cil el solicitar informaci?n, - a fin de reflexionar cuidadosamente sobre los comentarios que recibe. -
    - ?Simplemente no se d? por vencido! -

    - -
    - -

    Generaci?n de un parche para WineHQ con Git

    - -

    Es mejor enviar peque?os parches contra el actual ?rbol utilizando Git. -En primer lugar, aseg?rese de que su ?rbol es hasta la fecha, tal y como -se describe en la p?gina Git. - -

    Compruebe sus parches en su ?rbol Git utilizando -git commit.

    - -

    Si va a utilizar -git imap-send -aseg?rese de que ha creado las opciones adecuadas en su fichero de -configuraci?n de Git, y a continuaci?n, ejecute:

    - - -
    - - git format-patch --stdout --keep-subject --attach origin | git imap-send
    -
    -
    - -

    Esto deber?a subir sus parches en su carpeta de proyectos IMAP, y -le permitir? comprobar y enviarlos. En Mozilla Thunderbird, eso es tan -simple como hacer clic en "Editar Proyecto..." y luego "Enviar" si -tiene configurado el archivo de cabeceras de correo Git correctamente. - -

    Si usted no puede utilizar IMAP, utilice el siguiente comando para generar parches:

    - - -
    - - git format-patch --keep-subject origin
    -
    -
    - -

    Esto deber?a generar una serie de archivos txt, que puede enviar manualmente.

    - -

     

    From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Alexandre Julliard : user32: Only show a window the first time WS_VISIBLE is toggled, to work around Steam's WM_SETREDRAW usage. Message-ID: Module: wine Branch: master Commit: 2dc234d923b70fa0a0e1815d909035d059aa8772 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2dc234d923b70fa0a0e1815d909035d059aa8772 Author: Alexandre Julliard Date: Tue Sep 4 12:38:33 2012 +0200 user32: Only show a window the first time WS_VISIBLE is toggled, to work around Steam's WM_SETREDRAW usage. --- dlls/user32/win.c | 58 +++++++++++++++++++++++++++++++------------------- dlls/user32/win.h | 1 + dlls/user32/winpos.c | 3 ++ 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 66fc8cc..82d62b1 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -606,7 +606,7 @@ HWND WIN_SetOwner( HWND hwnd, HWND owner ) */ ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) { - BOOL ok; + BOOL ok, needs_show = FALSE; STYLESTRUCT style; WND *win = WIN_GetPtr( hwnd ); @@ -638,20 +638,29 @@ ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) } } SERVER_END_REQ; - WIN_ReleasePtr( win ); - if (ok) + + if (ok && ((style.styleOld ^ style.styleNew) & WS_VISIBLE)) { - if ((style.styleOld ^ style.styleNew) & WS_VISIBLE) - { - RECT window_rect, client_rect; - UINT flags = style.styleNew & WS_VISIBLE ? SWP_SHOWWINDOW : 0; /* we don't hide it */ + /* Some apps try to make their window visible through WM_SETREDRAW. + * Only do that if the window was never explicitly hidden, + * because Steam messes with WM_SETREDRAW after hiding its windows. */ + needs_show = !(win->flags & WIN_HIDDEN) && (style.styleNew & WS_VISIBLE); + invalidate_dce( win, NULL ); + } + WIN_ReleasePtr( win ); - WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect ); - set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | - SWP_NOZORDER | SWP_NOACTIVATE | flags, &window_rect, &client_rect, NULL ); - } - USER_Driver->pSetWindowStyle( hwnd, GWL_STYLE, &style ); + if (!ok) return 0; + + if (needs_show) + { + RECT window_rect, client_rect; + WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect ); + set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | + SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW, + &window_rect, &client_rect, NULL ); } + + USER_Driver->pSetWindowStyle( hwnd, GWL_STYLE, &style ); return style.styleOld; } @@ -2135,7 +2144,7 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicod LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, BOOL unicode ) { STYLESTRUCT style; - BOOL ok; + BOOL ok, needs_show = FALSE; LONG_PTR retval = 0; WND *wndPtr; @@ -2334,23 +2343,28 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B } } SERVER_END_REQ; + + if (offset == GWL_STYLE && ((style.styleOld ^ style.styleNew) & WS_VISIBLE)) + { + needs_show = !(wndPtr->flags & WIN_HIDDEN) && (style.styleNew & WS_VISIBLE); + invalidate_dce( wndPtr, NULL ); + } WIN_ReleasePtr( wndPtr ); if (!ok) return 0; + if (needs_show) + { + RECT window_rect, client_rect; + WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect ); + set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | + SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW, + &window_rect, &client_rect, NULL ); + } if (offset == GWL_STYLE || offset == GWL_EXSTYLE) { style.styleOld = retval; style.styleNew = newval; - if (offset == GWL_STYLE && ((style.styleOld ^ style.styleNew) & WS_VISIBLE)) - { - RECT window_rect, client_rect; - UINT flags = style.styleNew & WS_VISIBLE ? SWP_SHOWWINDOW : 0; /* we don't hide it */ - - WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect ); - set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | - SWP_NOZORDER | SWP_NOACTIVATE | flags, &window_rect, &client_rect, NULL ); - } USER_Driver->pSetWindowStyle( hwnd, offset, &style ); SendMessageW( hwnd, WM_STYLECHANGED, offset, (LPARAM)&style ); } diff --git a/dlls/user32/win.h b/dlls/user32/win.h index 13ee58e..7c899ac 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -73,6 +73,7 @@ typedef struct tagWND #define WIN_ISUNICODE 0x0010 /* Window is Unicode */ #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0020 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */ #define WIN_CHILDREN_MOVED 0x0040 /* children may have moved, ignore stored positions */ +#define WIN_HIDDEN 0x0080 /* hidden by an explicit SWP_HIDEWINDOW (as opposed to WM_SETREDRAW) */ /* Window functions */ extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 23b0b7f..507a5ce 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1872,6 +1872,9 @@ static BOOL fixup_flags( WINDOWPOS *winpos ) parent = GetAncestor( winpos->hwnd, GA_PARENT ); if (!IsWindowVisible( parent )) winpos->flags |= SWP_NOREDRAW; + if (winpos->flags & SWP_HIDEWINDOW) wndPtr->flags |= WIN_HIDDEN; + else if (winpos->flags & SWP_SHOWWINDOW) wndPtr->flags &= ~WIN_HIDDEN; + if (wndPtr->dwStyle & WS_VISIBLE) winpos->flags &= ~SWP_SHOWWINDOW; else { From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Alexandre Julliard : server: Always repaint the whole non-client area if part of it is exposed. Message-ID: Module: wine Branch: master Commit: a76f60d14ef8f30063219f9b333d88e24f7d5865 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a76f60d14ef8f30063219f9b333d88e24f7d5865 Author: Alexandre Julliard Date: Tue Sep 4 13:37:46 2012 +0200 server: Always repaint the whole non-client area if part of it is exposed. --- server/window.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/server/window.c b/server/window.c index fefe1ac..b6fcde0 100644 --- a/server/window.c +++ b/server/window.c @@ -1631,6 +1631,14 @@ static void set_window_pos( struct window *win, struct window *previous, client_rect->bottom - old_client_rect.bottom != y_offset || !valid_rects || memcmp( &valid_rects[0], client_rect, sizeof(*client_rect) )); + /* if part of the non-client area was exposed, consider it changed */ + if (exposed_rgn && !frame_changed) + { + get_region_extents( exposed_rgn, &rect ); + offset_rect( &rect, client_rect->left, client_rect->top ); + frame_changed = (rect.left < client_rect->left || rect.top < client_rect->top || + rect.right > client_rect->right || rect.bottom > client_rect->bottom); + } } if (frame_changed || client_changed) From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Alexandre Julliard : winex11: Create the whole window at window creation time. Message-ID: Module: wine Branch: master Commit: ea07c310ecfee6b301e7af8413760eb446e6f184 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ea07c310ecfee6b301e7af8413760eb446e6f184 Author: Alexandre Julliard Date: Tue Sep 4 13:34:15 2012 +0200 winex11: Create the whole window at window creation time. --- dlls/winex11.drv/opengl.c | 3 +-- dlls/winex11.drv/systray.c | 5 +---- dlls/winex11.drv/window.c | 29 ++++++++--------------------- dlls/winex11.drv/x11drv.h | 1 - 4 files changed, 10 insertions(+), 28 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index a2d88a0..b23ec98 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1176,8 +1176,7 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) if (!(format = pixelformat_from_fbconfig_id( fbconfig_id ))) return FALSE; - if (!(data = X11DRV_get_win_data(hwnd)) && - !(data = X11DRV_create_win_data(hwnd))) return FALSE; + if (!(data = X11DRV_get_win_data(hwnd))) return FALSE; gl = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*gl) ); gl->pixel_format = format; diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c index 7efc63d..f46ea29 100644 --- a/dlls/winex11.drv/systray.c +++ b/dlls/winex11.drv/systray.c @@ -517,10 +517,7 @@ static void dock_systray_icon( Display *display, struct tray_icon *icon, Window icon->window = CreateWindowW( icon_classname, NULL, WS_CLIPSIBLINGS | WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT, icon_cx, icon_cy, NULL, NULL, NULL, icon ); - if (!icon->window) return; - - if (!(data = X11DRV_get_win_data( icon->window )) && - !(data = X11DRV_create_win_data( icon->window ))) return; + if (!(data = X11DRV_get_win_data( icon->window ))) return; TRACE( "icon window %p/%lx managed %u\n", data->hwnd, data->whole_window, data->managed ); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 7d2d1e2..e5b731c 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -911,12 +911,9 @@ static Window get_owner_whole_window( HWND owner, BOOL force_managed ) if (!owner) return 0; - if (!(data = X11DRV_get_win_data( owner ))) - { - if (!(data = X11DRV_create_win_data( owner ))) - return (Window)GetPropA( owner, whole_window_prop ); - } - else if (!data->managed && force_managed) /* make it managed */ + if (!(data = X11DRV_get_win_data( owner ))) return (Window)GetPropA( owner, whole_window_prop ); + + if (!data->managed && force_managed) /* make it managed */ { SetWindowPos( owner, 0, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE | @@ -1722,7 +1719,8 @@ struct x11drv_win_data *X11DRV_get_win_data( HWND hwnd ) * * Create an X11 data window structure for an existing window. */ -struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd ) +static struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd, const RECT *window_rect, + const RECT *client_rect ) { Display *display; struct x11drv_win_data *data; @@ -1733,16 +1731,11 @@ struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd ) /* don't create win data for HWND_MESSAGE windows */ if (parent != GetDesktopWindow() && !GetAncestor( parent, GA_PARENT )) return NULL; - if (GetWindowThreadProcessId( hwnd, NULL ) != GetCurrentThreadId()) return NULL; - display = thread_init_display(); if (!(data = alloc_win_data( display, hwnd ))) return NULL; - GetWindowRect( hwnd, &data->window_rect ); - MapWindowPoints( 0, parent, (POINT *)&data->window_rect, 2 ); - data->whole_rect = data->window_rect; - GetClientRect( hwnd, &data->client_rect ); - MapWindowPoints( hwnd, parent, (POINT *)&data->client_rect, 2 ); + data->whole_rect = data->window_rect = *window_rect; + data->client_rect = *client_rect; if (parent == GetDesktopWindow()) { @@ -2076,14 +2069,8 @@ void CDECL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flag const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ) { struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); - DWORD style = GetWindowLongW( hwnd, GWL_STYLE ); - if (!data) - { - /* create the win data if the window is being made visible */ - if (!(style & WS_VISIBLE) && !(swp_flags & SWP_SHOWWINDOW)) return; - if (!(data = X11DRV_create_win_data( hwnd ))) return; - } + if (!data && !(data = X11DRV_create_win_data( hwnd, window_rect, client_rect ))) return; /* check if we need to switch the window to managed */ if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, window_rect )) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index d1db819..eae047a 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -551,7 +551,6 @@ struct x11drv_win_data }; extern struct x11drv_win_data *X11DRV_get_win_data( HWND hwnd ) DECLSPEC_HIDDEN; -extern struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd ) DECLSPEC_HIDDEN; extern Window X11DRV_get_whole_window( HWND hwnd ) DECLSPEC_HIDDEN; extern XIC X11DRV_get_ic( HWND hwnd ) DECLSPEC_HIDDEN; From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Alexandre Julliard : winex11: Store the rectangle of the GL drawable and use it when updating the window size . Message-ID: Module: wine Branch: master Commit: 514eb695846b45c89c0fc0d56653d187f1840eec URL: http://source.winehq.org/git/wine.git/?a=commit;h=514eb695846b45c89c0fc0d56653d187f1840eec Author: Alexandre Julliard Date: Tue Sep 4 15:03:04 2012 +0200 winex11: Store the rectangle of the GL drawable and use it when updating the window size. --- dlls/winex11.drv/opengl.c | 70 ++++++++++++++++++++++++++++---------------- dlls/winex11.drv/window.c | 58 +------------------------------------ dlls/winex11.drv/x11drv.h | 2 +- 3 files changed, 46 insertions(+), 84 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=514eb695846b45c89c0fc0d56653d187f1840eec From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Jason Edmeades : cmd: Fix rmdir error during recursive delete. Message-ID: Module: wine Branch: master Commit: 94f9e789c94f90dad3d771cdabded15aeeedba8f URL: http://source.winehq.org/git/wine.git/?a=commit;h=94f9e789c94f90dad3d771cdabded15aeeedba8f Author: Jason Edmeades Date: Mon Sep 3 22:03:58 2012 +0100 cmd: Fix rmdir error during recursive delete. --- programs/cmd/builtins.c | 4 ++++ programs/cmd/tests/test_builtins.cmd | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index a83947b..c92822b 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1827,6 +1827,10 @@ void WCMD_remove_dir (WCHAR *command) { lpDir.pFrom = thisArg; lpDir.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI; lpDir.wFunc = FO_DELETE; + + /* SHFileOperationW needs file list with a double null termination */ + thisArg[lstrlenW(thisArg) + 1] = 0x00; + if (SHFileOperationW(&lpDir)) WCMD_print_error (); } } diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 36bc73f..13b53c5 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -1163,7 +1163,7 @@ if not exist foo ( ) mkdir foo\bar\baz echo foo > foo\bar\brol -rmdir /s /Q foo +rmdir /s /Q foo 2>&1 if not exist foo ( echo recursive rmdir succeeded ) else ( From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Jason Edmeades : cmd: Fix renaming inside directories. Message-ID: Module: wine Branch: master Commit: c5a72379a1fd8b61e649ff3c45225b7111ec1249 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5a72379a1fd8b61e649ff3c45225b7111ec1249 Author: Jason Edmeades Date: Mon Sep 3 22:48:08 2012 +0100 cmd: Fix renaming inside directories. --- programs/cmd/builtins.c | 2 +- programs/cmd/tests/test_builtins.cmd.exp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index c92822b..16f4eff 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1872,7 +1872,7 @@ void WCMD_rename (void) } /* Destination cannot contain a drive letter or directory separator */ - if ((strchrW(param1,':') != NULL) || (strchrW(param1,'\\') != NULL)) { + if ((strchrW(param2,':') != NULL) || (strchrW(param2,'\\') != NULL)) { SetLastError(ERROR_INVALID_PARAMETER); WCMD_print_error(); errorlevel = 1; diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index c444be6..b7bcd96 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -629,8 +629,8 @@ read-only file renamed dir renamed read-only dir renamed --- rename in other directory - at todo_wine@rename impossible in other directory - at todo_wine@original file still present +rename impossible in other directory +original file still present ------------ Testing move ------------ --- file move file move succeeded From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Fix ID3DXConstantTable:: GetConstantElement() for structs. Message-ID: Module: wine Branch: master Commit: b999ab16b3d5f69b3fa4b8c80a3a4d3f690c419e URL: http://source.winehq.org/git/wine.git/?a=commit;h=b999ab16b3d5f69b3fa4b8c80a3a4d3f690c419e Author: Rico Sch?ller Date: Tue Sep 4 09:44:28 2012 +0200 d3dx9: Fix ID3DXConstantTable::GetConstantElement() for structs. --- dlls/d3dx9_36/shader.c | 2 +- dlls/d3dx9_36/tests/shader.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 766b897..5745884 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -1009,7 +1009,7 @@ static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantElement(ID3DXConstant if (c && index < c->desc.Elements) { - if (c->constants) c = &c->constants[index]; + if (c->desc.Elements > 1) c = &c->constants[index]; TRACE("Returning constant %p\n", c); return handle_from_constant(c); } diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c index 2792327..ad092ab 100644 --- a/dlls/d3dx9_36/tests/shader.c +++ b/dlls/d3dx9_36/tests/shader.c @@ -1848,6 +1848,12 @@ static void test_get_shader_constant_variables(void) element = ID3DXConstantTable_GetConstantByName(ctable, "s_2[0]", "invalid"); ok(element == NULL, "GetConstantByName failed\n"); + constant = ID3DXConstantTable_GetConstantByName(ctable, NULL, "s_2[0]"); + ok(constant != NULL, "GetConstantByName failed\n"); + + element = ID3DXConstantTable_GetConstantElement(ctable, "s_2[0]", 0); + ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant); + count = ID3DXConstantTable_Release(ctable); ok(count == 0, "Release failed, got %u, expected %u\n", count, 0); } From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Make '\0' the default case in get_constant_by_name(). Message-ID: Module: wine Branch: master Commit: 7d08ae9b29fae7831d03c19d9f605f8166bd5804 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7d08ae9b29fae7831d03c19d9f605f8166bd5804 Author: Rico Sch?ller Date: Tue Sep 4 09:44:38 2012 +0200 d3dx9: Make '\0' the default case in get_constant_by_name(). --- dlls/d3dx9_36/shader.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 5745884..c62c8e5 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -752,7 +752,7 @@ static struct ctab_constant *get_constant_by_name(struct ID3DXConstantTableImpl handles = constant->constants; } - length = strcspn( name, "[." ); + length = strcspn(name, "[."); part = name + length; for (i = 0; i < count; i++) @@ -767,13 +767,9 @@ static struct ctab_constant *get_constant_by_name(struct ID3DXConstantTableImpl case '[': return get_constant_element_by_name(&handles[i], part); - case '\0': + default: TRACE("Returning parameter %p\n", &handles[i]); return &handles[i]; - - default: - FIXME("Unhandled case \"%c\"\n", *--part); - break; } } } From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Use sizeof variable instead of type. Message-ID: Module: wine Branch: master Commit: 27b7fdf66339b2c638bbf361832577569a4fde71 URL: http://source.winehq.org/git/wine.git/?a=commit;h=27b7fdf66339b2c638bbf361832577569a4fde71 Author: Rico Sch?ller Date: Tue Sep 4 09:44:51 2012 +0200 d3dx9: Use sizeof variable instead of type. --- dlls/d3dx9_36/math.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index cea4bdf..81c0b65 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -841,16 +841,16 @@ HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK* ppstack) TRACE("flags %#x, ppstack %p\n", flags, ppstack); - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXMatrixStackImpl)); - if ( object == NULL ) + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (object == NULL) { - *ppstack = NULL; - return E_OUTOFMEMORY; + *ppstack = NULL; + return E_OUTOFMEMORY; } object->ID3DXMatrixStack_iface.lpVtbl = &ID3DXMatrixStack_Vtbl; object->ref = 1; - object->stack = HeapAlloc(GetProcessHeap(), 0, INITIAL_STACK_SIZE * sizeof(D3DXMATRIX)); + object->stack = HeapAlloc(GetProcessHeap(), 0, INITIAL_STACK_SIZE * sizeof(*object->stack)); if (!object->stack) { HeapFree(GetProcessHeap(), 0, object); @@ -980,7 +980,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Pop(ID3DXMatrixStack *iface) D3DXMATRIX *new_stack; new_size = This->stack_size / 2; - new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(D3DXMATRIX)); + new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(*new_stack)); if (new_stack) { This->stack_size = new_size; @@ -1007,7 +1007,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Push(ID3DXMatrixStack *iface) if (This->stack_size > UINT_MAX / 2) return E_OUTOFMEMORY; new_size = This->stack_size * 2; - new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(D3DXMATRIX)); + new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(*new_stack)); if (!new_stack) return E_OUTOFMEMORY; This->stack_size = new_size; From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Remove ID3DXMatrixStackImpl typedef. Message-ID: Module: wine Branch: master Commit: 6268414cab8a5f84f4c7f2e06c570e4e23f8e2b8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6268414cab8a5f84f4c7f2e06c570e4e23f8e2b8 Author: Rico Sch?ller Date: Tue Sep 4 09:44:57 2012 +0200 d3dx9: Remove ID3DXMatrixStackImpl typedef. --- dlls/d3dx9_36/math.c | 48 ++++++++++++++++++++++++------------------------ 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index 81c0b65..4a477ec 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); static const ID3DXMatrixStackVtbl ID3DXMatrixStack_Vtbl; -typedef struct ID3DXMatrixStackImpl +struct ID3DXMatrixStackImpl { ID3DXMatrixStack ID3DXMatrixStack_iface; LONG ref; @@ -45,7 +45,7 @@ typedef struct ID3DXMatrixStackImpl unsigned int current; unsigned int stack_size; D3DXMATRIX *stack; -} ID3DXMatrixStackImpl; +}; /*_________________D3DXColor____________________*/ @@ -835,9 +835,9 @@ D3DXMATRIX* WINAPI D3DXMatrixTranspose(D3DXMATRIX *pout, CONST D3DXMATRIX *pm) static const unsigned int INITIAL_STACK_SIZE = 32; -HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK* ppstack) +HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK *ppstack) { - ID3DXMatrixStackImpl* object; + struct ID3DXMatrixStackImpl *object; TRACE("flags %#x, ppstack %p\n", flags, ppstack); @@ -868,9 +868,9 @@ HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK* ppstack) return D3D_OK; } -static inline ID3DXMatrixStackImpl *impl_from_ID3DXMatrixStack(ID3DXMatrixStack *iface) +static inline struct ID3DXMatrixStackImpl *impl_from_ID3DXMatrixStack(ID3DXMatrixStack *iface) { - return CONTAINING_RECORD(iface, ID3DXMatrixStackImpl, ID3DXMatrixStack_iface); + return CONTAINING_RECORD(iface, struct ID3DXMatrixStackImpl, ID3DXMatrixStack_iface); } static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *iface, REFIID riid, void **out) @@ -893,15 +893,15 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *ifac static ULONG WINAPI ID3DXMatrixStackImpl_AddRef(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) : AddRef from %d\n", This, ref - 1); return ref; } -static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack* iface) +static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); ULONG ref = InterlockedDecrement(&This->ref); if (!ref) { @@ -914,7 +914,7 @@ static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack* iface) static D3DXMATRIX* WINAPI ID3DXMatrixStackImpl_GetTop(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -923,7 +923,7 @@ static D3DXMATRIX* WINAPI ID3DXMatrixStackImpl_GetTop(ID3DXMatrixStack *iface) static HRESULT WINAPI ID3DXMatrixStackImpl_LoadIdentity(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -934,7 +934,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_LoadIdentity(ID3DXMatrixStack *iface) static HRESULT WINAPI ID3DXMatrixStackImpl_LoadMatrix(ID3DXMatrixStack *iface, CONST D3DXMATRIX *pm) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -945,7 +945,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_LoadMatrix(ID3DXMatrixStack *iface, C static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrix(ID3DXMatrixStack *iface, CONST D3DXMATRIX *pm) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -956,7 +956,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrix(ID3DXMatrixStack *iface, C static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrixLocal(ID3DXMatrixStack *iface, CONST D3DXMATRIX *pm) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -967,7 +967,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrixLocal(ID3DXMatrixStack *ifa static HRESULT WINAPI ID3DXMatrixStackImpl_Pop(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -995,7 +995,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Pop(ID3DXMatrixStack *iface) static HRESULT WINAPI ID3DXMatrixStackImpl_Push(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1023,7 +1023,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Push(ID3DXMatrixStack *iface) static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxis(ID3DXMatrixStack *iface, CONST D3DXVECTOR3 *pv, FLOAT angle) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1036,7 +1036,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxis(ID3DXMatrixStack *iface, C static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxisLocal(ID3DXMatrixStack *iface, CONST D3DXVECTOR3 *pv, FLOAT angle) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1049,7 +1049,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxisLocal(ID3DXMatrixStack *ifa static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRoll(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1062,7 +1062,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRoll(ID3DXMatrixStack * static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRollLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1075,7 +1075,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRollLocal(ID3DXMatrixSt static HRESULT WINAPI ID3DXMatrixStackImpl_Scale(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1088,7 +1088,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Scale(ID3DXMatrixStack *iface, FLOAT static HRESULT WINAPI ID3DXMatrixStackImpl_ScaleLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1101,7 +1101,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_ScaleLocal(ID3DXMatrixStack *iface, F static HRESULT WINAPI ID3DXMatrixStackImpl_Translate(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -1114,7 +1114,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Translate(ID3DXMatrixStack *iface, FL static HRESULT WINAPI ID3DXMatrixStackImpl_TranslateLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Hans Leidekker : wbemprox: Get rid of a duplicate string constant. Message-ID: Module: wine Branch: master Commit: d582950db28d8cde40c95cc2a8b4eb4926847b20 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d582950db28d8cde40c95cc2a8b4eb4926847b20 Author: Hans Leidekker Date: Tue Sep 4 13:48:54 2012 +0200 wbemprox: Get rid of a duplicate string constant. --- dlls/wbemprox/builtin.c | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 01a7da4..1016ca5 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -111,6 +111,8 @@ static const WCHAR prop_macaddressW[] = {'M','A','C','A','d','d','r','e','s','s',0}; static const WCHAR prop_manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0}; +static const WCHAR prop_maxclockspeedW[] = + {'M','a','x','C','l','o','c','k','S','p','e','e','d',0}; static const WCHAR prop_methodW[] = {'M','e','t','h','o','d',0}; static const WCHAR prop_modelW[] = @@ -163,10 +165,6 @@ static const WCHAR prop_totalphysicalmemoryW[] = {'T','o','t','a','l','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; static const WCHAR prop_typeW[] = {'T','y','p','e',0}; -static const WCHAR prop_maxclockspeedW[] = - {'M','a','x','C','l','o','c','k','S','p','e','e','d',0}; -static const WCHAR prop_numberoflogicalprocessorsW[] = - {'N','u','m','b','e','r','O','f','L','o','g','i','c','a','l','P','r','o','c','e','s','s','o','r','s',0}; static const WCHAR method_enumkeyW[] = {'E','n','u','m','K','e','y',0}; @@ -253,13 +251,13 @@ static const struct column col_process[] = }; static const struct column col_processor[] = { - { prop_cpustatusW, CIM_UINT16 }, - { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, - { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_maxclockspeedW, CIM_UINT32 }, - { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_numberoflogicalprocessorsW, CIM_UINT32 }, - { prop_processoridW, CIM_STRING|COL_FLAG_DYNAMIC } + { prop_cpustatusW, CIM_UINT16 }, + { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, + { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_maxclockspeedW, CIM_UINT32 }, + { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_numlogicalprocessorsW, CIM_UINT32 }, + { prop_processoridW, CIM_STRING|COL_FLAG_DYNAMIC } }; static const struct column col_service[] = { From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Hans Leidekker : wbemprox: Add a function to query the service configuration. Message-ID: Module: wine Branch: master Commit: bbb823f8c2aa16c56f82ebcdb6813cbf1e91109a URL: http://source.winehq.org/git/wine.git/?a=commit;h=bbb823f8c2aa16c56f82ebcdb6813cbf1e91109a Author: Hans Leidekker Date: Tue Sep 4 13:49:11 2012 +0200 wbemprox: Add a function to query the service configuration. --- dlls/wbemprox/builtin.c | 45 +++++++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 22 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 1016ca5..29d7392 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -880,6 +880,25 @@ static const WCHAR *get_service_startmode( DWORD mode ) } } +static QUERY_SERVICE_CONFIGW *query_service_config( SC_HANDLE manager, const WCHAR *name ) +{ + QUERY_SERVICE_CONFIGW *config = NULL; + SC_HANDLE service; + DWORD size; + + if (!(service = OpenServiceW( manager, name, SERVICE_QUERY_CONFIG ))) return NULL; + QueryServiceConfigW( service, NULL, 0, &size ); + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) goto done; + if (!(config = heap_alloc( size ))) goto done; + if (QueryServiceConfigW( service, config, size, &size )) goto done; + heap_free( config ); + config = NULL; + +done: + CloseServiceHandle( service ); + return config; +} + static void fill_service( struct table *table ) { struct record_service *rec; @@ -915,27 +934,8 @@ static void fill_service( struct table *table ) for (i = 0; i < count; i++) { QUERY_SERVICE_CONFIGW *config; - SC_HANDLE service; - DWORD startmode; - DWORD size; - - service = OpenServiceW(manager, services[i].lpServiceName, GENERIC_READ); - QueryServiceConfigW(service, NULL, 0, &size); - config = heap_alloc(size); - if (!config) - { - CloseServiceHandle(service); - break; - } - if (QueryServiceConfigW(service, config, size, &size)) - startmode = config->dwStartType; - else - { - ERR("failed to get %s service config data\n", debugstr_w(services[i].lpServiceName)); - startmode = SERVICE_DISABLED; - } - CloseServiceHandle(service); - heap_free(config); + + if (!(config = query_service_config( manager, services[i].lpServiceName ))) continue; status = &services[i].ServiceStatusProcess; rec = (struct record_service *)(table->data + offset); @@ -945,9 +945,10 @@ static void fill_service( struct table *table ) rec->name = heap_strdupW( services[i].lpServiceName ); rec->process_id = status->dwProcessId; rec->servicetype = get_service_type( status->dwServiceType ); - rec->startmode = get_service_startmode( startmode ); + rec->startmode = get_service_startmode( config->dwStartType ); rec->state = get_service_state( status->dwCurrentState ); rec->systemname = heap_strdupW( sysnameW ); + heap_free( config ); offset += sizeof(*rec); num_rows++; } From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Hans Leidekker : wbemprox: Add support for boolean values in get_value_bstr . Message-ID: Module: wine Branch: master Commit: 4e2c2e5a6451314cac87289818db3253dc1becc1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e2c2e5a6451314cac87289818db3253dc1becc1 Author: Hans Leidekker Date: Tue Sep 4 13:49:24 2012 +0200 wbemprox: Add support for boolean values in get_value_bstr. --- dlls/wbemprox/table.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c index 6b584ff..c6dc845 100644 --- a/dlls/wbemprox/table.c +++ b/dlls/wbemprox/table.c @@ -144,6 +144,8 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column ) static const WCHAR fmt_signed64W[] = {'%','I','6','4','d',0}; static const WCHAR fmt_unsigned64W[] = {'%','I','6','4','u',0}; static const WCHAR fmt_strW[] = {'\"','%','s','\"',0}; + static const WCHAR trueW[] = {'T','R','U','E',0}; + static const WCHAR falseW[] = {'F','A','L','S','E',0}; LONGLONG val; BSTR ret; WCHAR number[22]; @@ -158,6 +160,10 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column ) switch (table->columns[column].type & COL_TYPE_MASK) { + case CIM_BOOLEAN: + if (val) return SysAllocString( trueW ); + else return SysAllocString( falseW ); + case CIM_DATETIME: case CIM_STRING: len = strlenW( (const WCHAR *)(INT_PTR)val ) + 2; From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Hans Leidekker : wbemprox: Implement IWbemClassObject::GetObjectText. Message-ID: Module: wine Branch: master Commit: a568d08c5f7ac1ea4abf8559966be0ac1ec4a9d9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a568d08c5f7ac1ea4abf8559966be0ac1ec4a9d9 Author: Hans Leidekker Date: Tue Sep 4 13:49:40 2012 +0200 wbemprox: Implement IWbemClassObject::GetObjectText. --- dlls/wbemprox/class.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 57 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index 030aed5..c0a8cd9 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -417,13 +417,68 @@ static HRESULT WINAPI class_object_Clone( return E_NOTIMPL; } +static BSTR get_body_text( const struct table *table, UINT row, UINT *len ) +{ + static const WCHAR fmtW[] = {'\n','\t','%','s',' ','=',' ','%','s',';',0}; + BSTR value, ret; + WCHAR *p; + UINT i; + + *len = 0; + for (i = 0; i < table->num_cols; i++) + { + *len += sizeof(fmtW) / sizeof(fmtW[0]); + *len += strlenW( table->columns[i].name ); + value = get_value_bstr( table, row, i ); + *len += SysStringLen( value ); + SysFreeString( value ); + } + if (!(ret = SysAllocStringLen( NULL, *len ))) return NULL; + p = ret; + for (i = 0; i < table->num_cols; i++) + { + value = get_value_bstr( table, row, i ); + p += sprintfW( p, fmtW, table->columns[i].name, value ); + SysFreeString( value ); + } + return ret; +} + +static BSTR get_object_text( const struct view *view, UINT index ) +{ + static const WCHAR fmtW[] = + {'\n','i','n','s','t','a','n','c','e',' ','o','f',' ','%','s','\n','{','%','s','\n','}',';',0}; + UINT len, len_body, row = view->result[index]; + BSTR ret, body; + + len = sizeof(fmtW) / sizeof(fmtW[0]); + len += strlenW( view->table->name ); + if (!(body = get_body_text( view->table, row, &len_body ))) return NULL; + len += len_body; + + if (!(ret = SysAllocStringLen( NULL, len ))) return NULL; + sprintfW( ret, fmtW, view->table->name, body ); + SysFreeString( body ); + return ret; +} + static HRESULT WINAPI class_object_GetObjectText( IWbemClassObject *iface, LONG lFlags, BSTR *pstrObjectText ) { - FIXME("%p, %08x, %p\n", iface, lFlags, pstrObjectText); - return E_NOTIMPL; + struct class_object *co = impl_from_IWbemClassObject( iface ); + struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter ); + struct view *view = ec->query->view; + BSTR text; + + TRACE("%p, %08x, %p\n", iface, lFlags, pstrObjectText); + + if (lFlags) FIXME("flags %08x not implemented\n", lFlags); + + if (!(text = get_object_text( view, co->index ))) return E_OUTOFMEMORY; + *pstrObjectText = text; + return S_OK; } static HRESULT WINAPI class_object_SpawnDerivedClass( From julliard at winehq.org Tue Sep 4 12:38:36 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:36 -0500 Subject: Hans Leidekker : wbemprox: Implement Win32_ComputerSystem.DomainRole. Message-ID: Module: wine Branch: master Commit: 5c074732d5b610467f6d9e939d2c6365f483a282 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c074732d5b610467f6d9e939d2c6365f483a282 Author: Hans Leidekker Date: Tue Sep 4 13:49:57 2012 +0200 wbemprox: Implement Win32_ComputerSystem.DomainRole. --- dlls/wbemprox/builtin.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 29d7392..e3a5e6d 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -97,6 +97,8 @@ static const WCHAR prop_directionW[] = {'D','i','r','e','c','t','i','o','n',0}; static const WCHAR prop_displaynameW[] = {'D','i','s','p','l','a','y','N','a','m','e',0}; +static const WCHAR prop_domainroleW[] = + {'D','o','m','a','i','n','R','o','l','e',0}; static const WCHAR prop_drivetypeW[] = {'D','r','i','v','e','T','y','p','e',0}; static const WCHAR prop_filesystemW[] = @@ -199,6 +201,7 @@ static const struct column col_bios[] = static const struct column col_compsys[] = { { prop_descriptionW, CIM_STRING }, + { prop_domainroleW, CIM_UINT16 }, { prop_manufacturerW, CIM_STRING }, { prop_modelW, CIM_STRING }, { prop_numlogicalprocessorsW, CIM_UINT32, VT_I4 }, @@ -339,6 +342,7 @@ struct record_bios struct record_computersystem { const WCHAR *description; + UINT16 domainrole; const WCHAR *manufacturer; const WCHAR *model; UINT32 num_logical_processors; @@ -488,6 +492,7 @@ static void fill_compsys( struct table *table ) rec = (struct record_computersystem *)table->data; rec->description = compsys_descriptionW; + rec->domainrole = 0; /* standalone workstation */ rec->manufacturer = compsys_manufacturerW; rec->model = compsys_modelW; rec->num_logical_processors = get_processor_count(); From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Henri Verbeet : wined3d: Get rid of wined3d_device_get_wined3d(). Message-ID: Module: wine Branch: master Commit: 66ec8a5cfb392e28d0feb5a9a42337eac1676117 URL: http://source.winehq.org/git/wine.git/?a=commit;h=66ec8a5cfb392e28d0feb5a9a42337eac1676117 Author: Henri Verbeet Date: Tue Sep 4 13:52:30 2012 +0200 wined3d: Get rid of wined3d_device_get_wined3d(). --- dlls/wined3d/device.c | 12 ------------ dlls/wined3d/wined3d.spec | 1 - include/wine/wined3d.h | 1 - 3 files changed, 0 insertions(+), 14 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 0826957..ba8c4be 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1567,18 +1567,6 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device) device->create_parms.flags |= WINED3DCREATE_MULTITHREADED; } -HRESULT CDECL wined3d_device_get_wined3d(const struct wined3d_device *device, struct wined3d **wined3d) -{ - TRACE("device %p, wined3d %p.\n", device, wined3d); - - *wined3d = device->wined3d; - wined3d_incref(*wined3d); - - TRACE("Returning %p.\n", *wined3d); - - return WINED3D_OK; -} - UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device) { TRACE("device %p.\n", device); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index eed1174..6555ae8 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -94,7 +94,6 @@ @ cdecl wined3d_device_get_vs_consts_b(ptr long ptr long) @ cdecl wined3d_device_get_vs_consts_f(ptr long ptr long) @ cdecl wined3d_device_get_vs_consts_i(ptr long ptr long) -@ cdecl wined3d_device_get_wined3d(ptr ptr) @ cdecl wined3d_device_incref(ptr) @ cdecl wined3d_device_init_3d(ptr ptr) @ cdecl wined3d_device_init_gdi(ptr ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 4a11ff2..941bd8e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2176,7 +2176,6 @@ HRESULT __cdecl wined3d_device_get_vs_consts_f(const struct wined3d_device *devi UINT start_register, float *constants, UINT vector4f_count); HRESULT __cdecl wined3d_device_get_vs_consts_i(const struct wined3d_device *device, UINT start_register, int *constants, UINT vector4i_count); -HRESULT __cdecl wined3d_device_get_wined3d(const struct wined3d_device *device, struct wined3d **wined3d); ULONG __cdecl wined3d_device_incref(struct wined3d_device *device); HRESULT __cdecl wined3d_device_init_3d(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc); HRESULT __cdecl wined3d_device_init_gdi(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc); From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Henri Verbeet : d3d10: Handle D3D10_SVT_UINT in read_int32_value() and read_int8_value(). Message-ID: Module: wine Branch: master Commit: 0f372135bb9de3e96c92343f52257bb204765f6e URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f372135bb9de3e96c92343f52257bb204765f6e Author: Henri Verbeet Date: Tue Sep 4 13:52:31 2012 +0200 d3d10: Handle D3D10_SVT_UINT in read_int32_value() and read_int8_value(). --- dlls/d3d10/effect.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 7d07cc3..5b82777 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1084,6 +1084,7 @@ static BOOL read_int32_value(DWORD value, D3D_SHADER_VARIABLE_TYPE in_type, INT return TRUE; case D3D10_SVT_INT: + case D3D10_SVT_UINT: case D3D10_SVT_BOOL: out_data[idx] = value; return TRUE; @@ -1099,6 +1100,7 @@ static BOOL read_int8_value(DWORD value, D3D_SHADER_VARIABLE_TYPE in_type, INT8 switch (in_type) { case D3D10_SVT_INT: + case D3D10_SVT_UINT: out_data[idx] = value; return TRUE; From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Henri Verbeet : d3d10: Improve a couple of debug messages. Message-ID: Module: wine Branch: master Commit: 99d1c9ba82dc612535beb8a18c97b8c6aec7864f URL: http://source.winehq.org/git/wine.git/?a=commit;h=99d1c9ba82dc612535beb8a18c97b8c6aec7864f Author: Henri Verbeet Date: Tue Sep 4 13:52:32 2012 +0200 d3d10: Improve a couple of debug messages. --- dlls/d3d10/effect.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 5b82777..6d1337b 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1191,20 +1191,20 @@ static BOOL parse_fx10_state_group(const char **ptr, const char *data, if (property_info->container_type != container_type) { - ERR("FAIL1\n"); + ERR("Invalid container type %#x for property %#x.\n", container_type, id); return FALSE; } if (idx >= property_info->count) { - ERR("FAIL2\n"); + ERR("Invalid index %#x for property %#x.\n", idx, id); return FALSE; } if (!read_value_list(data + value_offset, property_info->type, idx, property_info->size, (char *)container + property_info->offset)) { - ERR("FAIL3\n"); + ERR("Failed to read values for property %#x.\n", id); return FALSE; } } From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Jacek Caban : mshtml: Properly expose frame and iframe element' s windows to scripts. Message-ID: Module: wine Branch: master Commit: 4ff0a82416e61a99e7b30a0c4c2a525b008bff1a URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ff0a82416e61a99e7b30a0c4c2a525b008bff1a Author: Jacek Caban Date: Tue Sep 4 13:58:39 2012 +0200 mshtml: Properly expose frame and iframe element's windows to scripts. --- dlls/mshtml/htmlwindow.c | 44 ++++++++++++++++++++++++++++++++++++++++- dlls/mshtml/mshtml_private.h | 3 +- dlls/mshtml/tests/jstest.html | 7 ++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 2ec4a7f..2ed3ca7 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2358,7 +2358,25 @@ static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName, if(hres != DISP_E_UNKNOWNNAME) return hres; - if(window->base.inner_window->doc) { + if(This->outer_window) { + HTMLOuterWindow *frame; + + hres = get_frame_by_name(This->outer_window, bstrName, FALSE, &frame); + if(SUCCEEDED(hres) && frame) { + global_prop_t *prop; + + IHTMLWindow2_Release(&frame->base.IHTMLWindow2_iface); + + prop = alloc_global_prop(window, GLOBAL_FRAMEVAR, bstrName); + if(!prop) + return E_OUTOFMEMORY; + + *pid = prop_to_dispid(window, prop); + return S_OK; + } + } + + if(window->doc) { global_prop_t *prop; IHTMLElement *elem; @@ -2603,6 +2621,30 @@ static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD FIXME("Not supported flags: %x\n", flags); return E_NOTIMPL; } + case GLOBAL_FRAMEVAR: + if(!This->base.outer_window) + return E_UNEXPECTED; + + switch(flags) { + case DISPATCH_PROPERTYGET: { + HTMLOuterWindow *frame; + + hres = get_frame_by_name(This->base.outer_window, prop->name, FALSE, &frame); + if(FAILED(hres)) + return hres; + + if(!frame) + return DISP_E_MEMBERNOTFOUND; + + V_VT(res) = VT_DISPATCH; + V_DISPATCH(res) = (IDispatch*)&frame->base.inner_window->base.IHTMLWindow2_iface; + IDispatch_AddRef(V_DISPATCH(res)); + return S_OK; + } + default: + FIXME("Not supported flags: %x\n", flags); + return E_NOTIMPL; + } case GLOBAL_DISPEXVAR: return IDispatchEx_InvokeEx(&This->dispex.IDispatchEx_iface, prop->id, 0, flags, params, res, ei, caller); default: diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f23dc10..9f10382 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -294,7 +294,8 @@ typedef struct ScriptHost ScriptHost; typedef enum { GLOBAL_SCRIPTVAR, GLOBAL_ELEMENTVAR, - GLOBAL_DISPEXVAR + GLOBAL_DISPEXVAR, + GLOBAL_FRAMEVAR } global_prop_type_t; typedef struct { diff --git a/dlls/mshtml/tests/jstest.html b/dlls/mshtml/tests/jstest.html index 99eca1a..d9d6da5 100644 --- a/dlls/mshtml/tests/jstest.html +++ b/dlls/mshtml/tests/jstest.html @@ -68,6 +68,13 @@ function test_document_name_as_index() { ok(window.formname === 1, "window.formname = " + window.formname); formname = 2; ok(window.formname === 2, "window.formname = " + window.formname); + + document.body.innerHTML = ''; + ok("iframeid" in window, "iframeid is not in window"); + e = document.getElementById("iframeid"); + ok(!!e, "e is null"); + ok(iframeid != e, "iframeid == e"); + ok(iframeid.frameElement === e, "frameid != e.contentWindow"); } function test_remove_style_attribute() { From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Jacek Caban : mshtml: Added IHTMLWindow2::onhelp property implementation. Message-ID: Module: wine Branch: master Commit: f63da13c288abf37414369443831722f40685b54 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f63da13c288abf37414369443831722f40685b54 Author: Jacek Caban Date: Tue Sep 4 13:58:58 2012 +0200 mshtml: Added IHTMLWindow2::onhelp property implementation. --- dlls/mshtml/htmlanchor.c | 8 +++----- dlls/mshtml/htmlbody.c | 1 + dlls/mshtml/htmlcomment.c | 1 + dlls/mshtml/htmlelem.c | 31 +++++++++++++++++++++++++++++++ dlls/mshtml/htmlembed.c | 1 + dlls/mshtml/htmlevent.c | 7 ++++++- dlls/mshtml/htmlevent.h | 1 + dlls/mshtml/htmlform.c | 2 +- dlls/mshtml/htmlframe.c | 2 +- dlls/mshtml/htmlgeneric.c | 1 + dlls/mshtml/htmlhead.c | 2 ++ dlls/mshtml/htmliframe.c | 2 +- dlls/mshtml/htmlimg.c | 2 +- dlls/mshtml/htmlinput.c | 2 +- dlls/mshtml/htmlmeta.c | 1 + dlls/mshtml/htmlobject.c | 2 +- dlls/mshtml/htmloption.c | 1 + dlls/mshtml/htmlscript.c | 2 +- dlls/mshtml/htmlselect.c | 2 +- dlls/mshtml/htmlstyleelem.c | 1 + dlls/mshtml/htmltable.c | 1 + dlls/mshtml/htmltablecell.c | 1 + dlls/mshtml/htmltablerow.c | 1 + dlls/mshtml/htmltextarea.c | 2 +- dlls/mshtml/htmlwindow.c | 12 ++++++++---- dlls/mshtml/mshtml_private.h | 3 ++- 26 files changed, 72 insertions(+), 20 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=f63da13c288abf37414369443831722f40685b54 From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Jacek Caban : mshtml: Added IHTMLStyle::put_pixelWidth implementation. Message-ID: Module: wine Branch: master Commit: d898f27af4f6e84fbdad403a0940eda1c6e88aad URL: http://source.winehq.org/git/wine.git/?a=commit;h=d898f27af4f6e84fbdad403a0940eda1c6e88aad Author: Jacek Caban Date: Tue Sep 4 13:59:09 2012 +0200 mshtml: Added IHTMLStyle::put_pixelWidth implementation. --- dlls/mshtml/htmlstyle.c | 15 +++++++++++++-- dlls/mshtml/tests/style.c | 10 ++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 1e068b1..cb164dc 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -594,6 +594,15 @@ static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value) return set_style_attr(This, sid, szValue, 0); } +static HRESULT set_style_pxattr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LONG value) +{ + WCHAR value_str[16]; + + sprintfW(value_str, px_formatW, value); + + return set_nsstyle_attr(nsstyle, sid, value_str, 0); +} + static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p) { nsAString str_value; @@ -2376,8 +2385,10 @@ static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p) static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->()\n", This); + + return set_style_pxattr(This->nsstyle, STYLEID_WIDTH, v); } static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index b44950c..0584ef4 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -826,6 +826,16 @@ static void test_body_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "100px"), "V_BSTR(v)=%s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); + hres = IHTMLStyle_put_pixelWidth(style, 50); + ok(hres == S_OK, "put_pixelWidth failed: %08x\n", hres); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_width(style, &v); + ok(hres == S_OK, "get_width failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "50px"), "V_BSTR(v)=%s\n", wine_dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + /* margin tests */ str = (void*)0xdeadbeef; hres = IHTMLStyle_get_margin(style, &str); From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Jacek Caban : mshtml: Added IHTMLElement::contains implementation. Message-ID: Module: wine Branch: master Commit: a1e6835d0e7466b0ade7432e7aeb4f2e6094dc76 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a1e6835d0e7466b0ade7432e7aeb4f2e6094dc76 Author: Jacek Caban Date: Tue Sep 4 13:59:22 2012 +0200 mshtml: Added IHTMLElement::contains implementation. --- dlls/mshtml/htmlelem.c | 22 ++++++++++++++++++++-- dlls/mshtml/tests/dom.c | 26 ++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 7d6620a..e44f97d 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -773,8 +773,26 @@ static HRESULT WINAPI HTMLElement_contains(IHTMLElement *iface, IHTMLElement *pC VARIANT_BOOL *pfResult) { HTMLElement *This = impl_from_IHTMLElement(iface); - FIXME("(%p)->(%p %p)\n", This, pChild, pfResult); - return E_NOTIMPL; + HTMLElement *child; + cpp_bool result; + nsresult nsres; + + TRACE("(%p)->(%p %p)\n", This, pChild, pfResult); + + child = unsafe_impl_from_IHTMLElement(pChild); + if(!child) { + ERR("not our element\n"); + return E_FAIL; + } + + nsres = nsIDOMNode_Contains(This->node.nsnode, child->node.nsnode, &result); + if(NS_FAILED(nsres)) { + ERR("failed\n"); + return E_FAIL; + } + + *pfResult = result ? VARIANT_TRUE : VARIANT_FALSE; + return S_OK; } static HRESULT WINAPI HTMLElement_get_sourceIndex(IHTMLElement *iface, LONG *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 1b7de75..149aa5e 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2117,6 +2117,18 @@ static void _test_elem_outerhtml(unsigned line, IUnknown *unk, const char *outer SysFreeString(html); } +#define test_elem_contains(a,b,c) _test_elem_contains(__LINE__,a,b,c) +static void _test_elem_contains(unsigned line, IHTMLElement *elem, IHTMLElement *elem2, VARIANT_BOOL exval) +{ + VARIANT_BOOL b; + HRESULT hres; + + b = 100; + hres = IHTMLElement_contains(elem, elem2, &b); + ok_(__FILE__,line)(hres == S_OK, "contains failed: %08x\n", hres); + ok_(__FILE__,line)(b == exval, "contains returned %x, expected %x\n", b, exval); +} + #define get_first_child(n) _get_first_child(__LINE__,n) static IHTMLDOMNode *_get_first_child(unsigned line, IUnknown *unk) { @@ -5301,13 +5313,23 @@ static void test_elems(IHTMLDocument2 *doc) elem2 = test_elem_get_parent((IUnknown*)elem); ok(elem2 != NULL, "elem2 == NULL\n"); test_node_name((IUnknown*)elem2, "BODY"); + elem3 = test_elem_get_parent((IUnknown*)elem2); - IHTMLElement_Release(elem2); ok(elem3 != NULL, "elem3 == NULL\n"); test_node_name((IUnknown*)elem3, "HTML"); + + test_elem_contains(elem3, elem2, VARIANT_TRUE); + test_elem_contains(elem3, elem, VARIANT_TRUE); + test_elem_contains(elem2, elem, VARIANT_TRUE); + test_elem_contains(elem2, elem3, VARIANT_FALSE); + test_elem_contains(elem, elem3, VARIANT_FALSE); + test_elem_contains(elem, elem2, VARIANT_FALSE); + test_elem_contains(elem, elem, VARIANT_TRUE); + IHTMLElement_Release(elem2); + elem2 = test_elem_get_parent((IUnknown*)elem3); - IHTMLElement_Release(elem3); ok(elem2 == NULL, "elem2 != NULL\n"); + IHTMLElement_Release(elem3); test_elem_getelembytag((IUnknown*)elem, ET_OPTION, 2); test_elem_getelembytag((IUnknown*)elem, ET_SELECT, 0); From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Jacek Caban : jscript: Fixed empty cases in the end of switch statement. Message-ID: Module: wine Branch: master Commit: 6ba7a1964aaec5f8e527128442a876975bee85d3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6ba7a1964aaec5f8e527128442a876975bee85d3 Author: Jacek Caban Date: Tue Sep 4 15:52:27 2012 +0200 jscript: Fixed empty cases in the end of switch statement. --- dlls/jscript/compile.c | 20 ++++++++++++++------ dlls/jscript/tests/lang.js | 26 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index f3c1df1..e45b132 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1540,18 +1540,26 @@ static HRESULT compile_switch_statement(compiler_ctx_t *ctx, switch_statement_t set_arg_uint(ctx, iter->expr ? case_jmps[i++] : default_jmp, ctx->code_off); - for(stat_iter = iter->stat; stat_iter && (!iter->next || iter->next->stat != stat_iter); stat_iter = stat_iter->next) { - hres = compile_statement(ctx, &stat_ctx, stat_iter); + if(iter->stat) { + for(stat_iter = iter->stat; stat_iter && (!iter->next || iter->next->stat != stat_iter); + stat_iter = stat_iter->next) { + hres = compile_statement(ctx, &stat_ctx, stat_iter); + if(FAILED(hres)) + break; + + if(stat_iter->next && !push_instr(ctx, OP_pop)) { + hres = E_OUTOFMEMORY; + break; + } + } if(FAILED(hres)) break; - - if(stat_iter->next && !push_instr(ctx, OP_pop)) { + }else { + if(!push_instr(ctx, OP_undefined)) { hres = E_OUTOFMEMORY; break; } } - if(FAILED(hres)) - break; } heap_free(case_jmps); diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 26a28b8..cb127da 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -757,6 +757,32 @@ case 3: ok(false, "unexpected case 3"); } +switch(1) { +case 2: + ok(false, "unexpected case 2"); + break; +default: + /* empty default */ +} + +switch(2) { +default: + ok(false, "unexpected default"); + break; +case 2: + /* empty case */ +}; + +switch(2) { +default: + ok(false, "unexpected default"); + break; +case 1: +case 2: +case 3: + /* empty case */ +}; + (function() { var i=0; From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Chae Jong Bin : netapi32: Add stub for NetScheduleJobAdd. Message-ID: Module: wine Branch: master Commit: ecdd6c58c5fe2991e06a4f159107bc65030cd762 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ecdd6c58c5fe2991e06a4f159107bc65030cd762 Author: Chae Jong Bin Date: Sat Sep 1 19:09:07 2012 -0400 netapi32: Add stub for NetScheduleJobAdd. --- dlls/netapi32/netapi32.c | 6 ++++++ dlls/netapi32/netapi32.spec | 2 +- include/lmat.h | 1 + 3 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c index 470adf0..f6c6d20 100644 --- a/dlls/netapi32/netapi32.c +++ b/dlls/netapi32/netapi32.c @@ -238,6 +238,12 @@ NET_API_STATUS WINAPI NetUseEnum(LMSTR server, DWORD level, LPBYTE* bufptr, DWOR return ERROR_NOT_SUPPORTED; } +NET_API_STATUS WINAPI NetScheduleJobAdd(LPCWSTR server, LPBYTE bufptr, LPDWORD jobid) +{ + FIXME("stub (%s, %p, %p)\n", debugstr_w(server), bufptr, jobid); + return NERR_Success; +} + NET_API_STATUS WINAPI NetScheduleJobEnum(LPCWSTR server, LPBYTE* bufptr, DWORD prefmaxsize, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resumehandle) { diff --git a/dlls/netapi32/netapi32.spec b/dlls/netapi32/netapi32.spec index f577010..50e7b0e 100644 --- a/dlls/netapi32/netapi32.spec +++ b/dlls/netapi32/netapi32.spec @@ -166,7 +166,7 @@ @ stub NetRplWkstaEnum @ stub NetRplWkstaGetInfo @ stub NetRplWkstaSetInfo -@ stub NetScheduleJobAdd +@ stdcall NetScheduleJobAdd(wstr ptr ptr) @ stub NetScheduleJobDel @ stdcall NetScheduleJobEnum(wstr ptr long ptr ptr ptr) @ stub NetScheduleJobGetInfo diff --git a/include/lmat.h b/include/lmat.h index f5b6883..fe8a9c0 100644 --- a/include/lmat.h +++ b/include/lmat.h @@ -25,6 +25,7 @@ extern "C" { #endif +NET_API_STATUS WINAPI NetScheduleJobAdd(LPCWSTR,LPBYTE,LPDWORD); NET_API_STATUS WINAPI NetScheduleJobEnum(LPCWSTR,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD); #ifdef __cplusplus From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Chae Jong Bin : fltlib: Add stub for FilterUnload. Message-ID: Module: wine Branch: master Commit: 4c6c8ed04102762a80e13a3fa1540b872ad19987 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c6c8ed04102762a80e13a3fa1540b872ad19987 Author: Chae Jong Bin Date: Sun Sep 2 08:40:12 2012 -0400 fltlib: Add stub for FilterUnload. --- dlls/fltlib/fltlib.c | 17 +++++++++++++++-- dlls/fltlib/fltlib.spec | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dlls/fltlib/fltlib.c b/dlls/fltlib/fltlib.c index 9975a29..50f46ac 100644 --- a/dlls/fltlib/fltlib.c +++ b/dlls/fltlib/fltlib.c @@ -65,7 +65,7 @@ HRESULT WINAPI FilterConnectCommunicationPort(LPCWSTR lpPortName, DWORD dwOption HRESULT WINAPI FilterFindFirst(DWORD class, LPVOID buffer, DWORD size, LPDWORD bytes_returned, LPHANDLE handle) { - FIXME("%u, %p, %u, %p, %p\n", class, buffer, size, bytes_returned, handle); + FIXME("(%u, %p, %u, %p, %p) stub\n", class, buffer, size, bytes_returned, handle); return HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS); } @@ -74,6 +74,19 @@ HRESULT WINAPI FilterFindFirst(DWORD class, LPVOID buffer, DWORD size, LPDWORD b */ HRESULT WINAPI FilterFindClose(HANDLE handle) { - FIXME("%p\n", handle); + FIXME("(%p) stub\n", handle); + return S_OK; +} + +/********************************************************************** + * FilterUnload (FLTLIB.@) + */ +HRESULT WINAPI FilterUnload(LPCWSTR lpFilterName) +{ + FIXME("(%s) stub\n", debugstr_w(lpFilterName)); + + if (!lpFilterName) + return HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER); + return S_OK; } diff --git a/dlls/fltlib/fltlib.spec b/dlls/fltlib/fltlib.spec index ecf5893..91e803b 100644 --- a/dlls/fltlib/fltlib.spec +++ b/dlls/fltlib/fltlib.spec @@ -19,7 +19,7 @@ @ stub FilterLoad @ stub FilterReplyMessage @ stub FilterSendMessage -@ stub FilterUnload +@ stdcall FilterUnload(wstr) @ stub FilterVolumeClose @ stub FilterVolumeFindClose @ stub FilterVolumeFindFirst From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Michael Geddes : tapi32: Stub some missing functions. Message-ID: Module: wine Branch: master Commit: cf41a41738865ba787dbb9e29909d680687169e8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf41a41738865ba787dbb9e29909d680687169e8 Author: Michael Geddes Date: Mon May 28 12:01:39 2012 +0800 tapi32: Stub some missing functions. --- dlls/tapi32/line.c | 9 +++++++++ dlls/tapi32/phone.c | 29 +++++++++++++++++++++++++++++ dlls/tapi32/tapi32.spec | 4 ++++ include/tapi.h | 30 ++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 0 deletions(-) diff --git a/dlls/tapi32/line.c b/dlls/tapi32/line.c index 3d8cb37..cbb5f98 100644 --- a/dlls/tapi32/line.c +++ b/dlls/tapi32/line.c @@ -544,6 +544,15 @@ DWORD WINAPI lineGetLineDevStatusA(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus) } /*********************************************************************** + * lineGetMessage (TAPI32.@) + */ +DWORD WINAPI lineGetMessage(HLINEAPP hLineApp, LPLINEMESSAGE lpMessage, DWORD dwTimeout) +{ + FIXME("(%p, %p, %08x): stub.\n", hLineApp, lpMessage, dwTimeout); + return 0; +} + +/*********************************************************************** * lineGetNewCalls (TAPI32.@) */ DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList) diff --git a/dlls/tapi32/phone.c b/dlls/tapi32/phone.c index 994d787..ed40a62 100644 --- a/dlls/tapi32/phone.c +++ b/dlls/tapi32/phone.c @@ -156,6 +156,15 @@ DWORD WINAPI phoneGetLamp(HPHONE hPhone, DWORD dwButtonLampID, } /*********************************************************************** + * phoneGetMessage (TAPI32.@) + */ +DWORD WINAPI phoneGetMessage(HPHONEAPP hPhoneApp, LPPHONEMESSAGE lpMessage, DWORD dwTimeout) +{ + FIXME("(%p, %p, %08x): stub.\n", hPhoneApp, lpMessage, dwTimeout); + return 0; +} + +/*********************************************************************** * phoneGetRing (TAPI32.@) */ DWORD WINAPI phoneGetRing(HPHONE hPhone, LPDWORD lpdwRingMode, LPDWORD lpdwVolume) @@ -205,6 +214,26 @@ DWORD WINAPI phoneInitialize(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONE } /*********************************************************************** + * phoneInitializeiExA (TAPI32.@) + */ +DWORD WINAPI phoneInitializeExA(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams) +{ + FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, lpszAppName, lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams); + *lpdwNumDevs = 0; + return 0; +} + +/*********************************************************************** + * phoneInitializeiExW (TAPI32.@) + */ +DWORD WINAPI phoneInitializeExW(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCWSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams) +{ + FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, debugstr_w(lpszAppName), lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams); + *lpdwNumDevs = 0; + return 0; +} + +/*********************************************************************** * phoneNegotiateAPIVersion (TAPI32.@) */ DWORD WINAPI phoneNegotiateAPIVersion(HPHONEAPP hPhoneApp, DWORD dwDeviceID, DWORD dwAPILowVersion, DWORD dwAPIHighVersion, LPDWORD lpdwAPIVersion, LPPHONEEXTENSIONID lpExtensionID) diff --git a/dlls/tapi32/tapi32.spec b/dlls/tapi32/tapi32.spec index b95f86f..78cd63b 100644 --- a/dlls/tapi32/tapi32.spec +++ b/dlls/tapi32/tapi32.spec @@ -53,6 +53,7 @@ @ stdcall lineGetIconA(long str ptr) @ stdcall lineGetLineDevStatus(long ptr) lineGetLineDevStatusA @ stdcall lineGetLineDevStatusA(long ptr) +@ stdcall lineGetMessage(long ptr long) @ stdcall lineGetNewCalls(long long long ptr) @ stdcall lineGetNumRings(long long ptr) @ stdcall lineGetProviderList(long ptr) lineGetProviderListA @@ -138,12 +139,15 @@ @ stdcall phoneGetIcon(long str ptr) phoneGetIconA @ stdcall phoneGetIconA(long str ptr) @ stdcall phoneGetLamp(long long ptr) +@ stdcall phoneGetMessage(long ptr long) @ stdcall phoneGetRing(long ptr ptr) @ stdcall phoneGetStatus(long ptr) phoneGetStatusA @ stdcall phoneGetStatusA(long ptr) @ stdcall phoneGetStatusMessages(long ptr ptr ptr) @ stdcall phoneGetVolume(long long ptr) @ stdcall phoneInitialize(ptr long ptr str ptr) +@ stdcall phoneInitializeExA(ptr long ptr str ptr ptr ptr) +@ stdcall phoneInitializeExW(ptr long ptr str ptr ptr ptr) @ stdcall phoneNegotiateAPIVersion(long long long long ptr ptr) @ stdcall phoneNegotiateExtVersion(long long long long long ptr) @ stdcall phoneOpen(long long ptr long long long long) diff --git a/include/tapi.h b/include/tapi.h index 9af7ea5..98d995a 100644 --- a/include/tapi.h +++ b/include/tapi.h @@ -747,6 +747,15 @@ typedef struct linetranslateoutput_tag { DWORD dwTranslateResults; } LINETRANSLATEOUTPUT, *LPLINETRANSLATEOUTPUT; +typedef struct linemessage_tag { + DWORD hDevice; + DWORD dwMessageID; + DWORD_PTR dwCallbackInstance; + DWORD_PTR dwParam1; + DWORD_PTR dwParam2; + DWORD_PTR dwParam3; +} LINEMESSAGE, *LPLINEMESSAGE; + typedef void (CALLBACK *LINECALLBACK)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); typedef struct _PHONEAPP { @@ -817,6 +826,27 @@ typedef struct phoneextensionid_tag { DWORD dwExtensionID3; } PHONEEXTENSIONID, *LPPHONEEXTENSIONID; +typedef struct phoneinitializeexparams_tag { + DWORD dwTotalSize; + DWORD dwNeededSize; + DWORD dwUsedSize; + DWORD dwOptions; + union { + HANDLE hEvent; + HANDLE hCompletionPort; + } Handles; + DWORD dwCompletionKey; +} PHONEINITIALIZEEXPARAMS, *LPPHONEINITIALIZEEXPARAMS; + +typedef struct phonemessage_tag { + DWORD hDevice; + DWORD dwMessageID; + DWORD_PTR dwCallbackInstance; + DWORD_PTR dwParam1; + DWORD_PTR dwParam2; + DWORD_PTR dwParam3; +} PHONEMESSAGE, *LPPHONEMESSAGE; + typedef struct phonestatus_tag { DWORD dwTotalSize; DWORD dwNeededSize; From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Nikolay Sivov : oleaut32: Added some VT_DECIMAL rounding tests. Message-ID: Module: wine Branch: master Commit: 2bb07936efdabba3e7309d1e25e1a3e06200c272 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2bb07936efdabba3e7309d1e25e1a3e06200c272 Author: Nikolay Sivov Date: Mon Sep 3 00:06:49 2012 +0400 oleaut32: Added some VT_DECIMAL rounding tests. --- dlls/oleaut32/tests/vartest.c | 77 +++++++++++++++++++++++++++++----------- 1 files changed, 56 insertions(+), 21 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 1ac09cd..94bbf7e 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -3240,6 +3240,32 @@ static void test_Round( int line, VARIANT *arg, int deci, VARIANT *expected ) V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ test_Round( __LINE__, &v, deci, &exp ) +struct decimal_t { + BYTE scale; + BYTE sign; + ULONG Hi32; + ULONG Mid32; + ULONG Lo32; +}; + +struct decimal_round_t { + struct decimal_t source; + struct decimal_t ret; + int dec; +}; + +static const struct decimal_round_t decimal_round_data[] = { + {{ 0, DECIMAL_NEG, 0, 0, 1 }, { 0, DECIMAL_NEG, 0, 0, 1 }, 0}, + {{ 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 1 }, 0}, + {{ 2, 0, 0, 0, 155 }, { 0, 0, 0, 0, 16 }, 1}, + {{ 2, 0, 0, 0, 155 }, { 1, 0, 0, 0, 2 }, 0}, + {{ 2, 0, 0, 0, 199 }, { 1, 0, 0, 0, 20 }, 1}, + {{ 2, 0, 0, 0, 199 }, { 2, 0, 0, 0, 199 }, 2}, + {{ 2, DECIMAL_NEG, 0, 0, 199 }, { 2, DECIMAL_NEG, 0, 0, 199 }, 2}, + {{ 2, DECIMAL_NEG, 0, 0, 55 }, { 2, DECIMAL_NEG, 0, 0, 6 }, 1}, + {{ 2, 0, 0, 0, 55 }, { 2, 0, 0, 0, 6 }, 1} +}; + static void test_VarRound(void) { static WCHAR szNumMin[] = {'-','1','.','4','4','9','\0' }; @@ -3248,6 +3274,7 @@ static void test_VarRound(void) VARIANT v, exp, vDst; CY *pcy = &V_CY(&v); char buff[8]; + int i; CHECKPTR(VarRound); @@ -3324,30 +3351,38 @@ static void test_VarRound(void) ok(hres == S_OK && V_VT(&vDst) == VT_NULL, "VarRound: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); - /* not yet implemented so no use testing yet - todo_wine { - DECIMAL *pdec = &V_DECIMAL(&v); + /* VT_DECIMAL */ + for (i = 0; i < sizeof(decimal_round_data)/sizeof(struct decimal_round_t); i++) + { + const struct decimal_round_t *ptr = &decimal_round_data[i]; + DECIMAL *pdec; + + pdec = &V_DECIMAL(&v); V_VT(&v) = VT_DECIMAL; - S(U(*pdec)).sign = DECIMAL_NEG; - S(U(*pdec)).scale = 0; - pdec->Hi32 = 0; - S1(U1(*pdec)).Mid32 = 0; - S1(U1(*pdec)).Lo32 = 1; - hres = pVarRound(&v,0,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && - S(U(V_DECIMAL(&vDst))).sign == 0, - "VarRound: expected 0x0,%d,0x00, got 0x%X,%d,%02x\n", VT_DECIMAL, - hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign); - - S(U(*pdec)).sign = 0; - hres = pVarRound(&v,0,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && - S(U(V_DECIMAL(&vDst))).sign == DECIMAL_NEG, - "VarRound: expected 0x0,%d,0x7f, got 0x%X,%d,%02x\n", VT_DECIMAL, - hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign); - } - */ + S(U(*pdec)).sign = ptr->source.sign; + S(U(*pdec)).scale = ptr->source.scale; + pdec->Hi32 = ptr->source.Hi32; + S1(U1(*pdec)).Mid32 = ptr->source.Mid32; + S1(U1(*pdec)).Lo32 = ptr->source.Lo32; + VariantInit(&vDst); + hres = pVarRound(&v, ptr->dec, &vDst); + todo_wine + ok(hres == S_OK, "%d: got 0x%08x\n", i, hres); + if (hres == S_OK) + { + ok(V_VT(&vDst) == VT_DECIMAL, "%d: got VT %d, expected VT_DECIMAL\n", i, V_VT(&vDst)); + ok(S(U(V_DECIMAL(&vDst))).sign == ptr->ret.sign, "%d: got sign 0x%02x, expected 0x%02x\n", + i, S(U(V_DECIMAL(&vDst))).sign, ptr->ret.sign); + ok(V_DECIMAL(&vDst).Hi32 == ptr->ret.Hi32, "%d: got Hi32 %d, expected %d\n", + i, V_DECIMAL(&vDst).Hi32, ptr->ret.Hi32); + ok(S(U(V_DECIMAL(&vDst))).Mid32 == ptr->ret.Mid32, "%d: got Mid32 %d, expected %d\n", + i, S(U(V_DECIMAL(&vDst))).Mid32, ptr->ret.Mid32); + ok(S(U(V_DECIMAL(&vDst))).Lo32 == ptr->ret.Lo32, "%d: got Lo32 %d, expected %d\n", + i, S(U(V_DECIMAL(&vDst))).Lo32, ptr->ret.Lo32); + } + } + /* VT_CY */ V_VT(&v) = VT_CY; pcy->int64 = 10000; hres = pVarRound(&v,0,&vDst); From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Francois Gouget : Assorted spelling fixes. Message-ID: Module: wine Branch: master Commit: b8050f057149cc8c215fdc256d7ddf719865340c URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8050f057149cc8c215fdc256d7ddf719865340c Author: Francois Gouget Date: Mon Sep 3 23:38:53 2012 +0200 Assorted spelling fixes. --- dlls/advapi32/tests/registry.c | 4 ++-- dlls/dinput/tests/keyboard.c | 4 ++-- dlls/dssenh/tests/dssenh.c | 6 +++--- dlls/kernel32/tests/volume.c | 2 +- dlls/shell32/shellpath.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 870275e..307d1c7 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -401,9 +401,9 @@ static void test_set_value(void) /* test RegSetValueExW with data = 1 */ ret = RegSetValueExW(hkey_main, name2W, 0, REG_SZ, (const BYTE *)1, 1); - ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); ret = RegSetValueExW(hkey_main, name2W, 0, REG_DWORD, (const BYTE *)1, 1); - ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); } static void create_test_entries(void) diff --git a/dlls/dinput/tests/keyboard.c b/dlls/dinput/tests/keyboard.c index 4cd36c4..fe5fa89 100644 --- a/dlls/dinput/tests/keyboard.c +++ b/dlls/dinput/tests/keyboard.c @@ -183,8 +183,8 @@ static void test_capabilities(LPDIRECTINPUT pDI, HWND hwnd) caps.dwSize = sizeof(caps); hr = IDirectInputDevice_GetCapabilities(pKeyboard, &caps); - ok (SUCCEEDED(hr), "GetCapabilites failed: 0x%08x\n", hr); - ok (caps.dwFlags & DIDC_ATTACHED, "GetCapabilites dwFlags: 0x%08x\n", caps.dwFlags); + ok (SUCCEEDED(hr), "GetCapabilities failed: 0x%08x\n", hr); + ok (caps.dwFlags & DIDC_ATTACHED, "GetCapabilities dwFlags: 0x%08x\n", caps.dwFlags); ok (LOWORD(LOBYTE(caps.dwDevType)) == DIDEVTYPE_KEYBOARD, "GetCapabilities invalid device type for dwDevType: 0x%08x\n", caps.dwDevType); ok (LOWORD(HIBYTE(caps.dwDevType)) != DIDEVTYPEKEYBOARD_UNKNOWN, diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index 9d29a0f..bf79407 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -562,7 +562,7 @@ static const struct encrypt_test encrypt_data[] = { {CALG_DES, 56 << 16, dataToEncrypt3, sizeof(dataToEncrypt3), (BYTE *)dataToEncrypt3, encryptedDES_3}, /* CALG_RC2 key unexpected results under Win2K when default key length is used, here we use - minimum length because Win2K's DSSENH provider has a differnt default key length compared + minimum length because Win2K's DSSENH provider has a different default key length compared to the younger operating systems, though there is no default key len issue with CALG_RC4 */ {CALG_RC2, 40 << 16, dataToEncrypt1, sizeof(dataToEncrypt1), (BYTE *)dataToEncrypt1, encryptedRC2_1}, @@ -1192,7 +1192,7 @@ static void test_keyExchange_baseDSS(HCRYPTPROV hProv, const struct keyExchange_ ok(!memcmp(pbData1, pbData2, dataLen), "Decrypted data is not identical.\n"); - /* Destory all user keys */ + /* Destroy all user keys */ result = CryptDestroyKey(sessionKey1); ok((!result && GetLastError() == ERROR_INVALID_PARAMETER) || broken(result), "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); /* WinNT4 */ @@ -1317,7 +1317,7 @@ static void test_keyExchange_dssDH(HCRYPTPROV hProv, const struct keyExchange_te ok(!memcmp(pbData1, pbData2, dataLen), "Decrypted data is not identical.\n"); - /* Destory all user keys */ + /* Destroy all user keys */ result = CryptDestroyKey(sessionKey1); ok(result, "Failed to destroy session key 1, got %x\n", GetLastError()); diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index 8152ae1..d788c81 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -807,7 +807,7 @@ static void test_dvd_read_structure(HANDLE handle) SetLastError(0xdeadbeef); /* On newer version, an output buffer of sizeof(DVD_READ_STRUCTURE) size fails. - I think this is to force developpers to realize that there is a header before the actual content */ + I think this is to force developers to realize that there is a header before the actual content */ ret = DeviceIoControl(handle, IOCTL_DVD_READ_STRUCTURE, &dvdReadStructure, sizeof(DVD_READ_STRUCTURE), &dvdLayerDescriptor, sizeof(DVD_LAYER_DESCRIPTOR), &nbBytes, NULL); ok( (!ret && GetLastError() == ERROR_INVALID_PARAMETER) || broken(ret) /* < Win7 */, diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 41730ea..00ee079 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -2648,7 +2648,7 @@ static void _SHCreateSymbolicLinks(void) /* Create symbolic links for 'My Pictures', 'My Videos' and 'My Music'. */ for (i=0; i < sizeof(aidsMyStuff)/sizeof(aidsMyStuff[0]); i++) { - /* Create the current 'My Whatever' folder and get it's unix path. */ + /* Create the current 'My Whatever' folder and get its unix path. */ hr = SHGetFolderPathW(NULL, acsidlMyStuff[i]|CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_DEFAULT, wszTempPath); if (FAILED(hr)) continue; From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Piotr Caban : ntdll: Added partial support for SystemLogicalProcessorInformation information class in NtQuerySystemInformation (linux). Message-ID: Module: wine Branch: master Commit: faccf6ad10262beb195b1ecc60be8b97ed5fbf63 URL: http://source.winehq.org/git/wine.git/?a=commit;h=faccf6ad10262beb195b1ecc60be8b97ed5fbf63 Author: Piotr Caban Date: Tue Sep 4 13:37:59 2012 +0200 ntdll: Added partial support for SystemLogicalProcessorInformation information class in NtQuerySystemInformation (linux). --- dlls/ntdll/nt.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 146 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 7b161e5..3f0f6d1 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1320,6 +1320,122 @@ void fill_cpu_info(void) cached_sci.Architecture, cached_sci.Level, cached_sci.Revision, cached_sci.FeatureSet); } +#ifdef linux +static inline BOOL logical_proc_info_add_by_id(SYSTEM_LOGICAL_PROCESSOR_INFORMATION *data, + DWORD *len, DWORD max_len, LOGICAL_PROCESSOR_RELATIONSHIP rel, DWORD id, DWORD proc) +{ + int i; + + for(i=0; i<*len; i++) + { + if(data[i].Relationship!=rel || data[i].u.Reserved[1]!=id) + continue; + + data[i].ProcessorMask |= (ULONG_PTR)1< 8*sizeof(ULONG_PTR)) + { + FIXME("skipping logical processor %d\n", i); + continue; + } + + sprintf(name, core_info, i, "core_id"); + f = fopen(name, "r"); + if(f) + { + fscanf(f, "%u", &r); + fclose(f); + } + else r = i; + if(!logical_proc_info_add_by_id(*data, &len, *max_len, RelationProcessorCore, r, i)) + { + SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data; + + *max_len *= 2; + new_data = RtlReAllocateHeap(GetProcessHeap(), 0, *data, *max_len*sizeof(*new_data)); + if(!new_data) + { + fclose(fcpu_list); + return STATUS_NO_MEMORY; + } + + *data = new_data; + logical_proc_info_add_by_id(*data, &len, *max_len, RelationProcessorCore, r, i); + } + + sprintf(name, core_info, i, "physical_package_id"); + f = fopen(name, "r"); + if(f) + { + fscanf(f, "%u", &r); + fclose(f); + } + else r = 0; + if(!logical_proc_info_add_by_id(*data, &len, *max_len, RelationProcessorPackage, r, i)) + { + SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data; + + *max_len *= 2; + new_data = RtlReAllocateHeap(GetProcessHeap(), 0, *data, *max_len*sizeof(*new_data)); + if(!new_data) + { + fclose(fcpu_list); + return STATUS_NO_MEMORY; + } + + *data = new_data; + logical_proc_info_add_by_id(*data, &len, *max_len, RelationProcessorPackage, r, i); + } + } + } + fclose(fcpu_list); + + *max_len = len * sizeof(**data); + return STATUS_SUCCESS; +} +#else +static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **data, DWORD *max_len) +{ + FIXME("stub\n"); + return STATUS_NOT_IMPLEMENTED; +} +#endif + /****************************************************************************** * NtQuerySystemInformation [NTDLL.@] * ZwQuerySystemInformation [NTDLL.@] @@ -1754,6 +1870,36 @@ NTSTATUS WINAPI NtQuerySystemInformation( else ret = STATUS_INFO_LENGTH_MISMATCH; } break; + case SystemLogicalProcessorInformation: + { + SYSTEM_LOGICAL_PROCESSOR_INFORMATION *buf; + + /* Each logical processor may use up to 7 entries in returned table: + * core, numa node, package, L1i, L1d, L2, L3 */ + len = 7 * NtCurrentTeb()->Peb->NumberOfProcessors; + buf = RtlAllocateHeap(GetProcessHeap(), 0, len * sizeof(*buf)); + if(!buf) + { + ret = STATUS_NO_MEMORY; + break; + } + + ret = create_logical_proc_info(&buf, &len); + if( ret != STATUS_SUCCESS ) + { + RtlFreeHeap(GetProcessHeap(), 0, buf); + break; + } + + if( Length >= len) + { + if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION; + else memcpy( SystemInformation, buf, len); + } + else ret = STATUS_INFO_LENGTH_MISMATCH; + RtlFreeHeap(GetProcessHeap(), 0, buf); + } + break; default: FIXME("(0x%08x,%p,0x%08x,%p) stub\n", SystemInformationClass,SystemInformation,Length,ResultLength); From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Piotr Caban : ntdll: Added processor cache information to SystemLogicalProcessorInformation ( linux). Message-ID: Module: wine Branch: master Commit: a3d0a19624c2a843b910a87b72123df0e65fdeb3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a3d0a19624c2a843b910a87b72123df0e65fdeb3 Author: Piotr Caban Date: Tue Sep 4 13:38:17 2012 +0200 ntdll: Added processor cache information to SystemLogicalProcessorInformation (linux). --- dlls/ntdll/nt.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 99 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 3f0f6d1..0b18d24 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1347,12 +1347,35 @@ static inline BOOL logical_proc_info_add_by_id(SYSTEM_LOGICAL_PROCESSOR_INFORMAT return TRUE; } +static inline BOOL logical_proc_info_add_cache(SYSTEM_LOGICAL_PROCESSOR_INFORMATION *data, + DWORD *len, DWORD max_len, ULONG_PTR mask, CACHE_DESCRIPTOR *cache) +{ + int i; + + for(i=0; i<*len; i++) + { + if(data[i].Relationship==RelationCache && data[i].ProcessorMask==mask + && data[i].u.Cache.Level==cache->Level && data[i].u.Cache.Type==cache->Type) + return TRUE; + } + + if(*len == max_len) + return FALSE; + + data[i].Relationship = RelationCache; + data[i].ProcessorMask = mask; + data[i].u.Cache = *cache; + *len = i+1; + return TRUE; +} + static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **data, DWORD *max_len) { static const char core_info[] = "/sys/devices/system/cpu/cpu%d/%s"; + static const char cache_info[] = "/sys/devices/system/cpu/cpu%d/cache/index%d/%s"; FILE *fcpu_list, *f; - DWORD len = 0, beg, end, i, r; + DWORD len = 0, beg, end, i, j, r; char op, name[MAX_PATH]; fcpu_list = fopen("/sys/devices/system/cpu/online", "r"); @@ -1421,6 +1444,81 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION ** *data = new_data; logical_proc_info_add_by_id(*data, &len, *max_len, RelationProcessorPackage, r, i); } + + for(j=0; j<4; j++) + { + CACHE_DESCRIPTOR cache; + ULONG_PTR mask = 0; + + sprintf(name, cache_info, i, j, "shared_cpu_map"); + f = fopen(name, "r"); + if(!f) continue; + while(!feof(f)) + { + if(!fscanf(f, "%x%c ", &r, &op)) + break; + mask = (sizeof(ULONG_PTR)>sizeof(int) ? mask<<(8*sizeof(DWORD)) : 0) + r; + } + fclose(f); + + sprintf(name, cache_info, i, j, "level"); + f = fopen(name, "r"); + if(!f) continue; + fscanf(f, "%u", &r); + fclose(f); + cache.Level = r; + + sprintf(name, cache_info, i, j, "ways_of_associativity"); + f = fopen(name, "r"); + if(!f) continue; + fscanf(f, "%u", &r); + fclose(f); + cache.Associativity = r; + + sprintf(name, cache_info, i, j, "coherency_line_size"); + f = fopen(name, "r"); + if(!f) continue; + fscanf(f, "%u", &r); + fclose(f); + cache.LineSize = r; + + sprintf(name, cache_info, i, j, "size"); + f = fopen(name, "r"); + if(!f) continue; + fscanf(f, "%u%c", &r, &op); + fclose(f); + if(op != 'K') + WARN("unknown cache size %u%c\n", r, op); + cache.Size = (op=='K' ? r*1024 : r); + + sprintf(name, cache_info, i, j, "type"); + f = fopen(name, "r"); + if(!f) continue; + fscanf(f, "%s", name); + fclose(f); + if(!memcmp(name, "Data", 5)) + cache.Type = CacheData; + else if(!memcmp(name, "Instruction", 11)) + cache.Type = CacheInstruction; + else + cache.Type = CacheUnified; + + if(!logical_proc_info_add_cache(*data, &len, *max_len, mask, &cache)) + { + SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data; + + *max_len *= 2; + new_data = RtlReAllocateHeap(GetProcessHeap(), 0, *data, *max_len*sizeof(*new_data)); + if(!new_data) + { + fclose(fcpu_list); + return STATUS_NO_MEMORY; + } + + *data = new_data; + logical_proc_info_add_cache(*data, &len, *max_len, mask, &cache); + } + } } } fclose(fcpu_list); From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Piotr Caban : ntdll: Added numa nodes information to SystemLogicalProcessorInformation (linux). Message-ID: Module: wine Branch: master Commit: 59a54b0f8a223f6b1c31706d96894ac698b65831 URL: http://source.winehq.org/git/wine.git/?a=commit;h=59a54b0f8a223f6b1c31706d96894ac698b65831 Author: Piotr Caban Date: Tue Sep 4 13:38:36 2012 +0200 ntdll: Added numa nodes information to SystemLogicalProcessorInformation (linux). --- dlls/ntdll/nt.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 81 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 0b18d24..863844a 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1369,12 +1369,26 @@ static inline BOOL logical_proc_info_add_cache(SYSTEM_LOGICAL_PROCESSOR_INFORMAT return TRUE; } +static inline BOOL logical_proc_info_add_numa_node(SYSTEM_LOGICAL_PROCESSOR_INFORMATION *data, + DWORD *len, DWORD max_len, ULONG_PTR mask, DWORD node_id) +{ + if(*len == max_len) + return FALSE; + + data[*len].Relationship = RelationNumaNode; + data[*len].ProcessorMask = mask; + data[*len].u.NumaNode.NodeNumber = node_id; + (*len)++; + return TRUE; +} + static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **data, DWORD *max_len) { static const char core_info[] = "/sys/devices/system/cpu/cpu%d/%s"; static const char cache_info[] = "/sys/devices/system/cpu/cpu%d/cache/index%d/%s"; + static const char numa_info[] = "/sys/devices/system/node/node%d/cpumap"; - FILE *fcpu_list, *f; + FILE *fcpu_list, *fnuma_list, *f; DWORD len = 0, beg, end, i, j, r; char op, name[MAX_PATH]; @@ -1523,6 +1537,72 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION ** } fclose(fcpu_list); + fnuma_list = fopen("/sys/devices/system/node/online", "r"); + if(!fnuma_list) + { + ULONG_PTR mask = 0; + + for(i=0; isizeof(int) ? mask<<(8*sizeof(DWORD)) : 0) + r; + } + fclose(f); + + if(len == *max_len) + { + SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data; + + *max_len *= 2; + new_data = RtlReAllocateHeap(GetProcessHeap(), 0, *data, *max_len*sizeof(*new_data)); + if(!new_data) + { + fclose(fnuma_list); + return STATUS_NO_MEMORY; + } + + *data = new_data; + } + logical_proc_info_add_numa_node(*data, &len, *max_len, mask, i); + } + } + fclose(fnuma_list); + } + *max_len = len * sizeof(**data); return STATUS_SUCCESS; } From julliard at winehq.org Tue Sep 4 12:38:37 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:37 -0500 Subject: Piotr Caban : ntdll/tests: Added basic NtQuerySystemInformation( SystemLogicalProcessorInformation) tests. Message-ID: Module: wine Branch: master Commit: 67920ea6dde99e3dafde7f27147dcd80550608c4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=67920ea6dde99e3dafde7f27147dcd80550608c4 Author: Piotr Caban Date: Tue Sep 4 13:39:35 2012 +0200 ntdll/tests: Added basic NtQuerySystemInformation(SystemLogicalProcessorInformation) tests. --- dlls/ntdll/tests/info.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 4c23552..3dce90b 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -576,6 +576,51 @@ static void test_query_regquota(void) ok( sizeof(srqi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); } +static void test_query_logicalproc(void) +{ + NTSTATUS status; + ULONG len, i, proc_no; + SYSTEM_LOGICAL_PROCESSOR_INFORMATION *slpi; + SYSTEM_INFO si; + + GetSystemInfo(&si); + + status = pNtQuerySystemInformation(SystemLogicalProcessorInformation, NULL, 0, &len); + if(status == STATUS_INVALID_INFO_CLASS) + { + win_skip("SystemLogicalProcessorInformation is not supported\n"); + return; + } + if(status == STATUS_NOT_IMPLEMENTED) + { + todo_wine ok(0, "SystemLogicalProcessorInformation is not implemented\n"); + return; + } + ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok(len%sizeof(*slpi) == 0, "Incorrect length %d\n", len); + + slpi = HeapAlloc(GetProcessHeap(), 0, len); + status = pNtQuerySystemInformation(SystemLogicalProcessorInformation, slpi, len, &len); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + + proc_no = 0; + for(i=0; i 0, "No processors were found\n"); + if(si.dwNumberOfProcessors <= 32) + ok(proc_no == si.dwNumberOfProcessors, "Incorrect number of logical processors: %d, expected %d\n", + proc_no, si.dwNumberOfProcessors); +} + static void test_query_process_basic(void) { NTSTATUS status; @@ -1513,6 +1558,10 @@ START_TEST(info) trace("Starting test_query_regquota()\n"); test_query_regquota(); + /* 0x49 SystemLogicalProcessorInformation */ + trace("Starting test_query_logicalproc()\n"); + test_query_logicalproc(); + /* NtQueryInformationProcess */ /* 0x0 ProcessBasicInformation */ From julliard at winehq.org Tue Sep 4 12:38:38 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:38 -0500 Subject: Piotr Caban : kernel32: Added GetLogicalProcessorInformation implementation . Message-ID: Module: wine Branch: master Commit: c6ac0d0fcc57b4b955289826e2effb759f74e673 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c6ac0d0fcc57b4b955289826e2effb759f74e673 Author: Piotr Caban Date: Tue Sep 4 13:39:52 2012 +0200 kernel32: Added GetLogicalProcessorInformation implementation. --- dlls/kernel32/process.c | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 1edf9ea..1b10f9e 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -3717,9 +3717,29 @@ HANDLE WINAPI GetCurrentProcess(void) */ BOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer, PDWORD pBufLen) { - FIXME("(%p,%p): stub\n", buffer, pBufLen); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + NTSTATUS status; + + TRACE("(%p,%p)\n", buffer, pBufLen); + + if(!pBufLen) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + status = NtQuerySystemInformation( SystemLogicalProcessorInformation, buffer, *pBufLen, pBufLen); + + if (status == STATUS_INFO_LENGTH_MISMATCH) + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + return FALSE; + } + if (status != STATUS_SUCCESS) + { + SetLastError( RtlNtStatusToDosError( status ) ); + return FALSE; + } + return TRUE; } /*********************************************************************** From julliard at winehq.org Tue Sep 4 12:38:38 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:38 -0500 Subject: Dmitry Timoshkov : gdiplus: Add support for StringFormatFlagsNoClip. Message-ID: Module: wine Branch: master Commit: bfa35f37a7687cdae338ad9837fc595afb2df2b6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bfa35f37a7687cdae338ad9837fc595afb2df2b6 Author: Dmitry Timoshkov Date: Mon Sep 3 17:56:12 2012 +0900 gdiplus: Add support for StringFormatFlagsNoClip. --- dlls/gdiplus/graphics.c | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 640603a..96e2533 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4977,8 +4977,16 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, scaled_rect.X = (layoutRect->X + margin_x) * args.rel_width; scaled_rect.Y = layoutRect->Y * args.rel_height; - scaled_rect.Width = layoutRect->Width * args.rel_width; - scaled_rect.Height = layoutRect->Height * args.rel_height; + if (stringFormat->attr & StringFormatFlagsNoClip) + { + scaled_rect.Width = (REAL)(1 << 23); + scaled_rect.Height = (REAL)(1 << 23); + } + else + { + scaled_rect.Width = layoutRect->Width * args.rel_width; + scaled_rect.Height = layoutRect->Height * args.rel_height; + } if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * args.rel_width; @@ -5058,7 +5066,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, GpPointF pt[3]; RectF scaled_rect; REAL margin_x; - INT lines, glyphs; + INT lines, glyphs, format_flags = format ? format->attr : 0; TRACE("(%p, %s, %i, %p, %s, %p, %p, %p, %p)\n", graphics, debugstr_wn(string, length), length, font, debugstr_rectf(rect), format, @@ -5100,6 +5108,12 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, scaled_rect.Y = rect->Y * args.rel_height; scaled_rect.Width = rect->Width * args.rel_width; scaled_rect.Height = rect->Height * args.rel_height; + + if ((format_flags & StringFormatFlagsNoClip) || + scaled_rect.Width >= INT_MAX || scaled_rect.Width < 0.5) scaled_rect.Width = (REAL)(1 << 23); + if ((format_flags & StringFormatFlagsNoClip) || + scaled_rect.Height >= INT_MAX || scaled_rect.Height < 0.5) scaled_rect.Height = (REAL)(1 << 23); + if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * args.rel_width; @@ -5202,7 +5216,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string GpPointF pt[3], rectcpy[4]; POINT corners[4]; REAL rel_width, rel_height, margin_x; - INT save_state; + INT save_state, format_flags = 0; REAL offsety = 0.0; struct draw_string_args args; RectF scaled_rect; @@ -5227,6 +5241,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string if(format){ TRACE("may be ignoring some format flags: attr %x\n", format->attr); + format_flags = format->attr; + /* Should be no need to explicitly test for StringAlignmentNear as * that is default behavior if no alignment is passed. */ if(format->vertalign != StringAlignmentNear){ @@ -5271,6 +5287,12 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string scaled_rect.Y = 0.0; scaled_rect.Width = rel_width * rect->Width; scaled_rect.Height = rel_height * rect->Height; + + if ((format_flags & StringFormatFlagsNoClip) || + scaled_rect.Width >= INT_MAX || scaled_rect.Width < 0.5) scaled_rect.Width = (REAL)(1 << 23); + if ((format_flags & StringFormatFlagsNoClip) || + scaled_rect.Height >= INT_MAX || scaled_rect.Height < 0.5) scaled_rect.Height = (REAL)(1 << 23); + if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * rel_width; @@ -5280,7 +5302,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string if (scaled_rect.Width >= INT_MAX || scaled_rect.Width < 0.5) scaled_rect.Width = (REAL)(1 << 23); if (scaled_rect.Height >= INT_MAX || scaled_rect.Height < 0.5) scaled_rect.Height = (REAL)(1 << 23); - if (gdip_round(scaled_rect.Width) != 0 && gdip_round(scaled_rect.Height) != 0) + if (!(format_flags & StringFormatFlagsNoClip) && + gdip_round(scaled_rect.Width) != 0 && gdip_round(scaled_rect.Height) != 0) { /* FIXME: If only the width or only the height is 0, we should probably still clip */ rgn = CreatePolygonRgn(corners, 4, ALTERNATE); From julliard at winehq.org Tue Sep 4 12:38:38 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:38 -0500 Subject: Dmitry Timoshkov : gdiplus: Add support for generic typographic string format. Message-ID: Module: wine Branch: master Commit: b8f42522905272b11328f79457447d6b3185a3b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8f42522905272b11328f79457447d6b3185a3b1 Author: Dmitry Timoshkov Date: Mon Sep 3 17:57:17 2012 +0900 gdiplus: Add support for generic typographic string format. --- dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/graphics.c | 89 +++++++++++++++++++++++----------------- dlls/gdiplus/stringformat.c | 4 ++ 3 files changed, 56 insertions(+), 38 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=b8f42522905272b11328f79457447d6b3185a3b1 From julliard at winehq.org Tue Sep 4 12:38:38 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:38 -0500 Subject: Erich Hoover : hhctrl.ocx: Implement HH_GET_WIN_TYPE. Message-ID: Module: wine Branch: master Commit: af0fa40effda14c124a4cb619f66830cfe2f7773 URL: http://source.winehq.org/git/wine.git/?a=commit;h=af0fa40effda14c124a4cb619f66830cfe2f7773 Author: Erich Hoover Date: Fri Aug 31 15:26:12 2012 -0600 hhctrl.ocx: Implement HH_GET_WIN_TYPE. --- dlls/hhctrl.ocx/help.c | 16 +++++++++++ dlls/hhctrl.ocx/hhctrl.c | 66 +++++++++++++++++++++++++++++++++++++++------ dlls/hhctrl.ocx/hhctrl.h | 29 ++++++++++++++++++++ 3 files changed, 102 insertions(+), 9 deletions(-) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 6671f70..93a93a5 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -1757,6 +1757,21 @@ void wintype_stringsW_free(struct wintype_stringsW *stringsW) heap_free(stringsW->pszUrlJump2); } +void wintype_stringsA_free(struct wintype_stringsA *stringsA) +{ + heap_free(stringsA->pszType); + heap_free(stringsA->pszCaption); + heap_free(stringsA->pszToc); + heap_free(stringsA->pszIndex); + heap_free(stringsA->pszFile); + heap_free(stringsA->pszHome); + heap_free(stringsA->pszJump1); + heap_free(stringsA->pszJump2); + heap_free(stringsA->pszUrlJump1); + heap_free(stringsA->pszUrlJump2); + heap_free(stringsA->pszCustomTabs); +} + void ReleaseHelpViewer(HHInfo *info) { TRACE("(%p)\n", info); @@ -1766,6 +1781,7 @@ void ReleaseHelpViewer(HHInfo *info) list_remove(&info->entry); + wintype_stringsA_free(&info->stringsA); wintype_stringsW_free(&info->stringsW); if (info->pCHMInfo) diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 4ed9afc..7f11276 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -330,6 +330,29 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat MergeChmProperties(wintype, info); return 0; } + case HH_GET_WIN_TYPE: { + HH_WINTYPEW *wintype = (HH_WINTYPEW *)data; + WCHAR *window = NULL; + HHInfo *info = NULL; + + if (!filename || !resolve_filename(filename, fullname, MAX_PATH, NULL, &window) || !window) + { + WARN("can't find window name: %s\n", debugstr_w(filename)); + return 0; + } + info = find_window(window); + if (!info) + { + WARN("Could not find window named %s.\n", debugstr_w(window)); + heap_free(window); + return (HWND)~0; + } + + TRACE("Retrieving WINTYPE for %s.\n", debugstr_w(window)); + *wintype = info->WinType; + heap_free(window); + return 0; + } default: FIXME("HH case %s not handled.\n", command_to_string( command )); } @@ -337,11 +360,8 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat return 0; } -static HH_WINTYPEW *wintypeAtoW(HH_WINTYPEA *data, struct wintype_stringsW *stringsW) +static void wintypeAtoW(const HH_WINTYPEA *data, HH_WINTYPEW *wdata, struct wintype_stringsW *stringsW) { - HH_WINTYPEW *wdata; - - wdata = heap_alloc(sizeof(*wdata)); memcpy(wdata, data, sizeof(*data)); /* convert all of the ANSI strings to Unicode */ wdata->pszType = stringsW->pszType = strdupAtoW(data->pszType); @@ -355,8 +375,23 @@ static HH_WINTYPEW *wintypeAtoW(HH_WINTYPEA *data, struct wintype_stringsW *stri wdata->pszUrlJump1 = stringsW->pszUrlJump1 = strdupAtoW(data->pszUrlJump1); wdata->pszUrlJump2 = stringsW->pszUrlJump2 = strdupAtoW(data->pszUrlJump2); wdata->pszCustomTabs = stringsW->pszCustomTabs = strdupAtoW(data->pszCustomTabs); +} - return wdata; +static void wintypeWtoA(const HH_WINTYPEW *wdata, HH_WINTYPEA *data, struct wintype_stringsA *stringsA) +{ + memcpy(data, wdata, sizeof(*wdata)); + /* convert all of the Unicode strings to ANSI */ + data->pszType = stringsA->pszType = strdupWtoA(wdata->pszType); + data->pszCaption = stringsA->pszCaption = strdupWtoA(wdata->pszCaption); + data->pszToc = stringsA->pszToc = strdupWtoA(wdata->pszToc); + data->pszIndex = stringsA->pszFile = strdupWtoA(wdata->pszIndex); + data->pszFile = stringsA->pszFile = strdupWtoA(wdata->pszFile); + data->pszHome = stringsA->pszHome = strdupWtoA(wdata->pszHome); + data->pszJump1 = stringsA->pszJump1 = strdupWtoA(wdata->pszJump1); + data->pszJump2 = stringsA->pszJump2 = strdupWtoA(wdata->pszJump2); + data->pszUrlJump1 = stringsA->pszUrlJump1 = strdupWtoA(wdata->pszUrlJump1); + data->pszUrlJump2 = stringsA->pszUrlJump2 = strdupWtoA(wdata->pszUrlJump2); + data->pszCustomTabs = stringsA->pszCustomTabs = strdupWtoA(wdata->pszCustomTabs); } /****************************************************************** @@ -375,7 +410,6 @@ HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD_PTR data case HH_DISPLAY_SEARCH: case HH_DISPLAY_TEXT_POPUP: case HH_GET_LAST_ERROR: - case HH_GET_WIN_TYPE: case HH_KEYWORD_LOOKUP: case HH_SYNC: FIXME("structures not handled yet\n"); @@ -384,10 +418,24 @@ HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD_PTR data case HH_SET_WIN_TYPE: { struct wintype_stringsW stringsW; - HH_WINTYPEW *wdata = wintypeAtoW((HH_WINTYPEA *)data, &stringsW); - result = HtmlHelpW( caller, wfile, command, (DWORD_PTR)wdata ); + HH_WINTYPEW wdata; + + wintypeAtoW((HH_WINTYPEA *)data, &wdata, &stringsW); + result = HtmlHelpW( caller, wfile, command, (DWORD_PTR)&wdata ); wintype_stringsW_free(&stringsW); - heap_free( wdata ); + goto done; + } + case HH_GET_WIN_TYPE: + { + HH_WINTYPEW wdata; + HHInfo *info; + + result = HtmlHelpW( caller, wfile, command, (DWORD_PTR)&wdata ); + if (!wdata.pszType) break; + info = find_window(wdata.pszType); + if (!info) break; + wintype_stringsA_free(&info->stringsA); + wintypeWtoA(&wdata, (HH_WINTYPEA *)data, &info->stringsA); goto done; } diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index 900bbb4..7bdf26e 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -154,6 +154,20 @@ struct wintype_stringsW { WCHAR *pszCustomTabs; }; +struct wintype_stringsA { + char *pszType; + char *pszCaption; + char *pszToc; + char *pszIndex; + char *pszFile; + char *pszHome; + char *pszJump1; + char *pszJump2; + char *pszUrlJump1; + char *pszUrlJump2; + char *pszCustomTabs; +}; + typedef struct { IOleClientSite *client_site; IWebBrowser2 *web_browser; @@ -161,6 +175,7 @@ typedef struct { HH_WINTYPEW WinType; + struct wintype_stringsA stringsA; struct wintype_stringsW stringsW; struct list entry; @@ -209,6 +224,7 @@ void InitSearch(HHInfo *info, const char *needle) DECLSPEC_HIDDEN; void ReleaseSearch(HHInfo *info) DECLSPEC_HIDDEN; LPCWSTR skip_schema(LPCWSTR url) DECLSPEC_HIDDEN; +void wintype_stringsA_free(struct wintype_stringsA *stringsA) DECLSPEC_HIDDEN; void wintype_stringsW_free(struct wintype_stringsW *stringsW) DECLSPEC_HIDDEN; WCHAR *decode_html(const char *html_fragment, int html_fragment_len, UINT code_page); @@ -282,6 +298,19 @@ static inline LPWSTR strdupAtoW(LPCSTR str) return strdupnAtoW(str, -1); } +static inline LPSTR strdupWtoA(LPCWSTR str) +{ + LPSTR ret; + DWORD len; + + if(!str) + return NULL; + + len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL); + ret = heap_alloc(len); + WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, NULL, NULL); + return ret; +} extern HINSTANCE hhctrl_hinstance DECLSPEC_HIDDEN; From julliard at winehq.org Tue Sep 4 12:38:38 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:38 -0500 Subject: Erich Hoover : hhctrl.ocx: Properly show HTML Help dialogs without Tri-Pane display. Message-ID: Module: wine Branch: master Commit: b6ed7acce1d0692c0510366210762cda9076a6ce URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6ed7acce1d0692c0510366210762cda9076a6ce Author: Erich Hoover Date: Fri Aug 31 15:26:26 2012 -0600 hhctrl.ocx: Properly show HTML Help dialogs without Tri-Pane display. --- dlls/hhctrl.ocx/help.c | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 93a93a5..514b2a8 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -165,6 +165,11 @@ struct html_encoded_symbol html_encoded_symbols[] = {"yuml", 0xFF} }; +static inline BOOL navigation_visible(HHInfo *info) +{ + return ((info->WinType.fsWinProperties & HHWIN_PROP_TRI_PANE) && !info->WinType.fNotExpanded); +} + /* Loads a string from the resource file */ static LPWSTR HH_LoadString(DWORD dwID) { @@ -427,7 +432,7 @@ static BOOL HH_AddSizeBar(HHInfo *pHHInfo) DWORD dwExStyles = WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR; RECT rc; - if (!pHHInfo->WinType.fNotExpanded) + if (navigation_visible(pHHInfo)) dwStyles |= WS_VISIBLE; SB_GetSizeBarRect(pHHInfo, &rc); @@ -1010,8 +1015,7 @@ static BOOL HH_AddToolbar(HHInfo *pHHInfo) else toolbarFlags = HHWIN_DEF_BUTTONS; - dwStyles = WS_CHILDWINDOW | WS_VISIBLE | TBSTYLE_FLAT | - TBSTYLE_WRAPABLE | TBSTYLE_TOOLTIPS | CCS_NODIVIDER; + dwStyles = WS_CHILDWINDOW | TBSTYLE_FLAT | TBSTYLE_WRAPABLE | TBSTYLE_TOOLTIPS | CCS_NODIVIDER; dwExStyles = WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR; hToolbar = CreateWindowExW(dwExStyles, TOOLBARCLASSNAMEW, NULL, dwStyles, @@ -1039,7 +1043,8 @@ static BOOL HH_AddToolbar(HHInfo *pHHInfo) SendMessageW(hToolbar, TB_ADDBUTTONSW, dwNumButtons, (LPARAM)buttons); SendMessageW(hToolbar, TB_AUTOSIZE, 0, 0); - ShowWindow(hToolbar, SW_SHOW); + if (pHHInfo->WinType.fsWinProperties & HHWIN_PROP_TRI_PANE) + ShowWindow(hToolbar, SW_SHOW); return TRUE; } @@ -1091,7 +1096,7 @@ static BOOL HH_AddNavigationPane(HHInfo *info) DWORD dwExStyles = WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR; RECT rc; - if (!info->WinType.fNotExpanded) + if (navigation_visible(info)) dwStyles |= WS_VISIBLE; NP_GetNavigationRect(info, &rc); @@ -1138,20 +1143,22 @@ static void HP_GetHTMLRect(HHInfo *info, RECT *rc) RECT rectTB, rectWND, rectNP, rectSB; GetClientRect(info->WinType.hwndHelp, &rectWND); - GetClientRect(info->WinType.hwndToolBar, &rectTB); GetClientRect(info->hwndSizeBar, &rectSB); - if (info->WinType.fNotExpanded) - rc->left = 0; - else + rc->left = 0; + rc->top = 0; + if (navigation_visible(info)) { GetClientRect(info->WinType.hwndNavigation, &rectNP); - rc->left = rectNP.right + rectSB.right; + rc->left += rectNP.right + rectSB.right; + } + if (info->WinType.fsWinProperties & HHWIN_PROP_TRI_PANE) + { + GetClientRect(info->WinType.hwndToolBar, &rectTB); + rc->top += rectTB.bottom; } - - rc->top = rectTB.bottom; rc->right = rectWND.right - rc->left; - rc->bottom = rectWND.bottom - rectTB.bottom; + rc->bottom = rectWND.bottom - rc->top; } static BOOL HH_AddHTMLPane(HHInfo *pHHInfo) @@ -1535,7 +1542,7 @@ static LRESULT Help_OnSize(HWND hWnd) if (!pHHInfo) return 0; - if (!pHHInfo->WinType.fNotExpanded) + if (navigation_visible(pHHInfo)) { NP_GetNavigationRect(pHHInfo, &rc); SetWindowPos(pHHInfo->WinType.hwndNavigation, HWND_TOP, 0, 0, @@ -1643,7 +1650,7 @@ static BOOL HH_CreateHelpWindow(HHInfo *info) height = WINTYPE_DEFAULT_HEIGHT; } - if (info->WinType.fNotExpanded) + if (!(info->WinType.fsWinProperties & HHWIN_PROP_TRI_PANE) && info->WinType.fNotExpanded) { if (!(info->WinType.fsValidMembers & HHWIN_PARAM_NAV_WIDTH) && info->WinType.iNavWidth == 0) From julliard at winehq.org Tue Sep 4 12:38:38 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:38 -0500 Subject: Jacek Caban : wininet: Set last error for invalid URL argument. Message-ID: Module: wine Branch: master Commit: c4c3ff47e7ad1ae66cde22b0e479cabbaa019e35 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c4c3ff47e7ad1ae66cde22b0e479cabbaa019e35 Author: Jacek Caban Date: Tue Sep 4 17:08:06 2012 +0200 wininet: Set last error for invalid URL argument. --- dlls/wininet/cookie.c | 5 +++- dlls/wininet/tests/internet.c | 45 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index 6f9caad..8552548 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -360,7 +360,10 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, host[0] = 0; ret = COOKIE_crackUrlSimple(lpszUrl, host, sizeof(host)/sizeof(host[0]), path, sizeof(path)/sizeof(path[0])); - if (!ret || !host[0]) return FALSE; + if (!ret || !host[0]) { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } return get_cookie(host, path, lpCookieData, lpdwSize); } diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index f2ea04f..a0b6466 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -40,6 +40,8 @@ static BOOL (WINAPI *pInternetTimeToSystemTimeW)(LPCWSTR ,SYSTEMTIME *,DWORD); static BOOL (WINAPI *pIsDomainLegalCookieDomainW)(LPCWSTR, LPCWSTR); static DWORD (WINAPI *pPrivacyGetZonePreferenceW)(DWORD, DWORD, LPDWORD, LPWSTR, LPDWORD); static DWORD (WINAPI *pPrivacySetZonePreferenceW)(DWORD, DWORD, DWORD, LPCWSTR); +static BOOL (WINAPI *pInternetGetCookieExA)(LPCSTR,LPCSTR,LPSTR,LPDWORD,DWORD,LPVOID); +static BOOL (WINAPI *pInternetGetCookieExW)(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD,LPVOID); /* ############################### */ @@ -471,6 +473,36 @@ static void test_complicated_cookie(void) ok(strstr(buffer,"O=P")==NULL,"O=P present\n"); } +static void test_cookie_url(void) +{ + WCHAR bufw[512]; + char buf[512]; + DWORD len; + BOOL res; + + static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; + + len = sizeof(buf); + res = InternetGetCookieA("about:blank", NULL, buf, &len); + ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, + "InternetGetCookeA failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + + len = sizeof(bufw)/sizeof(*bufw); + res = InternetGetCookieW(about_blankW, NULL, bufw, &len); + ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, + "InternetGetCookeW failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + + len = sizeof(buf); + res = pInternetGetCookieExA("about:blank", NULL, buf, &len, 0, NULL); + ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, + "InternetGetCookeExA failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); + + len = sizeof(bufw)/sizeof(*bufw); + res = pInternetGetCookieExW(about_blankW, NULL, bufw, &len, 0, NULL); + ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, + "InternetGetCookeExW failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); +} + static void test_null(void) { HINTERNET hi, hc; @@ -1381,11 +1413,6 @@ START_TEST(internet) HMODULE hdll; hdll = GetModuleHandleA("wininet.dll"); - if(!GetProcAddress(hdll, "InternetGetCookieExW")) { - win_skip("Too old IE (older than 6.0)\n"); - return; - } - pCreateUrlCacheContainerA = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerA"); pCreateUrlCacheContainerW = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerW"); pInternetTimeFromSystemTimeA = (void*)GetProcAddress(hdll, "InternetTimeFromSystemTimeA"); @@ -1395,11 +1422,19 @@ START_TEST(internet) pIsDomainLegalCookieDomainW = (void*)GetProcAddress(hdll, (LPCSTR)117); pPrivacyGetZonePreferenceW = (void*)GetProcAddress(hdll, "PrivacyGetZonePreferenceW"); pPrivacySetZonePreferenceW = (void*)GetProcAddress(hdll, "PrivacySetZonePreferenceW"); + pInternetGetCookieExA = (void*)GetProcAddress(hdll, "InternetGetCookieExA"); + pInternetGetCookieExW = (void*)GetProcAddress(hdll, "InternetGetCookieExW"); + + if(!pInternetGetCookieExW) { + win_skip("Too old IE (older than 6.0)\n"); + return; + } test_InternetCanonicalizeUrlA(); test_InternetQueryOptionA(); test_get_cookie(); test_complicated_cookie(); + test_cookie_url(); test_version(); test_null(); test_Option_PerConnectionOption(); From julliard at winehq.org Tue Sep 4 12:38:38 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:38:38 -0500 Subject: Akihiro Sagawa : po: Update Japanese translation. Message-ID: Module: wine Branch: master Commit: ed68b6d1203323c93e65778094e47516cf49416f URL: http://source.winehq.org/git/wine.git/?a=commit;h=ed68b6d1203323c93e65778094e47516cf49416f Author: Akihiro Sagawa Date: Tue Sep 4 23:26:30 2012 +0900 po: Update Japanese translation. --- po/ja.po | 65 +++++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 44 insertions(+), 21 deletions(-) diff --git a/po/ja.po b/po/ja.po index 2e42e51..69b1dd6 100644 --- a/po/ja.po +++ b/po/ja.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: 2012-06-07 00:10+0900\n" +"PO-Revision-Date: 2012-09-04 23:19+0900\n" "Last-Translator: Akihiro Sagawa \n" "Language-Team: none\n" "Language: Japanese\n" @@ -637,7 +637,7 @@ msgstr "????????????(&C)" #: comdlg32.rc:317 joy.rc:68 msgid "Direction" -msgstr "??????" +msgstr "??" #: comdlg32.rc:318 view.rc:39 msgid "&Up" @@ -3439,6 +3439,8 @@ msgid "" "After disabling or enabling a device, the connected joysticks won't be " "updated here until you restart this applet." msgstr "" +"??????????????????????????????????????" +"?????????????????????????????" #: joy.rc:47 msgid "Test Joystick" @@ -3446,23 +3448,23 @@ msgstr "????????????" #: joy.rc:51 msgid "Buttons" -msgstr "" +msgstr "???" #: joy.rc:60 msgid "Test Force Feedback" msgstr "???? ???????????" #: joy.rc:64 -#, fuzzy -#| msgid "Available formats" msgid "Available Effects" -msgstr "???????" +msgstr "???????" #: joy.rc:66 msgid "" "Press any button in the controller to activate the chosen effect. The effect " "direction can be changed with the controller axis." msgstr "" +"??????????????????????????????????????" +"?????????????????" #: joy.rc:28 msgid "Game Controllers" @@ -9661,6 +9663,33 @@ msgid "" "/ProgIDOpen Open a document using the specified progID.\n" "/? Display this help and exit.\n" msgstr "" +"?????????????????????????????????????" +"??\n" +"???:\n" +"start [?????] ?????????? [...]\n" +"start [?????] ???????\n" +"\n" +"?????:\n" +"\"????\" ??????????????????\n" +"/d directory ??????????????????????? \n" +"/b ??????????????????????\n" +"/i ????????????????????\n" +"/min ??????????????????\n" +"/max ??????????????????\n" +"/low ??????'?'?????????????\n" +"/normal ??????'??'?????????????\n" +"/high ??????'?'?????????????\n" +"/realtime ??????'??????'?????????????\n" +"/abovenormal ??????'????'?????????????\n" +"/belownormal ??????'????'?????????????\n" +"/node n ???? NUMA ????????????????\n" +"/affinity mask ??????????????????????\n" +"/wait ????????????????????????????????" +"??\n" +"/unix Unix ?????????windows ????????????????" +"??????\n" +"/ProgIDOpen ??????? progID ?????????\n" +"/? ????????????????\n" #: cmd.rc:211 msgid "TIME sets or shows the current system time.\n" @@ -12138,27 +12167,27 @@ msgstr "????????????????????" #: taskmgr.rc:237 msgid "Sets process to the REALTIME priority class" -msgstr "??????????? ?????? ??????" +msgstr "???????????? ?????? ??????" #: taskmgr.rc:238 msgid "Sets process to the HIGH priority class" -msgstr "??????????? ? ??????" +msgstr "???????????? ? ??????" #: taskmgr.rc:240 msgid "Sets process to the ABOVE NORMAL priority class" -msgstr "??????????? ???? ??????" +msgstr "???????????? ???? ??????" #: taskmgr.rc:242 msgid "Sets process to the NORMAL priority class" -msgstr "??????????? ?? ??????" +msgstr "???????????? ?? ??????" #: taskmgr.rc:244 msgid "Sets process to the BELOW NORMAL priority class" -msgstr "??????????? ???? ??????" +msgstr "???????????? ???? ??????" #: taskmgr.rc:245 msgid "Sets process to the LOW priority class" -msgstr "??????????? ? ??????" +msgstr "???????????? ? ??????" #: taskmgr.rc:247 msgid "Controls Debug Channels" @@ -13633,22 +13662,16 @@ msgid "Help topics: " msgstr "??? ????: " #: wmic.rc:25 -#, fuzzy -#| msgid "Error: Invalid command line parameters\n" msgid "Error: Command line not supported\n" -msgstr "???: ???? ??????????\n" +msgstr "???: ???? ???????????????\n" #: wmic.rc:26 -#, fuzzy -#| msgid "Property set not found.\n" msgid "Error: Alias not found\n" -msgstr "????? ????????????\n" +msgstr "???????????\n" #: wmic.rc:27 -#, fuzzy -#| msgid "Error: Invalid key name\n" msgid "Error: Invalid query\n" -msgstr "???: ????????\n" +msgstr "???: ????????\n" #: wordpad.rc:28 msgid "&New...\tCtrl+N" From julliard at winehq.org Tue Sep 4 12:42:04 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:04 -0500 Subject: Francois Gouget : testbot/doc: Flesh out the perlpod documentation. Message-ID: Module: tools Branch: master Commit: 0cf8feb50c3c174bb767f4432cdb445003f80af3 URL: http://source.winehq.org/git/tools.git/?a=commit;h=0cf8feb50c3c174bb767f4432cdb445003f80af3 Author: Francois Gouget Date: Tue Sep 4 00:11:08 2012 +0200 testbot/doc: Flesh out the perlpod documentation. Also fix many documentation copy/paste issues. --- testbot/bin/WinePatchesHandler.pl | 4 +- testbot/lib/ObjectModel/BackEnd.pm | 11 +- testbot/lib/ObjectModel/BasicPropertyDescriptor.pm | 9 +- testbot/lib/ObjectModel/Collection.pm | 17 +++- testbot/lib/ObjectModel/DBIBackEnd.pm | 10 ++ .../lib/ObjectModel/DetailrefPropertyDescriptor.pm | 8 +- testbot/lib/ObjectModel/EnumPropertyDescriptor.pm | 12 ++- testbot/lib/ObjectModel/Item.pm | 6 +- .../lib/ObjectModel/ItemrefPropertyDescriptor.pm | 8 +- testbot/lib/ObjectModel/PropertyDescriptor.pm | 13 ++- testbot/lib/WineTestBot/Branches.pm | 15 ++- testbot/lib/WineTestBot/Config.pm | 8 +- testbot/lib/WineTestBot/Jobs.pm | 70 +++++++++++++- testbot/lib/WineTestBot/Log.pm | 6 +- testbot/lib/WineTestBot/Patches.pm | 63 ++++++++++++- testbot/lib/WineTestBot/PendingPatchSets.pm | 97 +++++++++++++++++++- testbot/lib/WineTestBot/PendingPatches.pm | 20 +++- testbot/lib/WineTestBot/Roles.pm | 18 +++- testbot/lib/WineTestBot/Steps.pm | 20 +++- testbot/lib/WineTestBot/StepsTasks.pm | 20 +++- testbot/lib/WineTestBot/Tasks.pm | 36 ++++++- testbot/lib/WineTestBot/UserRoles.pm | 14 ++- testbot/lib/WineTestBot/Users.pm | 14 ++- testbot/lib/WineTestBot/Utils.pm | 6 +- testbot/lib/WineTestBot/WineTestBotObjects.pm | 15 ++- 25 files changed, 411 insertions(+), 109 deletions(-) Diff: http://source.winehq.org/git/tools.git/?a=commitdiff;h=0cf8feb50c3c174bb767f4432cdb445003f80af3 From julliard at winehq.org Tue Sep 4 12:42:04 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:04 -0500 Subject: Francois Gouget : testbot/bin: Document the purpose of the scripts. Message-ID: Module: tools Branch: master Commit: d5fff860f06bf717b92431e919caba05882c7b4d URL: http://source.winehq.org/git/tools.git/?a=commit;h=d5fff860f06bf717b92431e919caba05882c7b4d Author: Francois Gouget Date: Tue Sep 4 00:11:16 2012 +0200 testbot/bin: Document the purpose of the scripts. --- testbot/bin/BuildSingleTest.pl | 4 ++++ testbot/bin/CheckForWinetestUpdate.pl | 4 ++++ testbot/bin/Engine.pl | 18 +++++++++++++++++- testbot/bin/Janitor.pl | 5 ++--- testbot/bin/PatchNotificationHandler.pl | 3 ++- testbot/bin/PingEngine.pl | 2 +- testbot/bin/Reconfig.pl | 4 ++++ testbot/bin/RetrievePatches.pl | 3 +++ testbot/bin/RevertVM.pl | 5 +++++ testbot/bin/WineRunBuild.pl | 3 +++ testbot/bin/WineRunReconfig.pl | 3 +++ testbot/bin/WineRunTask.pl | 2 ++ testbot/bin/WineSendLog.pl | 3 ++- 13 files changed, 52 insertions(+), 7 deletions(-) diff --git a/testbot/bin/BuildSingleTest.pl b/testbot/bin/BuildSingleTest.pl index d2b0d99..8018679 100755 --- a/testbot/bin/BuildSingleTest.pl +++ b/testbot/bin/BuildSingleTest.pl @@ -1,5 +1,9 @@ #!/usr/bin/perl -Tw # +# Performs the 'build' task in the build machine. Specifically this applies a +# conformance test patch, rebuilds the impacted test and retrieves the +# resulting 32 and 64 bit binaries. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl index 7755754..5285d89 100755 --- a/testbot/bin/CheckForWinetestUpdate.pl +++ b/testbot/bin/CheckForWinetestUpdate.pl @@ -1,5 +1,9 @@ #!/usr/bin/perl -Tw # +# Checks if a new winetest binary is available on http://test.winehq.org/data/. +# If so, triggers an update of the build VM to the latest Wine source and +# runs the full test suite on the standard Windows test VMs. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl index 422e810..947c24c 100755 --- a/testbot/bin/Engine.pl +++ b/testbot/bin/Engine.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# WineTestBot engine +# The WineTestBot server, aka the engine that makes it all work. # # Copyright 2009 Ge van Geldorp # @@ -528,6 +528,22 @@ sub InitVMs() } } +=pod +=over 12 + +=item C + +This is called on startup and regularly after that to catch thing that fall +through the cracks, possibly because of an Engine restart. +Specifically it updates the status of all the current Jobs, Steps and +Tasks, then schedules Tasks to be run, checks the staging directory for +wine-patches emails dropped by WinePatchesHandler.pl, for notifications of +changes on Wine's Patches web site dropped by PatchNotificationHandler.pl, and +checks whether any pending patchsets are now complete and thus can be scheduled. + +=back +=cut + sub SafetyNet { my $Jobs = CreateJobs(); diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl index c4ad4cd..033bd5d 100755 --- a/testbot/bin/Janitor.pl +++ b/testbot/bin/Janitor.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl -Tw # -# Janitorial tasks -# Run this from crontab once per day, e.g. -# 17 1 * * * /usr/lib/winetestbot/bin/Janitor.pl +# This script performs janitorial tasks. It removes incomplete patch series, +# archives old jobs and purges older jobs and patches. # # Copyright 2009 Ge van Geldorp # diff --git a/testbot/bin/PatchNotificationHandler.pl b/testbot/bin/PatchNotificationHandler.pl index 84ccf87..81cd376 100755 --- a/testbot/bin/PatchNotificationHandler.pl +++ b/testbot/bin/PatchNotificationHandler.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -Tw # -# Tell the engine to expect a winetest.exe update on test.winehq.org +# Notifies WineTestBot that there are new patches to test on +# http://source.winehq.org/patches. # # Copyright 2009 Ge van Geldorp # diff --git a/testbot/bin/PingEngine.pl b/testbot/bin/PingEngine.pl index 6f2581b..4faddf6 100755 --- a/testbot/bin/PingEngine.pl +++ b/testbot/bin/PingEngine.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# Ping WineTestBot engine to see if it is alive +# Pings the WineTestBot engine to see if it is still alive. # # Copyright 2009 Ge van Geldorp # diff --git a/testbot/bin/Reconfig.pl b/testbot/bin/Reconfig.pl index c5308f4..aecc6a3 100755 --- a/testbot/bin/Reconfig.pl +++ b/testbot/bin/Reconfig.pl @@ -1,5 +1,9 @@ #!/usr/bin/perl -Tw # +# Performs the 'reconfig' task in the build machine. Specifically this updates +# the build machine's Wine repository, re-runs configure, and rebuilds the +# 32 and 64 bit winetest binaries. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/RetrievePatches.pl b/testbot/bin/RetrievePatches.pl index c0f17c8..18b3aa7 100755 --- a/testbot/bin/RetrievePatches.pl +++ b/testbot/bin/RetrievePatches.pl @@ -1,5 +1,8 @@ #!/usr/bin/perl -Tw # +# Retrieve the latest patches from http://source.winehq.org/patches and submit +# them for testing. See also PatchNotificationHandler.pl. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/RevertVM.pl b/testbot/bin/RevertVM.pl index 4d7b64f..c62d498 100755 --- a/testbot/bin/RevertVM.pl +++ b/testbot/bin/RevertVM.pl @@ -1,5 +1,10 @@ #!/usr/bin/perl -Tw # +# Reverts a VM so that it is ready to run jobs. Note that in addition to the +# hypervisor revert operation this implies letting the VM settle down and +# checking that it responds to our commands. If this fails the administrator +# is notified and the VM is marked as offline. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index d11d4bf..2699351 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -1,5 +1,8 @@ #!/usr/bin/perl -Tw # +# Communicates with the build machine to have it perform the 'build' task. +# See the bin/BuildSingleTest.pl script. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl index 3a02a9e..4aacd81 100755 --- a/testbot/bin/WineRunReconfig.pl +++ b/testbot/bin/WineRunReconfig.pl @@ -1,5 +1,8 @@ #!/usr/bin/perl -Tw # +# Communicates with the build machine to have it perform the 'reconfig' task. +# See the bin/Reconfig.pl script. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 71cc9f5..6db920c 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl -Tw # +# Sends and runs the tasks in the Windows test VMs. +# # Copyright 2009 Ge van Geldorp # # This library is free software; you can redistribute it and/or diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index 1f92083..c4147a6 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -Tw # -# Send job log to submitting user +# Sends the job log to the submitting user and informs the Wine Patches web +# site of the test results. # # Copyright 2009 Ge van Geldorp # From julliard at winehq.org Tue Sep 4 12:42:04 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:04 -0500 Subject: Francois Gouget : testbot/lib: Don' t force the build VM to have a ConfigLocal.pm file and a DBI perl module. Message-ID: Module: tools Branch: master Commit: 5c821ecb546d91b6cdbf810e192c6549a4f344d2 URL: http://source.winehq.org/git/tools.git/?a=commit;h=5c821ecb546d91b6cdbf810e192c6549a4f344d2 Author: Francois Gouget Date: Tue Sep 4 00:11:28 2012 +0200 testbot/lib: Don't force the build VM to have a ConfigLocal.pm file and a DBI perl module. Neither are needed for the build VM. --- testbot/bin/BuildSingleTest.pl | 1 + testbot/bin/Reconfig.pl | 1 + testbot/lib/WineTestBot/Config.pm | 25 ++++++++++++++----------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/testbot/bin/BuildSingleTest.pl b/testbot/bin/BuildSingleTest.pl index 8018679..52ff8ba 100755 --- a/testbot/bin/BuildSingleTest.pl +++ b/testbot/bin/BuildSingleTest.pl @@ -25,6 +25,7 @@ use strict; my $Dir; sub BEGIN { + $main::BuildEnv = 1; $0 =~ m=^(.*)/[^/]*$=; $Dir = $1; } diff --git a/testbot/bin/Reconfig.pl b/testbot/bin/Reconfig.pl index aecc6a3..f72ba6c 100755 --- a/testbot/bin/Reconfig.pl +++ b/testbot/bin/Reconfig.pl @@ -25,6 +25,7 @@ use strict; my $Dir; sub BEGIN { + $main::BuildEnv = 1; $0 =~ m=^(.*)/[^/]*$=; $Dir = $1; } diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index a29f99c..5a164ea 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -24,8 +24,6 @@ WineTestBot::Config - Site-independent configuration settings =cut -use ObjectModel::DBIBackEnd; - use vars qw (@ISA @EXPORT @EXPORT_OK $UseSSL $LogDir $DataDir $BinDir $VixHostType $VixHostUsername $VixHostPassword $VixGuestUsername $VixGuestPassword $DbDataSource $DbUsername @@ -81,18 +79,23 @@ $LDAPEMailAttribute = undef; $JobPurgeDays = 7; $JobArchiveDays = 0; -eval 'require "WineTestBot/ConfigLocal.pl";'; -if ($@) +if (!$main::BuildEnv) { - print STDERR "Please create a valid lib/WineTestBot/ConfigLocal.pl, use " . - "lib/WineTestBot/ConfigLocalTemplate.pl as template\n"; - exit; + $main::BuildEnv = 0; + eval 'require "WineTestBot/ConfigLocal.pl";'; + if ($@) + { + print STDERR "Please create a valid lib/WineTestBot/ConfigLocal.pl, " . + "use lib/WineTestBot/ConfigLocalTemplate.pl as template\n"; + exit; + } + + require ObjectModel::DBIBackEnd; + ObjectModel::DBIBackEnd->UseDBIBackEnd('WineTestBot', $DbDataSource, + $DbUsername, $DbPassword, + { RaiseError => 1 }); } -ObjectModel::DBIBackEnd->UseDBIBackEnd('WineTestBot', $DbDataSource, - $DbUsername, $DbPassword, - { RaiseError => 1 }); - umask 002; 1; From julliard at winehq.org Tue Sep 4 12:42:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:05 -0500 Subject: Francois Gouget : testbot/lib: Add a CombineKey() method for use with GetItem(). Message-ID: Module: tools Branch: master Commit: 8fd856d8344e257751469c00277fcb1a33a1afea URL: http://source.winehq.org/git/tools.git/?a=commit;h=8fd856d8344e257751469c00277fcb1a33a1afea Author: Francois Gouget Date: Tue Sep 4 00:11:52 2012 +0200 testbot/lib: Add a CombineKey() method for use with GetItem(). This way we don't need to build a dummy object just to be able to compute the string to use for GetItem(). This also provides symmetry with SplitKey(). --- testbot/lib/ObjectModel/Collection.pm | 8 ++++++++ testbot/lib/WineTestBot/PendingPatchSets.pm | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm index 9ca2503..3d7f78c 100644 --- a/testbot/lib/ObjectModel/Collection.pm +++ b/testbot/lib/ObjectModel/Collection.pm @@ -236,6 +236,14 @@ sub IsEmpty return scalar(keys %{$self->{Items}}) == 0; } +sub CombineKey +{ + my $self = shift; + + my $CombinedKey = join("#@#", @_); + return $CombinedKey; +} + sub SplitKey { my $self = shift; diff --git a/testbot/lib/WineTestBot/PendingPatchSets.pm b/testbot/lib/WineTestBot/PendingPatchSets.pm index 998c9d3..1a6b9e5 100644 --- a/testbot/lib/WineTestBot/PendingPatchSets.pm +++ b/testbot/lib/WineTestBot/PendingPatchSets.pm @@ -230,13 +230,7 @@ sub NewSubmission my $PartNo = int($1); my $MaxPartNo = int($2); - my $DummySet = CreatePendingPatchSets()->Add(); - $DummySet->EMail($Patch->FromEMail); - $DummySet->TotalParts($MaxPartNo); - my $SetKey = $DummySet->GetKey(); - $DummySet = undef; - - my $Set = $self->GetItem($SetKey); + my $Set = $self->GetItem($self->CombineKey($Patch->FromEMail, $MaxPartNo)); if (! defined($Set)) { $Set = $self->Add(); From julliard at winehq.org Tue Sep 4 12:42:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:05 -0500 Subject: Francois Gouget : testbot/lib: Remove a duplicate $WineTestBot::Config:: WebHostName definition. Message-ID: Module: tools Branch: master Commit: a86f04cb1e98d25c22b021c1302c36af193c53ef URL: http://source.winehq.org/git/tools.git/?a=commit;h=a86f04cb1e98d25c22b021c1302c36af193c53ef Author: Francois Gouget Date: Tue Sep 4 00:11:59 2012 +0200 testbot/lib: Remove a duplicate $WineTestBot::Config::WebHostName definition. $WineTestBot::Config::WebHostName must be set in ConfigLocalTemplate.pl anyway. --- testbot/lib/WineTestBot/Config.pm | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index 5a164ea..c7b28b1 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -67,8 +67,6 @@ $ProjectName = "Wine"; $PatchesMailingList = "wine-patches"; $PatchResultsEMail = undef; -$WebHostName = undef; - $LDAPServer = undef; $LDAPBindDN = undef; $LDAPSearchBase = undef; From julliard at winehq.org Tue Sep 4 12:42:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:05 -0500 Subject: Francois Gouget : testbot/lib: Move the $PatchResultsEMail to ConfigLocalTemplate.pl. Message-ID: Module: tools Branch: master Commit: 6043cb66d6ee568983472fdba39bfa14741bfa3c URL: http://source.winehq.org/git/tools.git/?a=commit;h=6043cb66d6ee568983472fdba39bfa14741bfa3c Author: Francois Gouget Date: Tue Sep 4 00:12:30 2012 +0200 testbot/lib: Move the $PatchResultsEMail to ConfigLocalTemplate.pl. It must be changed for integration with Wine's Patches website and thus should not have to be set in a checked-in file. --- testbot/lib/WineTestBot/Config.pm | 1 - testbot/lib/WineTestBot/ConfigLocalTemplate.pl | 4 ++++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index c7b28b1..4299b32 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -65,7 +65,6 @@ $OverheadTimeout = 3 * 60; $ProjectName = "Wine"; $PatchesMailingList = "wine-patches"; -$PatchResultsEMail = undef; $LDAPServer = undef; $LDAPBindDN = undef; diff --git a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl index 8ae54f4..bb7684a 100644 --- a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl +++ b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl @@ -62,6 +62,10 @@ $WineTestBot::Config::AdminEMail = undef; # From address of mails sent by WineTestBot to users $WineTestBot::Config::RobotEMail = undef; +# Email address to send the results to for integration with the Wine Patches +# site +$WineTestBot::Config::PatchResultsEMail = undef; + # Host name of the web interface $WineTestBot::Config::WebHostName = undef; From julliard at winehq.org Tue Sep 4 12:42:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:05 -0500 Subject: Francois Gouget : testbot/bin: Make sure WineSendLog does not spam anyone by default. Message-ID: Module: tools Branch: master Commit: 0d513c4a3f63b4401dc1a2f2924d0e7e43eeae3b URL: http://source.winehq.org/git/tools.git/?a=commit;h=0d513c4a3f63b4401dc1a2f2924d0e7e43eeae3b Author: Francois Gouget Date: Tue Sep 4 00:12:38 2012 +0200 testbot/bin: Make sure WineSendLog does not spam anyone by default. This adds a $WinePatchToOverride configuration option and sets it to the WineTestBot administrator email address by default. So as the name implies any test result will be sent to him instead of to the patch authors until he decides the WineTestBot to be worthy. This also adds a $WinePatchCc configuration option to set who should be CC-ed the results. By default this is empty. --- testbot/bin/WineSendLog.pl | 4 ++-- testbot/lib/WineTestBot/Config.pm | 6 ++++-- testbot/lib/WineTestBot/ConfigLocalTemplate.pl | 11 ++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index c4147a6..c8c2dce 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -173,7 +173,7 @@ sub CompareLogs sub SendLog { my $Job = shift; - my $To = $Job->GetEMailRecipient(); + my $To = $WinePatchToOverride || $Job->GetEMailRecipient(); if (! defined($To)) { return; @@ -420,7 +420,7 @@ EOF open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq"); print SENDMAIL "From: Marvin <$RobotEMail>\n"; print SENDMAIL "To: $To\n"; - print SENDMAIL "Cc: wine-devel\@winehq.org\n"; + print SENDMAIL "Cc: $WinePatchCc\n"; print SENDMAIL "Subject: Re: ", $Job->Patch->Subject, "\n"; print SENDMAIL <<"EOF"; diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index 4299b32..df40a0c 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -28,7 +28,8 @@ use vars qw (@ISA @EXPORT @EXPORT_OK $UseSSL $LogDir $DataDir $BinDir $VixHostType $VixHostUsername $VixHostPassword $VixGuestUsername $VixGuestPassword $DbDataSource $DbUsername $DbPassword $MaxRevertingVMs $MaxRunningVMs $MaxExtraPoweredOnVms $SleepAfterRevert - $AdminEMail $RobotEMail $SuiteTimeout $SingleTimeout + $AdminEMail $RobotEMail $WinePatchToOverride $WinePatchCc + $SuiteTimeout $SingleTimeout $BuildTimeout $ReconfigTimeout $OverheadTimeout $TagPrefix $ProjectName $PatchesMailingList $PatchResultsEMail $LDAPServer $LDAPBindDN $LDAPSearchBase $LDAPSearchFilter @@ -40,7 +41,8 @@ require Exporter; @EXPORT = qw($UseSSL $LogDir $DataDir $BinDir $VixHostType $VixHostUsername $VixHostPassword $VixGuestUsername $VixGuestPassword $MaxRevertingVMs $MaxRunningVMs $MaxExtraPoweredOnVms - $SleepAfterRevert $AdminEMail $RobotEMail $SuiteTimeout + $SleepAfterRevert $AdminEMail $RobotEMail $WinePatchToOverride + $WinePatchCc $SuiteTimeout $SingleTimeout $BuildTimeout $ReconfigTimeout $OverheadTimeout $TagPrefix $ProjectName $PatchesMailingList $PatchResultsEMail $LDAPServer $LDAPBindDN $LDAPSearchBase $LDAPSearchFilter diff --git a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl index bb7684a..9469784 100644 --- a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl +++ b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl @@ -62,8 +62,17 @@ $WineTestBot::Config::AdminEMail = undef; # From address of mails sent by WineTestBot to users $WineTestBot::Config::RobotEMail = undef; +# If set, sends the results to the specified email address instead of the +# patch author. Set it to undef once your WineTestBot installation works and +# can provide useful results to Wine developers. +$WineTestBot::Config::WinePatchToOverride = $WineTestBot::Config::AdminEMail; + +# If set, CC the results to the specified email address, for instance the +# wine-devel mailing list. +$WineTestBot::Config::WinePatchCc = ""; + # Email address to send the results to for integration with the Wine Patches -# site +# web site $WineTestBot::Config::PatchResultsEMail = undef; # Host name of the web interface From julliard at winehq.org Tue Sep 4 12:42:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 04 Sep 2012 12:42:05 -0500 Subject: Francois Gouget : testbot/windows: Move the Windows binaries to bin/windows . Message-ID: Module: tools Branch: master Commit: 149963d89f2cd18112b489894d6d8055cebe79f9 URL: http://source.winehq.org/git/tools.git/?a=commit;h=149963d89f2cd18112b489894d6d8055cebe79f9 Author: Francois Gouget Date: Tue Sep 4 00:12:21 2012 +0200 testbot/windows: Move the Windows binaries to bin/windows. They are not meant to be run on the server so this cleans up the bin directory. --- testbot/bin/WineRunTask.pl | 4 ++-- testbot/bin/{ => windows}/GenFixEnv.exe | Bin 7680 -> 7680 bytes testbot/bin/{ => windows}/TestLauncher32.exe | Bin 432844 -> 432844 bytes testbot/bin/{ => windows}/TestLauncher64.exe | Bin 115348 -> 115348 bytes testbot/src/GenFixEnv/Makefile | 2 +- testbot/src/TestLauncher/Makefile | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 6db920c..836dab2 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -264,14 +264,14 @@ if (defined($ErrMessage)) my $TestLauncher = "TestLauncher" . ($FileType eq "exe64" ? "64" : "32") . ".exe"; -$ErrMessage = $VM->CopyFileFromHostToGuest("$BinDir/$TestLauncher", +$ErrMessage = $VM->CopyFileFromHostToGuest("$BinDir/windows/$TestLauncher", "C:\\winetest\\$TestLauncher"); if (defined($ErrMessage)) { FatalError "Can't copy TestLauncher to VM: $ErrMessage\n", $FullErrFileName, $Job, $Step, $Task; } -$ErrMessage = $VM->CopyFileFromHostToGuest("$BinDir/GenFixEnv.exe", +$ErrMessage = $VM->CopyFileFromHostToGuest("$BinDir/windows/GenFixEnv.exe", "C:\\winetest\\GenFixEnv.exe"); if (defined($ErrMessage)) { diff --git a/testbot/bin/GenFixEnv.exe b/testbot/bin/windows/GenFixEnv.exe similarity index 100% rename from testbot/bin/GenFixEnv.exe rename to testbot/bin/windows/GenFixEnv.exe diff --git a/testbot/bin/TestLauncher32.exe b/testbot/bin/windows/TestLauncher32.exe similarity index 100% rename from testbot/bin/TestLauncher32.exe rename to testbot/bin/windows/TestLauncher32.exe diff --git a/testbot/bin/TestLauncher64.exe b/testbot/bin/windows/TestLauncher64.exe similarity index 100% rename from testbot/bin/TestLauncher64.exe rename to testbot/bin/windows/TestLauncher64.exe diff --git a/testbot/src/GenFixEnv/Makefile b/testbot/src/GenFixEnv/Makefile index c80a5c3..30c34b9 100644 --- a/testbot/src/GenFixEnv/Makefile +++ b/testbot/src/GenFixEnv/Makefile @@ -1,4 +1,4 @@ -bindir = ../../bin +bindir = ../../bin/windows CROSSCC32 = i686-w64-mingw32-gcc CROSSSTRIP32 = i686-w64-mingw32-strip diff --git a/testbot/src/TestLauncher/Makefile b/testbot/src/TestLauncher/Makefile index 822aef7..2b1dfaa 100644 --- a/testbot/src/TestLauncher/Makefile +++ b/testbot/src/TestLauncher/Makefile @@ -1,4 +1,4 @@ -bindir = ../../bin +bindir = ../../bin/windows CROSSCC32 = i686-w64-mingw32-gcc CROSSSTRIP32 = i686-w64-mingw32-strip From julliard at winehq.org Wed Sep 5 15:36:44 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:44 -0500 Subject: Nikolay Sivov : user32: Release uniscribe data on Edit control destruction (valgrind). Message-ID: Module: wine Branch: master Commit: 6b1946154831c4537b9fffc4994cb0273db55918 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b1946154831c4537b9fffc4994cb0273db55918 Author: Nikolay Sivov Date: Tue Sep 4 23:06:17 2012 +0400 user32: Release uniscribe data on Edit control destruction (valgrind). --- dlls/user32/edit.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 226d737..278aa38 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -4601,6 +4601,7 @@ static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es) pc = pp; } + EDIT_InvalidateUniscribeData(es); SetWindowLongPtrW( es->hwndSelf, 0, 0 ); HeapFree(GetProcessHeap(), 0, es->undo_text); HeapFree(GetProcessHeap(), 0, es); From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Vincent Povirk : mscoree: Add support for tracing the entry point assembly. Message-ID: Module: wine Branch: master Commit: f2437c2b328ca4061cfcb5615a3e96073bf109f5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2437c2b328ca4061cfcb5615a3e96073bf109f5 Author: Vincent Povirk Date: Tue Sep 4 11:32:00 2012 -0500 mscoree: Add support for tracing the entry point assembly. --- dlls/mscoree/corruntimehost.c | 2 ++ dlls/mscoree/metahost.c | 1 + dlls/mscoree/mscoree_private.h | 1 + 3 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index ffc204d..ecefe75 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -1073,6 +1073,8 @@ __int32 WINAPI _CorExeMain(void) if (assembly) { + host->mono->mono_trace_set_assembly(assembly); + exit_code = host->mono->mono_jit_exec(domain, assembly, argc, argv); } else diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 8417344..66dde5d 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -207,6 +207,7 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result) LOAD_MONO_FUNCTION(mono_stringify_assembly_name); LOAD_MONO_FUNCTION(mono_string_new); LOAD_MONO_FUNCTION(mono_thread_attach); + LOAD_MONO_FUNCTION(mono_trace_set_assembly); /* GLib imports obsoleted by the 2.0 ABI */ if (This->mono_abi_version == 1) diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h index 7266687..f7e9c11 100644 --- a/dlls/mscoree/mscoree_private.h +++ b/dlls/mscoree/mscoree_private.h @@ -175,6 +175,7 @@ struct loaded_mono void (CDECL *mono_thread_pool_cleanup)(void); void (CDECL *mono_thread_suspend_all_other_threads)(void); void (CDECL *mono_threads_set_shutting_down)(void); + void (CDECL *mono_trace_set_assembly)(MonoAssembly *assembly); MonoString* (CDECL *mono_string_new)(MonoDomain *domain, const char *str); MonoThread* (CDECL *mono_thread_attach)(MonoDomain *domain); }; From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Henri Verbeet : wined3d: Read complete shader instructions at a time. Message-ID: Module: wine Branch: master Commit: 42582ada009d8e1720768e95c2fc444414906e52 URL: http://source.winehq.org/git/wine.git/?a=commit;h=42582ada009d8e1720768e95c2fc444414906e52 Author: Henri Verbeet Date: Tue Sep 4 20:15:08 2012 +0200 wined3d: Read complete shader instructions at a time. --- dlls/wined3d/shader.c | 235 ++++++++++++---------------------------- dlls/wined3d/shader_sm1.c | 126 +++++++++++++++------ dlls/wined3d/shader_sm4.c | 99 ++++++++++-------- dlls/wined3d/wined3d_private.h | 26 ++--- 4 files changed, 224 insertions(+), 262 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=42582ada009d8e1720768e95c2fc444414906e52 From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Henri Verbeet : wined3d: Add type information to shader registers. Message-ID: Module: wine Branch: master Commit: ac5c420c916628aa4eaabccee7282d40111427eb URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac5c420c916628aa4eaabccee7282d40111427eb Author: Henri Verbeet Date: Tue Sep 4 20:15:09 2012 +0200 wined3d: Add type information to shader registers. --- dlls/wined3d/shader.c | 44 +++++++++++- dlls/wined3d/shader_sm1.c | 17 ++++-- dlls/wined3d/shader_sm4.c | 141 ++++++++++++++++++++++++--------------- dlls/wined3d/wined3d_private.h | 10 +++ 4 files changed, 149 insertions(+), 63 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=ac5c420c916628aa4eaabccee7282d40111427eb From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Henri Verbeet : wined3d: Just return the swapchain from wined3d_device_get_swapchain(). Message-ID: Module: wine Branch: master Commit: 8fd7d3a2b38132dd03e918a3714bf55e066c2acc URL: http://source.winehq.org/git/wine.git/?a=commit;h=8fd7d3a2b38132dd03e918a3714bf55e066c2acc Author: Henri Verbeet Date: Tue Sep 4 20:15:10 2012 +0200 wined3d: Just return the swapchain from wined3d_device_get_swapchain(). --- dlls/d3d9/device.c | 8 ++-- dlls/ddraw/ddraw.c | 8 ++-- dlls/dxgi/factory.c | 9 ++-- dlls/wined3d/device.c | 119 ++++++++++----------------------------------- dlls/wined3d/stateblock.c | 5 +-- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 +- 7 files changed, 42 insertions(+), 113 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=8fd7d3a2b38132dd03e918a3714bf55e066c2acc From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Michael Stefaniuc : opengl32: Move the opengl_ext. h include before the other Wine headers. Message-ID: Module: wine Branch: master Commit: 6a6806944c520dc4b532213d2e30419dd856dc06 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a6806944c520dc4b532213d2e30419dd856dc06 Author: Michael Stefaniuc Date: Wed Sep 5 10:55:19 2012 +0200 opengl32: Move the opengl_ext.h include before the other Wine headers. --- dlls/opengl32/wgl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index bcf398d..e5a1bae 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -25,6 +25,7 @@ #include #include +#include "opengl_ext.h" #include "windef.h" #include "winbase.h" #include "winuser.h" @@ -33,7 +34,6 @@ #include "winternl.h" #include "winnt.h" -#include "opengl_ext.h" #define WGL_WGLEXT_PROTOTYPES #include "wine/wglext.h" #include "wine/gdi_driver.h" From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Michael Stefaniuc : opengl32: Avoid conflicting defines for GLAPI / WINGDIAPI. Message-ID: Module: wine Branch: master Commit: 4076e0eb129ad9ef23be6749db5807f5430e4f6a URL: http://source.winehq.org/git/wine.git/?a=commit;h=4076e0eb129ad9ef23be6749db5807f5430e4f6a Author: Michael Stefaniuc Date: Wed Sep 5 10:57:34 2012 +0200 opengl32: Avoid conflicting defines for GLAPI / WINGDIAPI. --- dlls/opengl32/opengl_ext.h | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/opengl32/opengl_ext.h b/dlls/opengl32/opengl_ext.h index d84ec0d..eb35e54 100644 --- a/dlls/opengl32/opengl_ext.h +++ b/dlls/opengl32/opengl_ext.h @@ -19,17 +19,15 @@ #ifndef __DLLS_OPENGL32_OPENGL_EXT_H #define __DLLS_OPENGL32_OPENGL_EXT_H -#undef APIENTRY -#undef CALLBACK -#undef WINAPI - #define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */ #include #undef XMD_H #undef APIENTRY #undef CALLBACK +#undef GLAPI #undef WINAPI +#undef WINGDIAPI /* Redefines the constants */ #define CALLBACK __stdcall From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Piotr Caban : ntdll: Added processor cores information to SystemLogicalProcessorInformation ( Mac). Message-ID: Module: wine Branch: master Commit: 6c2b7332d376cfb050199a12f5f24f2b3656588d URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c2b7332d376cfb050199a12f5f24f2b3656588d Author: Piotr Caban Date: Wed Sep 5 12:00:55 2012 +0200 ntdll: Added processor cores information to SystemLogicalProcessorInformation (Mac). --- dlls/ntdll/nt.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 863844a..0b01010 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1606,6 +1606,51 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION ** *max_len = len * sizeof(**data); return STATUS_SUCCESS; } +#elif defined(__APPLE__) +static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **data, DWORD *max_len) +{ + DWORD len = 0, i, j; + DWORD cores_no, lcpu_no, lcpu_per_core, cores_per_package; + size_t size; + ULONG_PTR mask; + + lcpu_no = NtCurrentTeb()->Peb->NumberOfProcessors; + + size = sizeof(cores_no); + if(sysctlbyname("machdep.cpu.core_count", &cores_no, &size, NULL, 0)) + cores_no = lcpu_no; + + lcpu_per_core = lcpu_no/cores_no; + for(i=0; i Module: wine Branch: master Commit: 785fde5920511c6f531d1baa2134acd301b0b22a URL: http://source.winehq.org/git/wine.git/?a=commit;h=785fde5920511c6f531d1baa2134acd301b0b22a Author: Piotr Caban Date: Wed Sep 5 12:01:15 2012 +0200 ntdll: Added numa node information to SystemLogicalProcessorInformation (Mac). --- dlls/ntdll/nt.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 0b01010..6f2635d 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1648,6 +1648,14 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION ** len++; } + mask = 0; + for(i=0; i Module: wine Branch: master Commit: 682b276ac58b185d567c1026cbf1cbb9addc37b3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=682b276ac58b185d567c1026cbf1cbb9addc37b3 Author: Piotr Caban Date: Wed Sep 5 12:01:28 2012 +0200 ntdll: Added processor cache to SystemLogicalProcessorInformation (Mac). --- dlls/ntdll/nt.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 69 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 6f2635d..2536d33 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1609,10 +1609,12 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION ** #elif defined(__APPLE__) static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **data, DWORD *max_len) { - DWORD len = 0, i, j; - DWORD cores_no, lcpu_no, lcpu_per_core, cores_per_package; + DWORD len = 0, i, j, k; + DWORD cores_no, lcpu_no, lcpu_per_core, cores_per_package, assoc; size_t size; ULONG_PTR mask; + LONGLONG cache_size, cache_line_size, cache_sharing[10]; + CACHE_DESCRIPTOR cache[4]; lcpu_no = NtCurrentTeb()->Peb->NumberOfProcessors; @@ -1648,6 +1650,71 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION ** len++; } + memset(cache, 0, sizeof(cache)); + cache[0].Level = 1; + cache[0].Type = CacheInstruction; + cache[1].Level = 1; + cache[1].Type = CacheData; + cache[2].Level = 2; + cache[2].Type = CacheUnified; + cache[3].Level = 3; + cache[3].Type = CacheUnified; + + size = sizeof(cache_line_size); + if(!sysctlbyname("hw.cachelinesize", &cache_line_size, &size, NULL, 0)) + { + for(i=0; i<4; i++) + cache[i].LineSize = cache_line_size; + } + + /* TODO: set associativity for all caches */ + size = sizeof(assoc); + if(!sysctlbyname("machdep.cpu.cache.L2_associativity", &assoc, &size, NULL, 0)) + cache[2].Associativity = assoc; + + size = sizeof(cache_size); + if(!sysctlbyname("hw.l1icachesize", &cache_size, &size, NULL, 0)) + cache[0].Size = cache_size; + size = sizeof(cache_size); + if(!sysctlbyname("hw.l1dcachesize", &cache_size, &size, NULL, 0)) + cache[1].Size = cache_size; + size = sizeof(cache_size); + if(!sysctlbyname("hw.l2cachesize", &cache_size, &size, NULL, 0)) + cache[2].Size = cache_size; + size = sizeof(cache_size); + if(!sysctlbyname("hw.l3cachesize", &cache_size, &size, NULL, 0)) + cache[3].Size = cache_size; + + size = sizeof(cache_sharing); + if(!sysctlbyname("hw.cacheconfig", cache_sharing, &size, NULL, 0)) + { + for(i=1; i<4 && i Module: wine Branch: master Commit: 4f71f4af59b8989b2288800a7b337f61475df505 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f71f4af59b8989b2288800a7b337f61475df505 Author: Jason Edmeades Date: Tue Sep 4 00:30:17 2012 +0100 cmd: Fix "PATH=value" command. --- programs/cmd/builtins.c | 2 +- programs/cmd/tests/test_builtins.cmd | 11 +++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 4 ++++ 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 16f4eff..b2546d4 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2371,7 +2371,7 @@ void WCMD_setshow_path (const WCHAR *command) { static const WCHAR pathW[] = {'P','A','T','H','\0'}; static const WCHAR pathEqW[] = {'P','A','T','H','=','\0'}; - if (strlenW(param1) == 0) { + if (strlenW(param1) == 0 && strlenW(param2) == 0) { status = GetEnvironmentVariableW(pathW, string, sizeof(string)/sizeof(WCHAR)); if (status != 0) { WCMD_output_asis ( pathEqW); diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 13b53c5..093cc23 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -1530,6 +1530,17 @@ if d==d goto dest4 :dest4 at space@ echo goto with a following space worked +echo ------------ Testing PATH ------------ +set backup_path=%path% +set path=original +path +path try2 +path +path=try3 +path +set path=%backup_path% +set backup_path= + echo ------------ Testing combined CALLs/GOTOs ------------ echo @echo off>foo.cmd echo goto :eof>>foot.cmd diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index b7bcd96..93b11e5 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -825,6 +825,10 @@ goto with no leading space worked goto with a leading space worked goto with a leading tab worked goto with a following space worked +------------ Testing PATH ------------ +PATH=original +PATH=try2 +PATH=try3 ------------ Testing combined CALLs/GOTOs ------------ world cheball From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Jason Edmeades : cmd: More generic zero iteration for loop fix. Message-ID: Module: wine Branch: master Commit: 141e33b845bff271fd8aebdd8ec24b32a95be454 URL: http://source.winehq.org/git/wine.git/?a=commit;h=141e33b845bff271fd8aebdd8ec24b32a95be454 Author: Jason Edmeades Date: Tue Sep 4 21:11:51 2012 +0100 cmd: More generic zero iteration for loop fix. --- programs/cmd/builtins.c | 23 +++++++++++++++++------ programs/cmd/tests/test_builtins.cmd | 24 +++++++++++++++++++++--- programs/cmd/tests/test_builtins.cmd.exp | 9 ++++++--- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index b2546d4..4ce78f7 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1084,6 +1084,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { BOOL expandDirs = FALSE; BOOL useNumbers = FALSE; BOOL doFileset = FALSE; + BOOL doExecuted = FALSE; /* Has the 'do' part been executed */ LONG numbers[3] = {0,0,0}; /* Defaults to 0 in native */ int itemNum; CMD_LIST *thisCmdStart; @@ -1233,6 +1234,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { { thisCmdStart = cmdStart; WINE_TRACE("Processing FOR filename %s\n", wine_dbgstr_w(fd.cFileName)); + doExecuted = TRUE; WCMD_part_execute (&thisCmdStart, firstCmd, variable, fd.cFileName, FALSE, TRUE); } @@ -1241,6 +1243,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { FindClose (hff); } } else { + doExecuted = TRUE; WCMD_part_execute(&thisCmdStart, firstCmd, variable, item, FALSE, TRUE); } @@ -1310,6 +1313,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { /* FIXME: The following should be moved into its own routine and reused for the string literal parsing below */ thisCmdStart = cmdStart; + doExecuted = TRUE; WCMD_part_execute(&thisCmdStart, firstCmd, variable, parm, FALSE, TRUE); cmdEnd = thisCmdStart; } @@ -1340,6 +1344,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { /* FIXME: The following should be moved into its own routine and reused for the string literal parsing below */ thisCmdStart = cmdStart; + doExecuted = TRUE; WCMD_part_execute(&thisCmdStart, firstCmd, variable, parm, FALSE, TRUE); cmdEnd = thisCmdStart; } @@ -1369,17 +1374,23 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { WINE_TRACE("Processing FOR number %s\n", wine_dbgstr_w(thisNum)); thisCmdStart = cmdStart; + doExecuted = TRUE; WCMD_part_execute(&thisCmdStart, firstCmd, variable, thisNum, FALSE, TRUE); } - - /* Now skip over the subsequent commands if we did not perform the for loop */ - if (thisCmdStart == cmdStart) { - WINE_TRACE("Skipping for loop commands due to no valid iterations\n"); - WCMD_part_execute(&thisCmdStart, firstCmd, variable, thisNum, FALSE, FALSE); - } cmdEnd = thisCmdStart; } + /* Now skip over the do part if we did not perform the for loop so far. + We store in cmdEnd the next command after the do block, but we only + know this if something was run. If it has not been, we need to calculate + it. */ + if (!doExecuted) { + thisCmdStart = cmdStart; + WINE_TRACE("Skipping for loop commands due to no valid iterations\n"); + WCMD_part_execute(&thisCmdStart, firstCmd, NULL, NULL, FALSE, FALSE); + cmdEnd = thisCmdStart; + } + /* When the loop ends, either something like a GOTO or EXIT /b has terminated all processing, OR it should be pointing to the end of && processing OR it should be pointing at the NULL end of bracket for the DO. The return diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 093cc23..77086ed 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -643,9 +643,27 @@ echo > bazbaz echo --- basic wildcards for %%i in (ba*) do echo %%i echo --- for /d -for /d %%i in (baz foo bar) do echo %%i -rem FIXME for /d incorrectly parses when wildcards are used -rem for /d %%i in (bazb*) do echo %%i +for /d %%i in (baz foo bar) do echo %%i 2>&1 +rem Confirm we dont match files: +for /d %%i in (bazb*) do echo %%i 2>&1 +for /d %%i in (bazb2*) do echo %%i 2>&1 +rem Show we pass through non wildcards +for /d %%i in (PASSED) do echo %%i +for /d %%i in (xxx) do ( + echo %%i - Should be xxx + echo Expected second line +) +rem Show we issue no messages on failures +for /d %%i in (FAILED?) do echo %%i 2>&1 +for /d %%i in (FAILED?) do ( + echo %%i - Unexpected! + echo FAILED Unexpected second line +) +for /d %%i in (FAILED*) do echo %%i 2>&1 +for /d %%i in (FAILED*) do ( + echo %%i - Unexpected! + echo FAILED Unexpected second line +) rem FIXME can't test wildcard expansion here since it's listed in directory rem order, and not in alphabetic order. rem Proper testing would need a currently missing "sort" program implementation. diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 93b11e5..fe4c30c 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -455,9 +455,12 @@ C --- basic wildcards bazbaz --- for /d -baz -foo -bar +baz at space@ +foo at space@ +bar at space@ +PASSED +xxx - Should be xxx +Expected second line --- for /L 1 3 From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Jason Edmeades : cmd: Fix incorrect pointer comparison. Message-ID: Module: wine Branch: master Commit: 9877b53b8cd070dd92d3a4d16b39343a7283b65c URL: http://source.winehq.org/git/wine.git/?a=commit;h=9877b53b8cd070dd92d3a4d16b39343a7283b65c Author: Jason Edmeades Date: Tue Sep 4 23:40:43 2012 +0100 cmd: Fix incorrect pointer comparison. --- programs/cmd/builtins.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 4ce78f7..b2f9aeb 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2131,7 +2131,7 @@ void WCMD_setshow_default (const WCHAR *command) { if (*command != '"') *pos++ = *command; command++; } - while (pos > command && (*(pos-1) == ' ' || *(pos-1) == '\t')) + while (pos > string && (*(pos-1) == ' ' || *(pos-1) == '\t')) pos--; *pos = 0x00; From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Alexandre Julliard : user32: Add a helper function to retrieve the virtual screen rectangle. Message-ID: Module: wine Branch: master Commit: 75b641fc75727138cab2230453ea0b859bf5437c URL: http://source.winehq.org/git/wine.git/?a=commit;h=75b641fc75727138cab2230453ea0b859bf5437c Author: Alexandre Julliard Date: Wed Sep 5 19:28:50 2012 +0200 user32: Add a helper function to retrieve the virtual screen rectangle. --- dlls/user32/sysparams.c | 26 ++++++++++++++------------ dlls/user32/user_private.h | 1 + dlls/user32/winpos.c | 6 +----- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 4603cf4..b27b506 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -523,6 +523,12 @@ static void get_monitors_info( struct monitor_info *info ) EnumDisplayMonitors( 0, NULL, monitor_info_proc, (LPARAM)info ); } +RECT get_virtual_screen_rect(void) +{ + struct monitor_info info; + get_monitors_info( &info ); + return info.virtual_rect; +} /* get text metrics and/or "average" char width of the specified logfont * for the specified dc */ @@ -2856,27 +2862,23 @@ INT WINAPI GetSystemMetrics( INT index ) return 1; case SM_XVIRTUALSCREEN: { - struct monitor_info info; - get_monitors_info( &info ); - return info.virtual_rect.left; + RECT rect = get_virtual_screen_rect(); + return rect.left; } case SM_YVIRTUALSCREEN: { - struct monitor_info info; - get_monitors_info( &info ); - return info.virtual_rect.top; + RECT rect = get_virtual_screen_rect(); + return rect.top; } case SM_CXVIRTUALSCREEN: { - struct monitor_info info; - get_monitors_info( &info ); - return info.virtual_rect.right - info.virtual_rect.left; + RECT rect = get_virtual_screen_rect(); + return rect.right - rect.left; } case SM_CYVIRTUALSCREEN: { - struct monitor_info info; - get_monitors_info( &info ); - return info.virtual_rect.bottom - info.virtual_rect.top; + RECT rect = get_virtual_screen_rect(); + return rect.bottom - rect.top; } case SM_CMONITORS: { diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 2bd8ad8..a57751f 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -214,6 +214,7 @@ extern void free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN; extern void invalidate_dce( struct tagWND *win, const RECT *rect ) DECLSPEC_HIDDEN; extern void erase_now( HWND hwnd, UINT rdw_flags ) DECLSPEC_HIDDEN; extern void *get_hook_proc( void *proc, const WCHAR *module ) DECLSPEC_HIDDEN; +extern RECT get_virtual_screen_rect(void) DECLSPEC_HIDDEN; extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN; extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN; extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 507a5ce..27489fe 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2544,11 +2544,7 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) else { parent = 0; - GetClientRect( GetDesktopWindow(), &mouseRect ); - mouseRect.left = GetSystemMetrics( SM_XVIRTUALSCREEN ); - mouseRect.top = GetSystemMetrics( SM_YVIRTUALSCREEN ); - mouseRect.right = mouseRect.left + GetSystemMetrics( SM_CXVIRTUALSCREEN ); - mouseRect.bottom = mouseRect.top + GetSystemMetrics( SM_CYVIRTUALSCREEN ); + mouseRect = get_virtual_screen_rect(); } if (ON_LEFT_BORDER(hittest)) From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Alexandre Julliard : gdi32: Let user32 specify the device rectangle when setting the visible region. Message-ID: Module: wine Branch: master Commit: 01c9c1cbc246ea7b4a8fdcd9773485404e3c2eca URL: http://source.winehq.org/git/wine.git/?a=commit;h=01c9c1cbc246ea7b4a8fdcd9773485404e3c2eca Author: Alexandre Julliard Date: Wed Sep 5 19:29:29 2012 +0200 gdi32: Let user32 specify the device rectangle when setting the visible region. --- dlls/gdi32/clipping.c | 9 +++++---- dlls/gdi32/gdi32.spec | 2 +- dlls/user32/painting.c | 3 ++- include/wine/gdi_driver.h | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/clipping.c b/dlls/gdi32/clipping.c index 1cb420c..3486a18 100644 --- a/dlls/gdi32/clipping.c +++ b/dlls/gdi32/clipping.c @@ -268,13 +268,13 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode ) /*********************************************************************** * __wine_set_visible_region (GDI32.@) */ -void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect ) +void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect, const RECT *device_rect ) { DC * dc; if (!(dc = get_dc_ptr( hdc ))) return; - TRACE( "%p %p %s\n", hdc, hrgn, wine_dbgstr_rect(vis_rect) ); + TRACE( "%p %p %s %s\n", hdc, hrgn, wine_dbgstr_rect(vis_rect), wine_dbgstr_rect(device_rect) ); /* map region to DC coordinates */ OffsetRgn( hrgn, -vis_rect->left, -vis_rect->top ); @@ -282,6 +282,7 @@ void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect ) if (dc->hVisRgn) DeleteObject( dc->hVisRgn ); dc->dirty = 0; dc->vis_rect = *vis_rect; + dc->device_rect = *device_rect; dc->hVisRgn = hrgn; DC_UpdateXforms( dc ); update_dc_clipping( dc ); @@ -415,8 +416,6 @@ INT WINAPI GetClipBox( HDC hdc, LPRECT rect ) if (get_dc_region( dc )) { ret = GetRgnBox( get_dc_region( dc ), rect ); - if (get_dc_device_rect( dc, &visrect ) && !intersect_rect( rect, rect, &visrect )) - ret = NULLREGION; } else { @@ -424,6 +423,8 @@ INT WINAPI GetClipBox( HDC hdc, LPRECT rect ) *rect = dc->vis_rect; } + if (get_dc_device_rect( dc, &visrect ) && !intersect_rect( rect, rect, &visrect )) ret = NULLREGION; + if (dc->layout & LAYOUT_RTL) { int tmp = rect->left; diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 1e30485..dfb8732 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -511,7 +511,7 @@ # GDI objects @ cdecl __wine_make_gdi_object_system(long long) -@ cdecl __wine_set_visible_region(long long ptr) +@ cdecl __wine_set_visible_region(long long ptr ptr) # OpenGL @ cdecl __wine_get_wgl_driver(long long) diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 64f4318..d6b5aaf 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -161,7 +161,8 @@ static void update_visible_region( struct dce *dce ) if (dce->clip_rgn) CombineRgn( vis_rgn, vis_rgn, dce->clip_rgn, (flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF ); - __wine_set_visible_region( dce->hdc, vis_rgn, &win_rect ); + top_rect = get_virtual_screen_rect(); + __wine_set_visible_region( dce->hdc, vis_rgn, &win_rect, &top_rect ); } diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 2f31628..6605c67 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -236,7 +236,8 @@ WINGDIAPI BOOL WINAPI SetDCHook(HDC,DCHOOKPROC,DWORD_PTR); WINGDIAPI WORD WINAPI SetHookFlags(HDC,WORD); extern void CDECL __wine_make_gdi_object_system( HGDIOBJ handle, BOOL set ); -extern void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect ); +extern void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect, + const RECT *device_rect ); extern struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT version ); #endif /* __WINE_WINE_GDI_DRIVER_H */ From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Piotr Caban : msvcrt: Moved RTTI and thiscall related macros to separate header. Message-ID: Module: wine Branch: master Commit: 63be52e2aa0031987d43bc77c83f90cda149a5b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=63be52e2aa0031987d43bc77c83f90cda149a5b1 Author: Piotr Caban Date: Wed Sep 5 14:35:17 2012 +0200 msvcrt: Moved RTTI and thiscall related macros to separate header. --- dlls/msvcrt/cpp.c | 153 +++++++--------------------------------------------- dlls/msvcrt/cxx.h | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+), 133 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=63be52e2aa0031987d43bc77c83f90cda149a5b1 From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Piotr Caban : msvcrt: Support 64-bit RTTI in __RTtypeid function. Message-ID: Module: wine Branch: master Commit: fbae5a95c3bf64400cfae2bc29a905dca022fe70 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fbae5a95c3bf64400cfae2bc29a905dca022fe70 Author: Piotr Caban Date: Wed Sep 5 14:35:42 2012 +0200 msvcrt: Support 64-bit RTTI in __RTtypeid function. --- dlls/msvcrt/cpp.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/tests/cpp.c | 58 ++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 3fa526e..b1512f5 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -39,6 +39,42 @@ typedef exception bad_cast; typedef exception bad_typeid; typedef exception __non_rtti_object; +#ifdef __x86_64__ + +/* x86_64 RTTI structures */ +typedef struct +{ + unsigned int type_descriptor; + int num_base_classes; + this_ptr_offsets offsets; + unsigned int attributes; +} rtti_base_descriptor_x64; + +typedef struct +{ + unsigned bases[3]; +} rtti_base_array_x64; + +typedef struct +{ + unsigned int signature; + unsigned int attributes; + int array_len; + unsigned int base_classes; +} rtti_object_hierarchy_x64; + +typedef struct +{ + unsigned int signature; + int base_class_offset; + unsigned int flags; + unsigned int type_descriptor; + unsigned int type_hierarchy; + unsigned int object_locator; /* not present if signature == 0 */ +} rtti_object_locator_x64; + +#endif + extern const vtable_ptr MSVCRT_exception_vtable; extern const vtable_ptr MSVCRT_bad_typeid_vtable; extern const vtable_ptr MSVCRT_bad_cast_vtable; @@ -794,6 +830,7 @@ void CDECL MSVCRT_unexpected(void) * This function is usually called by compiler generated code as a result * of using one of the C++ dynamic cast statements. */ +#ifndef __x86_64__ const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) { const type_info *ret; @@ -822,6 +859,44 @@ const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) return ret; } +#else + +const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) +{ + const type_info *ret; + + if (!cppobj) + { + bad_typeid e; + MSVCRT_bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" ); + _CxxThrowException( &e, &bad_typeid_exception_type ); + return NULL; + } + + __TRY + { + const rtti_object_locator *obj_locator = (rtti_object_locator*)get_obj_locator( cppobj ); + /* FIXME: Change signature==0 handling when wine generates correct RTTI data on 64-bit systems */ + if(obj_locator->signature == 0) + ret = obj_locator->type_descriptor; + else + { + const rtti_object_locator_x64 *obj_locator_x64 = (const rtti_object_locator_x64*)obj_locator; + ret = (type_info*)((char*)obj_locator_x64 - obj_locator_x64->object_locator + obj_locator_x64->type_descriptor); + } + } + __EXCEPT_PAGE_FAULT + { + __non_rtti_object e; + MSVCRT___non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" ); + _CxxThrowException( &e, &bad_typeid_exception_type ); + return NULL; + } + __ENDTRY + return ret; +} +#endif + /****************************************************************** * __RTDynamicCast (MSVCRT.@) * diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index dbb948c..ddfb922 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -828,9 +828,63 @@ static void test_type_info(void) ok(res == 1, "expected 1, got %d\n", res); } +#ifndef __x86_64__ +#define RTTI_SIGNATURE 0 +#define DEFINE_RTTI_REF(type, name) type *name +#define RTTI_REF(instance, name) &instance.name +#else +#define RTTI_SIGNATURE 1 +#define DEFINE_RTTI_REF(type, name) unsigned name +#define RTTI_REF(instance, name) FIELD_OFFSET(struct rtti_data, name) +#endif /* Test RTTI functions */ static void test_rtti(void) { + struct rtti_data + { + type_info type_info[4]; + + struct _rtti_base_descriptor + { + DEFINE_RTTI_REF(type_info, type_descriptor); + int num_base_classes; + struct { + int this_offset; + int vbase_descr; + int vbase_offset; + } this_ptr_offsets; + unsigned int attributes; + } base_descriptor[4]; + + struct _rtti_base_array { + DEFINE_RTTI_REF(struct _rtti_base_descriptor, bases[4]); + } base_array; + + struct _rtti_object_hierarchy { + unsigned int signature; + unsigned int attributes; + int array_len; + DEFINE_RTTI_REF(struct _rtti_base_array, base_classes); + } object_hierarchy; + + struct { + unsigned int signature; + int base_class_offset; + unsigned int flags; + DEFINE_RTTI_REF(type_info, type_descriptor); + DEFINE_RTTI_REF(struct _rtti_object_hierarchy, type_hierarchy); + DEFINE_RTTI_REF(void, object_locator); + } object_locator; + } simple_class_rtti = { + { {NULL, NULL, "simple_class"} }, + { {RTTI_REF(simple_class_rtti, type_info[0]), 0, {0, 0, 0}, 0} }, + { {RTTI_REF(simple_class_rtti, base_descriptor[0])} }, + {0, 0, 1, RTTI_REF(simple_class_rtti, base_array)}, + {RTTI_SIGNATURE, 0, 0, RTTI_REF(simple_class_rtti, type_info[0]), RTTI_REF(simple_class_rtti, object_hierarchy), RTTI_REF(simple_class_rtti, object_locator)} + }; + void *simple_class_vtbl[2] = {&simple_class_rtti.object_locator}; + void *simple_class = &simple_class_vtbl[1]; + static const char* e_name = "name"; type_info *ti,*bti; exception e,b; @@ -865,6 +919,10 @@ static void test_rtti(void) call_func1(pexception_dtor, &e); call_func1(pbad_typeid_dtor, &b); + + ti = p__RTtypeid(&simple_class); + ok (ti && ti->mangled && !strcmp(ti->mangled, "simple_class"), + "incorrect rtti data\n"); } struct _demangle { From julliard at winehq.org Wed Sep 5 15:36:45 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:45 -0500 Subject: Piotr Caban : msvcrt: Support 64-bit RTTI in __RTDynamicCast. Message-ID: Module: wine Branch: master Commit: 33937f039f837e3328359d1c617b1424ce334b24 URL: http://source.winehq.org/git/wine.git/?a=commit;h=33937f039f837e3328359d1c617b1424ce334b24 Author: Piotr Caban Date: Wed Sep 5 14:35:56 2012 +0200 msvcrt: Support 64-bit RTTI in __RTDynamicCast. --- dlls/msvcrt/cpp.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/tests/cpp.c | 27 +++++++++++ 2 files changed, 140 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index b1512f5..81f1d23 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -117,6 +117,37 @@ static void dump_obj_locator( const rtti_object_locator *ptr ) } } +#ifdef __x86_64__ +static void dump_obj_locator_x64( const rtti_object_locator_x64 *ptr ) +{ + int i; + char *base = (char*)ptr - ptr->object_locator; + const rtti_object_hierarchy_x64 *h = (const rtti_object_hierarchy_x64*)(base + ptr->type_hierarchy); + const type_info *type_descriptor = (const type_info*)(base + ptr->type_descriptor); + + TRACE( "%p: sig=%08x base_offset=%08x flags=%08x type=%p %s hierarchy=%p\n", + ptr, ptr->signature, ptr->base_class_offset, ptr->flags, + type_descriptor, dbgstr_type_info(type_descriptor), h ); + TRACE( " hierarchy: sig=%08x attr=%08x len=%d base classes=%p\n", + h->signature, h->attributes, h->array_len, base + h->base_classes ); + for (i = 0; i < h->array_len; i++) + { + const rtti_base_descriptor_x64 *bases = (rtti_base_descriptor_x64*)(base + + ((const rtti_base_array_x64*)(base + h->base_classes))->bases[i]); + + TRACE( " base class %p: num %d off %d,%d,%d attr %08x type %p %s\n", + bases, + bases->num_base_classes, + bases->offsets.this_offset, + bases->offsets.vbase_descr, + bases->offsets.vbase_offset, + bases->attributes, + base + bases->type_descriptor, + dbgstr_type_info((const type_info*)(base + bases->type_descriptor)) ); + } +} +#endif + /* Internal common ctor for exception */ static void EXCEPTION_ctor(exception *_this, const char** name) { @@ -919,6 +950,7 @@ const type_info* CDECL MSVCRT___RTtypeid(void *cppobj) * This function is usually called by compiler generated code as a result * of using one of the C++ dynamic cast statements. */ +#ifndef __x86_64__ void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, type_info *src, type_info *dst, int do_throw) @@ -982,6 +1014,87 @@ void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, return ret; } +#else + +void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, + type_info *src, type_info *dst, + int do_throw) +{ + void *ret; + + if (!cppobj) return NULL; + + TRACE("obj: %p unknown: %d src: %p %s dst: %p %s do_throw: %d)\n", + cppobj, unknown, src, dbgstr_type_info(src), dst, dbgstr_type_info(dst), do_throw); + + __TRY + { + int i; + const rtti_object_locator *obj_locator = get_obj_locator( cppobj ); + + if(obj_locator->signature == 0) + { + const rtti_object_hierarchy *obj_bases = obj_locator->type_hierarchy; + const rtti_base_descriptor * const* base_desc = obj_bases->base_classes->bases; + + if (TRACE_ON(msvcrt)) dump_obj_locator(obj_locator); + + ret = NULL; + for (i = 0; i < obj_bases->array_len; i++) + { + const type_info *typ = base_desc[i]->type_descriptor; + + if (!strcmp(typ->mangled, dst->mangled)) + { + void *this_ptr = (char *)cppobj - obj_locator->base_class_offset; + ret = get_this_pointer( &base_desc[i]->offsets, this_ptr ); + break; + } + } + } + else + { + const rtti_object_locator_x64 *obj_locator_x64 = (const rtti_object_locator_x64*)obj_locator; + const char *base = (const char*)obj_locator_x64 - obj_locator_x64->object_locator; + const rtti_object_hierarchy_x64 *obj_bases = (const rtti_object_hierarchy_x64*)(base + obj_locator_x64->type_hierarchy); + const rtti_base_array_x64 *base_array = (const rtti_base_array_x64*)(base + obj_bases->base_classes); + + if (TRACE_ON(msvcrt)) dump_obj_locator_x64(obj_locator_x64); + + ret = NULL; + for (i = 0; i < obj_bases->array_len; i++) + { + const rtti_base_descriptor_x64 *base_desc = (const rtti_base_descriptor_x64*)(base + base_array->bases[i]); + const type_info *typ = (const type_info*)(base + base_desc->type_descriptor); + + if (!strcmp(typ->mangled, dst->mangled)) + { + void *this_ptr = (char *)cppobj - obj_locator_x64->base_class_offset; + ret = get_this_pointer( &base_desc->offsets, this_ptr ); + break; + } + } + } + if (!ret && do_throw) + { + const char *msg = "Bad dynamic_cast!"; + bad_cast e; + MSVCRT_bad_cast_ctor( &e, &msg ); + _CxxThrowException( &e, &bad_cast_exception_type ); + } + } + __EXCEPT_PAGE_FAULT + { + __non_rtti_object e; + MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" ); + _CxxThrowException( &e, &bad_typeid_exception_type ); + return NULL; + } + __ENDTRY + return ret; +} +#endif + /****************************************************************** * __RTCastToVoid (MSVCRT.@) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index ddfb922..b3dafbb 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -881,9 +881,17 @@ static void test_rtti(void) { {RTTI_REF(simple_class_rtti, base_descriptor[0])} }, {0, 0, 1, RTTI_REF(simple_class_rtti, base_array)}, {RTTI_SIGNATURE, 0, 0, RTTI_REF(simple_class_rtti, type_info[0]), RTTI_REF(simple_class_rtti, object_hierarchy), RTTI_REF(simple_class_rtti, object_locator)} + }, child_class_rtti = { + { {NULL, NULL, "simple_class"}, {NULL, NULL, "child_class"} }, + { {RTTI_REF(child_class_rtti, type_info[1]), 0, {4, -1, 0}, 0}, {RTTI_REF(child_class_rtti, type_info[0]), 0, {8, -1, 0}, 0} }, + { {RTTI_REF(child_class_rtti, base_descriptor[0]), RTTI_REF(child_class_rtti, base_descriptor[1])} }, + {0, 0, 2, RTTI_REF(child_class_rtti, base_array)}, + {RTTI_SIGNATURE, 0, 0, RTTI_REF(child_class_rtti, type_info[1]), RTTI_REF(child_class_rtti, object_hierarchy), RTTI_REF(child_class_rtti, object_locator)} }; void *simple_class_vtbl[2] = {&simple_class_rtti.object_locator}; void *simple_class = &simple_class_vtbl[1]; + void *child_class_vtbl[2] = {&child_class_rtti.object_locator}; + void *child_class = &child_class_vtbl[1]; static const char* e_name = "name"; type_info *ti,*bti; @@ -923,6 +931,25 @@ static void test_rtti(void) ti = p__RTtypeid(&simple_class); ok (ti && ti->mangled && !strcmp(ti->mangled, "simple_class"), "incorrect rtti data\n"); + + casted = p__RTCastToVoid(&simple_class); + ok (casted == (void*)&simple_class, "failed cast to void\n"); + + ti = p__RTtypeid(&child_class); + ok (ti && ti->mangled && !strcmp(ti->mangled, "child_class"), + "incorrect rtti data\n"); + + casted = p__RTCastToVoid(&child_class); + ok (casted == (void*)&child_class, "failed cast to void\n"); + + casted = p__RTDynamicCast(&child_class, 0, NULL, simple_class_rtti.type_info, 0); + if(casted) + { + ok (casted == (char*)&child_class+8, "failed cast to simple_class (%p %p)\n", casted, &child_class); + } + + casted = p__RTDynamicCast(&child_class, 0, &child_class_rtti.type_info[0], &child_class_rtti.type_info[1], 0); + ok(casted == (char*)&child_class+4, "failed cast to child class (%p %p)\n", casted, &child_class); } struct _demangle { From julliard at winehq.org Wed Sep 5 15:36:46 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:46 -0500 Subject: Piotr Caban : msvcp90: Fixed RTTI structure on 64-bit systems. Message-ID: Module: wine Branch: master Commit: 7477ceb6d1326d34f457877d4d07d81a6639074e URL: http://source.winehq.org/git/wine.git/?a=commit;h=7477ceb6d1326d34f457877d4d07d81a6639074e Author: Piotr Caban Date: Wed Sep 5 14:36:16 2012 +0200 msvcp90: Fixed RTTI structure on 64-bit systems. --- dlls/msvcp90/cxx.h | 113 +++++++++++++++++++++++++++++++++++++++++- dlls/msvcp90/exception.c | 16 ++++++ dlls/msvcp90/ios.c | 46 +++++++++++++++++ dlls/msvcp90/locale.c | 28 +++++++++++ dlls/msvcp90/msvcp90.h | 2 + dlls/msvcp90/msvcp90_main.c | 2 + 6 files changed, 204 insertions(+), 3 deletions(-) diff --git a/dlls/msvcp90/cxx.h b/dlls/msvcp90/cxx.h index f709d12..956675c 100644 --- a/dlls/msvcp90/cxx.h +++ b/dlls/msvcp90/cxx.h @@ -64,7 +64,9 @@ #endif /* _WIN64 */ -#define DEFINE_RTTI_DATA(name, off, base_classes, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ +#ifndef __x86_64__ + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ static const type_info name ## _type_info = { \ &MSVCP_type_info_vtable, \ NULL, \ @@ -73,7 +75,7 @@ \ static const rtti_base_descriptor name ## _rtti_base_descriptor = { \ &name ##_type_info, \ - base_classes, \ + base_classes_no, \ { 0, -1, 0}, \ 64 \ }; \ @@ -96,7 +98,7 @@ static const rtti_base_array name ## _rtti_base_array = { \ static const rtti_object_hierarchy name ## _hierarchy = { \ 0, \ 0, \ - base_classes+1, \ + base_classes_no+1, \ &name ## _rtti_base_array \ }; \ \ @@ -108,6 +110,74 @@ const rtti_object_locator name ## _rtti = { \ &name ## _hierarchy \ } +#else + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + static const type_info name ## _type_info = { \ + &MSVCP_type_info_vtable, \ + NULL, \ + mangled_name \ + }; \ +\ +static rtti_base_descriptor name ## _rtti_base_descriptor = { \ + 0xdeadbeef, \ + base_classes_no, \ + { 0, -1, 0}, \ + 64 \ +}; \ +\ +static rtti_base_array name ## _rtti_base_array = { \ + { \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + } \ +}; \ +\ +static rtti_object_hierarchy name ## _hierarchy = { \ + 0, \ + 0, \ + base_classes_no+1, \ + 0xdeadbeef \ +}; \ +\ +rtti_object_locator name ## _rtti = { \ + 1, \ + off, \ + 0, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef \ +};\ +\ +static void init_ ## name ## _rtti(char *base) \ +{ \ + name ## _rtti_base_descriptor.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti_base_array.bases[0] = (char*)&name ## _rtti_base_descriptor - base; \ + name ## _rtti_base_array.bases[1] = (char*)cl1 - base; \ + name ## _rtti_base_array.bases[2] = (char*)cl2 - base; \ + name ## _rtti_base_array.bases[3] = (char*)cl3 - base; \ + name ## _rtti_base_array.bases[4] = (char*)cl4 - base; \ + name ## _rtti_base_array.bases[5] = (char*)cl5 - base; \ + name ## _rtti_base_array.bases[6] = (char*)cl6 - base; \ + name ## _rtti_base_array.bases[7] = (char*)cl7 - base; \ + name ## _rtti_base_array.bases[8] = (char*)cl8 - base; \ + name ## _rtti_base_array.bases[9] = (char*)cl9 - base; \ + name ## _hierarchy.base_classes = (char*)&name ## _rtti_base_array - base; \ + name ## _rtti.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti.type_hierarchy = (char*)&name ## _hierarchy - base; \ + name ## _rtti.object_locator = (char*)&name ## _rtti - base; \ +} + +#endif + #define DEFINE_RTTI_DATA0(name, off, mangled_name) \ DEFINE_RTTI_DATA(name, off, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) #define DEFINE_RTTI_DATA1(name, off, cl1, mangled_name) \ @@ -191,6 +261,8 @@ typedef struct int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */ } this_ptr_offsets; +#ifndef __x86_64__ + typedef struct _rtti_base_descriptor { const type_info *type_descriptor; @@ -220,3 +292,38 @@ typedef struct _rtti_object_locator const type_info *type_descriptor; const rtti_object_hierarchy *type_hierarchy; } rtti_object_locator; + +#else + +typedef struct +{ + unsigned int type_descriptor; + int num_base_classes; + this_ptr_offsets offsets; /* offsets for computing the this pointer */ + unsigned int attributes; +} rtti_base_descriptor; + +typedef struct +{ + unsigned int bases[10]; /* First element is the class itself */ +} rtti_base_array; + +typedef struct +{ + unsigned int signature; + unsigned int attributes; + int array_len; /* Size of the array pointed to by 'base_classes' */ + unsigned int base_classes; +} rtti_object_hierarchy; + +typedef struct +{ + unsigned int signature; + int base_class_offset; + unsigned int flags; + unsigned int type_descriptor; + unsigned int type_hierarchy; + unsigned int object_locator; +} rtti_object_locator; + +#endif diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index 7da6cbe..7202a25 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -750,3 +750,19 @@ void throw_exception(exception_type et, const char *str) } } } + +void init_exception(void) +{ +#ifdef __x86_64__ + void *base = GetModuleHandleA("msvcp90.dll"); + init_type_info_rtti(base); + init_exception_rtti(base); + init_bad_alloc_rtti(base); + init_logic_error_rtti(base); + init_length_error_rtti(base); + init_out_of_range_rtti(base); + init_invalid_argument_rtti(base); + init_runtime_error_rtti(base); + init_failure_rtti(base); +#endif +} diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index f7f6fa9..88ed0e9 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -12923,6 +12923,52 @@ basic_ostream_wchar *_Ptr_wclog = &wclog.obj; void init_io(void) { +#ifdef __x86_64__ + void *base = GetModuleHandleA("msvcp90.dll"); + init_iosb_rtti(base); + init_ios_base_rtti(base); + init_basic_ios_char_rtti(base); + init_basic_ios_wchar_rtti(base); + init_basic_ios_short_rtti(base); + init_basic_streambuf_char_rtti(base); + init_basic_streambuf_wchar_rtti(base); + init_basic_streambuf_short_rtti(base); + init_basic_filebuf_char_rtti(base); + init_basic_filebuf_wchar_rtti(base); + init_basic_filebuf_short_rtti(base); + init_basic_stringbuf_char_rtti(base); + init_basic_stringbuf_wchar_rtti(base); + init_basic_stringbuf_short_rtti(base); + init_basic_ostream_char_rtti(base); + init_basic_ostream_wchar_rtti(base); + init_basic_ostream_short_rtti(base); + init_basic_istream_char_rtti(base); + init_basic_istream_wchar_rtti(base); + init_basic_istream_short_rtti(base); + init_basic_iostream_char_rtti(base); + init_basic_iostream_wchar_rtti(base); + init_basic_iostream_short_rtti(base); + init_basic_ofstream_char_rtti(base); + init_basic_ofstream_wchar_rtti(base); + init_basic_ofstream_short_rtti(base); + init_basic_ifstream_char_rtti(base); + init_basic_ifstream_wchar_rtti(base); + init_basic_ifstream_short_rtti(base); + init_basic_fstream_char_rtti(base); + init_basic_fstream_wchar_rtti(base); + init_basic_fstream_short_rtti(base); + init_basic_ostringstream_char_rtti(base); + init_basic_ostringstream_wchar_rtti(base); + init_basic_ostringstream_short_rtti(base); + init_basic_istringstream_char_rtti(base); + init_basic_istringstream_wchar_rtti(base); + init_basic_istringstream_short_rtti(base); + init_basic_stringstream_char_rtti(base); + init_basic_stringstream_wchar_rtti(base); + init_basic_stringstream_short_rtti(base); + init_strstreambuf_rtti(base); +#endif + basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin); basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE); diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 31b5b70..7e6b10f 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -8722,6 +8722,34 @@ void __asm_dummy_vtables(void) { } #endif +void init_locale(void) +{ +#ifdef __x86_64__ + void *base = GetModuleHandleA("msvcp90.dll"); + init_locale_facet_rtti(base); + init_collate_char_rtti(base); + init_collate_wchar_rtti(base); + init_collate_short_rtti(base); + init_ctype_base_rtti(base); + init_ctype_char_rtti(base); + init_ctype_wchar_rtti(base); + init_ctype_short_rtti(base); + init_codecvt_base_rtti(base); + init_codecvt_char_rtti(base); + init_codecvt_wchar_rtti(base); + init_codecvt_short_rtti(base); + init_numpunct_char_rtti(base); + init_numpunct_wchar_rtti(base); + init_numpunct_short_rtti(base); + init_num_get_char_rtti(base); + init_num_get_wchar_rtti(base); + init_num_get_short_rtti(base); + init_num_put_char_rtti(base); + init_num_put_wchar_rtti(base); + init_num_put_short_rtti(base); +#endif +} + void free_locale(void) { facets_elem *iter, *safe; diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index b91faac..84e39c5 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -463,5 +463,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, o ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool); +void init_exception(void); +void init_locale(void); void init_io(void); void free_io(void); diff --git a/dlls/msvcp90/msvcp90_main.c b/dlls/msvcp90/msvcp90_main.c index 9981e95..8d97c9d 100644 --- a/dlls/msvcp90/msvcp90_main.c +++ b/dlls/msvcp90/msvcp90_main.c @@ -90,6 +90,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) case DLL_PROCESS_ATTACH: init_cxx_funcs(); init_lockit(); + init_exception(); + init_locale(); init_io(); break; case DLL_PROCESS_DETACH: From julliard at winehq.org Wed Sep 5 15:36:46 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:46 -0500 Subject: Erich Hoover : hhctrl.ocx: Resize the window when HH_SET_WIN_TYPE is called . Message-ID: Module: wine Branch: master Commit: 565036209080ad322bd96aa6a0cdc9adaae315e9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=565036209080ad322bd96aa6a0cdc9adaae315e9 Author: Erich Hoover Date: Wed Sep 5 10:24:28 2012 -0600 hhctrl.ocx: Resize the window when HH_SET_WIN_TYPE is called. --- dlls/hhctrl.ocx/chm.c | 6 +++--- dlls/hhctrl.ocx/help.c | 20 ++++++++++++++++++++ dlls/hhctrl.ocx/hhctrl.c | 3 ++- dlls/hhctrl.ocx/hhctrl.h | 3 ++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index 4b2f36e..bff7186 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -250,7 +250,7 @@ static inline WCHAR *MergeChmString(LPCWSTR src, WCHAR **dst) return *dst; } -void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info) +void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info, BOOL override) { DWORD unhandled_params = src->fsValidMembers & ~(HHWIN_PARAM_PROPERTIES|HHWIN_PARAM_STYLES |HHWIN_PARAM_EXSTYLES|HHWIN_PARAM_RECT|HHWIN_PARAM_NAV_WIDTH @@ -258,7 +258,7 @@ void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info) |HHWIN_PARAM_EXPANSION|HHWIN_PARAM_TABPOS|HHWIN_PARAM_TABORDER |HHWIN_PARAM_HISTORY_COUNT|HHWIN_PARAM_CUR_TAB); HH_WINTYPEW *dst = &info->WinType; - DWORD merge = src->fsValidMembers & ~dst->fsValidMembers; + DWORD merge = override ? src->fsValidMembers : src->fsValidMembers & ~dst->fsValidMembers; if (unhandled_params) FIXME("Unsupported fsValidMembers fields: 0x%x\n", unhandled_params); @@ -379,7 +379,7 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) } /* merge the new data with any pre-existing HH_WINTYPE structure */ - MergeChmProperties(&wintype, info); + MergeChmProperties(&wintype, info, FALSE); if (!info->WinType.pszFile) info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null); if (!info->WinType.pszToc) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 514b2a8..79e5e11 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -1565,6 +1565,26 @@ static LRESULT Help_OnSize(HWND hWnd) return 0; } +void UpdateHelpWindow(HHInfo *info) +{ + if (!info->WinType.hwndHelp) + return; + + WARN("Only the size of the window is currently updated.\n"); + if (info->WinType.fsValidMembers & HHWIN_PARAM_RECT) + { + RECT *rect = &info->WinType.rcWindowPos; + INT x, y, width, height; + + x = rect->left; + y = rect->top; + width = rect->right - x; + height = rect->bottom - y; + SetWindowPos(info->WinType.hwndHelp, NULL, rect->left, rect->top, width, height, + SWP_NOZORDER | SWP_NOACTIVATE); + } +} + static LRESULT CALLBACK Help_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 7f11276..03592c8 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -327,7 +327,8 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat TRACE("Changing WINTYPE, fsValidMembers=0x%x\n", wintype->fsValidMembers); - MergeChmProperties(wintype, info); + MergeChmProperties(wintype, info, TRUE); + UpdateHelpWindow(info); return 0; } case HH_GET_WIN_TYPE: { diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index 7bdf26e..81b6879 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -218,7 +218,8 @@ HHInfo *CreateHelpViewer(HHInfo*,LPCWSTR,HWND) DECLSPEC_HIDDEN; void ReleaseHelpViewer(HHInfo*) DECLSPEC_HIDDEN; BOOL NavigateToUrl(HHInfo*,LPCWSTR) DECLSPEC_HIDDEN; BOOL NavigateToChm(HHInfo*,LPCWSTR,LPCWSTR) DECLSPEC_HIDDEN; -void MergeChmProperties(HH_WINTYPEW*,HHInfo*) DECLSPEC_HIDDEN; +void MergeChmProperties(HH_WINTYPEW*,HHInfo*,BOOL) DECLSPEC_HIDDEN; +void UpdateHelpWindow(HHInfo *info) DECLSPEC_HIDDEN; void InitSearch(HHInfo *info, const char *needle) DECLSPEC_HIDDEN; void ReleaseSearch(HHInfo *info) DECLSPEC_HIDDEN; From julliard at winehq.org Wed Sep 5 15:36:46 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:46 -0500 Subject: Erich Hoover : hhctrl.ocx: Do not permit a NULL caption for HtmlHelp windows. Message-ID: Module: wine Branch: master Commit: a61903388eb11a8c5c5e4929ebdcaccedd67430f URL: http://source.winehq.org/git/wine.git/?a=commit;h=a61903388eb11a8c5c5e4929ebdcaccedd67430f Author: Erich Hoover Date: Wed Sep 5 10:36:39 2012 -0600 hhctrl.ocx: Do not permit a NULL caption for HtmlHelp windows. --- dlls/hhctrl.ocx/chm.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index bff7186..88bd6e5 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -366,10 +366,8 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) wintype.cbStruct = sizeof(wintype); wintype.fUniCodeStrings = TRUE; wintype.pszType = pszType = strdupW(info->pCHMInfo->defWindow ? info->pCHMInfo->defWindow : defaultwinW); - wintype.pszFile = pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null); wintype.pszToc = pszToc = strdupW(info->pCHMInfo->defToc ? info->pCHMInfo->defToc : null); wintype.pszIndex = pszIndex = strdupW(null); - wintype.pszCaption = pszCaption = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : null); wintype.fsValidMembers = 0; wintype.fsWinProperties = HHWIN_PROP_TRI_PANE; wintype.dwStyles = WS_POPUP; @@ -380,12 +378,14 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) /* merge the new data with any pre-existing HH_WINTYPE structure */ MergeChmProperties(&wintype, info, FALSE); + if (!info->WinType.pszCaption) + info->WinType.pszCaption = info->stringsW.pszCaption = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : null); if (!info->WinType.pszFile) - info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null); + info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null); if (!info->WinType.pszToc) - info->WinType.pszToc = info->stringsW.pszToc = FindHTMLHelpSetting(info, toc_extW); + info->WinType.pszToc = info->stringsW.pszToc = FindHTMLHelpSetting(info, toc_extW); if (!info->WinType.pszIndex) - info->WinType.pszIndex = info->stringsW.pszIndex = FindHTMLHelpSetting(info, index_extW); + info->WinType.pszIndex = info->stringsW.pszIndex = FindHTMLHelpSetting(info, index_extW); heap_free(pszType); heap_free(pszFile); From julliard at winehq.org Wed Sep 5 15:36:46 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:46 -0500 Subject: Dan Kegel : vcomp: Implement omp_get_wtime. Message-ID: Module: wine Branch: master Commit: 5c988477d47a81dc525747319253f97ac3d971d5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c988477d47a81dc525747319253f97ac3d971d5 Author: Dan Kegel Date: Mon Sep 3 21:12:15 2012 -0700 vcomp: Implement omp_get_wtime. --- dlls/vcomp/main.c | 6 ++++++ dlls/vcomp/vcomp.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 0a3c4f5..be14c02 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -29,6 +29,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(vcomp); +/* Time in seconds since "some time in the past" */ +double CDECL omp_get_wtime(void) +{ + return GetTickCount() / 1000.0; +} + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec index cd5a964..7ffbf82 100644 --- a/dlls/vcomp/vcomp.spec +++ b/dlls/vcomp/vcomp.spec @@ -97,7 +97,7 @@ @ stub omp_get_num_threads @ stub omp_get_thread_num @ stub omp_get_wtick -@ stub omp_get_wtime +@ cdecl omp_get_wtime() @ stub omp_in_parallel @ stub omp_init_lock @ stub omp_init_nest_lock From julliard at winehq.org Wed Sep 5 15:36:46 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 05 Sep 2012 15:36:46 -0500 Subject: Dan Kegel : vcomp: Add better stub for omp_get_num_procs. Message-ID: Module: wine Branch: master Commit: d97d3425857ac533e154571479386e1e58c75e89 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d97d3425857ac533e154571479386e1e58c75e89 Author: Dan Kegel Date: Tue Sep 4 08:27:33 2012 -0700 vcomp: Add better stub for omp_get_num_procs. --- dlls/vcomp/main.c | 6 ++++++ dlls/vcomp/vcomp.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index be14c02..82c8c94 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -29,6 +29,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(vcomp); +int CDECL omp_get_num_procs(void) +{ + TRACE("stub\n"); + return 1; +} + /* Time in seconds since "some time in the past" */ double CDECL omp_get_wtime(void) { diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec index 7ffbf82..7a701ef 100644 --- a/dlls/vcomp/vcomp.spec +++ b/dlls/vcomp/vcomp.spec @@ -93,7 +93,7 @@ @ stub omp_get_dynamic @ stub omp_get_max_threads @ stub omp_get_nested -@ stub omp_get_num_procs +@ cdecl omp_get_num_procs() @ stub omp_get_num_threads @ stub omp_get_thread_num @ stub omp_get_wtick From jnewman at winehq.org Thu Sep 6 11:01:30 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Thu, 06 Sep 2012 11:01:30 -0500 Subject: Kyle Auble : Remove "next" links to wiki, fix others Message-ID: Module: website Branch: master Commit: 1c74fd1a83e50ff3e2d1ce3409b267e7450c0629 URL: http://source.winehq.org/git/website.git/?a=commit;h=1c74fd1a83e50ff3e2d1ce3409b267e7450c0629 Author: Kyle Auble Date: Wed Sep 5 17:35:38 2012 -0700 Remove "next" links to wiki, fix others --- templates/de/about.template | 5 ----- templates/en/about.template | 5 ----- templates/es/about.template | 5 ----- templates/fr/about.template | 8 ++------ templates/he/about.template | 7 +------ templates/pl/about.template | 6 ------ templates/pt/about.template | 6 ------ 7 files changed, 3 insertions(+), 39 deletions(-) diff --git a/templates/de/about.template b/templates/de/about.template index 508dca5..1e2e5dc 100644 --- a/templates/de/about.template +++ b/templates/de/about.template @@ -20,8 +20,3 @@
  • Geschichte des Wine-Projekts (en)
  • Organisation und Leitung (en)
- -
- diff --git a/templates/en/about.template b/templates/en/about.template index 93a2c3e..8696f5b 100644 --- a/templates/en/about.template +++ b/templates/en/about.template @@ -20,8 +20,3 @@
  • History of the Wine Project
  • Organization and Leadership
  • - -
    - diff --git a/templates/es/about.template b/templates/es/about.template index 83f2249..517c717 100644 --- a/templates/es/about.template +++ b/templates/es/about.template @@ -20,8 +20,3 @@
  • Historia del Proyecto Wine
  • Organizaci?n y Liderazgo
  • - -
    - diff --git a/templates/fr/about.template b/templates/fr/about.template index bc29852..e1878d2 100644 --- a/templates/fr/about.template +++ b/templates/fr/about.template @@ -35,12 +35,8 @@ proviennent de volontaires.

    si important
  • Mythes courants sur Wine
  • -
  • Historique du projet Wine
  • +
  • Historique du projet +Wine
  • Organisation du projet
  • - -
    - diff --git a/templates/he/about.template b/templates/he/about.template index 61591d7..2574ff8 100644 --- a/templates/he/about.template +++ b/templates/he/about.template @@ -17,11 +17,6 @@ - -
    - diff --git a/templates/pl/about.template b/templates/pl/about.template index 2301289..7d67496 100644 --- a/templates/pl/about.template +++ b/templates/pl/about.template @@ -42,9 +42,3 @@ Julliard kieruje projektem Wine, i mo?na si? z nim skontaktowa? przez e-mail
  • World Wine News
  • Wywiady
  • - -
    - diff --git a/templates/pt/about.template b/templates/pt/about.template index ef35e2c..a67c027 100644 --- a/templates/pt/about.template +++ b/templates/pt/about.template @@ -44,9 +44,3 @@ projecto:

  • World Wine News
  • Entrevistas
  • - -
    - From jnewman at winehq.org Thu Sep 6 11:01:30 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Thu, 06 Sep 2012 11:01:30 -0500 Subject: Kyle Auble : Delete history pages now on wiki Message-ID: Module: website Branch: master Commit: e83a8ef5c31f99c346e394867f82be46fbe6bc9d URL: http://source.winehq.org/git/website.git/?a=commit;h=e83a8ef5c31f99c346e394867f82be46fbe6bc9d Author: Kyle Auble Date: Wed Sep 5 17:35:51 2012 -0700 Delete history pages now on wiki --- templates/en/history.template | 261 ----------------------------------------- templates/he/history.template | 233 ------------------------------------ 2 files changed, 0 insertions(+), 494 deletions(-) Diff: http://source.winehq.org/git/website.git/?a=commitdiff;h=e83a8ef5c31f99c346e394867f82be46fbe6bc9d From jnewman at winehq.org Thu Sep 6 11:01:30 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Thu, 06 Sep 2012 11:01:30 -0500 Subject: Kyle Auble : Redirect Winelib links to wiki Message-ID: Module: website Branch: master Commit: 46543b8ec40fc2a61ee0eb1643ee697cfd70c9db URL: http://source.winehq.org/git/website.git/?a=commit;h=46543b8ec40fc2a61ee0eb1643ee697cfd70c9db Author: Kyle Auble Date: Wed Sep 5 17:36:07 2012 -0700 Redirect Winelib links to wiki --- templates/de/devel.template | 2 +- templates/en/devel.template | 2 +- templates/he/devel.template | 2 +- templates/pl/devel.template | 2 +- templates/tr/devel.template | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/de/devel.template b/templates/de/devel.template index 88601b4..61c5d4b 100644 --- a/templates/de/devel.template +++ b/templates/de/devel.template @@ -118,7 +118,7 @@ Hilfsmittel, die wir unseren Entwicklern zur Verfügung stellen.

    - Winelib + Winelib Dokumentation zur Entwicklung mit Winelib, unseren Werkzeugen zur Anwendungsportierung. diff --git a/templates/en/devel.template b/templates/en/devel.template index b4e5f25..422edd8 100644 --- a/templates/en/devel.template +++ b/templates/en/devel.template @@ -117,7 +117,7 @@ various resources available for our developers.

    - Winelib + Winelib Documentation on development with Winelib, our application porting tools. diff --git a/templates/he/devel.template b/templates/he/devel.template index 4117322..0f70353 100644 --- a/templates/he/devel.template +++ b/templates/he/devel.template @@ -116,7 +116,7 @@ - Winelib + Winelib ????? ?? ????? ??????? Winelib, ??? ???? ???????? ????. diff --git a/templates/pl/devel.template b/templates/pl/devel.template index fb64058..97c2f45 100644 --- a/templates/pl/devel.template +++ b/templates/pl/devel.template @@ -117,7 +117,7 @@ rozmaitych materia??w dost?pnych dla programist?w Wine.

    - Winelib + Winelib Dokumentacja dotycz?ca programowania dla Winelib, nasze narz?dzia do portowania aplikacji. diff --git a/templates/tr/devel.template b/templates/tr/devel.template index ebb7c84..a35adb5 100644 --- a/templates/tr/devel.template +++ b/templates/tr/devel.template @@ -116,7 +116,7 @@ - Winelib + Winelib Documentation on development with Winelib, our application porting tools. From jnewman at winehq.org Thu Sep 6 11:01:30 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Thu, 06 Sep 2012 11:01:30 -0500 Subject: Kyle Auble : Move static Winelib pages to wiki Message-ID: Module: website Branch: master Commit: 667ac9f284d67484db438cd2ad1f2b9eb1b0f020 URL: http://source.winehq.org/git/website.git/?a=commit;h=667ac9f284d67484db438cd2ad1f2b9eb1b0f020 Author: Kyle Auble Date: Wed Sep 5 17:36:21 2012 -0700 Move static Winelib pages to wiki --- templates/en/winelib.template | 450 ----------------------------------------- templates/he/winelib.template | 437 --------------------------------------- 2 files changed, 0 insertions(+), 887 deletions(-) Diff: http://source.winehq.org/git/website.git/?a=commitdiff;h=667ac9f284d67484db438cd2ad1f2b9eb1b0f020 From jnewman at winehq.org Thu Sep 6 11:01:30 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Thu, 06 Sep 2012 11:01:30 -0500 Subject: Kyle Auble : Fix links to wiki in various languages Message-ID: Module: website Branch: master Commit: 521e23737d003d206ca66867552269bdabc3471f URL: http://source.winehq.org/git/website.git/?a=commit;h=521e23737d003d206ca66867552269bdabc3471f Author: Kyle Auble Date: Wed Sep 5 17:36:38 2012 -0700 Fix links to wiki in various languages http://bugs.winehq.org/show_bug.cgi?id=31273 --- templates/es/about.template | 1 + templates/he/about.template | 1 + templates/pl/about.template | 2 +- templates/pl/help.template | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/es/about.template b/templates/es/about.template index 517c717..2d6799b 100644 --- a/templates/es/about.template +++ b/templates/es/about.template @@ -19,4 +19,5 @@
  • Mitos Comunes sobre Wine
  • Historia del Proyecto Wine
  • Organizaci?n y Liderazgo
  • +
  • Caracter?sticas de Wine
  • diff --git a/templates/he/about.template b/templates/he/about.template index 2574ff8..5ce7df3 100644 --- a/templates/he/about.template +++ b/templates/he/about.template @@ -19,4 +19,5 @@
  • ????? ?????? ?? Wine
  • ????????? ???? Wine
  • ????? ????????
  • +
  • ??????? ?? Wine
  • diff --git a/templates/pl/about.template b/templates/pl/about.template index 7d67496..ebb7764 100644 --- a/templates/pl/about.template +++ b/templates/pl/about.template @@ -37,7 +37,7 @@ Julliard kieruje projektem Wine, i mo?na si? z nim skontaktowa? przez e-mail
  • Historia Wine
  • Dlaczego Wine jest tak wa?ny
  • Obalanie mit?w o Wine
  • -
  • Mo?liwo?ci Wine
  • +
  • Mo?liwo?ci Wine
  • Dowody uznania
  • World Wine News
  • Wywiady
  • diff --git a/templates/pl/help.template b/templates/pl/help.template index 1c3bac2..8b95def 100644 --- a/templates/pl/help.template +++ b/templates/pl/help.template @@ -23,11 +23,11 @@ -
    FAQ
    +
    FAQ
    Na wi?kszo?? Twoich pyta? ?atwo znajdziesz odpowied? przegl?daj?c nasze - FAQ. + FAQ. Je?eli jeste? w potrzebie zajrzyj tam w pierwszej kolejno?ci. From julliard at winehq.org Thu Sep 6 13:37:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:21 -0500 Subject: Alexandre Julliard : gdi32: Add a graphics driver to render windows contents through the DIB engine. Message-ID: Module: wine Branch: master Commit: 27b0b88a0b8f54dd8940841fc85df910417b8a43 URL: http://source.winehq.org/git/wine.git/?a=commit;h=27b0b88a0b8f54dd8940841fc85df910417b8a43 Author: Alexandre Julliard Date: Thu Sep 6 12:23:10 2012 +0200 gdi32: Add a graphics driver to render windows contents through the DIB engine. --- dlls/gdi32/clipping.c | 7 +- dlls/gdi32/dibdrv/dc.c | 608 +++++++++++++++++++++++++++++++++++++++++++++ dlls/gdi32/gdi32.spec | 2 +- dlls/gdi32/gdi_private.h | 1 + dlls/user32/painting.c | 2 +- include/wine/gdi_driver.h | 39 +++- 6 files changed, 654 insertions(+), 5 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=27b0b88a0b8f54dd8940841fc85df910417b8a43 From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Alexandre Julliard : user32: Add support for managing a DIB surface for a window. Message-ID: Module: wine Branch: master Commit: a5ef549c6e4266d9a7e129b42ff49b109c6cadb8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5ef549c6e4266d9a7e129b42ff49b109c6cadb8 Author: Alexandre Julliard Date: Thu Sep 6 12:32:52 2012 +0200 user32: Add support for managing a DIB surface for a window. --- dlls/user32/driver.c | 14 +++++---- dlls/user32/painting.c | 58 +++++++++++++++++++++++++++++++++++- dlls/user32/user_private.h | 10 +++++- dlls/user32/win.c | 9 ++++++ dlls/user32/win.h | 2 + dlls/user32/winpos.c | 38 ++++++++++++++++++++---- dlls/winex11.drv/window.c | 6 ++- dlls/winex11.drv/winex11.drv.spec | 4 +- 8 files changed, 121 insertions(+), 20 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=a5ef549c6e4266d9a7e129b42ff49b109c6cadb8 From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Alexandre Julliard : user32: Maintain a list of active window surfaces and flush them periodically. Message-ID: Module: wine Branch: master Commit: 7304445a7efa9f30e4541b075a2022319f291e4e URL: http://source.winehq.org/git/wine.git/?a=commit;h=7304445a7efa9f30e4541b075a2022319f291e4e Author: Alexandre Julliard Date: Thu Sep 6 12:38:13 2012 +0200 user32: Maintain a list of active window surfaces and flush them periodically. --- dlls/user32/painting.c | 16 ++---------- dlls/user32/win.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++- dlls/user32/win.h | 2 + dlls/user32/winpos.c | 1 + dlls/user32/winproc.c | 5 +++- 5 files changed, 70 insertions(+), 16 deletions(-) diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 3869b48..4def070 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -801,23 +801,11 @@ void move_window_bits( HWND hwnd, struct window_surface *old_surface, * update_now * * Implementation of RDW_UPDATENOW behavior. - * - * FIXME: Windows uses WM_SYNCPAINT to cut down the number of intertask - * SendMessage() calls. This is a comment inside DefWindowProc() source - * from 16-bit SDK: - * - * This message avoids lots of inter-app message traffic - * by switching to the other task and continuing the - * recursion there. - * - * wParam = flags - * LOWORD(lParam) = hrgnClip - * HIWORD(lParam) = hwndSkip (not used; always NULL) - * */ static void update_now( HWND hwnd, UINT rdw_flags ) { HWND child = 0; + int count = 0; /* desktop window never gets WM_PAINT, only WM_ERASEBKGND */ if (hwnd == GetDesktopWindow()) erase_now( hwnd, rdw_flags | RDW_NOCHILDREN ); @@ -834,8 +822,10 @@ static void update_now( HWND hwnd, UINT rdw_flags ) if (!flags) break; /* nothing more to do */ SendMessageW( child, WM_PAINT, 0, 0 ); + count++; if (rdw_flags & RDW_NOCHILDREN) break; } + if (count) flush_window_surfaces( FALSE ); } diff --git a/dlls/user32/win.c b/dlls/user32/win.c index c03ff42..2a0848e 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -44,6 +44,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(win); static DWORD process_layout = ~0u; +static struct list window_surfaces = LIST_INIT( window_surfaces ); + +static CRITICAL_SECTION surfaces_section; +static CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &surfaces_section, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": surfaces_section") } +}; +static CRITICAL_SECTION surfaces_section = { &critsect_debug, -1, 0, 0, 0, 0 }; + /**********************************************************************/ /* helper for Get/SetWindowLong */ @@ -475,6 +486,45 @@ BOOL is_desktop_window( HWND hwnd ) } +/******************************************************************* + * register_window_surface + * + * Register a window surface in the global list, possibly replacing another one. + */ +void register_window_surface( struct window_surface *old, struct window_surface *new ) +{ + if (old == new) return; + EnterCriticalSection( &surfaces_section ); + if (old) list_remove( &old->entry ); + if (new) list_add_tail( &window_surfaces, &new->entry ); + LeaveCriticalSection( &surfaces_section ); +} + + +/******************************************************************* + * flush_window_surfaces + * + * Flush pending output from all window surfaces. + */ +void flush_window_surfaces( BOOL idle ) +{ + static DWORD last_idle; + DWORD now; + struct window_surface *surface; + + EnterCriticalSection( &surfaces_section ); + now = GetTickCount(); + if (idle) last_idle = now; + /* if not idle, we only flush if there's evidence that the app never goes idle */ + else if ((int)(now - last_idle) < 1000) goto done; + + LIST_FOR_EACH_ENTRY( surface, &window_surfaces, struct window_surface, entry ) + surface->funcs->flush( surface ); +done: + LeaveCriticalSection( &surfaces_section ); +} + + /*********************************************************************** * WIN_GetPtr * @@ -863,7 +913,11 @@ LRESULT WIN_DestroyWindow( HWND hwnd ) if (icon_title) DestroyWindow( icon_title ); if (menu) DestroyMenu( menu ); if (sys_menu) DestroyMenu( sys_menu ); - if (surface) window_surface_release( surface ); + if (surface) + { + register_window_surface( surface, NULL ); + window_surface_release( surface ); + } USER_Driver->pDestroyWindow( hwnd ); @@ -917,7 +971,11 @@ static void destroy_thread_window( HWND hwnd ) HeapFree( GetProcessHeap(), 0, wndPtr ); if (menu) DestroyMenu( menu ); if (sys_menu) DestroyMenu( sys_menu ); - if (surface) window_surface_release( surface ); + if (surface) + { + register_window_surface( surface, NULL ); + window_surface_release( surface ); + } } diff --git a/dlls/user32/win.h b/dlls/user32/win.h index 81e81b2..4bbe7ae 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -80,6 +80,8 @@ typedef struct tagWND /* Window functions */ extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN; +extern void register_window_surface( struct window_surface *old, struct window_surface *new ) DECLSPEC_HIDDEN; +extern void flush_window_surfaces( BOOL idle ) DECLSPEC_HIDDEN; extern WND *WIN_GetPtr( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 60a539b..fa74567 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2020,6 +2020,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, if (ret) { TRACE( "win %p surface %p -> %p\n", hwnd, old_surface, new_surface ); + register_window_surface( old_surface, new_surface ); if (old_surface) { if (!IsRectEmpty( valid_rects )) diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index b06e93d..de7de6f 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -1123,7 +1123,10 @@ static LRESULT WINAPI StaticWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM static DWORD wait_message( DWORD count, CONST HANDLE *handles, DWORD timeout, DWORD mask, DWORD flags ) { - DWORD ret = USER_Driver->pMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags ); + DWORD ret; + + flush_window_surfaces( TRUE ); + ret = USER_Driver->pMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags ); if (ret == WAIT_TIMEOUT && !count && !timeout) NtYieldExecution(); return ret; } From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Alexandre Julliard : winex11: Use window surfaces for rendering top-level windows. Message-ID: Module: wine Branch: master Commit: 33ac850c80634c891b0c157bbffa612f70954a40 URL: http://source.winehq.org/git/wine.git/?a=commit;h=33ac850c80634c891b0c157bbffa612f70954a40 Author: Alexandre Julliard Date: Thu Sep 6 12:39:34 2012 +0200 winex11: Use window surfaces for rendering top-level windows. It can be disabled by setting "ClientSideGraphics"="n". --- dlls/winex11.drv/bitblt.c | 192 ++++++++++++++++++++++++++++++++++++++++ dlls/winex11.drv/window.c | 49 ++++++++++ dlls/winex11.drv/x11drv.h | 3 + dlls/winex11.drv/x11drv_main.c | 4 + 4 files changed, 248 insertions(+), 0 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=33ac850c80634c891b0c157bbffa612f70954a40 From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Alexandre Julliard : winex11: Handle Expose events by refreshing from the window surface. Message-ID: Module: wine Branch: master Commit: 2eebedf38e4d5fd49075f8f89e63f869ca85cceb URL: http://source.winehq.org/git/wine.git/?a=commit;h=2eebedf38e4d5fd49075f8f89e63f869ca85cceb Author: Alexandre Julliard Date: Mon Apr 30 15:09:03 2012 +0200 winex11: Handle Expose events by refreshing from the window surface. --- dlls/winex11.drv/event.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 7da0947..dc7d1e3 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -791,7 +791,7 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev ) XExposeEvent *event = &xev->xexpose; RECT rect; struct x11drv_win_data *data; - int flags = RDW_INVALIDATE | RDW_ERASE; + int flags = RDW_INVALIDATE | RDW_ERASE | RDW_FRAME; TRACE( "win %p (%lx) %d,%d %dx%d\n", hwnd, event->window, event->x, event->y, event->width, event->height ); @@ -802,15 +802,19 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev ) rect.top = event->y; rect.right = event->x + event->width; rect.bottom = event->y + event->height; - if (event->window == data->whole_window) + + if (data->surface) { - OffsetRect( &rect, data->whole_rect.left - data->client_rect.left, - data->whole_rect.top - data->client_rect.top ); - flags |= RDW_FRAME; + data->surface->funcs->lock( data->surface ); + add_bounds_rect( data->surface->funcs->get_bounds( data->surface ), &rect ); + data->surface->funcs->unlock( data->surface ); } if (event->window != root_window) { + OffsetRect( &rect, data->whole_rect.left - data->client_rect.left, + data->whole_rect.top - data->client_rect.top ); + if (GetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) mirror_rect( &data->client_rect, &rect ); @@ -829,7 +833,7 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev ) } else OffsetRect( &rect, virtual_screen_rect.left, virtual_screen_rect.top ); - RedrawWindow( hwnd, &rect, 0, flags ); + if (!data->surface) RedrawWindow( hwnd, &rect, 0, flags ); } From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Alexandre Julliard : winex11: Check for changes in min/ maximize state even when the window rectangle didn't change. Message-ID: Module: wine Branch: master Commit: 6f1d43b16ecd8018f61f8fc947e78b9f5255cd63 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f1d43b16ecd8018f61f8fc947e78b9f5255cd63 Author: Alexandre Julliard Date: Thu Sep 6 14:09:06 2012 +0200 winex11: Check for changes in min/maximize state even when the window rectangle didn't change. --- dlls/winex11.drv/event.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index dc7d1e3..ba80439 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1019,14 +1019,7 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) if ((data->window_rect.right - data->window_rect.left == cx && data->window_rect.bottom - data->window_rect.top == cy) || (IsRectEmpty( &data->window_rect ) && event->width == 1 && event->height == 1)) - { - if (flags & SWP_NOMOVE) /* if nothing changed, don't do anything */ - { - TRACE( "Nothing has changed, ignoring event\n" ); - return; - } flags |= SWP_NOSIZE; - } else TRACE( "%p resizing from (%dx%d) to (%dx%d)\n", hwnd, data->window_rect.right - data->window_rect.left, @@ -1051,7 +1044,8 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) } } - SetWindowPos( hwnd, 0, x, y, cx, cy, flags ); + if ((flags & (SWP_NOSIZE | SWP_NOMOVE)) != (SWP_NOSIZE | SWP_NOMOVE)) + SetWindowPos( hwnd, 0, x, y, cx, cy, flags ); } From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Vincent Povirk : mscoree: Preserve %ecx when calling ReallyFixupVTable. Message-ID: Module: wine Branch: master Commit: b5c663ee1e4fd092e51735de219007bdb47d46d1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5c663ee1e4fd092e51735de219007bdb47d46d1 Author: Vincent Povirk Date: Wed Sep 5 15:25:59 2012 -0500 mscoree: Preserve %ecx when calling ReallyFixupVTable. --- dlls/mscoree/corruntimehost.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index ecefe75..da46d61 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -827,6 +827,8 @@ static void get_utf8_args(int *argc, char ***argv) struct vtable_fixup_thunk { + /* push %ecx */ + BYTE i7; /* sub $0x4,%esp */ BYTE i1[3]; /* mov fixup,(%esp) */ @@ -839,12 +841,15 @@ struct vtable_fixup_thunk BYTE i4[2]; /* pop %eax */ BYTE i5; + /* pop %ecx */ + BYTE i8; /* jmp *vtable_entry */ BYTE i6[2]; void *vtable_entry; }; static const struct vtable_fixup_thunk thunk_template = { + 0x51, {0x83,0xec,0x04}, {0xc7,0x04,0x24}, NULL, @@ -852,6 +857,7 @@ static const struct vtable_fixup_thunk thunk_template = { NULL, {0xff,0xd0}, 0x58, + 0x59, {0xff,0x25}, NULL }; From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Move D3DXPARAMETER_TYPE conversion helpers to util. Message-ID: Module: wine Branch: master Commit: 65c651e37661f8498011f57b6b36ff9606610b34 URL: http://source.winehq.org/git/wine.git/?a=commit;h=65c651e37661f8498011f57b6b36ff9606610b34 Author: Rico Sch?ller Date: Wed Sep 5 22:51:22 2012 +0200 d3dx9: Move D3DXPARAMETER_TYPE conversion helpers to util. --- dlls/d3dx9_36/d3dx9_36_private.h | 6 +++ dlls/d3dx9_36/effect.c | 84 ------------------------------------- dlls/d3dx9_36/util.c | 85 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 84 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36_private.h b/dlls/d3dx9_36/d3dx9_36_private.h index f6f797e..c4cc69c 100644 --- a/dlls/d3dx9_36/d3dx9_36_private.h +++ b/dlls/d3dx9_36/d3dx9_36_private.h @@ -93,4 +93,10 @@ const char *debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN; const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) DECLSPEC_HIDDEN; const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) DECLSPEC_HIDDEN; +/* parameter type conversion helpers */ +INT get_int(D3DXPARAMETER_TYPE type, LPCVOID data) DECLSPEC_HIDDEN; +FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data) DECLSPEC_HIDDEN; +BOOL get_bool(LPCVOID data) DECLSPEC_HIDDEN; +void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DXPARAMETER_TYPE intype) DECLSPEC_HIDDEN; + #endif /* __WINE_D3DX9_36_PRIVATE_H */ diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 162cbf8..f3a5549 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -847,90 +847,6 @@ static void free_effect_compiler(struct ID3DXEffectCompilerImpl *compiler) } } -static INT get_int(D3DXPARAMETER_TYPE type, LPCVOID data) -{ - INT i; - - switch (type) - { - case D3DXPT_FLOAT: - i = *(FLOAT *)data; - break; - - case D3DXPT_INT: - i = *(INT *)data; - break; - - case D3DXPT_BOOL: - i = *(BOOL *)data; - break; - - default: - i = 0; - FIXME("Unhandled type %s. This should not happen!\n", debug_d3dxparameter_type(type)); - break; - } - - return i; -} - -inline static FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data) -{ - FLOAT f; - - switch (type) - { - case D3DXPT_FLOAT: - f = *(FLOAT *)data; - break; - - case D3DXPT_INT: - f = *(INT *)data; - break; - - case D3DXPT_BOOL: - f = *(BOOL *)data; - break; - - default: - f = 0.0f; - FIXME("Unhandled type %s. This should not happen!\n", debug_d3dxparameter_type(type)); - break; - } - - return f; -} - -static inline BOOL get_bool(LPCVOID data) -{ - return (*(DWORD *)data) != 0; -} - -static void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DXPARAMETER_TYPE intype) -{ - TRACE("Changing from type %s to type %s\n", debug_d3dxparameter_type(intype), debug_d3dxparameter_type(outtype)); - - switch (outtype) - { - case D3DXPT_FLOAT: - *(FLOAT *)outdata = get_float(intype, indata); - break; - - case D3DXPT_BOOL: - *(BOOL *)outdata = get_bool(indata); - break; - - case D3DXPT_INT: - *(INT *)outdata = get_int(intype, indata); - break; - - default: - FIXME("Unhandled type %s. This should not happen!\n", debug_d3dxparameter_type(outtype)); - *(INT *)outdata = 0; - break; - } -} - static void get_vector(struct d3dx_parameter *param, D3DXVECTOR4 *vector) { UINT i; diff --git a/dlls/d3dx9_36/util.c b/dlls/d3dx9_36/util.c index 7615846..6daddd7 100644 --- a/dlls/d3dx9_36/util.c +++ b/dlls/d3dx9_36/util.c @@ -269,3 +269,88 @@ const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) } #undef WINE_D3DX_TO_STR + +/* parameter type conversion helpers */ +INT get_int(D3DXPARAMETER_TYPE type, LPCVOID data) +{ + INT i; + + switch (type) + { + case D3DXPT_FLOAT: + i = *(FLOAT *)data; + break; + + case D3DXPT_INT: + i = *(INT *)data; + break; + + case D3DXPT_BOOL: + i = *(BOOL *)data; + break; + + default: + i = 0; + FIXME("Unhandled type %s. This should not happen!\n", debug_d3dxparameter_type(type)); + break; + } + + return i; +} + +FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data) +{ + FLOAT f; + + switch (type) + { + case D3DXPT_FLOAT: + f = *(FLOAT *)data; + break; + + case D3DXPT_INT: + f = *(INT *)data; + break; + + case D3DXPT_BOOL: + f = *(BOOL *)data; + break; + + default: + f = 0.0f; + FIXME("Unhandled type %s. This should not happen!\n", debug_d3dxparameter_type(type)); + break; + } + + return f; +} + +BOOL get_bool(LPCVOID data) +{ + return (*(DWORD *)data) != 0; +} + +void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DXPARAMETER_TYPE intype) +{ + TRACE("Changing from type %s to type %s\n", debug_d3dxparameter_type(intype), debug_d3dxparameter_type(outtype)); + + switch (outtype) + { + case D3DXPT_FLOAT: + *(FLOAT *)outdata = get_float(intype, indata); + break; + + case D3DXPT_BOOL: + *(BOOL *)outdata = get_bool(indata); + break; + + case D3DXPT_INT: + *(INT *)outdata = get_int(intype, indata); + break; + + default: + FIXME("Unhandled type %s. This should not happen!\n", debug_d3dxparameter_type(outtype)); + *(INT *)outdata = 0; + break; + } +} From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Move bool cropping into helper function. Message-ID: Module: wine Branch: master Commit: 823d1fbc3887ab4b52b88555a8ef954f617b6194 URL: http://source.winehq.org/git/wine.git/?a=commit;h=823d1fbc3887ab4b52b88555a8ef954f617b6194 Author: Rico Sch?ller Date: Wed Sep 5 22:51:42 2012 +0200 d3dx9: Move bool cropping into helper function. --- dlls/d3dx9_36/effect.c | 5 ++--- dlls/d3dx9_36/util.c | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index f3a5549..a6dcd98 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1649,8 +1649,6 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetBool(ID3DXBaseEffect *iface, D3DXHA if (param && !param->element_count && param->rows == 1 && param->columns == 1) { - /* crop input */ - b = b != 0; set_number(param->data, param->type, &b, D3DXPT_BOOL); return D3D_OK; } @@ -1699,7 +1697,8 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetBoolArray(ID3DXBaseEffect *iface, D case D3DXPC_MATRIX_ROWS: for (i = 0; i < size; ++i) { - set_number((DWORD *)param->data + i, param->type, &b[i], D3DXPT_BOOL); + /* don't crop the input, use D3DXPT_INT instead of D3DXPT_BOOL */ + set_number((DWORD *)param->data + i, param->type, &b[i], D3DXPT_INT); } return D3D_OK; diff --git a/dlls/d3dx9_36/util.c b/dlls/d3dx9_36/util.c index 6daddd7..c5160fa 100644 --- a/dlls/d3dx9_36/util.c +++ b/dlls/d3dx9_36/util.c @@ -271,6 +271,11 @@ const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) #undef WINE_D3DX_TO_STR /* parameter type conversion helpers */ +BOOL get_bool(LPCVOID data) +{ + return (*(DWORD *)data) != 0; +} + INT get_int(D3DXPARAMETER_TYPE type, LPCVOID data) { INT i; @@ -286,7 +291,7 @@ INT get_int(D3DXPARAMETER_TYPE type, LPCVOID data) break; case D3DXPT_BOOL: - i = *(BOOL *)data; + i = get_bool(data); break; default: @@ -313,7 +318,7 @@ FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data) break; case D3DXPT_BOOL: - f = *(BOOL *)data; + f = get_bool(data); break; default: @@ -325,15 +330,16 @@ FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data) return f; } -BOOL get_bool(LPCVOID data) -{ - return (*(DWORD *)data) != 0; -} - void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DXPARAMETER_TYPE intype) { TRACE("Changing from type %s to type %s\n", debug_d3dxparameter_type(intype), debug_d3dxparameter_type(outtype)); + if (outtype == intype) + { + *(DWORD *)outdata = *(DWORD *)indata; + return; + } + switch (outtype) { case D3DXPT_FLOAT: From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Michael Stefaniuc : dsound: Inline some of the IDirectSound helpers. Message-ID: Module: wine Branch: master Commit: 1440b25267b97a8e774d294b4036aff3b4c94b0c URL: http://source.winehq.org/git/wine.git/?a=commit;h=1440b25267b97a8e774d294b4036aff3b4c94b0c Author: Michael Stefaniuc Date: Wed Sep 5 23:19:12 2012 +0200 dsound: Inline some of the IDirectSound helpers. --- dlls/dsound/dsound.c | 274 +++++++++++++++++------------------------- dlls/dsound/dsound_private.h | 14 -- 2 files changed, 113 insertions(+), 175 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=1440b25267b97a8e774d294b4036aff3b4c94b0c From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Henri Verbeet : d3d10core: Update the MipLevels field after texture creation. Message-ID: Module: wine Branch: master Commit: 129ad9cbf56e6dfcbbb1b01d31cd6350999f3c26 URL: http://source.winehq.org/git/wine.git/?a=commit;h=129ad9cbf56e6dfcbbb1b01d31cd6350999f3c26 Author: Henri Verbeet Date: Thu Sep 6 11:25:01 2012 +0200 d3d10core: Update the MipLevels field after texture creation. --- dlls/d3d10core/tests/device.c | 24 ++++++++++++++++++++++++ dlls/d3d10core/texture.c | 2 ++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index 57a61c4..e9ade68 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -127,6 +127,19 @@ static void test_create_texture2d(ID3D10Device *device) hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr); + ID3D10Texture2D_GetDesc(texture, &desc); + ok(desc.Width == 512, "Got unexpected Width %u.\n", desc.Width); + ok(desc.Height == 512, "Got unexpected Height %u.\n", desc.Height); + ok(desc.MipLevels == 10, "Got unexpected MipLevels %u.\n", desc.MipLevels); + ok(desc.ArraySize == 1, "Got unexpected ArraySize %u.\n", desc.ArraySize); + ok(desc.Format == DXGI_FORMAT_R8G8B8A8_UNORM, "Got unexpected Format %#x.\n", desc.Format); + ok(desc.SampleDesc.Count == 1, "Got unexpected SampleDesc.Count %u.\n", desc.SampleDesc.Count); + ok(desc.SampleDesc.Quality == 0, "Got unexpected SampleDesc.Quality %u.\n", desc.SampleDesc.Quality); + ok(desc.Usage == D3D10_USAGE_DEFAULT, "Got unexpected MipLevels %u.\n", desc.Usage); + ok(desc.BindFlags == D3D10_BIND_RENDER_TARGET, "Got unexpected BindFlags %u.\n", desc.BindFlags); + ok(desc.CPUAccessFlags == 0, "Got unexpected CPUAccessFlags %u.\n", desc.CPUAccessFlags); + ok(desc.MiscFlags == 0, "Got unexpected MiscFlags %u.\n", desc.MiscFlags); + hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface); ok(FAILED(hr), "Texture should not implement IDXGISurface\n"); if (SUCCEEDED(hr)) IDXGISurface_Release(surface); @@ -172,6 +185,17 @@ static void test_create_texture3d(ID3D10Device *device) hr = ID3D10Device_CreateTexture3D(device, &desc, NULL, &texture); ok(SUCCEEDED(hr), "Failed to create a 3d texture, hr %#x.\n", hr); + ID3D10Texture3D_GetDesc(texture, &desc); + ok(desc.Width == 64, "Got unexpected Width %u.\n", desc.Width); + ok(desc.Height == 64, "Got unexpected Height %u.\n", desc.Height); + ok(desc.Depth == 64, "Got unexpected Depth %u.\n", desc.Depth); + ok(desc.MipLevels == 7, "Got unexpected MipLevels %u.\n", desc.MipLevels); + ok(desc.Format == DXGI_FORMAT_R8G8B8A8_UNORM, "Got unexpected Format %#x.\n", desc.Format); + ok(desc.Usage == D3D10_USAGE_DEFAULT, "Got unexpected MipLevels %u.\n", desc.Usage); + ok(desc.BindFlags == D3D10_BIND_RENDER_TARGET, "Got unexpected BindFlags %u.\n", desc.BindFlags); + ok(desc.CPUAccessFlags == 0, "Got unexpected CPUAccessFlags %u.\n", desc.CPUAccessFlags); + ok(desc.MiscFlags == 0, "Got unexpected MiscFlags %u.\n", desc.MiscFlags); + hr = ID3D10Texture3D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface); ok(FAILED(hr), "Texture should not implement IDXGISurface.\n"); if (SUCCEEDED(hr)) IDXGISurface_Release(surface); diff --git a/dlls/d3d10core/texture.c b/dlls/d3d10core/texture.c index 41bd80f..a065991 100644 --- a/dlls/d3d10core/texture.c +++ b/dlls/d3d10core/texture.c @@ -273,6 +273,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic IUnknown_Release(texture->dxgi_surface); return hr; } + texture->desc.MipLevels = wined3d_texture_get_level_count(texture->wined3d_texture); return S_OK; } @@ -480,6 +481,7 @@ HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d10_devic WARN("Failed to create wined3d texture, hr %#x.\n", hr); return hr; } + texture->desc.MipLevels = wined3d_texture_get_level_count(texture->wined3d_texture); return S_OK; } From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Henri Verbeet : wined3d: wined3d_device_set_index_buffer() never fails. Message-ID: Module: wine Branch: master Commit: a3e28f6ce5ffaa6c7cbe4ba49a5a90274016f1e4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a3e28f6ce5ffaa6c7cbe4ba49a5a90274016f1e4 Author: Henri Verbeet Date: Thu Sep 6 11:25:02 2012 +0200 wined3d: wined3d_device_set_index_buffer() never fails. --- dlls/d3d8/device.c | 5 ++--- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/device.c | 2 +- dlls/wined3d/device.c | 6 ++---- include/wine/wined3d.h | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index d90161f..49436da 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2344,7 +2344,6 @@ static HRESULT WINAPI d3d8_device_SetIndices(IDirect3DDevice8 *iface, { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_indexbuffer *ib = unsafe_impl_from_IDirect3DIndexBuffer8(buffer); - HRESULT hr; TRACE("iface %p, buffer %p, base_vertex_idx %u.\n", iface, buffer, base_vertex_idx); @@ -2356,12 +2355,12 @@ static HRESULT WINAPI d3d8_device_SetIndices(IDirect3DDevice8 *iface, */ wined3d_mutex_lock(); wined3d_device_set_base_vertex_index(device->wined3d_device, base_vertex_idx); - hr = wined3d_device_set_index_buffer(device->wined3d_device, + wined3d_device_set_index_buffer(device->wined3d_device, ib ? ib->wined3d_buffer : NULL, ib ? ib->format : WINED3DFMT_UNKNOWN); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetIndices(IDirect3DDevice8 *iface, diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 8f8f177..523c9ac 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2524,17 +2524,16 @@ static HRESULT WINAPI d3d9_device_SetIndices(IDirect3DDevice9Ex *iface, IDirect3 { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); struct d3d9_indexbuffer *ib = unsafe_impl_from_IDirect3DIndexBuffer9(buffer); - HRESULT hr; TRACE("iface %p, buffer %p.\n", iface, buffer); wined3d_mutex_lock(); - hr = wined3d_device_set_index_buffer(device->wined3d_device, + wined3d_device_set_index_buffer(device->wined3d_device, ib ? ib->wined3d_buffer : NULL, ib ? ib->format : WINED3DFMT_UNKNOWN); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetIndices(IDirect3DDevice9Ex *iface, IDirect3DIndexBuffer9 **buffer) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index a0526d1..24bd993 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -4158,7 +4158,7 @@ static HRESULT d3d_device7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, /* Set the index stream */ wined3d_device_set_base_vertex_index(This->wined3d_device, StartVertex); - hr = wined3d_device_set_index_buffer(This->wined3d_device, This->indexbuffer, WINED3DFMT_R16_UINT); + wined3d_device_set_index_buffer(This->wined3d_device, This->indexbuffer, WINED3DFMT_R16_UINT); /* Set the vertex stream source */ hr = wined3d_device_set_stream_source(This->wined3d_device, 0, vb->wineD3DVertexBuffer, 0, stride); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 386fd25..2d6563f 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2215,7 +2215,7 @@ HRESULT CDECL wined3d_device_get_material(const struct wined3d_device *device, s return WINED3D_OK; } -HRESULT CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, +void CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, struct wined3d_buffer *buffer, enum wined3d_format_id format_id) { struct wined3d_buffer *prev_buffer; @@ -2237,7 +2237,7 @@ HRESULT CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, wined3d_buffer_incref(buffer); if (prev_buffer) wined3d_buffer_decref(prev_buffer); - return WINED3D_OK; + return; } if (prev_buffer != buffer) @@ -2254,8 +2254,6 @@ HRESULT CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, wined3d_buffer_decref(prev_buffer); } } - - return WINED3D_OK; } HRESULT CDECL wined3d_device_get_index_buffer(const struct wined3d_device *device, struct wined3d_buffer **buffer) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 82a1c80..28a6719 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2204,7 +2204,7 @@ HRESULT __cdecl wined3d_device_set_depth_stencil(struct wined3d_device *device, HRESULT __cdecl wined3d_device_set_dialog_box_mode(struct wined3d_device *device, BOOL enable_dialogs); void __cdecl wined3d_device_set_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, DWORD flags, const struct wined3d_gamma_ramp *ramp); -HRESULT __cdecl wined3d_device_set_index_buffer(struct wined3d_device *device, +void __cdecl wined3d_device_set_index_buffer(struct wined3d_device *device, struct wined3d_buffer *index_buffer, enum wined3d_format_id format_id); HRESULT __cdecl wined3d_device_set_light(struct wined3d_device *device, UINT light_idx, const struct wined3d_light *light); From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Henri Verbeet : wined3d: Just return the buffer from wined3d_device_get_index_buffer(). Message-ID: Module: wine Branch: master Commit: c8f4ca315e5514c71ae14eca06a2a674515a9248 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8f4ca315e5514c71ae14eca06a2a674515a9248 Author: Henri Verbeet Date: Thu Sep 6 11:25:03 2012 +0200 wined3d: Just return the buffer from wined3d_device_get_index_buffer(). --- dlls/d3d8/device.c | 11 +++-------- dlls/d3d9/device.c | 13 ++++--------- dlls/wined3d/device.c | 13 +++---------- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 3 +-- 5 files changed, 12 insertions(+), 30 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 49436da..36b8a7e 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2367,9 +2367,8 @@ static HRESULT WINAPI d3d8_device_GetIndices(IDirect3DDevice8 *iface, IDirect3DIndexBuffer8 **buffer, UINT *base_vertex_index) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - struct wined3d_buffer *wined3d_buffer = NULL; + struct wined3d_buffer *wined3d_buffer; struct d3d8_indexbuffer *buffer_impl; - HRESULT hr; TRACE("iface %p, buffer %p, base_vertex_index %p.\n", iface, buffer, base_vertex_index); @@ -2379,23 +2378,19 @@ static HRESULT WINAPI d3d8_device_GetIndices(IDirect3DDevice8 *iface, /* The case from UINT to INT is safe because d3d8 will never set negative values */ wined3d_mutex_lock(); *base_vertex_index = wined3d_device_get_base_vertex_index(device->wined3d_device); - hr = wined3d_device_get_index_buffer(device->wined3d_device, &wined3d_buffer); - if (SUCCEEDED(hr) && wined3d_buffer) + if ((wined3d_buffer = wined3d_device_get_index_buffer(device->wined3d_device))) { buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); *buffer = &buffer_impl->IDirect3DIndexBuffer8_iface; IDirect3DIndexBuffer8_AddRef(*buffer); - wined3d_buffer_decref(wined3d_buffer); } else { - if (FAILED(hr)) - ERR("Failed to get wined3d index buffer, hr %#x.\n", hr); *buffer = NULL; } wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_CreatePixelShader(IDirect3DDevice8 *iface, diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 523c9ac..0399ba3 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2539,9 +2539,8 @@ static HRESULT WINAPI d3d9_device_SetIndices(IDirect3DDevice9Ex *iface, IDirect3 static HRESULT WINAPI d3d9_device_GetIndices(IDirect3DDevice9Ex *iface, IDirect3DIndexBuffer9 **buffer) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - struct wined3d_buffer *retIndexData = NULL; + struct wined3d_buffer *wined3d_buffer; struct d3d9_indexbuffer *buffer_impl; - HRESULT hr; TRACE("iface %p, buffer %p.\n", iface, buffer); @@ -2549,23 +2548,19 @@ static HRESULT WINAPI d3d9_device_GetIndices(IDirect3DDevice9Ex *iface, IDirect3 return D3DERR_INVALIDCALL; wined3d_mutex_lock(); - hr = wined3d_device_get_index_buffer(device->wined3d_device, &retIndexData); - if (SUCCEEDED(hr) && retIndexData) + if ((wined3d_buffer = wined3d_device_get_index_buffer(device->wined3d_device))) { - buffer_impl = wined3d_buffer_get_parent(retIndexData); + buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); *buffer = &buffer_impl->IDirect3DIndexBuffer9_iface; IDirect3DIndexBuffer9_AddRef(*buffer); - wined3d_buffer_decref(retIndexData); } else { - if (FAILED(hr)) - FIXME("Call to GetIndices failed\n"); *buffer = NULL; } wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_CreatePixelShader(IDirect3DDevice9Ex *iface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 2d6563f..7a57195 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2256,18 +2256,11 @@ void CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, } } -HRESULT CDECL wined3d_device_get_index_buffer(const struct wined3d_device *device, struct wined3d_buffer **buffer) +struct wined3d_buffer * CDECL wined3d_device_get_index_buffer(const struct wined3d_device *device) { - TRACE("device %p, buffer %p.\n", device, buffer); - - *buffer = device->stateBlock->state.index_buffer; - - if (*buffer) - wined3d_buffer_incref(*buffer); - - TRACE("Returning %p.\n", *buffer); + TRACE("device %p.\n", device); - return WINED3D_OK; + return device->stateBlock->state.index_buffer; } /* Method to offer d3d9 a simple way to set the base vertex index without messing with the index buffer */ diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index aa0c186..c211e4a 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -64,7 +64,7 @@ @ cdecl wined3d_device_get_display_mode(ptr long ptr ptr) @ cdecl wined3d_device_get_front_buffer_data(ptr long ptr) @ cdecl wined3d_device_get_gamma_ramp(ptr long ptr) -@ cdecl wined3d_device_get_index_buffer(ptr ptr) +@ cdecl wined3d_device_get_index_buffer(ptr) @ cdecl wined3d_device_get_light(ptr long ptr) @ cdecl wined3d_device_get_light_enable(ptr long ptr) @ cdecl wined3d_device_get_material(ptr ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 28a6719..afb007c 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2125,8 +2125,7 @@ HRESULT __cdecl wined3d_device_get_front_buffer_data(const struct wined3d_device UINT swapchain_idx, struct wined3d_surface *dst_surface); void __cdecl wined3d_device_get_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp); -HRESULT __cdecl wined3d_device_get_index_buffer(const struct wined3d_device *device, - struct wined3d_buffer **index_buffer); +struct wined3d_buffer * __cdecl wined3d_device_get_index_buffer(const struct wined3d_device *device); HRESULT __cdecl wined3d_device_get_light(const struct wined3d_device *device, UINT light_idx, struct wined3d_light *light); HRESULT __cdecl wined3d_device_get_light_enable(const struct wined3d_device *device, UINT light_idx, BOOL *enable); From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Piotr Caban : msvcp90: Fixed basic_stringbuf_wchar_overflow implementation. Message-ID: Module: wine Branch: master Commit: 0e6171f6d7b969a7a48bca7b02d88c3a56850cfb URL: http://source.winehq.org/git/wine.git/?a=commit;h=0e6171f6d7b969a7a48bca7b02d88c3a56850cfb Author: Piotr Caban Date: Thu Sep 6 11:40:56 2012 +0200 msvcp90: Fixed basic_stringbuf_wchar_overflow implementation. --- dlls/msvcp100/ios.c | 2 +- dlls/msvcp90/ios.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp100/ios.c b/dlls/msvcp100/ios.c index 3e3bad8..5889d57 100644 --- a/dlls/msvcp100/ios.c +++ b/dlls/msvcp100/ios.c @@ -4133,7 +4133,7 @@ unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar * this->state |= STRINGBUF_allocated; }else { ptr = basic_streambuf_wchar_eback(&this->base); - memcpy(buf, ptr, oldsize); + memcpy(buf, ptr, oldsize*sizeof(wchar_t)); this->seekhigh = buf+(this->seekhigh-ptr); basic_streambuf_wchar_setp_next(&this->base, buf, diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 88ed0e9..e5d7233 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -4123,7 +4123,7 @@ unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar * this->state |= STRINGBUF_allocated; }else { ptr = basic_streambuf_wchar_eback(&this->base); - memcpy(buf, ptr, oldsize); + memcpy(buf, ptr, oldsize*sizeof(wchar_t)); this->seekhigh = buf+(this->seekhigh-ptr); basic_streambuf_wchar_setp_next(&this->base, buf, From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Piotr Caban : msvcp90: Fixed locale_ctor_cstr implementation. Message-ID: Module: wine Branch: master Commit: 225cab98425484e92146d7c05c91502e2ccc3cb3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=225cab98425484e92146d7c05c91502e2ccc3cb3 Author: Piotr Caban Date: Thu Sep 6 11:41:31 2012 +0200 msvcp90: Fixed locale_ctor_cstr implementation. --- dlls/msvcp100/locale.c | 4 +++- dlls/msvcp90/locale.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp100/locale.c b/dlls/msvcp100/locale.c index b217232..1bba834 100644 --- a/dlls/msvcp100/locale.c +++ b/dlls/msvcp100/locale.c @@ -8142,7 +8142,9 @@ locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category ERR("Out of memory\n"); throw_exception(EXCEPTION_BAD_ALLOC, NULL); } - this->ptr = locale__Init(); + locale__Locimp_ctor(this->ptr); + + locale__Init(); _Locinfo_ctor_cat_cstr(&locinfo, cat, locname); if(!memcmp(MSVCP_basic_string_char_c_str(&locinfo.newlocname), "*", 2)) { diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 7e6b10f..1d9eb33 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -8293,7 +8293,9 @@ locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category ERR("Out of memory\n"); throw_exception(EXCEPTION_BAD_ALLOC, NULL); } - this->ptr = locale__Init(); + locale__Locimp_ctor(this->ptr); + + locale__Init(); _Locinfo_ctor_cat_cstr(&locinfo, cat, locname); if(!memcmp(MSVCP_basic_string_char_c_str(&locinfo.newlocname), "*", 2)) { From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Piotr Caban : msvcp90: Added locale_ctor_locale_locale implementation. Message-ID: Module: wine Branch: master Commit: e9b51093deeca572e93906c45fc08f6fefefc728 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e9b51093deeca572e93906c45fc08f6fefefc728 Author: Piotr Caban Date: Thu Sep 6 11:42:05 2012 +0200 msvcp90: Added locale_ctor_locale_locale implementation. --- dlls/msvcp100/locale.c | 19 +++++++++++++++++-- dlls/msvcp90/locale.c | 19 +++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp100/locale.c b/dlls/msvcp100/locale.c index 1bba834..55b3134 100644 --- a/dlls/msvcp100/locale.c +++ b/dlls/msvcp100/locale.c @@ -8104,8 +8104,23 @@ locale__Locimp* __cdecl locale__Init(void) DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16) locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat) { - FIXME("(%p %p %p %d) stub\n", this, loc, other, cat); - return NULL; + _Locinfo locinfo; + + TRACE("(%p %p %p %d)\n", this, loc, other, cat); + + this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); + if(!this->ptr) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + } + locale__Locimp_copy_ctor(this->ptr, loc->ptr); + + _Locinfo_ctor_cat_cstr(&locinfo, loc->ptr->catmask, MSVCP_basic_string_char_c_str(&loc->ptr->name)); + _Locinfo__Addcats(&locinfo, cat & other->ptr->catmask, MSVCP_basic_string_char_c_str(&other->ptr->name)); + locale__Locimp__Makeloc(&locinfo, cat, this->ptr, other); + _Locinfo_dtor(&locinfo); + + return this; } /* ??0locale at std@@QAE at ABV01@@Z */ diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 1d9eb33..f5a4534 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -8255,8 +8255,23 @@ locale__Locimp* __cdecl locale__Init(void) DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16) locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat) { - FIXME("(%p %p %p %d) stub\n", this, loc, other, cat); - return NULL; + _Locinfo locinfo; + + TRACE("(%p %p %p %d)\n", this, loc, other, cat); + + this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); + if(!this->ptr) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + } + locale__Locimp_copy_ctor(this->ptr, loc->ptr); + + _Locinfo_ctor_cat_cstr(&locinfo, loc->ptr->catmask, MSVCP_basic_string_char_c_str(&loc->ptr->name)); + _Locinfo__Addcats(&locinfo, cat & other->ptr->catmask, MSVCP_basic_string_char_c_str(&other->ptr->name)); + locale__Locimp__Makeloc(&locinfo, cat, this->ptr, other); + _Locinfo_dtor(&locinfo); + + return this; } /* ??0locale at std@@QAE at ABV01@@Z */ From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Jacek Caban : vbscript: Fixed uninitialized opcode param in forto statement bytecode. Message-ID: Module: wine Branch: master Commit: 080169f1d2bf280b149943230d0ef859a8ae8b93 URL: http://source.winehq.org/git/wine.git/?a=commit;h=080169f1d2bf280b149943230d0ef859a8ae8b93 Author: Jacek Caban Date: Thu Sep 6 11:57:00 2012 +0200 vbscript: Fixed uninitialized opcode param in forto statement bytecode. --- dlls/vbscript/compile.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 12db4e0..c3334fd 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -700,6 +700,7 @@ static HRESULT compile_forto_statement(compile_ctx_t *ctx, forto_statement_t *st if(!instr) return E_OUTOFMEMORY; instr_ptr(ctx, instr)->arg1.bstr = identifier; + instr_ptr(ctx, instr)->arg2.uint = 0; hres = compile_expression(ctx, stat->to_expr); if(FAILED(hres)) From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Jacek Caban : vbscript: Renamed vbscode_t' s variables to not suggest that they are global code-only. Message-ID: Module: wine Branch: master Commit: 9e3f75cfb1b40cdaff0c68cbf79c43770ca44e61 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9e3f75cfb1b40cdaff0c68cbf79c43770ca44e61 Author: Jacek Caban Date: Thu Sep 6 11:57:15 2012 +0200 vbscript: Renamed vbscode_t's variables to not suggest that they are global code-only. --- dlls/vbscript/compile.c | 20 ++++++++++---------- dlls/vbscript/vbscript.c | 13 +++++++++---- dlls/vbscript/vbscript.h | 4 ++-- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index c3334fd..89e290d 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -973,7 +973,7 @@ static HRESULT compile_const_statement(compile_ctx_t *ctx, const_statement_t *st static HRESULT compile_function_statement(compile_ctx_t *ctx, function_statement_t *stat) { - if(ctx->func != &ctx->code->global_code) { + if(ctx->func != &ctx->code->main_code) { FIXME("Function is not in the global code\n"); return E_FAIL; } @@ -1615,15 +1615,15 @@ static vbscode_t *alloc_vbscode(compile_ctx_t *ctx, const WCHAR *source) ret->bstr_pool = NULL; ret->bstr_pool_size = 0; ret->bstr_cnt = 0; - ret->global_executed = FALSE; + ret->pending_exec = FALSE; - ret->global_code.type = FUNC_GLOBAL; - ret->global_code.name = NULL; - ret->global_code.code_ctx = ret; - ret->global_code.vars = NULL; - ret->global_code.var_cnt = 0; - ret->global_code.arg_cnt = 0; - ret->global_code.args = NULL; + ret->main_code.type = FUNC_GLOBAL; + ret->main_code.name = NULL; + ret->main_code.code_ctx = ret; + ret->main_code.vars = NULL; + ret->main_code.var_cnt = 0; + ret->main_code.arg_cnt = 0; + ret->main_code.args = NULL; list_init(&ret->entry); return ret; @@ -1664,7 +1664,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, vbscode_t **ret) ctx.stat_ctx = NULL; ctx.labels_cnt = ctx.labels_size = 0; - hres = compile_func(&ctx, ctx.parser.stats, &ctx.code->global_code); + hres = compile_func(&ctx, ctx.parser.stats, &ctx.code->main_code); if(FAILED(hres)) { release_compiler(&ctx); return hres; diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index a5a9853..f250df3 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -77,10 +77,10 @@ static HRESULT exec_global_code(script_ctx_t *ctx, vbscode_t *code) { HRESULT hres; - code->global_executed = TRUE; + code->pending_exec = FALSE; IActiveScriptSite_OnEnterScript(ctx->site); - hres = exec_script(ctx, &code->global_code, NULL, NULL, NULL); + hres = exec_script(ctx, &code->main_code, NULL, NULL, NULL); IActiveScriptSite_OnLeaveScript(ctx->site); return hres; @@ -91,7 +91,7 @@ static void exec_queued_code(script_ctx_t *ctx) vbscode_t *iter; LIST_FOR_EACH_ENTRY(iter, &ctx->code_list, vbscode_t, entry) { - if(!iter->global_executed) + if(iter->pending_exec) exec_global_code(ctx, iter); } } @@ -604,7 +604,12 @@ static HRESULT WINAPI VBScriptParse_ParseScriptText(IActiveScriptParse *iface, if(FAILED(hres)) return hres; - return is_started(This) ? exec_global_code(This->ctx, code) : S_OK; + if(!is_started(This)) { + code->pending_exec = TRUE; + return S_OK; + } + + return exec_global_code(This->ctx, code); } static const IActiveScriptParseVtbl VBScriptParseVtbl = { diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 3f1e887..788d98d 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -298,8 +298,8 @@ struct _vbscode_t { BOOL option_explicit; - BOOL global_executed; - function_t global_code; + BOOL pending_exec; + function_t main_code; BSTR *bstr_pool; unsigned bstr_pool_size; From julliard at winehq.org Thu Sep 6 13:37:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:22 -0500 Subject: Jacek Caban : vbscript: Added IActiveScriptParseProcedure2:: ParseProcedureText implementation. Message-ID: Module: wine Branch: master Commit: cf0faf1d3cac6b1eeb49bd270187de4ce8594164 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf0faf1d3cac6b1eeb49bd270187de4ce8594164 Author: Jacek Caban Date: Thu Sep 6 11:57:33 2012 +0200 vbscript: Added IActiveScriptParseProcedure2::ParseProcedureText implementation. --- dlls/vbscript/vbdisp.c | 49 +++++++++++++++++++++++++++++++++++++++++++++- dlls/vbscript/vbscript.c | 15 ++++++++++++- dlls/vbscript/vbscript.h | 3 ++ 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 022ac1d..f6e3f11 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -501,6 +501,8 @@ HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret) vbdisp->ref = 1; vbdisp->desc = desc; + list_add_tail(&desc->ctx->objects, &vbdisp->entry); + if(desc->class_initialize_id) { DISPPARAMS dp = {0}; HRESULT hres; @@ -513,11 +515,56 @@ HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret) } } - list_add_tail(&desc->ctx->objects, &vbdisp->entry); *ret = vbdisp; return S_OK; } +static HRESULT Procedure_invoke(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res) +{ + script_ctx_t *ctx = This->desc->ctx; + HRESULT hres; + + TRACE("\n"); + + IActiveScriptSite_OnEnterScript(ctx->site); + hres = exec_script(ctx, This->desc->value_func, NULL, NULL, NULL); + IActiveScriptSite_OnLeaveScript(ctx->site); + + return hres; +} + +static const builtin_prop_t procedure_props[] = { + {DISPID_VALUE, Procedure_invoke, 0} +}; + +HRESULT create_procedure_disp(script_ctx_t *ctx, vbscode_t *code, IDispatch **ret) +{ + class_desc_t *desc; + vbdisp_t *vbdisp; + HRESULT hres; + + desc = heap_alloc_zero(sizeof(*desc)); + if(!desc) + return E_OUTOFMEMORY; + + desc->ctx = ctx; + desc->builtin_prop_cnt = sizeof(procedure_props)/sizeof(*procedure_props); + desc->builtin_props = procedure_props; + desc->value_func = &code->main_code; + + hres = create_vbdisp(desc, &vbdisp); + if(FAILED(hres)) { + heap_free(desc); + return hres; + } + + desc->next = ctx->procs; + ctx->procs = desc; + + *ret = (IDispatch*)&vbdisp->IDispatchEx_iface; + return S_OK; +} + void collect_objects(script_ctx_t *ctx) { vbdisp_t *iter, *iter2; diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index f250df3..f842bba 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -650,10 +650,21 @@ static HRESULT WINAPI VBScriptParseProcedure_ParseProcedureText(IActiveScriptPar CTXARG_T dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, IDispatch **ppdisp) { VBScript *This = impl_from_IActiveScriptParseProcedure2(iface); - FIXME("(%p)->(%s %s %s %s %p %s %s %u %x %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams), + vbscode_t *code; + HRESULT hres; + + TRACE("(%p)->(%s %s %s %s %p %s %s %u %x %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams), debugstr_w(pstrProcedureName), debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter), wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLineNumber, dwFlags, ppdisp); - return E_NOTIMPL; + + if(This->thread_id != GetCurrentThreadId() || This->state == SCRIPTSTATE_CLOSED) + return E_UNEXPECTED; + + hres = compile_script(This->ctx, pstrCode, &code); + if(FAILED(hres)) + return hres; + + return create_procedure_disp(This->ctx, code, ppdisp); } static const IActiveScriptParseProcedure2Vtbl VBScriptParseProcedureVtbl = { diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 788d98d..8a316ab 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -100,6 +100,7 @@ typedef struct _class_desc_t { unsigned builtin_prop_cnt; const builtin_prop_t *builtin_props; ITypeInfo *typeinfo; + function_t *value_func; struct _class_desc_t *next; } class_desc_t; @@ -121,6 +122,7 @@ HRESULT vbdisp_get_id(vbdisp_t*,BSTR,vbdisp_invoke_type_t,BOOL,DISPID*) DECLSPEC HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*,VARIANT*) DECLSPEC_HIDDEN; HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*) DECLSPEC_HIDDEN; void collect_objects(script_ctx_t*) DECLSPEC_HIDDEN; +HRESULT create_procedure_disp(script_ctx_t*,vbscode_t*,IDispatch**) DECLSPEC_HIDDEN; static inline unsigned arg_cnt(const DISPPARAMS *dp) { @@ -160,6 +162,7 @@ struct _script_ctx_t { dynamic_var_t *global_vars; function_t *global_funcs; class_desc_t *classes; + class_desc_t *procs; vbsheap_t heap; From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Jacek Caban : vbscript: Added IActiveScriptParseProcedure2:: ParseProcedureText tests. Message-ID: Module: wine Branch: master Commit: 76b1a7e016e93eaa9f06b9a018728353da5bfd7c URL: http://source.winehq.org/git/wine.git/?a=commit;h=76b1a7e016e93eaa9f06b9a018728353da5bfd7c Author: Jacek Caban Date: Thu Sep 6 11:57:46 2012 +0200 vbscript: Added IActiveScriptParseProcedure2::ParseProcedureText tests. --- dlls/vbscript/tests/run.c | 162 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 141 insertions(+), 21 deletions(-) diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index d77c6cb..6a2b72a 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -33,6 +33,8 @@ #define IActiveScriptParse_Release IActiveScriptParse64_Release #define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew #define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText +#define IActiveScriptParseProcedure2_Release IActiveScriptParseProcedure2_64_Release +#define IActiveScriptParseProcedure2_ParseProcedureText IActiveScriptParseProcedure2_64_ParseProcedureText #else @@ -40,6 +42,8 @@ #define IActiveScriptParse_Release IActiveScriptParse32_Release #define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew #define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText +#define IActiveScriptParseProcedure2_Release IActiveScriptParseProcedure2_32_Release +#define IActiveScriptParseProcedure2_ParseProcedureText IActiveScriptParseProcedure2_32_ParseProcedureText #endif @@ -106,6 +110,7 @@ DEFINE_EXPECT(Next); #define DISPID_COLLOBJ_RESET 3000 static const WCHAR testW[] = {'t','e','s','t',0}; +static const WCHAR emptyW[] = {0}; static BOOL strict_dispid_check, is_english; static const char *test_name = "(null)"; @@ -130,6 +135,18 @@ static int strcmp_wa(LPCWSTR strw, const char *stra) return lstrcmpA(buf, stra); } +static const char *debugstr_guid(REFIID riid) +{ + static char buf[50]; + + sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], + riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], + riid->Data4[5], riid->Data4[6], riid->Data4[7]); + + return buf; +} + static const char *vt2a(VARIANT *v) { if(V_VT(v) == (VT_BYREF|VT_VARIANT)) { @@ -186,6 +203,38 @@ static BOOL is_lang_english(void) return PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH; } +static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) +{ + ok(0, "unexpected call\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) +{ + return 2; +} + +static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) +{ + return 1; +} + +static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, + REFIID riid, void **ppv) +{ + ok(0, "unexpected service %s\n", debugstr_guid(guidService)); + return E_NOINTERFACE; +} + +static const IServiceProviderVtbl ServiceProviderVtbl = { + ServiceProvider_QueryInterface, + ServiceProvider_AddRef, + ServiceProvider_Release, + ServiceProvider_QueryService +}; + +static IServiceProvider caller_sp = { &ServiceProviderVtbl }; + static void test_disp(IDispatch *disp) { DISPID id, public_prop_id, public_prop2_id, public_func_id, public_sub_id, defvalget_id; @@ -378,18 +427,6 @@ static void _test_grfdex(unsigned line, DWORD grfdex, DWORD expect) ok_(__FILE__,line)(grfdex == expect, "grfdex = %x, expected %x\n", grfdex, expect); } -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], - riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], - riid->Data4[5], riid->Data4[6], riid->Data4[7]); - - return buf; -} - static IDispatchEx enumDisp; static HRESULT WINAPI EnumVARIANT_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **ppv) @@ -1240,29 +1277,24 @@ static IActiveScript *create_script(void) return script; } -static HRESULT parse_script(DWORD flags, BSTR script_str) +static IActiveScript *create_and_init_script(DWORD flags) { IActiveScriptParse *parser; IActiveScript *engine; - IDispatch *script_disp; - LONG ref; HRESULT hres; engine = create_script(); if(!engine) - return S_OK; + return NULL; hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); - if (FAILED(hres)) - { - IActiveScript_Release(engine); - return hres; - } hres = IActiveScriptParse_InitNew(parser); ok(hres == S_OK, "InitNew failed: %08x\n", hres); + IActiveScriptParse_Release(parser); + hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); @@ -1273,6 +1305,41 @@ static HRESULT parse_script(DWORD flags, BSTR script_str) hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + return engine; +} + +static void close_script(IActiveScript *script) +{ + ULONG ref; + HRESULT hres; + + hres = IActiveScript_Close(script); + ok(hres == S_OK, "Close failed: %08x\n", hres); + + ref = IActiveScript_Release(script); + ok(!ref, "ref=%u\n", ref); +} + +static HRESULT parse_script(DWORD flags, BSTR script_str) +{ + IActiveScriptParse *parser; + IActiveScript *engine; + IDispatch *script_disp; + LONG ref; + HRESULT hres; + + engine = create_and_init_script(flags); + if(!engine) + return S_OK; + + hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + if (FAILED(hres)) + { + IActiveScript_Release(engine); + return hres; + } + hres = IActiveScript_GetScriptDispatch(engine, NULL, &script_disp); ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres); ok(script_disp != NULL, "script_disp == NULL\n"); @@ -1308,6 +1375,58 @@ static void parse_script_a(const char *src) parse_script_af(SCRIPTITEM_GLOBALMEMBERS, src); } +static IDispatchEx *parse_procedure(IActiveScriptParseProcedure2 *parse_proc, const char *src) +{ + IDispatchEx *dispex; + IDispatch *disp; + BSTR str; + HRESULT hres; + + static const WCHAR delimiterW[] = {'\"',0}; + + str = a2bstr(src); + hres = IActiveScriptParseProcedure2_ParseProcedureText(parse_proc, str, NULL, emptyW, NULL, NULL, delimiterW, 0, 0, + SCRIPTPROC_HOSTMANAGESSOURCE|SCRIPTPROC_IMPLICIT_THIS|SCRIPTPROC_IMPLICIT_PARENTS, &disp); + SysFreeString(str); + ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres); + ok(disp != NULL, "disp = NULL\n"); + + hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); + IDispatch_Release(disp); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); + + return dispex; +} + + +static void test_procedures(void) +{ + IActiveScriptParseProcedure2 *parse_proc; + DISPPARAMS dp = {NULL}; + IActiveScript *script; + IDispatchEx *proc; + EXCEPINFO ei = {0}; + VARIANT v; + HRESULT hres; + + script = create_and_init_script(0); + + hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParseProcedure2, (void**)&parse_proc); + ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08x\n", hres); + + proc = parse_procedure(parse_proc, "dim x\nif true then x=false"); + + V_VT(&v) = VT_EMPTY; + hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, &v, &ei, &caller_sp); + ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + + IDispatchEx_Release(proc); + + IActiveScriptParseProcedure2_Release(parse_proc); + + close_script(script); +} + static void test_gc(void) { IActiveScriptParse *parser; @@ -1609,6 +1728,7 @@ static void run_tests(void) run_from_res("lang.vbs"); run_from_res("api.vbs"); + test_procedures(); test_gc(); } From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Jacek Caban : mshtml: Added VBScript as event attribute tests. Message-ID: Module: wine Branch: master Commit: 1cd527924f5814dc7fd1cb89de983b50ad570719 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1cd527924f5814dc7fd1cb89de983b50ad570719 Author: Jacek Caban Date: Thu Sep 6 11:59:23 2012 +0200 mshtml: Added VBScript as event attribute tests. --- dlls/mshtml/tests/vbtest.html | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/tests/vbtest.html b/dlls/mshtml/tests/vbtest.html index 9addc93..7b8cebc 100644 --- a/dlls/mshtml/tests/vbtest.html +++ b/dlls/mshtml/tests/vbtest.html @@ -26,9 +26,6 @@ Sub runTest() End Sub - - + From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Hans Leidekker : wbemprox: Correctly report the number of logical processors. Message-ID: Module: wine Branch: master Commit: b11cfb7b216a20bd9c3adf9640bb5e93fc5f2a5a URL: http://source.winehq.org/git/wine.git/?a=commit;h=b11cfb7b216a20bd9c3adf9640bb5e93fc5f2a5a Author: Hans Leidekker Date: Thu Sep 6 14:03:24 2012 +0200 wbemprox: Correctly report the number of logical processors. --- dlls/wbemprox/builtin.c | 54 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 42 insertions(+), 12 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index e3a5e6d..4c82425 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -23,6 +23,8 @@ #include "config.h" #include +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "wbemcli.h" @@ -259,7 +261,7 @@ static const struct column col_processor[] = { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_maxclockspeedW, CIM_UINT32 }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_numlogicalprocessorsW, CIM_UINT32 }, + { prop_numlogicalprocessorsW, CIM_UINT32, VT_I4 }, { prop_processoridW, CIM_STRING|COL_FLAG_DYNAMIC } }; static const struct column col_service[] = @@ -400,7 +402,7 @@ struct record_processor const WCHAR *manufacturer; UINT32 maxclockspeed; const WCHAR *name; - UINT32 numberoflogicalprocessors; + UINT32 num_logical_processors; const WCHAR *processor_id; }; struct record_service @@ -475,6 +477,32 @@ static UINT get_processor_count(void) return info.NumberOfProcessors; } +static UINT get_logical_processor_count(void) +{ + SYSTEM_LOGICAL_PROCESSOR_INFORMATION *info; + UINT i, j, count = 0; + NTSTATUS status; + ULONG len; + + status = NtQuerySystemInformation( SystemLogicalProcessorInformation, NULL, 0, &len ); + if (status != STATUS_INFO_LENGTH_MISMATCH) return get_processor_count(); + + if (!(info = heap_alloc( len ))) return get_processor_count(); + status = NtQuerySystemInformation( SystemLogicalProcessorInformation, info, len, &len ); + if (status != STATUS_SUCCESS) + { + heap_free( info ); + return get_processor_count(); + } + for (i = 0; i < len / sizeof(*info); i++) + { + if (info[i].Relationship != RelationProcessorCore) continue; + for (j = 0; j < sizeof(ULONG_PTR); j++) if (info[i].ProcessorMask & (1 << j)) count++; + } + heap_free( info ); + return count; +} + static UINT64 get_total_physical_memory(void) { MEMORYSTATUSEX status; @@ -495,8 +523,8 @@ static void fill_compsys( struct table *table ) rec->domainrole = 0; /* standalone workstation */ rec->manufacturer = compsys_manufacturerW; rec->model = compsys_modelW; - rec->num_logical_processors = get_processor_count(); - rec->num_processors = rec->num_logical_processors; + rec->num_logical_processors = get_logical_processor_count(); + rec->num_processors = get_processor_count(); rec->total_physical_memory = get_total_physical_memory(); TRACE("created 1 row\n"); @@ -758,7 +786,7 @@ static void fill_processor( struct table *table ) static const WCHAR fmtW[] = {'C','P','U','%','u',0}; WCHAR device_id[14], processor_id[17], manufacturer[13], name[49] = {0}; struct record_processor *rec; - UINT i, offset = 0, count = get_processor_count(), cpuMhz; + UINT i, offset = 0, num_logical_processors, count = get_processor_count(), cpuMhz; PROCESSOR_POWER_INFORMATION ppi; if (!(table->data = heap_alloc( sizeof(*rec) * count ))) return; @@ -772,17 +800,19 @@ static void fill_processor( struct table *table ) else cpuMhz = 1000000; + num_logical_processors = get_logical_processor_count() / count; + for (i = 0; i < count; i++) { rec = (struct record_processor *)(table->data + offset); - rec->cpu_status = 1; /* CPU Enabled */ + rec->cpu_status = 1; /* CPU Enabled */ sprintfW( device_id, fmtW, i ); - rec->device_id = heap_strdupW( device_id ); - rec->manufacturer = heap_strdupW( manufacturer ); - rec->maxclockspeed = cpuMhz; - rec->name = heap_strdupW( name ); - rec->numberoflogicalprocessors = count; - rec->processor_id = heap_strdupW( processor_id ); + rec->device_id = heap_strdupW( device_id ); + rec->manufacturer = heap_strdupW( manufacturer ); + rec->maxclockspeed = cpuMhz; + rec->name = heap_strdupW( name ); + rec->num_logical_processors = num_logical_processors; + rec->processor_id = heap_strdupW( processor_id ); offset += sizeof(*rec); } From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Hans Leidekker : wbemprox: Add a function to retrieve the maximum processor clock speed. Message-ID: Module: wine Branch: master Commit: e2bd61b45d512229c200d91ce7afbefe790a37c5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e2bd61b45d512229c200d91ce7afbefe790a37c5 Author: Hans Leidekker Date: Thu Sep 6 14:03:38 2012 +0200 wbemprox: Add a function to retrieve the maximum processor clock speed. --- dlls/wbemprox/builtin.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 4c82425..c2271c0 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -780,14 +780,19 @@ static void get_processor_name( WCHAR *name ) regs_to_str( regs, 16, name + 32 ); } } +static UINT get_processor_maxclockspeed( void ) +{ + PROCESSOR_POWER_INFORMATION info; + if (!NtPowerInformation( ProcessorInformation, NULL, 0, &info, sizeof(info) )) return info.MaxMhz; + return 1000000; +} static void fill_processor( struct table *table ) { static const WCHAR fmtW[] = {'C','P','U','%','u',0}; WCHAR device_id[14], processor_id[17], manufacturer[13], name[49] = {0}; struct record_processor *rec; - UINT i, offset = 0, num_logical_processors, count = get_processor_count(), cpuMhz; - PROCESSOR_POWER_INFORMATION ppi; + UINT i, offset = 0, maxclockspeed, num_logical_processors, count = get_processor_count(); if (!(table->data = heap_alloc( sizeof(*rec) * count ))) return; @@ -795,11 +800,7 @@ static void fill_processor( struct table *table ) get_processor_manufacturer( manufacturer ); get_processor_name( name ); - if(!NtPowerInformation(ProcessorInformation, NULL, 0, &ppi, sizeof(ppi))) - cpuMhz = ppi.MaxMhz; - else - cpuMhz = 1000000; - + maxclockspeed = get_processor_maxclockspeed(); num_logical_processors = get_logical_processor_count() / count; for (i = 0; i < count; i++) @@ -809,7 +810,7 @@ static void fill_processor( struct table *table ) sprintfW( device_id, fmtW, i ); rec->device_id = heap_strdupW( device_id ); rec->manufacturer = heap_strdupW( manufacturer ); - rec->maxclockspeed = cpuMhz; + rec->maxclockspeed = maxclockspeed; rec->name = heap_strdupW( name ); rec->num_logical_processors = num_logical_processors; rec->processor_id = heap_strdupW( processor_id ); From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Hans Leidekker : wbemprox: Implement IWbemClassObject::SpawnInstance. Message-ID: Module: wine Branch: master Commit: d25450c80b0986a714480762cc1c3a427d14137f URL: http://source.winehq.org/git/wine.git/?a=commit;h=d25450c80b0986a714480762cc1c3a427d14137f Author: Hans Leidekker Date: Thu Sep 6 14:03:50 2012 +0200 wbemprox: Implement IWbemClassObject::SpawnInstance. --- dlls/wbemprox/class.c | 56 ++++++++++++++++++++++++++++++++++--- dlls/wbemprox/services.c | 2 +- dlls/wbemprox/wbemprox_private.h | 18 +++++++++++- 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index c0a8cd9..cc37b57 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -125,7 +125,7 @@ static HRESULT WINAPI enum_class_object_Next( *puReturned = 0; if (ec->index + uCount > view->count) return WBEM_S_FALSE; - hr = create_class_object( view->table->name, iface, ec->index, apObjects ); + hr = create_class_object( view->table->name, iface, ec->index, NULL, apObjects ); if (hr != S_OK) return hr; ec->index++; @@ -212,6 +212,40 @@ HRESULT EnumWbemClassObject_create( return S_OK; } +static struct record *create_record( const struct column *columns, UINT num_cols ) +{ + UINT i; + struct record *record; + + if (!(record = heap_alloc( sizeof(struct record) ))) return NULL; + if (!(record->fields = heap_alloc( num_cols * sizeof(struct field) ))) + { + heap_free( record ); + return NULL; + } + for (i = 0; i < num_cols; i++) + { + record->fields[i].type = columns[i].type; + record->fields[i].u.ival = 0; + } + record->count = num_cols; + return record; +} + +static void destroy_record( struct record *record ) +{ + UINT i; + + if (!record) return; + for (i = 0; i < record->count; i++) + { + if (record->fields[i].type == CIM_STRING || record->fields[i].type == CIM_DATETIME) + heap_free( record->fields[i].u.sval ); + } + heap_free( record->fields ); + heap_free( record ); +} + struct class_object { IWbemClassObject IWbemClassObject_iface; @@ -221,6 +255,7 @@ struct class_object UINT index; UINT index_method; UINT index_property; + struct record *record; /* uncommitted instance */ }; static inline struct class_object *impl_from_IWbemClassObject( @@ -245,6 +280,7 @@ static ULONG WINAPI class_object_Release( { TRACE("destroying %p\n", co); if (co->iter) IEnumWbemClassObject_Release( co->iter ); + destroy_record( co->record ); heap_free( co->name ); heap_free( co ); } @@ -495,8 +531,17 @@ static HRESULT WINAPI class_object_SpawnInstance( LONG lFlags, IWbemClassObject **ppNewInstance ) { - FIXME("%p, %08x, %p\n", iface, lFlags, ppNewInstance); - return E_NOTIMPL; + struct class_object *co = impl_from_IWbemClassObject( iface ); + struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter ); + struct view *view = ec->query->view; + struct record *record; + + TRACE("%p, %08x, %p\n", iface, lFlags, ppNewInstance); + + if (!(record = create_record( view->table->columns, view->table->num_cols ))) + return E_OUTOFMEMORY; + + return create_class_object( co->name, NULL, 0, record, ppNewInstance ); } static HRESULT WINAPI class_object_CompareTo( @@ -833,8 +878,8 @@ static const IWbemClassObjectVtbl class_object_vtbl = class_object_GetMethodOrigin }; -HRESULT create_class_object( - const WCHAR *name, IEnumWbemClassObject *iter, UINT index, IWbemClassObject **obj ) +HRESULT create_class_object( const WCHAR *name, IEnumWbemClassObject *iter, UINT index, + struct record *record, IWbemClassObject **obj ) { struct class_object *co; @@ -855,6 +900,7 @@ HRESULT create_class_object( co->index = index; co->index_method = 0; co->index_property = 0; + co->record = record; if (iter) IEnumWbemClassObject_AddRef( iter ); *obj = &co->IWbemClassObject_iface; diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c index abd31c5..bf367c7 100644 --- a/dlls/wbemprox/services.c +++ b/dlls/wbemprox/services.c @@ -334,7 +334,7 @@ HRESULT get_object( const WCHAR *object_path, IWbemClassObject **obj ) free_path( path ); return hr; } - hr = create_class_object( path->class, iter, 0, obj ); + hr = create_class_object( path->class, iter, 0, NULL, obj ); IEnumWbemClassObject_Release( iter ); free_path( path ); return hr; diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h index 69b04e7..e1f4d45 100644 --- a/dlls/wbemprox/wbemprox_private.h +++ b/dlls/wbemprox/wbemprox_private.h @@ -66,6 +66,22 @@ struct property const struct property *next; }; +struct field +{ + UINT type; + union + { + LONGLONG ival; + WCHAR *sval; + } u; +}; + +struct record +{ + UINT count; + struct field *fields; +}; + enum operator { OP_EQ = 1, @@ -157,7 +173,7 @@ const WCHAR *get_property_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; HRESULT WbemLocator_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemServices_create(IUnknown *, const WCHAR *, LPVOID *) DECLSPEC_HIDDEN; HRESULT create_class_object(const WCHAR *, IEnumWbemClassObject *, UINT, - IWbemClassObject **) DECLSPEC_HIDDEN; + struct record *, IWbemClassObject **) DECLSPEC_HIDDEN; HRESULT EnumWbemClassObject_create(IUnknown *, struct query *, LPVOID *) DECLSPEC_HIDDEN; static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1); From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Hans Leidekker : wbemprox: Add support for uncommitted instances in IWbemClassObject::Put. Message-ID: Module: wine Branch: master Commit: 0d28920804e714a577a7b3a150066e58dc35bde7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0d28920804e714a577a7b3a150066e58dc35bde7 Author: Hans Leidekker Date: Thu Sep 6 14:04:03 2012 +0200 wbemprox: Add support for uncommitted instances in IWbemClassObject::Put. --- dlls/wbemprox/class.c | 40 ++++++++++++++++++++++++++++++++++++- dlls/wbemprox/query.c | 2 +- dlls/wbemprox/wbemprox_private.h | 1 + 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index cc37b57..1ec1f51 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -335,6 +335,34 @@ static HRESULT WINAPI class_object_Get( return get_propval( view, co->index, wszName, pVal, pType, plFlavor ); } +static HRESULT record_set_value( struct record *record, UINT index, VARIANT *var ) +{ + LONGLONG val; + CIMTYPE type; + HRESULT hr; + + if ((hr = variant_to_longlong( var, &val, &type )) != S_OK) return hr; + if (type != record->fields[index].type) return WBEM_E_TYPE_MISMATCH; + + switch (type) + { + case CIM_STRING: + case CIM_DATETIME: + record->fields[index].u.sval = (WCHAR *)(INT_PTR)val; + return S_OK; + case CIM_SINT16: + case CIM_UINT16: + case CIM_SINT32: + case CIM_UINT32: + record->fields[index].u.ival = val; + return S_OK; + default: + FIXME("unhandled type %u\n", type); + break; + } + return WBEM_E_INVALID_PARAMETER; +} + static HRESULT WINAPI class_object_Put( IWbemClassObject *iface, LPCWSTR wszName, @@ -344,11 +372,19 @@ static HRESULT WINAPI class_object_Put( { struct class_object *co = impl_from_IWbemClassObject( iface ); struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter ); - struct view *view = ec->query->view; TRACE("%p, %s, %08x, %p, %u\n", iface, debugstr_w(wszName), lFlags, pVal, Type); - return put_propval( view, co->index, wszName, pVal, Type ); + if (co->record) + { + struct table *table = get_table( co->name ); + UINT index; + HRESULT hr; + + if ((hr = get_column_index( table, wszName, &index )) != S_OK) return hr; + return record_set_value( co->record, index, pVal ); + } + return put_propval( ec->query->view, co->index, wszName, pVal, Type ); } static HRESULT WINAPI class_object_Delete( diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index d2b0e76..3525be9 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -648,7 +648,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR return S_OK; } -static HRESULT variant_to_longlong( VARIANT *var, LONGLONG *val, CIMTYPE *type ) +HRESULT variant_to_longlong( VARIANT *var, LONGLONG *val, CIMTYPE *type ) { if (!var) { diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h index e1f4d45..2467a76 100644 --- a/dlls/wbemprox/wbemprox_private.h +++ b/dlls/wbemprox/wbemprox_private.h @@ -165,6 +165,7 @@ HRESULT set_value( const struct table *, UINT, UINT, LONGLONG, CIMTYPE ) DECLSPE HRESULT get_propval( const struct view *, UINT, const WCHAR *, VARIANT *, CIMTYPE *, LONG * ) DECLSPEC_HIDDEN; HRESULT put_propval( const struct view *, UINT, const WCHAR *, VARIANT *, CIMTYPE ) DECLSPEC_HIDDEN; +HRESULT variant_to_longlong( VARIANT *, LONGLONG *, CIMTYPE * ) DECLSPEC_HIDDEN; HRESULT get_properties( const struct view *, SAFEARRAY ** ) DECLSPEC_HIDDEN; HRESULT get_object( const WCHAR *, IWbemClassObject ** ) DECLSPEC_HIDDEN; const WCHAR *get_method_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Hans Leidekker : wbemprox: Support IClientSecurity on class objects. Message-ID: Module: wine Branch: master Commit: 61a8a247cfc56daddd5fa868d5cabdd126053d38 URL: http://source.winehq.org/git/wine.git/?a=commit;h=61a8a247cfc56daddd5fa868d5cabdd126053d38 Author: Hans Leidekker Date: Thu Sep 6 14:04:14 2012 +0200 wbemprox: Support IClientSecurity on class objects. --- dlls/wbemprox/class.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index 1ec1f51..5a70e9d 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -301,6 +301,11 @@ static HRESULT WINAPI class_object_QueryInterface( { *ppvObject = co; } + else if (IsEqualGUID( riid, &IID_IClientSecurity )) + { + *ppvObject = &client_security; + return S_OK; + } else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Marcus Meissner : msi: Move free after last usage (Coverity). Message-ID: Module: wine Branch: master Commit: b9550ad35239db39e2d4cf3411a381319cf652c5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b9550ad35239db39e2d4cf3411a381319cf652c5 Author: Marcus Meissner Date: Thu Sep 6 15:19:48 2012 +0200 msi: Move free after last usage (Coverity). --- dlls/msi/table.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index dd25fbb..93b0268 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -2328,12 +2328,15 @@ static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string r = IStorage_OpenStream( stg, encname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm ); - msi_free( encname ); if ( r != ERROR_SUCCESS ) + { + msi_free( encname ); return NULL; + } MSI_RecordSetStream( rec, i+1, stm ); TRACE(" field %d [%s]\n", i+1, debugstr_w(encname)); + msi_free( encname ); } else if( columns[i].type & MSITYPE_STRING ) { From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Jason Edmeades : cmd: A successful set should reset the errorlevel. Message-ID: Module: wine Branch: master Commit: f9b4c78a8981df2b8aa81b0a2d32bc8e828c9ca3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f9b4c78a8981df2b8aa81b0a2d32bc8e828c9ca3 Author: Jason Edmeades Date: Wed Sep 5 23:41:48 2012 +0100 cmd: A successful set should reset the errorlevel. --- programs/cmd/builtins.c | 1 + programs/cmd/tests/test_builtins.cmd.exp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index b2f9aeb..a9e7473 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2366,6 +2366,7 @@ void WCMD_setshow_env (WCHAR *s) { if ((!status) & (gle == ERROR_ENVVAR_NOT_FOUND)) { errorlevel = 1; } else if ((!status)) WCMD_print_error(); + else errorlevel = 0; } } diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index fe4c30c..6a19d2c 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -201,13 +201,13 @@ baz at space@ @todo_wine at 0 ------------ Testing 'set' ------------ 1 - at todo_wine@0 +0 FOOBAR not defined @todo_wine@ baz FOOBAR = baz - at todo_wine@0 +0 @todo_wine@ baz2 - at todo_wine@0 +0 bar @todo_wine at FOOBAR= bar @todo_wine at FOOBAR = baz2 From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Jason Edmeades : cmd: Space does not delimit environment variable names. Message-ID: Module: wine Branch: master Commit: ebd18109189b78bb548637427b564905faa31454 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ebd18109189b78bb548637427b564905faa31454 Author: Jason Edmeades Date: Thu Sep 6 00:09:23 2012 +0100 cmd: Space does not delimit environment variable names. --- programs/cmd/builtins.c | 2 ++ programs/cmd/tests/test_builtins.cmd.exp | 4 ++-- programs/cmd/wcmdmain.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index a9e7473..94c7171 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2361,6 +2361,8 @@ void WCMD_setshow_env (WCHAR *s) { *p++ = '\0'; if (strlenW(p) == 0) p = NULL; + WINE_TRACE("set: Setting var '%s' to '%s'\n", wine_dbgstr_w(s), + wine_dbgstr_w(p)); status = SetEnvironmentVariableW(s, p); gle = GetLastError(); if ((!status) & (gle == ERROR_ENVVAR_NOT_FOUND)) { diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 6a19d2c..d0a4e1f 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -203,10 +203,10 @@ baz at space@ 1 0 FOOBAR not defined - at todo_wine@ baz + baz FOOBAR = baz 0 - at todo_wine@ baz2 + baz2 0 bar @todo_wine at FOOBAR= bar diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 93a2bb8..f762b70 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -557,7 +557,7 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start, static const WCHAR Time[] = {'T','I','M','E','\0'}; static const WCHAR Cd[] = {'C','D','\0'}; static const WCHAR Random[] = {'R','A','N','D','O','M','\0'}; - static const WCHAR Delims[] = {'%',' ',':','\0'}; + static const WCHAR Delims[] = {'%',':','\0'}; WINE_TRACE("Expanding: %s (%s,%s)\n", wine_dbgstr_w(start), wine_dbgstr_w(forVal), wine_dbgstr_w(forVar)); From julliard at winehq.org Thu Sep 6 13:37:23 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Thu, 06 Sep 2012 13:37:23 -0500 Subject: Akihiro Sagawa : user32: Add support for legacy access keys. Message-ID: Module: wine Branch: master Commit: 70937bd8ddd7a4f40b844abf0dcb36c937d7ab45 URL: http://source.winehq.org/git/wine.git/?a=commit;h=70937bd8ddd7a4f40b844abf0dcb36c937d7ab45 Author: Akihiro Sagawa Date: Wed Sep 5 20:31:17 2012 +0900 user32: Add support for legacy access keys. --- dlls/user32/menu.c | 7 +++++-- dlls/user32/text.c | 27 ++++++++++++++++++++------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index f1beb94..b325372 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -773,15 +773,18 @@ static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu, if( !forceMenuChar ) { UINT i; + BOOL cjk = GetSystemMetrics( SM_DBCSENABLED ); for (i = 0; i < menu->nItems; i++, item++) { if( item->text) { - WCHAR *p = item->text - 2; + const WCHAR *p = item->text - 2; do { - p = strchrW (p + 2, '&'); + const WCHAR *q = p + 2; + p = strchrW (q, '&'); + if (!p && cjk) p = strchrW (q, '\036'); /* Japanese Win16 */ } while (p != NULL && p [1] == '&'); if (p && (toupperW(p[1]) == toupperW(key))) return i; diff --git a/dlls/user32/text.c b/dlls/user32/text.c index d7188c8..8539bdf 100644 --- a/dlls/user32/text.c +++ b/dlls/user32/text.c @@ -87,6 +87,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(text); #define CR 13 #define SPACE 32 #define PREFIX 38 +#define ALPHA_PREFIX 30 /* Win16: Alphabet prefix */ +#define KANA_PREFIX 31 /* Win16: Katakana prefix */ #define FORWARD_SLASH '/' #define BACK_SLASH '\\' @@ -472,8 +474,9 @@ static void TEXT_SkipChars (int *new_count, const WCHAR **new_str, max -= n; while (n--) { - if (*start_str++ == PREFIX && max--) + if ((*start_str == PREFIX || *start_str == ALPHA_PREFIX) && max--) start_str++; + start_str++; } start_count -= (start_str - str_on_entry); } @@ -507,10 +510,10 @@ static int TEXT_Reprefix (const WCHAR *str, unsigned int ns, const ellipsis_data *pe) { int result = -1; - unsigned int i = 0; + unsigned int i; unsigned int n = pe->before + pe->under + pe->after; assert (n <= ns); - while (i < n) + for (i = 0; i < n; i++, str++) { if (i == pe->before) { @@ -523,16 +526,15 @@ static int TEXT_Reprefix (const WCHAR *str, unsigned int ns, } if (!ns) break; ns--; - if (*str++ == PREFIX) + if (*str == PREFIX || *str == ALPHA_PREFIX) { + str++; if (!ns) break; if (*str != PREFIX) result = (i < pe->before || pe->under == 0) ? i : i - pe->under + pe->len; /* pe->len may be non-zero while pe_under is zero */ - str++; ns--; } - i++; } return result; } @@ -631,8 +633,13 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, (str[i] != TAB || !(format & DT_EXPANDTABS)) && ((str[i] != CR && str[i] != LF) || (format & DT_SINGLELINE))) { - if (str[i] == PREFIX && !(format & DT_NOPREFIX) && *count > 1) + if ((format & DT_NOPREFIX) || *count <= 1) { + (*count)--; if (j < maxl) dest[j++] = str[i++]; else i++; + continue; + } + + if (str[i] == PREFIX || str[i] == ALPHA_PREFIX) { (*count)--, i++; /* Throw away the prefix itself */ if (str[i] == PREFIX) { @@ -648,6 +655,12 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, * one. */ } + else if (str[i] == KANA_PREFIX) + { + /* Throw away katakana access keys */ + (*count)--, i++; /* skip the prefix */ + (*count)--, i++; /* skip the letter */ + } else { (*count)--; if (j < maxl) dest[j++] = str[i++]; else i++; From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Jacek Caban : mshtml: Avoid duplicated string release in navigate_anchor. Message-ID: Module: wine Branch: master Commit: 34d671dc2551bb3f66a1173581acf42306bccb9f URL: http://source.winehq.org/git/wine.git/?a=commit;h=34d671dc2551bb3f66a1173581acf42306bccb9f Author: Jacek Caban Date: Fri Sep 7 10:28:58 2012 +0200 mshtml: Avoid duplicated string release in navigate_anchor. --- dlls/mshtml/htmlanchor.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index a62a3a9..2243954 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -86,6 +86,8 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This) if(NS_SUCCEEDED(nsres)) { const PRUnichar *target; + TRACE("target %s\n", debugstr_w(target)); + nsAString_GetData(&target_str, &target); if(*target && strcmpiW(target, _selfW)) { if(!strcmpiW(target, _topW)) { @@ -106,8 +108,6 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This) nsAString_Finish(&target_str); return hres; } - - nsAString_Finish(&target_str); } } } From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Piotr Caban : msvcp60: Fixed RTTI structure on 64-bit systems. Message-ID: Module: wine Branch: master Commit: 0ebd8990dfc9988f933adc5c6ccc43c02f5e8725 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0ebd8990dfc9988f933adc5c6ccc43c02f5e8725 Author: Piotr Caban Date: Fri Sep 7 11:00:37 2012 +0200 msvcp60: Fixed RTTI structure on 64-bit systems. --- dlls/msvcp60/cxx.h | 113 ++++++++++++++++++++++++++++++++++++++++++++- dlls/msvcp60/exception.c | 14 ++++++ dlls/msvcp60/main.c | 1 + dlls/msvcp60/msvcp.h | 2 + 4 files changed, 127 insertions(+), 3 deletions(-) diff --git a/dlls/msvcp60/cxx.h b/dlls/msvcp60/cxx.h index f709d12..956675c 100644 --- a/dlls/msvcp60/cxx.h +++ b/dlls/msvcp60/cxx.h @@ -64,7 +64,9 @@ #endif /* _WIN64 */ -#define DEFINE_RTTI_DATA(name, off, base_classes, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ +#ifndef __x86_64__ + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ static const type_info name ## _type_info = { \ &MSVCP_type_info_vtable, \ NULL, \ @@ -73,7 +75,7 @@ \ static const rtti_base_descriptor name ## _rtti_base_descriptor = { \ &name ##_type_info, \ - base_classes, \ + base_classes_no, \ { 0, -1, 0}, \ 64 \ }; \ @@ -96,7 +98,7 @@ static const rtti_base_array name ## _rtti_base_array = { \ static const rtti_object_hierarchy name ## _hierarchy = { \ 0, \ 0, \ - base_classes+1, \ + base_classes_no+1, \ &name ## _rtti_base_array \ }; \ \ @@ -108,6 +110,74 @@ const rtti_object_locator name ## _rtti = { \ &name ## _hierarchy \ } +#else + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + static const type_info name ## _type_info = { \ + &MSVCP_type_info_vtable, \ + NULL, \ + mangled_name \ + }; \ +\ +static rtti_base_descriptor name ## _rtti_base_descriptor = { \ + 0xdeadbeef, \ + base_classes_no, \ + { 0, -1, 0}, \ + 64 \ +}; \ +\ +static rtti_base_array name ## _rtti_base_array = { \ + { \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + } \ +}; \ +\ +static rtti_object_hierarchy name ## _hierarchy = { \ + 0, \ + 0, \ + base_classes_no+1, \ + 0xdeadbeef \ +}; \ +\ +rtti_object_locator name ## _rtti = { \ + 1, \ + off, \ + 0, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef \ +};\ +\ +static void init_ ## name ## _rtti(char *base) \ +{ \ + name ## _rtti_base_descriptor.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti_base_array.bases[0] = (char*)&name ## _rtti_base_descriptor - base; \ + name ## _rtti_base_array.bases[1] = (char*)cl1 - base; \ + name ## _rtti_base_array.bases[2] = (char*)cl2 - base; \ + name ## _rtti_base_array.bases[3] = (char*)cl3 - base; \ + name ## _rtti_base_array.bases[4] = (char*)cl4 - base; \ + name ## _rtti_base_array.bases[5] = (char*)cl5 - base; \ + name ## _rtti_base_array.bases[6] = (char*)cl6 - base; \ + name ## _rtti_base_array.bases[7] = (char*)cl7 - base; \ + name ## _rtti_base_array.bases[8] = (char*)cl8 - base; \ + name ## _rtti_base_array.bases[9] = (char*)cl9 - base; \ + name ## _hierarchy.base_classes = (char*)&name ## _rtti_base_array - base; \ + name ## _rtti.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti.type_hierarchy = (char*)&name ## _hierarchy - base; \ + name ## _rtti.object_locator = (char*)&name ## _rtti - base; \ +} + +#endif + #define DEFINE_RTTI_DATA0(name, off, mangled_name) \ DEFINE_RTTI_DATA(name, off, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) #define DEFINE_RTTI_DATA1(name, off, cl1, mangled_name) \ @@ -191,6 +261,8 @@ typedef struct int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */ } this_ptr_offsets; +#ifndef __x86_64__ + typedef struct _rtti_base_descriptor { const type_info *type_descriptor; @@ -220,3 +292,38 @@ typedef struct _rtti_object_locator const type_info *type_descriptor; const rtti_object_hierarchy *type_hierarchy; } rtti_object_locator; + +#else + +typedef struct +{ + unsigned int type_descriptor; + int num_base_classes; + this_ptr_offsets offsets; /* offsets for computing the this pointer */ + unsigned int attributes; +} rtti_base_descriptor; + +typedef struct +{ + unsigned int bases[10]; /* First element is the class itself */ +} rtti_base_array; + +typedef struct +{ + unsigned int signature; + unsigned int attributes; + int array_len; /* Size of the array pointed to by 'base_classes' */ + unsigned int base_classes; +} rtti_object_hierarchy; + +typedef struct +{ + unsigned int signature; + int base_class_offset; + unsigned int flags; + unsigned int type_descriptor; + unsigned int type_hierarchy; + unsigned int object_locator; +} rtti_object_locator; + +#endif diff --git a/dlls/msvcp60/exception.c b/dlls/msvcp60/exception.c index 6d72e47..dde066c 100644 --- a/dlls/msvcp60/exception.c +++ b/dlls/msvcp60/exception.c @@ -784,3 +784,17 @@ void throw_exception(exception_type et, const char *str) ERR("exception type not handled: %d\n", et); } } + +void init_exception(void *base) +{ +#ifdef __x86_64__ + init_type_info_rtti(base); + init_exception_rtti(base); + init_bad_alloc_rtti(base); + init_logic_error_rtti(base); + init_length_error_rtti(base); + init_out_of_range_rtti(base); + init_invalid_argument_rtti(base); + init_runtime_error_rtti(base); +#endif +} diff --git a/dlls/msvcp60/main.c b/dlls/msvcp60/main.c index a979528..dbaf5ee 100644 --- a/dlls/msvcp60/main.c +++ b/dlls/msvcp60/main.c @@ -90,6 +90,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) case DLL_PROCESS_ATTACH: init_cxx_funcs(); init_lockit(); + init_exception(hinstDLL); break; case DLL_PROCESS_DETACH: free_lockit(); diff --git a/dlls/msvcp60/msvcp.h b/dlls/msvcp60/msvcp.h index 7e1c47a..b1035b2 100644 --- a/dlls/msvcp60/msvcp.h +++ b/dlls/msvcp60/msvcp.h @@ -94,3 +94,5 @@ mutex* __thiscall mutex_ctor(mutex*); void __thiscall mutex_dtor(mutex*); void __thiscall mutex_lock(mutex*); void __thiscall mutex_unlock(mutex*); + +void init_exception(void*); From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Piotr Caban : msvcp100: Fixed RTTI structure on 64-bit systems. Message-ID: Module: wine Branch: master Commit: c41fd08ddca012b3eb5b841bf8746ea80dec5d1d URL: http://source.winehq.org/git/wine.git/?a=commit;h=c41fd08ddca012b3eb5b841bf8746ea80dec5d1d Author: Piotr Caban Date: Fri Sep 7 11:00:56 2012 +0200 msvcp100: Fixed RTTI structure on 64-bit systems. --- dlls/msvcp100/cxx.h | 113 +++++++++++++++++++++++++++++++++++++++++++- dlls/msvcp100/exception.c | 15 ++++++ dlls/msvcp100/ios.c | 49 +++++++++++++++++++- dlls/msvcp100/locale.c | 27 +++++++++++ dlls/msvcp100/msvcp.h | 4 +- dlls/msvcp100/msvcp100.c | 4 +- 6 files changed, 205 insertions(+), 7 deletions(-) diff --git a/dlls/msvcp100/cxx.h b/dlls/msvcp100/cxx.h index f709d12..956675c 100644 --- a/dlls/msvcp100/cxx.h +++ b/dlls/msvcp100/cxx.h @@ -64,7 +64,9 @@ #endif /* _WIN64 */ -#define DEFINE_RTTI_DATA(name, off, base_classes, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ +#ifndef __x86_64__ + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ static const type_info name ## _type_info = { \ &MSVCP_type_info_vtable, \ NULL, \ @@ -73,7 +75,7 @@ \ static const rtti_base_descriptor name ## _rtti_base_descriptor = { \ &name ##_type_info, \ - base_classes, \ + base_classes_no, \ { 0, -1, 0}, \ 64 \ }; \ @@ -96,7 +98,7 @@ static const rtti_base_array name ## _rtti_base_array = { \ static const rtti_object_hierarchy name ## _hierarchy = { \ 0, \ 0, \ - base_classes+1, \ + base_classes_no+1, \ &name ## _rtti_base_array \ }; \ \ @@ -108,6 +110,74 @@ const rtti_object_locator name ## _rtti = { \ &name ## _hierarchy \ } +#else + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + static const type_info name ## _type_info = { \ + &MSVCP_type_info_vtable, \ + NULL, \ + mangled_name \ + }; \ +\ +static rtti_base_descriptor name ## _rtti_base_descriptor = { \ + 0xdeadbeef, \ + base_classes_no, \ + { 0, -1, 0}, \ + 64 \ +}; \ +\ +static rtti_base_array name ## _rtti_base_array = { \ + { \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + } \ +}; \ +\ +static rtti_object_hierarchy name ## _hierarchy = { \ + 0, \ + 0, \ + base_classes_no+1, \ + 0xdeadbeef \ +}; \ +\ +rtti_object_locator name ## _rtti = { \ + 1, \ + off, \ + 0, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef \ +};\ +\ +static void init_ ## name ## _rtti(char *base) \ +{ \ + name ## _rtti_base_descriptor.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti_base_array.bases[0] = (char*)&name ## _rtti_base_descriptor - base; \ + name ## _rtti_base_array.bases[1] = (char*)cl1 - base; \ + name ## _rtti_base_array.bases[2] = (char*)cl2 - base; \ + name ## _rtti_base_array.bases[3] = (char*)cl3 - base; \ + name ## _rtti_base_array.bases[4] = (char*)cl4 - base; \ + name ## _rtti_base_array.bases[5] = (char*)cl5 - base; \ + name ## _rtti_base_array.bases[6] = (char*)cl6 - base; \ + name ## _rtti_base_array.bases[7] = (char*)cl7 - base; \ + name ## _rtti_base_array.bases[8] = (char*)cl8 - base; \ + name ## _rtti_base_array.bases[9] = (char*)cl9 - base; \ + name ## _hierarchy.base_classes = (char*)&name ## _rtti_base_array - base; \ + name ## _rtti.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti.type_hierarchy = (char*)&name ## _hierarchy - base; \ + name ## _rtti.object_locator = (char*)&name ## _rtti - base; \ +} + +#endif + #define DEFINE_RTTI_DATA0(name, off, mangled_name) \ DEFINE_RTTI_DATA(name, off, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) #define DEFINE_RTTI_DATA1(name, off, cl1, mangled_name) \ @@ -191,6 +261,8 @@ typedef struct int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */ } this_ptr_offsets; +#ifndef __x86_64__ + typedef struct _rtti_base_descriptor { const type_info *type_descriptor; @@ -220,3 +292,38 @@ typedef struct _rtti_object_locator const type_info *type_descriptor; const rtti_object_hierarchy *type_hierarchy; } rtti_object_locator; + +#else + +typedef struct +{ + unsigned int type_descriptor; + int num_base_classes; + this_ptr_offsets offsets; /* offsets for computing the this pointer */ + unsigned int attributes; +} rtti_base_descriptor; + +typedef struct +{ + unsigned int bases[10]; /* First element is the class itself */ +} rtti_base_array; + +typedef struct +{ + unsigned int signature; + unsigned int attributes; + int array_len; /* Size of the array pointed to by 'base_classes' */ + unsigned int base_classes; +} rtti_object_hierarchy; + +typedef struct +{ + unsigned int signature; + int base_class_offset; + unsigned int flags; + unsigned int type_descriptor; + unsigned int type_hierarchy; + unsigned int object_locator; +} rtti_object_locator; + +#endif diff --git a/dlls/msvcp100/exception.c b/dlls/msvcp100/exception.c index a81fb54..55b7cd2 100644 --- a/dlls/msvcp100/exception.c +++ b/dlls/msvcp100/exception.c @@ -750,3 +750,18 @@ void throw_exception(exception_type et, const char *str) } } } + +void init_exception(void *base) +{ +#ifdef __x86_64__ + init_type_info_rtti(base); + init_exception_rtti(base); + init_bad_alloc_rtti(base); + init_logic_error_rtti(base); + init_length_error_rtti(base); + init_out_of_range_rtti(base); + init_invalid_argument_rtti(base); + init_runtime_error_rtti(base); + init_failure_rtti(base); +#endif +} diff --git a/dlls/msvcp100/ios.c b/dlls/msvcp100/ios.c index 5889d57..b41bc19 100644 --- a/dlls/msvcp100/ios.c +++ b/dlls/msvcp100/ios.c @@ -12343,8 +12343,53 @@ struct { /* ?_Ptr_wclog at std@@3PEAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at EA */ basic_ostream_wchar *_Ptr_wclog = &wclog.obj; -void init_io(void) -{ +void init_io(void *base) +{ +#ifdef __x86_64__ + init_iosb_rtti(base); + init_ios_base_rtti(base); + init_basic_ios_char_rtti(base); + init_basic_ios_wchar_rtti(base); + init_basic_ios_short_rtti(base); + init_basic_streambuf_char_rtti(base); + init_basic_streambuf_wchar_rtti(base); + init_basic_streambuf_short_rtti(base); + init_basic_filebuf_char_rtti(base); + init_basic_filebuf_wchar_rtti(base); + init_basic_filebuf_short_rtti(base); + init_basic_stringbuf_char_rtti(base); + init_basic_stringbuf_wchar_rtti(base); + init_basic_stringbuf_short_rtti(base); + init_basic_ostream_char_rtti(base); + init_basic_ostream_wchar_rtti(base); + init_basic_ostream_short_rtti(base); + init_basic_istream_char_rtti(base); + init_basic_istream_wchar_rtti(base); + init_basic_istream_short_rtti(base); + init_basic_iostream_char_rtti(base); + init_basic_iostream_wchar_rtti(base); + init_basic_iostream_short_rtti(base); + init_basic_ofstream_char_rtti(base); + init_basic_ofstream_wchar_rtti(base); + init_basic_ofstream_short_rtti(base); + init_basic_ifstream_char_rtti(base); + init_basic_ifstream_wchar_rtti(base); + init_basic_ifstream_short_rtti(base); + init_basic_fstream_char_rtti(base); + init_basic_fstream_wchar_rtti(base); + init_basic_fstream_short_rtti(base); + init_basic_ostringstream_char_rtti(base); + init_basic_ostringstream_wchar_rtti(base); + init_basic_ostringstream_short_rtti(base); + init_basic_istringstream_char_rtti(base); + init_basic_istringstream_wchar_rtti(base); + init_basic_istringstream_short_rtti(base); + init_basic_stringstream_char_rtti(base); + init_basic_stringstream_wchar_rtti(base); + init_basic_stringstream_short_rtti(base); + init_strstreambuf_rtti(base); +#endif + basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin); basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE); diff --git a/dlls/msvcp100/locale.c b/dlls/msvcp100/locale.c index 55b3134..e1abed8 100644 --- a/dlls/msvcp100/locale.c +++ b/dlls/msvcp100/locale.c @@ -8582,6 +8582,33 @@ void __asm_dummy_vtables(void) { } #endif +void init_locale(void *base) +{ +#ifdef __x86_64__ + init_locale_facet_rtti(base); + init_collate_char_rtti(base); + init_collate_wchar_rtti(base); + init_collate_short_rtti(base); + init_ctype_base_rtti(base); + init_ctype_char_rtti(base); + init_ctype_wchar_rtti(base); + init_ctype_short_rtti(base); + init_codecvt_base_rtti(base); + init_codecvt_char_rtti(base); + init_codecvt_wchar_rtti(base); + init_codecvt_short_rtti(base); + init_numpunct_char_rtti(base); + init_numpunct_wchar_rtti(base); + init_numpunct_short_rtti(base); + init_num_get_char_rtti(base); + init_num_get_wchar_rtti(base); + init_num_get_short_rtti(base); + init_num_put_char_rtti(base); + init_num_put_wchar_rtti(base); + init_num_put_short_rtti(base); +#endif +} + void free_locale(void) { facets_elem *iter, *safe; diff --git a/dlls/msvcp100/msvcp.h b/dlls/msvcp100/msvcp.h index f43982f..733b653 100644 --- a/dlls/msvcp100/msvcp.h +++ b/dlls/msvcp100/msvcp.h @@ -464,5 +464,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, o ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool); -void init_io(void); +void init_exception(void*); +void init_locale(void*); +void init_io(void*); void free_io(void); diff --git a/dlls/msvcp100/msvcp100.c b/dlls/msvcp100/msvcp100.c index 60c2c8d..4238a24 100644 --- a/dlls/msvcp100/msvcp100.c +++ b/dlls/msvcp100/msvcp100.c @@ -113,7 +113,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) case DLL_PROCESS_ATTACH: init_cxx_funcs(); init_lockit(); - init_io(); + init_exception(hinstDLL); + init_locale(hinstDLL); + init_io(hinstDLL); break; case DLL_PROCESS_DETACH: free_io(); From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Piotr Caban : msvcrt: Fixed RTTI structure on 64-bit systems. Message-ID: Module: wine Branch: master Commit: 8060752c09fd8794986f9fe3114513d78a36f903 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8060752c09fd8794986f9fe3114513d78a36f903 Author: Piotr Caban Date: Fri Sep 7 11:01:17 2012 +0200 msvcrt: Fixed RTTI structure on 64-bit systems. --- dlls/msvcrt/cpp.c | 128 +++++++++++++++++--------------------------------- dlls/msvcrt/cxx.h | 114 +++++++++++++++++++++++++++++++++++++++++++-- dlls/msvcrt/main.c | 1 + dlls/msvcrt/msvcrt.h | 1 + 4 files changed, 156 insertions(+), 88 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=8060752c09fd8794986f9fe3114513d78a36f903 From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Piotr Caban : msvcp90: Pass RTTI base pointer from DllMain. Message-ID: Module: wine Branch: master Commit: d161abb9b37111088b8ab5d342f814af221e5934 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d161abb9b37111088b8ab5d342f814af221e5934 Author: Piotr Caban Date: Fri Sep 7 11:01:35 2012 +0200 msvcp90: Pass RTTI base pointer from DllMain. --- dlls/msvcp90/exception.c | 3 +-- dlls/msvcp90/ios.c | 3 +-- dlls/msvcp90/locale.c | 3 +-- dlls/msvcp90/msvcp90.h | 6 +++--- dlls/msvcp90/msvcp90_main.c | 6 +++--- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index 7202a25..6aa3c0d 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -751,10 +751,9 @@ void throw_exception(exception_type et, const char *str) } } -void init_exception(void) +void init_exception(void *base) { #ifdef __x86_64__ - void *base = GetModuleHandleA("msvcp90.dll"); init_type_info_rtti(base); init_exception_rtti(base); init_bad_alloc_rtti(base); diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index e5d7233..164efcd 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -12921,10 +12921,9 @@ struct { /* ?_Ptr_wclog at std@@3PEAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at EA */ basic_ostream_wchar *_Ptr_wclog = &wclog.obj; -void init_io(void) +void init_io(void *base) { #ifdef __x86_64__ - void *base = GetModuleHandleA("msvcp90.dll"); init_iosb_rtti(base); init_ios_base_rtti(base); init_basic_ios_char_rtti(base); diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index f5a4534..ddf1424 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -8739,10 +8739,9 @@ void __asm_dummy_vtables(void) { } #endif -void init_locale(void) +void init_locale(void *base) { #ifdef __x86_64__ - void *base = GetModuleHandleA("msvcp90.dll"); init_locale_facet_rtti(base); init_collate_char_rtti(base); init_collate_wchar_rtti(base); diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 84e39c5..1108591 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -463,7 +463,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, o ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool); -void init_exception(void); -void init_locale(void); -void init_io(void); +void init_exception(void*); +void init_locale(void*); +void init_io(void*); void free_io(void); diff --git a/dlls/msvcp90/msvcp90_main.c b/dlls/msvcp90/msvcp90_main.c index 8d97c9d..31a2d82 100644 --- a/dlls/msvcp90/msvcp90_main.c +++ b/dlls/msvcp90/msvcp90_main.c @@ -90,9 +90,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) case DLL_PROCESS_ATTACH: init_cxx_funcs(); init_lockit(); - init_exception(); - init_locale(); - init_io(); + init_exception(hinstDLL); + init_locale(hinstDLL); + init_io(hinstDLL); break; case DLL_PROCESS_DETACH: free_io(); From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Piotr Caban : msvcp90: Added std::flush(basic_ostream) implementation. Message-ID: Module: wine Branch: master Commit: f2a26313e1fe24bfac66349f3832c2ef5854d16f URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2a26313e1fe24bfac66349f3832c2ef5854d16f Author: Piotr Caban Date: Fri Sep 7 11:01:55 2012 +0200 msvcp90: Added std::flush(basic_ostream) implementation. --- dlls/msvcp90/ios.c | 16 ++++++++++++++++ dlls/msvcp90/msvcp90.spec | 12 ++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 164efcd..7cf646b 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -5501,6 +5501,13 @@ basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this return this; } +/* ?flush at std@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@1 at AAV21@@Z */ +/* ?flush at std@@YAAEAV?$basic_ostream at DU?$char_traits at D@std@@@1 at AEAV21@@Z */ +basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream) +{ + return basic_ostream_char_flush(ostream); +} + /* ?_Osfx@?$basic_ostream at DU?$char_traits at D@std@@@std@@QAEXXZ */ /* ?_Osfx@?$basic_ostream at DU?$char_traits at D@std@@@std@@QEAAXXZ */ DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4) @@ -6291,6 +6298,15 @@ basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *t return this; } +/* ?flush at std@@YAAAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at AAV21@@Z */ +/* ?flush at std@@YAAEAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at AEAV21@@Z */ +/* ?flush at std@@YAAAV?$basic_ostream at GU?$char_traits at G@std@@@1 at AAV21@@Z */ +/* ?flush at std@@YAAEAV?$basic_ostream at GU?$char_traits at G@std@@@1 at AEAV21@@Z */ +basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream) +{ + return basic_ostream_wchar_flush(ostream); +} + /* ?_Osfx@?$basic_ostream at _WU?$char_traits at _W@std@@@std@@QAEXXZ */ /* ?_Osfx@?$basic_ostream at _WU?$char_traits at _W@std@@@std@@QEAAXXZ */ /* ?_Osfx@?$basic_ostream at GU?$char_traits at G@std@@@std@@QAEXXZ */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 680830f..a14225a 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -3953,12 +3953,12 @@ @ cdecl -arch=win64 ?flush@?$basic_ostream at GU?$char_traits at G@std@@@std@@QEAAAEAV12 at XZ(ptr) basic_ostream_wchar_flush @ thiscall -arch=win32 ?flush@?$basic_ostream at _WU?$char_traits at _W@std@@@std@@QAEAAV12 at XZ(ptr) basic_ostream_wchar_flush @ cdecl -arch=win64 ?flush@?$basic_ostream at _WU?$char_traits at _W@std@@@std@@QEAAAEAV12 at XZ(ptr) basic_ostream_wchar_flush -@ stub -arch=win32 ?flush at std@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@1 at AAV21@@Z -@ stub -arch=win64 ?flush at std@@YAAEAV?$basic_ostream at DU?$char_traits at D@std@@@1 at AEAV21@@Z -@ stub -arch=win32 ?flush at std@@YAAAV?$basic_ostream at GU?$char_traits at G@std@@@1 at AAV21@@Z -@ stub -arch=win64 ?flush at std@@YAAEAV?$basic_ostream at GU?$char_traits at G@std@@@1 at AEAV21@@Z -@ stub -arch=win32 ?flush at std@@YAAAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at AAV21@@Z -@ stub -arch=win64 ?flush at std@@YAAEAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at AEAV21@@Z +@ cdecl -arch=win32 ?flush at std@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@1 at AAV21@@Z(ptr) flush_ostream_char +@ cdecl -arch=win64 ?flush at std@@YAAEAV?$basic_ostream at DU?$char_traits at D@std@@@1 at AEAV21@@Z(ptr) flush_ostream_char +@ cdecl -arch=win32 ?flush at std@@YAAAV?$basic_ostream at GU?$char_traits at G@std@@@1 at AAV21@@Z(ptr) flush_ostream_wchar +@ cdecl -arch=win64 ?flush at std@@YAAEAV?$basic_ostream at GU?$char_traits at G@std@@@1 at AEAV21@@Z(ptr) flush_ostream_wchar +@ cdecl -arch=win32 ?flush at std@@YAAAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at AAV21@@Z(ptr) flush_ostream_wchar +@ cdecl -arch=win64 ?flush at std@@YAAEAV?$basic_ostream at _WU?$char_traits at _W@std@@@1 at AEAV21@@Z(ptr) flush_ostream_wchar @ stub -arch=win32 ?frac_digits@?$_Mpunct at D@std@@QBEHXZ @ stub -arch=win64 ?frac_digits@?$_Mpunct at D@std@@QEBAHXZ @ stub -arch=win32 ?frac_digits@?$_Mpunct at G@std@@QBEHXZ From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Piotr Caban : msvcp: Sync spec files and implementations. Message-ID: Module: wine Branch: master Commit: 789565362d7a7888ba39a76e200c801c7953ed93 URL: http://source.winehq.org/git/wine.git/?a=commit;h=789565362d7a7888ba39a76e200c801c7953ed93 Author: Piotr Caban Date: Fri Sep 7 11:02:17 2012 +0200 msvcp: Sync spec files and implementations. --- dlls/msvcp100/ios.c | 16 ++++++++++++++++ dlls/msvcp100/msvcp100.spec | 12 ++++++------ dlls/msvcp70/msvcp70.spec | 12 ++++++------ dlls/msvcp71/msvcp71.spec | 12 ++++++------ dlls/msvcp80/msvcp80.spec | 12 ++++++------ 5 files changed, 40 insertions(+), 24 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=789565362d7a7888ba39a76e200c801c7953ed93 From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: James Eder : include/winternl.h: Fix CPU_FEATURE_3DNOW bit mask. Message-ID: Module: wine Branch: master Commit: b97a07bc0721f3c6c7308e365e12c15c0f25237a URL: http://source.winehq.org/git/wine.git/?a=commit;h=b97a07bc0721f3c6c7308e365e12c15c0f25237a Author: James Eder Date: Thu Sep 6 09:23:13 2012 -0600 include/winternl.h: Fix CPU_FEATURE_3DNOW bit mask. --- include/winternl.h | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/include/winternl.h b/include/winternl.h index bcf18f5..79078f0 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1146,8 +1146,7 @@ typedef struct _SYSTEM_CPU_INFORMATION { #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */ #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */ #define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */ -#define CPU_FEATURE_3DNOW 0x00008000 /* 3DNOW instructions available - (FIXME: needs to be confirmed) */ +#define CPU_FEATURE_3DNOW 0x00004000 /* 3DNOW instructions available */ #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */ #define CPU_FEATURE_DS 0x00020000 /* Debug Store */ #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */ From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: James Eder : kernel32: Use PROCESSOR_FEATURE_MAX in IsProcessorFeaturePresent. Message-ID: Module: wine Branch: master Commit: 7e8a5490bd0da9dc0586e8438671380dfc3fc359 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7e8a5490bd0da9dc0586e8438671380dfc3fc359 Author: James Eder Date: Thu Sep 6 09:23:14 2012 -0600 kernel32: Use PROCESSOR_FEATURE_MAX in IsProcessorFeaturePresent. --- dlls/kernel32/cpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 996d776..0860362 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -212,7 +212,7 @@ VOID WINAPI GetNativeSystemInfo( BOOL WINAPI IsProcessorFeaturePresent ( DWORD feature /* [in] Feature number, (PF_ constants from "winnt.h") */) { - if (feature < 64) + if (feature < PROCESSOR_FEATURE_MAX) return SHARED_DATA->ProcessorFeatures[feature]; else return FALSE; From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: James Eder : kernel32: Remove outdated comment. Message-ID: Module: wine Branch: master Commit: 10ff9b4f13a42e292e3f775ef58aa356c41382ca URL: http://source.winehq.org/git/wine.git/?a=commit;h=10ff9b4f13a42e292e3f775ef58aa356c41382ca Author: James Eder Date: Thu Sep 6 09:23:15 2012 -0600 kernel32: Remove outdated comment. --- dlls/kernel32/cpu.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 0860362..333e402 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -99,12 +99,6 @@ BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER frequency) * * RETURNS * Nothing. - * - * NOTES - * On the first call it creates cached values, so it doesn't have to determine - * them repeatedly. On Linux, the "/proc/cpuinfo" special file is used. - * - * It also creates a cached flag array for IsProcessorFeaturePresent(). */ VOID WINAPI GetSystemInfo( LPSYSTEM_INFO si /* [out] Destination for system information, may not be NULL */) From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Jiang Yike : wined3d: Add AMD Radeon HD 7700 series and HD 7800 series graphics cards. Message-ID: Module: wine Branch: master Commit: a308bde74aadaba2a6b742faf2a34b6bbbb3bf1e URL: http://source.winehq.org/git/wine.git/?a=commit;h=a308bde74aadaba2a6b742faf2a34b6bbbb3bf1e Author: Jiang Yike Date: Fri Sep 7 06:48:00 2012 +0800 wined3d: Add AMD Radeon HD 7700 series and HD 7800 series graphics cards. --- dlls/wined3d/directx.c | 6 ++++++ dlls/wined3d/wined3d_private.h | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 58397e9..39083eb 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1141,6 +1141,8 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_AMD, CARD_AMD_RADEON_HD6700, "AMD Radeon HD 6700 Series", DRIVER_AMD_R600, 1024}, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD6800, "AMD Radeon HD 6800 Series", DRIVER_AMD_R600, 1024}, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD6900, "AMD Radeon HD 6900 Series", DRIVER_AMD_R600, 2048}, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD7700, "AMD Radeon HD 7700 Series", DRIVER_AMD_R600, 1024}, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD7800, "AMD Radeon HD 7800 Series", DRIVER_AMD_R600, 2048}, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD7900, "AMD Radeon HD 7900 Series", DRIVER_AMD_R600, 2048}, /* Intel cards */ {HW_VENDOR_INTEL, CARD_INTEL_830M, "Intel(R) 82830M Graphics Controller", DRIVER_INTEL_GMA800, 32 }, @@ -1699,6 +1701,8 @@ static enum wined3d_pci_device select_card_amd_binary(const struct wined3d_gl_in { /* Southern Islands */ {"HD 7900", CARD_AMD_RADEON_HD7900}, + {"HD 7800", CARD_AMD_RADEON_HD7800}, + {"HD 7700", CARD_AMD_RADEON_HD7700}, /* Northern Islands */ {"HD 6900", CARD_AMD_RADEON_HD6900}, {"HD 6800", CARD_AMD_RADEON_HD6800}, @@ -1908,6 +1912,8 @@ static enum wined3d_pci_device select_card_amd_mesa(const struct wined3d_gl_info { /* Southern Islands */ {"TAHITI", CARD_AMD_RADEON_HD7900}, + {"PITCAIRN", CARD_AMD_RADEON_HD7800}, + {"CAPE VERDE", CARD_AMD_RADEON_HD7700}, /* Northern Islands */ {"CAYMAN", CARD_AMD_RADEON_HD6900}, {"BARTS", CARD_AMD_RADEON_HD6800}, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index ead1a49..bd5c5e2 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1333,6 +1333,8 @@ enum wined3d_pci_device CARD_AMD_RADEON_HD6700 = 0x68ba, CARD_AMD_RADEON_HD6800 = 0x6739, CARD_AMD_RADEON_HD6900 = 0x6719, + CARD_AMD_RADEON_HD7700 = 0x683d, + CARD_AMD_RADEON_HD7800 = 0x6819, CARD_AMD_RADEON_HD7900 = 0x679a, CARD_NVIDIA_RIVA_128 = 0x0018, From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Qian Hong : gdi32/tests: Added font name tests on English locale. Message-ID: Module: wine Branch: master Commit: 180185d890b6df54ab38f539fd4eedef35624029 URL: http://source.winehq.org/git/wine.git/?a=commit;h=180185d890b6df54ab38f539fd4eedef35624029 Author: Qian Hong Date: Fri Sep 7 18:39:51 2012 +0800 gdi32/tests: Added font name tests on English locale. --- dlls/gdi32/tests/font.c | 157 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 151 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index d14160b..d5126a0 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2056,6 +2056,12 @@ struct enum_font_data LOGFONT lf[MAX_ENUM_FONTS]; }; +struct enum_fullname_data +{ + int total; + ENUMLOGFONT elf[MAX_ENUM_FONTS]; +}; + struct enum_font_dataW { int total; @@ -2386,6 +2392,20 @@ static INT CALLBACK enum_font_data_proc(const LOGFONT *lf, const TEXTMETRIC *ntm return 1; } +static INT CALLBACK enum_fullname_data_proc(const LOGFONT *lf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) +{ + struct enum_fullname_data *efnd = (struct enum_fullname_data *)lParam; + + if (type != TRUETYPE_FONTTYPE) return 1; + + if (efnd->total < MAX_ENUM_FONTS) + efnd->elf[efnd->total++] = *(ENUMLOGFONT*)lf; + else + trace("enum tests invalid; you have more than %d fonts\n", MAX_ENUM_FONTS); + + return 1; +} + static void test_EnumFontFamiliesEx_default_charset(void) { struct enum_font_data efd; @@ -2759,9 +2779,12 @@ end: #define TT_PLATFORM_MICROSOFT 3 #define TT_MS_ID_UNICODE_CS 1 #define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 #define TT_NAME_ID_FULL_NAME 4 -static BOOL get_ttf_nametable_entry(HDC hdc, WORD name_id, char *out_buf, SIZE_T out_size) +static BOOL get_ttf_nametable_entry(HDC hdc, WORD name_id, WCHAR *out_buf, SIZE_T out_size) { struct sfnt_name_header { @@ -3977,11 +4000,13 @@ static BOOL is_font_installed_fullname(const char *family, const char *fullname) static void test_fullname(void) { static const char *TestName[] = {"Lucida Sans Demibold Roman", "Lucida Sans Italic", "Lucida Sans Regular"}; - char buf[LF_FULLFACESIZE]; + WCHAR bufW[LF_FULLFACESIZE]; + char bufA[LF_FULLFACESIZE]; HFONT hfont, of; LOGFONTA lf; HDC hdc; int i; + DWORD ret; hdc = CreateCompatibleDC(0); ok(hdc != NULL, "CreateCompatibleDC failed\n"); @@ -4008,16 +4033,135 @@ static void test_fullname(void) ok(hfont != 0, "CreateFontIndirectA failed\n"); of = SelectObject(hdc, hfont); - buf[0] = 0; - ok(get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, buf, sizeof(buf)), - "face full name could not be read\n"); - ok(!lstrcmpA(buf, TestName[i]), "font full names don't match: %s != %s\n", TestName[i], buf); + bufW[0] = 0; + bufA[0] = 0; + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, sizeof(bufW)); + ok(ret, "face full name could not be read\n"); + WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, sizeof(bufW), NULL, FALSE); + ok(!lstrcmpA(bufA, TestName[i]), "font full names don't match: %s != %s\n", TestName[i], bufA); + SelectObject(hdc, of); + DeleteObject(hfont); + } + DeleteDC(hdc); +} + +static void test_fullname2_helper(const char *Family) +{ + char *FamilyName, *FaceName, *StyleName, *otmStr; + struct enum_fullname_data efnd; + WCHAR *bufW; + char *bufA; + HFONT hfont, of; + LOGFONTA lf; + HDC hdc; + int i; + DWORD otm_size, ret, buf_size; + OUTLINETEXTMETRICA *otm; + LCID lcid = GetSystemDefaultLangID(); + + if (lcid != TT_MS_LANGID_ENGLISH_UNITED_STATES) + { + skip("Skip test: LCID = %d\n", lcid); + return; + } + + hdc = CreateCompatibleDC(0); + ok(hdc != NULL, "CreateCompatibleDC failed\n"); + + memset(&lf, 0, sizeof(lf)); + lf.lfCharSet = DEFAULT_CHARSET; + lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf.lfHeight = 16; + lf.lfWidth = 16; + lf.lfQuality = DEFAULT_QUALITY; + lf.lfItalic = FALSE; + lf.lfWeight = FW_DONTCARE; + lstrcpy(lf.lfFaceName, Family); + efnd.total = 0; + EnumFontFamiliesExA(hdc, &lf, enum_fullname_data_proc, (LPARAM)&efnd, 0); + if (efnd.total == 0) + skip("%s is not installed\n", lf.lfFaceName); + + for (i = 0; i < efnd.total; i++) + { + FamilyName = (char *)efnd.elf[i].elfLogFont.lfFaceName; + FaceName = (char *)efnd.elf[i].elfFullName; + StyleName = (char *)efnd.elf[i].elfStyle; + + trace("Checking font %s:\nFamilyName: %s; FaceName: %s; StyleName: %s\n", Family, FamilyName, FaceName, StyleName); + + lstrcpyA(lf.lfFaceName, FaceName); + hfont = CreateFontIndirectA(&lf); + ok(hfont != 0, "CreateFontIndirectA failed\n"); + + of = SelectObject(hdc, hfont); + buf_size = GetFontData(hdc, MS_NAME_TAG, 0, NULL, 0); + ok(buf_size != GDI_ERROR, "no name table found\n"); + if (buf_size == GDI_ERROR) continue; + + bufW = HeapAlloc(GetProcessHeap(), 0, buf_size); + bufA = HeapAlloc(GetProcessHeap(), 0, buf_size); + + otm_size = GetOutlineTextMetricsA(hdc, 0, NULL); + otm = HeapAlloc(GetProcessHeap(), 0, otm_size); + memset(otm, 0, otm_size); + ret = GetOutlineTextMetrics(hdc, otm_size, otm); + ok(ret != 0, "GetOutlineTextMetrics fails!\n"); + if (ret == 0) continue; + + bufW[0] = 0; + bufA[0] = 0; + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_FAMILY, bufW, buf_size); + ok(ret, "FAMILY (family name) could not be read\n"); + WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); + ok(!lstrcmpA(FamilyName, bufA), "font family names don't match: returned %s, expect %s\n", FamilyName, bufA); + otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFamilyName; + ok(!lstrcmpA(FamilyName, otmStr), "FamilyName %s doesn't match otmpFamilyName %s\n", FamilyName, otmStr); + + bufW[0] = 0; + bufA[0] = 0; + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, buf_size); + ok(ret, "FULL_NAME (face name) could not be read\n"); + WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); + ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); + otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFaceName; + if(!lstrcmpA(FaceName, "Lucida Sans Regular")) + todo_wine ok(!lstrcmpA(FaceName, otmStr), "FaceName %s doesn't match otmpFaceName %s\n", FaceName, otmStr); + else + ok(!lstrcmpA(FaceName, otmStr), "FaceName %s doesn't match otmpFaceName %s\n", FaceName, otmStr); + + bufW[0] = 0; + bufA[0] = 0; + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_SUBFAMILY, bufW, buf_size); + ok(ret, "SUBFAMILY (style name) could not be read\n"); + WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); + ok(!lstrcmpA(StyleName, bufA), "style names don't match: returned %s, expect %s\n", FaceName, bufA); + otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpStyleName; + ok(!lstrcmpA(StyleName, otmStr), "StyleName %s doesn't match otmpStyleName %s\n", StyleName, otmStr); + + bufW[0] = 0; + bufA[0] = 0; + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size); + ok(ret, "UNIQUE_ID (full name) could not be read\n"); + WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); + otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFullName; + todo_wine ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); + SelectObject(hdc, of); DeleteObject(hfont); + + HeapFree(GetProcessHeap(), 0, otm); + HeapFree(GetProcessHeap(), 0, bufW); + HeapFree(GetProcessHeap(), 0, bufA); } DeleteDC(hdc); } +static void test_fullname2(void) +{ + test_fullname2_helper("Lucida Sans"); +} + static BOOL write_ttf_file(const char *fontname, char *tmp_name) { char tmp_path[MAX_PATH]; @@ -4531,6 +4675,7 @@ START_TEST(font) test_CreateFontIndirectEx(); test_oemcharset(); test_fullname(); + test_fullname2(); test_east_asian_font_selection(); /* These tests should be last test until RemoveFontResource From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Qian Hong : gdi32: Read otmpFaceName from TT_NAME_ID_FULL_NAME. Message-ID: Module: wine Branch: master Commit: abc8f2c6c270a8f6bce8c5c1f0fc5b5773dad4a9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=abc8f2c6c270a8f6bce8c5c1f0fc5b5773dad4a9 Author: Qian Hong Date: Fri Sep 7 18:40:12 2012 +0800 gdi32: Read otmpFaceName from TT_NAME_ID_FULL_NAME. --- dlls/gdi32/freetype.c | 89 ++++++++++++++++------------------------------ dlls/gdi32/tests/font.c | 5 +-- 2 files changed, 32 insertions(+), 62 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 8222a18..9d3d4c4 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -2624,13 +2624,12 @@ static void update_reg_entries(void) { HKEY winnt_key = 0, win9x_key = 0, external_key = 0; LPWSTR valueW; - DWORD len, len_fam; + DWORD len; Family *family; Face *face; struct list *family_elem_ptr, *face_elem_ptr; WCHAR *file; static const WCHAR TrueType[] = {' ','(','T','r','u','e','T','y','p','e',')','\0'}; - static const WCHAR spaceW[] = {' ', '\0'}; char *path; if(RegCreateKeyExW(HKEY_LOCAL_MACHINE, winnt_font_reg_key, @@ -2655,20 +2654,22 @@ static void update_reg_entries(void) LIST_FOR_EACH(family_elem_ptr, &font_list) { family = LIST_ENTRY(family_elem_ptr, Family, entry); - len_fam = strlenW(family->FamilyName) + sizeof(TrueType) / sizeof(WCHAR) + 1; LIST_FOR_EACH(face_elem_ptr, &family->faces) { face = LIST_ENTRY(face_elem_ptr, Face, entry); if(!face->external) continue; - len = len_fam; - if (!(face->ntmFlags & NTM_REGULAR)) - len = len_fam + strlenW(face->StyleName) + 1; - valueW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - strcpyW(valueW, family->FamilyName); - if(len != len_fam) { - strcatW(valueW, spaceW); - strcatW(valueW, face->StyleName); + + if(face->FullName) + { + len = strlenW(face->FullName) + sizeof(TrueType) / sizeof(WCHAR) + 1; + valueW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + strcpyW(valueW, face->FullName); + } + else + { + len = strlenW(family->FamilyName) + sizeof(TrueType) / sizeof(WCHAR) + 1; + valueW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + strcpyW(valueW, family->FamilyName); } - strcatW(valueW, TrueType); file = wine_get_dos_file_name(face->file); if(file) @@ -5078,7 +5079,7 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, (WCHAR*)((char*)font->potm + (ULONG_PTR)font->potm->otmpFamilyName), LF_FACESIZE); lstrcpynW(pelf->elfFullName, - (WCHAR*)((char*)font->potm + (ULONG_PTR)font->potm->otmpFullName), + (WCHAR*)((char*)font->potm + (ULONG_PTR)font->potm->otmpFaceName), LF_FULLFACESIZE); lstrcpynW(pelf->elfStyle, (WCHAR*)((char*)font->potm + (ULONG_PTR)font->potm->otmpStyleName), @@ -5138,15 +5139,6 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, free_font(font); } -static void create_full_name(WCHAR *full_name, const WCHAR *family_name, const WCHAR *style_name) -{ - static const WCHAR spaceW[] = { ' ', 0 }; - - strcpyW(full_name, family_name); - strcatW(full_name, spaceW); - strcatW(full_name, style_name); -} - static BOOL family_matches(Family *family, const LOGFONTW *lf) { const struct list *face_list, *face_elem_ptr; @@ -5156,18 +5148,9 @@ static BOOL family_matches(Family *family, const LOGFONTW *lf) face_list = get_face_list_from_family(family); LIST_FOR_EACH(face_elem_ptr, face_list) { - WCHAR full_family_name[LF_FULLFACESIZE]; Face *face = LIST_ENTRY(face_elem_ptr, Face, entry); - if (strlenW(family->FamilyName) + strlenW(face->StyleName) + 2 > LF_FULLFACESIZE) - { - FIXME("Length of %s + %s + 2 is longer than LF_FULLFACESIZE\n", - debugstr_w(family->FamilyName), debugstr_w(face->StyleName)); - continue; - } - - create_full_name(full_family_name, family->FamilyName, face->StyleName); - if (!strcmpiW(lf->lfFaceName, full_family_name)) return TRUE; + if (face->FullName && !strcmpiW(lf->lfFaceName, face->FullName)) return TRUE; } return FALSE; @@ -5175,19 +5158,9 @@ static BOOL family_matches(Family *family, const LOGFONTW *lf) static BOOL face_matches(const WCHAR *family_name, Face *face, const LOGFONTW *lf) { - WCHAR full_family_name[LF_FULLFACESIZE]; - if (!strcmpiW(lf->lfFaceName, family_name)) return TRUE; - if (strlenW(family_name) + strlenW(face->StyleName) + 2 > LF_FULLFACESIZE) - { - FIXME("Length of %s + %s + 2 is longer than LF_FULLFACESIZE\n", - debugstr_w(family_name), debugstr_w(face->StyleName)); - return FALSE; - } - - create_full_name(full_family_name, family_name, face->StyleName); - return !strcmpiW(lf->lfFaceName, full_family_name); + return (face->FullName && !strcmpiW(lf->lfFaceName, face->FullName)); } static BOOL enum_face_charsets(const Family *family, Face *face, struct enum_charset_list *list, @@ -5216,7 +5189,10 @@ static BOOL enum_face_charsets(const Family *family, Face *face, struct enum_cha if (family != face->family) { strcpyW(elf.elfLogFont.lfFaceName, family->FamilyName); - create_full_name(elf.elfFullName, family->FamilyName, face->StyleName); + if (face->FullName) + strcpyW(elf.elfFullName, face->FullName); + else + strcpyW(elf.elfFullName, family->FamilyName); } TRACE("enuming face %s full %s style %s charset = %d type %d script %s it %d weight %d ntmflags %08x\n", debugstr_w(elf.elfLogFont.lfFaceName), @@ -6552,12 +6528,12 @@ static BOOL get_outline_text_metrics(GdiFont *font) { BOOL ret = FALSE; FT_Face ft_face = font->ft_face; - UINT needed, lenfam, lensty; + UINT needed, lenfam, lensty, lenface; TT_OS2 *pOS2; TT_HoriHeader *pHori; TT_Postscript *pPost; FT_Fixed x_scale, y_scale; - WCHAR *family_nameW, *style_nameW; + WCHAR *family_nameW, *style_nameW, *face_nameW; static const WCHAR spaceW[] = {' ', '\0'}; char *cp; INT ascent, descent; @@ -6578,17 +6554,18 @@ static BOOL get_outline_text_metrics(GdiFont *font) MultiByteToWideChar(CP_ACP, 0, ft_face->style_name, -1, style_nameW, lensty/sizeof(WCHAR)); + face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + if (!face_nameW) + face_nameW = strdupW(font->name); + lenface = (strlenW(face_nameW) + 1) * sizeof(WCHAR); + /* These names should be read from the TT name table */ /* length of otmpFamilyName */ needed += lenfam; /* length of otmpFaceName */ - if ((ft_face->style_flags & (FT_STYLE_FLAG_ITALIC | FT_STYLE_FLAG_BOLD)) == 0) { - needed += lenfam; /* just the family name */ - } else { - needed += lenfam + lensty; /* family + " " + style */ - } + needed += lenface; /* length of otmpStyleName */ needed += lensty; @@ -6837,13 +6814,8 @@ static BOOL get_outline_text_metrics(GdiFont *font) strcpyW((WCHAR*)cp, style_nameW); cp += lensty; font->potm->otmpFaceName = (LPSTR)(cp - (char*)font->potm); - strcpyW((WCHAR*)cp, family_nameW); - if (ft_face->style_flags & (FT_STYLE_FLAG_ITALIC | FT_STYLE_FLAG_BOLD)) { - strcatW((WCHAR*)cp, spaceW); - strcatW((WCHAR*)cp, style_nameW); - cp += lenfam + lensty; - } else - cp += lenfam; + strcpyW((WCHAR*)cp, face_nameW); + cp += lenface; font->potm->otmpFullName = (LPSTR)(cp - (char*)font->potm); strcpyW((WCHAR*)cp, family_nameW); strcatW((WCHAR*)cp, spaceW); @@ -6853,6 +6825,7 @@ static BOOL get_outline_text_metrics(GdiFont *font) end: HeapFree(GetProcessHeap(), 0, style_nameW); HeapFree(GetProcessHeap(), 0, family_nameW); + HeapFree(GetProcessHeap(), 0, face_nameW); return ret; } diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index d5126a0..4a1532a 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4125,10 +4125,7 @@ static void test_fullname2_helper(const char *Family) WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFaceName; - if(!lstrcmpA(FaceName, "Lucida Sans Regular")) - todo_wine ok(!lstrcmpA(FaceName, otmStr), "FaceName %s doesn't match otmpFaceName %s\n", FaceName, otmStr); - else - ok(!lstrcmpA(FaceName, otmStr), "FaceName %s doesn't match otmpFaceName %s\n", FaceName, otmStr); + ok(!lstrcmpA(FaceName, otmStr), "FaceName %s doesn't match otmpFaceName %s\n", FaceName, otmStr); bufW[0] = 0; bufA[0] = 0; From julliard at winehq.org Fri Sep 7 13:26:20 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:20 -0500 Subject: Qian Hong : gdi32: Read otmpFullName from TT_NAME_ID_UNIQUE_ID. Message-ID: Module: wine Branch: master Commit: 733aca30f4976a858d4e7a36628922f1eb898197 URL: http://source.winehq.org/git/wine.git/?a=commit;h=733aca30f4976a858d4e7a36628922f1eb898197 Author: Qian Hong Date: Fri Sep 7 18:40:34 2012 +0800 gdi32: Read otmpFullName from TT_NAME_ID_UNIQUE_ID. --- dlls/gdi32/freetype.c | 24 +++++++++++++++++------- dlls/gdi32/tests/font.c | 2 +- dlls/wineps.drv/download.c | 4 ++-- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 9d3d4c4..feca48a 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -6528,13 +6528,12 @@ static BOOL get_outline_text_metrics(GdiFont *font) { BOOL ret = FALSE; FT_Face ft_face = font->ft_face; - UINT needed, lenfam, lensty, lenface; + UINT needed, lenfam, lensty, lenface, lenfull; TT_OS2 *pOS2; TT_HoriHeader *pHori; TT_Postscript *pPost; FT_Fixed x_scale, y_scale; - WCHAR *family_nameW, *style_nameW, *face_nameW; - static const WCHAR spaceW[] = {' ', '\0'}; + WCHAR *family_nameW, *style_nameW, *face_nameW, *full_nameW; char *cp; INT ascent, descent; @@ -6556,9 +6555,21 @@ static BOOL get_outline_text_metrics(GdiFont *font) face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); if (!face_nameW) + { + FIXME("failed to read face_nameW for font %s!\n", wine_dbgstr_w(font->name)); face_nameW = strdupW(font->name); + } lenface = (strlenW(face_nameW) + 1) * sizeof(WCHAR); + full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + if (!full_nameW) + { + WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; + FIXME("failed to read full_nameW for font %s!\n", wine_dbgstr_w(font->name)); + full_nameW = strdupW(fake_nameW); + } + lenfull = (strlenW(full_nameW) + 1) * sizeof(WCHAR); + /* These names should be read from the TT name table */ /* length of otmpFamilyName */ @@ -6571,7 +6582,7 @@ static BOOL get_outline_text_metrics(GdiFont *font) needed += lensty; /* length of otmpFullName */ - needed += lenfam + lensty; + needed += lenfull; x_scale = ft_face->size->metrics.x_scale; @@ -6817,15 +6828,14 @@ static BOOL get_outline_text_metrics(GdiFont *font) strcpyW((WCHAR*)cp, face_nameW); cp += lenface; font->potm->otmpFullName = (LPSTR)(cp - (char*)font->potm); - strcpyW((WCHAR*)cp, family_nameW); - strcatW((WCHAR*)cp, spaceW); - strcatW((WCHAR*)cp, style_nameW); + strcpyW((WCHAR*)cp, full_nameW); ret = TRUE; end: HeapFree(GetProcessHeap(), 0, style_nameW); HeapFree(GetProcessHeap(), 0, family_nameW); HeapFree(GetProcessHeap(), 0, face_nameW); + HeapFree(GetProcessHeap(), 0, full_nameW); return ret; } diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 4a1532a..10e015e 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4142,7 +4142,7 @@ static void test_fullname2_helper(const char *Family) ok(ret, "UNIQUE_ID (full name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFullName; - todo_wine ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); + ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); SelectObject(hdc, of); DeleteObject(hfont); diff --git a/dlls/wineps.drv/download.c b/dlls/wineps.drv/download.c index 6b87172..fbd868c 100644 --- a/dlls/wineps.drv/download.c +++ b/dlls/wineps.drv/download.c @@ -118,9 +118,9 @@ static void get_download_name(PHYSDEV dev, LPOUTLINETEXTMETRICA potm, char **str } } - len = strlen((char*)potm + (ptrdiff_t)potm->otmpFullName) + 1; + len = strlen((char*)potm + (ptrdiff_t)potm->otmpFaceName) + 1; *str = HeapAlloc(GetProcessHeap(),0,len); - strcpy(*str, (char*)potm + (ptrdiff_t)potm->otmpFullName); + strcpy(*str, (char*)potm + (ptrdiff_t)potm->otmpFaceName); p = *str; while((p = strchr(p, ' '))) From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Qian Hong : gdi32: Fixed family and face name on non English locale. Message-ID: Module: wine Branch: master Commit: 245308597ffbe1243169211ced5e6ffbcc55c1d5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=245308597ffbe1243169211ced5e6ffbcc55c1d5 Author: Qian Hong Date: Fri Sep 7 18:41:02 2012 +0800 gdi32: Fixed family and face name on non English locale. --- dlls/gdi32/freetype.c | 10 +++++++--- dlls/gdi32/tests/font.c | 31 +++++++++++++++++-------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index feca48a..20d6f9e 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1552,7 +1552,7 @@ static void get_family_names( FT_Face ft_face, WCHAR **name, WCHAR **english, BO *english = get_face_name( ft_face, TT_NAME_ID_FONT_FAMILY, TT_MS_LANGID_ENGLISH_UNITED_STATES ); if (!*english) *english = towstr( CP_ACP, ft_face->family_name ); - *name = get_face_name( ft_face, TT_NAME_ID_FONT_FAMILY, GetUserDefaultLCID() ); + *name = get_face_name( ft_face, TT_NAME_ID_FONT_FAMILY, GetSystemDefaultLCID() ); if (!*name) { *name = *english; @@ -1715,7 +1715,9 @@ static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file, My_FT_Bitmap_Size *size = (My_FT_Bitmap_Size *)ft_face->available_sizes; face->StyleName = towstr( CP_ACP, ft_face->style_name ); - face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, GetSystemDefaultLangID() ); + if (!face->FullName) + face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); if (file) { face->file = strdupA( file ); @@ -6553,7 +6555,9 @@ static BOOL get_outline_text_metrics(GdiFont *font) MultiByteToWideChar(CP_ACP, 0, ft_face->style_name, -1, style_nameW, lensty/sizeof(WCHAR)); - face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, GetSystemDefaultLangID() ); + if (!face_nameW) + face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); if (!face_nameW) { FIXME("failed to read face_nameW for font %s!\n", wine_dbgstr_w(font->name)); diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 10e015e..26d88ae 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2784,7 +2784,7 @@ end: #define TT_NAME_ID_UNIQUE_ID 3 #define TT_NAME_ID_FULL_NAME 4 -static BOOL get_ttf_nametable_entry(HDC hdc, WORD name_id, WCHAR *out_buf, SIZE_T out_size) +static BOOL get_ttf_nametable_entry(HDC hdc, WORD name_id, WCHAR *out_buf, SIZE_T out_size, LCID language_id) { struct sfnt_name_header { @@ -2841,7 +2841,7 @@ static BOOL get_ttf_nametable_entry(HDC hdc, WORD name_id, WCHAR *out_buf, SIZE_ { if (GET_BE_WORD(entry[i].platform_id) != TT_PLATFORM_MICROSOFT || GET_BE_WORD(entry[i].encoding_id) != TT_MS_ID_UNICODE_CS || - GET_BE_WORD(entry[i].language_id) != TT_MS_LANGID_ENGLISH_UNITED_STATES || + GET_BE_WORD(entry[i].language_id) != language_id || GET_BE_WORD(entry[i].name_id) != name_id) { continue; @@ -4035,7 +4035,7 @@ static void test_fullname(void) of = SelectObject(hdc, hfont); bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, sizeof(bufW)); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, sizeof(bufW), TT_MS_LANGID_ENGLISH_UNITED_STATES); ok(ret, "face full name could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, sizeof(bufW), NULL, FALSE); ok(!lstrcmpA(bufA, TestName[i]), "font full names don't match: %s != %s\n", TestName[i], bufA); @@ -4057,13 +4057,6 @@ static void test_fullname2_helper(const char *Family) int i; DWORD otm_size, ret, buf_size; OUTLINETEXTMETRICA *otm; - LCID lcid = GetSystemDefaultLangID(); - - if (lcid != TT_MS_LANGID_ENGLISH_UNITED_STATES) - { - skip("Skip test: LCID = %d\n", lcid); - return; - } hdc = CreateCompatibleDC(0); ok(hdc != NULL, "CreateCompatibleDC failed\n"); @@ -4111,7 +4104,12 @@ static void test_fullname2_helper(const char *Family) bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_FAMILY, bufW, buf_size); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_FAMILY, bufW, buf_size, GetSystemDefaultLangID()); + if (!ret) + { + trace("no localized name found.\n"); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_FAMILY, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + } ok(ret, "FAMILY (family name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); ok(!lstrcmpA(FamilyName, bufA), "font family names don't match: returned %s, expect %s\n", FamilyName, bufA); @@ -4120,7 +4118,12 @@ static void test_fullname2_helper(const char *Family) bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, buf_size); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, buf_size, GetSystemDefaultLangID()); + if (!ret) + { + trace("no localized name found.\n"); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + } ok(ret, "FULL_NAME (face name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); @@ -4129,7 +4132,7 @@ static void test_fullname2_helper(const char *Family) bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_SUBFAMILY, bufW, buf_size); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_SUBFAMILY, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); ok(ret, "SUBFAMILY (style name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); ok(!lstrcmpA(StyleName, bufA), "style names don't match: returned %s, expect %s\n", FaceName, bufA); @@ -4138,7 +4141,7 @@ static void test_fullname2_helper(const char *Family) bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); ok(ret, "UNIQUE_ID (full name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFullName; From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Get the current pixel format from the drawable structure for wglSetPixelFormat . Message-ID: Module: wine Branch: master Commit: ecc8559fe800df985b37afd6b1f2347c246e4039 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ecc8559fe800df985b37afd6b1f2347c246e4039 Author: Alexandre Julliard Date: Fri Sep 7 15:06:19 2012 +0200 winex11: Get the current pixel format from the drawable structure for wglSetPixelFormat. --- dlls/winex11.drv/opengl.c | 46 +++++++++++++++++++------------------------- 1 files changed, 20 insertions(+), 26 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 84651c0..00642ce 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1533,25 +1533,16 @@ static int glxdrv_wglGetPixelFormat( HDC hdc ) */ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd ) { - struct x11drv_escape_get_drawable escape; const struct wgl_pixel_format *fmt; - int value; - HWND hwnd; + int value, prev = 0; + struct gl_drawable *gl; + HWND hwnd = WindowFromDC( hdc ); TRACE("(%p,%d,%p)\n", hdc, iPixelFormat, ppfd); - escape.code = X11DRV_GET_DRAWABLE; - if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape.code), (LPCSTR)&escape.code, - sizeof(escape), (LPSTR)&escape )) - return 0; - - if (escape.pixel_format) /* cannot change it if already set */ - return (escape.pixel_format == iPixelFormat); - - /* SetPixelFormat is not allowed on the X root_window e.g. GetDC(0) */ - if (escape.drawable == root_window) + if (!hwnd || hwnd == GetDesktopWindow()) { - ERR("Invalid operation on root_window\n"); + WARN( "not a proper window DC %p/%p\n", hdc, hwnd ); return FALSE; } @@ -1563,21 +1554,24 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM } pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value); + if (!(value & GLX_WINDOW_BIT)) + { + WARN("Pixel format %d is not compatible for window rendering\n", iPixelFormat); + return FALSE; + } - hwnd = WindowFromDC( hdc ); - if(hwnd) { - if(!(value&GLX_WINDOW_BIT)) { - WARN("Pixel format %d is not compatible for window rendering\n", iPixelFormat); - return FALSE; - } + EnterCriticalSection( &context_section ); + if (!XFindContext( gdi_display, (XID)hwnd, gl_drawable_context, (char **)&gl )) + prev = gl->pixel_format; + LeaveCriticalSection( &context_section ); - if(!SendMessageW(hwnd, WM_X11DRV_SET_WIN_FORMAT, fmt->fmt_id, 0)) { - ERR("Couldn't set format of the window, returning failure\n"); - return FALSE; - } - /* physDev->current_pf will be set by the DCE update */ + if (prev) return prev == iPixelFormat; /* cannot change it if already set */ + + if(!SendMessageW(hwnd, WM_X11DRV_SET_WIN_FORMAT, fmt->fmt_id, 0)) { + ERR("Couldn't set format of the window, returning failure\n"); + return FALSE; } - else FIXME("called on a non-window object?\n"); + /* physDev->current_pf will be set by the DCE update */ if (TRACE_ON(wgl)) { int gl_test = 0; From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Store a drawable structure also for pbuffer contexts. Message-ID: Module: wine Branch: master Commit: 4df8f15ff9cefccf030fa5b92c4c53b0267fa29e URL: http://source.winehq.org/git/wine.git/?a=commit;h=4df8f15ff9cefccf030fa5b92c4c53b0267fa29e Author: Alexandre Julliard Date: Fri Sep 7 15:23:15 2012 +0200 winex11: Store a drawable structure also for pbuffer contexts. --- dlls/winex11.drv/opengl.c | 81 ++++++++++++++++++++++++++++---------------- 1 files changed, 51 insertions(+), 30 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 00642ce..d5d3ca9 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -204,7 +204,9 @@ struct gl_drawable }; /* X context to associate a struct gl_drawable to an hwnd */ -static XContext gl_drawable_context; +static XContext gl_hwnd_context; +/* X context to associate a struct gl_drawable to a pbuffer hdc */ +static XContext gl_pbuffer_context; static const struct gdi_dc_funcs glxdrv_funcs; @@ -592,7 +594,8 @@ static BOOL has_opengl(void) ERR( "GLX extension is missing, disabling OpenGL.\n" ); goto failed; } - gl_drawable_context = XUniqueContext(); + gl_hwnd_context = XUniqueContext(); + gl_pbuffer_context = XUniqueContext(); /* In case of GLX you have direct and indirect rendering. Most of the time direct rendering is used * as in general only that is hardware accelerated. In some cases like in case of remote X indirect @@ -1160,7 +1163,7 @@ static void free_gl_drawable( struct gl_drawable *gl ) default: break; } - XFree( gl->visual ); + if (gl->visual) XFree( gl->visual ); HeapFree( GetProcessHeap(), 0, gl ); } @@ -1275,9 +1278,9 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) XFlush( gdi_display ); EnterCriticalSection( &context_section ); - if (!XFindContext( gdi_display, (XID)hwnd, gl_drawable_context, (char **)&prev )) + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&prev )) free_gl_drawable( prev ); - XSaveContext( gdi_display, (XID)hwnd, gl_drawable_context, (char *)gl ); + XSaveContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char *)gl ); LeaveCriticalSection( &context_section ); /* force DCE invalidation */ @@ -1305,7 +1308,7 @@ void sync_gl_drawable( HWND hwnd, const RECT *visible_rect, const RECT *client_r EnterCriticalSection( &context_section ); - if (XFindContext( gdi_display, (XID)hwnd, gl_drawable_context, (char **)&gl )) goto done; + if (XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl )) goto done; if (changes.width != gl->rect.right - gl->rect.left) mask |= CWWidth; if (changes.height != gl->rect.bottom - gl->rect.top) mask |= CWHeight; @@ -1358,9 +1361,9 @@ void destroy_gl_drawable( HWND hwnd ) struct gl_drawable *gl; EnterCriticalSection( &context_section ); - if (!XFindContext( gdi_display, (XID)hwnd, gl_drawable_context, (char **)&gl )) + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl )) { - XDeleteContext( gdi_display, (XID)hwnd, gl_drawable_context ); + XDeleteContext( gdi_display, (XID)hwnd, gl_hwnd_context ); free_gl_drawable( gl ); } LeaveCriticalSection( &context_section ); @@ -1561,7 +1564,7 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM } EnterCriticalSection( &context_section ); - if (!XFindContext( gdi_display, (XID)hwnd, gl_drawable_context, (char **)&gl )) + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl )) prev = gl->pixel_format; LeaveCriticalSection( &context_section ); @@ -2200,11 +2203,27 @@ static BOOL X11DRV_wglDestroyPbufferARB( struct wgl_pbuffer *object ) static HDC X11DRV_wglGetPbufferDCARB( struct wgl_pbuffer *object ) { struct x11drv_escape_set_drawable escape; + struct gl_drawable *gl, *prev; HDC hdc; hdc = CreateDCA( "DISPLAY", NULL, NULL, NULL ); if (!hdc) return 0; + if (!(gl = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*gl) ))) + { + DeleteDC( hdc ); + return 0; + } + gl->type = DC_GL_PBUFFER; + gl->drawable = object->drawable; + gl->pixel_format = object->fmt - pixel_formats + 1; + + EnterCriticalSection( &context_section ); + if (!XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&prev )) + free_gl_drawable( prev ); + XSaveContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char *)gl ); + LeaveCriticalSection( &context_section ); + escape.code = X11DRV_SET_DRAWABLE; escape.hwnd = 0; escape.drawable = object->drawable; @@ -2313,7 +2332,18 @@ static BOOL X11DRV_wglQueryPbufferARB( struct wgl_pbuffer *object, int iAttribut */ static int X11DRV_wglReleasePbufferDCARB( struct wgl_pbuffer *object, HDC hdc ) { + struct gl_drawable *gl; + TRACE("(%p, %p)\n", object, hdc); + + EnterCriticalSection( &context_section ); + if (!XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&gl )) + { + XDeleteContext( gdi_display, (XID)hdc, gl_pbuffer_context ); + free_gl_drawable( gl ); + } + LeaveCriticalSection( &context_section ); + return DeleteDC(hdc); } @@ -3176,32 +3206,23 @@ static INT glxdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d struct gl_drawable *gl; const struct x11drv_escape_set_drawable *data = in_data; - if (!data->hwnd) /* pbuffer */ + EnterCriticalSection( &context_section ); + if (!XFindContext( gdi_display, (XID)data->hwnd, gl_hwnd_context, (char **)&gl ) || + !XFindContext( gdi_display, (XID)dev->hdc, gl_pbuffer_context, (char **)&gl )) { - physdev->pixel_format = pixelformat_from_fbconfig_id( data->fbconfig_id ); - physdev->type = DC_GL_PBUFFER; - physdev->drawable = data->drawable; - physdev->pixmap = 0; + physdev->pixel_format = gl->pixel_format; + physdev->type = gl->type; + physdev->drawable = gl->drawable; + physdev->pixmap = gl->pixmap; } else { - EnterCriticalSection( &context_section ); - if (!XFindContext( gdi_display, (XID)data->hwnd, gl_drawable_context, (char **)&gl )) - { - physdev->pixel_format = gl->pixel_format; - physdev->type = gl->type; - physdev->drawable = gl->drawable; - physdev->pixmap = gl->pixmap; - } - else - { - physdev->pixel_format = 0; - physdev->type = DC_GL_NONE; - physdev->drawable = 0; - physdev->pixmap = 0; - } - LeaveCriticalSection( &context_section ); + physdev->pixel_format = 0; + physdev->type = DC_GL_NONE; + physdev->drawable = 0; + physdev->pixmap = 0; } + LeaveCriticalSection( &context_section ); TRACE( "SET_DRAWABLE hdc %p drawable %lx pf %u type %u\n", dev->hdc, physdev->drawable, physdev->pixel_format, physdev->type ); } From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Get the current pixel format from the drawable structure in wglGetPixelFormat . Message-ID: Module: wine Branch: master Commit: bf5e1b6a05e631846b9ba7fff2edc36213884bf2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf5e1b6a05e631846b9ba7fff2edc36213884bf2 Author: Alexandre Julliard Date: Fri Sep 7 15:31:05 2012 +0200 winex11: Get the current pixel format from the drawable structure in wglGetPixelFormat. --- dlls/winex11.drv/opengl.c | 30 +++++++++++++----------------- 1 files changed, 13 insertions(+), 17 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index d5d3ca9..a31c5ef 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1509,26 +1509,22 @@ static int glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat, */ static int glxdrv_wglGetPixelFormat( HDC hdc ) { - struct x11drv_escape_get_drawable escape; - - TRACE( "(%p)\n", hdc ); + HWND hwnd = WindowFromDC( hdc ); + struct gl_drawable *gl; + int ret = 0; - escape.code = X11DRV_GET_DRAWABLE; - if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape.code), (LPCSTR)&escape.code, - sizeof(escape), (LPSTR)&escape )) - return 0; + EnterCriticalSection( &context_section ); + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl ) || + !XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&gl )) + ret = gl->pixel_format; + LeaveCriticalSection( &context_section ); - if (!is_valid_pixel_format( escape.pixel_format )) return 0; /* not set yet */ + /* Offscreen formats can't be used with traditional WGL calls. + * As has been verified on Windows GetPixelFormat doesn't fail but returns iPixelFormat=1. */ + if (ret && !is_onscreen_pixel_format( ret )) ret = 1; - if (!is_onscreen_pixel_format( escape.pixel_format )) - { - /* Offscreen formats can't be used with traditional WGL calls. - * As has been verified on Windows GetPixelFormat doesn't fail but returns iPixelFormat=1. */ - TRACE("Returning iPixelFormat=1 for offscreen format: %d\n", escape.pixel_format); - return 1; - } - TRACE("(%p): returns %d\n", hdc, escape.pixel_format); - return escape.pixel_format; + TRACE( "%p -> %d\n", hdc, ret ); + return ret; } /*********************************************************************** From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Store a format pointer instead of an index in the drawable structures. Message-ID: Module: wine Branch: master Commit: 356f9897cd890b29b5a373e06bc075c0b86a15ed URL: http://source.winehq.org/git/wine.git/?a=commit;h=356f9897cd890b29b5a373e06bc075c0b86a15ed Author: Alexandre Julliard Date: Fri Sep 7 15:36:57 2012 +0200 winex11: Store a format pointer instead of an index in the drawable structures. --- dlls/winex11.drv/opengl.c | 46 ++++++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index a31c5ef..3c557db 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -184,23 +184,23 @@ enum dc_gl_type struct glx_physdev { - struct gdi_physdev dev; - X11DRV_PDEVICE *x11dev; - enum dc_gl_type type; /* type of GL device context */ - int pixel_format; - Drawable drawable; - Pixmap pixmap; /* pixmap for a DL_GL_PIXMAP_WIN drawable */ + struct gdi_physdev dev; + X11DRV_PDEVICE *x11dev; + enum dc_gl_type type; /* type of GL device context */ + const struct wgl_pixel_format *format; + Drawable drawable; + Pixmap pixmap; /* pixmap for a DL_GL_PIXMAP_WIN drawable */ }; struct gl_drawable { - enum dc_gl_type type; /* type of GL surface */ - Drawable drawable; /* drawable for rendering to the client area */ - Pixmap pixmap; /* base pixmap if drawable is a GLXPixmap */ - Colormap colormap; /* colormap used for the drawable */ - int pixel_format; /* pixel format for the drawable */ - XVisualInfo *visual; /* information about the GL visual */ - RECT rect; /* drawable rect, relative to whole window drawable */ + enum dc_gl_type type; /* type of GL surface */ + Drawable drawable; /* drawable for rendering to the client area */ + Pixmap pixmap; /* base pixmap if drawable is a GLXPixmap */ + Colormap colormap; /* colormap used for the drawable */ + const struct wgl_pixel_format *format; /* pixel format for the drawable */ + XVisualInfo *visual; /* information about the GL visual */ + RECT rect; /* drawable rect, relative to whole window drawable */ }; /* X context to associate a struct gl_drawable to an hwnd */ @@ -1180,8 +1180,8 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) if (!(format = pixelformat_from_fbconfig_id( fbconfig_id ))) return FALSE; gl = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*gl) ); - gl->pixel_format = format; - gl->visual = pglXGetVisualFromFBConfig( gdi_display, pixel_formats[format - 1].fbconfig ); + gl->format = &pixel_formats[format - 1]; + gl->visual = pglXGetVisualFromFBConfig( gdi_display, gl->format->fbconfig ); if (!gl->visual) { HeapFree( GetProcessHeap(), 0, gl ); @@ -1516,7 +1516,7 @@ static int glxdrv_wglGetPixelFormat( HDC hdc ) EnterCriticalSection( &context_section ); if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl ) || !XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&gl )) - ret = gl->pixel_format; + ret = gl->format - pixel_formats + 1; LeaveCriticalSection( &context_section ); /* Offscreen formats can't be used with traditional WGL calls. @@ -1561,7 +1561,7 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM EnterCriticalSection( &context_section ); if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl )) - prev = gl->pixel_format; + prev = gl->format - pixel_formats + 1; LeaveCriticalSection( &context_section ); if (prev) return prev == iPixelFormat; /* cannot change it if already set */ @@ -2212,7 +2212,7 @@ static HDC X11DRV_wglGetPbufferDCARB( struct wgl_pbuffer *object ) } gl->type = DC_GL_PBUFFER; gl->drawable = object->drawable; - gl->pixel_format = object->fmt - pixel_formats + 1; + gl->format = object->fmt; EnterCriticalSection( &context_section ); if (!XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&prev )) @@ -3206,28 +3206,28 @@ static INT glxdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d if (!XFindContext( gdi_display, (XID)data->hwnd, gl_hwnd_context, (char **)&gl ) || !XFindContext( gdi_display, (XID)dev->hdc, gl_pbuffer_context, (char **)&gl )) { - physdev->pixel_format = gl->pixel_format; + physdev->format = gl->format; physdev->type = gl->type; physdev->drawable = gl->drawable; physdev->pixmap = gl->pixmap; } else { - physdev->pixel_format = 0; + physdev->format = NULL; physdev->type = DC_GL_NONE; physdev->drawable = 0; physdev->pixmap = 0; } LeaveCriticalSection( &context_section ); - TRACE( "SET_DRAWABLE hdc %p drawable %lx pf %u type %u\n", - dev->hdc, physdev->drawable, physdev->pixel_format, physdev->type ); + TRACE( "SET_DRAWABLE hdc %p drawable %lx pf %p type %u\n", + dev->hdc, physdev->drawable, physdev->format, physdev->type ); } break; case X11DRV_GET_DRAWABLE: if (out_count >= sizeof(struct x11drv_escape_get_drawable)) { struct x11drv_escape_get_drawable *data = out_data; - data->pixel_format = physdev->pixel_format; + data->pixel_format = physdev->format ? physdev->format - pixel_formats + 1 : 0; data->gl_drawable = physdev->drawable; } break; From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Get the current pixel format from the drawable structure in wglCreateContext . Message-ID: Module: wine Branch: master Commit: c01d723a4fd91fbde6d9dc201329be3c2cccdea2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c01d723a4fd91fbde6d9dc201329be3c2cccdea2 Author: Alexandre Julliard Date: Fri Sep 7 15:43:01 2012 +0200 winex11: Get the current pixel format from the drawable structure in wglCreateContext. --- dlls/winex11.drv/opengl.c | 48 +++++++++++++++------------------------------ 1 files changed, 16 insertions(+), 32 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 3c557db..dccee22 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1608,43 +1608,27 @@ static BOOL glxdrv_wglCopyContext(struct wgl_context *src, struct wgl_context *d */ static struct wgl_context *glxdrv_wglCreateContext( HDC hdc ) { - struct x11drv_escape_get_drawable escape; - struct wgl_context *ret; - const struct wgl_pixel_format *fmt; - - TRACE( "(%p)\n", hdc ); + struct wgl_context *ret = NULL; + struct gl_drawable *gl; + HWND hwnd = WindowFromDC( hdc ); - escape.code = X11DRV_GET_DRAWABLE; - if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape.code), (LPCSTR)&escape.code, - sizeof(escape), (LPSTR)&escape )) - return 0; + EnterCriticalSection( &context_section ); - fmt = get_pixel_format(gdi_display, escape.pixel_format, TRUE /* Offscreen */); - /* We can render using the iPixelFormat (1) of Wine's Main visual AND using some offscreen formats. - * Note that standard WGL-calls don't recognize offscreen-only formats. For that reason pbuffers - * use a sort of 'proxy' HDC (wglGetPbufferDCARB). - * If this fails something is very wrong on the system. */ - if(!fmt) { - ERR("Cannot get FB Config for iPixelFormat %d, expect problems!\n", escape.pixel_format); - SetLastError(ERROR_INVALID_PIXEL_FORMAT); - return NULL; + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl ) || + !XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&gl )) + { + if (!(ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)))) goto done; + ret->hdc = hdc; + ret->fmt = gl->format; + ret->vis = pglXGetVisualFromFBConfig(gdi_display, gl->format->fbconfig); + ret->ctx = create_glxcontext(gdi_display, ret, NULL); + list_add_head( &context_list, &ret->entry ); } + else SetLastError( ERROR_INVALID_PIXEL_FORMAT ); - if (!(ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)))) return 0; - - ret->hdc = hdc; - ret->fmt = fmt; - ret->has_been_current = FALSE; - ret->sharing = FALSE; - - ret->vis = pglXGetVisualFromFBConfig(gdi_display, fmt->fbconfig); - ret->ctx = create_glxcontext(gdi_display, ret, NULL); - - EnterCriticalSection( &context_section ); - list_add_head( &context_list, &ret->entry ); +done: LeaveCriticalSection( &context_section ); - - TRACE(" creating context %p (GL context creation delayed)\n", ret); + TRACE( "%p -> %p\n", hdc, ret ); return ret; } From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Get the current pixel format from the drawable structure in wglCreateContextAttribsARB . Message-ID: Module: wine Branch: master Commit: d52c2de7dad0a5f0f9cbcc5115360028f390d4a7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d52c2de7dad0a5f0f9cbcc5115360028f390d4a7 Author: Alexandre Julliard Date: Fri Sep 7 16:19:06 2012 +0200 winex11: Get the current pixel format from the drawable structure in wglCreateContextAttribsARB. --- dlls/winex11.drv/opengl.c | 93 +++++++++++++++++++------------------------- 1 files changed, 40 insertions(+), 53 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index dccee22..97055ae 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1880,90 +1880,77 @@ static void wglFlush(void) static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wgl_context *hShareContext, const int* attribList ) { - struct x11drv_escape_get_drawable escape; - struct wgl_context *ret; - const struct wgl_pixel_format *fmt; + struct wgl_context *ret = NULL; + struct gl_drawable *gl; + HWND hwnd = WindowFromDC( hdc ); TRACE("(%p %p %p)\n", hdc, hShareContext, attribList); - escape.code = X11DRV_GET_DRAWABLE; - if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape.code), (LPCSTR)&escape.code, - sizeof(escape), (LPSTR)&escape )) - return 0; - - fmt = get_pixel_format(gdi_display, escape.pixel_format, TRUE /* Offscreen */); - /* wglCreateContextAttribsARB supports ALL pixel formats, so also offscreen ones. - * If this fails something is very wrong on the system. */ - if(!fmt) - { - ERR("Cannot get FB Config for iPixelFormat %d, expect problems!\n", escape.pixel_format); - SetLastError(ERROR_INVALID_PIXEL_FORMAT); - return NULL; - } - - if (!(ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)))) return 0; - - ret->hdc = hdc; - ret->fmt = fmt; - ret->vis = NULL; /* glXCreateContextAttribsARB requires a fbconfig instead of a visual */ - ret->gl3_context = TRUE; + EnterCriticalSection( &context_section ); - ret->numAttribs = 0; - if(attribList) + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl ) || + !XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&gl )) { - int *pAttribList = (int*)attribList; - int *pContextAttribList = &ret->attribList[0]; - /* attribList consists of pairs {token, value] terminated with 0 */ - while(pAttribList[0] != 0) + if (!(ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)))) goto done; + ret->hdc = hdc; + ret->fmt = gl->format; + ret->vis = NULL; /* glXCreateContextAttribsARB requires a fbconfig instead of a visual */ + ret->gl3_context = TRUE; + ret->numAttribs = 0; + if (attribList) { - TRACE("%#x %#x\n", pAttribList[0], pAttribList[1]); - switch(pAttribList[0]) + int *pContextAttribList = &ret->attribList[0]; + /* attribList consists of pairs {token, value] terminated with 0 */ + while(attribList[0] != 0) { + TRACE("%#x %#x\n", attribList[0], attribList[1]); + switch(attribList[0]) + { case WGL_CONTEXT_MAJOR_VERSION_ARB: pContextAttribList[0] = GLX_CONTEXT_MAJOR_VERSION_ARB; - pContextAttribList[1] = pAttribList[1]; + pContextAttribList[1] = attribList[1]; break; case WGL_CONTEXT_MINOR_VERSION_ARB: pContextAttribList[0] = GLX_CONTEXT_MINOR_VERSION_ARB; - pContextAttribList[1] = pAttribList[1]; + pContextAttribList[1] = attribList[1]; break; case WGL_CONTEXT_LAYER_PLANE_ARB: break; case WGL_CONTEXT_FLAGS_ARB: pContextAttribList[0] = GLX_CONTEXT_FLAGS_ARB; - pContextAttribList[1] = pAttribList[1]; + pContextAttribList[1] = attribList[1]; break; case WGL_CONTEXT_PROFILE_MASK_ARB: pContextAttribList[0] = GLX_CONTEXT_PROFILE_MASK_ARB; - pContextAttribList[1] = pAttribList[1]; + pContextAttribList[1] = attribList[1]; break; default: - ERR("Unhandled attribList pair: %#x %#x\n", pAttribList[0], pAttribList[1]); + ERR("Unhandled attribList pair: %#x %#x\n", attribList[0], attribList[1]); + } + ret->numAttribs++; + attribList += 2; + pContextAttribList += 2; } - - ret->numAttribs++; - pAttribList += 2; - pContextAttribList += 2; } - } - - X11DRV_expect_error(gdi_display, GLXErrorHandler, NULL); - ret->ctx = create_glxcontext(gdi_display, ret, NULL); - XSync(gdi_display, False); - if(X11DRV_check_error() || !ret->ctx) - { + X11DRV_expect_error(gdi_display, GLXErrorHandler, NULL); + ret->ctx = create_glxcontext(gdi_display, ret, NULL); + XSync(gdi_display, False); + if (!X11DRV_check_error() && ret->ctx) + { + list_add_head( &context_list, &ret->entry ); + goto done; + } /* In the future we should convert the GLX error to a win32 one here if needed */ ERR("Context creation failed\n"); HeapFree( GetProcessHeap(), 0, ret ); - return NULL; + ret = NULL; } + else SetLastError( ERROR_INVALID_PIXEL_FORMAT ); - EnterCriticalSection( &context_section ); - list_add_head( &context_list, &ret->entry ); +done: LeaveCriticalSection( &context_section ); - - TRACE(" creating context %p\n", ret); + TRACE( "%p -> %p\n", hdc, ret ); return ret; } From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Get the current pixel format from the drawable structure in wglMakeCurrent . Message-ID: Module: wine Branch: master Commit: 11013af0a1a7f9c7d4854c376f8a3b46f955f1e2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=11013af0a1a7f9c7d4854c376f8a3b46f955f1e2 Author: Alexandre Julliard Date: Fri Sep 7 15:53:00 2012 +0200 winex11: Get the current pixel format from the drawable structure in wglMakeCurrent. --- dlls/winex11.drv/opengl.c | 57 +++++++++++++++++++-------------------------- 1 files changed, 24 insertions(+), 33 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 97055ae..a6fb974 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1662,8 +1662,9 @@ static PROC glxdrv_wglGetProcAddress(LPCSTR lpszProc) */ static BOOL glxdrv_wglMakeCurrent(HDC hdc, struct wgl_context *ctx) { - BOOL ret; - struct x11drv_escape_get_drawable escape; + BOOL ret = FALSE; + HWND hwnd; + struct gl_drawable *gl; TRACE("(%p,%p)\n", hdc, ctx); @@ -1674,51 +1675,41 @@ static BOOL glxdrv_wglMakeCurrent(HDC hdc, struct wgl_context *ctx) return TRUE; } - escape.code = X11DRV_GET_DRAWABLE; - if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape.code), (LPCSTR)&escape.code, - sizeof(escape), (LPSTR)&escape )) - return FALSE; + hwnd = WindowFromDC( hdc ); + EnterCriticalSection( &context_section ); - if (!escape.pixel_format) - { - WARN("Trying to use an invalid drawable\n"); - SetLastError(ERROR_INVALID_HANDLE); - return FALSE; - } - if (ctx->fmt - pixel_formats != escape.pixel_format - 1) - { - WARN( "mismatched pixel format hdc %p %u ctx %p\n", hdc, escape.pixel_format, ctx ); - SetLastError( ERROR_INVALID_PIXEL_FORMAT ); - return FALSE; - } - else + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl ) || + !XFindContext( gdi_display, (XID)hdc, gl_pbuffer_context, (char **)&gl )) { + if (ctx->fmt != gl->format) + { + WARN( "mismatched pixel format hdc %p %p ctx %p %p\n", hdc, gl->format, ctx, ctx->fmt ); + SetLastError( ERROR_INVALID_PIXEL_FORMAT ); + goto done; + } + if (TRACE_ON(wgl)) { - int vis_id; - pglXGetFBConfigAttrib(gdi_display, ctx->fmt->fbconfig, GLX_VISUAL_ID, &vis_id); describeContext(ctx); - TRACE("hdc %p drawable %lx fmt %u vis %x ctx %p\n", hdc, - escape.gl_drawable, escape.pixel_format, vis_id, ctx->ctx); + TRACE("hdc %p drawable %lx fmt %p ctx %p\n", hdc, gl->drawable, gl->format, ctx->ctx ); } - ret = pglXMakeCurrent(gdi_display, escape.gl_drawable, ctx->ctx); - + ret = pglXMakeCurrent(gdi_display, gl->drawable, ctx->ctx); if (ret) { NtCurrentTeb()->glContext = ctx; - - EnterCriticalSection( &context_section ); ctx->has_been_current = TRUE; ctx->hdc = hdc; - ctx->drawables[0] = escape.gl_drawable; - ctx->drawables[1] = escape.gl_drawable; + ctx->drawables[0] = gl->drawable; + ctx->drawables[1] = gl->drawable; ctx->refresh_drawables = FALSE; - LeaveCriticalSection( &context_section ); + goto done; } - else - SetLastError(ERROR_INVALID_HANDLE); } - TRACE(" returning %s\n", (ret ? "True" : "False")); + SetLastError( ERROR_INVALID_HANDLE ); + +done: + LeaveCriticalSection( &context_section ); + TRACE( "%p,%p returning %d\n", hdc, ctx, ret ); return ret; } From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Alexandre Julliard : winex11: Get the current pixel format from the drawable structure in wglMakeContextCurrentARB . Message-ID: Module: wine Branch: master Commit: bde5156876bc9c2255f3f98bdef81840c057ffb7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bde5156876bc9c2255f3f98bdef81840c057ffb7 Author: Alexandre Julliard Date: Fri Sep 7 16:09:22 2012 +0200 winex11: Get the current pixel format from the drawable structure in wglMakeContextCurrentARB. --- dlls/winex11.drv/opengl.c | 48 +++++++++++++++++++------------------------- 1 files changed, 21 insertions(+), 27 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index a6fb974..6e0c0b7 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1718,8 +1718,9 @@ done: */ static BOOL X11DRV_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct wgl_context *ctx ) { - struct x11drv_escape_get_drawable escape_draw, escape_read; - BOOL ret; + BOOL ret = FALSE; + HWND draw_hwnd, read_hwnd; + struct gl_drawable *draw_gl, *read_gl; TRACE("(%p,%p,%p)\n", draw_hdc, read_hdc, ctx); @@ -1730,43 +1731,36 @@ static BOOL X11DRV_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct return TRUE; } - escape_draw.code = X11DRV_GET_DRAWABLE; - if (!ExtEscape( draw_hdc, X11DRV_ESCAPE, sizeof(escape_draw.code), (LPCSTR)&escape_draw.code, - sizeof(escape_draw), (LPSTR)&escape_draw )) - return FALSE; + if (!pglXMakeContextCurrent) return FALSE; - escape_read.code = X11DRV_GET_DRAWABLE; - if (!ExtEscape( read_hdc, X11DRV_ESCAPE, sizeof(escape_read.code), (LPCSTR)&escape_read.code, - sizeof(escape_read), (LPSTR)&escape_read )) - return FALSE; + draw_hwnd = WindowFromDC( draw_hdc ); + read_hwnd = WindowFromDC( read_hdc ); + EnterCriticalSection( &context_section ); - if (!escape_draw.pixel_format) + if (!XFindContext( gdi_display, (XID)draw_hwnd, gl_hwnd_context, (char **)&draw_gl ) || + !XFindContext( gdi_display, (XID)draw_hdc, gl_pbuffer_context, (char **)&draw_gl )) { - WARN("Trying to use an invalid drawable\n"); - SetLastError(ERROR_INVALID_HANDLE); - return FALSE; - } - else - { - if (!pglXMakeContextCurrent) return FALSE; + if (XFindContext( gdi_display, (XID)read_hwnd, gl_hwnd_context, (char **)&read_gl ) && + XFindContext( gdi_display, (XID)read_hdc, gl_pbuffer_context, (char **)&read_gl )) + read_gl = NULL; - ret = pglXMakeContextCurrent(gdi_display, escape_draw.gl_drawable, escape_read.gl_drawable, ctx->ctx); + ret = pglXMakeContextCurrent(gdi_display, draw_gl->drawable, + read_gl ? read_gl->drawable : 0, ctx->ctx); if (ret) { - EnterCriticalSection( &context_section ); ctx->has_been_current = TRUE; ctx->hdc = draw_hdc; - ctx->drawables[0] = escape_draw.gl_drawable; - ctx->drawables[1] = escape_read.gl_drawable; + ctx->drawables[0] = draw_gl->drawable; + ctx->drawables[1] = read_gl ? read_gl->drawable : 0; ctx->refresh_drawables = FALSE; - LeaveCriticalSection( &context_section ); NtCurrentTeb()->glContext = ctx; + goto done; } - else - SetLastError(ERROR_INVALID_HANDLE); } - - TRACE(" returning %s\n", (ret ? "True" : "False")); + SetLastError( ERROR_INVALID_HANDLE ); +done: + LeaveCriticalSection( &context_section ); + TRACE( "%p,%p,%p returning %d\n", draw_hdc, read_hdc, ctx, ret ); return ret; } From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Hans Leidekker : iphlpapi: Implement GetExtendedUdpTable. Message-ID: Module: wine Branch: master Commit: 18ba68ea629f98c6afdc73c4baec0003f1c11ec6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=18ba68ea629f98c6afdc73c4baec0003f1c11ec6 Author: Hans Leidekker Date: Fri Sep 7 13:35:36 2012 +0200 iphlpapi: Implement GetExtendedUdpTable. --- dlls/iphlpapi/iphlpapi.spec | 2 +- dlls/iphlpapi/iphlpapi_main.c | 49 +++-- dlls/iphlpapi/ipstats.c | 438 ++++++++++++++++++++++------------------ dlls/iphlpapi/ipstats.h | 1 + dlls/iphlpapi/tests/iphlpapi.c | 36 ++++ include/iphlpapi.h | 3 + include/iprtrmib.h | 7 + include/udpmib.h | 2 +- 8 files changed, 322 insertions(+), 216 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=18ba68ea629f98c6afdc73c4baec0003f1c11ec6 From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Hans Leidekker : iphlpapi: Add partial support for UDP_TABLE_OWNER_MODULE in GetExtendedUdpTable. Message-ID: Module: wine Branch: master Commit: bc8876f9ce24beda5dba4a4413543f163fa154bb URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc8876f9ce24beda5dba4a4413543f163fa154bb Author: Hans Leidekker Date: Fri Sep 7 13:35:48 2012 +0200 iphlpapi: Add partial support for UDP_TABLE_OWNER_MODULE in GetExtendedUdpTable. --- dlls/iphlpapi/iphlpapi_main.c | 6 +++++- dlls/iphlpapi/ipstats.c | 15 +++++++++++---- include/udpmib.h | 23 +++++++++++++++++++++++ 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index a9ab1e0..f3568b8 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -1935,11 +1935,15 @@ DWORD WINAPI GetExtendedUdpTable(PVOID pUdpTable, PDWORD pdwSize, BOOL bOrder, if (!pdwSize) return ERROR_INVALID_PARAMETER; if (ulAf != AF_INET || - (TableClass != UDP_TABLE_BASIC && TableClass != UDP_TABLE_OWNER_PID)) + (TableClass != UDP_TABLE_BASIC && TableClass != UDP_TABLE_OWNER_PID && + TableClass != UDP_TABLE_OWNER_MODULE)) { FIXME("ulAf = %u, TableClass = %u not supported\n", ulAf, TableClass); return ERROR_NOT_SUPPORTED; } + if (TableClass == UDP_TABLE_OWNER_MODULE) + FIXME("UDP_TABLE_OWNER_MODULE not fully supported\n"); + if ((ret = build_udp_table(TableClass, &table, bOrder, GetProcessHeap(), 0, &size))) return ret; diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 18307d5..7c64b41 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -1837,6 +1837,12 @@ static DWORD get_udp_table_sizes( UDP_TABLE_CLASS class, DWORD row_count, DWORD if (row_size) *row_size = sizeof(MIB_UDPROW_OWNER_PID); break; } + case UDP_TABLE_OWNER_MODULE: + { + table_size = FIELD_OFFSET(MIB_UDPTABLE_OWNER_MODULE, table[row_count]); + if (row_size) *row_size = sizeof(MIB_UDPROW_OWNER_MODULE); + break; + } default: ERR("unhandled class %u\n", class); return 0; @@ -1846,7 +1852,7 @@ static DWORD get_udp_table_sizes( UDP_TABLE_CLASS class, DWORD row_count, DWORD static MIB_UDPTABLE *append_udp_row( UDP_TABLE_CLASS class, HANDLE heap, DWORD flags, MIB_UDPTABLE *table, DWORD *count, - const MIB_UDPROW_OWNER_PID *row, DWORD row_size ) + const MIB_UDPROW_OWNER_MODULE *row, DWORD row_size ) { if (table->dwNumEntries >= *count) { @@ -1881,7 +1887,7 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE DWORD *size ) { MIB_UDPTABLE *table; - MIB_UDPROW_OWNER_PID row; + MIB_UDPROW_OWNER_MODULE row; DWORD ret = NO_ERROR, count = 16, table_size, row_size; if (!(table_size = get_udp_table_sizes( class, count, &row_size ))) @@ -1904,7 +1910,8 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE unsigned int dummy, num_entries = 0; int inode; - if (class == UDP_TABLE_OWNER_PID) map = get_pid_map( &num_entries ); + if (class == UDP_TABLE_OWNER_PID || class == UDP_TABLE_OWNER_MODULE) + map = get_pid_map( &num_entries ); /* skip header line */ ptr = fgets( buf, sizeof(buf), fp ); @@ -1914,7 +1921,7 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE &row.dwLocalAddr, &row.dwLocalPort, &inode ) != 4) continue; row.dwLocalPort = htons( row.dwLocalPort ); - if (class == UDP_TABLE_OWNER_PID) + if (class == UDP_TABLE_OWNER_PID || class == UDP_TABLE_OWNER_MODULE) row.dwOwningPid = find_owning_pid( map, num_entries, inode ); if (!(table = append_udp_row( class, heap, flags, table, &count, &row, row_size ))) break; diff --git a/include/udpmib.h b/include/udpmib.h index c2d507f..6b3f51c 100644 --- a/include/udpmib.h +++ b/include/udpmib.h @@ -48,6 +48,29 @@ typedef struct _MIB_UDPTABLE_OWNER_PID MIB_UDPROW_OWNER_PID table[1]; } MIB_UDPTABLE_OWNER_PID, *PMIB_UDPTABLE_OWNER_PID; +typedef struct _MIB_UDPROW_OWNER_MODULE +{ + DWORD dwLocalAddr; + DWORD dwLocalPort; + DWORD dwOwningPid; + LARGE_INTEGER liCreateTimestamp; + __C89_NAMELESS union + { + __C89_NAMELESS struct + { + int SpecificPortBind:1; + } __C89_NAMELESSSTRUCTNAME; + int dwFlags; + } __C89_NAMELESSUNIONNAME; + ULONGLONG OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE]; +} MIB_UDPROW_OWNER_MODULE, *PMIB_UDPROW_OWNER_MODULE; + +typedef struct _MIB_UDPTABLE_OWNER_MODULE +{ + DWORD dwNumEntries; + MIB_UDPROW_OWNER_MODULE table[1]; +} MIB_UDPTABLE_OWNER_MODULE, *PMIB_UDPTABLE_OWNER_MODULE; + /* UDP statistics */ typedef struct _MIB_UDPSTATS From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Jacek Caban : vbscript: Fixed class_desc_t leak. Message-ID: Module: wine Branch: master Commit: bac5fdc85f231abda5b9ac49d4d0d1617fce44a0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bac5fdc85f231abda5b9ac49d4d0d1617fce44a0 Author: Jacek Caban Date: Fri Sep 7 15:08:59 2012 +0200 vbscript: Fixed class_desc_t leak. --- dlls/vbscript/vbscript.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index f842bba..095e3ae 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -115,6 +115,8 @@ static HRESULT set_ctx_site(VBScript *This) static void release_script(script_ctx_t *ctx) { + class_desc_t *class_desc; + collect_objects(ctx); release_dynamic_vars(ctx->global_vars); @@ -130,6 +132,13 @@ static void release_script(script_ctx_t *ctx) heap_free(iter); } + while(ctx->procs) { + class_desc = ctx->procs; + ctx->procs = class_desc->next; + + heap_free(class_desc); + } + if(ctx->host_global) { IDispatch_Release(ctx->host_global); ctx->host_global = NULL; From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Jacek Caban : vbscript: Use separated IDispatchEx implementation for script dispatch. Message-ID: Module: wine Branch: master Commit: 8121f73273d475a9b5961763a66d398fa6640aa1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8121f73273d475a9b5961763a66d398fa6640aa1 Author: Jacek Caban Date: Fri Sep 7 15:09:34 2012 +0200 vbscript: Use separated IDispatchEx implementation for script dispatch. --- dlls/vbscript/global.c | 3 +- dlls/vbscript/vbdisp.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/vbscript/vbscript.c | 5 +- dlls/vbscript/vbscript.h | 10 ++- 4 files changed, 195 insertions(+), 5 deletions(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 55c1acc..3c28e96 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -1825,8 +1825,7 @@ HRESULT init_global(script_ctx_t *ctx) if(FAILED(hres)) return hres; - ctx->script_desc.ctx = ctx; - hres = create_vbdisp(&ctx->script_desc, &ctx->script_obj); + hres = create_script_disp(ctx, &ctx->script_obj); if(FAILED(hres)) return hres; diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index f6e3f11..b7945d8 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -565,6 +565,188 @@ HRESULT create_procedure_disp(script_ctx_t *ctx, vbscode_t *code, IDispatch **re return S_OK; } +static inline ScriptDisp *ScriptDisp_from_IDispatchEx(IDispatchEx *iface) +{ + return CONTAINING_RECORD(iface, ScriptDisp, IDispatchEx_iface); +} + +static HRESULT WINAPI ScriptDisp_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = &This->IDispatchEx_iface; + }else if(IsEqualGUID(&IID_IDispatch, riid)) { + TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); + *ppv = &This->IDispatchEx_iface; + }else if(IsEqualGUID(&IID_IDispatchEx, riid)) { + TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv); + *ppv = &This->IDispatchEx_iface; + }else { + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI ScriptDisp_AddRef(IDispatchEx *iface) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI ScriptDisp_Release(IDispatchEx *iface) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if(!ref) { + assert(!This->ctx); + heap_free(This); + } + + return ref; +} + +static HRESULT WINAPI ScriptDisp_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + + TRACE("(%p)->(%p)\n", This, pctinfo); + + *pctinfo = 1; + return S_OK; +} + +static HRESULT WINAPI ScriptDisp_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_GetIDsOfNames(IDispatchEx *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, LCID lcid, + DISPID *rgDispId) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_Invoke(IDispatchEx *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid); + return DISP_E_UNKNOWNNAME; +} + +static HRESULT WINAPI ScriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); + return DISP_E_MEMBERNOTFOUND; +} + +static HRESULT WINAPI ScriptDisp_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%x)\n", This, id); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%x %p)\n", This, id, pbstrName); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%x %x %p)\n", This, grfdex, id, pid); + return E_NOTIMPL; +} + +static HRESULT WINAPI ScriptDisp_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) +{ + ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + FIXME("(%p)->(%p)\n", This, ppunk); + return E_NOTIMPL; +} + +static IDispatchExVtbl ScriptDispVtbl = { + ScriptDisp_QueryInterface, + ScriptDisp_AddRef, + ScriptDisp_Release, + ScriptDisp_GetTypeInfoCount, + ScriptDisp_GetTypeInfo, + ScriptDisp_GetIDsOfNames, + ScriptDisp_Invoke, + ScriptDisp_GetDispID, + ScriptDisp_InvokeEx, + ScriptDisp_DeleteMemberByName, + ScriptDisp_DeleteMemberByDispID, + ScriptDisp_GetMemberProperties, + ScriptDisp_GetMemberName, + ScriptDisp_GetNextDispID, + ScriptDisp_GetNameSpaceParent +}; + +HRESULT create_script_disp(script_ctx_t *ctx, ScriptDisp **ret) +{ + ScriptDisp *script_disp; + + script_disp = heap_alloc(sizeof(*script_disp)); + if(!script_disp) + return E_OUTOFMEMORY; + + script_disp->IDispatchEx_iface.lpVtbl = &ScriptDispVtbl; + script_disp->ref = 1; + script_disp->ctx = ctx; + + *ret = script_disp; + return S_OK; +} + void collect_objects(script_ctx_t *ctx) { vbdisp_t *iter, *iter2; diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index 095e3ae..05132a6 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -165,8 +165,11 @@ static void release_script(script_ctx_t *ctx) } if(ctx->script_obj) { - IDispatchEx_Release(&ctx->script_obj->IDispatchEx_iface); + ScriptDisp *script_obj = ctx->script_obj; + ctx->script_obj = NULL; + script_obj->ctx = NULL; + IDispatchEx_Release(&script_obj->IDispatchEx_iface); } vbsheap_free(&ctx->heap); diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 8a316ab..306cfed 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -116,6 +116,12 @@ struct _vbdisp_t { VARIANT props[1]; }; +typedef struct { + IDispatchEx IDispatchEx_iface; + LONG ref; + script_ctx_t *ctx; +} ScriptDisp; + HRESULT create_vbdisp(const class_desc_t*,vbdisp_t**) DECLSPEC_HIDDEN; HRESULT disp_get_id(IDispatch*,BSTR,vbdisp_invoke_type_t,BOOL,DISPID*) DECLSPEC_HIDDEN; HRESULT vbdisp_get_id(vbdisp_t*,BSTR,vbdisp_invoke_type_t,BOOL,DISPID*) DECLSPEC_HIDDEN; @@ -123,6 +129,7 @@ HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*,VARIANT*) DECLSPEC HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*) DECLSPEC_HIDDEN; void collect_objects(script_ctx_t*) DECLSPEC_HIDDEN; HRESULT create_procedure_disp(script_ctx_t*,vbscode_t*,IDispatch**) DECLSPEC_HIDDEN; +HRESULT create_script_disp(script_ctx_t*,ScriptDisp**) DECLSPEC_HIDDEN; static inline unsigned arg_cnt(const DISPPARAMS *dp) { @@ -150,8 +157,7 @@ struct _script_ctx_t { IDispatch *host_global; - class_desc_t script_desc; - vbdisp_t *script_obj; + ScriptDisp *script_obj; class_desc_t global_desc; vbdisp_t *global_obj; From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Jacek Caban : vbscript: Added ScriptDisp::GetDispID implementation. Message-ID: Module: wine Branch: master Commit: 40001df45db90b70710b9fec7fad419322301ad3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=40001df45db90b70710b9fec7fad419322301ad3 Author: Jacek Caban Date: Fri Sep 7 15:09:59 2012 +0200 vbscript: Added ScriptDisp::GetDispID implementation. --- dlls/vbscript/vbdisp.c | 85 ++++++++++++++++++++++++++++++++++++++++++++- dlls/vbscript/vbscript.h | 7 ++++ 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index b7945d8..4f473e2 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -565,6 +565,44 @@ HRESULT create_procedure_disp(script_ctx_t *ctx, vbscode_t *code, IDispatch **re return S_OK; } +struct _ident_map_t { + const WCHAR *name; + BOOL is_var; + union { + dynamic_var_t *var; + function_t *func; + } u; +}; + +static inline DISPID ident_to_id(ScriptDisp *This, ident_map_t *ident) +{ + return (ident-This->ident_map)+1; +} + +static ident_map_t *add_ident(ScriptDisp *This, const WCHAR *name) +{ + ident_map_t *ret; + + if(!This->ident_map_size) { + This->ident_map = heap_alloc(4 * sizeof(*This->ident_map)); + if(!This->ident_map) + return NULL; + This->ident_map_size = 4; + }else if(This->ident_map_cnt == This->ident_map_size) { + ident_map_t *new_map; + + new_map = heap_realloc(This->ident_map, 2*This->ident_map_size*sizeof(*new_map)); + if(!new_map) + return NULL; + This->ident_map = new_map; + This->ident_map_size *= 2; + } + + ret = This->ident_map + This->ident_map_cnt++; + ret->name = name; + return ret; +} + static inline ScriptDisp *ScriptDisp_from_IDispatchEx(IDispatchEx *iface) { return CONTAINING_RECORD(iface, ScriptDisp, IDispatchEx_iface); @@ -612,6 +650,7 @@ static ULONG WINAPI ScriptDisp_Release(IDispatchEx *iface) if(!ref) { assert(!This->ctx); + heap_free(This->ident_map); heap_free(This); } @@ -659,7 +698,49 @@ static HRESULT WINAPI ScriptDisp_Invoke(IDispatchEx *iface, DISPID dispIdMember, static HRESULT WINAPI ScriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) { ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); - FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid); + dynamic_var_t *var; + ident_map_t *ident; + function_t *func; + + TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid); + + if(!This->ctx) + return E_UNEXPECTED; + + for(ident = This->ident_map; ident < This->ident_map+This->ident_map_cnt; ident++) { + if(!strcmpiW(ident->name, bstrName)) { + *pid = ident_to_id(This, ident); + return S_OK; + } + } + + for(var = This->ctx->global_vars; var; var = var->next) { + if(!strcmpiW(var->name, bstrName)) { + ident = add_ident(This, var->name); + if(!ident) + return E_OUTOFMEMORY; + + ident->is_var = TRUE; + ident->u.var = var; + *pid = ident_to_id(This, ident); + return S_OK; + } + } + + for(func = This->ctx->global_funcs; func; func = func->next) { + if(!strcmpiW(func->name, bstrName)) { + ident = add_ident(This, func->name); + if(!ident) + return E_OUTOFMEMORY; + + ident->is_var = FALSE; + ident->u.func = func; + *pid = ident_to_id(This, ident); + return S_OK; + } + } + + *pid = -1; return DISP_E_UNKNOWNNAME; } @@ -735,7 +816,7 @@ HRESULT create_script_disp(script_ctx_t *ctx, ScriptDisp **ret) { ScriptDisp *script_disp; - script_disp = heap_alloc(sizeof(*script_disp)); + script_disp = heap_alloc_zero(sizeof(*script_disp)); if(!script_disp) return E_OUTOFMEMORY; diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 306cfed..77cf0e7 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -116,9 +116,16 @@ struct _vbdisp_t { VARIANT props[1]; }; +typedef struct _ident_map_t ident_map_t; + typedef struct { IDispatchEx IDispatchEx_iface; LONG ref; + + ident_map_t *ident_map; + unsigned ident_map_cnt; + unsigned ident_map_size; + script_ctx_t *ctx; } ScriptDisp; From julliard at winehq.org Fri Sep 7 13:26:21 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:21 -0500 Subject: Jacek Caban : vbscript: Added ScriptDisp::InvokeEx implementation. Message-ID: Module: wine Branch: master Commit: 11d2dfaea9eb99c3bebfbb47658742de892e28f3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=11d2dfaea9eb99c3bebfbb47658742de892e28f3 Author: Jacek Caban Date: Fri Sep 7 15:10:17 2012 +0200 vbscript: Added ScriptDisp::InvokeEx implementation. --- dlls/vbscript/vbdisp.c | 33 ++++++++++++++++++++++++++++++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 4f473e2..a76660e 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -97,7 +97,7 @@ static VARIANT *get_propput_arg(const DISPPARAMS *dp) return NULL; } -static HRESULT invoke_variant_prop(vbdisp_t *This, VARIANT *v, WORD flags, DISPPARAMS *dp, VARIANT *res) +static HRESULT invoke_variant_prop(VARIANT *v, WORD flags, DISPPARAMS *dp, VARIANT *res) { HRESULT hres; @@ -403,7 +403,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc } if(id < This->desc->prop_cnt + This->desc->func_cnt) - return invoke_variant_prop(This, This->props+(id-This->desc->func_cnt), wFlags, pdp, pvarRes); + return invoke_variant_prop(This->props+(id-This->desc->func_cnt), wFlags, pdp, pvarRes); if(This->desc->builtin_prop_cnt) { unsigned min = 0, max = This->desc->builtin_prop_cnt-1, i; @@ -579,6 +579,11 @@ static inline DISPID ident_to_id(ScriptDisp *This, ident_map_t *ident) return (ident-This->ident_map)+1; } +static inline ident_map_t *id_to_ident(ScriptDisp *This, DISPID id) +{ + return 0 < id && id <= This->ident_map_cnt ? This->ident_map+id-1 : NULL; +} + static ident_map_t *add_ident(ScriptDisp *This, const WCHAR *name) { ident_map_t *ret; @@ -748,8 +753,30 @@ static HRESULT WINAPI ScriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) { ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); + ident_map_t *ident; + HRESULT hres; + TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); - return DISP_E_MEMBERNOTFOUND; + + ident = id_to_ident(This, id); + if(!ident) + return DISP_E_MEMBERNOTFOUND; + + if(ident->is_var) { + if(ident->u.var->is_const) { + FIXME("const not supported\n"); + return E_NOTIMPL; + } + + return invoke_variant_prop(&ident->u.var->v, wFlags, pdp, pvarRes); + } + + + IActiveScriptSite_OnEnterScript(This->ctx->site); + hres = exec_script(This->ctx, ident->u.func, NULL, pdp, pvarRes); + IActiveScriptSite_OnLeaveScript(This->ctx->site); + + return hres; } static HRESULT WINAPI ScriptDisp_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) From julliard at winehq.org Fri Sep 7 13:26:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:22 -0500 Subject: Jacek Caban : vbscript: Added ScriptDisp tests. Message-ID: Module: wine Branch: master Commit: c2dbc6bfaabefea0c6382001cae88da9a5219a7a URL: http://source.winehq.org/git/wine.git/?a=commit;h=c2dbc6bfaabefea0c6382001cae88da9a5219a7a Author: Jacek Caban Date: Fri Sep 7 15:10:38 2012 +0200 vbscript: Added ScriptDisp tests. --- dlls/vbscript/tests/vbscript.c | 152 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 152 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c index fe53854..ec53712 100644 --- a/dlls/vbscript/tests/vbscript.c +++ b/dlls/vbscript/tests/vbscript.c @@ -85,6 +85,18 @@ DEFINE_EXPECT(OnLeaveScript); DEFINE_GUID(CLSID_VBScript, 0xb54f3741, 0x5b07, 0x11cf, 0xa4,0xb0, 0x00,0xaa,0x00,0x4a,0x55,0xe8); +static BSTR a2bstr(const char *str) +{ + BSTR ret; + int len; + + len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); + ret = SysAllocStringLen(NULL, len-1); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); + + return ret; +} + #define test_state(s,ss) _test_state(__LINE__,s,ss) static void _test_state(unsigned line, IActiveScript *script, SCRIPTSTATE exstate) { @@ -318,6 +330,35 @@ static IDispatchEx *get_script_dispatch(IActiveScript *script) return dispex; } +static void parse_script(IActiveScriptParse *parse, const char *src) +{ + BSTR str; + HRESULT hres; + + SET_EXPECT(OnEnterScript); + SET_EXPECT(OnLeaveScript); + + str = a2bstr(src); + hres = IActiveScriptParse_ParseScriptText(parse, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); + SysFreeString(str); + ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + + CHECK_CALLED(OnEnterScript); + CHECK_CALLED(OnLeaveScript); +} + +#define get_disp_id(a,b,c,d) _get_disp_id(__LINE__,a,b,c,d) +static void _get_disp_id(unsigned line, IDispatchEx *dispex, const char *name, HRESULT exhres, DISPID *id) +{ + BSTR str; + HRESULT hres; + + str = a2bstr(name); + hres = IDispatchEx_GetDispID(dispex, str, 0, id); + SysFreeString(str); + ok_(__FILE__,line)(hres == exhres, "GetDispID(%s) returned %08x, expected %08x\n", name, hres, exhres); +} + static void test_no_script_dispatch(IActiveScript *script) { IDispatch *disp; @@ -341,6 +382,116 @@ static IActiveScript *create_vbscript(void) return ret; } +static void test_scriptdisp(void) +{ + IActiveScriptParse *parser; + IDispatchEx *script_disp; + IActiveScript *vbscript; + DISPID id, id2; + DISPPARAMS dp; + EXCEPINFO ei; + VARIANT v; + ULONG ref; + HRESULT hres; + + vbscript = create_vbscript(); + + hres = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParse, (void**)&parser); + ok(hres == S_OK, "Could not get IActiveScriptParse iface: %08x\n", hres); + + test_state(vbscript, SCRIPTSTATE_UNINITIALIZED); + test_safety(vbscript); + + SET_EXPECT(GetLCID); + hres = IActiveScript_SetScriptSite(vbscript, &ActiveScriptSite); + ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + CHECK_CALLED(GetLCID); + + test_state(vbscript, SCRIPTSTATE_UNINITIALIZED); + + SET_EXPECT(OnStateChange_INITIALIZED); + hres = IActiveScriptParse_InitNew(parser); + ok(hres == S_OK, "InitNew failed: %08x\n", hres); + CHECK_CALLED(OnStateChange_INITIALIZED); + + test_state(vbscript, SCRIPTSTATE_INITIALIZED); + + SET_EXPECT(OnStateChange_CONNECTED); + hres = IActiveScript_SetScriptState(vbscript, SCRIPTSTATE_CONNECTED); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_CONNECTED) failed: %08x\n", hres); + CHECK_CALLED(OnStateChange_CONNECTED); + + test_state(vbscript, SCRIPTSTATE_CONNECTED); + + script_disp = get_script_dispatch(vbscript); + + id = 100; + get_disp_id(script_disp, "LCase", DISP_E_UNKNOWNNAME, &id); + ok(id == -1, "id = %d, expected -1\n", id); + + get_disp_id(script_disp, "globalVariable", DISP_E_UNKNOWNNAME, &id); + parse_script(parser, "dim globalVariable\nglobalVariable = 3"); + get_disp_id(script_disp, "globalVariable", S_OK, &id); + + memset(&dp, 0, sizeof(dp)); + memset(&ei, 0, sizeof(ei)); + V_VT(&v) = VT_EMPTY; + hres = IDispatchEx_InvokeEx(script_disp, id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); + ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); + ok(V_I2(&v) == 3, "V_I2(v) = %d\n", V_I2(&v)); + + get_disp_id(script_disp, "globalVariable2", DISP_E_UNKNOWNNAME, &id); + parse_script(parser, "globalVariable2 = 4"); + get_disp_id(script_disp, "globalVariable2", S_OK, &id); + + get_disp_id(script_disp, "globalFunction", DISP_E_UNKNOWNNAME, &id); + parse_script(parser, "function globalFunction()\nglobalFunction=5\nend function"); + get_disp_id(script_disp, "globalFunction", S_OK, &id); + + SET_EXPECT(OnEnterScript); + SET_EXPECT(OnLeaveScript); + + memset(&dp, 0, sizeof(dp)); + memset(&ei, 0, sizeof(ei)); + V_VT(&v) = VT_EMPTY; + hres = IDispatchEx_InvokeEx(script_disp, id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); + ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v)); + ok(V_I2(&v) == 5, "V_I2(v) = %d\n", V_I2(&v)); + + CHECK_CALLED(OnEnterScript); + CHECK_CALLED(OnLeaveScript); + + get_disp_id(script_disp, "globalSub", DISP_E_UNKNOWNNAME, &id); + parse_script(parser, "sub globalSub()\nend sub"); + get_disp_id(script_disp, "globalSub", S_OK, &id); + get_disp_id(script_disp, "globalSub", S_OK, &id2); + ok(id == id2, "id != id2\n"); + + get_disp_id(script_disp, "constVariable", DISP_E_UNKNOWNNAME, &id); + parse_script(parser, "const constVariable = 6"); + get_disp_id(script_disp, "ConstVariable", S_OK, &id); + get_disp_id(script_disp, "Constvariable", S_OK, &id2); + ok(id == id2, "id != id2\n"); + + IDispatchEx_Release(script_disp); + + IActiveScriptParse_Release(parser); + + SET_EXPECT(OnStateChange_DISCONNECTED); + SET_EXPECT(OnStateChange_INITIALIZED); + SET_EXPECT(OnStateChange_CLOSED); + hres = IActiveScript_Close(vbscript); + ok(hres == S_OK, "Close failed: %08x\n", hres); + CHECK_CALLED(OnStateChange_DISCONNECTED); + CHECK_CALLED(OnStateChange_INITIALIZED); + CHECK_CALLED(OnStateChange_CLOSED); + + ref = IActiveScript_Release(vbscript); + ok(!ref, "ref = %d\n", ref); +} + static void test_vbscript(void) { IActiveScriptParseProcedure2 *parse_proc; @@ -644,6 +795,7 @@ START_TEST(vbscript) test_vbscript_release(); test_vbscript_simplecreate(); test_vbscript_initializing(); + test_scriptdisp(); }else { win_skip("VBScript engine not available\n"); } From julliard at winehq.org Fri Sep 7 13:26:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:22 -0500 Subject: Jacek Caban : jscript: Be more verbose about parser failure. Message-ID: Module: wine Branch: master Commit: 42d75be69d9fef4f59153337e8af2f85d7b30d34 URL: http://source.winehq.org/git/wine.git/?a=commit;h=42d75be69d9fef4f59153337e8af2f85d7b30d34 Author: Jacek Caban Date: Fri Sep 7 17:14:13 2012 +0200 jscript: Be more verbose about parser failure. --- dlls/jscript/parser.y | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index d108ab0..4c69ed9 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -21,6 +21,10 @@ #include "jscript.h" #include "engine.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(jscript); + #define YYLEX_PARAM ctx #define YYPARSE_PARAM ctx @@ -1516,6 +1520,8 @@ HRESULT script_parse(script_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite jsheap_clear(mark); hres = parser_ctx->hres; if(FAILED(hres)) { + WARN("parser failed around %s\n", + debugstr_w(parser_ctx->begin+20 > parser_ctx->ptr ? parser_ctx->begin : parser_ctx->ptr-20)); parser_release(parser_ctx); return hres; } From julliard at winehq.org Fri Sep 7 13:26:22 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Fri, 07 Sep 2012 13:26:22 -0500 Subject: Piotr Caban : msvcrt: Fixed strncpy_s behavior when count equals 0. Message-ID: Module: wine Branch: master Commit: bdf9a9f9bd56354f70a7431a9682183b84353211 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bdf9a9f9bd56354f70a7431a9682183b84353211 Author: Piotr Caban Date: Fri Sep 7 16:58:23 2012 +0200 msvcrt: Fixed strncpy_s behavior when count equals 0. --- dlls/msvcrt/heap.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 5eaf4a1..0a0d819 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -598,8 +598,11 @@ int CDECL strncpy_s(char *dest, MSVCRT_size_t numberOfElements, TRACE("(%s %lu %s %lu)\n", dest, numberOfElements, src, count); - if(!count) + if(!count) { + if(dest && numberOfElements) + *dest = 0; return 0; + } if (!MSVCRT_CHECK_PMT(dest != NULL)) return MSVCRT_EINVAL; if (!MSVCRT_CHECK_PMT(src != NULL)) return MSVCRT_EINVAL; From jnewman at winehq.org Mon Sep 10 13:37:59 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Mon, 10 Sep 2012 13:37:59 -0500 Subject: Kyle Auble : Redirect all status links to wiki Message-ID: Module: website Branch: master Commit: 983621fe65f3e4f8dca24a86bc722ea558654034 URL: http://source.winehq.org/git/website.git/?a=commit;h=983621fe65f3e4f8dca24a86bc722ea558654034 Author: Kyle Auble Date: Sat Sep 8 20:02:39 2012 -0700 Redirect all status links to wiki --- templates/en/status.template | 15 ++++++++++----- templates/he/status.template | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/templates/en/status.template b/templates/en/status.template index d740b16..1528a85 100644 --- a/templates/en/status.template +++ b/templates/en/status.template @@ -40,27 +40,32 @@ Status of APIs Implemented. -
    Core Status
    +
    Core Status
    Status of core Wine components, tools, and misc.
    -
    DLLs Status
    +
    DLLs Status
    Status of Windows DLL clones.
    -
    DirectX Status
    +
    DirectX Status
    Status of DirectX DLL clones.
    -
    Multimedia Status
    +
    Multimedia Status
    Status of multimedia elements.
    -
    UI Status
    +
    Tool Status
    +
    + Status of ancillary tool programs and scripts. +
    + +
    UI Status
    Status of user interface elements.
    diff --git a/templates/he/status.template b/templates/he/status.template index 42af425..463018a 100644 --- a/templates/he/status.template +++ b/templates/he/status.template @@ -39,27 +39,32 @@ ??? ???????? ?? API???????. -
    ??? ?????
    +
    ??? ?????
    ??? ????? ?????, ????? ???? ?? Wine.
    -
    ??? ??DLL??
    +
    ??? ??DLL??
    ??? ????? ??DLL ?? Windows.
    -
    ??? DirectX
    +
    ??? DirectX
    ??? ????? ??DLL ?? DirectX.
    -
    ??? ??????????
    +
    ??? ??????????
    ??? ????? ??????????.
    -
    ??? ???? ??????
    +
    ??? ??? ?????
    +
    + ??? ??? ????? ???????? ?????. +
    + +
    ??? ???? ??????
    ??? ????? ???? ??????.
    From jnewman at winehq.org Mon Sep 10 13:37:59 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Mon, 10 Sep 2012 13:37:59 -0500 Subject: Kyle Auble : Delete obsolete static status pages Message-ID: Module: website Branch: master Commit: c78badaabcceb22e9511c5a4711a6433e058d979 URL: http://source.winehq.org/git/website.git/?a=commit;h=c78badaabcceb22e9511c5a4711a6433e058d979 Author: Kyle Auble Date: Sat Sep 8 20:02:57 2012 -0700 Delete obsolete static status pages The main entry page with links is still in place. It may still come in handy, especially if the wiki status pages are only temporary. --- templates/en/status/directx.template | 317 ----------- templates/en/status/dlls.template | 918 ------------------------------- templates/en/status/multimedia.template | 257 --------- templates/en/status/ui.template | 493 ----------------- templates/en/status/wine.template | 624 --------------------- 5 files changed, 0 insertions(+), 2609 deletions(-) Diff: http://source.winehq.org/git/website.git/?a=commitdiff;h=c78badaabcceb22e9511c5a4711a6433e058d979 From jnewman at winehq.org Mon Sep 10 13:37:59 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Mon, 10 Sep 2012 13:37:59 -0500 Subject: Kyle Auble : Add IRC details to static page Message-ID: Module: website Branch: master Commit: 2d8660d190814bca018c1873c62f64eae4f843ec URL: http://source.winehq.org/git/website.git/?a=commit;h=2d8660d190814bca018c1873c62f64eae4f843ec Author: Kyle Auble Date: Sat Sep 8 20:03:12 2012 -0700 Add IRC details to static page Since IRC channels and policies should be quite stable, a static page seems more fitting than a wiki one. --- templates/en/irc.template | 117 ++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 105 insertions(+), 12 deletions(-) diff --git a/templates/en/irc.template b/templates/en/irc.template index 02c373a..a1a005e 100644 --- a/templates/en/irc.template +++ b/templates/en/irc.template @@ -1,19 +1,112 @@ - - + + -

    Live Support Chat

    +

    Live Community Chat

    -

    Freenode.net hosts an IRC channel for -Wine. You can access the chat room using an IRC program such as -X-Chat. Use the settings listed below.

    +

    Freenode.net hosts multiple IRC +channels for Wine. You can access the chat rooms using an IRC program such as +X-Chat with these settings:

    - Server: irc.freenode.net
    - Port: 6667
    - Channel: #winehq
    + Server: irc.freenode.net
    + Port: 6667
    -

    If you use Firefox or any other browser that supports IRC URLs, you can -join the chat by clicking on irc://irc.freenode.net/winehq.

    +

    Which channel you should pick depends on the issue you want to discuss:

    + +
    + #winehq: User support and help with running Wine
    + #crossover: User support and help with running Crossover
    + #winehackers: Development and other ways of contributing to + Wine
    + #winehq-social: Casual, off-topic chats with other community + members
    +
    + +

    Those using Firefox, or any other browser that supports IRC URLs, can join +a chat by clicking on:

    + + +

    In order to keep discussions focused and as helpful as possible, also try +to research your question some before asking about it on the IRC. The +Wine FAQ, +AppDB, and +download page are all good +resources to check first.

    + +

    IRC Rules and Penalties

    + +

    Besides not being offensive or blatantly inconsiderate, there are a few +simple rules that everyone is expected to follow on the IRC channels. In most +cases, breaking a rule will be seen as an accident at first and will result in +warnings. After you have used up your warnings though, you will be kicked from +the channel.

    + +

    If you continue to break a rule after using up your kicks, you will be +banned from the channel for up to 2 hours. Any problems after this will +result in an indefinite ban, which can only be overturned by appeal. If you +want to contest a ban, go to #winehq-social (or the +wine-devel mailing list if you've +been banned from #winehq-social), and explain why you believe you were +banned in the first place and why the ban should be lifted.

    -

     

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RuleClarificationWarningsKicks
    Do not spam.12
    Use a pastebin for pasting more than 1 or 2 lines.winehq.pastebin.com and + pastebin.ca both work well.05
    Talk in the appropriate channel.If unsure, ask in #winehq which channel to join.23
    Only Wine and Crossover are supported in their respective + channels.Sidenet, WineDoors, Cedega, IEs4Linux, etc. are not + supported.21
    Before asking for help in #winehq, be sure you're running + the latest version of Wine.If unsure, run wine --version in the command line to + determine your version31
    Please wait your turn for help.31
    Do not discuss pirated software.11
    From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Alexandre Julliard : user32: Fix DrawFocusRect to always invert the destination regardless of the text color . Message-ID: Module: wine Branch: master Commit: 57f869d5573f6c8165d280cbd7b0cf0f238c6d52 URL: http://source.winehq.org/git/wine.git/?a=commit;h=57f869d5573f6c8165d280cbd7b0cf0f238c6d52 Author: Alexandre Julliard Date: Sun Sep 9 11:48:06 2012 +0200 user32: Fix DrawFocusRect to always invert the destination regardless of the text color. --- dlls/user32/uitools.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/uitools.c b/dlls/user32/uitools.c index 2a3b9e4..f1ce0d6 100644 --- a/dlls/user32/uitools.c +++ b/dlls/user32/uitools.c @@ -1507,10 +1507,10 @@ BOOL WINAPI DrawFocusRect( HDC hdc, const RECT* rc ) hOldBrush = SelectObject(hdc, GetStockObject(NULL_BRUSH)); lb.lbStyle = BS_SOLID; - lb.lbColor = GetSysColor(COLOR_WINDOWTEXT); + lb.lbColor = 0; hNewPen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, NULL); hOldPen = SelectObject(hdc, hNewPen); - oldDrawMode = SetROP2(hdc, R2_XORPEN); + oldDrawMode = SetROP2(hdc, R2_NOT); oldBkMode = SetBkMode(hdc, TRANSPARENT); Rectangle(hdc, rc->left, rc->top, rc->right, rc->bottom); From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Alexandre Julliard : comctl32: XOR'ing with a black pen is not useful. Message-ID: Module: wine Branch: master Commit: 0e9c9772efdbaa3a6240a6eba8450580c48e2ab6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0e9c9772efdbaa3a6240a6eba8450580c48e2ab6 Author: Alexandre Julliard Date: Sun Sep 9 11:59:51 2012 +0200 comctl32: XOR'ing with a black pen is not useful. --- dlls/comctl32/header.c | 10 +--------- dlls/comctl32/listview.c | 10 ++-------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 0a40423..d1386e3 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -727,17 +727,9 @@ static void HEADER_DrawTrackLine (const HEADER_INFO *infoPtr, HDC hdc, INT x) { RECT rect; - HPEN hOldPen; - INT oldRop; GetClientRect (infoPtr->hwndSelf, &rect); - - hOldPen = SelectObject (hdc, GetStockObject (BLACK_PEN)); - oldRop = SetROP2 (hdc, R2_XORPEN); - MoveToEx (hdc, x, rect.top, NULL); - LineTo (hdc, x, rect.bottom); - SetROP2 (hdc, oldRop); - SelectObject (hdc, hOldPen); + PatBlt( hdc, x, rect.top, 1, rect.bottom - rect.top, DSTINVERT ); } /*** diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 3c9a0cb..b8e1ce3 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9264,21 +9264,15 @@ static BOOL LISTVIEW_Update(LISTVIEW_INFO *infoPtr, INT nItem) */ static BOOL LISTVIEW_DrawTrackLine(const LISTVIEW_INFO *infoPtr) { - HPEN hOldPen; HDC hdc; - INT oldROP; if (infoPtr->xTrackLine == -1) return FALSE; if (!(hdc = GetDC(infoPtr->hwndSelf))) return FALSE; - hOldPen = SelectObject(hdc, GetStockObject(BLACK_PEN)); - oldROP = SetROP2(hdc, R2_XORPEN); - MoveToEx(hdc, infoPtr->xTrackLine, infoPtr->rcList.top, NULL); - LineTo(hdc, infoPtr->xTrackLine, infoPtr->rcList.bottom); - SetROP2(hdc, oldROP); - SelectObject(hdc, hOldPen); + PatBlt( hdc, infoPtr->xTrackLine, infoPtr->rcList.top, + 1, infoPtr->rcList.bottom - infoPtr->rcList.top, DSTINVERT ); ReleaseDC(infoPtr->hwndSelf, hdc); return TRUE; } From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Alexandre Julliard : winex11: Get the information from the drawable structure in SwapBuffers. Message-ID: Module: wine Branch: master Commit: b4e3674747230f215ed63f2d536039c1dff9956e URL: http://source.winehq.org/git/wine.git/?a=commit;h=b4e3674747230f215ed63f2d536039c1dff9956e Author: Alexandre Julliard Date: Fri Sep 7 21:00:46 2012 +0200 winex11: Get the information from the drawable structure in SwapBuffers. --- dlls/winex11.drv/opengl.c | 59 +++++++++++++++++++++++---------------------- 1 files changed, 30 insertions(+), 29 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 6e0c0b7..32a10ac 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3028,7 +3028,9 @@ static void X11DRV_WineGL_LoadExtensions(void) */ static BOOL glxdrv_SwapBuffers(PHYSDEV dev) { - struct glx_physdev *physdev = get_glxdrv_dev( dev ); + enum x11drv_escape_codes code = X11DRV_FLUSH_GL_DRAWABLE; + struct gl_drawable *gl; + HWND hwnd; struct wgl_context *ctx = NtCurrentTeb()->glContext; TRACE("(%p)\n", dev->hdc); @@ -3040,36 +3042,35 @@ static BOOL glxdrv_SwapBuffers(PHYSDEV dev) return FALSE; } - if (!physdev->drawable) - { - WARN("Using an invalid drawable, skipping\n"); - SetLastError(ERROR_INVALID_HANDLE); - return FALSE; - } - sync_context(ctx); - switch (physdev->type) - { - case DC_GL_PIXMAP_WIN: - if(pglXCopySubBufferMESA) { - int w = physdev->x11dev->dc_rect.right - physdev->x11dev->dc_rect.left; - int h = physdev->x11dev->dc_rect.bottom - physdev->x11dev->dc_rect.top; - - /* (glX)SwapBuffers has an implicit glFlush effect, however - * GLX_MESA_copy_sub_buffer doesn't. Make sure GL is flushed before - * copying */ - pglFlush(); - if(w > 0 && h > 0) - pglXCopySubBufferMESA(gdi_display, physdev->drawable, 0, 0, w, h); - break; - } - /* fall through */ - default: - pglXSwapBuffers(gdi_display, physdev->drawable); - break; - } - flush_gl_drawable( physdev ); + hwnd = WindowFromDC( dev->hdc ); + EnterCriticalSection( &context_section ); + + if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&gl ) || + !XFindContext( gdi_display, (XID)dev->hdc, gl_pbuffer_context, (char **)&gl )) + { + switch (gl->type) + { + case DC_GL_PIXMAP_WIN: + if (pglXCopySubBufferMESA) { + /* (glX)SwapBuffers has an implicit glFlush effect, however + * GLX_MESA_copy_sub_buffer doesn't. Make sure GL is flushed before + * copying */ + pglFlush(); + pglXCopySubBufferMESA( gdi_display, gl->drawable, 0, 0, + gl->rect.right - gl->rect.left, gl->rect.bottom - gl->rect.top ); + break; + } + /* fall through */ + default: + pglXSwapBuffers(gdi_display, gl->drawable); + break; + } + } + LeaveCriticalSection( &context_section ); + + ExtEscape( dev->hdc, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, 0, NULL ); /* FPS support */ if (TRACE_ON(fps)) From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Alexandre Julliard : opengl32: Update the extension list. Message-ID: Module: wine Branch: master Commit: 9713a54b3353bd8072a561ceaf28d48633ba441d URL: http://source.winehq.org/git/wine.git/?a=commit;h=9713a54b3353bd8072a561ceaf28d48633ba441d Author: Alexandre Julliard Date: Fri Sep 7 20:53:06 2012 +0200 opengl32: Update the extension list. --- dlls/opengl32/make_opengl | 2 + dlls/opengl32/opengl_ext.c | 464 +++++++++++++++++++++++++++++++++++++++---- dlls/opengl32/opengl_norm.c | 136 ++++++++++++- include/wine/wgl_driver.h | 60 ++++++- 4 files changed, 612 insertions(+), 50 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=9713a54b3353bd8072a561ceaf28d48633ba441d From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Alexandre Julliard : gdi32: Move the SwapBuffers entry point to the OpenGL driver. Message-ID: Module: wine Branch: master Commit: 05c32b9b89b2abebde2d665863b4c959b064d064 URL: http://source.winehq.org/git/wine.git/?a=commit;h=05c32b9b89b2abebde2d665863b4c959b064d064 Author: Alexandre Julliard Date: Fri Sep 7 21:11:55 2012 +0200 gdi32: Move the SwapBuffers entry point to the OpenGL driver. --- dlls/gdi32/dibdrv/dc.c | 2 -- dlls/gdi32/dibdrv/opengl.c | 9 +++++++++ dlls/gdi32/driver.c | 6 ------ dlls/gdi32/enhmfdrv/init.c | 1 - dlls/gdi32/freetype.c | 1 - dlls/gdi32/mfdrv/init.c | 1 - dlls/gdi32/painting.c | 15 ++------------- dlls/gdi32/path.c | 1 - dlls/opengl32/make_opengl | 1 + dlls/opengl32/opengl_norm.c | 2 ++ dlls/opengl32/wgl.c | 27 +++++++++++++-------------- dlls/wineps.drv/init.c | 1 - dlls/winex11.drv/init.c | 1 - dlls/winex11.drv/opengl.c | 31 +++++++++++++------------------ dlls/winex11.drv/xrender.c | 1 - include/wine/gdi_driver.h | 3 +-- include/wine/wgl_driver.h | 3 ++- 17 files changed, 43 insertions(+), 63 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=05c32b9b89b2abebde2d665863b4c959b064d064 From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Alexandre Julliard : winex11: Move the fps tracing to opengl32. Message-ID: Module: wine Branch: master Commit: 025f4aed1ed67528141f8d709ec1aca76690279a URL: http://source.winehq.org/git/wine.git/?a=commit;h=025f4aed1ed67528141f8d709ec1aca76690279a Author: Alexandre Julliard Date: Fri Sep 7 21:28:15 2012 +0200 winex11: Move the fps tracing to opengl32. --- dlls/opengl32/wgl.c | 23 ++++++++++++++++++++++- dlls/winex11.drv/opengl.c | 20 -------------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 8ed2a0e..eb24b0f 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -41,6 +41,7 @@ #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wgl); +WINE_DECLARE_DEBUG_CHANNEL(fps); static HMODULE opengl32_handle; @@ -603,7 +604,27 @@ BOOL WINAPI DECLSPEC_HOTPATCH wglSwapBuffers( HDC hdc ) const struct opengl_funcs *funcs = get_dc_funcs( hdc ); if (!funcs || !funcs->wgl.p_wglSwapBuffers) return FALSE; - return funcs->wgl.p_wglSwapBuffers( hdc ); + if (!funcs->wgl.p_wglSwapBuffers( hdc )) return FALSE; + + if (TRACE_ON(fps)) + { + static long prev_time, start_time; + static unsigned long frames, frames_total; + + DWORD time = GetTickCount(); + frames++; + frames_total++; + /* every 1.5 seconds */ + if (time - prev_time > 1500) + { + TRACE_(fps)("@ approx %.2ffps, total %.2ffps\n", + 1000.0*frames/(time - prev_time), 1000.0*frames_total/(time - start_time)); + prev_time = time; + frames = 0; + if (start_time == 0) start_time = time; + } + } + return TRUE; } /*********************************************************************** diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 281c17e..eb9cd7f 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -57,7 +57,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl); #ifdef SONAME_LIBGL WINE_DECLARE_DEBUG_CHANNEL(winediag); -WINE_DECLARE_DEBUG_CHANNEL(fps); #include "wine/wgl_driver.h" #include "wine/wglext.h" @@ -3067,25 +3066,6 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) ExtEscape( hdc, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, 0, NULL ); - /* FPS support */ - if (TRACE_ON(fps)) - { - static long prev_time, start_time; - static unsigned long frames, frames_total; - - DWORD time = GetTickCount(); - frames++; - frames_total++; - /* every 1.5 seconds */ - if (time - prev_time > 1500) { - TRACE_(fps)("@ approx %.2ffps, total %.2ffps\n", - 1000.0*frames/(time - prev_time), 1000.0*frames_total/(time - start_time)); - prev_time = time; - frames = 0; - if(start_time == 0) start_time = time; - } - } - return ret; } From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Alexandre Julliard : winex11: Add helper functions to retrieve drawable information for a window or DC. Message-ID: Module: wine Branch: master Commit: 115d4881839d5b2c42fdefb449b21668b4fc5b91 URL: http://source.winehq.org/git/wine.git/?a=commit;h=115d4881839d5b2c42fdefb449b21668b4fc5b91 Author: Alexandre Julliard Date: Fri Sep 7 22:04:33 2012 +0200 winex11: Add helper functions to retrieve drawable information for a window or DC. --- dlls/winex11.drv/opengl.c | 175 +++++++++++++++++++++------------------------ 1 files changed, 81 insertions(+), 94 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=115d4881839d5b2c42fdefb449b21668b4fc5b91 From julliard at winehq.org Mon Sep 10 15:22:09 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:09 -0500 Subject: Marcus Meissner : gdi32: Fixed passed buffer size. Message-ID: Module: wine Branch: master Commit: f5c5a30724a87b544ee933e198b3e1e07c3a4538 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f5c5a30724a87b544ee933e198b3e1e07c3a4538 Author: Marcus Meissner Date: Fri Sep 7 20:34:33 2012 +0200 gdi32: Fixed passed buffer size. --- dlls/gdi32/tests/font.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 26d88ae..3f7af21 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4037,7 +4037,7 @@ static void test_fullname(void) bufA[0] = 0; ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, sizeof(bufW), TT_MS_LANGID_ENGLISH_UNITED_STATES); ok(ret, "face full name could not be read\n"); - WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, sizeof(bufW), NULL, FALSE); + WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, sizeof(bufA), NULL, FALSE); ok(!lstrcmpA(bufA, TestName[i]), "font full names don't match: %s != %s\n", TestName[i], bufA); SelectObject(hdc, of); DeleteObject(hfont); From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Henri Verbeet : d3d10core: Store the resource in the d3d10core rendertarget view. Message-ID: Module: wine Branch: master Commit: 739e302e6f0934b77c40f1cf439806167178feb7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=739e302e6f0934b77c40f1cf439806167178feb7 Author: Henri Verbeet Date: Sat Sep 8 11:26:23 2012 +0200 d3d10core: Store the resource in the d3d10core rendertarget view. --- dlls/d3d10core/d3d10core_private.h | 1 + dlls/d3d10core/view.c | 27 +++++++-------------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 885a2ef..153c5cc 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -140,6 +140,7 @@ struct d3d10_rendertarget_view struct wined3d_rendertarget_view *wined3d_view; D3D10_RENDER_TARGET_VIEW_DESC desc; + ID3D10Resource *resource; }; HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, diff --git a/dlls/d3d10core/view.c b/dlls/d3d10core/view.c index d038faa..a542e63 100644 --- a/dlls/d3d10core/view.c +++ b/dlls/d3d10core/view.c @@ -339,6 +339,7 @@ static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release(ID3D10RenderTarge if (!refcount) { wined3d_rendertarget_view_decref(This->wined3d_view); + ID3D10Resource_Release(This->resource); HeapFree(GetProcessHeap(), 0, This); } @@ -383,29 +384,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateDataInterface static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTargetView *iface, ID3D10Resource **resource) { - struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface); - struct wined3d_resource *wined3d_resource; - IUnknown *parent; - HRESULT hr; + struct d3d10_rendertarget_view *view = impl_from_ID3D10RenderTargetView(iface); TRACE("iface %p, resource %p\n", iface, resource); - wined3d_resource = wined3d_rendertarget_view_get_resource(This->wined3d_view); - if (!wined3d_resource) - { - ERR("Failed to get wined3d resource.\n"); - *resource = NULL; - return; - } - - parent = wined3d_resource_get_parent(wined3d_resource); - hr = IUnknown_QueryInterface(parent, &IID_ID3D10Resource, (void **)&resource); - if (FAILED(hr)) - { - ERR("Resource parent isn't a d3d10 resource, hr %#x\n", hr); - *resource = NULL; - return; - } + *resource = view->resource; + ID3D10Resource_AddRef(*resource); } /* ID3D10RenderTargetView methods */ @@ -470,6 +454,9 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, return hr; } + view->resource = resource; + ID3D10Resource_AddRef(resource); + return S_OK; } From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Henri Verbeet : wined3d: wined3d_device_set_viewport() never fails. Message-ID: Module: wine Branch: master Commit: 64aae8cf02d5620d3b78fb9c8d4d9f295d9afe18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=64aae8cf02d5620d3b78fb9c8d4d9f295d9afe18 Author: Henri Verbeet Date: Sat Sep 8 11:26:24 2012 +0200 wined3d: wined3d_device_set_viewport() never fails. --- dlls/d3d8/device.c | 5 ++--- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/device.c | 5 ++--- dlls/wined3d/device.c | 6 ++---- include/wine/wined3d.h | 2 +- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 36b8a7e..b4179eb 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1308,16 +1308,15 @@ static HRESULT WINAPI d3d8_device_MultiplyTransform(IDirect3DDevice8 *iface, static HRESULT WINAPI d3d8_device_SetViewport(IDirect3DDevice8 *iface, const D3DVIEWPORT8 *viewport) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); /* Note: D3DVIEWPORT8 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); + wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetViewport(IDirect3DDevice8 *iface, D3DVIEWPORT8 *viewport) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 0399ba3..6922e81 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1374,16 +1374,15 @@ static HRESULT WINAPI d3d9_device_MultiplyTransform(IDirect3DDevice9Ex *iface, static HRESULT WINAPI d3d9_device_SetViewport(IDirect3DDevice9Ex *iface, const D3DVIEWPORT9 *viewport) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); /* Note: D3DVIEWPORT9 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); + wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetViewport(IDirect3DDevice9Ex *iface, D3DVIEWPORT9 *viewport) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 24bd993..aec30de 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -4992,7 +4992,6 @@ static HRESULT WINAPI d3d_device7_Clear_FPUPreserve(IDirect3DDevice7 *iface, DWO static HRESULT d3d_device7_SetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *viewport) { struct d3d_device *device = impl_from_IDirect3DDevice7(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); @@ -5001,10 +5000,10 @@ static HRESULT d3d_device7_SetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *vi /* Note: D3DVIEWPORT7 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_set_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); + wined3d_device_set_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d_device7_SetViewport_FPUSetup(IDirect3DDevice7 *iface, D3DVIEWPORT7 *viewport) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7a57195..7753ae4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2291,7 +2291,7 @@ INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *devi return device->stateBlock->state.base_vertex_index; } -HRESULT CDECL wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport) +void CDECL wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport) { TRACE("device %p, viewport %p.\n", device, viewport); TRACE("x %u, y %u, w %u, h %u, min_z %.8e, max_z %.8e.\n", @@ -2304,12 +2304,10 @@ HRESULT CDECL wined3d_device_set_viewport(struct wined3d_device *device, const s if (device->isRecordingState) { TRACE("Recording... not performing anything\n"); - return WINED3D_OK; + return; } device_invalidate_state(device, STATE_VIEWPORT); - - return WINED3D_OK; } HRESULT CDECL wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index afb007c..fa8b417 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2239,7 +2239,7 @@ HRESULT __cdecl wined3d_device_set_transform(struct wined3d_device *device, HRESULT __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device, struct wined3d_vertex_declaration *declaration); HRESULT __cdecl wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader); -HRESULT __cdecl wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport); +void __cdecl wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport); HRESULT __cdecl wined3d_device_set_vs_consts_b(struct wined3d_device *device, UINT start_register, const BOOL *constants, UINT bool_count); HRESULT __cdecl wined3d_device_set_vs_consts_f(struct wined3d_device *device, From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Henri Verbeet : wined3d: wined3d_device_get_viewport() never fails. Message-ID: Module: wine Branch: master Commit: 3569b6ccd24e329c30693eba7af08f4fd06d7dfa URL: http://source.winehq.org/git/wine.git/?a=commit;h=3569b6ccd24e329c30693eba7af08f4fd06d7dfa Author: Henri Verbeet Date: Sat Sep 8 11:26:25 2012 +0200 wined3d: wined3d_device_get_viewport() never fails. --- dlls/d3d8/device.c | 5 ++--- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/device.c | 5 ++--- dlls/wined3d/device.c | 4 +--- include/wine/wined3d.h | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index b4179eb..5a029f2 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1322,16 +1322,15 @@ static HRESULT WINAPI d3d8_device_SetViewport(IDirect3DDevice8 *iface, const D3D static HRESULT WINAPI d3d8_device_GetViewport(IDirect3DDevice8 *iface, D3DVIEWPORT8 *viewport) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); /* Note: D3DVIEWPORT8 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_get_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); + wined3d_device_get_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_SetMaterial(IDirect3DDevice8 *iface, const D3DMATERIAL8 *material) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 6922e81..2e33c9f 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1388,16 +1388,15 @@ static HRESULT WINAPI d3d9_device_SetViewport(IDirect3DDevice9Ex *iface, const D static HRESULT WINAPI d3d9_device_GetViewport(IDirect3DDevice9Ex *iface, D3DVIEWPORT9 *viewport) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); /* Note: D3DVIEWPORT9 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_get_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); + wined3d_device_get_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_SetMaterial(IDirect3DDevice9Ex *iface, const D3DMATERIAL9 *material) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index aec30de..7848b0d 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5042,7 +5042,6 @@ static HRESULT WINAPI d3d_device7_SetViewport_FPUPreserve(IDirect3DDevice7 *ifac static HRESULT d3d_device7_GetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *viewport) { struct d3d_device *device = impl_from_IDirect3DDevice7(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); @@ -5051,10 +5050,10 @@ static HRESULT d3d_device7_GetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *vi /* Note: D3DVIEWPORT7 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_get_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); + wined3d_device_get_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr_ddraw_from_wined3d(hr); + return D3D_OK; } static HRESULT WINAPI d3d_device7_GetViewport_FPUSetup(IDirect3DDevice7 *iface, D3DVIEWPORT7 *viewport) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7753ae4..e0849ce 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2310,13 +2310,11 @@ void CDECL wined3d_device_set_viewport(struct wined3d_device *device, const stru device_invalidate_state(device, STATE_VIEWPORT); } -HRESULT CDECL wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport) +void CDECL wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport) { TRACE("device %p, viewport %p.\n", device, viewport); *viewport = device->stateBlock->state.viewport; - - return WINED3D_OK; } HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index fa8b417..1fa1342 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2168,7 +2168,7 @@ HRESULT __cdecl wined3d_device_get_transform(const struct wined3d_device *device HRESULT __cdecl wined3d_device_get_vertex_declaration(const struct wined3d_device *device, struct wined3d_vertex_declaration **declaration); struct wined3d_shader * __cdecl wined3d_device_get_vertex_shader(const struct wined3d_device *device); -HRESULT __cdecl wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport); +void __cdecl wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport); HRESULT __cdecl wined3d_device_get_vs_consts_b(const struct wined3d_device *device, UINT start_register, BOOL *constants, UINT bool_count); HRESULT __cdecl wined3d_device_get_vs_consts_f(const struct wined3d_device *device, From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Henri Verbeet : user32: Implement RegisterRawInputDevices(). Message-ID: Module: wine Branch: master Commit: 5befb959dd6f6e3567f0cd4fabd28b3b3b92966d URL: http://source.winehq.org/git/wine.git/?a=commit;h=5befb959dd6f6e3567f0cd4fabd28b3b3b92966d Author: Henri Verbeet Date: Sat Sep 8 11:26:26 2012 +0200 user32: Implement RegisterRawInputDevices(). --- dlls/user32/input.c | 41 +++++++++++++++++++++++++++++++++-- include/wine/server_protocol.h | 26 +++++++++++++++++++++- server/process.c | 7 ++++++ server/process.h | 7 ++++++ server/protocol.def | 14 ++++++++++++ server/queue.c | 46 ++++++++++++++++++++++++++++++++++++++++ server/request.h | 3 ++ server/trace.c | 26 ++++++++++++++++++++++ 8 files changed, 166 insertions(+), 4 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=5befb959dd6f6e3567f0cd4fabd28b3b3b92966d From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Dan Kegel : msvcp90: Handle npos as length in more places. Message-ID: Module: wine Branch: master Commit: 8e9e82f41eb0470de154d6b6a583fa15ea4ed176 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e9e82f41eb0470de154d6b6a583fa15ea4ed176 Author: Dan Kegel Date: Sat Sep 8 07:59:44 2012 -0700 msvcp90: Handle npos as length in more places. --- dlls/msvcp90/string.c | 12 ++++++------ dlls/msvcp90/tests/string.c | 8 +++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index fb2ba1a..740681f 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -1331,7 +1331,7 @@ int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len( if(this->size < pos) MSVCP__String_base_Xran(); - if(pos+num > this->size) + if(num > this->size-pos) num = this->size-pos; ans = MSVCP_char_traits_char_compare(basic_string_char_const_ptr(this)+pos, @@ -1378,7 +1378,7 @@ int __thiscall MSVCP_basic_string_char_compare_substr_substr( if(compare->size < off) MSVCP__String_base_Xran(); - if(off+count > compare->size) + if(count > compare->size-off) count = compare->size-off; return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num, @@ -2017,7 +2017,7 @@ basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char if(str->size < str_off) MSVCP__String_base_Xran(); - if(str_off+str_len > str->size) + if(str_len > str->size-str_off) str_len = str->size-str_off; return basic_string_char_replace_cstr_len(this, off, len, @@ -3265,7 +3265,7 @@ int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len( if(this->size < pos) MSVCP__String_base_Xran(); - if(pos+num > this->size) + if(num > this->size-pos) num = this->size-pos; ans = MSVCP_char_traits_wchar_compare(basic_string_wchar_const_ptr(this)+pos, @@ -3318,7 +3318,7 @@ int __thiscall MSVCP_basic_string_wchar_compare_substr_substr( if(compare->size < off) MSVCP__String_base_Xran(); - if(off+count > compare->size) + if(count > compare->size-off) count = compare->size-off; return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num, @@ -3980,7 +3980,7 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wc if(str->size < str_off) MSVCP__String_base_Xran(); - if(str_off+str_len > str->size) + if(str_len > str->size-str_off) str_len = str->size-str_off; return basic_string_wchar_replace_cstr_len(this, off, len, diff --git a/dlls/msvcp90/tests/string.c b/dlls/msvcp90/tests/string.c index 1e3ccec..511d846 100644 --- a/dlls/msvcp90/tests/string.c +++ b/dlls/msvcp90/tests/string.c @@ -17,6 +17,7 @@ */ #include +#include #include #include @@ -450,11 +451,12 @@ static void test_basic_string_char_append(void) { } static void test_basic_string_char_compare(void) { - basic_string_char str1, str2; + basic_string_char str1, str2, str3; int ret; call_func2(p_basic_string_char_ctor_cstr, &str1, "str1str"); call_func2(p_basic_string_char_ctor_cstr, &str2, "str9str"); + call_func2(p_basic_string_char_ctor_cstr, &str3, "splash.png"); ret = (int)call_func6(p_basic_string_char_compare_substr_substr, &str1, 0, 3, &str2, 0, 3); @@ -470,6 +472,9 @@ static void test_basic_string_char_compare(void) { &str1, 0, 1000, "str1str", 7); ok(ret == 0, "ret = %d\n", ret); ret = (int)call_func5(p_basic_string_char_compare_substr_cstr_len, + &str3, 6, UINT_MAX, ".png", 4); + ok(ret == 0, "ret = %d\n", ret); + ret = (int)call_func5(p_basic_string_char_compare_substr_cstr_len, &str1, 1, 2, "tr", 2); ok(ret == 0, "ret = %d\n", ret); ret = (int)call_func5(p_basic_string_char_compare_substr_cstr_len, @@ -481,6 +486,7 @@ static void test_basic_string_char_compare(void) { call_func1(p_basic_string_char_dtor, &str1); call_func1(p_basic_string_char_dtor, &str2); + call_func1(p_basic_string_char_dtor, &str3); } static void test_basic_string_char_concatenate(void) { From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Dan Kegel : vcomp: Better stub for _vcomp_set_num_threads. Message-ID: Module: wine Branch: master Commit: e45b5f556a68e00d2ba4eb8269708c3cb9be3309 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e45b5f556a68e00d2ba4eb8269708c3cb9be3309 Author: Dan Kegel Date: Wed Sep 5 19:05:54 2012 -0700 vcomp: Better stub for _vcomp_set_num_threads. --- dlls/vcomp/main.c | 5 +++++ dlls/vcomp/vcomp.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 82c8c94..1e51eef 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -41,6 +41,11 @@ double CDECL omp_get_wtime(void) return GetTickCount() / 1000.0; } +void CDECL _vcomp_set_num_threads(int num_threads) +{ + TRACE("(%d): stub\n", num_threads); +} + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec index 7a701ef..3e02bea 100644 --- a/dlls/vcomp/vcomp.spec +++ b/dlls/vcomp/vcomp.spec @@ -85,7 +85,7 @@ @ stub _vcomp_reduction_u8 @ stub _vcomp_sections_init @ stub _vcomp_sections_next -@ stub _vcomp_set_num_threads +@ cdecl _vcomp_set_num_threads(long) @ stub _vcomp_single_begin @ stub _vcomp_single_end @ stub omp_destroy_lock From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: =?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: winex11.drv: Remove unneeded variable definition. Message-ID: Module: wine Branch: master Commit: c67e48b9fa2bdb5e040aecaa4d0bf62b52ca15f1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c67e48b9fa2bdb5e040aecaa4d0bf62b52ca15f1 Author: Rico Sch?ller Date: Sun Sep 9 11:37:29 2012 +0200 winex11.drv: Remove unneeded variable definition. --- dlls/winex11.drv/xrandr.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index e17150b..968ff76 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -61,8 +61,6 @@ static RRMode *xrandr12_modes; #undef MAKE_FUNCPTR -extern int usexrandr; - static struct x11drv_mode_info *dd_modes; static SizeID *xrandr10_modes; static unsigned int xrandr_mode_count; From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Marcus Meissner : winecfg: Remove incorrect HeapFree (Coverity). Message-ID: Module: wine Branch: master Commit: 73d00515fe8354b2549feb1ee157c82cc3197d6a URL: http://source.winehq.org/git/wine.git/?a=commit;h=73d00515fe8354b2549feb1ee157c82cc3197d6a Author: Marcus Meissner Date: Mon Sep 10 09:38:32 2012 +0200 winecfg: Remove incorrect HeapFree (Coverity). --- programs/winecfg/winecfg.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index fa18e9b..ea116e8 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -503,7 +503,6 @@ static WCHAR **enumerate_valuesW(HKEY root, WCHAR *path) if (removed) /* this value was deleted by the user, so don't include it */ { - HeapFree(GetProcessHeap(), 0, name); i++; continue; } From julliard at winehq.org Mon Sep 10 15:22:10 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:10 -0500 Subject: Jacek Caban : vbscript: Added support for DISPATCH_PROPERTYGET in invoke_variant_prop. Message-ID: Module: wine Branch: master Commit: 24f4c09bb6a4b460623084af34c5bf85a88d5fa1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=24f4c09bb6a4b460623084af34c5bf85a88d5fa1 Author: Jacek Caban Date: Mon Sep 10 10:34:38 2012 +0200 vbscript: Added support for DISPATCH_PROPERTYGET in invoke_variant_prop. --- dlls/vbscript/tests/run.c | 6 ++++++ dlls/vbscript/vbdisp.c | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index 6a2b72a..0e292af 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -300,6 +300,12 @@ static void test_disp(IDispatch *disp) ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v)); ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v)); + dp.cArgs = dp.cNamedArgs = 0; + hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); + ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v)); + ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v)); + dp.cArgs = 1; hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL); ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres); diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index a76660e..1b2b8fe 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -103,6 +103,7 @@ static HRESULT invoke_variant_prop(VARIANT *v, WORD flags, DISPPARAMS *dp, VARIA switch(flags) { case DISPATCH_PROPERTYGET|DISPATCH_METHOD: + case DISPATCH_PROPERTYGET: if(dp->cArgs) { WARN("called with arguments\n"); return DISP_E_MEMBERNOTFOUND; /* That's what tests show */ From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Jacek Caban : mshtml: Use first script host's GUID as default script guid. Message-ID: Module: wine Branch: master Commit: 156e94429d8bbcf73c194e82864cc9ed2bee1771 URL: http://source.winehq.org/git/wine.git/?a=commit;h=156e94429d8bbcf73c194e82864cc9ed2bee1771 Author: Jacek Caban Date: Mon Sep 10 10:34:52 2012 +0200 mshtml: Use first script host's GUID as default script guid. --- dlls/mshtml/htmlwindow.c | 1 - dlls/mshtml/mshtml_private.h | 1 - dlls/mshtml/script.c | 18 ++++++++++-------- dlls/mshtml/tests/vbtest.html | 15 +++++++++++++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index bdec9b9..ed1fa2b 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2721,7 +2721,6 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, IMoniker *mon, init_dispex(&window->dispex, (IUnknown*)&window->base.IHTMLWindow2_iface, &HTMLWindow_dispex); window->task_magic = get_task_target_magic(); - window->current_script_guid = CLSID_JScript; if(mon) { IMoniker_AddRef(mon); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 18496aa..fa4e073 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -388,7 +388,6 @@ struct HTMLInnerWindow { HTMLDocumentNode *doc; struct list script_hosts; - GUID current_script_guid; IHTMLEventObj *event; diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 0fe4f5a..9aa875a 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -641,8 +641,6 @@ static void parse_text(ScriptHost *script_host, LPCWSTR text) TRACE("%s\n", debugstr_w(text)); - script_host->window->current_script_guid = script_host->guid; - VariantInit(&var); memset(&excepinfo, 0, sizeof(excepinfo)); TRACE(">>>\n"); @@ -722,6 +720,14 @@ static void parse_script_elem(ScriptHost *script_host, nsIDOMHTMLScriptElement * nsAString_Finish(&src_str); } +static GUID get_default_script_guid(HTMLInnerWindow *window) +{ + /* If not specified, we should use very first script host that was created for the page (or JScript if none) */ + return list_empty(&window->script_hosts) + ? CLSID_JScript + : LIST_ENTRY(list_head(&window->script_hosts), ScriptHost, entry)->guid; +} + static BOOL get_guid_from_type(LPCWSTR type, GUID *guid) { const WCHAR text_javascriptW[] = @@ -790,7 +796,7 @@ static BOOL get_script_guid(HTMLInnerWindow *window, nsIDOMHTMLScriptElement *ns if(*language) { ret = get_guid_from_language(language, guid); }else { - *guid = window->current_script_guid; + *guid = get_default_script_guid(window); ret = TRUE; } }else { @@ -871,7 +877,7 @@ IDispatch *script_parse_event(HTMLInnerWindow *window, LPCWSTR text) ptr++; }else { ptr = text; - guid = window->current_script_guid; + guid = get_default_script_guid(window); } if(IsEqualGUID(&CLSID_JScript, &guid) @@ -880,8 +886,6 @@ IDispatch *script_parse_event(HTMLInnerWindow *window, LPCWSTR text) return NULL; } - window->current_script_guid = guid; - script_host = get_script_host(window, &guid); if(!script_host || !script_host->parse_proc) return NULL; @@ -923,8 +927,6 @@ HRESULT exec_script(HTMLInnerWindow *window, const WCHAR *code, const WCHAR *lan return E_FAIL; } - window->current_script_guid = guid; - memset(&ei, 0, sizeof(ei)); TRACE(">>>\n"); hres = IActiveScriptParse_ParseScriptText(script_host->parse, code, NULL, NULL, delimW, 0, 0, SCRIPTTEXT_ISVISIBLE, ret, &ei); diff --git a/dlls/mshtml/tests/vbtest.html b/dlls/mshtml/tests/vbtest.html index 7b8cebc..b864abc 100644 --- a/dlls/mshtml/tests/vbtest.html +++ b/dlls/mshtml/tests/vbtest.html @@ -12,19 +12,30 @@ End Sub - + From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Jacek Caban : mshtml: Check if value is function only when it needs to be in invoke_builtin_prop . Message-ID: Module: wine Branch: master Commit: a4869de7fa5e72fe2daed6bdae11b934f4350aa3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a4869de7fa5e72fe2daed6bdae11b934f4350aa3 Author: Jacek Caban Date: Mon Sep 10 10:35:05 2012 +0200 mshtml: Check if value is function only when it needs to be in invoke_builtin_prop. --- dlls/mshtml/dispex.c | 12 ++++++------ dlls/mshtml/tests/vbtest.html | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index a3ac623..eca45a6 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -979,13 +979,13 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD if(FAILED(hres)) return hres; - if(V_VT(&v) != VT_DISPATCH) { - FIXME("Not a function %s\n", debugstr_variant(&v)); - VariantClear(&v); - return E_FAIL; - } - if(flags != (DISPATCH_PROPERTYGET|DISPATCH_METHOD)) { + if(V_VT(&v) != VT_DISPATCH) { + FIXME("Not a function %s\n", debugstr_variant(&v)); + VariantClear(&v); + return E_FAIL; + } + hres = invoke_disp_value(This, V_DISPATCH(&v), lcid, flags, dp, res, ei, caller); IDispatch_Release(V_DISPATCH(&v)); }else if(res) { diff --git a/dlls/mshtml/tests/vbtest.html b/dlls/mshtml/tests/vbtest.html index b864abc..f424b38 100644 --- a/dlls/mshtml/tests/vbtest.html +++ b/dlls/mshtml/tests/vbtest.html @@ -31,6 +31,7 @@ If true then counter = counter+1 Sub runTest() Call ok(counter = 6, "counter = " & counter) + Call ok(isNull(document.onkeyup), "document.onkeyup is not null") Call external.reportSuccess() End Sub From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Jacek Caban : vbscript: Added support for comparing to null. Message-ID: Module: wine Branch: master Commit: 167174d88b69c8b10c27d08a240c91db9d5088b3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=167174d88b69c8b10c27d08a240c91db9d5088b3 Author: Jacek Caban Date: Mon Sep 10 10:35:17 2012 +0200 vbscript: Added support for comparing to null. --- dlls/vbscript/interp.c | 30 ++++++++++++++++++++---------- dlls/vbscript/tests/lang.vbs | 13 +++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 28c1b14..3a078b5 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -279,6 +279,13 @@ static HRESULT stack_push(exec_ctx_t *ctx, VARIANT *v) return S_OK; } +static inline HRESULT stack_push_null(exec_ctx_t *ctx) +{ + VARIANT v; + V_VT(&v) = VT_NULL; + return stack_push(ctx, &v); +} + static void stack_popn(exec_ctx_t *ctx, unsigned n) { while(n--) @@ -1143,12 +1150,8 @@ static HRESULT interp_empty(exec_ctx_t *ctx) static HRESULT interp_null(exec_ctx_t *ctx) { - VARIANT v; - TRACE("\n"); - - V_VT(&v) = VT_NULL; - return stack_push(ctx, &v); + return stack_push_null(ctx); } static HRESULT interp_nothing(exec_ctx_t *ctx) @@ -1306,11 +1309,6 @@ static HRESULT var_cmp(exec_ctx_t *ctx, VARIANT *l, VARIANT *r) { TRACE("%s %s\n", debugstr_variant(l), debugstr_variant(r)); - if(V_VT(l) == VT_NULL || V_VT(r) == VT_NULL) { - FIXME("comparing nulls is not implemented\n"); - return E_NOTIMPL; - } - /* FIXME: Fix comparing string to number */ return VarCmp(l, r, ctx->script->lcid, 0); @@ -1345,6 +1343,8 @@ static HRESULT interp_equal(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; @@ -1361,6 +1361,8 @@ static HRESULT interp_nequal(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres != VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; @@ -1377,6 +1379,8 @@ static HRESULT interp_gt(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_GT ? VARIANT_TRUE : VARIANT_FALSE; @@ -1393,6 +1397,8 @@ static HRESULT interp_gteq(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_GT || hres == VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; @@ -1409,6 +1415,8 @@ static HRESULT interp_lt(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_LT ? VARIANT_TRUE : VARIANT_FALSE; @@ -1425,6 +1433,8 @@ static HRESULT interp_lteq(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_LT || hres == VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 2ba3e5a..3e105b6 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -144,6 +144,19 @@ Call ok(1 = 1 < 0, "! 1 = 1 < 0") Call ok(1 <= 2, "! 1 <= 2") Call ok(2 <= 2, "! 2 <= 2") +Call ok(isNull(0 = null), "'(0 = null)' is not null") +Call ok(isNull(null = 1), "'(null = 1)' is not null") +Call ok(isNull(0 > null), "'(0 > null)' is not null") +Call ok(isNull(null > 1), "'(null > 1)' is not null") +Call ok(isNull(0 < null), "'(0 < null)' is not null") +Call ok(isNull(null < 1), "'(null < 1)' is not null") +Call ok(isNull(0 <> null), "'(0 <> null)' is not null") +Call ok(isNull(null <> 1), "'(null <> 1)' is not null") +Call ok(isNull(0 >= null), "'(0 >= null)' is not null") +Call ok(isNull(null >= 1), "'(null >= 1)' is not null") +Call ok(isNull(0 <= null), "'(0 <= null)' is not null") +Call ok(isNull(null <= 1), "'(null <= 1)' is not null") + x = 3 Call ok(2+2 = 4, "2+2 = " & (2+2)) Call ok(false + 6 + true = 5, "false + 6 + true <> 5") From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Jacek Caban : vbscript: Added support for VT_NULL in stack_pop_bool. Message-ID: Module: wine Branch: master Commit: 81766a740e1c1816ba3869bf41832a3532ffa819 URL: http://source.winehq.org/git/wine.git/?a=commit;h=81766a740e1c1816ba3869bf41832a3532ffa819 Author: Jacek Caban Date: Mon Sep 10 10:35:29 2012 +0200 vbscript: Added support for VT_NULL in stack_pop_bool. --- dlls/vbscript/interp.c | 3 +++ dlls/vbscript/tests/lang.vbs | 6 ++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 3a078b5..3a5d9b2 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -373,6 +373,9 @@ static int stack_pop_bool(exec_ctx_t *ctx, BOOL *b) case VT_BOOL: *b = V_BOOL(val.v); break; + case VT_NULL: + *b = FALSE; + break; case VT_I2: *b = V_I2(val.v); break; diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 3e105b6..90d5304 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -434,6 +434,12 @@ do while true next loop +if null then call ok(false, "if null evaluated") + +while null + call ok(false, "while null evaluated") +wend + Call collectionObj.reset() y = 0 x = 10 From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Dmitry Timoshkov : windowscodecs: Add more tests for PNG metadata. Message-ID: Module: wine Branch: master Commit: 44e6a494d9d4e225e94b3dca67c9ef3d108d2f34 URL: http://source.winehq.org/git/wine.git/?a=commit;h=44e6a494d9d4e225e94b3dca67c9ef3d108d2f34 Author: Dmitry Timoshkov Date: Mon Sep 10 16:25:00 2012 +0900 windowscodecs: Add more tests for PNG metadata. --- dlls/windowscodecs/tests/metadata.c | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index acd9255..807e00a 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -504,9 +504,10 @@ struct test_data int count; /* if VT_VECTOR */ LONGLONG value[13]; const char *string; + const WCHAR id_string[32]; }; -static void compare_ifd_metadata(IWICMetadataReader *reader, const struct test_data *td, ULONG count) +static void compare_metadata(IWICMetadataReader *reader, const struct test_data *td, ULONG count) { HRESULT hr; IWICEnumMetadataItem *enumerator; @@ -530,8 +531,13 @@ static void compare_ifd_metadata(IWICMetadataReader *reader, const struct test_d ok(items_returned == 1, "unexpected item count %u\n", items_returned); ok(schema.vt == VT_EMPTY, "%u: unexpected vt: %u\n", i, schema.vt); - ok(id.vt == VT_UI2, "%u: unexpected vt: %u\n", i, id.vt); - ok(U(id).uiVal == td[i].id, "%u: expected id %#x, got %#x\n", i, td[i].id, U(id).uiVal); + ok(id.vt == VT_UI2 || id.vt == VT_LPWSTR, "%u: unexpected vt: %u\n", i, id.vt); + if (id.vt == VT_UI2) + ok(U(id).uiVal == td[i].id, "%u: expected id %#x, got %#x\n", i, td[i].id, U(id).uiVal); + else if (id.vt == VT_LPWSTR) + ok(!lstrcmpW(td[i].id_string, U(id).pwszVal), + "%u: expected %s, got %s\n", i, wine_dbgstr_w(td[i].id_string), wine_dbgstr_w(U(id).pwszVal)); + ok(value.vt == td[i].type, "%u: expected vt %#x, got %#x\n", i, td[i].type, value.vt); if (value.vt & VT_VECTOR) { @@ -670,7 +676,7 @@ static void test_metadata_IFD(void) ok(hr == S_OK, "GetCount error %#x\n", hr); ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); - compare_ifd_metadata(reader, td, count); + compare_metadata(reader, td, count); /* test IFD data with different endianness */ if (persist_options == WICPersistOptionsLittleEndian) @@ -685,7 +691,7 @@ static void test_metadata_IFD(void) hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); - compare_ifd_metadata(reader, td, count); + compare_metadata(reader, td, count); HeapFree(GetProcessHeap(), 0, IFD_data_swapped); hr = IWICMetadataReader_GetMetadataFormat(reader, &format); @@ -864,6 +870,15 @@ todo_wine static void test_metadata_png(void) { + static const struct test_data td[6] = + { + { VT_UI2, 0, 0, { 2005 }, NULL, { 'Y','e','a','r',0 } }, + { VT_UI1, 0, 0, { 6 }, NULL, { 'M','o','n','t','h',0 } }, + { VT_UI1, 0, 0, { 3 }, NULL, { 'D','a','y',0 } }, + { VT_UI1, 0, 0, { 15 }, NULL, { 'H','o','u','r',0 } }, + { VT_UI1, 0, 0, { 7 }, NULL, { 'M','i','n','u','t','e',0 } }, + { VT_UI1, 0, 0, { 45 }, NULL, { 'S','e','c','o','n','d',0 } } + }; IStream *stream; IWICBitmapDecoder *decoder; IWICBitmapFrameDecode *frame; @@ -926,6 +941,12 @@ static void test_metadata_png(void) broken(IsEqualGUID(&containerformat, &GUID_MetadataFormatUnknown)) /* Windows XP */, "unexpected container format\n"); + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == 6 || broken(count == 1) /* XP */, "expected 6, got %u\n", count); + if (count == 6) + compare_metadata(reader, td, count); + IWICMetadataReader_Release(reader); } From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Dmitry Timoshkov : windowscodecs: Add a bunch of GIF metadata tests. Message-ID: Module: wine Branch: master Commit: 248e9ef7c96c4e8af6f917c8678943cbe2eb8a3a URL: http://source.winehq.org/git/wine.git/?a=commit;h=248e9ef7c96c4e8af6f917c8678943cbe2eb8a3a Author: Dmitry Timoshkov Date: Mon Sep 10 16:25:47 2012 +0900 windowscodecs: Add a bunch of GIF metadata tests. --- dlls/windowscodecs/tests/metadata.c | 296 +++++++++++++++++++++++++++++++++++ include/wincodecsdk.idl | 3 + 2 files changed, 299 insertions(+), 0 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=248e9ef7c96c4e8af6f917c8678943cbe2eb8a3a From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Dmitry Timoshkov : include/wincodecsdk.idl: Fix a typo. Message-ID: Module: wine Branch: master Commit: 3ea74413c68e0b7e4f720121a2a704ae4f33335e URL: http://source.winehq.org/git/wine.git/?a=commit;h=3ea74413c68e0b7e4f720121a2a704ae4f33335e Author: Dmitry Timoshkov Date: Mon Sep 10 16:26:31 2012 +0900 include/wincodecsdk.idl: Fix a typo. --- dlls/windowscodecs/tests/info.c | 4 ++-- include/wincodecsdk.idl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c index 6eb20cb..6c393d7 100644 --- a/dlls/windowscodecs/tests/info.c +++ b/dlls/windowscodecs/tests/info.c @@ -422,7 +422,7 @@ todo_wine IWICComponentInfo_Release(info); - hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMBStructMetadataReader, &info); + hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMPStructMetadataReader, &info); todo_wine ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); @@ -440,7 +440,7 @@ todo_wine hr = IWICMetadataReaderInfo_GetCLSID(reader_info, &clsid); ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); - ok(IsEqualGUID(&CLSID_WICXMBStructMetadataReader, &clsid), "GetCLSID returned wrong result\n"); + ok(IsEqualGUID(&CLSID_WICXMPStructMetadataReader, &clsid), "GetCLSID returned wrong result\n"); hr = IWICMetadataReaderInfo_GetMetadataFormat(reader_info, &clsid); ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index db5162a..e681c64 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -53,7 +53,7 @@ cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataReader, 0x4b59afcc,0xb8c3,0x408a, cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataWriter, 0xb5ebafb9,0x253e,0x4a72,0xa7,0x44,0x07,0x62,0xd2,0x68,0x56,0x83);") cpp_quote("DEFINE_GUID(CLSID_WICIfdMetadataReader, 0x8f914656,0x9d0a,0x4eb2,0x90,0x19,0x0b,0xf9,0x6d,0x8a,0x9e,0xe6);") cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataReader, 0xd9403860,0x297f,0x4a49,0xbf,0x9b,0x77,0x89,0x81,0x50,0xa4,0x42);") -cpp_quote("DEFINE_GUID(CLSID_WICXMBStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") +cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position; From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Dmitry Timoshkov : include/wincodecsdk.idl: Add some missing metadata writer UIDs. Message-ID: Module: wine Branch: master Commit: 847cdf3fd0fe7229ccf2c13d8f98ffb7d826a2d8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=847cdf3fd0fe7229ccf2c13d8f98ffb7d826a2d8 Author: Dmitry Timoshkov Date: Mon Sep 10 16:26:57 2012 +0900 include/wincodecsdk.idl: Add some missing metadata writer UIDs. --- include/wincodecsdk.idl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index e681c64..fcf05b6 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -52,8 +52,11 @@ cpp_quote("DEFINE_GUID(CLSID_WICUnknownMetadataWriter, 0xa09cca86,0x27ba,0x4f39, cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataReader, 0x4b59afcc,0xb8c3,0x408a,0xb6,0x70,0x89,0xe5,0xfa,0xb6,0xfd,0xa7);") cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataWriter, 0xb5ebafb9,0x253e,0x4a72,0xa7,0x44,0x07,0x62,0xd2,0x68,0x56,0x83);") cpp_quote("DEFINE_GUID(CLSID_WICIfdMetadataReader, 0x8f914656,0x9d0a,0x4eb2,0x90,0x19,0x0b,0xf9,0x6d,0x8a,0x9e,0xe6);") +cpp_quote("DEFINE_GUID(CLSID_WICIfdMetadataWriter, 0xb1ebfc28,0xc9bd,0x47a2,0x8d,0x33,0xb9,0x48,0x76,0x97,0x77,0xa7);") cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataReader, 0xd9403860,0x297f,0x4a49,0xbf,0x9b,0x77,0x89,0x81,0x50,0xa4,0x42);") +cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataWriter, 0xc9a14cda,0xc339,0x460b,0x90,0x78,0xd4,0xde,0xbc,0xfa,0xbe,0x91);") cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") +cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataWriter, 0x22c21f93,0x7ddb,0x411c,0x9b,0x17,0xc5,0xb7,0xbd,0x06,0x4a,0xbc);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position; From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Dmitry Timoshkov : windowscodecs: Add a bunch of tests for Logical Screen Descriptor metadata reader. Message-ID: Module: wine Branch: master Commit: 0b0bf572c1e59f95bd8e8a49d32f67ad1ad01b38 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0b0bf572c1e59f95bd8e8a49d32f67ad1ad01b38 Author: Dmitry Timoshkov Date: Mon Sep 10 16:27:48 2012 +0900 windowscodecs: Add a bunch of tests for Logical Screen Descriptor metadata reader. --- dlls/windowscodecs/tests/metadata.c | 81 +++++++++++++++++++++++++++++++++++ include/wincodecsdk.idl | 2 + 2 files changed, 83 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 94a3d3e..6ebeb3e 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1258,6 +1258,86 @@ todo_wine IWICBitmapDecoder_Release(decoder); } +static void test_metadata_LSD(void) +{ + static const WCHAR LSD_name[] = {'L','o','g','i','c','a','l',' ','S','c','r','e','e','n',' ','D','e','s','c','r','i','p','t','o','r',' ','R','e','a','d','e','r',0}; + static const char LSD_data[] = "hello world!\x1\x2\x3\x4\xab\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf"; + static const struct test_data td[9] = + { + { VT_UI1|VT_VECTOR, 0, 6, {'w','o','r','l','d','!'}, NULL, { 'S','i','g','n','a','t','u','r','e',0 } }, + { VT_UI2, 0, 0, { 0x201 }, NULL, { 'W','i','d','t','h',0 } }, + { VT_UI2, 0, 0, { 0x403 }, NULL, { 'H','e','i','g','h','t',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'G','l','o','b','a','l','C','o','l','o','r','T','a','b','l','e','F','l','a','g',0 } }, + { VT_UI1, 0, 0, { 2 }, NULL, { 'C','o','l','o','r','R','e','s','o','l','u','t','i','o','n',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'S','o','r','t','F','l','a','g',0 } }, + { VT_UI1, 0, 0, { 3 }, NULL, { 'G','l','o','b','a','l','C','o','l','o','r','T','a','b','l','e','S','i','z','e',0 } }, + { VT_UI1, 0, 0, { 6 }, NULL, { 'B','a','c','k','g','r','o','u','n','d','C','o','l','o','r','I','n','d','e','x',0 } }, + { VT_UI1, 0, 0, { 7 }, NULL, { 'P','i','x','e','l','A','s','p','e','c','t','R','a','t','i','o',0 } } + }; + LARGE_INTEGER pos; + HRESULT hr; + IStream *stream; + IWICPersistStream *persist; + IWICMetadataReader *reader; + IWICMetadataHandlerInfo *info; + WCHAR name[64]; + UINT count, dummy; + GUID format; + CLSID id; + + hr = CoCreateInstance(&CLSID_WICLSDMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&reader); +todo_wine + ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, + "CoCreateInstance error %#x\n", hr); + + stream = create_stream(LSD_data, sizeof(LSD_data)); + + if (SUCCEEDED(hr)) + { + pos.QuadPart = 6; + hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + ok(hr == S_OK, "IStream_Seek error %#x\n", hr); + + hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); + ok(hr == S_OK, "QueryInterface error %#x\n", hr); + + hr = IWICPersistStream_Load(persist, stream); + ok(hr == S_OK, "Load error %#x\n", hr); + + IWICPersistStream_Release(persist); + } + + if (SUCCEEDED(hr)) + { + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); + + compare_metadata(reader, td, count); + + hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), "wrong format %s\n", debugstr_guid(&format)); + + hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); + ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); + + hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); + ok(hr == S_OK, "GetCLSID error %#x\n", hr); + ok(IsEqualGUID(&id, &CLSID_WICLSDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + + hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); + ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); + ok(lstrcmpW(name, LSD_name) == 0, "wrong LSD reader name %s\n", wine_dbgstr_w(name)); + + IWICMetadataHandlerInfo_Release(info); + IWICMetadataReader_Release(reader); + } + + IStream_Release(stream); +} + START_TEST(metadata) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1269,6 +1349,7 @@ START_TEST(metadata) test_create_reader(); test_metadata_png(); test_metadata_gif(); + test_metadata_LSD(); CoUninitialize(); } diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index fcf05b6..222ae64 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -57,6 +57,8 @@ cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataReader, 0xd9403860,0x297f,0x4a49,0xb cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataWriter, 0xc9a14cda,0xc339,0x460b,0x90,0x78,0xd4,0xde,0xbc,0xfa,0xbe,0x91);") cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataWriter, 0x22c21f93,0x7ddb,0x411c,0x9b,0x17,0xc5,0xb7,0xbd,0x06,0x4a,0xbc);") +cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataReader, 0x41070793,0x59e4,0x479a,0xa1,0xf7,0x95,0x4a,0xdc,0x2e,0xf5,0xfc);") +cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataWriter, 0x73c037e7,0xe5d9,0x4954,0x87,0x6a,0x6d,0xa8,0x1d,0x6e,0x57,0x68);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position; From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Dmitry Timoshkov : windowscodecs: Add a bunch of tests for Image Descriptor metadata reader. Message-ID: Module: wine Branch: master Commit: 7f93e0a6d2b3618b27c25ba36f323c21d32b0cde URL: http://source.winehq.org/git/wine.git/?a=commit;h=7f93e0a6d2b3618b27c25ba36f323c21d32b0cde Author: Dmitry Timoshkov Date: Mon Sep 10 16:28:39 2012 +0900 windowscodecs: Add a bunch of tests for Image Descriptor metadata reader. --- dlls/windowscodecs/tests/metadata.c | 80 +++++++++++++++++++++++++++++++++++ include/wincodecsdk.idl | 2 + 2 files changed, 82 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 6ebeb3e..fec283e 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1338,6 +1338,85 @@ todo_wine IStream_Release(stream); } +static void test_metadata_IMD(void) +{ + static const WCHAR IMD_name[] = {'I','m','a','g','e',' ','D','e','s','c','r','i','p','t','o','r',' ','R','e','a','d','e','r',0}; + static const char IMD_data[] = "hello world!\x1\x2\x3\x4\x5\x6\x7\x8\xed\xa\xb\xc\xd\xe\xf"; + static const struct test_data td[8] = + { + { VT_UI2, 0, 0, { 0x201 }, NULL, { 'L','e','f','t',0 } }, + { VT_UI2, 0, 0, { 0x403 }, NULL, { 'T','o','p',0 } }, + { VT_UI2, 0, 0, { 0x605 }, NULL, { 'W','i','d','t','h',0 } }, + { VT_UI2, 0, 0, { 0x807 }, NULL, { 'H','e','i','g','h','t',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'L','o','c','a','l','C','o','l','o','r','T','a','b','l','e','F','l','a','g',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'I','n','t','e','r','l','a','c','e','F','l','a','g',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'S','o','r','t','F','l','a','g',0 } }, + { VT_UI1, 0, 0, { 5 }, NULL, { 'L','o','c','a','l','C','o','l','o','r','T','a','b','l','e','S','i','z','e',0 } } + }; + LARGE_INTEGER pos; + HRESULT hr; + IStream *stream; + IWICPersistStream *persist; + IWICMetadataReader *reader; + IWICMetadataHandlerInfo *info; + WCHAR name[64]; + UINT count, dummy; + GUID format; + CLSID id; + + hr = CoCreateInstance(&CLSID_WICIMDMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&reader); +todo_wine + ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, + "CoCreateInstance error %#x\n", hr); + + stream = create_stream(IMD_data, sizeof(IMD_data)); + + if (SUCCEEDED(hr)) + { + pos.QuadPart = 12; + hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + ok(hr == S_OK, "IStream_Seek error %#x\n", hr); + + hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); + ok(hr == S_OK, "QueryInterface error %#x\n", hr); + + hr = IWICPersistStream_Load(persist, stream); + ok(hr == S_OK, "Load error %#x\n", hr); + + IWICPersistStream_Release(persist); + } + + if (SUCCEEDED(hr)) + { + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); + + compare_metadata(reader, td, count); + + hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), "wrong format %s\n", debugstr_guid(&format)); + + hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); + ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); + + hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); + ok(hr == S_OK, "GetCLSID error %#x\n", hr); + ok(IsEqualGUID(&id, &CLSID_WICIMDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + + hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); + ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); + ok(lstrcmpW(name, IMD_name) == 0, "wrong IMD reader name %s\n", wine_dbgstr_w(name)); + + IWICMetadataHandlerInfo_Release(info); + IWICMetadataReader_Release(reader); + } + + IStream_Release(stream); +} + START_TEST(metadata) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1350,6 +1429,7 @@ START_TEST(metadata) test_metadata_png(); test_metadata_gif(); test_metadata_LSD(); + test_metadata_IMD(); CoUninitialize(); } diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index 222ae64..ce7cf9f 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -59,6 +59,8 @@ cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataWriter, 0x22c21f93,0x7ddb,0x411c,0x9b,0x17,0xc5,0xb7,0xbd,0x06,0x4a,0xbc);") cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataReader, 0x41070793,0x59e4,0x479a,0xa1,0xf7,0x95,0x4a,0xdc,0x2e,0xf5,0xfc);") cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataWriter, 0x73c037e7,0xe5d9,0x4954,0x87,0x6a,0x6d,0xa8,0x1d,0x6e,0x57,0x68);") +cpp_quote("DEFINE_GUID(CLSID_WICIMDMetadataReader, 0x7447a267,0x0015,0x42c8,0xa8,0xf1,0xfb,0x3b,0x94,0xc6,0x83,0x61);") +cpp_quote("DEFINE_GUID(CLSID_WICIMDMetadataWriter, 0x8c89071f,0x452e,0x4e95,0x96,0x82,0x9d,0x10,0x24,0x62,0x71,0x72);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position; From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Dmitry Timoshkov : windowscodecs: Add a bunch of tests for Graphic Control Extension metadata reader. Message-ID: Module: wine Branch: master Commit: 2b5739269cd3de922994f638591bae2b7405194f URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b5739269cd3de922994f638591bae2b7405194f Author: Dmitry Timoshkov Date: Mon Sep 10 16:29:22 2012 +0900 windowscodecs: Add a bunch of tests for Graphic Control Extension metadata reader. --- dlls/windowscodecs/tests/metadata.c | 77 +++++++++++++++++++++++++++++++++++ include/wincodecsdk.idl | 2 + 2 files changed, 79 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index fec283e..4bb33ae 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1417,6 +1417,82 @@ todo_wine IStream_Release(stream); } +static void test_metadata_GCE(void) +{ + static const WCHAR GCE_name[] = {'G','r','a','p','h','i','c',' ','C','o','n','t','r','o','l',' ','E','x','t','e','n','s','i','o','n',' ','R','e','a','d','e','r',0}; + static const char GCE_data[] = "hello world!\xa\x2\x3\x4\x5\x6\x7\x8\xed\xa\xb\xc\xd\xe\xf"; + static const struct test_data td[5] = + { + { VT_UI1, 0, 0, { 2 }, NULL, { 'D','i','s','p','o','s','a','l',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'U','s','e','r','I','n','p','u','t','F','l','a','g',0 } }, + { VT_BOOL, 0, 0, { 0 }, NULL, { 'T','r','a','n','s','p','a','r','e','n','c','y','F','l','a','g',0 } }, + { VT_UI2, 0, 0, { 0x302 }, NULL, { 'D','e','l','a','y',0 } }, + { VT_UI1, 0, 0, { 4 }, NULL, { 'T','r','a','n','s','p','a','r','e','n','t','C','o','l','o','r','I','n','d','e','x',0 } } + }; + LARGE_INTEGER pos; + HRESULT hr; + IStream *stream; + IWICPersistStream *persist; + IWICMetadataReader *reader; + IWICMetadataHandlerInfo *info; + WCHAR name[64]; + UINT count, dummy; + GUID format; + CLSID id; + + hr = CoCreateInstance(&CLSID_WICGCEMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&reader); +todo_wine + ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, + "CoCreateInstance error %#x\n", hr); + + stream = create_stream(GCE_data, sizeof(GCE_data)); + + if (SUCCEEDED(hr)) + { + pos.QuadPart = 12; + hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + ok(hr == S_OK, "IStream_Seek error %#x\n", hr); + + hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); + ok(hr == S_OK, "QueryInterface error %#x\n", hr); + + hr = IWICPersistStream_Load(persist, stream); + ok(hr == S_OK, "Load error %#x\n", hr); + + IWICPersistStream_Release(persist); + } + + if (SUCCEEDED(hr)) + { + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); + + compare_metadata(reader, td, count); + + hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), "wrong format %s\n", debugstr_guid(&format)); + + hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); + ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); + + hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); + ok(hr == S_OK, "GetCLSID error %#x\n", hr); + ok(IsEqualGUID(&id, &CLSID_WICGCEMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + + hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); + ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); + ok(lstrcmpW(name, GCE_name) == 0, "wrong GCE reader name %s\n", wine_dbgstr_w(name)); + + IWICMetadataHandlerInfo_Release(info); + IWICMetadataReader_Release(reader); + } + + IStream_Release(stream); +} + START_TEST(metadata) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1430,6 +1506,7 @@ START_TEST(metadata) test_metadata_gif(); test_metadata_LSD(); test_metadata_IMD(); + test_metadata_GCE(); CoUninitialize(); } diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index ce7cf9f..2a5b389 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -61,6 +61,8 @@ cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataReader, 0x41070793,0x59e4,0x479a,0xa1 cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataWriter, 0x73c037e7,0xe5d9,0x4954,0x87,0x6a,0x6d,0xa8,0x1d,0x6e,0x57,0x68);") cpp_quote("DEFINE_GUID(CLSID_WICIMDMetadataReader, 0x7447a267,0x0015,0x42c8,0xa8,0xf1,0xfb,0x3b,0x94,0xc6,0x83,0x61);") cpp_quote("DEFINE_GUID(CLSID_WICIMDMetadataWriter, 0x8c89071f,0x452e,0x4e95,0x96,0x82,0x9d,0x10,0x24,0x62,0x71,0x72);") +cpp_quote("DEFINE_GUID(CLSID_WICGCEMetadataReader, 0xb92e345d,0xf52d,0x41f3,0xb5,0x62,0x08,0x1b,0xc7,0x72,0xe3,0xb9);") +cpp_quote("DEFINE_GUID(CLSID_WICGCEMetadataWriter, 0xaf95dc76,0x16b2,0x47f4,0xb3,0xea,0x3c,0x31,0x79,0x66,0x93,0xe7);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position; From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Alexandre Julliard : winex11: Disable client-side rendering for OpenGL windows. Message-ID: Module: wine Branch: master Commit: a39659fcc969eb547686e309c9ca4c02b3de13fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=a39659fcc969eb547686e309c9ca4c02b3de13fa Author: Alexandre Julliard Date: Mon Sep 10 16:16:05 2012 +0200 winex11: Disable client-side rendering for OpenGL windows. --- dlls/winex11.drv/opengl.c | 14 ++++++++++++++ dlls/winex11.drv/window.c | 1 + dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 9c1f6e5..d04791d 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1135,6 +1135,15 @@ static void release_gl_drawable( struct gl_drawable *gl ) if (gl) LeaveCriticalSection( &context_section ); } +BOOL has_gl_drawable( HWND hwnd ) +{ + struct gl_drawable *gl; + + gl = get_gl_drawable( hwnd, 0 ); + release_gl_drawable( gl ); + return gl != NULL; +} + static GLXContext create_glxcontext(Display *display, struct wgl_context *context, GLXContext shareList) { GLXContext ctx; @@ -3342,6 +3351,11 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) return FALSE; } +BOOL has_gl_drawable( HWND hwnd ) +{ + return FALSE; +} + void sync_gl_drawable( HWND hwnd, const RECT *visible_rect, const RECT *client_rect ) { } diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 8774670..16034ea 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2051,6 +2051,7 @@ void CDECL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flag if (!data->whole_window) return; if (swp_flags & SWP_HIDEWINDOW) return; if (data->whole_window == root_window) return; + if (has_gl_drawable( hwnd )) return; if (!client_side_graphics) return; surface_rect = get_surface_rect( visible_rect ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 73c89ee..1c4c341 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -558,6 +558,7 @@ extern Window X11DRV_get_whole_window( HWND hwnd ) DECLSPEC_HIDDEN; extern XIC X11DRV_get_ic( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL set_win_format( HWND hwnd, XID fbconfig_id ) DECLSPEC_HIDDEN; +extern BOOL has_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN; extern void sync_gl_drawable( HWND hwnd, const RECT *visible_rect, const RECT *client_rect ) DECLSPEC_HIDDEN; extern void destroy_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN; From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Alexandre Julliard : winex11: Remove support for icon windows, use a default icon instead. Message-ID: Module: wine Branch: master Commit: 64dc6561cd2b890867f810ac2220d99a04499b2b URL: http://source.winehq.org/git/wine.git/?a=commit;h=64dc6561cd2b890867f810ac2220d99a04499b2b Author: Alexandre Julliard Date: Tue Sep 4 17:14:46 2012 +0200 winex11: Remove support for icon windows, use a default icon instead. --- dlls/winex11.drv/window.c | 137 ++++++++++++-------------------------------- dlls/winex11.drv/x11drv.h | 1 - 2 files changed, 38 insertions(+), 100 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 16034ea..07f9d26 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -82,7 +82,6 @@ static Window user_time_window; static const char foreign_window_prop[] = "__wine_x11_foreign_window"; static const char whole_window_prop[] = "__wine_x11_whole_window"; -static const char icon_window_prop[] = "__wine_x11_icon_window"; static const char clip_window_prop[] = "__wine_x11_clip_window"; static const char managed_prop[] = "__wine_x11_managed"; @@ -449,48 +448,6 @@ static void sync_window_text( Display *display, Window win, const WCHAR *text ) /*********************************************************************** - * create_icon_window - */ -static Window create_icon_window( Display *display, struct x11drv_win_data *data ) -{ - XSetWindowAttributes attr; - - attr.event_mask = (ExposureMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | - ButtonPressMask | ButtonReleaseMask | EnterWindowMask); - attr.bit_gravity = NorthWestGravity; - attr.backing_store = NotUseful/*WhenMapped*/; - attr.colormap = X11DRV_PALETTE_PaletteXColormap; /* Needed due to our visual */ - - data->icon_window = XCreateWindow( display, root_window, 0, 0, - GetSystemMetrics( SM_CXICON ), - GetSystemMetrics( SM_CYICON ), - 0, screen_depth, - InputOutput, visual, - CWEventMask | CWBitGravity | CWBackingStore | CWColormap, &attr ); - XSaveContext( display, data->icon_window, winContext, (char *)data->hwnd ); - XFlush( display ); /* make sure the window exists before we start painting to it */ - - TRACE( "created %lx\n", data->icon_window ); - SetPropA( data->hwnd, icon_window_prop, (HANDLE)data->icon_window ); - return data->icon_window; -} - - - -/*********************************************************************** - * destroy_icon_window - */ -static void destroy_icon_window( Display *display, struct x11drv_win_data *data ) -{ - if (!data->icon_window) return; - XDeleteContext( display, data->icon_window, winContext ); - XDestroyWindow( display, data->icon_window ); - data->icon_window = 0; - RemovePropA( data->hwnd, icon_window_prop ); -} - - -/*********************************************************************** * get_bitmap_argb * * Return the bitmap bits in ARGB format. Helper for setting icon hints. @@ -624,11 +581,16 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data, HICON icon_big, HICON icon_small ) { XWMHints *hints = data->wm_hints; + ICONINFO ii, ii_small; + HDC hDC; + unsigned int size; + unsigned long *bits; if (!icon_big) { icon_big = (HICON)SendMessageW( data->hwnd, WM_GETICON, ICON_BIG, 0 ); if (!icon_big) icon_big = (HICON)GetClassLongPtrW( data->hwnd, GCLP_HICON ); + if (!icon_big) icon_big = LoadIconW( 0, (LPWSTR)IDI_WINLOGO ); } if (!icon_small) { @@ -640,63 +602,46 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data, if (data->icon_mask) XFreePixmap( gdi_display, data->icon_mask ); data->icon_pixmap = data->icon_mask = 0; - if (!icon_big) - { - if (!data->icon_window) create_icon_window( display, data ); - hints->icon_window = data->icon_window; - hints->flags = (hints->flags & ~(IconPixmapHint | IconMaskHint)) | IconWindowHint; - } - else - { - ICONINFO ii, ii_small; - HDC hDC; - unsigned int size; - unsigned long *bits; + if (!GetIconInfo(icon_big, &ii)) return; - if (!GetIconInfo(icon_big, &ii)) return; + hDC = CreateCompatibleDC(0); + bits = get_bitmap_argb( hDC, ii.hbmColor, ii.hbmMask, &size ); + if (bits && GetIconInfo( icon_small, &ii_small )) + { + unsigned int size_small; + unsigned long *bits_small, *new; - hDC = CreateCompatibleDC(0); - bits = get_bitmap_argb( hDC, ii.hbmColor, ii.hbmMask, &size ); - if (bits && GetIconInfo( icon_small, &ii_small )) + if ((bits_small = get_bitmap_argb( hDC, ii_small.hbmColor, ii_small.hbmMask, &size_small )) && + (bits_small[0] != bits[0] || bits_small[1] != bits[1])) /* size must be different */ { - unsigned int size_small; - unsigned long *bits_small, *new; - - if ((bits_small = get_bitmap_argb( hDC, ii_small.hbmColor, ii_small.hbmMask, &size_small )) && - (bits_small[0] != bits[0] || bits_small[1] != bits[1])) /* size must be different */ + if ((new = HeapReAlloc( GetProcessHeap(), 0, bits, + (size + size_small) * sizeof(unsigned long) ))) { - if ((new = HeapReAlloc( GetProcessHeap(), 0, bits, - (size + size_small) * sizeof(unsigned long) ))) - { - bits = new; - memcpy( bits + size, bits_small, size_small * sizeof(unsigned long) ); - size += size_small; - } + bits = new; + memcpy( bits + size, bits_small, size_small * sizeof(unsigned long) ); + size += size_small; } - HeapFree( GetProcessHeap(), 0, bits_small ); - DeleteObject( ii_small.hbmColor ); - DeleteObject( ii_small.hbmMask ); } - if (bits) - XChangeProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON), - XA_CARDINAL, 32, PropModeReplace, (unsigned char *)bits, size ); - else - XDeleteProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON) ); - HeapFree( GetProcessHeap(), 0, bits ); - - if (create_icon_pixmaps( hDC, &ii, data )) - { - hints->icon_pixmap = data->icon_pixmap; - hints->icon_mask = data->icon_mask; - hints->flags |= IconPixmapHint | IconMaskHint; - } - destroy_icon_window( display, data ); - hints->flags &= ~IconWindowHint; + HeapFree( GetProcessHeap(), 0, bits_small ); + DeleteObject( ii_small.hbmColor ); + DeleteObject( ii_small.hbmMask ); + } + if (bits) + XChangeProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON), + XA_CARDINAL, 32, PropModeReplace, (unsigned char *)bits, size ); + else + XDeleteProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON) ); + HeapFree( GetProcessHeap(), 0, bits ); - DeleteObject( ii.hbmColor ); - DeleteObject( ii.hbmMask ); - DeleteDC(hDC); + if (create_icon_pixmaps( hDC, &ii, data )) + { + hints->icon_pixmap = data->icon_pixmap; + hints->icon_mask = data->icon_mask; + hints->flags |= IconPixmapHint | IconMaskHint; } + DeleteObject( ii.hbmColor ); + DeleteObject( ii.hbmMask ); + DeleteDC(hDC); } @@ -1518,7 +1463,6 @@ void CDECL X11DRV_DestroyWindow( HWND hwnd ) destroy_gl_drawable( hwnd ); destroy_whole_window( thread_data->display, data, FALSE ); - destroy_icon_window( thread_data->display, data ); if (thread_data->last_focus == hwnd) thread_data->last_focus = 0; if (thread_data->last_xic_hwnd == hwnd) thread_data->last_xic_hwnd = 0; @@ -1864,11 +1808,7 @@ void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, if (top == hwnd) { - if (data && IsIconic( hwnd ) && data->icon_window) - { - escape.drawable = data->icon_window; - } - else escape.drawable = data ? data->whole_window : X11DRV_get_whole_window( hwnd ); + escape.drawable = data ? data->whole_window : X11DRV_get_whole_window( hwnd ); /* special case: when repainting the root window, clip out top-level windows */ if (data && data->whole_window == root_window) escape.mode = ClipByChildren; @@ -1962,7 +1902,6 @@ void CDECL X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent ) { /* destroy the old X windows */ destroy_whole_window( display, data, FALSE ); - destroy_icon_window( display, data ); if (data->managed) { data->managed = FALSE; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 1c4c341..c637a67 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -533,7 +533,6 @@ struct x11drv_win_data { HWND hwnd; /* hwnd that this private data belongs to */ Window whole_window; /* X window for the complete window */ - Window icon_window; /* X window for the icon */ RECT window_rect; /* USER window rectangle relative to parent */ RECT whole_rect; /* X window rectangle for the whole window relative to parent */ RECT client_rect; /* client area relative to parent */ From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Jacek Caban : mshtml: Added support for DISPATCH_METHOD|DISPATCH_PROPERTYGET flags in HTMLDocumentNode_invoke . Message-ID: Module: wine Branch: master Commit: bdcc88a3968deb0bc50f82aeec72018f041b7176 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bdcc88a3968deb0bc50f82aeec72018f041b7176 Author: Jacek Caban Date: Mon Sep 10 14:41:09 2012 +0200 mshtml: Added support for DISPATCH_METHOD|DISPATCH_PROPERTYGET flags in HTMLDocumentNode_invoke. --- dlls/mshtml/htmldoc.c | 2 +- dlls/mshtml/tests/vbtest.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 86615df..a6bb56d 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -2183,7 +2183,7 @@ static HRESULT HTMLDocumentNode_invoke(DispatchEx *dispex, DISPID id, LCID lcid, nsresult nsres; HRESULT hres; - if(flags != DISPATCH_PROPERTYGET) { + if(flags != DISPATCH_PROPERTYGET && flags != (DISPATCH_METHOD|DISPATCH_PROPERTYGET)) { FIXME("unsupported flags %x\n", flags); return E_NOTIMPL; } diff --git a/dlls/mshtml/tests/vbtest.html b/dlls/mshtml/tests/vbtest.html index f424b38..f023f98 100644 --- a/dlls/mshtml/tests/vbtest.html +++ b/dlls/mshtml/tests/vbtest.html @@ -32,6 +32,7 @@ If true then counter = counter+1 Sub runTest() Call ok(counter = 6, "counter = " & counter) Call ok(isNull(document.onkeyup), "document.onkeyup is not null") + Call ok(document.formname.tagName = "FORM", "document.form.tagName = " & document.formname.tagName) Call external.reportSuccess() End Sub @@ -39,5 +40,6 @@ End Sub // We're in javascript +
    From julliard at winehq.org Mon Sep 10 15:22:11 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:11 -0500 Subject: Jacek Caban : mshtml: Added IHTMLWindow2::onscroll implementation. Message-ID: Module: wine Branch: master Commit: 7293e84163297bca1c06e9fd86e2ca21956b968d URL: http://source.winehq.org/git/wine.git/?a=commit;h=7293e84163297bca1c06e9fd86e2ca21956b968d Author: Jacek Caban Date: Mon Sep 10 14:41:28 2012 +0200 mshtml: Added IHTMLWindow2::onscroll implementation. --- dlls/mshtml/htmlevent.c | 5 +++++ dlls/mshtml/htmlevent.h | 1 + dlls/mshtml/htmlwindow.c | 12 ++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index f5880f9..f9f21df 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -113,6 +113,9 @@ static const WCHAR onreadystatechangeW[] = {'o','n','r','e','a','d','y','s','t', static const WCHAR resizeW[] = {'r','e','s','i','z','e',0}; static const WCHAR onresizeW[] = {'o','n','r','e','s','i','z','e',0}; +static const WCHAR scrollW[] = {'s','c','r','o','l','l',0}; +static const WCHAR onscrollW[] = {'o','n','s','c','r','o','l','l',0}; + static const WCHAR selectstartW[] = {'s','e','l','e','c','t','s','t','a','r','t',0}; static const WCHAR onselectstartW[] = {'o','n','s','e','l','e','c','t','s','t','a','r','t',0}; @@ -199,6 +202,8 @@ static const event_info_t event_info[] = { 0}, {resizeW, onresizeW, EVENTT_NONE, DISPID_EVMETH_ONRESIZE, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {scrollW, onscrollW, EVENTT_HTML, DISPID_EVMETH_ONSCROLL, + EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, {selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART, EVENT_CANCELABLE}, {submitW, onsubmitW, EVENTT_HTML, DISPID_EVMETH_ONSUBMIT, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index b6ebf81..983d128 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -40,6 +40,7 @@ typedef enum { EVENTID_PASTE, EVENTID_READYSTATECHANGE, EVENTID_RESIZE, + EVENTID_SCROLL, EVENTID_SELECTSTART, EVENTID_SUBMIT, EVENTID_LAST diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index ed1fa2b..fc432d8 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1075,15 +1075,19 @@ static HRESULT WINAPI HTMLWindow2_get_onresize(IHTMLWindow2 *iface, VARIANT *p) static HRESULT WINAPI HTMLWindow2_put_onscroll(IHTMLWindow2 *iface, VARIANT v) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + return set_window_event(This, EVENTID_SCROLL, &v); } static HRESULT WINAPI HTMLWindow2_get_onscroll(IHTMLWindow2 *iface, VARIANT *p) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_window_event(This, EVENTID_SCROLL, p); } static HRESULT WINAPI HTMLWindow2_get_document(IHTMLWindow2 *iface, IHTMLDocument2 **p) From julliard at winehq.org Mon Sep 10 15:22:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:12 -0500 Subject: Jacek Caban : mshtml: Added support for navigating to anchors with IDs containing '#'. Message-ID: Module: wine Branch: master Commit: 3f2365d5decc3150db8dd797ba5527b561e24d5b URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f2365d5decc3150db8dd797ba5527b561e24d5b Author: Jacek Caban Date: Mon Sep 10 14:42:39 2012 +0200 mshtml: Added support for navigating to anchors with IDs containing '#'. --- dlls/mshtml/navigate.c | 43 ++++++++++++++++++++++++++++++++++++++++--- dlls/mshtml/nsiface.idl | 11 +++++++++++ 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 91705dd..1046356 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -19,6 +19,7 @@ #include "config.h" #include +#include #define COBJMACROS #define NONAMELESSUNION @@ -1925,10 +1926,13 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri) { nsIDOMLocation *nslocation; nsAString nsfrag_str; + WCHAR *selector; BSTR frag; nsresult nsres; HRESULT hres; + const WCHAR selector_formatW[] = {'a','[','i','d','=','"','%','s','"',']',0}; + set_current_uri(window, uri); nsres = nsIDOMWindow_GetLocation(window->nswindow, &nslocation); @@ -1945,12 +1949,45 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri) nsres = nsIDOMLocation_SetHash(nslocation, &nsfrag_str); nsAString_Finish(&nsfrag_str); nsIDOMLocation_Release(nslocation); - SysFreeString(frag); - if(NS_FAILED(nsres)) { + if(NS_FAILED(nsres)) ERR("SetHash failed: %08x\n", nsres); - return E_FAIL; + + /* + * IE supports scrolling to anchor elements with "#hash" ids (note that '#' is part of the id), + * while Gecko scrolls only to elements with "hash" ids. We scroll the page ourselves if + * a[id="#hash"] element can be found. + */ + selector = heap_alloc(sizeof(selector_formatW)+SysStringLen(frag)*sizeof(WCHAR)); + if(selector) { + nsIDOMNodeSelector *node_selector; + nsIDOMElement *nselem = NULL; + nsAString selector_str; + + nsres = nsIDOMHTMLDocument_QueryInterface(window->base.inner_window->doc->nsdoc, &IID_nsIDOMNodeSelector, + (void**)&node_selector); + assert(nsres == NS_OK); + + sprintfW(selector, selector_formatW, frag); + nsAString_InitDepend(&selector_str, selector); + /* NOTE: Gecko doesn't set result to NULL if there is no match, so nselem must be initialized */ + nsres = nsIDOMNodeSelector_QuerySelector(node_selector, &selector_str, &nselem); + nsIDOMNodeSelector_Release(node_selector); + nsAString_Finish(&selector_str); + heap_free(selector); + if(NS_SUCCEEDED(nsres) && nselem) { + nsIDOMHTMLElement *html_elem; + + nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLElement, (void**)&html_elem); + nsIDOMElement_Release(nselem); + if(NS_SUCCEEDED(nsres)) { + nsIDOMHTMLElement_ScrollIntoView(html_elem, TRUE, 1); + nsIDOMHTMLElement_Release(html_elem); + } + } } + SysFreeString(frag); + if(window->doc_obj->doc_object_service) { IDocObjectService_FireNavigateComplete2(window->doc_obj->doc_object_service, &window->base.IHTMLWindow2_iface, 0x10); IDocObjectService_FireDocumentComplete(window->doc_obj->doc_object_service, &window->base.IHTMLWindow2_iface, 0); diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index d19d5df..a4202f0 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -2073,6 +2073,17 @@ interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement [ object, + uuid(7cebc153-168a-416c-ba5a-56a8c2ddb2ec), + local +] +interface nsIDOMNodeSelector : nsISupports +{ + nsresult QuerySelector(const nsAString *selectors, nsIDOMElement **_retval); + nsresult QuerySelectorAll(const nsAString *selectors, nsIDOMNodeList **_retval); +} + +[ + object, uuid(94928ab3-8b63-11d3-989d-001083010e9b), local ] From julliard at winehq.org Mon Sep 10 15:22:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:12 -0500 Subject: Jacek Caban : jscript: Added support for no new line between break and identifier rule. Message-ID: Module: wine Branch: master Commit: dc2133cc66e12f8749e467909f5568d8d5054af2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dc2133cc66e12f8749e467909f5568d8d5054af2 Author: Jacek Caban Date: Mon Sep 10 14:44:51 2012 +0200 jscript: Added support for no new line between break and identifier rule. --- dlls/jscript/engine.h | 1 + dlls/jscript/lex.c | 26 +++++++++++++++----------- dlls/jscript/tests/lang.js | 17 +++++++++++++++++ 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index d0dec0d..b3648af 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -28,6 +28,7 @@ typedef struct { script_ctx_t *script; source_elements_t *source; BOOL nl; + BOOL implicit_nl_semicolon; BOOL is_html; BOOL lexer_error; HRESULT hres; diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index d2b87ac..39a1197 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -68,8 +68,9 @@ static const WCHAR withW[] = {'w','i','t','h',0}; static const struct { const WCHAR *word; int token; + BOOL no_nl; } keywords[] = { - {breakW, kBREAK}, + {breakW, kBREAK, TRUE}, {caseW, kCASE}, {catchW, kCATCH}, {continueW, kCONTINUE}, @@ -161,8 +162,10 @@ static int check_keywords(parser_ctx_t *ctx, const WCHAR **lval) i = (min+max)/2; r = check_keyword(ctx, keywords[i].word, lval); - if(!r) + if(!r) { + ctx->implicit_nl_semicolon = keywords[i].no_nl; return keywords[i].token; + } if(r > 0) min = i+1; @@ -173,14 +176,6 @@ static int check_keywords(parser_ctx_t *ctx, const WCHAR **lval) return 0; } -static void skip_spaces(parser_ctx_t *ctx) -{ - while(ctx->ptr < ctx->end && isspaceW(*ctx->ptr)) { - if(is_endline(*ctx->ptr++)) - ctx->nl = TRUE; - } -} - static BOOL skip_html_comment(parser_ctx_t *ctx) { const WCHAR html_commentW[] = {'<','!','-','-',0}; @@ -509,11 +504,20 @@ static int parse_numeric_literal(parser_ctx_t *ctx, literal_t **literal) static int next_token(parser_ctx_t *ctx, void *lval) { do { - skip_spaces(ctx); + while(ctx->ptr < ctx->end && isspaceW(*ctx->ptr)) { + if(is_endline(*ctx->ptr++)) + ctx->nl = TRUE; + } if(ctx->ptr == ctx->end) return tEOF; }while(skip_comment(ctx) || skip_html_comment(ctx)); + if(ctx->implicit_nl_semicolon) { + if(ctx->nl) + return ';'; + ctx->implicit_nl_semicolon = FALSE; + } + if(isalphaW(*ctx->ptr)) { int ret = check_keywords(ctx, lval); if(ret) diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index cb127da..d7f6884 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1355,6 +1355,23 @@ ok(name_override_func === 3, "name_override_func = " + name_override_func); function name_override_func() {}; ok(name_override_func === 3, "name_override_func = " + name_override_func); +/* NoNewline rule parser tests */ +while(true) { + if(true) break + tmp = false +} + +while(true) { + if(true) break /* + * no semicolon, but comment present */ + tmp = false +} + +while(true) { + if(true) break // no semicolon, but comment present + tmp = false +} + /* Keep this test in the end of file */ undefined = 6; ok(undefined === 6, "undefined = " + undefined); From julliard at winehq.org Mon Sep 10 15:22:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:12 -0500 Subject: Jacek Caban : jscript: Added support for no new line between continue and identifier rule. Message-ID: Module: wine Branch: master Commit: f1642ce1fc4486a28cd5df07a654486075880eb7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f1642ce1fc4486a28cd5df07a654486075880eb7 Author: Jacek Caban Date: Mon Sep 10 14:45:06 2012 +0200 jscript: Added support for no new line between continue and identifier rule. --- dlls/jscript/lex.c | 2 +- dlls/jscript/tests/lang.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 39a1197..7e0e2fc 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -73,7 +73,7 @@ static const struct { {breakW, kBREAK, TRUE}, {caseW, kCASE}, {catchW, kCATCH}, - {continueW, kCONTINUE}, + {continueW, kCONTINUE, TRUE}, {defaultW, kDEFAULT}, {deleteW, kDELETE}, {doW, kDO}, diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index d7f6884..d3908ad 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1372,6 +1372,12 @@ while(true) { tmp = false } +while(true) { + break + continue + tmp = false +} + /* Keep this test in the end of file */ undefined = 6; ok(undefined === 6, "undefined = " + undefined); From julliard at winehq.org Mon Sep 10 15:22:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:12 -0500 Subject: Jacek Caban : jscript: Added support for no new line between return and expression rule. Message-ID: Module: wine Branch: master Commit: dd0fe98646036ffc84c31d5ddbb26346b00cc75f URL: http://source.winehq.org/git/wine.git/?a=commit;h=dd0fe98646036ffc84c31d5ddbb26346b00cc75f Author: Jacek Caban Date: Mon Sep 10 14:45:23 2012 +0200 jscript: Added support for no new line between return and expression rule. --- dlls/jscript/lex.c | 2 +- dlls/jscript/tests/lang.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 7e0e2fc..4c2cc6b 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -87,7 +87,7 @@ static const struct { {instanceofW, kINSTANCEOF}, {newW, kNEW}, {nullW, kNULL}, - {returnW, kRETURN}, + {returnW, kRETURN, TRUE}, {switchW, kSWITCH}, {thisW, kTHIS}, {throwW, kTHROW}, diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index d3908ad..dbb9d50 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1378,6 +1378,13 @@ while(true) { tmp = false } +function returnTest() { + return + true; +} + +ok(returnTest() === undefined, "returnTest = " + returnTest()); + /* Keep this test in the end of file */ undefined = 6; ok(undefined === 6, "undefined = " + undefined); From julliard at winehq.org Mon Sep 10 15:22:12 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Mon, 10 Sep 2012 15:22:12 -0500 Subject: Piotr Caban : msvcrt: Skip RTTI signature==1 tests on platforms that doesn' t support it. Message-ID: Module: wine Branch: master Commit: 688aa1f529154d1fe9d50d6bebcfe229f8dba632 URL: http://source.winehq.org/git/wine.git/?a=commit;h=688aa1f529154d1fe9d50d6bebcfe229f8dba632 Author: Piotr Caban Date: Mon Sep 10 19:06:19 2012 +0200 msvcrt: Skip RTTI signature==1 tests on platforms that doesn't support it. --- dlls/msvcrt/tests/cpp.c | 42 ++++++++++++++++++++++++++++++++++-------- 1 files changed, 34 insertions(+), 8 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index b3dafbb..140d8b2 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -828,6 +828,17 @@ static void test_type_info(void) ok(res == 1, "expected 1, got %d\n", res); } +static inline vtable_ptr *get_vtable( void *obj ) +{ + return *(vtable_ptr **)obj; +} + +static inline void/*rtti_object_locator*/ *get_obj_locator( void *cppobj ) +{ + const vtable_ptr *vtable = get_vtable( cppobj ); + return (void *)vtable[-1]; +} + #ifndef __x86_64__ #define RTTI_SIGNATURE 0 #define DEFINE_RTTI_REF(type, name) type *name @@ -840,6 +851,16 @@ static void test_type_info(void) /* Test RTTI functions */ static void test_rtti(void) { + struct _object_locator + { + unsigned int signature; + int base_class_offset; + unsigned int flags; + DEFINE_RTTI_REF(type_info, type_descriptor); + DEFINE_RTTI_REF(struct _rtti_object_hierarchy, type_hierarchy); + DEFINE_RTTI_REF(void, object_locator); + } *obj_locator; + struct rtti_data { type_info type_info[4]; @@ -867,14 +888,7 @@ static void test_rtti(void) DEFINE_RTTI_REF(struct _rtti_base_array, base_classes); } object_hierarchy; - struct { - unsigned int signature; - int base_class_offset; - unsigned int flags; - DEFINE_RTTI_REF(type_info, type_descriptor); - DEFINE_RTTI_REF(struct _rtti_object_hierarchy, type_hierarchy); - DEFINE_RTTI_REF(void, object_locator); - } object_locator; + struct _object_locator object_locator; } simple_class_rtti = { { {NULL, NULL, "simple_class"} }, { {RTTI_REF(simple_class_rtti, type_info[0]), 0, {0, 0, 0}, 0} }, @@ -897,6 +911,7 @@ static void test_rtti(void) type_info *ti,*bti; exception e,b; void *casted; + BOOL old_signature; if (bAncientVersion || !p__RTCastToVoid || !p__RTtypeid || !pexception_ctor || !pbad_typeid_ctor @@ -906,6 +921,12 @@ static void test_rtti(void) call_func2(pexception_ctor, &e, &e_name); call_func2(pbad_typeid_ctor, &b, e_name); + obj_locator = get_obj_locator(&e); + if(obj_locator->signature!=RTTI_SIGNATURE && sizeof(void*)>sizeof(int)) + old_signature = TRUE; + else + old_signature = FALSE; + /* dynamic_cast to void* */ casted = p__RTCastToVoid(&e); ok (casted == (void*)&e, "failed cast to void\n"); @@ -928,6 +949,11 @@ static void test_rtti(void) call_func1(pexception_dtor, &e); call_func1(pbad_typeid_dtor, &b); + if(old_signature) { + skip("signature==1 is not supported\n"); + return; + } + ti = p__RTtypeid(&simple_class); ok (ti && ti->mangled && !strcmp(ti->mangled, "simple_class"), "incorrect rtti data\n"); From julliard at winehq.org Tue Sep 11 16:59:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:05 -0500 Subject: Vincent Povirk : windowscodecs: Only copy the palette to new bitmaps if they might be indexed. Message-ID: Module: wine Branch: master Commit: 4038cb79b4aedad38816fcfbee83920cc2bd5259 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4038cb79b4aedad38816fcfbee83920cc2bd5259 Author: Vincent Povirk Date: Mon Sep 10 15:23:43 2012 -0500 windowscodecs: Only copy the palette to new bitmaps if they might be indexed. --- dlls/windowscodecs/imgfactory.c | 23 +++++++++++++++- dlls/windowscodecs/tests/bitmap.c | 53 ++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index 01ce034..8ba0a1d 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -474,6 +474,9 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromSource(IWICComponentFacto HRESULT hr; WICRect rc; double dpix, dpiy; + IWICComponentInfo *info; + IWICPixelFormatInfo2 *formatinfo; + WICPixelFormatNumericRepresentation format_type; TRACE("(%p,%p,%u,%p)\n", iface, piBitmapSource, option, ppIBitmap); @@ -486,6 +489,23 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromSource(IWICComponentFacto hr = IWICBitmapSource_GetPixelFormat(piBitmapSource, &pixelformat); if (SUCCEEDED(hr)) + hr = CreateComponentInfo(&pixelformat, &info); + + if (SUCCEEDED(hr)) + { + hr = IWICComponentInfo_QueryInterface(info, &IID_IWICPixelFormatInfo2, (void**)&formatinfo); + + if (SUCCEEDED(hr)) + { + hr = IWICPixelFormatInfo2_GetNumericRepresentation(formatinfo, &format_type); + + IWICPixelFormatInfo2_Release(formatinfo); + } + + IWICComponentInfo_Release(info); + } + + if (SUCCEEDED(hr)) hr = BitmapImpl_Create(width, height, &pixelformat, option, &result); if (SUCCEEDED(hr)) @@ -514,7 +534,8 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromSource(IWICComponentFacto if (SUCCEEDED(hr)) hr = PaletteImpl_Create(&palette); - if (SUCCEEDED(hr)) + if (SUCCEEDED(hr) && (format_type == WICPixelFormatNumericRepresentationUnspecified || + format_type == WICPixelFormatNumericRepresentationIndexed)) { hr = IWICBitmapSource_CopyPalette(piBitmapSource, palette); diff --git a/dlls/windowscodecs/tests/bitmap.c b/dlls/windowscodecs/tests/bitmap.c index 91376ac..c2ce1aa 100644 --- a/dlls/windowscodecs/tests/bitmap.c +++ b/dlls/windowscodecs/tests/bitmap.c @@ -283,6 +283,8 @@ static void test_createbitmapfromsource(void) WICPixelFormatGUID pixelformat = {0}; UINT width=0, height=0; double dpix=10.0, dpiy=10.0; + UINT count; + WICBitmapPaletteType palette_type; hr = IWICImagingFactory_CreateBitmap(factory, 3, 3, &GUID_WICPixelFormat24bppBGR, WICBitmapCacheOnLoad, &bitmap); @@ -340,7 +342,7 @@ static void test_createbitmapfromsource(void) /* palette isn't copied for non-indexed formats? */ hr = IWICBitmap_CopyPalette(bitmap2, palette); - todo_wine ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "IWICBitmap_CopyPalette failed hr=%x\n", hr); + ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "IWICBitmap_CopyPalette failed hr=%x\n", hr); IWICPalette_Release(palette); @@ -365,6 +367,55 @@ static void test_createbitmapfromsource(void) ok(height == 3, "got %d, expected 3\n", height); IWICBitmap_Release(bitmap2); + + /* Ensure palette is copied for indexed formats */ + hr = IWICImagingFactory_CreateBitmap(factory, 3, 3, &GUID_WICPixelFormat4bppIndexed, + WICBitmapCacheOnLoad, &bitmap); + ok(hr == S_OK, "IWICImagingFactory_CreateBitmap failed hr=%x\n", hr); + + hr = IWICImagingFactory_CreatePalette(factory, &palette); + ok(hr == S_OK, "IWICImagingFactory_CreatePalette failed hr=%x\n", hr); + + hr = IWICPalette_InitializePredefined(palette, WICBitmapPaletteTypeFixedGray256, FALSE); + ok(hr == S_OK, "IWICPalette_InitializePredefined failed hr=%x\n", hr); + + hr = IWICBitmap_SetPalette(bitmap, palette); + ok(hr == S_OK, "IWICBitmap_SetPalette failed hr=%x\n", hr); + + IWICPalette_Release(palette); + + hr = IWICImagingFactory_CreateBitmapFromSource(factory, (IWICBitmapSource*)bitmap, + WICBitmapCacheOnLoad, &bitmap2); + ok(hr == S_OK, "IWICImagingFactory_CreateBitmapFromSource failed hr=%x\n", hr); + + IWICBitmap_Release(bitmap); + + hr = IWICImagingFactory_CreatePalette(factory, &palette); + ok(hr == S_OK, "IWICImagingFactory_CreatePalette failed hr=%x\n", hr); + + hr = IWICBitmap_CopyPalette(bitmap2, palette); + ok(hr == S_OK, "IWICBitmap_CopyPalette failed hr=%x\n", hr); + + hr = IWICPalette_GetColorCount(palette, &count); + ok(hr == S_OK, "IWICPalette_GetColorCount failed hr=%x\n", hr); + ok(count == 256, "unexpected count %d\n", count); + + hr = IWICPalette_GetType(palette, &palette_type); + ok(hr == S_OK, "IWICPalette_GetType failed hr=%x\n", hr); + ok(palette_type == WICBitmapPaletteTypeFixedGray256, "unexpected palette type %d\n", palette_type); + + IWICPalette_Release(palette); + + hr = IWICBitmap_GetPixelFormat(bitmap2, &pixelformat); + ok(hr == S_OK, "IWICBitmap_GetPixelFormat failed hr=%x\n", hr); + ok(IsEqualGUID(&pixelformat, &GUID_WICPixelFormat4bppIndexed), "unexpected pixel format\n"); + + hr = IWICBitmap_GetSize(bitmap2, &width, &height); + ok(hr == S_OK, "IWICBitmap_GetSize failed hr=%x\n", hr); + ok(width == 3, "got %d, expected 3\n", width); + ok(height == 3, "got %d, expected 3\n", height); + + IWICBitmap_Release(bitmap2); } START_TEST(bitmap) From julliard at winehq.org Tue Sep 11 16:59:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:05 -0500 Subject: Vincent Povirk : windowscodecs: Implement PNG tEXt metadata reader. Message-ID: Module: wine Branch: master Commit: 1a032a94df301286a6c13ee3b2654e7ba1cbc893 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a032a94df301286a6c13ee3b2654e7ba1cbc893 Author: Vincent Povirk Date: Mon Sep 10 17:01:15 2012 -0500 windowscodecs: Implement PNG tEXt metadata reader. --- dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/metadatahandler.c | 7 ++- dlls/windowscodecs/pngformat.c | 112 +++++++++++++++++++++++++ dlls/windowscodecs/regsvr.c | 25 ++++++ dlls/windowscodecs/tests/metadata.c | 2 +- dlls/windowscodecs/wincodecs_private.h | 4 + dlls/windowscodecs/windowscodecs_wincodec.idl | 7 ++ 7 files changed, 156 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index 40d1547..91c75b7 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -61,6 +61,7 @@ static const classinfo wic_classes[] = { {&CLSID_WineTgaDecoder, TgaDecoder_CreateInstance}, {&CLSID_WICUnknownMetadataReader, UnknownMetadataReader_CreateInstance}, {&CLSID_WICIfdMetadataReader, IfdMetadataReader_CreateInstance}, + {&CLSID_WICPngTextMetadataReader, PngTextReader_CreateInstance}, {0}}; typedef struct { diff --git a/dlls/windowscodecs/metadatahandler.c b/dlls/windowscodecs/metadatahandler.c index 084facf..5e50cb9 100644 --- a/dlls/windowscodecs/metadatahandler.c +++ b/dlls/windowscodecs/metadatahandler.c @@ -255,6 +255,11 @@ static int propvar_cmp(const PROPVARIANT *v1, const PROPVARIANT *v2) { LONGLONG value1, value2; + if (v1->vt == VT_LPSTR && v2->vt == VT_LPSTR) + { + return lstrcmpA(v1->u.pszVal, v2->u.pszVal); + } + if (!get_int_value(v1, &value1)) return -1; if (!get_int_value(v2, &value2)) return -1; @@ -446,7 +451,7 @@ static const IWICPersistStreamVtbl MetadataHandler_PersistStream_Vtbl = { MetadataHandler_SaveEx }; -static HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) { MetadataHandler *This; HRESULT hr; diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 683da2d..3eae4b7 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -40,6 +40,118 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); +static HRESULT read_png_chunk(IStream *stream, BYTE *type, BYTE **data, ULONG *data_size) +{ + BYTE header[8]; + HRESULT hr; + ULONG bytesread; + + hr = IStream_Read(stream, header, 8, &bytesread); + if (FAILED(hr) || bytesread < 8) + { + if (SUCCEEDED(hr)) + hr = E_FAIL; + return hr; + } + + *data_size = header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]; + + memcpy(type, &header[4], 4); + + if (data) + { + *data = HeapAlloc(GetProcessHeap(), 0, *data_size); + if (!*data) + return E_OUTOFMEMORY; + + hr = IStream_Read(stream, *data, *data_size, &bytesread); + + if (FAILED(hr) || bytesread < *data_size) + { + if (SUCCEEDED(hr)) + hr = E_FAIL; + HeapFree(GetProcessHeap(), 0, *data); + *data = NULL; + return hr; + } + + /* FIXME: Verify the CRC? */ + } + + return S_OK; +} + +static HRESULT LoadTextMetadata(IStream *stream, const GUID *preferred_vendor, + DWORD persist_options, MetadataItem **items, DWORD *item_count) +{ + HRESULT hr; + BYTE type[4]; + BYTE *data; + ULONG data_size; + ULONG name_len, value_len; + BYTE *name_end_ptr; + LPSTR name, value; + MetadataItem *result; + + hr = read_png_chunk(stream, type, &data, &data_size); + if (FAILED(hr)) return hr; + + name_end_ptr = memchr(data, 0, data_size); + + name_len = name_end_ptr - data; + + if (!name_end_ptr || name_len > 79) + { + HeapFree(GetProcessHeap(), 0, data); + return E_FAIL; + } + + value_len = data_size - name_len - 1; + + result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem)); + name = HeapAlloc(GetProcessHeap(), 0, name_len + 1); + value = HeapAlloc(GetProcessHeap(), 0, value_len + 1); + if (!result || !name || !value) + { + HeapFree(GetProcessHeap(), 0, data); + HeapFree(GetProcessHeap(), 0, result); + HeapFree(GetProcessHeap(), 0, name); + HeapFree(GetProcessHeap(), 0, value); + return E_OUTOFMEMORY; + } + + PropVariantInit(&result[0].schema); + PropVariantInit(&result[0].id); + PropVariantInit(&result[0].value); + + memcpy(name, data, name_len + 1); + memcpy(value, name_end_ptr + 1, value_len); + value[value_len] = 0; + + result[0].id.vt = VT_LPSTR; + result[0].id.pszVal = name; + result[0].value.vt = VT_LPSTR; + result[0].value.pszVal = value; + + *items = result; + *item_count = 1; + + HeapFree(GetProcessHeap(), 0, data); + + return S_OK; +} + +static const MetadataHandlerVtbl TextReader_Vtbl = { + 0, + &CLSID_WICPngTextMetadataReader, + LoadTextMetadata +}; + +HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +{ + return MetadataReader_Create(&TextReader_Vtbl, pUnkOuter, iid, ppv); +} + #ifdef SONAME_LIBPNG static void *libpng_handle; diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index a422747..cb11430 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -1503,6 +1503,21 @@ static const struct reader_containers ifd_containers[] = { { NULL } /* list terminator */ }; +static const BYTE tEXt[] = "tEXt"; + +static const struct metadata_pattern pngtext_metadata_pattern[] = { + { 4, 4, tEXt, mask_all, 4 }, + { 0 } +}; + +static const struct reader_containers pngtext_containers[] = { + { + &GUID_ContainerFormatPng, + pngtext_metadata_pattern + }, + { NULL } /* list terminator */ +}; + static struct regsvr_metadatareader const metadatareader_list[] = { { &CLSID_WICUnknownMetadataReader, "The Wine Project", @@ -1525,6 +1540,16 @@ static struct regsvr_metadatareader const metadatareader_list[] = { 1, 1, 0, ifd_containers }, + { &CLSID_WICPngTextMetadataReader, + "The Wine Project", + "Unknown Metadata Reader", + "1.0.0.0", + "1.0.0.0", + &GUID_VendorMicrosoft, + &GUID_MetadataFormatChunktEXt, + 0, 0, 0, + pngtext_containers + }, { NULL } /* list terminator */ }; diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 4bb33ae..229753c 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -303,7 +303,7 @@ static void test_metadata_tEXt(void) hr = CoCreateInstance(&CLSID_WICPngTextMetadataReader, NULL, CLSCTX_INPROC_SERVER, &IID_IWICMetadataReader, (void**)&reader); - todo_wine ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr); if (FAILED(hr)) return; hr = IWICMetadataReader_GetCount(reader, NULL); diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 0bee818..37f9c90 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -90,7 +90,11 @@ typedef struct _MetadataHandlerVtbl ULARGE_INTEGER *size); } MetadataHandlerVtbl; +extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; + extern HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; + #endif /* WINCODECS_PRIVATE_H */ diff --git a/dlls/windowscodecs/windowscodecs_wincodec.idl b/dlls/windowscodecs/windowscodecs_wincodec.idl index bc4c994..6d5bd2d 100644 --- a/dlls/windowscodecs/windowscodecs_wincodec.idl +++ b/dlls/windowscodecs/windowscodecs_wincodec.idl @@ -135,3 +135,10 @@ coclass WICUnknownMetadataReader { interface IWICMetadataReader; } uuid(8f914656-9d0a-4eb2-9019-0bf96d8a9ee6) ] coclass WICIfdMetadataReader { interface IWICIfdMetadataReader; } + +[ + helpstring("WIC Png tEXt Metadata Reader"), + threading(both), + uuid(4b59afcc-b8c3-408a-b670-89e5fab6fda7) +] +coclass WICPngTextMetadataReader { interface IWICMetadataReader; } From julliard at winehq.org Tue Sep 11 16:59:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:05 -0500 Subject: Dmitry Timoshkov : windowscodecs: Correct name of the PNG text metadata reader. Message-ID: Module: wine Branch: master Commit: d96e32c8a3f52f3c12ec367f3ffd42ca76876a87 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d96e32c8a3f52f3c12ec367f3ffd42ca76876a87 Author: Dmitry Timoshkov Date: Tue Sep 11 16:47:52 2012 +0900 windowscodecs: Correct name of the PNG text metadata reader. --- dlls/windowscodecs/regsvr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index cb11430..3fa2df3 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -1542,7 +1542,7 @@ static struct regsvr_metadatareader const metadatareader_list[] = { }, { &CLSID_WICPngTextMetadataReader, "The Wine Project", - "Unknown Metadata Reader", + "Chunk tEXt Reader", "1.0.0.0", "1.0.0.0", &GUID_VendorMicrosoft, From julliard at winehq.org Tue Sep 11 16:59:05 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:05 -0500 Subject: Dmitry Timoshkov : windowscodecs: Implement Logical Screen Descriptor metadata reader. Message-ID: Module: wine Branch: master Commit: 500ab2b5c7d17d8ba42cc90ecb9fc2455e603af8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=500ab2b5c7d17d8ba42cc90ecb9fc2455e603af8 Author: Dmitry Timoshkov Date: Tue Sep 11 16:48:37 2012 +0900 windowscodecs: Implement Logical Screen Descriptor metadata reader. --- dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/gifformat.c | 111 +++++++++++++++++++++++++ dlls/windowscodecs/regsvr.c | 27 ++++++- dlls/windowscodecs/tests/metadata.c | 1 - dlls/windowscodecs/wincodecs_private.h | 2 +- dlls/windowscodecs/windowscodecs_wincodec.idl | 7 ++ 6 files changed, 145 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index 91c75b7..3f1328c 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -62,6 +62,7 @@ static const classinfo wic_classes[] = { {&CLSID_WICUnknownMetadataReader, UnknownMetadataReader_CreateInstance}, {&CLSID_WICIfdMetadataReader, IfdMetadataReader_CreateInstance}, {&CLSID_WICPngTextMetadataReader, PngTextReader_CreateInstance}, + {&CLSID_WICLSDMetadataReader, LSDReader_CreateInstance}, {0}}; typedef struct { diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 17de9aa..c4ee566 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -21,11 +21,13 @@ #include #define COBJMACROS +#define NONAMELESSUNION #include "windef.h" #include "winbase.h" #include "objbase.h" #include "wincodec.h" +#include "wincodecsdk.h" #include "ungif.h" @@ -35,6 +37,115 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); +static LPWSTR strdupAtoW(const char *src) +{ + int len = MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0); + LPWSTR dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (dst) MultiByteToWideChar(CP_ACP, 0, src, -1, dst, len); + return dst; +} + +static HRESULT load_LSD_metadata(IStream *stream, const GUID *vendor, DWORD options, + MetadataItem **items, DWORD *count) +{ + struct logical_screen_descriptor + { + char signature[6]; + USHORT width; + USHORT height; + BYTE packed; + /* global_color_table_flag : 1; + * color_resolution : 3; + * sort_flag : 1; + * global_color_table_size : 3; + */ + BYTE background_color_index; + BYTE pixel_aspect_ratio; + } lsd_data; + HRESULT hr; + ULONG bytesread, i; + MetadataItem *result; + + *items = NULL; + *count = 0; + + hr = IStream_Read(stream, &lsd_data, sizeof(lsd_data), &bytesread); + if (FAILED(hr) || bytesread != sizeof(lsd_data)) return S_OK; + + result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem) * 9); + if (!result) return E_OUTOFMEMORY; + + for (i = 0; i < 9; i++) + { + PropVariantInit(&result[i].schema); + PropVariantInit(&result[i].id); + PropVariantInit(&result[i].value); + } + + result[0].id.vt = VT_LPWSTR; + result[0].id.u.pwszVal = strdupAtoW("Signature"); + result[0].value.vt = VT_UI1|VT_VECTOR; + result[0].value.u.caub.cElems = 6; + result[0].value.u.caub.pElems = HeapAlloc(GetProcessHeap(), 0, sizeof(lsd_data.signature)); + memcpy(result[0].value.u.caub.pElems, lsd_data.signature, sizeof(lsd_data.signature)); + + result[1].id.vt = VT_LPWSTR; + result[1].id.u.pwszVal = strdupAtoW("Width"); + result[1].value.vt = VT_UI2; + result[1].value.u.uiVal = lsd_data.width; + + result[2].id.vt = VT_LPWSTR; + result[2].id.u.pwszVal = strdupAtoW("Height"); + result[2].value.vt = VT_UI2; + result[2].value.u.uiVal = lsd_data.height; + + result[3].id.vt = VT_LPWSTR; + result[3].id.u.pwszVal = strdupAtoW("GlobalColorTableFlag"); + result[3].value.vt = VT_BOOL; + result[3].value.u.boolVal = (lsd_data.packed >> 7) & 1; + + result[4].id.vt = VT_LPWSTR; + result[4].id.u.pwszVal = strdupAtoW("ColorResolution"); + result[4].value.vt = VT_UI1; + result[4].value.u.bVal = (lsd_data.packed >> 6) & 7; + + result[5].id.vt = VT_LPWSTR; + result[5].id.u.pwszVal = strdupAtoW("SortFlag"); + result[5].value.vt = VT_BOOL; + result[5].value.u.boolVal = (lsd_data.packed >> 3) & 1; + + result[6].id.vt = VT_LPWSTR; + result[6].id.u.pwszVal = strdupAtoW("GlobalColorTableSize"); + result[6].value.vt = VT_UI1; + result[6].value.u.bVal = lsd_data.packed & 7; + + result[7].id.vt = VT_LPWSTR; + result[7].id.u.pwszVal = strdupAtoW("BackgroundColorIndex"); + result[7].value.vt = VT_UI1; + result[7].value.u.bVal = lsd_data.background_color_index; + + result[8].id.vt = VT_LPWSTR; + result[8].id.u.pwszVal = strdupAtoW("PixelAspectRatio"); + result[8].value.vt = VT_UI1; + result[8].value.u.bVal = lsd_data.pixel_aspect_ratio; + + *items = result; + *count = 9; + + return S_OK; +} + +static const MetadataHandlerVtbl LSDReader_Vtbl = { + 0, + &CLSID_WICLSDMetadataReader, + load_LSD_metadata +}; + +HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) +{ + return MetadataReader_Create(&LSDReader_Vtbl, pUnkOuter, iid, ppv); +} + typedef struct { IWICBitmapDecoder IWICBitmapDecoder_iface; LONG ref; diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index 3fa2df3..cb48d63 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -1518,6 +1518,20 @@ static const struct reader_containers pngtext_containers[] = { { NULL } /* list terminator */ }; +static const struct metadata_pattern lsd_metadata_patterns[] = { + { 0, 6, gif87a_magic, mask_all, 0 }, + { 0, 6, gif89a_magic, mask_all, 0 }, + { 0 } +}; + +static const struct reader_containers lsd_containers[] = { + { + &GUID_ContainerFormatGif, + lsd_metadata_patterns + }, + { NULL } /* list terminator */ +}; + static struct regsvr_metadatareader const metadatareader_list[] = { { &CLSID_WICUnknownMetadataReader, "The Wine Project", @@ -1529,8 +1543,7 @@ static struct regsvr_metadatareader const metadatareader_list[] = { 0, 0, 0, NULL }, - { - &CLSID_WICIfdMetadataReader, + { &CLSID_WICIfdMetadataReader, "The Wine Project", "Ifd Reader", "1.0.0.0", @@ -1550,6 +1563,16 @@ static struct regsvr_metadatareader const metadatareader_list[] = { 0, 0, 0, pngtext_containers }, + { &CLSID_WICLSDMetadataReader, + "The Wine Project", + "Logical Screen Descriptor Reader", + "1.0.0.0", + "1.0.0.0", + &GUID_VendorMicrosoft, + &GUID_MetadataFormatLSD, + 0, 0, 0, + lsd_containers + }, { NULL } /* list terminator */ }; diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 229753c..fd81e6f 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1287,7 +1287,6 @@ static void test_metadata_LSD(void) hr = CoCreateInstance(&CLSID_WICLSDMetadataReader, NULL, CLSCTX_INPROC_SERVER, &IID_IWICMetadataReader, (void **)&reader); -todo_wine ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, "CoCreateInstance error %#x\n", hr); diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 37f9c90..908b2e6 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -94,7 +94,7 @@ extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown extern HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; - extern HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; #endif /* WINCODECS_PRIVATE_H */ diff --git a/dlls/windowscodecs/windowscodecs_wincodec.idl b/dlls/windowscodecs/windowscodecs_wincodec.idl index 6d5bd2d..d360ae5 100644 --- a/dlls/windowscodecs/windowscodecs_wincodec.idl +++ b/dlls/windowscodecs/windowscodecs_wincodec.idl @@ -142,3 +142,10 @@ coclass WICIfdMetadataReader { interface IWICIfdMetadataReader; } uuid(4b59afcc-b8c3-408a-b670-89e5fab6fda7) ] coclass WICPngTextMetadataReader { interface IWICMetadataReader; } + +[ + helpstring("WIC LSD Metadata Reader"), + threading(both), + uuid(41070793-59e4-479a-a1f7-954adc2ef5fc) +] +coclass WICLSDMetadataReader { interface IWICMetadataReader; } From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Dmitry Timoshkov : windowscodecs: Implement Image Descriptor metadata reader. Message-ID: Module: wine Branch: master Commit: 97fc6be67da0c086e8fbe56e409884c5dfb8e49e URL: http://source.winehq.org/git/wine.git/?a=commit;h=97fc6be67da0c086e8fbe56e409884c5dfb8e49e Author: Dmitry Timoshkov Date: Tue Sep 11 16:49:50 2012 +0900 windowscodecs: Implement Image Descriptor metadata reader. --- dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/gifformat.c | 94 +++++++++++++++++++++++++ dlls/windowscodecs/regsvr.c | 25 +++++++ dlls/windowscodecs/tests/metadata.c | 1 - dlls/windowscodecs/wincodecs_private.h | 1 + dlls/windowscodecs/windowscodecs_wincodec.idl | 7 ++ 6 files changed, 128 insertions(+), 1 deletions(-) diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index 3f1328c..dc70c04 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -63,6 +63,7 @@ static const classinfo wic_classes[] = { {&CLSID_WICIfdMetadataReader, IfdMetadataReader_CreateInstance}, {&CLSID_WICPngTextMetadataReader, PngTextReader_CreateInstance}, {&CLSID_WICLSDMetadataReader, LSDReader_CreateInstance}, + {&CLSID_WICIMDMetadataReader, IMDReader_CreateInstance}, {0}}; typedef struct { diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index c4ee566..f6a7d27 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -146,6 +146,100 @@ HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) return MetadataReader_Create(&LSDReader_Vtbl, pUnkOuter, iid, ppv); } +static HRESULT load_IMD_metadata(IStream *stream, const GUID *vendor, DWORD options, + MetadataItem **items, DWORD *count) +{ + struct image_descriptor + { + USHORT left; + USHORT top; + USHORT width; + USHORT height; + BYTE packed; + /* local_color_table_flag : 1; + * interlace_flag : 1; + * sort_flag : 1; + * reserved : 2; + * local_color_table_size : 3; + */ + } imd_data; + HRESULT hr; + ULONG bytesread, i; + MetadataItem *result; + + *items = NULL; + *count = 0; + + hr = IStream_Read(stream, &imd_data, sizeof(imd_data), &bytesread); + if (FAILED(hr) || bytesread != sizeof(imd_data)) return S_OK; + + result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem) * 8); + if (!result) return E_OUTOFMEMORY; + + for (i = 0; i < 8; i++) + { + PropVariantInit(&result[i].schema); + PropVariantInit(&result[i].id); + PropVariantInit(&result[i].value); + } + + result[0].id.vt = VT_LPWSTR; + result[0].id.u.pwszVal = strdupAtoW("Left"); + result[0].value.vt = VT_UI2; + result[0].value.u.uiVal = imd_data.left; + + result[1].id.vt = VT_LPWSTR; + result[1].id.u.pwszVal = strdupAtoW("Top"); + result[1].value.vt = VT_UI2; + result[1].value.u.uiVal = imd_data.top; + + result[2].id.vt = VT_LPWSTR; + result[2].id.u.pwszVal = strdupAtoW("Width"); + result[2].value.vt = VT_UI2; + result[2].value.u.uiVal = imd_data.width; + + result[3].id.vt = VT_LPWSTR; + result[3].id.u.pwszVal = strdupAtoW("Height"); + result[3].value.vt = VT_UI2; + result[3].value.u.uiVal = imd_data.height; + + result[4].id.vt = VT_LPWSTR; + result[4].id.u.pwszVal = strdupAtoW("LocalColorTableFlag"); + result[4].value.vt = VT_BOOL; + result[4].value.u.boolVal = (imd_data.packed >> 7) & 1; + + result[5].id.vt = VT_LPWSTR; + result[5].id.u.pwszVal = strdupAtoW("InterlaceFlag"); + result[5].value.vt = VT_BOOL; + result[5].value.u.boolVal = (imd_data.packed >> 6) & 1; + + result[6].id.vt = VT_LPWSTR; + result[6].id.u.pwszVal = strdupAtoW("SortFlag"); + result[6].value.vt = VT_BOOL; + result[6].value.u.boolVal = (imd_data.packed >> 5) & 1; + + result[7].id.vt = VT_LPWSTR; + result[7].id.u.pwszVal = strdupAtoW("LocalColorTableSize"); + result[7].value.vt = VT_UI1; + result[7].value.u.bVal = imd_data.packed & 7; + + *items = result; + *count = 8; + + return S_OK; +} + +static const MetadataHandlerVtbl IMDReader_Vtbl = { + 0, + &CLSID_WICIMDMetadataReader, + load_IMD_metadata +}; + +HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) +{ + return MetadataReader_Create(&IMDReader_Vtbl, pUnkOuter, iid, ppv); +} + typedef struct { IWICBitmapDecoder IWICBitmapDecoder_iface; LONG ref; diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index cb48d63..c232778 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -1532,6 +1532,21 @@ static const struct reader_containers lsd_containers[] = { { NULL } /* list terminator */ }; +static const BYTE imd_magic[] = { 0x2c }; + +static const struct metadata_pattern imd_metadata_pattern[] = { + { 0, 1, imd_magic, mask_all, 1 }, + { 0 } +}; + +static const struct reader_containers imd_containers[] = { + { + &GUID_ContainerFormatGif, + imd_metadata_pattern + }, + { NULL } /* list terminator */ +}; + static struct regsvr_metadatareader const metadatareader_list[] = { { &CLSID_WICUnknownMetadataReader, "The Wine Project", @@ -1573,6 +1588,16 @@ static struct regsvr_metadatareader const metadatareader_list[] = { 0, 0, 0, lsd_containers }, + { &CLSID_WICIMDMetadataReader, + "The Wine Project", + "Image Descriptor Reader", + "1.0.0.0", + "1.0.0.0", + &GUID_VendorMicrosoft, + &GUID_MetadataFormatIMD, + 0, 0, 0, + imd_containers + }, { NULL } /* list terminator */ }; diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index fd81e6f..bfa9116 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1365,7 +1365,6 @@ static void test_metadata_IMD(void) hr = CoCreateInstance(&CLSID_WICIMDMetadataReader, NULL, CLSCTX_INPROC_SERVER, &IID_IWICMetadataReader, (void **)&reader); -todo_wine ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, "CoCreateInstance error %#x\n", hr); diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 908b2e6..e26eec0 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -96,5 +96,6 @@ extern HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; extern HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; #endif /* WINCODECS_PRIVATE_H */ diff --git a/dlls/windowscodecs/windowscodecs_wincodec.idl b/dlls/windowscodecs/windowscodecs_wincodec.idl index d360ae5..942cbb7 100644 --- a/dlls/windowscodecs/windowscodecs_wincodec.idl +++ b/dlls/windowscodecs/windowscodecs_wincodec.idl @@ -149,3 +149,10 @@ coclass WICPngTextMetadataReader { interface IWICMetadataReader; } uuid(41070793-59e4-479a-a1f7-954adc2ef5fc) ] coclass WICLSDMetadataReader { interface IWICMetadataReader; } + +[ + helpstring("WIC IMD Metadata Reader"), + threading(both), + uuid(7447a267-0015-42c8-a8f1-fb3b94c68361) +] +coclass WICIMDMetadataReader { interface IWICMetadataReader; } From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Dmitry Timoshkov : windowscodecs: Implement Graphic Control Extension metadata reader. Message-ID: Module: wine Branch: master Commit: 26628b4c0a5cac045303470124bcd5b5a7eb08f4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=26628b4c0a5cac045303470124bcd5b5a7eb08f4 Author: Dmitry Timoshkov Date: Tue Sep 11 16:50:42 2012 +0900 windowscodecs: Implement Graphic Control Extension metadata reader. --- dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/gifformat.c | 78 +++++++++++++++++++++++++ dlls/windowscodecs/regsvr.c | 25 ++++++++ dlls/windowscodecs/tests/metadata.c | 1 - dlls/windowscodecs/wincodecs_private.h | 1 + dlls/windowscodecs/windowscodecs_wincodec.idl | 7 ++ 6 files changed, 112 insertions(+), 1 deletions(-) diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index dc70c04..a42aeab 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -64,6 +64,7 @@ static const classinfo wic_classes[] = { {&CLSID_WICPngTextMetadataReader, PngTextReader_CreateInstance}, {&CLSID_WICLSDMetadataReader, LSDReader_CreateInstance}, {&CLSID_WICIMDMetadataReader, IMDReader_CreateInstance}, + {&CLSID_WICGCEMetadataReader, GCEReader_CreateInstance}, {0}}; typedef struct { diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index f6a7d27..318dc5d 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -240,6 +240,84 @@ HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) return MetadataReader_Create(&IMDReader_Vtbl, pUnkOuter, iid, ppv); } +static HRESULT load_GCE_metadata(IStream *stream, const GUID *vendor, DWORD options, + MetadataItem **items, DWORD *count) +{ +#include "pshpack1.h" + struct graphic_control_extenstion + { + BYTE packed; + /* reservred: 3; + * disposal : 3; + * user_input_flag : 1; + * transparency_flag : 1; + */ + USHORT delay; + BYTE transparent_color_index; + } gce_data; +#include "poppack.h" + HRESULT hr; + ULONG bytesread, i; + MetadataItem *result; + + *items = NULL; + *count = 0; + + hr = IStream_Read(stream, &gce_data, sizeof(gce_data), &bytesread); + if (FAILED(hr) || bytesread != sizeof(gce_data)) return S_OK; + + result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem) * 5); + if (!result) return E_OUTOFMEMORY; + + for (i = 0; i < 5; i++) + { + PropVariantInit(&result[i].schema); + PropVariantInit(&result[i].id); + PropVariantInit(&result[i].value); + } + + result[0].id.vt = VT_LPWSTR; + result[0].id.u.pwszVal = strdupAtoW("Disposal"); + result[0].value.vt = VT_UI1; + result[0].value.u.bVal = (gce_data.packed >> 2) & 7; + + result[1].id.vt = VT_LPWSTR; + result[1].id.u.pwszVal = strdupAtoW("UserInputFlag"); + result[1].value.vt = VT_BOOL; + result[1].value.u.boolVal = (gce_data.packed >> 1) & 1; + + result[2].id.vt = VT_LPWSTR; + result[2].id.u.pwszVal = strdupAtoW("TransparencyFlag"); + result[2].value.vt = VT_BOOL; + result[2].value.u.boolVal = gce_data.packed & 1; + + result[3].id.vt = VT_LPWSTR; + result[3].id.u.pwszVal = strdupAtoW("Delay"); + result[3].value.vt = VT_UI2; + result[3].value.u.uiVal = gce_data.delay; + + result[4].id.vt = VT_LPWSTR; + result[4].id.u.pwszVal = strdupAtoW("TransparentColorIndex"); + result[4].value.vt = VT_UI1; + result[4].value.u.bVal = gce_data.transparent_color_index; + + *items = result; + *count = 5; + + return S_OK; +} + +static const MetadataHandlerVtbl GCEReader_Vtbl = { + 0, + &CLSID_WICGCEMetadataReader, + load_GCE_metadata +}; + +HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) +{ + return MetadataReader_Create(&GCEReader_Vtbl, pUnkOuter, iid, ppv); +} + typedef struct { IWICBitmapDecoder IWICBitmapDecoder_iface; LONG ref; diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index c232778..a7ac4b2 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -1547,6 +1547,21 @@ static const struct reader_containers imd_containers[] = { { NULL } /* list terminator */ }; +static const BYTE gce_magic[] = { 0x21, 0xf9, 0x04 }; + +static const struct metadata_pattern gce_metadata_pattern[] = { + { 0, 3, gce_magic, mask_all, 3 }, + { 0 } +}; + +static const struct reader_containers gce_containers[] = { + { + &GUID_ContainerFormatGif, + gce_metadata_pattern + }, + { NULL } /* list terminator */ +}; + static struct regsvr_metadatareader const metadatareader_list[] = { { &CLSID_WICUnknownMetadataReader, "The Wine Project", @@ -1598,6 +1613,16 @@ static struct regsvr_metadatareader const metadatareader_list[] = { 0, 0, 0, imd_containers }, + { &CLSID_WICGCEMetadataReader, + "The Wine Project", + "Graphic Control Extension Reader", + "1.0.0.0", + "1.0.0.0", + &GUID_VendorMicrosoft, + &GUID_MetadataFormatGCE, + 0, 0, 0, + gce_containers + }, { NULL } /* list terminator */ }; diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index bfa9116..e274106 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1440,7 +1440,6 @@ static void test_metadata_GCE(void) hr = CoCreateInstance(&CLSID_WICGCEMetadataReader, NULL, CLSCTX_INPROC_SERVER, &IID_IWICMetadataReader, (void **)&reader); -todo_wine ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, "CoCreateInstance error %#x\n", hr); diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index e26eec0..b712b2f 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -97,5 +97,6 @@ extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, extern HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; extern HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; #endif /* WINCODECS_PRIVATE_H */ diff --git a/dlls/windowscodecs/windowscodecs_wincodec.idl b/dlls/windowscodecs/windowscodecs_wincodec.idl index 942cbb7..e109bf2 100644 --- a/dlls/windowscodecs/windowscodecs_wincodec.idl +++ b/dlls/windowscodecs/windowscodecs_wincodec.idl @@ -156,3 +156,10 @@ coclass WICLSDMetadataReader { interface IWICMetadataReader; } uuid(7447a267-0015-42c8-a8f1-fb3b94c68361) ] coclass WICIMDMetadataReader { interface IWICMetadataReader; } + +[ + helpstring("WIC GCE Metadata Reader"), + threading(both), + uuid(b92e345d-f52d-41f3-b562-081bc772e3b9) +] +coclass WICGCEMetadataReader { interface IWICMetadataReader; } From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Qian Hong : gdi32/tests: Fixed a typo in style name test. Message-ID: Module: wine Branch: master Commit: e7dcb0e26027634c112a195b51416b2e1f419c2e URL: http://source.winehq.org/git/wine.git/?a=commit;h=e7dcb0e26027634c112a195b51416b2e1f419c2e Author: Qian Hong Date: Tue Sep 11 01:04:52 2012 +0800 gdi32/tests: Fixed a typo in style name test. --- dlls/gdi32/tests/font.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 3f7af21..22c3209 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4135,7 +4135,7 @@ static void test_fullname2_helper(const char *Family) ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_SUBFAMILY, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); ok(ret, "SUBFAMILY (style name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); - ok(!lstrcmpA(StyleName, bufA), "style names don't match: returned %s, expect %s\n", FaceName, bufA); + ok(!lstrcmpA(StyleName, bufA), "style names don't match: returned %s, expect %s\n", StyleName, bufA); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpStyleName; ok(!lstrcmpA(StyleName, otmStr), "StyleName %s doesn't match otmpStyleName %s\n", StyleName, otmStr); From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Qian Hong : gdi32/tests: Better trace in test_fullname2_helper. Message-ID: Module: wine Branch: master Commit: 4461612e33a8ddd8abb4ef2d77ef5e261ea59f39 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4461612e33a8ddd8abb4ef2d77ef5e261ea59f39 Author: Qian Hong Date: Tue Sep 11 01:05:28 2012 +0800 gdi32/tests: Better trace in test_fullname2_helper. --- dlls/gdi32/tests/font.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 22c3209..bbfa02b 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4107,7 +4107,7 @@ static void test_fullname2_helper(const char *Family) ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_FAMILY, bufW, buf_size, GetSystemDefaultLangID()); if (!ret) { - trace("no localized name found.\n"); + trace("no localized FONT_FAMILY found.\n"); ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_FAMILY, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); } ok(ret, "FAMILY (family name) could not be read\n"); @@ -4121,7 +4121,7 @@ static void test_fullname2_helper(const char *Family) ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, buf_size, GetSystemDefaultLangID()); if (!ret) { - trace("no localized name found.\n"); + trace("no localized FULL_NAME found.\n"); ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); } ok(ret, "FULL_NAME (face name) could not be read\n"); From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Qian Hong : gdi32: Fixed localized font style name. Message-ID: Module: wine Branch: master Commit: 80dbd4e9cf561c6d21723ca25782b3c8f5326460 URL: http://source.winehq.org/git/wine.git/?a=commit;h=80dbd4e9cf561c6d21723ca25782b3c8f5326460 Author: Qian Hong Date: Tue Sep 11 01:05:57 2012 +0800 gdi32: Fixed localized font style name. --- dlls/gdi32/freetype.c | 26 ++++++++++++++++++++------ dlls/gdi32/tests/font.c | 7 ++++++- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 28ca616..efb12a4 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1714,7 +1714,14 @@ static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file, Face *face = HeapAlloc( GetProcessHeap(), 0, sizeof(*face) ); My_FT_Bitmap_Size *size = (My_FT_Bitmap_Size *)ft_face->available_sizes; - face->StyleName = towstr( CP_ACP, ft_face->style_name ); + face->StyleName = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, GetSystemDefaultLangID() ); + if (!face->StyleName) + face->StyleName = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + if (!face->StyleName) + { + face->StyleName = towstr( CP_ACP, ft_face->style_name ); + } + face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, GetSystemDefaultLangID() ); if (!face->FullName) face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); @@ -6549,11 +6556,18 @@ static BOOL get_outline_text_metrics(GdiFont *font) lenfam = (strlenW(font->name) + 1) * sizeof(WCHAR); family_nameW = strdupW(font->name); - lensty = MultiByteToWideChar(CP_ACP, 0, ft_face->style_name, -1, NULL, 0) - * sizeof(WCHAR); - style_nameW = HeapAlloc(GetProcessHeap(), 0, lensty); - MultiByteToWideChar(CP_ACP, 0, ft_face->style_name, -1, - style_nameW, lensty/sizeof(WCHAR)); + style_nameW = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, GetSystemDefaultLangID() ); + if (!style_nameW) + style_nameW = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + if (!style_nameW) + { + FIXME("failed to read sytle_nameW for font %s!\n", wine_dbgstr_w(font->name)); + lensty = MultiByteToWideChar(CP_ACP, 0, ft_face->style_name, -1, NULL, 0) * sizeof(WCHAR); + style_nameW = HeapAlloc(GetProcessHeap(), 0, lensty); + MultiByteToWideChar(CP_ACP, 0, ft_face->style_name, -1, style_nameW, lensty/sizeof(WCHAR)); + } + else + lensty = (strlenW(style_nameW) + 1) * sizeof(WCHAR); face_nameW = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, GetSystemDefaultLangID() ); if (!face_nameW) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index bbfa02b..07f8dcb 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4132,7 +4132,12 @@ static void test_fullname2_helper(const char *Family) bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_SUBFAMILY, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_SUBFAMILY, bufW, buf_size, GetSystemDefaultLangID()); + if (!ret) + { + trace("no localized FONT_SUBFAMILY font.\n"); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_SUBFAMILY, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + } ok(ret, "SUBFAMILY (style name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); ok(!lstrcmpA(StyleName, bufA), "style names don't match: returned %s, expect %s\n", StyleName, bufA); From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Qian Hong : gdi32/tests: Added tests for symbol fonts. Message-ID: Module: wine Branch: master Commit: 84954c0dbe636edb7be6b4e4da7f0648af16a48e URL: http://source.winehq.org/git/wine.git/?a=commit;h=84954c0dbe636edb7be6b4e4da7f0648af16a48e Author: Qian Hong Date: Tue Sep 11 01:06:19 2012 +0800 gdi32/tests: Added tests for symbol fonts. --- dlls/gdi32/tests/font.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 07f8dcb..ef4e51d 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2777,6 +2777,7 @@ end: } #define TT_PLATFORM_MICROSOFT 3 +#define TT_MS_ID_SYMBOL_CS 0 #define TT_MS_ID_UNICODE_CS 1 #define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 #define TT_NAME_ID_FONT_FAMILY 1 @@ -2840,7 +2841,7 @@ static BOOL get_ttf_nametable_entry(HDC hdc, WORD name_id, WCHAR *out_buf, SIZE_ for (i = 0; i < header->number_of_record; i++) { if (GET_BE_WORD(entry[i].platform_id) != TT_PLATFORM_MICROSOFT || - GET_BE_WORD(entry[i].encoding_id) != TT_MS_ID_UNICODE_CS || + (GET_BE_WORD(entry[i].encoding_id) != TT_MS_ID_UNICODE_CS && GET_BE_WORD(entry[i].encoding_id) != TT_MS_ID_SYMBOL_CS) || GET_BE_WORD(entry[i].language_id) != language_id || GET_BE_WORD(entry[i].name_id) != name_id) { @@ -4150,7 +4151,9 @@ static void test_fullname2_helper(const char *Family) ok(ret, "UNIQUE_ID (full name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFullName; - ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); + if (efnd.elf[i].elfLogFont.lfCharSet == SYMBOL_CHARSET) + todo_wine ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); + else ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); SelectObject(hdc, of); DeleteObject(hfont); @@ -4165,6 +4168,8 @@ static void test_fullname2_helper(const char *Family) static void test_fullname2(void) { test_fullname2_helper("Lucida Sans"); + test_fullname2_helper("Webdings"); + test_fullname2_helper("Wingdings"); } static BOOL write_ttf_file(const char *fontname, char *tmp_name) From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Qian Hong : gdi32: Fixed get_name_table_entry for symbol fonts. Message-ID: Module: wine Branch: master Commit: de5972081eb734366aa02d3685c27cfa13144b90 URL: http://source.winehq.org/git/wine.git/?a=commit;h=de5972081eb734366aa02d3685c27cfa13144b90 Author: Qian Hong Date: Tue Sep 11 01:06:39 2012 +0800 gdi32: Fixed get_name_table_entry for symbol fonts. --- dlls/gdi32/freetype.c | 3 +-- dlls/gdi32/tests/font.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index efb12a4..9412df2 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1146,7 +1146,7 @@ static BOOL get_name_table_entry(FT_Face ft_face, FT_SfntName *req) if(!pFT_Get_Sfnt_Name(ft_face, name_index, &name)) { if((name.platform_id == req->platform_id) && - (name.encoding_id == req->encoding_id) && + ((name.encoding_id == TT_MS_ID_UNICODE_CS) || (name.encoding_id == TT_MS_ID_SYMBOL_CS)) && (name.language_id == req->language_id) && (name.name_id == req->name_id)) { @@ -1168,7 +1168,6 @@ static WCHAR *get_face_name(FT_Face ft_face, FT_UShort name_id, FT_UShort langua FT_SfntName name; name.platform_id = TT_PLATFORM_MICROSOFT; - name.encoding_id = TT_MS_ID_UNICODE_CS; name.language_id = language_id; name.name_id = name_id; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index ef4e51d..0c67fe7 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4151,9 +4151,7 @@ static void test_fullname2_helper(const char *Family) ok(ret, "UNIQUE_ID (full name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFullName; - if (efnd.elf[i].elfLogFont.lfCharSet == SYMBOL_CHARSET) - todo_wine ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); - else ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); + ok(!lstrcmpA(otmStr, bufA), "UNIQUE ID (full name) doesn't match: returned %s, expect %s\n", otmStr, bufA); SelectObject(hdc, of); DeleteObject(hfont); From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Henri Verbeet : d3d10core: Implement d3d10_depthstencil_view_GetResource(). Message-ID: Module: wine Branch: master Commit: d2fdeaa4fef907dbc2d2134f90ab335363760fca URL: http://source.winehq.org/git/wine.git/?a=commit;h=d2fdeaa4fef907dbc2d2134f90ab335363760fca Author: Henri Verbeet Date: Tue Sep 11 00:27:01 2012 +0200 d3d10core: Implement d3d10_depthstencil_view_GetResource(). --- dlls/d3d10core/d3d10core_private.h | 5 ++++- dlls/d3d10core/device.c | 3 +-- dlls/d3d10core/view.c | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 153c5cc..95d929a 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -128,9 +128,12 @@ struct d3d10_depthstencil_view { ID3D10DepthStencilView ID3D10DepthStencilView_iface; LONG refcount; + + ID3D10Resource *resource; }; -HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view) DECLSPEC_HIDDEN; +HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view, + ID3D10Resource *resource) DECLSPEC_HIDDEN; /* ID3D10RenderTargetView */ struct d3d10_rendertarget_view diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 2d1db4e..6cd7737 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -804,8 +804,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilView(ID3D10Devic return E_OUTOFMEMORY; } - hr = d3d10_depthstencil_view_init(object); - if (FAILED(hr)) + if (FAILED(hr = d3d10_depthstencil_view_init(object, resource))) { WARN("Failed to initialize depthstencil view, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); diff --git a/dlls/d3d10core/view.c b/dlls/d3d10core/view.c index a542e63..792e79b 100644 --- a/dlls/d3d10core/view.c +++ b/dlls/d3d10core/view.c @@ -211,6 +211,7 @@ static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_Release(ID3D10DepthStenci if (!refcount) { + ID3D10Resource_Release(This->resource); HeapFree(GetProcessHeap(), 0, This); } @@ -255,7 +256,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_SetPrivateDataInterface static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetResource(ID3D10DepthStencilView *iface, ID3D10Resource **resource) { - FIXME("iface %p, resource %p stub!\n", iface, resource); + struct d3d10_depthstencil_view *view = impl_from_ID3D10DepthStencilView(iface); + + TRACE("iface %p, resource %p.\n", iface, resource); + + *resource = view->resource; + ID3D10Resource_AddRef(*resource); } /* ID3D10DepthStencilView methods */ @@ -283,11 +289,15 @@ static const struct ID3D10DepthStencilViewVtbl d3d10_depthstencil_view_vtbl = d3d10_depthstencil_view_GetDesc, }; -HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view) +HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view, + ID3D10Resource *resource) { view->ID3D10DepthStencilView_iface.lpVtbl = &d3d10_depthstencil_view_vtbl; view->refcount = 1; + view->resource = resource; + ID3D10Resource_AddRef(resource); + return S_OK; } From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Henri Verbeet : wined3d: wined3d_device_set_render_state() never fails. Message-ID: Module: wine Branch: master Commit: 75cec973d5ba6aa7d65b8dabb76617457af1d94b URL: http://source.winehq.org/git/wine.git/?a=commit;h=75cec973d5ba6aa7d65b8dabb76617457af1d94b Author: Henri Verbeet Date: Tue Sep 11 00:27:02 2012 +0200 wined3d: wined3d_device_set_render_state() never fails. --- dlls/d3d8/device.c | 16 +++++----------- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/device.c | 6 ++++-- dlls/wined3d/device.c | 6 ++---- include/wine/wined3d.h | 2 +- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 5a029f2..2cf957e 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -600,7 +600,7 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface, wined3d_swapchain_desc_from_present_parameters(&swapchain_desc, present_parameters); if (SUCCEEDED(hr = wined3d_device_reset(device->wined3d_device, &swapchain_desc, NULL, reset_enum_callback))) { - hr = wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0); + wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0); device->lost = FALSE; } else @@ -1453,7 +1453,6 @@ static HRESULT WINAPI d3d8_device_SetRenderState(IDirect3DDevice8 *iface, D3DRENDERSTATETYPE state, DWORD value) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; TRACE("iface %p, state %#x, value %#x.\n", iface, state, value); @@ -1461,15 +1460,15 @@ static HRESULT WINAPI d3d8_device_SetRenderState(IDirect3DDevice8 *iface, switch (state) { case D3DRS_ZBIAS: - hr = wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value); + wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value); break; default: - hr = wined3d_device_set_render_state(device->wined3d_device, state, value); + wined3d_device_set_render_state(device->wined3d_device, state, value); } wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetRenderState(IDirect3DDevice8 *iface, @@ -3038,13 +3037,8 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine return hr; } - hr = wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0); + wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0); wined3d_mutex_unlock(); - if (FAILED(hr)) - { - ERR("Failed to set minimum pointsize, hr %#x.\n", hr); - goto err; - } present_parameters_from_wined3d_swapchain_desc(parameters, &swapchain_desc); diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2e33c9f..63a611d 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1519,15 +1519,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevi D3DRENDERSTATETYPE state, DWORD value) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, state %#x, value %#x.\n", iface, state, value); wined3d_mutex_lock(); - hr = wined3d_device_set_render_state(device->wined3d_device, state, value); + wined3d_device_set_render_state(device->wined3d_device, state, value); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetRenderState(IDirect3DDevice9Ex *iface, diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 7848b0d..a81fa31 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2627,7 +2627,8 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface, break; case D3DRENDERSTATE_ZBIAS: - hr = wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value); + wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value); + hr = D3D_OK; break; default: @@ -2639,7 +2640,8 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface, break; } - hr = wined3d_device_set_render_state(device->wined3d_device, state, value); + wined3d_device_set_render_state(device->wined3d_device, state, value); + hr = D3D_OK; break; } wined3d_mutex_unlock(); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e0849ce..3998408 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2317,7 +2317,7 @@ void CDECL wined3d_device_get_viewport(const struct wined3d_device *device, stru *viewport = device->stateBlock->state.viewport; } -HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device, +void CDECL wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value) { DWORD old_value = device->stateBlock->state.render_states[state]; @@ -2331,7 +2331,7 @@ HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device, if (device->isRecordingState) { TRACE("Recording... not performing anything.\n"); - return WINED3D_OK; + return; } /* Compared here and not before the assignment to allow proper stateblock recording. */ @@ -2339,8 +2339,6 @@ HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device, TRACE("Application is setting the old value over, nothing to do.\n"); else device_invalidate_state(device, STATE_RENDER(state)); - - return WINED3D_OK; } HRESULT CDECL wined3d_device_get_render_state(const struct wined3d_device *device, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 1fa1342..d2a2811 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2220,7 +2220,7 @@ HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device, UINT start_register, const float *constants, UINT vector4f_count); HRESULT __cdecl wined3d_device_set_ps_consts_i(struct wined3d_device *device, UINT start_register, const int *constants, UINT vector4i_count); -HRESULT __cdecl wined3d_device_set_render_state(struct wined3d_device *device, +void __cdecl wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value); HRESULT __cdecl wined3d_device_set_render_target(struct wined3d_device *device, UINT render_target_idx, struct wined3d_surface *render_target, BOOL set_viewport); From julliard at winehq.org Tue Sep 11 16:59:06 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:06 -0500 Subject: Henri Verbeet : wined3d: wined3d_device_get_render_state() never fails. Message-ID: Module: wine Branch: master Commit: d601a0dede8be827bc41d167ae8e360818da9ec5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d601a0dede8be827bc41d167ae8e360818da9ec5 Author: Henri Verbeet Date: Tue Sep 11 00:27:03 2012 +0200 wined3d: wined3d_device_get_render_state() never fails. --- dlls/d3d8/device.c | 7 +++---- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/device.c | 6 ++++-- dlls/ddraw/vertexbuffer.c | 2 +- dlls/wined3d/device.c | 9 +++------ dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 3 +-- 7 files changed, 15 insertions(+), 19 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 2cf957e..25f7534 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1475,7 +1475,6 @@ static HRESULT WINAPI d3d8_device_GetRenderState(IDirect3DDevice8 *iface, D3DRENDERSTATETYPE state, DWORD *value) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; TRACE("iface %p, state %#x, value %p.\n", iface, state, value); @@ -1483,15 +1482,15 @@ static HRESULT WINAPI d3d8_device_GetRenderState(IDirect3DDevice8 *iface, switch (state) { case D3DRS_ZBIAS: - hr = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value); + *value = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS); break; default: - hr = wined3d_device_get_render_state(device->wined3d_device, state, value); + *value = wined3d_device_get_render_state(device->wined3d_device, state); } wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_BeginStateBlock(IDirect3DDevice8 *iface) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 63a611d..e10b698 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1533,15 +1533,14 @@ static HRESULT WINAPI d3d9_device_GetRenderState(IDirect3DDevice9Ex *iface, D3DRENDERSTATETYPE state, DWORD *value) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, state %#x, value %p.\n", iface, state, value); wined3d_mutex_lock(); - hr = wined3d_device_get_render_state(device->wined3d_device, state, value); + *value = wined3d_device_get_render_state(device->wined3d_device, state); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_CreateStateBlock(IDirect3DDevice9Ex *iface, diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index a81fa31..f51222b 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2331,7 +2331,8 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface, break; case D3DRENDERSTATE_ZBIAS: - hr = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value); + *value = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS); + hr = D3D_OK; break; default: @@ -2342,7 +2343,8 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface, hr = E_NOTIMPL; break; } - hr = wined3d_device_get_render_state(device->wined3d_device, state, value); + *value = wined3d_device_get_render_state(device->wined3d_device, state); + hr = D3D_OK; } wined3d_mutex_unlock(); diff --git a/dlls/ddraw/vertexbuffer.c b/dlls/ddraw/vertexbuffer.c index 29feb87..39a977f 100644 --- a/dlls/ddraw/vertexbuffer.c +++ b/dlls/ddraw/vertexbuffer.c @@ -339,7 +339,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_ProcessVertices(IDirect3DVertexBuffer7 * the vertex ops */ doClip = !!(vertex_op & D3DVOP_CLIP); - wined3d_device_get_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, (DWORD *)&oldClip); + oldClip = wined3d_device_get_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING); if (doClip != oldClip) wined3d_device_set_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, doClip); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3998408..2cf3028 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2341,14 +2341,11 @@ void CDECL wined3d_device_set_render_state(struct wined3d_device *device, device_invalidate_state(device, STATE_RENDER(state)); } -HRESULT CDECL wined3d_device_get_render_state(const struct wined3d_device *device, - enum wined3d_render_state state, DWORD *value) +DWORD CDECL wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state) { - TRACE("device %p, state %s (%#x), value %p.\n", device, debug_d3drenderstate(state), state, value); + TRACE("device %p, state %s (%#x).\n", device, debug_d3drenderstate(state), state); - *value = device->stateBlock->state.render_states[state]; - - return WINED3D_OK; + return device->stateBlock->state.render_states[state]; } HRESULT CDECL wined3d_device_set_sampler_state(struct wined3d_device *device, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index c211e4a..7aea714 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -75,7 +75,7 @@ @ cdecl wined3d_device_get_ps_consts_f(ptr long ptr long) @ cdecl wined3d_device_get_ps_consts_i(ptr long ptr long) @ cdecl wined3d_device_get_raster_status(ptr long ptr) -@ cdecl wined3d_device_get_render_state(ptr long ptr) +@ cdecl wined3d_device_get_render_state(ptr long) @ cdecl wined3d_device_get_render_target(ptr long ptr) @ cdecl wined3d_device_get_sampler_state(ptr long long ptr) @ cdecl wined3d_device_get_scissor_rect(ptr ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index d2a2811..d581097 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2142,8 +2142,7 @@ HRESULT __cdecl wined3d_device_get_ps_consts_i(const struct wined3d_device *devi UINT start_register, int *constants, UINT vector4i_count); HRESULT __cdecl wined3d_device_get_raster_status(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_raster_status *raster_status); -HRESULT __cdecl wined3d_device_get_render_state(const struct wined3d_device *device, - enum wined3d_render_state state, DWORD *value); +DWORD __cdecl wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state); HRESULT __cdecl wined3d_device_get_render_target(const struct wined3d_device *device, UINT render_target_idx, struct wined3d_surface **render_target); HRESULT __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *device, From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Henri Verbeet : user32: Add rawinput mouse support. Message-ID: Module: wine Branch: master Commit: faaf3d388eb6db8c2594cb11f76a2b1bce77edf3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=faaf3d388eb6db8c2594cb11f76a2b1bce77edf3 Author: Henri Verbeet Date: Tue Sep 11 00:27:04 2012 +0200 user32: Add rawinput mouse support. --- dlls/user32/input.c | 37 ++++++++++++++-- dlls/user32/message.c | 91 ++++++++++++++++++++++++++++++++++++++-- dlls/user32/user_main.c | 1 + dlls/user32/user_private.h | 3 +- include/wine/server_protocol.h | 13 +++++- server/process.c | 1 + server/process.h | 1 + server/protocol.def | 11 +++++ server/queue.c | 60 +++++++++++++++++++++++--- 9 files changed, 201 insertions(+), 17 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=faaf3d388eb6db8c2594cb11f76a2b1bce77edf3 From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Michael Stefaniuc : comdlg32: Remove gratuitous "stub" from a TRACE message . Message-ID: Module: wine Branch: master Commit: c34baac0cbb9e5fb86898cbf015c6183b70cf90a URL: http://source.winehq.org/git/wine.git/?a=commit;h=c34baac0cbb9e5fb86898cbf015c6183b70cf90a Author: Michael Stefaniuc Date: Tue Sep 11 12:11:18 2012 +0200 comdlg32: Remove gratuitous "stub" from a TRACE message. --- dlls/comdlg32/filedlgbrowser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comdlg32/filedlgbrowser.c b/dlls/comdlg32/filedlgbrowser.c index 1dda9a8..ffe65c9 100644 --- a/dlls/comdlg32/filedlgbrowser.c +++ b/dlls/comdlg32/filedlgbrowser.c @@ -150,7 +150,7 @@ static void COMDLG32_UpdateCurrentDir(const FileOpenDlgInfos *fodInfos) /* copied from shell32 to avoid linking to it */ static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl) { - TRACE("dest=%p len=0x%x strret=%p pidl=%p stub\n",dest,len,src,pidl); + TRACE("dest=%p len=0x%x strret=%p pidl=%p\n", dest , len, src, pidl); switch (src->uType) { From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Michael Stefaniuc : shlwapi: Remove gratuitous "stub" from TRACE messages. Message-ID: Module: wine Branch: master Commit: c637cbc397598cf0eeae7368cdab14bee378cc75 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c637cbc397598cf0eeae7368cdab14bee378cc75 Author: Michael Stefaniuc Date: Tue Sep 11 12:13:19 2012 +0200 shlwapi: Remove gratuitous "stub" from TRACE messages. --- dlls/shlwapi/string.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c index a919d8a..b123036 100644 --- a/dlls/shlwapi/string.c +++ b/dlls/shlwapi/string.c @@ -1425,7 +1425,7 @@ HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, U * It was duplicated because not every version of Shlwapi.dll exports * StrRetToBufA. If you change one routine, change them both. */ - TRACE("dest=%p len=0x%x strret=%p pidl=%p stub\n",dest,len,src,pidl); + TRACE("dest=%p len=0x%x strret=%p pidl=%p\n", dest, len, src, pidl); if (!src) { @@ -1469,7 +1469,7 @@ HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, U */ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len) { - TRACE("dest=%p len=0x%x strret=%p pidl=%p stub\n",dest,len,src,pidl); + TRACE("dest=%p len=0x%x strret=%p pidl=%p\n", dest, len, src, pidl); if (!src) { From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Piotr Caban : msvcp90: Fixed reading lines containing only delimiter in basic_istream:: getline_bstr_delim. Message-ID: Module: wine Branch: master Commit: cba2102b7e39bc2d4476bc35e5c137c8c3d8099c URL: http://source.winehq.org/git/wine.git/?a=commit;h=cba2102b7e39bc2d4476bc35e5c137c8c3d8099c Author: Piotr Caban Date: Tue Sep 11 16:07:57 2012 +0200 msvcp90: Fixed reading lines containing only delimiter in basic_istream::getline_bstr_delim. --- dlls/msvcp90/ios.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 7cf646b..82010c6 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -8103,8 +8103,11 @@ basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim( if(basic_istream_char_sentry_create(istream, TRUE)) { MSVCP_basic_string_char_clear(str); - for(c = basic_istream_char_get(istream); c!=delim && c!=EOF; - c = basic_istream_char_get(istream)) { + c = basic_istream_char_get(istream); + if(c != EOF) + state = IOSTATE_goodbit; + + for(; c!=delim && c!=EOF; c = basic_istream_char_get(istream)) { state = IOSTATE_goodbit; MSVCP_basic_string_char_append_ch(str, c); } @@ -9523,8 +9526,11 @@ basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim( if(basic_istream_wchar_sentry_create(istream, TRUE)) { MSVCP_basic_string_wchar_clear(str); - for(c = basic_istream_wchar_get(istream); c!=delim && c!=WEOF; - c = basic_istream_wchar_get(istream)) { + c = basic_istream_wchar_get(istream); + if(c != WEOF) + state = IOSTATE_goodbit; + + for(; c!=delim && c!=WEOF; c = basic_istream_wchar_get(istream)) { state = IOSTATE_goodbit; MSVCP_basic_string_wchar_append_ch(str, c); } From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Piotr Caban : msvcp90: Fixed copied buffer siezes in functions operating on wchar_t. Message-ID: Module: wine Branch: master Commit: 5258b3a219c310175e32b837b39214dd37c5d061 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5258b3a219c310175e32b837b39214dd37c5d061 Author: Piotr Caban Date: Tue Sep 11 16:08:21 2012 +0200 msvcp90: Fixed copied buffer siezes in functions operating on wchar_t. --- dlls/msvcp100/ios.c | 8 ++++---- dlls/msvcp90/ios.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/msvcp100/ios.c b/dlls/msvcp100/ios.c index 9d6ad67..57c1aa4 100644 --- a/dlls/msvcp100/ios.c +++ b/dlls/msvcp100/ios.c @@ -1822,11 +1822,11 @@ streamsize __thiscall basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *thi chunk = count-copied; if(chunk > 0) { - memcpy_s(ptr+copied, size, *this->prpos, chunk); + memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t)); *this->prpos += chunk; *this->prsize -= chunk; copied += chunk; - size -= chunk; + size -= chunk*sizeof(wchar_t); }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) { ptr[copied] = c; copied++; @@ -2315,7 +2315,7 @@ streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, chunk = count-copied; if(chunk > 0) { - memcpy(*this->pwpos, ptr+copied, chunk); + memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t)); *this->pwpos += chunk; *this->pwsize -= chunk; copied += chunk; @@ -3948,7 +3948,7 @@ void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const w throw_exception(EXCEPTION_BAD_ALLOC, NULL); } - memcpy(buf, str, count); + memcpy(buf, str, count*sizeof(wchar_t)); this->seekhigh = buf + count; this->state |= STRINGBUF_allocated; diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 82010c6..699ac98 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -1812,11 +1812,11 @@ streamsize __thiscall basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *thi chunk = count-copied; if(chunk > 0) { - memcpy_s(ptr+copied, size, *this->prpos, chunk); + memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t)); *this->prpos += chunk; *this->prsize -= chunk; copied += chunk; - size -= chunk; + size -= chunk*sizeof(wchar_t); }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) { ptr[copied] = c; copied++; @@ -2305,7 +2305,7 @@ streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, chunk = count-copied; if(chunk > 0) { - memcpy(*this->pwpos, ptr+copied, chunk); + memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t)); *this->pwpos += chunk; *this->pwsize -= chunk; copied += chunk; @@ -3938,7 +3938,7 @@ void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const w throw_exception(EXCEPTION_BAD_ALLOC, NULL); } - memcpy(buf, str, count); + memcpy(buf, str, count*sizeof(wchar_t)); this->seekhigh = buf + count; this->state |= STRINGBUF_allocated; From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Piotr Caban : msvcp: Prevent overflows while operating on string sizes. Message-ID: Module: wine Branch: master Commit: 39e9ac03179363d0586e65a753c50d9791af5673 URL: http://source.winehq.org/git/wine.git/?a=commit;h=39e9ac03179363d0586e65a753c50d9791af5673 Author: Piotr Caban Date: Tue Sep 11 16:08:56 2012 +0200 msvcp: Prevent overflows while operating on string sizes. --- dlls/msvcp100/string.c | 12 ++++++------ dlls/msvcp60/string.c | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/msvcp100/string.c b/dlls/msvcp100/string.c index bbd01b4..5fb117f 100644 --- a/dlls/msvcp100/string.c +++ b/dlls/msvcp100/string.c @@ -977,7 +977,7 @@ int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len( if(this->size < pos) MSVCP__String_base_Xran(); - if(pos+num > this->size) + if(num > this->size-pos) num = this->size-pos; ans = MSVCP_char_traits_char_compare(basic_string_char_const_ptr(this)+pos, @@ -1024,7 +1024,7 @@ int __thiscall MSVCP_basic_string_char_compare_substr_substr( if(compare->size < off) MSVCP__String_base_Xran(); - if(off+count > compare->size) + if(count > compare->size-off) count = compare->size-off; return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num, @@ -1512,7 +1512,7 @@ basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char if(str->size < str_off) MSVCP__String_base_Xran(); - if(str_off+str_len > str->size) + if(str_len > str->size-str_off) str_len = str->size-str_off; return basic_string_char_replace_cstr_len(this, off, len, @@ -2690,7 +2690,7 @@ int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len( if(this->size < pos) MSVCP__String_base_Xran(); - if(pos+num > this->size) + if(num > this->size-pos) num = this->size-pos; ans = MSVCP_char_traits_wchar_compare(basic_string_wchar_const_ptr(this)+pos, @@ -2743,7 +2743,7 @@ int __thiscall MSVCP_basic_string_wchar_compare_substr_substr( if(compare->size < off) MSVCP__String_base_Xran(); - if(off+count > compare->size) + if(count > compare->size-off) count = compare->size-off; return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num, @@ -3218,7 +3218,7 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wc if(str->size < str_off) MSVCP__String_base_Xran(); - if(str_off+str_len > str->size) + if(str_len > str->size-str_off) str_len = str->size-str_off; return basic_string_wchar_replace_cstr_len(this, off, len, diff --git a/dlls/msvcp60/string.c b/dlls/msvcp60/string.c index 2553e5b..2180149 100644 --- a/dlls/msvcp60/string.c +++ b/dlls/msvcp60/string.c @@ -549,7 +549,7 @@ int __thiscall basic_string_char_compare_substr_cstr_len( if(this->size < pos) _Xran(); - if(pos+num > this->size) + if(num > this->size-pos) num = this->size-pos; ans = char_traits_char_compare(this->ptr+pos, @@ -586,7 +586,7 @@ int __thiscall basic_string_char_compare_substr_substr( if(compare->size < off) _Xran(); - if(off+count > compare->size) + if(count > compare->size-off) count = compare->size-off; return basic_string_char_compare_substr_cstr_len(this, pos, num, @@ -1338,7 +1338,7 @@ basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_ch if(this->size < off) _Xran(); - if(off+len > this->size) + if(len > this->size-off) len = this->size-off; if(basic_string_char_npos-str_len <= this->size-len) @@ -1388,7 +1388,7 @@ basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char if(str->size < str_off) _Xran(); - if(str_off+str_len > str->size) + if(str_len > str->size-str_off) str_len = str->size-str_off; return basic_string_char_replace_cstr_len(this, off, len, @@ -1418,7 +1418,7 @@ basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *th if(this->size < off) _Xran(); - if(off+len > this->size) + if(len > this->size-off) len = this->size-off; if(basic_string_char_npos-count <= this->size-len) @@ -2239,7 +2239,7 @@ int __thiscall basic_string_wchar_compare_substr_cstr_len( if(this->size < pos) _Xran(); - if(pos+num > this->size) + if(num > this->size-pos) num = this->size-pos; ans = char_traits_wchar_compare(this->ptr+pos, @@ -2276,7 +2276,7 @@ int __thiscall basic_string_wchar_compare_substr_substr( if(compare->size < off) _Xran(); - if(off+count > compare->size) + if(count > compare->size-off) count = compare->size-off; return basic_string_wchar_compare_substr_cstr_len(this, pos, num, @@ -3028,7 +3028,7 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_ if(this->size < off) _Xran(); - if(off+len > this->size) + if(len > this->size-off) len = this->size-off; if(basic_string_wchar_npos-str_len <= this->size-len) @@ -3078,7 +3078,7 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wc if(str->size < str_off) _Xran(); - if(str_off+str_len > str->size) + if(str_len > str->size-str_off) str_len = str->size-str_off; return basic_string_wchar_replace_cstr_len(this, off, len, @@ -3108,7 +3108,7 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar if(this->size < off) _Xran(); - if(off+len > this->size) + if(len > this->size-off) len = this->size-off; if(basic_string_wchar_npos-count <= this->size-len) From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Piotr Caban : msvcp80: Fixed ctype_short__Getcat implementation. Message-ID: Module: wine Branch: master Commit: 7ee9bb5c4109175834da76230a97a198fce0722a URL: http://source.winehq.org/git/wine.git/?a=commit;h=7ee9bb5c4109175834da76230a97a198fce0722a Author: Piotr Caban Date: Tue Sep 11 16:09:10 2012 +0200 msvcp80: Fixed ctype_short__Getcat implementation. --- dlls/msvcp80/msvcp80.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msvcp80/msvcp80.c b/dlls/msvcp80/msvcp80.c index 78573d2..7dcc104 100644 --- a/dlls/msvcp80/msvcp80.c +++ b/dlls/msvcp80/msvcp80.c @@ -125,7 +125,7 @@ static BOOL init_funcs(void) pcollate_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$collate at G@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z"); pctype_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype at D@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z"); pctype_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype at _W@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z"); - pctype_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype at G@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z(ptr"); + pctype_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype at G@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z"); pcodecvt_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$codecvt at DDH@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z"); pnumpunct_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct at D@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z"); pnumpunct_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct at _W@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z"); From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Hans Leidekker : msi: Only remove a component if the number of clients drops to zero. Message-ID: Module: wine Branch: master Commit: 1ee3be6e8092af933d5a4e09fc3503fc1bea4001 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1ee3be6e8092af933d5a4e09fc3503fc1bea4001 Author: Hans Leidekker Date: Tue Sep 11 16:20:59 2012 +0200 msi: Only remove a component if the number of clients drops to zero. --- dlls/msi/action.c | 47 +++++++++++++++++++++++++++++++++++++++++------ dlls/msi/msipriv.h | 1 + 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f874528..845a0fd 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -809,6 +809,11 @@ INSTALLSTATE msi_get_component_action( MSIPACKAGE *package, MSICOMPONENT *comp ) return INSTALLSTATE_UNKNOWN; } if (package->need_rollback) return comp->Installed; + if (comp->num_clients > 0 && comp->ActionRequest == INSTALLSTATE_ABSENT) + { + TRACE("%s has %u clients left\n", debugstr_w(comp->Component), comp->num_clients); + return comp->Installed; + } return comp->ActionRequest; } @@ -1620,6 +1625,27 @@ static UINT ACTION_FileCost(MSIPACKAGE *package) return ERROR_SUCCESS; } +static void get_client_counts( MSIPACKAGE *package ) +{ + MSICOMPONENT *comp; + HKEY hkey; + + LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) + { + if (!comp->ComponentId) continue; + + if (MSIREG_OpenUserDataComponentKey( comp->ComponentId, szLocalSid, &hkey, FALSE ) && + MSIREG_OpenUserDataComponentKey( comp->ComponentId, NULL, &hkey, FALSE )) + { + comp->num_clients = 0; + continue; + } + RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, NULL, NULL, (DWORD *)&comp->num_clients, + NULL, NULL, NULL, NULL ); + RegCloseKey( hkey ); + } +} + static void ACTION_GetComponentInstallStates(MSIPACKAGE *package) { MSICOMPONENT *comp; @@ -1983,6 +2009,11 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) TRACE("component %s (installed %d request %d action %d)\n", debugstr_w(component->Component), component->Installed, component->ActionRequest, component->Action); + + if (component->Action == INSTALLSTATE_LOCAL || component->Action == INSTALLSTATE_SOURCE) + component->num_clients++; + else if (component->Action == INSTALLSTATE_ABSENT) + component->num_clients--; } return ERROR_SUCCESS; @@ -2368,6 +2399,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package) else comp->Enabled = TRUE; } + get_client_counts( package ); /* read components states from the registry */ ACTION_GetComponentInstallStates(package); @@ -3307,9 +3339,9 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) if (package->need_rollback) action = comp->Installed; else action = comp->ActionRequest; - TRACE("Component %s (%s), Keypath=%s, RefCount=%u Action=%u\n", + TRACE("Component %s (%s) Keypath=%s RefCount=%u Clients=%u Action=%u\n", debugstr_w(comp->Component), debugstr_w(squished_cc), - debugstr_w(comp->FullKeypath), comp->RefCount, action); + debugstr_w(comp->FullKeypath), comp->RefCount, comp->num_clients, action); if (action == INSTALLSTATE_LOCAL || action == INSTALLSTATE_SOURCE) { @@ -3372,10 +3404,13 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) } else if (action == INSTALLSTATE_ABSENT) { - if (package->Context == MSIINSTALLCONTEXT_MACHINE) - MSIREG_DeleteUserDataComponentKey(comp->ComponentId, szLocalSid); - else - MSIREG_DeleteUserDataComponentKey(comp->ComponentId, NULL); + if (comp->num_clients <= 0) + { + if (package->Context == MSIINSTALLCONTEXT_MACHINE) + MSIREG_DeleteUserDataComponentKey( comp->ComponentId, szLocalSid ); + else + MSIREG_DeleteUserDataComponentKey( comp->ComponentId, NULL ); + } } /* UI stuff */ diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 43ac194..73bccecd 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -481,6 +481,7 @@ typedef struct tagMSICOMPONENT LPWSTR FullKeypath; LPWSTR AdvertiseString; MSIASSEMBLY *assembly; + int num_clients; unsigned int anyAbsent:1; unsigned int hasAdvertiseFeature:1; From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: James Eder : ntdll: Remove outdated comment. Message-ID: Module: wine Branch: master Commit: 07f29c2ce7a91fce069f60580fc0ec3bacaf6e96 URL: http://source.winehq.org/git/wine.git/?a=commit;h=07f29c2ce7a91fce069f60580fc0ec3bacaf6e96 Author: James Eder Date: Fri Sep 7 14:29:26 2012 -0600 ntdll: Remove outdated comment. --- dlls/ntdll/nt.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 2536d33..44bdc5f 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -904,15 +904,6 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info) * - cached_sci & cpuHZ in this file * - Peb->NumberOfProcessors * - SharedUserData->ProcessFeatures[] array - * - * It creates a registry subhierarchy, looking like: - * "\HARDWARE\DESCRIPTION\System\CentralProcessor\\Identifier (CPU x86)". - * Note that there is a hierarchy for every processor installed, so this - * supports multiprocessor systems. This is done like Win95 does it, I think. - * - * It creates some registry entries in the environment part: - * "\HKLM\System\CurrentControlSet\Control\Session Manager\Environment". These are - * always present. When deleted, Windows will add them again. */ void fill_cpu_info(void) { From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Alexandre Julliard : server: Ignore color-keyed windows when updating the z-order. Message-ID: Module: wine Branch: master Commit: 43d465f86a083a3b1481c421a667630f9a35e067 URL: http://source.winehq.org/git/wine.git/?a=commit;h=43d465f86a083a3b1481c421a667630f9a35e067 Author: Alexandre Julliard Date: Tue Sep 11 18:12:16 2012 +0200 server: Ignore color-keyed windows when updating the z-order. --- server/window.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/server/window.c b/server/window.c index b6fcde0..47b94e2 100644 --- a/server/window.c +++ b/server/window.c @@ -2471,6 +2471,7 @@ DECL_HANDLER(update_window_zorder) if (ptr == win) break; if (!(ptr->style & WS_VISIBLE)) continue; if (ptr->ex_style & WS_EX_TRANSPARENT) continue; + if (ptr->is_layered && (ptr->layered_flags & LWA_COLORKEY)) continue; if (!intersect_rect( &tmp, &ptr->visible_rect, &rect )) continue; if (ptr->win_region) { From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Alexandre Julliard : user32: Check for the need to flush window surfaces every time a window finishes painting . Message-ID: Module: wine Branch: master Commit: 1a4a1e53233f5313e969fadd9cac006dd97c162a URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a4a1e53233f5313e969fadd9cac006dd97c162a Author: Alexandre Julliard Date: Tue Sep 11 19:14:05 2012 +0200 user32: Check for the need to flush window surfaces every time a window finishes painting. --- dlls/user32/painting.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 4def070..1a6de87 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -805,7 +805,6 @@ void move_window_bits( HWND hwnd, struct window_surface *old_surface, static void update_now( HWND hwnd, UINT rdw_flags ) { HWND child = 0; - int count = 0; /* desktop window never gets WM_PAINT, only WM_ERASEBKGND */ if (hwnd == GetDesktopWindow()) erase_now( hwnd, rdw_flags | RDW_NOCHILDREN ); @@ -822,10 +821,8 @@ static void update_now( HWND hwnd, UINT rdw_flags ) if (!flags) break; /* nothing more to do */ SendMessageW( child, WM_PAINT, 0, 0 ); - count++; if (rdw_flags & RDW_NOCHILDREN) break; } - if (count) flush_window_surfaces( FALSE ); } @@ -936,6 +933,7 @@ BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps ) if (!lps) return FALSE; release_dc( hwnd, lps->hdc, TRUE ); ShowCaret( hwnd ); + flush_window_surfaces( FALSE ); return TRUE; } From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Marcus Meissner : kernel32: Add condition variables prototypes and tests. Message-ID: Module: wine Branch: master Commit: 7a529328dbb2da8333e565f40503be4e871fc744 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7a529328dbb2da8333e565f40503be4e871fc744 Author: Marcus Meissner Date: Mon Sep 3 13:54:46 2012 +0200 kernel32: Add condition variables prototypes and tests. --- dlls/kernel32/tests/sync.c | 116 ++++++++++++++++++++++++++++++++++++++++++++ include/winbase.h | 8 +++ include/winnt.h | 6 ++ 3 files changed, 130 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c index 5ce8f09..02c023a 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c @@ -42,6 +42,11 @@ static BOOL (WINAPI *pInitOnceExecuteOnce)(PINIT_ONCE,PINIT_ONCE_FN,PVOID,LPVO static BOOL (WINAPI *pInitOnceBeginInitialize)(PINIT_ONCE,DWORD,BOOL*,LPVOID*); static BOOL (WINAPI *pInitOnceComplete)(PINIT_ONCE,DWORD,LPVOID); +static VOID (WINAPI *pInitializeConditionVariable)(PCONDITION_VARIABLE); +static BOOL (WINAPI *pSleepConditionVariableCS)(PCONDITION_VARIABLE,PCRITICAL_SECTION,DWORD); +static VOID (WINAPI *pWakeAllConditionVariable)(PCONDITION_VARIABLE); +static VOID (WINAPI *pWakeConditionVariable)(PCONDITION_VARIABLE); + static void test_signalandwait(void) { DWORD (WINAPI *pSignalObjectAndWait)(HANDLE, HANDLE, DWORD, BOOL); @@ -1238,6 +1243,112 @@ static void test_initonce(void) ok(initonce.Ptr == (void*)0xdeadbee2, "got %p\n", initonce.Ptr); } +static CONDITION_VARIABLE buffernotempty,buffernotfull; +static CRITICAL_SECTION buffercrit; +static BOOL condvar_stop = FALSE, condvar_sleeperr = FALSE; +static LONG bufferlen,totalproduced,totalconsumed; +static LONG condvar_producer_sleepcnt,condvar_consumer_sleepcnt; + +#define BUFFER_SIZE 10 + +static DWORD WINAPI condvar_producer(LPVOID x) { + while (1) { + Sleep(rand() % 10); + + EnterCriticalSection(&buffercrit); + while ((bufferlen == BUFFER_SIZE) && !condvar_stop) { + condvar_producer_sleepcnt++; + if (!pSleepConditionVariableCS(&buffernotfull, &buffercrit, 2000)) + condvar_sleeperr = TRUE; + } + if (condvar_stop) { + LeaveCriticalSection(&buffercrit); + break; + } + bufferlen++; + totalproduced++; + LeaveCriticalSection(&buffercrit); + pWakeConditionVariable(&buffernotempty); + } + return 0; +} + +static DWORD WINAPI condvar_consumer(LPVOID x) { + DWORD *cnt = (DWORD*)x; + + while (1) { + EnterCriticalSection(&buffercrit); + while ((bufferlen == 0) && !condvar_stop) { + condvar_consumer_sleepcnt++; + if (!pSleepConditionVariableCS (&buffernotempty, &buffercrit, 2000)) + condvar_sleeperr = TRUE; + } + if (condvar_stop && (bufferlen == 0)) { + LeaveCriticalSection(&buffercrit); + break; + } + bufferlen--; + totalconsumed++; + (*cnt)++; + LeaveCriticalSection(&buffercrit); + pWakeConditionVariable(&buffernotfull); + Sleep(rand() % 10); + } + return 0; +} + +static void test_condvars(void) +{ + HANDLE hp1,hp2,hc1,hc2; + DWORD dummy; + DWORD cnt1,cnt2; + + if (!pInitializeConditionVariable) { + /* function is not yet in XP, only in newer Windows */ + /* and not yet implemented in Wine for some days/weeks */ + todo_wine win_skip("no condition variable support.\n"); + return; + } + + /* Implement a producer / consumer scheme with non-full / non-empty triggers */ + pInitializeConditionVariable(&buffernotfull); + pInitializeConditionVariable(&buffernotempty); + InitializeCriticalSection(&buffercrit); + bufferlen = totalproduced = totalconsumed = cnt1 = cnt2 = 0; + + hp1 = CreateThread(NULL, 0, condvar_producer, NULL, 0, &dummy); + hp2 = CreateThread(NULL, 0, condvar_producer, NULL, 0, &dummy); + hc1 = CreateThread(NULL, 0, condvar_consumer, (PVOID)&cnt1, 0, &dummy); + hc2 = CreateThread(NULL, 0, condvar_consumer, (PVOID)&cnt2, 0, &dummy); + + /* Limit run to 0.5 seconds. */ + Sleep(500); + + /* tear down start */ + condvar_stop = TRUE; + + /* final wake up call */ + pWakeAllConditionVariable (&buffernotfull); + pWakeAllConditionVariable (&buffernotempty); + + WaitForSingleObject(hp1, 1000); + WaitForSingleObject(hp2, 1000); + WaitForSingleObject(hc1, 1000); + WaitForSingleObject(hc2, 1000); + + ok(totalconsumed == totalproduced, + "consumed %d != produced %d\n", totalconsumed, totalproduced); + ok (!condvar_sleeperr, "error occured during SleepConditionVariableCS\n"); + + /* Checking cnt1 - cnt2 for non-0 would be not good, the case where + * one consumer does not get anything to do is possible. */ + trace("produced %d, c1 %d, c2 %d\n", totalproduced, cnt1, cnt2); + /* The sleeps of the producer or consumer should not go above 100* produced count, + * otherwise the implementation does not sleep correctly. But yet again, this is + * not hard defined. */ + trace("producer sleep %d, consumer sleep %d\n", condvar_producer_sleepcnt, condvar_consumer_sleepcnt); +} + START_TEST(sync) { HMODULE hdll = GetModuleHandle("kernel32"); @@ -1254,6 +1365,10 @@ START_TEST(sync) pInitOnceExecuteOnce = (void *)GetProcAddress(hdll, "InitOnceExecuteOnce"); pInitOnceBeginInitialize = (void *)GetProcAddress(hdll, "InitOnceBeginInitialize"); pInitOnceComplete = (void *)GetProcAddress(hdll, "InitOnceComplete"); + pInitializeConditionVariable = (void *)GetProcAddress(hdll, "InitializeConditionVariable"); + pSleepConditionVariableCS = (void *)GetProcAddress(hdll, "SleepConditionVariableCS"); + pWakeAllConditionVariable = (void *)GetProcAddress(hdll, "WakeAllConditionVariable"); + pWakeConditionVariable = (void *)GetProcAddress(hdll, "WakeConditionVariable"); test_signalandwait(); test_mutex(); @@ -1266,4 +1381,5 @@ START_TEST(sync) test_WaitForSingleObject(); test_WaitForMultipleObjects(); test_initonce(); + test_condvars(); } diff --git a/include/winbase.h b/include/winbase.h index 619120e..c1e62a3 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -63,6 +63,10 @@ typedef PRTL_SRWLOCK PSRWLOCK; typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK; +#define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT +#define CONDITION_VARIABLE_LOCKMODE_SHARED RTL_CONDITION_VARIABLE_LOCKMODE_SHARED +typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE; + #define EXCEPTION_DEBUG_EVENT 1 #define CREATE_THREAD_DEBUG_EVENT 2 #define CREATE_PROCESS_DEBUG_EVENT 3 @@ -1880,6 +1884,7 @@ WINBASEAPI BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID); WINBASEAPI BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY); WINBASEAPI BOOL WINAPI InitAtomTable(DWORD); WINADVAPI BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD); +WINBASEAPI VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE); WINBASEAPI void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit); WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION *,DWORD); WINBASEAPI BOOL WINAPI InitializeCriticalSectionEx(CRITICAL_SECTION *,DWORD,DWORD); @@ -2172,6 +2177,7 @@ WINBASEAPI BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD); WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL); WINBASEAPI DWORD WINAPI SizeofResource(HMODULE,HRSRC); WINBASEAPI VOID WINAPI Sleep(DWORD); +WINBASEAPI BOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE,PCRITICAL_SECTION,DWORD); WINBASEAPI DWORD WINAPI SleepEx(DWORD,BOOL); WINBASEAPI DWORD WINAPI SuspendThread(HANDLE); WINBASEAPI void WINAPI SwitchToFiber(LPVOID); @@ -2224,6 +2230,8 @@ WINBASEAPI DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL); WINBASEAPI BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD); WINBASEAPI BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD); #define WaitNamedPipe WINELIB_NAME_AW(WaitNamedPipe) +WINBASEAPI VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE); +WINBASEAPI VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE); WINBASEAPI UINT WINAPI WinExec(LPCSTR,UINT); WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*); WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN); diff --git a/include/winnt.h b/include/winnt.h index 5625e37..5106701 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -5082,6 +5082,12 @@ typedef struct _RTL_SRWLOCK { #define RTL_SRWLOCK_INIT {0} +typedef struct _RTL_CONDITION_VARIABLE { + PVOID Ptr; +} RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE; +#define RTL_CONDITION_VARIABLE_INIT {0} +#define RTL_CONDITION_VARIABLE_LOCKMODE_SHARED 0x1 + typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN ); typedef VOID (NTAPI * PFLS_CALLBACK_FUNCTION) ( PVOID ); From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Charles Davis : configure: Prefer stabs debug info on Mac OS. Message-ID: Module: wine Branch: master Commit: f5bc7afe19763bf95cdff49645317d2d2ac0613d URL: http://source.winehq.org/git/wine.git/?a=commit;h=f5bc7afe19763bf95cdff49645317d2d2ac0613d Author: Charles Davis Date: Tue Sep 11 09:11:29 2012 -0600 configure: Prefer stabs debug info on Mac OS. --- configure | 31 +++++++++++++++++++++++++++++-- configure.ac | 9 ++++++--- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/configure b/configure index ec66aa3..48d854b 100755 --- a/configure +++ b/configure @@ -12290,7 +12290,33 @@ fi for ac_flag in $CFLAGS; do case $ac_flag in - -g) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gdwarf-2" >&5 + -g) case $host_os in + darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gstabs+" >&5 +$as_echo_n "checking whether the compiler supports -gstabs+... " >&6; } +if ${ac_cv_cflags__gstabsp+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_wine_try_cflags_saved=$CFLAGS +CFLAGS="$CFLAGS -gstabs+" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(int argc, char **argv) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_cflags__gstabsp=yes +else + ac_cv_cflags__gstabsp=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CFLAGS=$ac_wine_try_cflags_saved +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__gstabsp" >&5 +$as_echo "$ac_cv_cflags__gstabsp" >&6; } +if test $ac_cv_cflags__gstabsp = yes; then : + EXTRACFLAGS="$EXTRACFLAGS -gstabs+" +fi ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gdwarf-2" >&5 $as_echo_n "checking whether the compiler supports -gdwarf-2... " >&6; } if ${ac_cv_cflags__gdwarf_2+:} false; then : $as_echo_n "(cached) " >&6 @@ -12315,7 +12341,7 @@ $as_echo "$ac_cv_cflags__gdwarf_2" >&6; } if test $ac_cv_cflags__gdwarf_2 = yes; then : EXTRACFLAGS="$EXTRACFLAGS -gdwarf-2" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gstrict-dwarf" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gstrict-dwarf" >&5 $as_echo_n "checking whether the compiler supports -gstrict-dwarf... " >&6; } if ${ac_cv_cflags__gstrict_dwarf+:} false; then : $as_echo_n "(cached) " >&6 @@ -12340,6 +12366,7 @@ $as_echo "$ac_cv_cflags__gstrict_dwarf" >&6; } if test $ac_cv_cflags__gstrict_dwarf = yes; then : EXTRACFLAGS="$EXTRACFLAGS -gstrict-dwarf" fi ;; + esac ;; esac done diff --git a/configure.ac b/configure.ac index 528ee90..9a15200 100644 --- a/configure.ac +++ b/configure.ac @@ -1749,11 +1749,14 @@ then WINE_TRY_CFLAGS([-Wunused-but-set-parameter]) WINE_TRY_CFLAGS([-Wwrite-strings]) - dnl Default to dwarf-2 debug info + dnl On Darwin, prefer stabs; everywhere else, default to dwarf-2 debug info for ac_flag in $CFLAGS; do case $ac_flag in - -g) WINE_TRY_CFLAGS([-gdwarf-2]) - WINE_TRY_CFLAGS([-gstrict-dwarf]) ;; + -g) case $host_os in + darwin*) WINE_TRY_CFLAGS([-gstabs+]) ;; + *) WINE_TRY_CFLAGS([-gdwarf-2]) + WINE_TRY_CFLAGS([-gstrict-dwarf]) ;; + esac ;; esac done From julliard at winehq.org Tue Sep 11 16:59:07 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Tue, 11 Sep 2012 16:59:07 -0500 Subject: Charles Davis : configure: Fix ipstat tests to work on Mac OS. Message-ID: Module: wine Branch: master Commit: fd05f5412f25e9e55f42d4a516391b4de47e970f URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd05f5412f25e9e55f42d4a516391b4de47e970f Author: Charles Davis Date: Tue Sep 11 09:11:30 2012 -0600 configure: Fix ipstat tests to work on Mac OS. --- configure | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- configure.ac | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 94 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 48d854b..97e4664 100755 --- a/configure +++ b/configure @@ -14199,7 +14199,16 @@ _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_inhist" "ac_cv_member_struct_icmpstat_icps_inhist" "#ifdef HAVE_NETINET_ICMP_VAR +ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_inhist" "ac_cv_member_struct_icmpstat_icps_inhist" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_ICMP_VAR_H #include #endif " @@ -14243,7 +14252,7 @@ ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_outhist" "ac_cv_member_st #ifdef HAVE_NETINET_IP_ICMP_H #include #endif -#ifdef HAVE_NETINET_ICMP_VAR +#ifdef HAVE_NETINET_ICMP_VAR_H #include #endif " @@ -14257,7 +14266,16 @@ _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_total" "ac_cv_member_struct_ipstat_ips_total" "#ifdef HAVE_NETINET_IP_VAR_H +ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_total" "ac_cv_member_struct_ipstat_ips_total" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " @@ -14285,7 +14303,19 @@ _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct tcpstat" "tcps_connattempt" "ac_cv_member_struct_tcpstat_tcps_connattempt" "#ifdef HAVE_NETINET_TCP_VAR_H +ac_fn_c_check_member "$LINENO" "struct tcpstat" "tcps_connattempt" "ac_cv_member_struct_tcpstat_tcps_connattempt" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_VAR_H #include #endif " @@ -14313,7 +14343,19 @@ _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_ipackets" "ac_cv_member_struct_udpstat_udps_ipackets" "#ifdef HAVE_NETINET_UDP_VAR_H +ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_ipackets" "ac_cv_member_struct_udpstat_udps_ipackets" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif " diff --git a/configure.ac b/configure.ac index 9a15200..7e761af 100644 --- a/configure.ac +++ b/configure.ac @@ -2311,7 +2311,16 @@ AC_CHECK_MEMBERS([ns_msg._msg_ptr],,, dnl Check for struct icmpstat AC_CHECK_MEMBERS([struct icmpstat.icps_inhist],,, -[#ifdef HAVE_NETINET_ICMP_VAR +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_ICMP_VAR_H #include #endif]) @@ -2347,13 +2356,22 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,, #ifdef HAVE_NETINET_IP_ICMP_H #include #endif -#ifdef HAVE_NETINET_ICMP_VAR +#ifdef HAVE_NETINET_ICMP_VAR_H #include #endif]) dnl Check for struct ipstat AC_CHECK_MEMBERS([struct ipstat.ips_total],,, -[#ifdef HAVE_NETINET_IP_VAR_H +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H #include #endif]) @@ -2365,7 +2383,19 @@ AC_CHECK_MEMBERS([struct ip_stats.ips_total],,, dnl Check for struct tcpstat AC_CHECK_MEMBERS([struct tcpstat.tcps_connattempt],,, -[#ifdef HAVE_NETINET_TCP_VAR_H +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_VAR_H #include #endif]) @@ -2377,7 +2407,19 @@ AC_CHECK_MEMBERS([struct tcp_stats.tcps_connattempt],,, dnl Check for struct udpstat AC_CHECK_MEMBERS([struct udpstat.udps_ipackets],,, -[#ifdef HAVE_NETINET_UDP_VAR_H +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif]) From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Michael Stefaniuc : ntdll: Always set a valid SUB_Q_HEADER AudioStatus for CD-ROMs. Message-ID: Module: wine Branch: master Commit: 3454bdc07c06310aee281ffbf56a284a1855b18a URL: http://source.winehq.org/git/wine.git/?a=commit;h=3454bdc07c06310aee281ffbf56a284a1855b18a Author: Michael Stefaniuc Date: Wed Sep 12 00:17:50 2012 +0200 ntdll: Always set a valid SUB_Q_HEADER AudioStatus for CD-ROMs. --- dlls/ntdll/cdrom.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c index 87e0695..ea7f01a 100644 --- a/dlls/ntdll/cdrom.c +++ b/dlls/ntdll/cdrom.c @@ -924,7 +924,7 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA break; default: TRACE("status=%02X !\n", sc.cdsc_audiostatus); - break; + hdr->AudioStatus = AUDIO_STATUS_NO_STATUS; } switch (fmt->Format) { @@ -1035,6 +1035,7 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA break; default: TRACE("status=%02X !\n", sc.header.audio_status); + hdr->AudioStatus = AUDIO_STATUS_NO_STATUS; } switch (fmt->Format) { From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Jacek Caban : vbscript: Skip tests on too old vbscript. Message-ID: Module: wine Branch: master Commit: 32d1bb2bbff61cf25cd513f27a593f16d4c8c4f3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=32d1bb2bbff61cf25cd513f27a593f16d4c8c4f3 Author: Jacek Caban Date: Wed Sep 12 09:35:57 2012 +0200 vbscript: Skip tests on too old vbscript. --- dlls/vbscript/tests/run.c | 6 +++--- dlls/vbscript/tests/vbscript.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index 0e292af..9c3725b 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -1740,13 +1740,13 @@ static void run_tests(void) static BOOL check_vbscript(void) { - IActiveScript *vbscript; + IActiveScriptParseProcedure2 *vbscript; HRESULT hres; hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IActiveScript, (void**)&vbscript); + &IID_IActiveScriptParseProcedure2, (void**)&vbscript); if(SUCCEEDED(hres)) - IActiveScript_Release(vbscript); + IActiveScriptParseProcedure2_Release(vbscript); return hres == S_OK; } diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c index ec53712..27153f8 100644 --- a/dlls/vbscript/tests/vbscript.c +++ b/dlls/vbscript/tests/vbscript.c @@ -774,13 +774,13 @@ static void test_vbscript_initializing(void) static BOOL check_vbscript(void) { - IActiveScript *vbscript; + IActiveScriptParseProcedure2 *vbscript; HRESULT hres; hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IActiveScript, (void**)&vbscript); + &IID_IActiveScriptParseProcedure2, (void**)&vbscript); if(SUCCEEDED(hres)) - IActiveScript_Release(vbscript); + IActiveScriptParseProcedure2_Release(vbscript); return hres == S_OK; } @@ -797,7 +797,7 @@ START_TEST(vbscript) test_vbscript_initializing(); test_scriptdisp(); }else { - win_skip("VBScript engine not available\n"); + win_skip("VBScript engine not available or too old\n"); } CoUninitialize(); From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Henri Verbeet : d3d10core: Implement d3d10_shader_resource_view_GetResource (). Message-ID: Module: wine Branch: master Commit: b6b9c15696527072be9e979b93fe7cabff667be3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6b9c15696527072be9e979b93fe7cabff667be3 Author: Henri Verbeet Date: Wed Sep 12 11:30:51 2012 +0200 d3d10core: Implement d3d10_shader_resource_view_GetResource(). --- dlls/d3d10core/d3d10core_private.h | 5 ++++- dlls/d3d10core/device.c | 3 +-- dlls/d3d10core/view.c | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 95d929a..f45fd34 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -155,9 +155,12 @@ struct d3d10_shader_resource_view { ID3D10ShaderResourceView ID3D10ShaderResourceView_iface; LONG refcount; + + ID3D10Resource *resource; }; -HRESULT d3d10_shader_resource_view_init(struct d3d10_shader_resource_view *view) DECLSPEC_HIDDEN; +HRESULT d3d10_shader_resource_view_init(struct d3d10_shader_resource_view *view, + ID3D10Resource *resource) DECLSPEC_HIDDEN; /* ID3D10InputLayout */ struct d3d10_input_layout diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 6cd7737..d184c02 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -746,8 +746,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView(ID3D10Dev return E_OUTOFMEMORY; } - hr = d3d10_shader_resource_view_init(object); - if (FAILED(hr)) + if (FAILED(hr = d3d10_shader_resource_view_init(object, resource))) { WARN("Failed to initialize shader resource view, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); diff --git a/dlls/d3d10core/view.c b/dlls/d3d10core/view.c index 792e79b..9bf4fcb 100644 --- a/dlls/d3d10core/view.c +++ b/dlls/d3d10core/view.c @@ -526,6 +526,7 @@ static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_Release(ID3D10ShaderRe if (!refcount) { + ID3D10Resource_Release(This->resource); HeapFree(GetProcessHeap(), 0, This); } @@ -571,7 +572,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_SetPrivateDataInterf static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetResource(ID3D10ShaderResourceView *iface, ID3D10Resource **resource) { - FIXME("iface %p, resource %p stub!\n", iface, resource); + struct d3d10_shader_resource_view *view = impl_from_ID3D10ShaderResourceView(iface); + + TRACE("iface %p, resource %p.\n", iface, resource); + + *resource = view->resource; + ID3D10Resource_AddRef(*resource); } /* ID3D10ShaderResourceView methods */ @@ -599,10 +605,14 @@ static const struct ID3D10ShaderResourceViewVtbl d3d10_shader_resource_view_vtbl d3d10_shader_resource_view_GetDesc, }; -HRESULT d3d10_shader_resource_view_init(struct d3d10_shader_resource_view *view) +HRESULT d3d10_shader_resource_view_init(struct d3d10_shader_resource_view *view, + ID3D10Resource *resource) { view->ID3D10ShaderResourceView_iface.lpVtbl = &d3d10_shader_resource_view_vtbl; view->refcount = 1; + view->resource = resource; + ID3D10Resource_AddRef(resource); + return S_OK; } From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Henri Verbeet : wined3d: wined3d_device_set_transform() never fails. Message-ID: Module: wine Branch: master Commit: f79bbc767dea94cb6fe5f1426155cdf79b051bf2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f79bbc767dea94cb6fe5f1426155cdf79b051bf2 Author: Henri Verbeet Date: Wed Sep 12 11:30:52 2012 +0200 wined3d: wined3d_device_set_transform() never fails. --- dlls/d3d8/device.c | 5 ++--- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/device.c | 21 ++++++++------------- dlls/ddraw/viewport.c | 6 ++---- dlls/wined3d/device.c | 13 ++++++------- include/wine/wined3d.h | 2 +- 6 files changed, 21 insertions(+), 31 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 25f7534..20c5fe3 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1261,16 +1261,15 @@ static HRESULT WINAPI d3d8_device_SetTransform(IDirect3DDevice8 *iface, D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, state, matrix); /* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - hr = wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); + wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetTransform(IDirect3DDevice8 *iface, diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index e10b698..0811ddc 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1327,16 +1327,15 @@ static HRESULT WINAPI d3d9_device_SetTransform(IDirect3DDevice9Ex *iface, D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, state, matrix); /* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - hr = wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); + wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetTransform(IDirect3DDevice9Ex *iface, diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index f51222b..813f4b3 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3084,7 +3084,6 @@ static HRESULT d3d_device7_SetTransform(IDirect3DDevice7 *iface, { struct d3d_device *device = impl_from_IDirect3DDevice7(iface); enum wined3d_transform_state wined3d_state; - HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, state, matrix); @@ -3111,10 +3110,10 @@ static HRESULT d3d_device7_SetTransform(IDirect3DDevice7 *iface, /* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - hr = wined3d_device_set_transform(device->wined3d_device, wined3d_state, (struct wined3d_matrix *)matrix); + wined3d_device_set_transform(device->wined3d_device, wined3d_state, (struct wined3d_matrix *)matrix); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d_device7_SetTransform_FPUSetup(IDirect3DDevice7 *iface, @@ -3149,17 +3148,15 @@ static HRESULT WINAPI d3d_device3_SetTransform(IDirect3DDevice3 *iface, if (state == D3DTRANSFORMSTATE_PROJECTION) { D3DMATRIX projection; - HRESULT hr; wined3d_mutex_lock(); multiply_matrix(&projection, &device->legacy_clipspace, matrix); - hr = wined3d_device_set_transform(device->wined3d_device, + wined3d_device_set_transform(device->wined3d_device, WINED3D_TS_PROJECTION, (struct wined3d_matrix *)&projection); - if (SUCCEEDED(hr)) - device->legacy_projection = *matrix; + device->legacy_projection = *matrix; wined3d_mutex_unlock(); - return hr; + return D3D_OK; } return IDirect3DDevice7_SetTransform(&device->IDirect3DDevice7_iface, state, matrix); @@ -3363,18 +3360,16 @@ static HRESULT WINAPI d3d_device3_MultiplyTransform(IDirect3DDevice3 *iface, if (state == D3DTRANSFORMSTATE_PROJECTION) { D3DMATRIX projection, tmp; - HRESULT hr; wined3d_mutex_lock(); multiply_matrix(&tmp, &device->legacy_projection, matrix); multiply_matrix(&projection, &device->legacy_clipspace, &tmp); - hr = wined3d_device_set_transform(device->wined3d_device, + wined3d_device_set_transform(device->wined3d_device, WINED3D_TS_PROJECTION, (struct wined3d_matrix *)&projection); - if (SUCCEEDED(hr)) - device->legacy_projection = tmp; + device->legacy_projection = tmp; wined3d_mutex_unlock(); - return hr; + return D3D_OK; } return IDirect3DDevice7_MultiplyTransform(&device->IDirect3DDevice7_iface, state, matrix); diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 6a4713a..f78ead0 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -41,13 +41,11 @@ static void update_clip_space(struct d3d_device *device, offset->x, offset->y, offset->z, 1.0f, }; D3DMATRIX projection; - HRESULT hr; multiply_matrix(&projection, &clip_space, &device->legacy_projection); - hr = wined3d_device_set_transform(device->wined3d_device, + wined3d_device_set_transform(device->wined3d_device, WINED3D_TS_PROJECTION, (struct wined3d_matrix *)&projection); - if (SUCCEEDED(hr)) - device->legacy_clipspace = clip_space; + device->legacy_clipspace = clip_space; } /***************************************************************************** diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 2cf3028..d3bf10d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1716,7 +1716,7 @@ HRESULT CDECL wined3d_device_get_stream_source_freq(const struct wined3d_device return WINED3D_OK; } -HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device, +void CDECL wined3d_device_set_transform(struct wined3d_device *device, enum wined3d_transform_state d3dts, const struct wined3d_matrix *matrix) { TRACE("device %p, state %s, matrix %p.\n", @@ -1732,7 +1732,7 @@ HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device, TRACE("Recording... not performing anything.\n"); device->updateStateBlock->changed.transform[d3dts >> 5] |= 1 << (d3dts & 0x1f); device->updateStateBlock->state.transforms[d3dts] = *matrix; - return WINED3D_OK; + return; } /* If the new matrix is the same as the current one, @@ -1744,7 +1744,7 @@ HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device, if (!memcmp(&device->stateBlock->state.transforms[d3dts].u.m[0][0], matrix, sizeof(*matrix))) { TRACE("The application is setting the same matrix over again.\n"); - return WINED3D_OK; + return; } device->stateBlock->state.transforms[d3dts] = *matrix; @@ -1753,9 +1753,6 @@ HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device, if (d3dts < WINED3D_TS_WORLD_MATRIX(device->adapter->gl_info.limits.blends)) device_invalidate_state(device, STATE_TRANSFORM(d3dts)); - - return WINED3D_OK; - } HRESULT CDECL wined3d_device_get_transform(const struct wined3d_device *device, @@ -1790,7 +1787,9 @@ HRESULT CDECL wined3d_device_multiply_transform(struct wined3d_device *device, multiply_matrix(&temp, mat, matrix); /* Apply change via set transform - will reapply to eg. lights this way. */ - return wined3d_device_set_transform(device, state, &temp); + wined3d_device_set_transform(device, state, &temp); + + return WINED3D_OK; } /* Note lights are real special cases. Although the device caps state only diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index d581097..5d80f1d 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2233,7 +2233,7 @@ HRESULT __cdecl wined3d_device_set_stream_source_freq(struct wined3d_device *dev HRESULT __cdecl wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture); HRESULT __cdecl wined3d_device_set_texture_stage_state(struct wined3d_device *device, UINT stage, enum wined3d_texture_stage_state state, DWORD value); -HRESULT __cdecl wined3d_device_set_transform(struct wined3d_device *device, +void __cdecl wined3d_device_set_transform(struct wined3d_device *device, enum wined3d_transform_state state, const struct wined3d_matrix *matrix); HRESULT __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device, struct wined3d_vertex_declaration *declaration); From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Henri Verbeet : wined3d: wined3d_device_get_transform() never fails. Message-ID: Module: wine Branch: master Commit: 706ece827b6f465751e46437c568fb34e2d98f82 URL: http://source.winehq.org/git/wine.git/?a=commit;h=706ece827b6f465751e46437c568fb34e2d98f82 Author: Henri Verbeet Date: Wed Sep 12 11:30:53 2012 +0200 wined3d: wined3d_device_get_transform() never fails. --- dlls/d3d8/device.c | 5 ++--- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/device.c | 5 ++--- dlls/wined3d/device.c | 4 +--- include/wine/wined3d.h | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 20c5fe3..1ccaf2d 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1276,16 +1276,15 @@ static HRESULT WINAPI d3d8_device_GetTransform(IDirect3DDevice8 *iface, D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, state, matrix); /* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - hr = wined3d_device_get_transform(device->wined3d_device, state, (struct wined3d_matrix *)matrix); + wined3d_device_get_transform(device->wined3d_device, state, (struct wined3d_matrix *)matrix); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_MultiplyTransform(IDirect3DDevice8 *iface, diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 0811ddc..d50961a 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1342,16 +1342,15 @@ static HRESULT WINAPI d3d9_device_GetTransform(IDirect3DDevice9Ex *iface, D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, state, matrix); /* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - hr = wined3d_device_get_transform(device->wined3d_device, state, (struct wined3d_matrix *)matrix); + wined3d_device_get_transform(device->wined3d_device, state, (struct wined3d_matrix *)matrix); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_MultiplyTransform(IDirect3DDevice9Ex *iface, diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 813f4b3..f321374 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3194,7 +3194,6 @@ static HRESULT d3d_device7_GetTransform(IDirect3DDevice7 *iface, { struct d3d_device *device = impl_from_IDirect3DDevice7(iface); enum wined3d_transform_state wined3d_state; - HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, state, matrix); @@ -3221,10 +3220,10 @@ static HRESULT d3d_device7_GetTransform(IDirect3DDevice7 *iface, /* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - hr = wined3d_device_get_transform(device->wined3d_device, wined3d_state, (struct wined3d_matrix *)matrix); + wined3d_device_get_transform(device->wined3d_device, wined3d_state, (struct wined3d_matrix *)matrix); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d_device7_GetTransform_FPUSetup(IDirect3DDevice7 *iface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d3bf10d..b0ce4c4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1755,14 +1755,12 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device, device_invalidate_state(device, STATE_TRANSFORM(d3dts)); } -HRESULT CDECL wined3d_device_get_transform(const struct wined3d_device *device, +void CDECL wined3d_device_get_transform(const struct wined3d_device *device, enum wined3d_transform_state state, struct wined3d_matrix *matrix) { TRACE("device %p, state %s, matrix %p.\n", device, debug_d3dtstype(state), matrix); *matrix = device->stateBlock->state.transforms[state]; - - return WINED3D_OK; } HRESULT CDECL wined3d_device_multiply_transform(struct wined3d_device *device, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 5d80f1d..15aeb57 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2162,7 +2162,7 @@ HRESULT __cdecl wined3d_device_get_texture(const struct wined3d_device *device, UINT stage, struct wined3d_texture **texture); HRESULT __cdecl wined3d_device_get_texture_stage_state(const struct wined3d_device *device, UINT stage, enum wined3d_texture_stage_state state, DWORD *value); -HRESULT __cdecl wined3d_device_get_transform(const struct wined3d_device *device, +void __cdecl wined3d_device_get_transform(const struct wined3d_device *device, enum wined3d_transform_state state, struct wined3d_matrix *matrix); HRESULT __cdecl wined3d_device_get_vertex_declaration(const struct wined3d_device *device, struct wined3d_vertex_declaration **declaration); From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Henri Verbeet : user32: Add rawinput keyboard support. Message-ID: Module: wine Branch: master Commit: c6fcc0255c3e7a655b157d1e68e5c80fe328bdf2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c6fcc0255c3e7a655b157d1e68e5c80fe328bdf2 Author: Henri Verbeet Date: Wed Sep 12 11:30:54 2012 +0200 user32: Add rawinput keyboard support. --- dlls/user32/message.c | 35 ++++++++++++ include/wine/server_protocol.h | 9 +++- server/process.c | 1 + server/process.h | 1 + server/protocol.def | 7 +++ server/queue.c | 115 +++++++++++++++++++++++++++------------- 6 files changed, 129 insertions(+), 39 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=c6fcc0255c3e7a655b157d1e68e5c80fe328bdf2 From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Michael Stefaniuc : msdmo: DMOGetTypes() is implemented and not a stub. Message-ID: Module: wine Branch: master Commit: 8cb3ede419f8fea9ba572be1823db900e027edf3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8cb3ede419f8fea9ba572be1823db900e027edf3 Author: Michael Stefaniuc Date: Wed Sep 12 12:18:06 2012 +0200 msdmo: DMOGetTypes() is implemented and not a stub. --- dlls/msdmo/dmoreg.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c index 0d5d397..fb1caa1 100644 --- a/dlls/msdmo/dmoreg.c +++ b/dlls/msdmo/dmoreg.c @@ -801,9 +801,9 @@ HRESULT WINAPI DMOGetTypes(REFCLSID clsidDMO, HRESULT ret = S_OK; WCHAR szguid[64]; - TRACE ("(%s,%u,%p,%p,%u,%p,%p),stub!\n", debugstr_guid(clsidDMO), - ulInputTypesRequested, pulInputTypesSupplied, pInputTypes, - ulOutputTypesRequested, pulOutputTypesSupplied, pOutputTypes); + TRACE ("(%s,%u,%p,%p,%u,%p,%p)\n", debugstr_guid(clsidDMO), ulInputTypesRequested, + pulInputTypesSupplied, pInputTypes, ulOutputTypesRequested, pulOutputTypesSupplied, + pOutputTypes); if (ERROR_SUCCESS != RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_READ, &root)) From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Michael Stefaniuc : shell32: Use a helper to trace the type of a STRRET. Message-ID: Module: wine Branch: master Commit: 506f77f52d8cce44cbce70dce4046bb3c40d6944 URL: http://source.winehq.org/git/wine.git/?a=commit;h=506f77f52d8cce44cbce70dce4046bb3c40d6944 Author: Michael Stefaniuc Date: Wed Sep 12 12:21:41 2012 +0200 shell32: Use a helper to trace the type of a STRRET. --- dlls/shell32/shellstring.c | 33 +++++++++++++++++++-------------- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/dlls/shell32/shellstring.c b/dlls/shell32/shellstring.c index 5961920..792b1db 100644 --- a/dlls/shell32/shellstring.c +++ b/dlls/shell32/shellstring.c @@ -42,14 +42,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); /************************* STRRET functions ****************************/ +static const char *debugstr_strret(STRRET *s) +{ + switch (s->uType) + { + case STRRET_WSTR: + return "STRRET_WSTR"; + case STRRET_CSTR: + return "STRRET_CSTR"; + case STRRET_OFFSET: + return "STRRET_OFFSET"; + default: + return "STRRET_???"; + } +} + BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) { - TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", - dest,len,src, - (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : - (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : - (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", - pidl); + TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", dest, len, src, debugstr_strret(src), pidl); if (!dest) return FALSE; @@ -70,7 +80,7 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST break; default: - FIXME("unknown type!\n"); + FIXME("unknown type %u!\n", src->uType); if (len) *dest = '\0'; return FALSE; } @@ -82,12 +92,7 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) { - TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", - dest,len,src, - (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : - (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : - (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", - pidl); + TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", dest, len, src, debugstr_strret(src), pidl); if (!dest) return FALSE; @@ -110,7 +115,7 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST break; default: - FIXME("unknown type!\n"); + FIXME("unknown type %u!\n", src->uType); if (len) *dest = '\0'; return FALSE; } From julliard at winehq.org Wed Sep 12 13:39:15 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:15 -0500 Subject: Michael Stefaniuc : shell32: Fix the messed up indentation level in the STRRET functions. Message-ID: Module: wine Branch: master Commit: f905a1c44810b4ee817d097b1f86923441042b51 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f905a1c44810b4ee817d097b1f86923441042b51 Author: Michael Stefaniuc Date: Wed Sep 12 12:23:24 2012 +0200 shell32: Fix the messed up indentation level in the STRRET functions. --- dlls/shell32/shellstring.c | 87 +++++++++++++++++++++----------------------- 1 files changed, 42 insertions(+), 45 deletions(-) diff --git a/dlls/shell32/shellstring.c b/dlls/shell32/shellstring.c index 792b1db..04037d7 100644 --- a/dlls/shell32/shellstring.c +++ b/dlls/shell32/shellstring.c @@ -64,28 +64,26 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST if (!dest) return FALSE; - switch (src->uType) - { - case STRRET_WSTR: - WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, dest, len, NULL, NULL); - CoTaskMemFree(src->u.pOleStr); - break; - - case STRRET_CSTR: - lstrcpynA(dest, src->u.cStr, len); - break; - - case STRRET_OFFSET: - lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); - break; - - default: + switch (src->uType) + { + case STRRET_WSTR: + WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, dest, len, NULL, NULL); + CoTaskMemFree(src->u.pOleStr); + break; + case STRRET_CSTR: + lstrcpynA(dest, src->u.cStr, len); + break; + case STRRET_OFFSET: + lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); + break; + default: FIXME("unknown type %u!\n", src->uType); - if (len) *dest = '\0'; - return FALSE; - } - TRACE("-- %s\n", debugstr_a(dest) ); - return TRUE; + if (len) + *dest = '\0'; + return FALSE; + } + TRACE("-- %s\n", debugstr_a(dest) ); + return TRUE; } /************************************************************************/ @@ -97,34 +95,33 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST if (!dest) return FALSE; - switch (src->uType) - { - case STRRET_WSTR: - lstrcpynW(dest, src->u.pOleStr, len); - CoTaskMemFree(src->u.pOleStr); - break; - - case STRRET_CSTR: - if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len) - dest[len-1] = 0; - break; - - case STRRET_OFFSET: - if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, dest, len ) && len) - dest[len-1] = 0; - break; - - default: + switch (src->uType) + { + case STRRET_WSTR: + lstrcpynW(dest, src->u.pOleStr, len); + CoTaskMemFree(src->u.pOleStr); + break; + case STRRET_CSTR: + if (!MultiByteToWideChar(CP_ACP, 0, src->u.cStr, -1, dest, len) && len) + dest[len-1] = 0; + break; + case STRRET_OFFSET: + if (!MultiByteToWideChar(CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, dest, len) + && len) + dest[len-1] = 0; + break; + default: FIXME("unknown type %u!\n", src->uType); - if (len) *dest = '\0'; - return FALSE; - } - return TRUE; + if (len) + *dest = '\0'; + return FALSE; + } + return TRUE; } /************************************************************************* - * StrRetToStrN [SHELL32.96] + * StrRetToStrN [SHELL32.96] * * converts a STRRET to a normal string * @@ -133,7 +130,7 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST */ BOOL WINAPI StrRetToStrNAW(LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) { - if(SHELL_OsIsUnicode()) + if(SHELL_OsIsUnicode()) return StrRetToStrNW(dest, len, src, pidl); else return StrRetToStrNA(dest, len, src, pidl); From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Dmitry Timoshkov : windowscodecs: Make sure that all GIF metadata blocks are properly packed. Message-ID: Module: wine Branch: master Commit: 039f6d51141f9f6a6c9df91c83e173c529ec4717 URL: http://source.winehq.org/git/wine.git/?a=commit;h=039f6d51141f9f6a6c9df91c83e173c529ec4717 Author: Dmitry Timoshkov Date: Wed Sep 12 15:08:07 2012 +0900 windowscodecs: Make sure that all GIF metadata blocks are properly packed. --- dlls/windowscodecs/gifformat.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 318dc5d..a224356 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -48,6 +48,7 @@ static LPWSTR strdupAtoW(const char *src) static HRESULT load_LSD_metadata(IStream *stream, const GUID *vendor, DWORD options, MetadataItem **items, DWORD *count) { +#include "pshpack1.h" struct logical_screen_descriptor { char signature[6]; @@ -62,6 +63,7 @@ static HRESULT load_LSD_metadata(IStream *stream, const GUID *vendor, DWORD opti BYTE background_color_index; BYTE pixel_aspect_ratio; } lsd_data; +#include "poppack.h" HRESULT hr; ULONG bytesread, i; MetadataItem *result; @@ -85,7 +87,7 @@ static HRESULT load_LSD_metadata(IStream *stream, const GUID *vendor, DWORD opti result[0].id.vt = VT_LPWSTR; result[0].id.u.pwszVal = strdupAtoW("Signature"); result[0].value.vt = VT_UI1|VT_VECTOR; - result[0].value.u.caub.cElems = 6; + result[0].value.u.caub.cElems = sizeof(lsd_data.signature); result[0].value.u.caub.pElems = HeapAlloc(GetProcessHeap(), 0, sizeof(lsd_data.signature)); memcpy(result[0].value.u.caub.pElems, lsd_data.signature, sizeof(lsd_data.signature)); @@ -107,7 +109,7 @@ static HRESULT load_LSD_metadata(IStream *stream, const GUID *vendor, DWORD opti result[4].id.vt = VT_LPWSTR; result[4].id.u.pwszVal = strdupAtoW("ColorResolution"); result[4].value.vt = VT_UI1; - result[4].value.u.bVal = (lsd_data.packed >> 6) & 7; + result[4].value.u.bVal = (lsd_data.packed >> 4) & 7; result[5].id.vt = VT_LPWSTR; result[5].id.u.pwszVal = strdupAtoW("SortFlag"); @@ -149,6 +151,7 @@ HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) static HRESULT load_IMD_metadata(IStream *stream, const GUID *vendor, DWORD options, MetadataItem **items, DWORD *count) { +#include "pshpack1.h" struct image_descriptor { USHORT left; @@ -163,6 +166,7 @@ static HRESULT load_IMD_metadata(IStream *stream, const GUID *vendor, DWORD opti * local_color_table_size : 3; */ } imd_data; +#include "poppack.h" HRESULT hr; ULONG bytesread, i; MetadataItem *result; From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Dmitry Timoshkov : windowscodecs: Create Logical Screen Descriptor metadata for the GIF decoder. Message-ID: Module: wine Branch: master Commit: 5373f8520d2fec729730aaa6a3278cefa46f9414 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5373f8520d2fec729730aaa6a3278cefa46f9414 Author: Dmitry Timoshkov Date: Wed Sep 12 15:09:09 2012 +0900 windowscodecs: Create Logical Screen Descriptor metadata for the GIF decoder. --- dlls/windowscodecs/gifformat.c | 136 +++++++++++++++++++++++++++++++++++ dlls/windowscodecs/tests/metadata.c | 2 - 2 files changed, 136 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index a224356..66c56a8 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -1,5 +1,6 @@ /* * Copyright 2009 Vincent Povirk for CodeWeavers + * Copyright 2012 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -322,8 +323,28 @@ HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) return MetadataReader_Create(&GCEReader_Vtbl, pUnkOuter, iid, ppv); } +static IStream *create_stream(const void *data, int data_size) +{ + HRESULT hr; + IStream *stream; + HGLOBAL hdata; + void *locked_data; + + hdata = GlobalAlloc(GMEM_MOVEABLE, data_size); + if (!hdata) return NULL; + + locked_data = GlobalLock(hdata); + memcpy(locked_data, data, data_size); + GlobalUnlock(hdata); + + hr = CreateStreamOnHGlobal(hdata, TRUE, &stream); + return FAILED(hr) ? NULL : stream; +} + typedef struct { IWICBitmapDecoder IWICBitmapDecoder_iface; + IWICMetadataBlockReader IWICMetadataBlockReader_iface; + BYTE LSD_data[13]; /* Logical Screen Descriptor */ LONG ref; BOOL initialized; GifFileType *gif; @@ -342,6 +363,11 @@ static inline GifDecoder *impl_from_IWICBitmapDecoder(IWICBitmapDecoder *iface) return CONTAINING_RECORD(iface, GifDecoder, IWICBitmapDecoder_iface); } +static inline GifDecoder *impl_from_IWICMetadataBlockReader(IWICMetadataBlockReader *iface) +{ + return CONTAINING_RECORD(iface, GifDecoder, IWICMetadataBlockReader_iface); +} + static inline GifFrameDecode *impl_from_IWICBitmapFrameDecode(IWICBitmapFrameDecode *iface) { return CONTAINING_RECORD(iface, GifFrameDecode, IWICBitmapFrameDecode_iface); @@ -591,6 +617,10 @@ static HRESULT WINAPI GifDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID { *ppv = &This->IWICBitmapDecoder_iface; } + else if (IsEqualIID(&IID_IWICMetadataBlockReader, iid)) + { + *ppv = &This->IWICMetadataBlockReader_iface; + } else { *ppv = NULL; @@ -692,6 +722,10 @@ static HRESULT WINAPI GifDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p /* make sure we don't use the stream after this method returns */ This->gif->UserData = NULL; + seek.QuadPart = 0; + IStream_Seek(pIStream, seek, STREAM_SEEK_SET, NULL); + IStream_Read(pIStream, &This->LSD_data, sizeof(This->LSD_data), NULL); + This->initialized = TRUE; LeaveCriticalSection(&This->lock); @@ -817,6 +851,107 @@ static const IWICBitmapDecoderVtbl GifDecoder_Vtbl = { GifDecoder_GetFrame }; +static HRESULT WINAPI GifDecoder_Block_QueryInterface(IWICMetadataBlockReader *iface, + REFIID iid, void **ppv) +{ + GifDecoder *This = impl_from_IWICMetadataBlockReader(iface); + return IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv); +} + +static ULONG WINAPI GifDecoder_Block_AddRef(IWICMetadataBlockReader *iface) +{ + GifDecoder *This = impl_from_IWICMetadataBlockReader(iface); + return IWICBitmapDecoder_AddRef(&This->IWICBitmapDecoder_iface); +} + +static ULONG WINAPI GifDecoder_Block_Release(IWICMetadataBlockReader *iface) +{ + GifDecoder *This = impl_from_IWICMetadataBlockReader(iface); + return IWICBitmapDecoder_Release(&This->IWICBitmapDecoder_iface); +} + +static HRESULT WINAPI GifDecoder_Block_GetContainerFormat(IWICMetadataBlockReader *iface, + GUID *guid) +{ + TRACE("(%p,%p)\n", iface, guid); + + if (!guid) return E_INVALIDARG; + + *guid = GUID_ContainerFormatGif; + return S_OK; +} + +static HRESULT WINAPI GifDecoder_Block_GetCount(IWICMetadataBlockReader *iface, + UINT *count) +{ + TRACE("%p,%p\n", iface, count); + + if (!count) return E_INVALIDARG; + + *count = 1; + return S_OK; +} + +static HRESULT create_LSD_metadata_reader(GifDecoder *This, IWICMetadataReader **reader) +{ + HRESULT hr; + IWICMetadataReader *metadata_reader; + IWICPersistStream *persist; + IStream *stream; + + /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ + + hr = CoCreateInstance(&CLSID_WICLSDMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&metadata_reader); + if (FAILED(hr)) return hr; + + hr = IWICMetadataReader_QueryInterface(metadata_reader, &IID_IWICPersistStream, (void **)&persist); + if (FAILED(hr)) + { + IWICMetadataReader_Release(metadata_reader); + return hr; + } + + stream = create_stream(This->LSD_data, sizeof(This->LSD_data)); + IWICPersistStream_LoadEx(persist, stream, NULL, WICPersistOptionsDefault); + IStream_Release(stream); + + IWICPersistStream_Release(persist); + + *reader = metadata_reader; + return S_OK; +} + +static HRESULT WINAPI GifDecoder_Block_GetReaderByIndex(IWICMetadataBlockReader *iface, + UINT index, IWICMetadataReader **reader) +{ + GifDecoder *This = impl_from_IWICMetadataBlockReader(iface); + + TRACE("(%p,%u,%p)\n", iface, index, reader); + + if (!reader || index != 0) return E_INVALIDARG; + + return create_LSD_metadata_reader(This, reader); +} + +static HRESULT WINAPI GifDecoder_Block_GetEnumerator(IWICMetadataBlockReader *iface, + IEnumUnknown **enumerator) +{ + FIXME("(%p,%p): stub\n", iface, enumerator); + return E_NOTIMPL; +} + +static const IWICMetadataBlockReaderVtbl GifDecoder_BlockVtbl = +{ + GifDecoder_Block_QueryInterface, + GifDecoder_Block_AddRef, + GifDecoder_Block_Release, + GifDecoder_Block_GetContainerFormat, + GifDecoder_Block_GetCount, + GifDecoder_Block_GetReaderByIndex, + GifDecoder_Block_GetEnumerator +}; + HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) { GifDecoder *This; @@ -832,6 +967,7 @@ HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) if (!This) return E_OUTOFMEMORY; This->IWICBitmapDecoder_iface.lpVtbl = &GifDecoder_Vtbl; + This->IWICMetadataBlockReader_iface.lpVtbl = &GifDecoder_BlockVtbl; This->ref = 1; This->initialized = FALSE; This->gif = NULL; diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index e274106..6bdecee 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1046,7 +1046,6 @@ static void test_metadata_gif(void) /* global metadata block */ hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICMetadataBlockReader, (void **)&blockreader); -todo_wine ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* before Win7 */, "QueryInterface error %#x\n", hr); if (SUCCEEDED(hr)) @@ -1149,7 +1148,6 @@ todo_wine /* global metadata block */ hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICMetadataBlockReader, (void **)&blockreader); -todo_wine ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* before Win7 */, "QueryInterface error %#x\n", hr); if (SUCCEEDED(hr)) From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Dmitry Timoshkov : windowscodecs: Implement GetContainerFormat for the TIFF metadata block reader. Message-ID: Module: wine Branch: master Commit: b8c4ba66033955315a460c89cacade23195f80f3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8c4ba66033955315a460c89cacade23195f80f3 Author: Dmitry Timoshkov Date: Wed Sep 12 15:09:56 2012 +0900 windowscodecs: Implement GetContainerFormat for the TIFF metadata block reader. --- dlls/windowscodecs/tiffformat.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 3c5144d..05bd59e 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -1147,8 +1147,12 @@ static ULONG WINAPI TiffFrameDecode_Block_Release(IWICMetadataBlockReader *iface static HRESULT WINAPI TiffFrameDecode_Block_GetContainerFormat(IWICMetadataBlockReader *iface, GUID *guid) { - FIXME("(%p,%p): stub\n", iface, guid); - return E_NOTIMPL; + TRACE("(%p,%p)\n", iface, guid); + + if (!guid) return E_INVALIDARG; + + *guid = GUID_ContainerFormatTiff; + return S_OK; } static HRESULT WINAPI TiffFrameDecode_Block_GetCount(IWICMetadataBlockReader *iface, From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Dmitry Timoshkov : windowscodecs: Check guid pointer for NULL in TiffDecoder_GetContainerFormat. Message-ID: Module: wine Branch: master Commit: a53807e3e88ec63fae355a2e0d7282b3ad0ba09e URL: http://source.winehq.org/git/wine.git/?a=commit;h=a53807e3e88ec63fae355a2e0d7282b3ad0ba09e Author: Dmitry Timoshkov Date: Wed Sep 12 15:10:26 2012 +0900 windowscodecs: Check guid pointer for NULL in TiffDecoder_GetContainerFormat. --- dlls/windowscodecs/tiffformat.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 05bd59e..05b6aba 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -595,6 +595,8 @@ exit: static HRESULT WINAPI TiffDecoder_GetContainerFormat(IWICBitmapDecoder *iface, GUID *pguidContainerFormat) { + if (!pguidContainerFormat) return E_INVALIDARG; + memcpy(pguidContainerFormat, &GUID_ContainerFormatTiff, sizeof(GUID)); return S_OK; } From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Daniel Jelinski : comctl32: Invalidate correct rectangle for marquee selection. Message-ID: Module: wine Branch: master Commit: 425f0a25d64289cc7fcd58ac2b6ffc86379e3d09 URL: http://source.winehq.org/git/wine.git/?a=commit;h=425f0a25d64289cc7fcd58ac2b6ffc86379e3d09 Author: Daniel Jelinski Date: Tue Sep 11 21:36:35 2012 +0200 comctl32: Invalidate correct rectangle for marquee selection. --- dlls/comctl32/listview.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index b8e1ce3..7a11557 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3886,7 +3886,7 @@ static void LISTVIEW_MarqueeHighlight(LISTVIEW_INFO *infoPtr, const POINT *coord } iterator_destroy(&new_elems); - LISTVIEW_InvalidateRect(infoPtr, &rect); + LISTVIEW_InvalidateRect(infoPtr, &infoPtr->marqueeDrawRect); } /*** From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Alexandre Julliard : winex11: Add support for the LWA_COLORKEY layered window attribute. Message-ID: Module: wine Branch: master Commit: edea44f0ff995aadaaadb866a022832c16301e4a URL: http://source.winehq.org/git/wine.git/?a=commit;h=edea44f0ff995aadaaadb866a022832c16301e4a Author: Alexandre Julliard Date: Wed Sep 12 16:00:18 2012 +0200 winex11: Add support for the LWA_COLORKEY layered window attribute. --- dlls/winex11.drv/bitblt.c | 194 ++++++++++++++++++++++++++++++++++++++++++++- dlls/winex11.drv/window.c | 24 +++++- dlls/winex11.drv/x11drv.h | 3 +- 3 files changed, 213 insertions(+), 8 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=edea44f0ff995aadaaadb866a022832c16301e4a From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Piotr Caban : msvcp90: Added std::ws(basic_istream) implementation. Message-ID: Module: wine Branch: master Commit: 69e12a9ae931136b60fc5fa65bd793ba9e571320 URL: http://source.winehq.org/git/wine.git/?a=commit;h=69e12a9ae931136b60fc5fa65bd793ba9e571320 Author: Piotr Caban Date: Wed Sep 12 13:26:50 2012 +0200 msvcp90: Added std::ws(basic_istream) implementation. --- dlls/msvcp90/ios.c | 54 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 12 +++++----- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 699ac98..39e9a9f 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -7519,6 +7519,32 @@ basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *thi return this; } +/* ?ws at std@@YAAAV?$basic_istream at DU?$char_traits at D@std@@@1 at AAV21@@Z */ +/* ?ws at std@@YAAEAV?$basic_istream at DU?$char_traits at D@std@@@1 at AEAV21@@Z */ +basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream) +{ + basic_ios_char *base = basic_istream_char_get_basic_ios(istream); + int ch = '\n'; + + TRACE("(%p)\n", istream); + + if(basic_istream_char_sentry_create(istream, TRUE)) { + basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); + const ctype_char *ctype = ctype_char_use_facet(strbuf->loc); + + for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch); + ch = basic_streambuf_char_snextc(strbuf)) { + if(ch == EOF) + break; + } + } + basic_istream_char_sentry_destroy(istream); + + if(ch == EOF) + basic_ios_char_setstate(base, IOSTATE_eofbit); + return istream; +} + /* ?peek@?$basic_istream at DU?$char_traits at D@std@@@std@@QAEHXZ */ /* ?peek@?$basic_istream at DU?$char_traits at D@std@@@std@@QEAAHXZ */ DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4) @@ -8750,6 +8776,34 @@ basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar * return this; } +/* ?ws at std@@YAAAV?$basic_istream at _WU?$char_traits at _W@std@@@1 at AAV21@@Z */ +/* ?ws at std@@YAAEAV?$basic_istream at _WU?$char_traits at _W@std@@@1 at AEAV21@@Z */ +/* ?ws at std@@YAAAV?$basic_istream at GU?$char_traits at G@std@@@1 at AAV21@@Z */ +/* ?ws at std@@YAAEAV?$basic_istream at GU?$char_traits at G@std@@@1 at AEAV21@@Z */ +basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream) +{ + basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream); + unsigned short ch = '\n'; + + TRACE("(%p)\n", istream); + + if(basic_istream_wchar_sentry_create(istream, TRUE)) { + basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); + const ctype_wchar *ctype = ctype_wchar_use_facet(strbuf->loc); + + for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch); + ch = basic_streambuf_wchar_snextc(strbuf)) { + if(ch == WEOF) + break; + } + } + basic_istream_wchar_sentry_destroy(istream); + + if(ch == WEOF) + basic_ios_wchar_setstate(base, IOSTATE_eofbit); + return istream; +} + /* ?peek@?$basic_istream at _WU?$char_traits at _W@std@@@std@@QAEGXZ */ /* ?peek@?$basic_istream at _WU?$char_traits at _W@std@@@std@@QEAAGXZ */ /* ?peek@?$basic_istream at GU?$char_traits at G@std@@@std@@QAEGXZ */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index a14225a..b70fd27 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5711,12 +5711,12 @@ @ cdecl -arch=win64 ?write@?$basic_ostream at GU?$char_traits at G@std@@@std@@QEAAAEAV12 at PEBG_J@Z(ptr wstr long) basic_ostream_wchar_write @ thiscall -arch=win32 ?write@?$basic_ostream at _WU?$char_traits at _W@std@@@std@@QAEAAV12 at PB_WH@Z(ptr wstr long) basic_ostream_wchar_write @ cdecl -arch=win64 ?write@?$basic_ostream at _WU?$char_traits at _W@std@@@std@@QEAAAEAV12 at PEB_W_J@Z(ptr wstr long) basic_ostream_wchar_write -@ stub -arch=win32 ?ws at std@@YAAAV?$basic_istream at DU?$char_traits at D@std@@@1 at AAV21@@Z -@ stub -arch=win64 ?ws at std@@YAAEAV?$basic_istream at DU?$char_traits at D@std@@@1 at AEAV21@@Z -@ stub -arch=win32 ?ws at std@@YAAAV?$basic_istream at GU?$char_traits at G@std@@@1 at AAV21@@Z -@ stub -arch=win64 ?ws at std@@YAAEAV?$basic_istream at GU?$char_traits at G@std@@@1 at AEAV21@@Z -@ stub -arch=win32 ?ws at std@@YAAAV?$basic_istream at _WU?$char_traits at _W@std@@@1 at AAV21@@Z -@ stub -arch=win64 ?ws at std@@YAAEAV?$basic_istream at _WU?$char_traits at _W@std@@@1 at AEAV21@@Z +@ cdecl -arch=win32 ?ws at std@@YAAAV?$basic_istream at DU?$char_traits at D@std@@@1 at AAV21@@Z(ptr) ws_basic_istream_char +@ cdecl -arch=win64 ?ws at std@@YAAEAV?$basic_istream at DU?$char_traits at D@std@@@1 at AEAV21@@Z(ptr) ws_basic_istream_char +@ cdecl -arch=win32 ?ws at std@@YAAAV?$basic_istream at GU?$char_traits at G@std@@@1 at AAV21@@Z(ptr) ws_basic_istream_wchar +@ cdecl -arch=win64 ?ws at std@@YAAEAV?$basic_istream at GU?$char_traits at G@std@@@1 at AEAV21@@Z(ptr) ws_basic_istream_wchar +@ cdecl -arch=win32 ?ws at std@@YAAAV?$basic_istream at _WU?$char_traits at _W@std@@@1 at AAV21@@Z(ptr) ws_basic_istream_wchar +@ cdecl -arch=win64 ?ws at std@@YAAEAV?$basic_istream at _WU?$char_traits at _W@std@@@1 at AEAV21@@Z(ptr) ws_basic_istream_wchar @ cdecl ?xalloc at ios_base@std@@SAHXZ() ios_base_xalloc @ thiscall -arch=win32 ?xsgetn@?$basic_streambuf at DU?$char_traits at D@std@@@std@@MAEHPADH at Z(ptr ptr long) basic_streambuf_char_xsgetn @ cdecl -arch=win64 ?xsgetn@?$basic_streambuf at DU?$char_traits at D@std@@@std@@MEAA_JPEAD_J at Z(ptr ptr long) basic_streambuf_char_xsgetn From julliard at winehq.org Wed Sep 12 13:39:16 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:16 -0500 Subject: Piotr Caban : msvcp: Sync spec files and implementations. Message-ID: Module: wine Branch: master Commit: 8dacc816ebea5187a84c979518639314d4c1f411 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8dacc816ebea5187a84c979518639314d4c1f411 Author: Piotr Caban Date: Wed Sep 12 13:27:11 2012 +0200 msvcp: Sync spec files and implementations. --- dlls/msvcp100/ios.c | 54 +++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp100/msvcp100.spec | 12 ++++---- dlls/msvcp70/msvcp70.spec | 12 ++++---- dlls/msvcp71/msvcp71.spec | 12 ++++---- dlls/msvcp80/msvcp80.spec | 12 ++++---- 5 files changed, 78 insertions(+), 24 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=8dacc816ebea5187a84c979518639314d4c1f411 From julliard at winehq.org Wed Sep 12 13:39:17 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:17 -0500 Subject: Piotr Caban : msvcp: Fixed displaying of not NULL-terminated strings in debug traces. Message-ID: Module: wine Branch: master Commit: dadc409bae6bd326beb5b03ca4d20e9e44250481 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dadc409bae6bd326beb5b03ca4d20e9e44250481 Author: Piotr Caban Date: Wed Sep 12 13:27:42 2012 +0200 msvcp: Fixed displaying of not NULL-terminated strings in debug traces. --- dlls/msvcp100/string.c | 24 ++++++++++++------------ dlls/msvcp60/string.c | 24 ++++++++++++------------ dlls/msvcp90/string.c | 24 ++++++++++++------------ 3 files changed, 36 insertions(+), 36 deletions(-) Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=dadc409bae6bd326beb5b03ca4d20e9e44250481 From julliard at winehq.org Wed Sep 12 13:39:17 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:17 -0500 Subject: Qian Hong : gdi32: Fixed localized font full name (UNIQUE ID). Message-ID: Module: wine Branch: master Commit: 6c1e264e8e6d6c76db3c40e491bd83810cab0865 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c1e264e8e6d6c76db3c40e491bd83810cab0865 Author: Qian Hong Date: Wed Sep 12 21:42:04 2012 +0800 gdi32: Fixed localized font full name (UNIQUE ID). --- dlls/gdi32/freetype.c | 4 +++- dlls/gdi32/tests/font.c | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 9412df2..2587d99 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -6578,7 +6578,9 @@ static BOOL get_outline_text_metrics(GdiFont *font) } lenface = (strlenW(face_nameW) + 1) * sizeof(WCHAR); - full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, GetSystemDefaultLangID() ); + if (!full_nameW) + full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, TT_MS_LANGID_ENGLISH_UNITED_STATES ); if (!full_nameW) { WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 0c67fe7..3b79bd0 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4147,7 +4147,12 @@ static void test_fullname2_helper(const char *Family) bufW[0] = 0; bufA[0] = 0; - ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size, GetSystemDefaultLangID()); + if (!ret) + { + trace("no localized UNIQUE_ID found.\n"); + ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_UNIQUE_ID, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); + } ok(ret, "UNIQUE_ID (full name) could not be read\n"); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFullName; From julliard at winehq.org Wed Sep 12 13:39:17 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:17 -0500 Subject: Qian Hong : gdi32/tests: Added tests for vertical fonts. Message-ID: Module: wine Branch: master Commit: 8f91b516741be8a51ac0ae10379e79fa8ed4a53f URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f91b516741be8a51ac0ae10379e79fa8ed4a53f Author: Qian Hong Date: Wed Sep 12 21:48:45 2012 +0800 gdi32/tests: Added tests for vertical fonts. --- dlls/gdi32/tests/font.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 3b79bd0..3953512 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4058,6 +4058,8 @@ static void test_fullname2_helper(const char *Family) int i; DWORD otm_size, ret, buf_size; OUTLINETEXTMETRICA *otm; + BOOL want_vertical, get_vertical; + want_vertical = ( Family[0] == '@' ); hdc = CreateCompatibleDC(0); ok(hdc != NULL, "CreateCompatibleDC failed\n"); @@ -4084,6 +4086,13 @@ static void test_fullname2_helper(const char *Family) trace("Checking font %s:\nFamilyName: %s; FaceName: %s; StyleName: %s\n", Family, FamilyName, FaceName, StyleName); + get_vertical = ( FamilyName[0] == '@' ); + if (get_vertical) + { + todo_wine ok(get_vertical == want_vertical, "Vertical flags don't match: %s %s\n", Family, FamilyName); + continue; + } + lstrcpyA(lf.lfFaceName, FaceName); hfont = CreateFontIndirectA(&lf); ok(hfont != 0, "CreateFontIndirectA failed\n"); @@ -4170,9 +4179,28 @@ static void test_fullname2_helper(const char *Family) static void test_fullname2(void) { + test_fullname2_helper("Arial"); + test_fullname2_helper("DejaVu Sans"); test_fullname2_helper("Lucida Sans"); + test_fullname2_helper("Tahoma"); test_fullname2_helper("Webdings"); test_fullname2_helper("Wingdings"); + test_fullname2_helper("SimSun"); + test_fullname2_helper("NSimSun"); + test_fullname2_helper("MingLiu"); + test_fullname2_helper("PMingLiu"); + test_fullname2_helper("WenQuanYi Micro Hei"); + test_fullname2_helper("MS UI Gothic"); + test_fullname2_helper("Ume UI Gothic"); + test_fullname2_helper("MS Gothic"); + test_fullname2_helper("Ume Gothic"); + test_fullname2_helper("MS PGothic"); + test_fullname2_helper("Ume P Gothic"); + test_fullname2_helper("Gulim"); + test_fullname2_helper("Batang"); + test_fullname2_helper("UnBatang"); + test_fullname2_helper("UnDotum"); + } static BOOL write_ttf_file(const char *fontname, char *tmp_name) From julliard at winehq.org Wed Sep 12 13:39:17 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:17 -0500 Subject: Qian Hong : gdi32: Prepend at when create vertical font face. Message-ID: Module: wine Branch: master Commit: 97904fd1ff1e775f9af3a8915850a2c2f5d3b109 URL: http://source.winehq.org/git/wine.git/?a=commit;h=97904fd1ff1e775f9af3a8915850a2c2f5d3b109 Author: Qian Hong Date: Wed Sep 12 21:51:24 2012 +0800 gdi32: Prepend at when create vertical font face. --- dlls/gdi32/freetype.c | 3 +++ dlls/gdi32/tests/font.c | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 2587d99..7e5fc36 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1724,6 +1724,9 @@ static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file, face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, GetSystemDefaultLangID() ); if (!face->FullName) face->FullName = get_face_name( ft_face, TT_NAME_ID_FULL_NAME, TT_MS_LANGID_ENGLISH_UNITED_STATES ); + if (vertical) + face->FullName = prepend_at( face->FullName ); + if (file) { face->file = strdupA( file ); diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 3953512..b11acac 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4087,11 +4087,7 @@ static void test_fullname2_helper(const char *Family) trace("Checking font %s:\nFamilyName: %s; FaceName: %s; StyleName: %s\n", Family, FamilyName, FaceName, StyleName); get_vertical = ( FamilyName[0] == '@' ); - if (get_vertical) - { - todo_wine ok(get_vertical == want_vertical, "Vertical flags don't match: %s %s\n", Family, FamilyName); - continue; - } + ok(get_vertical == want_vertical, "Vertical flags don't match: %s %s\n", Family, FamilyName); lstrcpyA(lf.lfFaceName, FaceName); hfont = CreateFontIndirectA(&lf); From julliard at winehq.org Wed Sep 12 13:39:17 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:17 -0500 Subject: Qian Hong : gdi32/tests: Added more tests for vertical fonts. Message-ID: Module: wine Branch: master Commit: 2f76f35e468c5160b8da0b79d996a061a36bfc93 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2f76f35e468c5160b8da0b79d996a061a36bfc93 Author: Qian Hong Date: Wed Sep 12 21:53:38 2012 +0800 gdi32/tests: Added more tests for vertical fonts. --- dlls/gdi32/tests/font.c | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index b11acac..1cf679b 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4046,6 +4046,16 @@ static void test_fullname(void) DeleteDC(hdc); } +static WCHAR *prepend_at(WCHAR *family) +{ + if (!family) + return NULL; + + memmove(family + 1, family, (lstrlenW(family) + 1) * sizeof(WCHAR)); + family[0] = '@'; + return family; +} + static void test_fullname2_helper(const char *Family) { char *FamilyName, *FaceName, *StyleName, *otmStr; @@ -4117,10 +4127,13 @@ static void test_fullname2_helper(const char *Family) ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FONT_FAMILY, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); } ok(ret, "FAMILY (family name) could not be read\n"); + if (want_vertical) bufW = prepend_at(bufW); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); ok(!lstrcmpA(FamilyName, bufA), "font family names don't match: returned %s, expect %s\n", FamilyName, bufA); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFamilyName; - ok(!lstrcmpA(FamilyName, otmStr), "FamilyName %s doesn't match otmpFamilyName %s\n", FamilyName, otmStr); + if (want_vertical) + todo_wine ok(!lstrcmpA(FamilyName, otmStr), "FamilyName %s doesn't match otmpFamilyName %s\n", FamilyName, otmStr); + else ok(!lstrcmpA(FamilyName, otmStr), "FamilyName %s doesn't match otmpFamilyName %s\n", FamilyName, otmStr); bufW[0] = 0; bufA[0] = 0; @@ -4131,8 +4144,11 @@ static void test_fullname2_helper(const char *Family) ret = get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, bufW, buf_size, TT_MS_LANGID_ENGLISH_UNITED_STATES); } ok(ret, "FULL_NAME (face name) could not be read\n"); + if (want_vertical) bufW = prepend_at(bufW); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); - ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); + if (want_vertical) + todo_wine ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); + else ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFaceName; ok(!lstrcmpA(FaceName, otmStr), "FaceName %s doesn't match otmpFaceName %s\n", FaceName, otmStr); @@ -4196,6 +4212,21 @@ static void test_fullname2(void) test_fullname2_helper("Batang"); test_fullname2_helper("UnBatang"); test_fullname2_helper("UnDotum"); + test_fullname2_helper("@SimSun"); + test_fullname2_helper("@NSimSun"); + test_fullname2_helper("@MingLiu"); + test_fullname2_helper("@PMingLiu"); + test_fullname2_helper("@WenQuanYi Micro Hei"); + test_fullname2_helper("@MS UI Gothic"); + test_fullname2_helper("@Ume UI Gothic"); + test_fullname2_helper("@MS Gothic"); + test_fullname2_helper("@Ume Gothic"); + test_fullname2_helper("@MS PGothic"); + test_fullname2_helper("@Ume P Gothic"); + test_fullname2_helper("@Gulim"); + test_fullname2_helper("@Batang"); + test_fullname2_helper("@UnBatang"); + test_fullname2_helper("@UnDotum"); } From julliard at winehq.org Wed Sep 12 13:39:17 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:17 -0500 Subject: Qian Hong : gdi32: Prepend at in get_outline_text_metrics for vertical fonts. Message-ID: Module: wine Branch: master Commit: df8be7b81aad749fc712c4a8ba79a1204faa008b URL: http://source.winehq.org/git/wine.git/?a=commit;h=df8be7b81aad749fc712c4a8ba79a1204faa008b Author: Qian Hong Date: Wed Sep 12 21:55:15 2012 +0800 gdi32: Prepend at in get_outline_text_metrics for vertical fonts. --- dlls/gdi32/freetype.c | 1 + dlls/gdi32/tests/font.c | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 7e5fc36..3a90036 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -6579,6 +6579,7 @@ static BOOL get_outline_text_metrics(GdiFont *font) FIXME("failed to read face_nameW for font %s!\n", wine_dbgstr_w(font->name)); face_nameW = strdupW(font->name); } + if (font->name[0] == '@') face_nameW = prepend_at( face_nameW ); lenface = (strlenW(face_nameW) + 1) * sizeof(WCHAR); full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, GetSystemDefaultLangID() ); diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 1cf679b..92cc0a7 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4131,9 +4131,7 @@ static void test_fullname2_helper(const char *Family) WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); ok(!lstrcmpA(FamilyName, bufA), "font family names don't match: returned %s, expect %s\n", FamilyName, bufA); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFamilyName; - if (want_vertical) - todo_wine ok(!lstrcmpA(FamilyName, otmStr), "FamilyName %s doesn't match otmpFamilyName %s\n", FamilyName, otmStr); - else ok(!lstrcmpA(FamilyName, otmStr), "FamilyName %s doesn't match otmpFamilyName %s\n", FamilyName, otmStr); + ok(!lstrcmpA(FamilyName, otmStr), "FamilyName %s doesn't match otmpFamilyName %s\n", FamilyName, otmStr); bufW[0] = 0; bufA[0] = 0; @@ -4146,9 +4144,7 @@ static void test_fullname2_helper(const char *Family) ok(ret, "FULL_NAME (face name) could not be read\n"); if (want_vertical) bufW = prepend_at(bufW); WideCharToMultiByte(CP_ACP, 0, bufW, -1, bufA, buf_size, NULL, FALSE); - if (want_vertical) - todo_wine ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); - else ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); + ok(!lstrcmpA(FaceName, bufA), "font face names don't match: returned %s, expect %s\n", FaceName, bufA); otmStr = (LPSTR)otm + (UINT_PTR)otm->otmpFaceName; ok(!lstrcmpA(FaceName, otmStr), "FaceName %s doesn't match otmpFaceName %s\n", FaceName, otmStr); From julliard at winehq.org Wed Sep 12 13:39:17 2012 From: julliard at winehq.org (Alexandre Julliard) Date: Wed, 12 Sep 2012 13:39:17 -0500 Subject: Josh DuBois : msls31: Add stub dll. Message-ID: Module: wine Branch: master Commit: 92ad0a47fafaf92e4819a0229cc9fe71f5318734 URL: http://source.winehq.org/git/wine.git/?a=commit;h=92ad0a47fafaf92e4819a0229cc9fe71f5318734 Author: Josh DuBois Date: Tue Sep 11 15:46:46 2012 -0500 msls31: Add stub dll. --- configure | 1 + configure.ac | 1 + dlls/msls31/Makefile.in | 6 +++ dlls/msls31/msls31.spec | 79 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msls31/msls31_main.c | 44 +++++++++++++++++++++++++ 5 files changed, 131 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 97e4664..41ef0c4 100755 --- a/configure +++ b/configure @@ -15534,6 +15534,7 @@ wine_fn_config_dll msimsg enable_msimsg wine_fn_config_dll msimtf enable_msimtf wine_fn_config_dll msisip enable_msisip wine_fn_config_dll msisys.ocx enable_msisys_ocx +wine_fn_config_dll msls31 enable_msls31 wine_fn_config_dll msnet32 enable_msnet32 wine_fn_config_dll mspatcha enable_mspatcha wine_fn_config_dll msrle32 enable_msrle32 po diff --git a/configure.ac b/configure.ac index 7e761af..2c9e582 100644 --- a/configure.ac +++ b/configure.ac @@ -2807,6 +2807,7 @@ WINE_CONFIG_DLL(msimsg) WINE_CONFIG_DLL(msimtf) WINE_CONFIG_DLL(msisip) WINE_CONFIG_DLL(msisys.ocx) +WINE_CONFIG_DLL(msls31) WINE_CONFIG_DLL(msnet32) WINE_CONFIG_DLL(mspatcha) WINE_CONFIG_DLL(msrle32,,[po]) diff --git a/dlls/msls31/Makefile.in b/dlls/msls31/Makefile.in new file mode 100644 index 0000000..91db958 --- /dev/null +++ b/dlls/msls31/Makefile.in @@ -0,0 +1,6 @@ +MODULE = msls31.dll + +C_SRCS = \ + msls31_main.c + + at MAKE_DLL_RULES@ diff --git a/dlls/msls31/msls31.spec b/dlls/msls31/msls31.spec new file mode 100644 index 0000000..f962a91 --- /dev/null +++ b/dlls/msls31/msls31.spec @@ -0,0 +1,79 @@ +@ stub LsAppendRunToCurrentSubline +@ stub LsCompressSubline +@ stub LsCreateContext +@ stub LsCreateLine +@ stub LsCreateSubline +@ stub LsDestroyContext +@ stub LsDestroyLine +@ stub LsDestroySubline +@ stub LsDisplayLine +@ stub LsDisplaySubline +@ stub LsEnumLine +@ stub LsEnumSubline +@ stub LsExpandSubline +@ stub LsFetchAppendToCurrentSubline +@ stub LsFetchAppendToCurrentSublineResume +@ stub LsFindNextBreakSubline +@ stub LsFindPrevBreakSubline +@ stub LsFinishCurrentSubline +@ stub LsForceBreakSubline +@ stub LsGetHihLsimethods +@ stub LsGetLineDur +@ stub LsGetMinDurBreaks +@ stub LsGetReverseLsimethods +@ stub LsGetRubyLsimethods +@ stub LsGetSpecialEffectsSubline +@ stub LsGetTatenakayokoLsimethods +@ stub LsGetWarichuLsimethods +@ stub LsLwMultDivR +@ stub LsMatchPresSubline +@ stub LsModifyLineHeight +@ stub LsPointUV2FromPointUV1 +@ stub LsPointXYFromPointUV +@ stub LsQueryCpPpointSubline +@ stub LsQueryFLineEmpty +@ stub LsQueryLineCpPpoint +@ stub LsQueryLineDup +@ stub LsQueryLinePointPcp +@ stub LsQueryPointPcpSubline +@ stub LsQueryTextCellDetails +@ stub LsResetRMInCurrentSubline +@ stub LsSetBreakSubline +@ stub LsSetBreaking +@ stub LsSetCompression +@ stub LsSetDoc +@ stub LsSetExpansion +@ stub LsSetModWidthPairs +@ stub LsSqueezeSubline +@ stub LsTruncateSubline +@ stub LsdnDistribute +@ stub LsdnFinishByOneChar +@ stub LsdnFinishByPen +@ stub LsdnFinishBySubline +@ stub LsdnFinishDelete +@ stub LsdnFinishDeleteAll +@ stub LsdnFinishRegular +@ stub LsdnFinishRegularAddAdvancePen +@ stub LsdnGetCurTabInfo +@ stub LsdnGetDup +@ stub LsdnGetFormatDepth +@ stub LsdnModifyParaEnding +@ stub LsdnQueryObjDimRange +@ stub LsdnQueryPenNode +@ stub LsdnResetObjDim +@ stub LsdnResetPenNode +@ stub LsdnResolvePrevTab +@ stub LsdnSetAbsBaseLine +@ stub LsdnSetRigidDup +@ stub LsdnSkipCurTab +@ stub LsdnSubmitSublines +@ stub LssbFDoneDisplay +@ stub LssbFDonePresSubline +@ stub LssbFIsSublineEmpty +@ stub LssbGetDupSubline +@ stub LssbGetDurTrailInSubline +@ stub LssbGetDurTrailWithPensInSubline +@ stub LssbGetNumberDnodesInSubline +@ stub LssbGetObjDimSubline +@ stub LssbGetPlsrunsFromSubline +@ stub LssbGetVisibleDcpInSubline diff --git a/dlls/msls31/msls31_main.c b/dlls/msls31/msls31_main.c new file mode 100644 index 0000000..9625a91 --- /dev/null +++ b/dlls/msls31/msls31_main.c @@ -0,0 +1,44 @@ +/* + * msls31.dll + * + * Copyright 2012 Josh DuBois for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msls31); + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + } + return TRUE; +} From jnewman at winehq.org Wed Sep 12 20:27:19 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Wed, 12 Sep 2012 20:27:19 -0500 Subject: Kyle Auble : Remove links to Dev. Cheatsheet Message-ID: Module: website Branch: master Commit: 6660e5620375e660c2795296d6783a3d36a06c81 URL: http://source.winehq.org/git/website.git/?a=commit;h=6660e5620375e660c2795296d6783a3d36a06c81 Author: Kyle Auble Date: Tue Sep 11 15:10:30 2012 -0700 Remove links to Dev. Cheatsheet The cheatsheet's content isn't very focused or introductory. Splitting it up over the proper wiki pages makes more sense. --- templates/de/devel.template | 9 --------- templates/de/documentation.template | 6 ------ templates/en/devel.template | 9 --------- templates/en/documentation.template | 7 ------- templates/he/devel.template | 9 --------- templates/he/documentation.template | 6 ------ templates/pl/devel.template | 9 --------- templates/pl/documentation.template | 7 ------- templates/tr/devel.template | 9 --------- 9 files changed, 0 insertions(+), 71 deletions(-) diff --git a/templates/de/devel.template b/templates/de/devel.template index 61c5d4b..b0a629f 100644 --- a/templates/de/devel.template +++ b/templates/de/devel.template @@ -45,15 +45,6 @@ Hilfsmittel, die wir unseren Entwicklern zur Verfügung stellen.

    - Entwickler-Spickzettel - - - Fünf-Minuten Einführung in die Wine-Entwicklung - - - - - Entwicklerhandbuch diff --git a/templates/de/documentation.template b/templates/de/documentation.template index e66c6f2..82a3fae 100644 --- a/templates/de/documentation.template +++ b/templates/de/documentation.template @@ -41,13 +41,7 @@
  • Wie man dabei hilft Programme mit Wine zum laufen zu kriegen (en)
    Eine kurze Einf?hrung f?r alle die uns helfen wollen das es funktioniert.
    -

  • - -
  • - Erste Schritte zur Wine Entwicklung (en)
    - Ein Crashkurs im Wine entwickeln und debuggen.
  • -

    Man Pages

    diff --git a/templates/en/devel.template b/templates/en/devel.template index 422edd8..b72130e 100644 --- a/templates/en/devel.template +++ b/templates/en/devel.template @@ -45,15 +45,6 @@ various resources available for our developers.

    - Developer Cheatsheet - - - 5 minute intro to Wine development - - - - - Developers Guide diff --git a/templates/en/documentation.template b/templates/en/documentation.template index 7f5496d..d00a1c2 100644 --- a/templates/en/documentation.template +++ b/templates/en/documentation.template @@ -42,14 +42,7 @@ How to help get applications working in Wine
    A short guide for those who want to help us make things work.
    -
    - -
  • - Getting started with Wine - development
    - A crash course in Wine development and debugging.
  • -

    Man Pages

    diff --git a/templates/he/devel.template b/templates/he/devel.template index 0f70353..8d3e7f4 100644 --- a/templates/he/devel.template +++ b/templates/he/devel.template @@ -44,15 +44,6 @@ - ???? ???????? - - - ????? ?? 5 ???? ?????? Wine. - - - - - ????? ???????? diff --git a/templates/he/documentation.template b/templates/he/documentation.template index 6e88f08..b08dab0 100644 --- a/templates/he/documentation.template +++ b/templates/he/documentation.template @@ -42,13 +42,7 @@ ???? ????? ????? ??????? ??? ?????? ??Wine
    ????? ??? ???? ?????????? ????? ??? ??? ??????? ?????.
    -
    - -
  • - ????? ????? ?????? Wine
    - ???? ???? ?????? ?????? ?????? ??Wine.
  • -

    ????? Man (?????? ?????)

    diff --git a/templates/pl/devel.template b/templates/pl/devel.template index 97c2f45..1fbd8fe 100644 --- a/templates/pl/devel.template +++ b/templates/pl/devel.template @@ -45,15 +45,6 @@ rozmaitych materia??w dost?pnych dla programist?w Wine.

    - Developer Cheatsheet - - - 5-minutowe wprowadzenie w programowanie dla Wine - - - - - Przewodnik programisty diff --git a/templates/pl/documentation.template b/templates/pl/documentation.template index 728d186..6b8be5d 100644 --- a/templates/pl/documentation.template +++ b/templates/pl/documentation.template @@ -42,14 +42,7 @@ Jak pom?c w procesie uruchamiania aplikacji pod Wine
    Kr?tki przewodnik dla tych, kt?rzy chc? nam pom?c w umo?liwianiu uruchamiania aplikacji.
    -
    - -
  • - Pierwsze kroki w programowaniu - Wine
    - Wyp?y? na g??bok? wod? w programowaniu i debugowaniu Wine.
  • -

    Instrukcje obs?ugi

    diff --git a/templates/tr/devel.template b/templates/tr/devel.template index a35adb5..b9705ba 100644 --- a/templates/tr/devel.template +++ b/templates/tr/devel.template @@ -44,15 +44,6 @@ - Developer Cheatsheet - - - 5 minute intro to Wine development - - - - - Developers Guide From jnewman at winehq.org Wed Sep 12 20:27:19 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Wed, 12 Sep 2012 20:27:19 -0500 Subject: Kyle Auble : Delete Developer Cheatsheets Message-ID: Module: website Branch: master Commit: d82d59ec1dcd8a7fdc0943a2127ff28a8f137125 URL: http://source.winehq.org/git/website.git/?a=commit;h=d82d59ec1dcd8a7fdc0943a2127ff28a8f137125 Author: Kyle Auble Date: Tue Sep 11 15:10:49 2012 -0700 Delete Developer Cheatsheets The Hebrew version was completely untranslated so only the German and English versions' content was moved to the wiki. --- templates/de/developer-cheatsheet.template | 642 ---------------------------- templates/en/developer-cheatsheet.template | 569 ------------------------ templates/he/developer-cheatsheet.template | 569 ------------------------ 3 files changed, 0 insertions(+), 1780 deletions(-) Diff: http://source.winehq.org/git/website.git/?a=commitdiff;h=d82d59ec1dcd8a7fdc0943a2127ff28a8f137125 From jnewman at winehq.org Wed Sep 12 20:27:19 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Wed, 12 Sep 2012 20:27:19 -0500 Subject: Kyle Auble : Rewrite English About page Message-ID: Module: website Branch: master Commit: fc7376c259d0b04378c3ca85068fbb6310d72563 URL: http://source.winehq.org/git/website.git/?a=commit;h=fc7376c259d0b04378c3ca85068fbb6310d72563 Author: Kyle Auble Date: Tue Sep 11 15:11:00 2012 -0700 Rewrite English About page Rewrite of the About page to include content from the wiki. Reformatted the page in the process. --- templates/en/about.template | 69 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 61 insertions(+), 8 deletions(-) diff --git a/templates/en/about.template b/templates/en/about.template index 8696f5b..4531a3a 100644 --- a/templates/en/about.template +++ b/templates/en/about.template @@ -3,20 +3,73 @@

    About Wine

    -

    Wine lets you run Windows software on other operating systems. With Wine, you can install and run these applications just like you would in Windows.

    +

    Wine (originally an acronym for "Wine Is Not an Emulator") is a +compatibility layer capable of running Windows applications on several +POSIX-compliant operating systems, such as Linux, Mac OSX, & BSD. +Instead of simulating internal Windows logic like a virtual machine or +emulator, Wine translates Windows API calls into POSIX calls on-the-fly, +eliminating the performance and memory penalties of other methods and +allowing you to cleanly integrate Windows applications into your +desktop.

    -

    Wine is still under active development. Not every program works yet, however there are already several million people using Wine to run their software.

    +

    Wine began in 1993 under the initial coordination of Bob Amstadt as a +way to support running Windows 3.1 programs on Linux. Very early on, +leadership over Wine's development passed to Alexandre Julliard, who has +managed the project ever since. Over the years, as the Windows API and +applications have evolved to take advantage of new hardware and +software, Wine has adapted to support new features, all while being +ported to other OSes, becoming more stable, and providing a better +user-experience.

    + +

    An ambitious project by definition, work on Wine would steadily +continue for 15 years before the program finally reached v1.0, the first +stable release, in 2008. Several releases later, Wine is still under +active development today, and although there is more work to be done, +millions of people are estimated to use Wine to run +their Windows software on the OS of their choice.

    Open Source and User Driven

    -

    Wine will always be free software. Approximately half of Wine's source code is written by volunteers. The rest is sponsored by commercial interests, especially CodeWeavers who sell a supported version of Wine.

    +

    Wine will always be free software. Approximately half of Wine's +source code is written by volunteers, with the remaining effort +sponsored by commercial interests, especially +CodeWeavers, which sells a supported version of +Wine.

    -

    Wine is heavily reliant on its user community. User tests fill our Application Database to track how well programs work, and all the answers in the forums come from volunteers.

    +

    Wine is heavily reliant on its user community too. Users volunteer +their time to share tips and test results on how well their programs +work in our Application Database, file bug reports to notify +developers of problems in our Bug-Tracker, and answer questions in our +forums. +

    Learn more:

    + +

    (Several of the following pages are currently being reworked and +may not be up-to-date)

    + From jnewman at winehq.org Wed Sep 12 20:27:19 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Wed, 12 Sep 2012 20:27:19 -0500 Subject: Jeremy Newman : added cornerround, and white background for content wells Message-ID: Module: website Branch: master Commit: aacacdde0e890fd6eb3684e0b14da1e5a4e6ad1f URL: http://source.winehq.org/git/website.git/?a=commit;h=aacacdde0e890fd6eb3684e0b14da1e5a4e6ad1f Author: Jeremy Newman Date: Wed Sep 12 17:02:35 2012 -0500 added cornerround, and white background for content wells --- styles.css | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/styles.css b/styles.css index da0d476..65c948f 100644 --- a/styles.css +++ b/styles.css @@ -100,6 +100,9 @@ BODY { padding: 85px 10px 10px 100px; } +/* set background color of content wells */ +#main_content .content, #main_left .content, #main_right .content { background-color: #fff; } + /* main content well front page left column */ #main_left { width: 58%; @@ -226,6 +229,14 @@ hr text-align: left; } +/* rounded corners */ +.cornerround +{ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + /* Rounded Corner Box */ div.rbox { display:block; margin: 0px; } div.rbox b.rtop, b.rbottom { display:block; margin: 0px; } From jnewman at winehq.org Wed Sep 12 20:27:20 2012 From: jnewman at winehq.org (Jeremy Newman) Date: Wed, 12 Sep 2012 20:27:20 -0500 Subject: Jeremy Newman : updated content well to use CSS3 rounded corners instead of the old hack Message-ID: Module: website Branch: master Commit: deeb1b3231feb1673fc352eb7b8f5a01dabd3661 URL: http://source.winehq.org/git/website.git/?a=commit;h=deeb1b3231feb1673fc352eb7b8f5a01dabd3661 Author: Jeremy Newman Date: Wed Sep 12 20:26:06 2012 -0500 updated content well to use CSS3 rounded corners instead of the old hack --- templates/de/global/themes/winehq/content.template | 8 +------- templates/en/global/themes/winehq/content.template | 8 +------- templates/fr/global/themes/winehq/content.template | 8 +------- templates/he/global/themes/winehq/content.template | 8 +------- templates/tr/global/themes/winehq/content.template | 8 +------- 5 files changed, 5 insertions(+), 35 deletions(-) diff --git a/templates/de/global/themes/winehq/content.template b/templates/de/global/themes/winehq/content.template index 17579c6..3810436 100644 --- a/templates/de/global/themes/winehq/content.template +++ b/templates/de/global/themes/winehq/content.template @@ -52,19 +52,13 @@
    -
    - -
    +
    - {$page_body} -
    - -
    -
    - -
    +
    - {$page_body} -
    - -
    -
    - -
    +
    - {$page_body} -
    - -
    -
    - -
    +
    - {$page_body} -
    - -
    -
    - -
    +
    - {$page_body} -
    - -