Re: wininet/tests: fix a compiler warning on LLVM/Clang
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.pl?Key=18347 Your paranoid android. === WXPPROSP3 (32 bit http) === http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:1920: Test failed: HttpQueryInfo failed: 0(12154) http.c:1970: Test failed: HttpQueryInfo failed: 0(12154) http.c:2021: Test failed: HttpQueryInfo failed: 0(12154) http.c:2076: Test failed: HttpQueryInfo failed: 0(12154) http.c:2086: Test failed: HttpQueryInfo failed: 0(12154) http.c:2096: Test failed: HttpQueryInfo failed: 0(12154) http.c:2106: Test failed: HttpQueryInfo failed: 0(12154) http.c:2350: Test failed: HttpQueryInfo failed: 0(12154) http.c:2380: Test failed: HttpQueryInfo failed: 0(12154) http.c:2406: Test failed: HttpQueryInfo failed: 0(12154) http.c:2456: Test failed: HttpQueryInfo failed: 0(12154) http.c:2541: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) === W2K3R2SESP2 (32 bit http) === http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:1920: Test failed: HttpQueryInfo failed: 0(12154) http.c:1970: Test failed: HttpQueryInfo failed: 0(12154) http.c:2021: Test failed: HttpQueryInfo failed: 0(12154) http.c:2076: Test failed: HttpQueryInfo failed: 0(12154) http.c:2086: Test failed: HttpQueryInfo failed: 0(12154) http.c:2096: Test failed: HttpQueryInfo failed: 0(12154) http.c:2106: Test failed: HttpQueryInfo failed: 0(12154) http.c:2350: Test failed: HttpQueryInfo failed: 0(12154) http.c:2380: Test failed: HttpQueryInfo failed: 0(12154) http.c:2406: Test failed: HttpQueryInfo failed: 0(12154) http.c:2456: Test failed: HttpQueryInfo failed: 0(12154) http.c:2541: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) === WVISTAADM (32 bit http) === http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:1920: Test failed: HttpQueryInfo failed: 0(12154) http.c:1970: Test failed: HttpQueryInfo failed: 0(12154) http.c:2021: Test failed: HttpQueryInfo failed: 0(12154) http.c:2076: Test failed: HttpQueryInfo failed: 0(12154) http.c:2086: Test failed: HttpQueryInfo failed: 0(12154) http.c:2096: Test failed: HttpQueryInfo failed: 0(12154) http.c:2106: Test failed: HttpQueryInfo failed: 0(12154) http.c:2350: Test failed: HttpQueryInfo failed: 0(12154) http.c:2380: Test failed: HttpQueryInfo failed: 0(12154) http.c:2406: Test failed: HttpQueryInfo failed: 0(12154) http.c:2456: Test failed: HttpQueryInfo failed: 0(12154) http.c:2541: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) === W2K8SE (32 bit http) === http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:1920: Test failed: HttpQueryInfo failed: 0(12154) http.c:1970: Test failed: HttpQueryInfo failed: 0(12154) http.c:2021: Test failed: HttpQueryInfo failed: 0(12154) http.c:2076: Test failed: HttpQueryInfo failed: 0(12154) http.c:2086: Test failed: HttpQueryInfo failed: 0(12154) http.c:2096: Test failed: HttpQueryInfo failed: 0(12154) http.c:2106: Test failed: HttpQueryInfo failed: 0(12154) http.c:2350: Test failed: HttpQueryInfo failed: 0(12154) http.c:2380: Test failed: HttpQueryInfo failed: 0(12154) http.c:2406: Test failed: HttpQueryInfo failed: 0(12154) http.c:2456: Test failed: HttpQueryInfo failed: 0(12154) http.c:2541: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) === W7PRO (32 bit http) === http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:476: Test failed: HttpQueryInfo failed: 0(12154) http.c:1920: Test failed: HttpQueryInfo failed: 0(12154) http.c:1970: Test failed: HttpQueryInfo failed: 0(12154) http.c:2021: Test failed: HttpQueryInfo failed: 0(12154)
Re: wininet/tests: fix a compiler warning on LLVM/Clang
Hi Austin, On 05/14/12 08:19, Austin English wrote: clang -c -I. -I. -I../../../include -I../../../include -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits -Wwrite-strings -fno-omit-frame-pointer -Wpointer-arith -I/usr/include/freetype2-g -O0 -std=gnu89 -o http.o http.c http.c:212:52: warning: use of logical '||' with constant operand [-Wconstant-logical-operand] res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_NUMBER, code, size, index); ^ ~~ http.c:212:52: note: use '|' for a bitwise operation res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_NUMBER, code, size, index); ^~~~ | http.c:218:52: warning: use of logical '||' with constant operand [-Wconstant-logical-operand] res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_REQUEST_HEADERS, code, size, NULL); ^ ~~~ http.c:218:52: note: use '|' for a bitwise operation res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_REQUEST_HEADERS, code, size, NULL); ^ Thanks for the patch. The problem found by those warnings was more serious as we were tested a wrong thing, causing the implementation to be wrong. That said, we need to fix tests and implementation as well. I've sent a patch. Thanks, Jacek
Re: wininet: Fixed typo in tests and accompanying implementation
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.pl?Key=18349 Your paranoid android. === W7PROX64 (64 bit http) === http.c:2853: Test failed: HttpSendRequest failed: 12002
Re: msxml3: avoid a dangling else (LLVM/Clang)
Hello Austin, On 05/14/2012 08:01 AM, Austin English wrote: diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 6805c75..14fd01b 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2277,8 +2277,10 @@ static HRESULT WINAPI domdoc_loadXML( /* skip leading spaces if needed */ if (This-properties-version == MSXML_DEFAULT || This-properties-version == MSXML26) +{ while (*ptr) if (isspaceW(*ptr)) ptr++; else break; I do not mind terse code but that kinda overdoes it. I would put the else on a separate line. +} xmldoc = doparse(This, (char*)ptr, strlenW(ptr)*sizeof(WCHAR), XML_CHAR_ENCODING_UTF16LE); if ( !xmldoc ) bye michael
Re: msxml3: avoid a dangling else (LLVM/Clang)
while (*ptr) if (isspaceW(*ptr)) ptr++; else break; I do not mind terse code but that kinda overdoes it. I would put the else on a separate line. trafic on wine-devel is rather low those days what about opening a code-style flame-war ? A+ -- Eric Pouech
Re: msxml3: avoid a dangling else (LLVM/Clang)
On 05/14/2012 11:47 AM, Eric Pouech wrote: while (*ptr) if (isspaceW(*ptr)) ptr++; else break; I do not mind terse code but that kinda overdoes it. I would put the else on a separate line. trafic on wine-devel is rather low those days what about opening a code-style flame-war ? Heh, no, that wasn't my intend. With the if and else on separate lines it would have been obvious that the curly brackets would be better placed inside the while... bye michael
Re: [1/3] user32/tests: Add GetUserObjectInformation tests
Owen Rudge oru...@codeweavers.com writes: There appears to be a bug in the GetUserObjectInformationA function on Windows that results in an incorrect buffer length being returned when the buffer size provided by the caller is insufficient. The 'A' function returns the Unicode length instead of the ANSI length. These patches modify Wine's behaviour to provide that incorrect behaviour. They also fix an issue whereby the wrong error code is set when the buffer is too short. Using the number of Unicode chars multiplied by 2 is a reasonable upper bound on the A string size, and it's used in a number of places. This can't really be considered a Windows bug. -- Alexandre Julliard julli...@winehq.org
Re: [1/3] user32/tests: Add GetUserObjectInformation tests
On 14/05/2012 11:43, Alexandre Julliard wrote: Using the number of Unicode chars multiplied by 2 is a reasonable upper bound on the A string size, and it's used in a number of places. This can't really be considered a Windows bug. OK; it's perhaps not a bug in that case. I believe my patch is still functionally correct; would you like me to resubmit it to modify/remove the comments referring to it being a 'bug'? Cheers, -- Owen Rudge http://www.owenrudge.net/
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset.
- GdipMeasureString(graphics, string, length, font, rect, format, bounds, 0, 0); + GdipMeasureString(graphics, string, length, font, bounds, format, bounds, 0, 0); You probably shouldn't use the same GpRect* for both parameters there.
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset.
Vincent Povirk madewokh...@gmail.com wrote: - GdipMeasureString(graphics, string, length, font, rect, format, bounds, 0, 0); + GdipMeasureString(graphics, string, length, font, bounds, format, bounds, 0, 0); You probably shouldn't use the same GpRect* for both parameters there. I don't see any problem with that. -- Dmitry.
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset.
+ GdipMeasureString(graphics, string, length, font, bounds, format, bounds, 0, 0); You probably shouldn't use the same GpRect* for both parameters there. I don't see any problem with that. GdipMeasureString modifies the out parameter and reads the in parameter as it goes, and it doesn't account for the possibility that it is modifying its own input rectangle.
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset.
Vincent Povirk madewokh...@gmail.com wrote: + GdipMeasureString(graphics, string, length, font, bounds, format, bounds, 0, 0); You probably shouldn't use the same GpRect* for both parameters there. I don't see any problem with that. GdipMeasureString modifies the out parameter and reads the in parameter as it goes, and it doesn't account for the possibility that it is modifying its own input rectangle. My tests show that it's not a problem, but I can resend of course with that change in order to make it less confusing. -- Dmitry.
Re: [1/3] user32/tests: Add GetUserObjectInformation tests
Owen Rudge o...@owenrudge.net writes: On 14/05/2012 11:43, Alexandre Julliard wrote: Using the number of Unicode chars multiplied by 2 is a reasonable upper bound on the A string size, and it's used in a number of places. This can't really be considered a Windows bug. OK; it's perhaps not a bug in that case. I believe my patch is still functionally correct; would you like me to resubmit it to modify/remove the comments referring to it being a 'bug'? Yes please. -- Alexandre Julliard julli...@winehq.org
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset. Take 2.
If the string wraps, and you don't give the width to GdipMeasureString, won't it return a too small height? On Mon, May 14, 2012 at 9:11 AM, Dmitry Timoshkov dmi...@baikal.ru wrote: GdipMeasureString() clips the string extents to passed rectangle width and height, but that leads to wrong offsety calculation if the string doesn't fit into that rectangle. --- dlls/gdiplus/graphics.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 38335a8..1c9780d 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5162,14 +5162,18 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string /* Should be no need to explicitly test for StringAlignmentNear as * that is default behavior if no alignment is passed. */ if(format-vertalign != StringAlignmentNear){ + static const RectF empty_rect = { 0.0, 0.0, 0.0, 0.0 }; RectF bounds; - GdipMeasureString(graphics, string, length, font, rect, format, bounds, 0, 0); + GdipMeasureString(graphics, string, length, font, empty_rect, format, bounds, 0, 0); + + TRACE(bounds %s\n, debugstr_rectf(bounds)); if(format-vertalign == StringAlignmentCenter) offsety = (rect-Height - bounds.Height) / 2; else if(format-vertalign == StringAlignmentFar) offsety = (rect-Height - bounds.Height); } + TRACE(vertical align %d, offsety %f\n, format-vertalign, offsety); } save_state = SaveDC(hdc); -- 1.7.10.1
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset. Take 2.
Vincent Povirk madewokh...@gmail.com wrote: If the string wraps, and you don't give the width to GdipMeasureString, won't it return a too small height? GdipMeasureString considers an empty rect as a rect without clipping. -- Dmitry.
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset. Take 2.
OK, but if the rect passed to GdipDrawString has a non-zero width, and depending on the string formatting options, GdipDrawString may wrap the text. GdipMeasureString will not wrap the text if you call it with a width of 0. On Mon, May 14, 2012 at 9:37 AM, Dmitry Timoshkov dmi...@baikal.ru wrote: Vincent Povirk madewokh...@gmail.com wrote: If the string wraps, and you don't give the width to GdipMeasureString, won't it return a too small height? GdipMeasureString considers an empty rect as a rect without clipping. -- Dmitry.
Re: ddraw: Forward AddAttachedSurface to the correct equivalent
Am Sonntag, 13. Mai 2012, 20:39:27 schrieb David Adam: +hr = ddraw_surface3_AddAttachedSurface(This- IDirectDrawSurface3_iface, +attachment_impl ? attachment_impl-IDirectDrawSurface3_iface : NULL); It isn't immediately clear to me why Surface3 is correct instead of Surface7. Do you have tests or bug reports to back this up? signature.asc Description: This is a digitally signed message part.
Re: [1/2] gdiplus: Measure the passed in string without clipping in order to compute correct Y offset. Take 2.
Vincent Povirk madewokh...@gmail.com wrote: OK, but if the rect passed to GdipDrawString has a non-zero width, and depending on the string formatting options, GdipDrawString may wrap the text. GdipMeasureString will not wrap the text if you call it with a width of 0. That's a good point, thanks. -- Dmitry.
Re: Using an IDE on Wine?
On 5/13/12 10:00 AM, wine-devel-requ...@winehq.org wrote: How many of you use an Integrated Development Environment (IDE) when working on Wine? If you do, which one do you use and how, how useful is it and how hard was it to set up? I use Qt Creator for Linux for our winelib application. Our app is a hybrid winelib + Qt/X11 app, so we get the extra Qt goodies with Qt Creator. But it does work for other project types too. Getting the integrated gdb debugger to work was a trick. The main thing is to set WINELOADERNOEXEC=1 in the environment and run /usr/bin/wine as the debuggee. We also built and copied in a debug version of /usr/bin/wine to keep Qt Creator from complaining when a debug session got underway. The last gotcha was that we had to hack out alpha channel support for cursors when running under GDB. (IIRC) the DIB engine uses segfaults in normal operation which confuses GDB. I can send along that patch if you are interested. Of course, if you are trying to debug a straight windows application then all of this is irrelevant! But if you are doing winelib, then these tricks can help. -- Michael Ost
Re: wmvcore: Add stub for WMCreateSyncReader
On 5/14/2012 19:34, André Hentschel wrote: Otherwise GTA San Andreas runs into it and crashes. This stub let's it work again. a workaround is to disable wmvcore in winecfg... --- dlls/wmvcore/wmvcore.spec |2 +- dlls/wmvcore/wmvcore_main.c |8 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/wmvcore/wmvcore.spec b/dlls/wmvcore/wmvcore.spec index 1c6cb1f..e0fa2e9 100644 --- a/dlls/wmvcore/wmvcore.spec +++ b/dlls/wmvcore/wmvcore.spec @@ -11,7 +11,7 @@ @ stub WMCreateProfileManager @ stub WMCreateReader @ stub WMCreateReaderPriv -@ stub WMCreateSyncReader +@ stdcall WMCreateSyncReader(ptr long ptr) @ stub WMCreateWriter @ stub WMCreateWriterFileSink @ stub WMCreateWriterNetworkSink diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c index 096328b..5fce972 100644 --- a/dlls/wmvcore/wmvcore_main.c +++ b/dlls/wmvcore/wmvcore_main.c @@ -22,6 +22,7 @@ #include windef.h #include winbase.h +#include objbase.h #include wine/debug.h WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); @@ -43,3 +44,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } + +HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, + IUnknown /* FIXME: IWMSyncReader */ **syncreader) +{ +FIXME((%p, %x, %p): stub\n, pcert, rights, syncreader); +return E_NOTIMPL; +} You'll be probably requested to add a proper .idl for that with interface definition. Also it makes sense to init out parameter to 0, as a common practice for such creation methods/calls.
XINPUT JOYSTICK PATCH
I have written a modification of the xinput1_3 dll that simulates xbox joystick with a logitech rumblepad 2 joystick,also provided is a way to disable dinput joysticks through an environment variable, it seems to work well,may it be of interest to the wine project?
Re: [1/2] gdiplus: Measure the passed in string without height clipping in order to compute correct Y offset. Take 3.
Looks good to me.
Re: XINPUT JOYSTICK PATCH
2012/5/14 Giovanni Ongaro giovanni.nic...@ticino.com: I have written a modification of the xinput1_3 dll that simulates xbox joystick with a logitech rumblepad 2 joystick,also provided is a way to disable dinput joysticks through an environment variable, it seems to work well,may it be of interest to the wine project? You could submit it to the wine-patches list following this guidelines http://wiki.winehq.org/SubmittingPatches, or you can attach it here and request for comments. -- Jaime Andres Rave http://sobrelibertad.blogspot.com/
Re: ddraw: Forward AddAttachedSurface to the correct equivalent
2012/5/14 Stefan Dösinger stefandoesin...@gmx.at: Am Sonntag, 13. Mai 2012, 20:39:27 schrieb David Adam: + hr = ddraw_surface3_AddAttachedSurface(This- IDirectDrawSurface3_iface, + attachment_impl ? attachment_impl-IDirectDrawSurface3_iface : NULL); It isn't immediately clear to me why Surface3 is correct instead of Surface7. Do you have tests or bug reports to back this up? I think it is for http://bugs.winehq.org/show_bug.cgi?id=3467, but probably a test would still help. Also maybe it should be implemented the other way around i.e. surface3_AddAttachedSurface calling into surface4_AddAttachedSurface.
Wine Mono 0.0.4 Release - I'm serious now!
I have published version 0.0.4 of Wine Mono on Sourceforge. I fully intend to make this release a part of Wine. The source tarball is at http://sourceforge.net/projects/wine/files/Wine%20Mono/0.0.4/wine-mono-0.0.4.tar.gz/download The binary is at http://sourceforge.net/projects/wine/files/Wine%20Mono/0.0.4/wine-mono-0.0.4.msi/download For developers, the source repository is at https://github.com/madewokherd/wine-mono Changes since 0.0.2: * With Wine 1.5.4 and Wine Mono 0.0.4, it's now possible to run mixed-mode assemblies. * The random hang that was introduced in Mono 2.11 is now fixed (0.0.2 contained a hacky work-around). * A replacement for XNA 4.0 based on MonoGame is now included, to be used if MS XNA 4.0 is not installed. * Updated Mono from 2.11.0 to 2.11.1, bringing in the changes listed here: http://mono.1490590.n4.nabble.com/Mono-2-11-1-is-out-td4575466.html * Changes from Hans Leidekker to make upgrading and removing the msi work better. * Added more registry keys to prevent native .NET from trying to install while Wine Mono is installed. * Various improvements to the build script. Some programs that worked with the official Mono for Windows package will fail with this one because gluezilla (Mono's web browser component) is missing. In all other respects I expect this to work as well as or better than the official Mono for Windows package, and if not I'd like to hear about it. If nothing new seems to be horribly wrong with this build other than the lack of gluezilla, I will try to make it an official part of Wine. It's not really clear where the bugs should be reported at the moment, but I think Wine bugzilla is appropriate.