winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
783 discussions
Start a n
N
ew thread
André Hentschel : dbghelp: Remove superfluous PATH_MAX defines.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: bfdc93cdc5e03798e484986400bcfd0948db0e03 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bfdc93cdc5e03798e48498640…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Tue Oct 11 19:13:40 2011 +0200 dbghelp: Remove superfluous PATH_MAX defines. --- dlls/dbghelp/coff.c | 4 +--- dlls/dbghelp/dwarf.c | 3 --- dlls/dbghelp/elf_module.c | 3 --- dlls/dbghelp/msc.c | 4 +--- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/dlls/dbghelp/coff.c b/dlls/dbghelp/coff.c index 9fc3ec9..54bd278 100644 --- a/dlls/dbghelp/coff.c +++ b/dlls/dbghelp/coff.c @@ -42,9 +42,7 @@ #ifdef HAVE_UNISTD_H # include <unistd.h> #endif -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH -#endif + #include <stdarg.h> #include "windef.h" #include "winbase.h" diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 20bd080..2a16650 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -39,9 +39,6 @@ # include <unistd.h> #endif #include <stdio.h> -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH -#endif #include <assert.h> #include <stdarg.h> diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 969e8c0..e4c6e44 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -42,9 +42,6 @@ #ifdef HAVE_UNISTD_H # include <unistd.h> #endif -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH -#endif #include "dbghelp_private.h" diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 9f9a53e..53bf6bf 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -45,9 +45,7 @@ #ifdef HAVE_UNISTD_H # include <unistd.h> #endif -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH -#endif + #include <stdarg.h> #include "windef.h" #include "winbase.h"
1
0
0
0
Frédéric Delanoy : cmd/tests: Add MOVE tests.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 212949f1086c2f492b98fad7770d33ab7f3a4661 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=212949f1086c2f492b98fad77…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Oct 11 19:04:31 2011 +0200 cmd/tests: Add MOVE tests. --- programs/cmd/tests/test_builtins.cmd | 70 ++++++++++++++++++++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 15 ++++++ 2 files changed, 85 insertions(+), 0 deletions(-) diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 35ab181..49e3fde 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -909,6 +909,76 @@ if not exist baz\abc ( ) cd .. & rd /s/q foobar +echo ------------ Testing move ------------ +mkdir foobar & cd foobar +echo ... file move ... +echo >foo +move foo bar > nul 2>&1 +if not exist foo ( + if exist bar ( + echo file move succeeded + ) +) +echo bar>bar +echo baz> baz +move /Y bar baz > nul 2>&1 +if not exist bar ( + if exist baz ( + echo file move with overwrite succeeded + ) +) else ( + echo file overwrite impossible! + del bar +) +type baz + +mkdir rep +move baz rep > nul 2>&1 +if not exist baz ( + if exist rep\baz ( + echo file moved in subdirectory + ) +) +call :setError 0 +move rep\baz . > nul 2>&1 +move /Y baz baz > nul 2>&1 +if errorlevel 1 ( + echo moving a file to itself should be a no-op! +) else ( + echo moving a file to itself is a no-op +) +echo ErrorLevel: %ErrorLevel% +call :setError 0 +del baz +echo ... directory move ... +mkdir foo\bar +mkdir baz +echo baz2>baz\baz2 +move baz foo\bar > nul 2>&1 +if not exist baz ( + if exist foo\bar\baz\baz2 ( + echo simple directory move succeeded + ) +) +call :setError 0 +mkdir baz +move baz baz > nul 2>&1 +echo moving a directory to itself gives error; errlevel %ErrorLevel% +echo ...... dir in dir move ...... +rd /s/q foo +mkdir foo bar +echo foo2>foo\foo2 +echo bar2>bar\bar2 +move foo bar > nul 2>&1 +if not exist foo ( + if exist bar ( + dir /b /ad bar + dir /b /a-d bar + dir /b bar\foo + ) +) +cd .. & rd /s/q foobar + echo ------------ Testing mkdir ------------ call :setError 0 echo ... md and mkdir are synonymous ... diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 31b1780..33a8113 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -604,6 +604,21 @@ bar ... rename in other directory ... @todo_wine@rename impossible in other directory @todo_wine@original file still present +------------ Testing move ------------ +... file move ... +file move succeeded +@todo_wine@file move with overwrite succeeded@or_broken@file overwrite impossible! +@todo_wine@bar@or_broken@baz +file moved in subdirectory +@todo_wine@moving a file to itself is a no-op@or_broken@moving a file to itself should be a no-op! +@todo_wine@ErrorLevel: 0@or_broken@ErrorLevel: 1 +... directory move ... +simple directory move succeeded +moving a directory to itself gives error; errlevel 1 +...... dir in dir move ...... +foo +bar2 +foo2 ------------ Testing mkdir ------------ ... md and mkdir are synonymous ... 0
1
0
0
0
Henri Verbeet : wined3d: Make the device parameter to wined3d_device_get_software_vertex_processing () const.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 652d80d9d859a0261d45862761cb2904384cad60 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=652d80d9d859a0261d4586276…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 11 17:24:55 2011 +0200 wined3d: Make the device parameter to wined3d_device_get_software_vertex_processing() const. --- dlls/wined3d/device.c | 2 +- include/wine/wined3d.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6e8eb2d..ec9126f 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4553,7 +4553,7 @@ HRESULT CDECL wined3d_device_set_software_vertex_processing(struct wined3d_devic return WINED3D_OK; } -BOOL CDECL wined3d_device_get_software_vertex_processing(struct wined3d_device *device) +BOOL CDECL wined3d_device_get_software_vertex_processing(const struct wined3d_device *device) { static BOOL warned; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 3dec8ba..c6949bd 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2243,7 +2243,7 @@ HRESULT __cdecl wined3d_device_get_render_target(struct wined3d_device *device, HRESULT __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *device, UINT sampler_idx, WINED3DSAMPLERSTATETYPE state, DWORD *value); HRESULT __cdecl wined3d_device_get_scissor_rect(const struct wined3d_device *device, RECT *rect); -BOOL __cdecl wined3d_device_get_software_vertex_processing(struct wined3d_device *device); +BOOL __cdecl wined3d_device_get_software_vertex_processing(const struct wined3d_device *device); HRESULT __cdecl wined3d_device_get_stream_source(const struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride); HRESULT __cdecl wined3d_device_get_stream_source_freq(const struct wined3d_device *device,
1
0
0
0
Henri Verbeet : wined3d: Make the device parameter to wined3d_device_validate_device() const.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: dd2378cbf2002c00e5450f38a44f3a059c9a8295 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd2378cbf2002c00e5450f38a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 11 17:24:54 2011 +0200 wined3d: Make the device parameter to wined3d_device_validate_device() const. --- dlls/wined3d/device.c | 2 +- include/wine/wined3d.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 862f1f6..6e8eb2d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4473,7 +4473,7 @@ HRESULT CDECL wined3d_device_get_front_buffer_data(const struct wined3d_device * return hr; } -HRESULT CDECL wined3d_device_validate_device(struct wined3d_device *device, DWORD *num_passes) +HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes) { const struct wined3d_state *state = &device->stateBlock->state; struct wined3d_texture *texture; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index d8658de..3dec8ba 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2346,7 +2346,7 @@ HRESULT __cdecl wined3d_device_update_surface(struct wined3d_device *device, str const RECT *src_rect, struct wined3d_surface *dst_surface, const POINT *dst_point); HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device, struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture); -HRESULT __cdecl wined3d_device_validate_device(struct wined3d_device *device, DWORD *num_passes); +HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes); HRESULT __cdecl wined3d_palette_create(struct wined3d_device *device, DWORD flags, const PALETTEENTRY *entries, void *parent, struct wined3d_palette **palette);
1
0
0
0
Henri Verbeet : wined3d: Make the device parameter to wined3d_device_get_front_buffer_data() const.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 229662fc4651a6b153a29aa0f0b845c7cbea80e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=229662fc4651a6b153a29aa0f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 11 17:24:53 2011 +0200 wined3d: Make the device parameter to wined3d_device_get_front_buffer_data() const. --- dlls/wined3d/device.c | 2 +- include/wine/wined3d.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index bbf43b3..862f1f6 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4456,7 +4456,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, return WINED3D_OK; } -HRESULT CDECL wined3d_device_get_front_buffer_data(struct wined3d_device *device, +HRESULT CDECL wined3d_device_get_front_buffer_data(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_surface *dst_surface) { struct wined3d_swapchain *swapchain; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index b0b63fd..d8658de 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2216,7 +2216,7 @@ HRESULT __cdecl wined3d_device_get_depth_stencil(struct wined3d_device *device, HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps); HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx, WINED3DDISPLAYMODE *mode); -HRESULT __cdecl wined3d_device_get_front_buffer_data(struct wined3d_device *device, +HRESULT __cdecl wined3d_device_get_front_buffer_data(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_surface *dst_surface); void __cdecl wined3d_device_get_gamma_ramp(struct wined3d_device *device, UINT swapchain_idx, WINED3DGAMMARAMP *ramp); HRESULT __cdecl wined3d_device_get_index_buffer(const struct wined3d_device *device,
1
0
0
0
Henri Verbeet : gameux/tests: Run the game explorer tests in a multithreaded apartment as well.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 7679d96c86176d43d85ef303e19cdb6a50355e5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7679d96c86176d43d85ef303e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 11 17:24:52 2011 +0200 gameux/tests: Run the game explorer tests in a multithreaded apartment as well. --- dlls/gameux/tests/gameexplorer.c | 38 +++++++++++++++++++++++++------------- 1 files changed, 25 insertions(+), 13 deletions(-) diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index 7be9c69..462fb8f 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -656,30 +656,42 @@ static void test_install_uninstall_game(void) } } -START_TEST(gameexplorer) +static void run_tests(void) { - HRESULT r; BOOL gameExplorerAvailable = FALSE; BOOL gameExplorer2Available = FALSE; + test_create(&gameExplorerAvailable, &gameExplorer2Available); + + if(gameExplorerAvailable) + test_add_remove_game(); + + if(gameExplorer2Available) + test_install_uninstall_game(); +} + +START_TEST(gameexplorer) +{ if(_loadDynamicRoutines()) { - r = CoInitialize( NULL ); - ok( r == S_OK, "failed to init COM\n"); - - test_create(&gameExplorerAvailable, &gameExplorer2Available); + HRESULT hr; - if(gameExplorerAvailable) - test_add_remove_game(); + hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr); + trace("Running apartment threaded tests.\n"); + run_tests(); + if(SUCCEEDED(hr)) + CoUninitialize(); - if(gameExplorer2Available) - test_install_uninstall_game(); + hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); + ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr); + trace("Running multithreaded tests.\n"); + run_tests(); + if(SUCCEEDED(hr)) + CoUninitialize(); } else /* this is not a failure, because both procedures loaded by address * are always available on systems which has gameux.dll */ win_skip("too old system, cannot load required dynamic procedures\n"); - - - CoUninitialize(); }
1
0
0
0
Henri Verbeet : gameux: Parse GDFs in a separate thread.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 95ede76673df1dafb3e716a4617c57922907694c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=95ede76673df1dafb3e716a46…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 11 17:24:51 2011 +0200 gameux: Parse GDFs in a separate thread. The res protocol handler dislikes running from a multithreaded apartment. --- dlls/gameux/gameexplorer.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 40 insertions(+), 3 deletions(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index 322dd7a..c6935c9 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -387,6 +387,13 @@ static HRESULT GAMEUX_ParseGameDefinition( return hr; } + +struct parse_gdf_thread_param +{ + struct GAMEUX_GAME_DATA *GameData; + HRESULT hr; +}; + /******************************************************************************* * GAMEUX_ParseGDFBinary * @@ -399,8 +406,10 @@ static HRESULT GAMEUX_ParseGameDefinition( * GDF will be stored in other fields of this * structure. */ -static HRESULT GAMEUX_ParseGDFBinary(struct GAMEUX_GAME_DATA *GameData) +static DWORD WINAPI GAMEUX_ParseGDFBinary(void *thread_param) { + struct parse_gdf_thread_param *ctx = thread_param; + struct GAMEUX_GAME_DATA *GameData = ctx->GameData; static const WCHAR sRes[] = {'r','e','s',':','/','/',0}; static const WCHAR sDATA[] = {'D','A','T','A',0}; static const WCHAR sSlash[] = {'/',0}; @@ -423,6 +432,8 @@ static HRESULT GAMEUX_ParseGDFBinary(struct GAMEUX_GAME_DATA *GameData) lstrcatW(sResourcePath, sSlash); lstrcatW(sResourcePath, ID_GDF_XML_STR); + CoInitialize(NULL); + hr = CoCreateInstance(&CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (void**)&document); @@ -474,8 +485,11 @@ static HRESULT GAMEUX_ParseGDFBinary(struct GAMEUX_GAME_DATA *GameData) IXMLDOMDocument_Release(document); } - return hr; + CoUninitialize(); + ctx->hr = hr; + return 0; } + /******************************************************************* * GAMEUX_RemoveRegistryRecord * @@ -548,12 +562,35 @@ static HRESULT GAMEUX_RegisterGame(LPCWSTR sGDFBinaryPath, /* load data from GDF binary */ if(SUCCEEDED(hr)) - hr = GAMEUX_ParseGDFBinary(&GameData); + { + struct parse_gdf_thread_param thread_param; + HANDLE thread; + HRESULT hr; + DWORD ret; + + thread_param.GameData = &GameData; + if(!(thread = CreateThread(NULL, 0, GAMEUX_ParseGDFBinary, &thread_param, 0, &ret))) + { + ERR("Failed to create thread.\n"); + hr = E_FAIL; + goto done; + } + ret = WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); + if(ret != WAIT_OBJECT_0) + { + ERR("Wait failed (%#x).\n", ret); + hr = E_FAIL; + goto done; + } + hr = thread_param.hr; + } /* save data to registry */ if(SUCCEEDED(hr)) hr = GAMEUX_WriteRegistryRecord(&GameData); +done: GAMEUX_uninitGameData(&GameData); TRACE("returning 0x%08x\n", hr); return hr;
1
0
0
0
Huw Davies : gdi32: The text extents functions fail if passed a negative count.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 5bd304bd0e78a0ea8cd37cedb0b1ed39683f4509 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bd304bd0e78a0ea8cd37cedb…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Oct 11 15:46:19 2011 +0100 gdi32: The text extents functions fail if passed a negative count. --- dlls/gdi32/font.c | 37 ++++++++++++++++++++++++++----------- dlls/gdi32/tests/font.c | 9 +++++++++ 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 6f5e479..263d064 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -920,9 +920,14 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count, { BOOL ret = FALSE; INT wlen; - LPWSTR p = FONT_mbtowc(hdc, str, count, &wlen, NULL); + LPWSTR p; + + if (count < 0) return FALSE; - if (p) { + p = FONT_mbtowc(hdc, str, count, &wlen, NULL); + + if (p) + { ret = GetTextExtentPoint32W( hdc, p, wlen, size ); HeapFree( GetProcessHeap(), 0, p ); } @@ -975,10 +980,15 @@ BOOL WINAPI GetTextExtentExPointI( HDC hdc, const WORD *indices, INT count, INT LPINT nfit, LPINT dxs, LPSIZE size ) { BOOL ret = FALSE; - DC * dc = get_dc_ptr( hdc ); + DC *dc; + + if (count < 0) return FALSE; + + dc = get_dc_ptr( hdc ); if (!dc) return FALSE; - if(dc->gdiFont) { + if(dc->gdiFont) + { ret = WineEngGetTextExtentExPointI(dc->gdiFont, indices, count, max_ext, nfit, dxs, size); size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx)); size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy)); @@ -1051,11 +1061,15 @@ BOOL WINAPI GetTextExtentExPointA( HDC hdc, LPCSTR str, INT count, INT wlen; INT *walpDx = NULL; LPWSTR p = NULL; - - if (alpDx && - NULL == (walpDx = HeapAlloc(GetProcessHeap(), 0, count * sizeof(INT)))) - return FALSE; - + + if (count < 0) return FALSE; + + if (alpDx) + { + walpDx = HeapAlloc( GetProcessHeap(), 0, count * sizeof(INT) ); + if (!walpDx) return FALSE; + } + p = FONT_mbtowc(hdc, str, count, &wlen, NULL); ret = GetTextExtentExPointW( hdc, p, wlen, maxExt, lpnFit, walpDx, size); if (walpDx) @@ -1118,9 +1132,10 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, TRACE("(%p, %s, %d)\n",hdc,debugstr_wn(str,count),maxExt); + if (count < 0) return FALSE; + dc = get_dc_ptr(hdc); - if (! dc) - return FALSE; + if (!dc) return FALSE; GetTextMetricsW(hdc, &tm); diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 097a6c3..f127743 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1054,6 +1054,7 @@ static void test_text_extents(void) HFONT hfont; SIZE sz; SIZE sz1, sz2; + BOOL ret; memset(&lf, 0, sizeof(lf)); strcpy(lf.lfFaceName, "Arial"); @@ -1110,6 +1111,14 @@ static void test_text_extents(void) "GetTextExtentExPointW with lpnFit and alpDx both NULL returns incorrect results\n"); HeapFree(GetProcessHeap(), 0, extents); + /* extents functions fail with -ve counts (the interesting case being -1) */ + ret = GetTextExtentPointA(hdc, "o", -1, &sz); + ok(ret == FALSE, "got %d\n", ret); + ret = GetTextExtentExPointA(hdc, "o", -1, 0, NULL, NULL, &sz); + ok(ret == FALSE, "got %d\n", ret); + ret = GetTextExtentExPointW(hdc, wt, -1, 0, NULL, NULL, &sz1); + ok(ret == FALSE, "got %d\n", ret); + hfont = SelectObject(hdc, hfont); DeleteObject(hfont); ReleaseDC(NULL, hdc);
1
0
0
0
Jacek Caban : vbscript: Added Hex function tests.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 2b1c639feed78e6c6a9349143e70eecb96aca352 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b1c639feed78e6c6a9349143…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 11 14:59:45 2011 +0200 vbscript: Added Hex function tests. --- dlls/vbscript/tests/api.vbs | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs index 3b92803..d5653ab 100644 --- a/dlls/vbscript/tests/api.vbs +++ b/dlls/vbscript/tests/api.vbs @@ -34,4 +34,20 @@ Call ok(not isObject(Null), "isObject(Null) is true?") Call ok(getVT(err) = "VT_DISPATCH", "getVT(err) = " & getVT(err)) +Sub TestHex(x, ex) + Call ok(hex(x) = ex, "hex(" & x & ") = " & hex(x) & " expected " & ex) +End Sub + +TestHex 0, "0" +TestHex 6, "6" +TestHex 16, "10" +TestHex &hdeadbeef&, "DEADBEEF" +TestHex -1, "FFFF" +TestHex -16, "FFF0" +TestHex -934859845, "C8472BBB" +TestHex empty, "0" + +Call ok(getVT(hex(null)) = "VT_NULL", "getVT(hex(null)) = " & getVT(hex(null))) +Call ok(getVT(hex(empty)) = "VT_BSTR", "getVT(hex(empty)) = " & getVT(hex(empty))) + Call reportSuccess()
1
0
0
0
Jacek Caban : vbscript: Added Hex function implementation.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 39e4ef4e1e21e9f2b36b3a1bac0ab3102089991f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39e4ef4e1e21e9f2b36b3a1ba…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 11 14:59:32 2011 +0200 vbscript: Added Hex function implementation. --- dlls/vbscript/global.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 59 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 771236d..dad20b9 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -57,6 +57,22 @@ static IInternetHostSecurityManager *get_sec_mgr(script_ctx_t *ctx) return ctx->secmgr = secmgr; } +static HRESULT return_bstr(VARIANT *res, const WCHAR *str) +{ + BSTR ret; + + if(!res) + return S_OK; + + ret = SysAllocString(str); + if(!ret) + return E_OUTOFMEMORY; + + V_VT(res) = VT_BSTR; + V_BSTR(res) = ret; + return S_OK; +} + static IUnknown *create_object(script_ctx_t *ctx, const WCHAR *progid) { IInternetHostSecurityManager *secmgr = NULL; @@ -193,10 +209,51 @@ static HRESULT Global_CStr(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI return E_NOTIMPL; } +static inline WCHAR hex_char(unsigned n) +{ + return n < 10 ? '0'+n : 'A'+n-10; +} + static HRESULT Global_Hex(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) { - FIXME("\n"); - return E_NOTIMPL; + WCHAR buf[17], *ptr; + DWORD n; + + TRACE("%s\n", debugstr_variant(arg)); + + switch(V_VT(arg)) { + case VT_I2: + n = (WORD)V_I2(arg); + break; + case VT_I4: + n = V_I4(arg); + break; + case VT_EMPTY: + n = 0; + break; + case VT_NULL: + if(res) + V_VT(res) = VT_NULL; + return S_OK; + default: + FIXME("unsupported type %s\n", debugstr_variant(arg)); + return E_NOTIMPL; + } + + buf[16] = 0; + ptr = buf+15; + + if(n) { + do { + *ptr-- = hex_char(n & 0xf); + n >>= 4; + }while(n); + ptr++; + }else { + *ptr = '0'; + } + + return return_bstr(res, ptr); } static HRESULT Global_Oct(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
79
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Results per page:
10
25
50
100
200