winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
828 discussions
Start a n
N
ew thread
Piotr Caban : msvcp: Sync spec files and implementations.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: d28174b765e72304a0945ac18ee7d2c34b902818 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d28174b765e72304a0945ac18…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Sep 13 14:34:26 2012 +0200 msvcp: Sync spec files and implementations. --- dlls/msvcp100/ios.c | 59 +++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp100/msvcp100.spec | 6 ++-- dlls/msvcp70/msvcp70.spec | 6 ++-- dlls/msvcp71/msvcp71.spec | 6 ++-- dlls/msvcp80/msvcp80.spec | 6 ++-- 5 files changed, 71 insertions(+), 12 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d28174b765e72304a0945…
1
0
0
0
Piotr Caban : msvcp90: Added ios_base flags manipulators implementation.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: 905752e0f4363acff031a2d503bc6def8b033683 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=905752e0f4363acff031a2d50…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Sep 13 14:34:02 2012 +0200 msvcp90: Added ios_base flags manipulators implementation. --- dlls/msvcp90/ios.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 6 ++-- 2 files changed, 62 insertions(+), 3 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 39e9a9f..1816884 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -50,6 +50,11 @@ typedef struct { streamsize arg; } manip_streamsize; +typedef struct { + void (__cdecl *pfunc)(ios_base*, int); + int arg; +} manip_int; + typedef enum { INITFL_new = 0, INITFL_open = 1, @@ -12877,6 +12882,60 @@ manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width) return ret; } +static void __cdecl resetioflags_func(ios_base *base, int mask) +{ + ios_base_setf_mask(base, 0, mask); +} + +/* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */ +manip_int* __cdecl resetiosflags(manip_int *ret, int mask) +{ + TRACE("(%p %d)\n", ret, mask); + + ret->pfunc = resetioflags_func; + ret->arg = mask; + return ret; +} + +static void __cdecl setiosflags_func(ios_base *base, int mask) +{ + ios_base_setf_mask(base, FMTFLAG_mask, mask); +} + +/* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */ +manip_int* __cdecl setiosflags(manip_int *ret, int mask) +{ + TRACE("(%p %d)\n", ret, mask); + + ret->pfunc = setiosflags_func; + ret->arg = mask; + return ret; +} + +static void __cdecl setbase_func(ios_base *base, int set_base) +{ + if(set_base == 10) + set_base = FMTFLAG_dec; + else if(set_base == 8) + set_base = FMTFLAG_oct; + else if(set_base == 16) + set_base = FMTFLAG_hex; + else + set_base = 0; + + ios_base_setf_mask(base, set_base, FMTFLAG_basefield); +} + +/* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */ +manip_int* __cdecl setbase(manip_int *ret, int base) +{ + TRACE("(%p %d)\n", ret, base); + + ret->pfunc = setbase_func; + ret->arg = base; + return ret; +} + static basic_filebuf_char filebuf_char_stdin; /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */ struct { diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index b70fd27..576541c 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5173,7 +5173,7 @@ @ cdecl -arch=win64 ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z(ptr long) MSVCP_basic_string_wchar_reserve @ thiscall -arch=win32 ?reserve@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI@Z(ptr long) MSVCP_basic_string_wchar_reserve @ cdecl -arch=win64 ?reserve@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K@Z(ptr long) MSVCP_basic_string_wchar_reserve -@ stub ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z +@ cdecl ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z(ptr long) resetiosflags @ thiscall -arch=win32 ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z(ptr long) MSVCP_basic_string_char_resize @ cdecl -arch=win64 ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z(ptr long) MSVCP_basic_string_char_resize @ thiscall -arch=win32 ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z(ptr long long) MSVCP_basic_string_char_resize_ch @@ -5312,7 +5312,7 @@ @ cdecl -arch=win64 ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z(ptr ptr ptr long) strstreambuf_seekpos @ cdecl ?set_new_handler@std@@YAP6AXXZH@Z(long) set_new_handler_reset @ cdecl ?set_new_handler@std@@YAP6AXXZP6AXXZ@Z(ptr) set_new_handler -@ stub ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z +@ cdecl ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z(ptr long) setbase @ thiscall -arch=win32 ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z(ptr ptr long) basic_filebuf_char_setbuf @ cdecl -arch=win64 ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z(ptr ptr long) basic_filebuf_char_setbuf @ thiscall -arch=win32 ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z(ptr ptr long) basic_filebuf_char_setbuf @@ -5335,7 +5335,7 @@ @ cdecl -arch=win64 ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z(ptr ptr ptr ptr) basic_streambuf_wchar_setg @ thiscall -arch=win32 ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z(ptr ptr ptr ptr) basic_streambuf_wchar_setg @ cdecl -arch=win64 ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z(ptr ptr ptr ptr) basic_streambuf_wchar_setg -@ stub ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z +@ cdecl ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z(ptr long) setiosflags @ thiscall -arch=win32 ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z(ptr ptr ptr ptr) basic_streambuf_char_setp_next @ cdecl -arch=win64 ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z(ptr ptr ptr ptr) basic_streambuf_char_setp_next @ thiscall -arch=win32 ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z(ptr ptr ptr) basic_streambuf_char_setp
1
0
0
0
Dmitry Timoshkov : windowscodecs: Create Graphic Control Extension metadata block for a GIF frame.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: 664f1c477060e417ea5706391135507f652f98b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=664f1c477060e417ea5706391…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Sep 13 10:27:03 2012 +0900 windowscodecs: Create Graphic Control Extension metadata block for a GIF frame. --- dlls/windowscodecs/gifformat.c | 70 +++++++++++++++++++++++++++++++++- dlls/windowscodecs/tests/metadata.c | 2 - 2 files changed, 67 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 62bdc6f..4414f36 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -646,14 +646,30 @@ static HRESULT WINAPI GifFrameDecode_Block_GetContainerFormat(IWICMetadataBlockR return S_OK; } +static const void *get_GCE_data(GifFrameDecode *This) +{ + int i; + + for (i = 0; i < This->frame->ExtensionBlockCount; i++) + { + if (This->frame->ExtensionBlocks[i].Function == GRAPHICS_EXT_FUNC_CODE && + This->frame->ExtensionBlocks[i].ByteCount == 4) + return This->frame->ExtensionBlocks[i].Bytes; + } + return NULL; +} + static HRESULT WINAPI GifFrameDecode_Block_GetCount(IWICMetadataBlockReader *iface, UINT *count) { + GifFrameDecode *This = frame_from_IWICMetadataBlockReader(iface); + TRACE("%p,%p\n", iface, count); if (!count) return E_INVALIDARG; *count = 1; + if (get_GCE_data(This)) *count += 1; return S_OK; } @@ -705,16 +721,64 @@ static HRESULT create_IMD_metadata_reader(GifFrameDecode *This, IWICMetadataRead return S_OK; } +static HRESULT create_GCE_metadata_reader(const void *GCE_data, IWICMetadataReader **reader) +{ + HRESULT hr; + IWICMetadataReader *metadata_reader; + IWICPersistStream *persist; + IStream *stream; + + /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ + + hr = CoCreateInstance(&CLSID_WICGCEMetadataReader, 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(GCE_data, 4); + IWICPersistStream_LoadEx(persist, stream, NULL, WICPersistOptionsDefault); + IStream_Release(stream); + + IWICPersistStream_Release(persist); + + *reader = metadata_reader; + return S_OK; +} + static HRESULT WINAPI GifFrameDecode_Block_GetReaderByIndex(IWICMetadataBlockReader *iface, UINT index, IWICMetadataReader **reader) { GifFrameDecode *This = frame_from_IWICMetadataBlockReader(iface); + UINT block_count = 1; + const void *GCE_data; TRACE("(%p,%u,%p)\n", iface, index, reader); - if (!reader || index != 0) return E_INVALIDARG; - - return create_IMD_metadata_reader(This, reader); + GCE_data = get_GCE_data(This); + if (GCE_data) block_count++; + /* FIXME: add support for Application Extension metadata block + APE_data = get_APE_data(This); + if (APE_data) block_count++; + */ + if (!reader || index >= block_count) return E_INVALIDARG; + + if (index == 0) + return create_IMD_metadata_reader(This, reader); + + if (index == 1 && GCE_data) + return create_GCE_metadata_reader(GCE_data, reader); + + /* FIXME: add support for Application Extension metadata block + if (APE_data) + return create_APE_metadata_reader(APE_data, reader); + */ + return E_INVALIDARG; } static HRESULT WINAPI GifFrameDecode_Block_GetEnumerator(IWICMetadataBlockReader *iface, diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 39c5144..11db5cb 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1206,7 +1206,6 @@ static void test_metadata_gif(void) hr = IWICMetadataBlockReader_GetCount(blockreader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); -todo_wine ok(count == 2, "expected 2, got %u\n", count); hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &reader); @@ -1228,7 +1227,6 @@ todo_wine } hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &reader); -todo_wine ok(hr == S_OK, "GetReaderByIndex error %#x\n", hr); if (SUCCEEDED(hr))
1
0
0
0
Dmitry Timoshkov : windowscodecs: Create Image Descriptor metadata block for a GIF frame.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: 003c20467c355a3b251c685252456d2991faa412 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=003c20467c355a3b251c68525…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Sep 13 10:26:04 2012 +0900 windowscodecs: Create Image Descriptor metadata block for a GIF frame. --- dlls/windowscodecs/gifformat.c | 164 +++++++++++++++++++++++++++++++---- dlls/windowscodecs/tests/metadata.c | 4 +- 2 files changed, 150 insertions(+), 18 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 66c56a8..62bdc6f 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -149,25 +149,27 @@ HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) return MetadataReader_Create(&LSDReader_Vtbl, pUnkOuter, iid, ppv); } +#include "pshpack1.h" +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; + */ +}; +#include "poppack.h" + static HRESULT load_IMD_metadata(IStream *stream, const GUID *vendor, DWORD options, MetadataItem **items, DWORD *count) { -#include "pshpack1.h" - 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; -#include "poppack.h" + struct image_descriptor imd_data; HRESULT hr; ULONG bytesread, i; MetadataItem *result; @@ -353,6 +355,7 @@ typedef struct { typedef struct { IWICBitmapFrameDecode IWICBitmapFrameDecode_iface; + IWICMetadataBlockReader IWICMetadataBlockReader_iface; LONG ref; SavedImage *frame; GifDecoder *parent; @@ -373,6 +376,11 @@ static inline GifFrameDecode *impl_from_IWICBitmapFrameDecode(IWICBitmapFrameDec return CONTAINING_RECORD(iface, GifFrameDecode, IWICBitmapFrameDecode_iface); } +static inline GifFrameDecode *frame_from_IWICMetadataBlockReader(IWICMetadataBlockReader *iface) +{ + return CONTAINING_RECORD(iface, GifFrameDecode, IWICMetadataBlockReader_iface); +} + static HRESULT WINAPI GifFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface, REFIID iid, void **ppv) { @@ -387,6 +395,10 @@ static HRESULT WINAPI GifFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface { *ppv = &This->IWICBitmapFrameDecode_iface; } + else if (IsEqualIID(&IID_IWICMetadataBlockReader, iid)) + { + *ppv = &This->IWICMetadataBlockReader_iface; + } else { *ppv = NULL; @@ -604,6 +616,125 @@ static const IWICBitmapFrameDecodeVtbl GifFrameDecode_Vtbl = { GifFrameDecode_GetThumbnail }; +static HRESULT WINAPI GifFrameDecode_Block_QueryInterface(IWICMetadataBlockReader *iface, + REFIID iid, void **ppv) +{ + GifFrameDecode *This = frame_from_IWICMetadataBlockReader(iface); + return IWICBitmapFrameDecode_QueryInterface(&This->IWICBitmapFrameDecode_iface, iid, ppv); +} + +static ULONG WINAPI GifFrameDecode_Block_AddRef(IWICMetadataBlockReader *iface) +{ + GifFrameDecode *This = frame_from_IWICMetadataBlockReader(iface); + return IWICBitmapFrameDecode_AddRef(&This->IWICBitmapFrameDecode_iface); +} + +static ULONG WINAPI GifFrameDecode_Block_Release(IWICMetadataBlockReader *iface) +{ + GifFrameDecode *This = frame_from_IWICMetadataBlockReader(iface); + return IWICBitmapFrameDecode_Release(&This->IWICBitmapFrameDecode_iface); +} + +static HRESULT WINAPI GifFrameDecode_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 GifFrameDecode_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_IMD_metadata_reader(GifFrameDecode *This, IWICMetadataReader **reader) +{ + HRESULT hr; + IWICMetadataReader *metadata_reader; + IWICPersistStream *persist; + IStream *stream; + struct image_descriptor IMD_data; + + /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ + + hr = CoCreateInstance(&CLSID_WICIMDMetadataReader, 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; + } + + /* recreate IMD structure from GIF decoder data */ + IMD_data.left = This->frame->ImageDesc.Left; + IMD_data.top = This->frame->ImageDesc.Top; + IMD_data.width = This->frame->ImageDesc.Width; + IMD_data.height = This->frame->ImageDesc.Height; + IMD_data.packed = 0; + /* interlace_flag */ + IMD_data.packed |= This->frame->ImageDesc.Interlace ? (1 << 6) : 0; + if (This->frame->ImageDesc.ColorMap) + { + /* local_color_table_flag */ + IMD_data.packed |= 1 << 7; + /* local_color_table_size */ + IMD_data.packed |= This->frame->ImageDesc.ColorMap->BitsPerPixel; + /* FIXME: sort_flag */ + } + + stream = create_stream(&IMD_data, sizeof(IMD_data)); + IWICPersistStream_LoadEx(persist, stream, NULL, WICPersistOptionsDefault); + IStream_Release(stream); + + IWICPersistStream_Release(persist); + + *reader = metadata_reader; + return S_OK; +} + +static HRESULT WINAPI GifFrameDecode_Block_GetReaderByIndex(IWICMetadataBlockReader *iface, + UINT index, IWICMetadataReader **reader) +{ + GifFrameDecode *This = frame_from_IWICMetadataBlockReader(iface); + + TRACE("(%p,%u,%p)\n", iface, index, reader); + + if (!reader || index != 0) return E_INVALIDARG; + + return create_IMD_metadata_reader(This, reader); +} + +static HRESULT WINAPI GifFrameDecode_Block_GetEnumerator(IWICMetadataBlockReader *iface, + IEnumUnknown **enumerator) +{ + FIXME("(%p,%p): stub\n", iface, enumerator); + return E_NOTIMPL; +} + +static const IWICMetadataBlockReaderVtbl GifFrameDecode_BlockVtbl = +{ + GifFrameDecode_Block_QueryInterface, + GifFrameDecode_Block_AddRef, + GifFrameDecode_Block_Release, + GifFrameDecode_Block_GetContainerFormat, + GifFrameDecode_Block_GetCount, + GifFrameDecode_Block_GetReaderByIndex, + GifFrameDecode_Block_GetEnumerator +}; + static HRESULT WINAPI GifDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID iid, void **ppv) { @@ -824,6 +955,7 @@ static HRESULT WINAPI GifDecoder_GetFrame(IWICBitmapDecoder *iface, if (!result) return E_OUTOFMEMORY; result->IWICBitmapFrameDecode_iface.lpVtbl = &GifFrameDecode_Vtbl; + result->IWICMetadataBlockReader_iface.lpVtbl = &GifFrameDecode_BlockVtbl; result->ref = 1; result->frame = &This->gif->SavedImages[index]; IWICBitmapDecoder_AddRef(iface); diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 6bdecee..39c5144 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1088,7 +1088,6 @@ static void test_metadata_gif(void) ok(hr == S_OK, "GetFrame error %#x\n", hr); hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&blockreader); -todo_wine ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* before Win7 */, "QueryInterface error %#x\n", hr); if (SUCCEEDED(hr)) @@ -1190,7 +1189,6 @@ todo_wine ok(hr == S_OK, "GetFrame error %#x\n", hr); hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (void **)&blockreader); -todo_wine ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* before Win7 */, "QueryInterface error %#x\n", hr); if (SUCCEEDED(hr)) @@ -1208,6 +1206,7 @@ todo_wine hr = IWICMetadataBlockReader_GetCount(blockreader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); +todo_wine ok(count == 2, "expected 2, got %u\n", count); hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &reader); @@ -1229,6 +1228,7 @@ todo_wine } hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &reader); +todo_wine ok(hr == S_OK, "GetReaderByIndex error %#x\n", hr); if (SUCCEEDED(hr))
1
0
0
0
James Eder : ntdll/tests: Add test for ProcessorInformation case of NtPowerInformation.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: fbd5a9aaffbf738db2aaeaba0f78db3f72a1ddce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fbd5a9aaffbf738db2aaeaba0…
Author: James Eder <jimportal(a)gmail.com> Date: Wed Sep 12 13:16:31 2012 -0600 ntdll/tests: Add test for ProcessorInformation case of NtPowerInformation. --- dlls/ntdll/tests/info.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 81 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 3dce90b..a50f23b 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -23,6 +23,7 @@ #include <stdio.h> static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); +static NTSTATUS (WINAPI * pNtPowerInformation)(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG); static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); static NTSTATUS (WINAPI * pNtQueryInformationThread)(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG); static NTSTATUS (WINAPI * pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG); @@ -62,6 +63,7 @@ static BOOL InitFunctionPtrs(void) } NTDLL_GET_PROC(NtQuerySystemInformation); + NTDLL_GET_PROC(NtPowerInformation); NTDLL_GET_PROC(NtQueryInformationProcess); NTDLL_GET_PROC(NtQueryInformationThread); NTDLL_GET_PROC(NtSetInformationProcess); @@ -621,6 +623,79 @@ static void test_query_logicalproc(void) proc_no, si.dwNumberOfProcessors); } +static void test_query_processor_power_info(void) +{ + NTSTATUS status; + PROCESSOR_POWER_INFORMATION* ppi; + ULONG size; + SYSTEM_INFO si; + int i; + + GetSystemInfo(&si); + size = si.dwNumberOfProcessors * sizeof(PROCESSOR_POWER_INFORMATION); + ppi = HeapAlloc(GetProcessHeap(), 0, size); + + /* If size < (sizeof(PROCESSOR_POWER_INFORMATION) * NumberOfProcessors), Win7 returns + * STATUS_BUFFER_TOO_SMALL. WinXP returns STATUS_SUCCESS for any value of size. It copies as + * many whole PROCESSOR_POWER_INFORMATION structures that there is room for. Even if there is + * not enough room for one structure, WinXP still returns STATUS_SUCCESS having done nothing. + * + * If ppi == NULL, Win7 returns STATUS_INVALID_PARAMETER while WinXP returns STATUS_SUCCESS + * and does nothing. + * + * The same behavior is seen with CallNtPowerInformation (in powrprof.dll). + */ + + if (si.dwNumberOfProcessors > 1) + { + for(i = 0; i < si.dwNumberOfProcessors; i++) + ppi[i].Number = 0xDEADBEEF; + + /* Call with a buffer size that is large enough to hold at least one but not large + * enough to hold them all. This will be STATUS_SUCCESS on WinXP but not on Win7 */ + status = pNtPowerInformation(ProcessorInformation, 0, 0, ppi, size - sizeof(PROCESSOR_POWER_INFORMATION)); + if (status == STATUS_SUCCESS) + { + /* lax version found on older Windows like WinXP */ + ok( (ppi[si.dwNumberOfProcessors - 2].Number != 0xDEADBEEF) && + (ppi[si.dwNumberOfProcessors - 1].Number == 0xDEADBEEF), + "Expected all but the last record to be overwritten.\n"); + + status = pNtPowerInformation(ProcessorInformation, 0, 0, 0, size); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + + for(i = 0; i < si.dwNumberOfProcessors; i++) + ppi[i].Number = 0xDEADBEEF; + status = pNtPowerInformation(ProcessorInformation, 0, 0, ppi, sizeof(PROCESSOR_POWER_INFORMATION) - 1); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + for(i = 0; i < si.dwNumberOfProcessors; i++) + if (ppi[i].Number != 0xDEADBEEF) break; + ok( i == si.dwNumberOfProcessors, "Expected untouched buffer\n"); + } + else + { + /* picky version found on newer Windows like Win7 */ + ok( ppi[1].Number == 0xDEADBEEF, "Expected untouched buffer.\n"); + ok( status == STATUS_BUFFER_TOO_SMALL, "Expected STATUS_BUFFER_TOO_SMALL, got %08x\n", status); + + status = pNtPowerInformation(ProcessorInformation, 0, 0, 0, size); + ok( status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); + + status = pNtPowerInformation(ProcessorInformation, 0, 0, ppi, 0); + ok( status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); + } + } + else + { + skip("Test needs more than one processor.\n"); + } + + status = pNtPowerInformation(ProcessorInformation, 0, 0, ppi, size); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + + HeapFree(GetProcessHeap(), 0, ppi); +} + static void test_query_process_basic(void) { NTSTATUS status; @@ -1496,7 +1571,6 @@ static void test_NtGetCurrentProcessorNumber(void) ok(status == STATUS_SUCCESS, "got 0x%x (expected STATUS_SUCCESS)\n", status); } - START_TEST(info) { char **argv; @@ -1562,6 +1636,12 @@ START_TEST(info) trace("Starting test_query_logicalproc()\n"); test_query_logicalproc(); + /* NtPowerInformation */ + + /* 0xb ProcessorInformation */ + trace("Starting test_query_processor_power_info()\n"); + test_query_processor_power_info(); + /* NtQueryInformationProcess */ /* 0x0 ProcessBasicInformation */
1
0
0
0
James Eder : wineboot: Expect one PROCESSOR_POWER_INFORMATION structure for each CPU present when calling NtPowerInformation .
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: 7f9dfe273a80d31e3f8c5bd0c100c81370aa6f38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f9dfe273a80d31e3f8c5bd0c…
Author: James Eder <jimportal(a)gmail.com> Date: Wed Sep 12 13:15:50 2012 -0600 wineboot: Expect one PROCESSOR_POWER_INFORMATION structure for each CPU present when calling NtPowerInformation. --- programs/wineboot/wineboot.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index aac17ec..0be773b 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -189,19 +189,27 @@ static void create_hardware_registry_keys(void) unsigned int i; HKEY hkey, system_key, cpu_key, fpu_key; SYSTEM_CPU_INFORMATION sci; - PROCESSOR_POWER_INFORMATION power_info; + PROCESSOR_POWER_INFORMATION* power_info; + ULONG sizeof_power_info = sizeof(PROCESSOR_POWER_INFORMATION) * NtCurrentTeb()->Peb->NumberOfProcessors; WCHAR idW[60]; NtQuerySystemInformation( SystemCpuInformation, &sci, sizeof(sci), NULL ); - if (NtPowerInformation(ProcessorInformation, NULL, 0, &power_info, sizeof(power_info))) - power_info.MaxMhz = 0; + + power_info = HeapAlloc( GetProcessHeap(), 0, sizeof_power_info ); + if (power_info == NULL) + return; + if (NtPowerInformation( ProcessorInformation, NULL, 0, power_info, sizeof_power_info )) + memset( power_info, 0, sizeof_power_info ); /*TODO: report 64bit processors properly*/ sprintfW( idW, IntelCpuDescrW, sci.Level, HIBYTE(sci.Revision), LOBYTE(sci.Revision) ); if (RegCreateKeyExW( HKEY_LOCAL_MACHINE, SystemW, 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &system_key, NULL )) + { + HeapFree( GetProcessHeap(), 0, power_info ); return; + } set_reg_value( system_key, IdentifierW, SysidW ); @@ -225,7 +233,7 @@ static void create_hardware_registry_keys(void) /*TODO; report amd's properly*/ set_reg_value( hkey, ProcessorNameStringW, IntelCpuStringW ); set_reg_value( hkey, VendorIdentifierW, VenidIntelW ); - RegSetValueExW( hkey, mhzKeyW, 0, REG_DWORD, (BYTE *)&power_info.MaxMhz, sizeof(DWORD) ); + RegSetValueExW( hkey, mhzKeyW, 0, REG_DWORD, (BYTE *)&power_info[i].MaxMhz, sizeof(DWORD) ); RegCloseKey( hkey ); } if (!RegCreateKeyExW( fpu_key, numW, 0, NULL, REG_OPTION_VOLATILE, @@ -238,6 +246,7 @@ static void create_hardware_registry_keys(void) RegCloseKey( fpu_key ); RegCloseKey( cpu_key ); RegCloseKey( system_key ); + HeapFree( GetProcessHeap(), 0, power_info ); }
1
0
0
0
James Eder : ntdll: Return as many PROCESSOR_POWER_INFORMATIONs as there are CPUs.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: c683b98da55a6d31475f04386cca96db2de2ffcc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c683b98da55a6d31475f04386…
Author: James Eder <jimportal(a)gmail.com> Date: Wed Sep 12 13:14:27 2012 -0600 ntdll: Return as many PROCESSOR_POWER_INFORMATIONs as there are CPUs. --- dlls/ntdll/nt.c | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 44bdc5f..ca05203 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -2325,20 +2325,27 @@ NTSTATUS WINAPI NtPowerInformation( *ExecutionState = ES_USER_PRESENT; return STATUS_SUCCESS; } - case ProcessorInformation: { - PPROCESSOR_POWER_INFORMATION cpu_power = lpOutputBuffer; + case ProcessorInformation: { + PROCESSOR_POWER_INFORMATION* cpu_power = lpOutputBuffer; + int i; WARN("semi-stub: ProcessorInformation\n"); - if (nOutputBufferSize < sizeof(PROCESSOR_POWER_INFORMATION)) + + if ((lpOutputBuffer == NULL) || (nOutputBufferSize == 0)) + return STATUS_INVALID_PARAMETER; + if ((nOutputBufferSize / sizeof(PROCESSOR_POWER_INFORMATION)) < NtCurrentTeb()->Peb->NumberOfProcessors) return STATUS_BUFFER_TOO_SMALL; - cpu_power->Number = NtCurrentTeb()->Peb->NumberOfProcessors; - cpu_power->MaxMhz = cpuHz / 1000000; - cpu_power->CurrentMhz = cpuHz / 1000000; - cpu_power->MhzLimit = cpuHz / 1000000; - cpu_power->MaxIdleState = 0; /* FIXME */ - cpu_power->CurrentIdleState = 0; /* FIXME */ - return STATUS_SUCCESS; - } + + for(i = 0; i < NtCurrentTeb()->Peb->NumberOfProcessors; i++) { + cpu_power[i].Number = i; + cpu_power[i].MaxMhz = cpuHz / 1000000; + cpu_power[i].CurrentMhz = cpuHz / 1000000; + cpu_power[i].MhzLimit = cpuHz / 1000000; + cpu_power[i].MaxIdleState = 0; /* FIXME */ + cpu_power[i].CurrentIdleState = 0; /* FIXME */ + } + return STATUS_SUCCESS; + } default: /* FIXME: Needed by .NET Framework */ WARN("Unimplemented NtPowerInformation action: %d\n", InformationLevel);
1
0
0
0
Jacek Caban : jscript: Added support for host objects being part of scope chain.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: 8c5f5b49eca0ea8e28698602c668606a6dacd736 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c5f5b49eca0ea8e28698602c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 13 14:34:25 2012 +0200 jscript: Added support for host objects being part of scope chain. --- dlls/jscript/engine.c | 28 ++++++++++++---------------- dlls/jscript/engine.h | 5 +++-- dlls/jscript/function.c | 2 +- dlls/jscript/tests/run.c | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 19 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index eb2adca..f7c7d1a 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -268,7 +268,7 @@ static void exprval_set_idref(exprval_t *val, IDispatch *disp, DISPID id) IDispatch_AddRef(disp); } -HRESULT scope_push(scope_chain_t *scope, jsdisp_t *obj, scope_chain_t **ret) +HRESULT scope_push(scope_chain_t *scope, jsdisp_t *jsobj, IDispatch *obj, scope_chain_t **ret) { scope_chain_t *new_scope; @@ -278,7 +278,8 @@ HRESULT scope_push(scope_chain_t *scope, jsdisp_t *obj, scope_chain_t **ret) new_scope->ref = 1; - jsdisp_addref(obj); + IDispatch_AddRef(obj); + new_scope->jsobj = jsobj; new_scope->obj = obj; if(scope) { @@ -309,7 +310,7 @@ void scope_release(scope_chain_t *scope) if(scope->next) scope_release(scope->next); - jsdisp_release(scope->obj); + IDispatch_Release(scope->obj); heap_free(scope); } @@ -511,9 +512,12 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, exprval_t *re TRACE("%s\n", debugstr_w(identifier)); for(scope = ctx->exec_ctx->scope_chain; scope; scope = scope->next) { - hres = jsdisp_get_id(scope->obj, identifier, 0, &id); + if(scope->jsobj) + hres = jsdisp_get_id(scope->jsobj, identifier, fdexNameImplicit, &id); + else + hres = disp_get_id(ctx, scope->obj, identifier, fdexNameImplicit, &id); if(SUCCEEDED(hres)) { - exprval_set_idref(ret, to_disp(scope->obj), id); + exprval_set_idref(ret, scope->obj, id); return S_OK; } } @@ -668,7 +672,6 @@ static HRESULT interp_forin(exec_ctx_t *ctx) static HRESULT interp_push_scope(exec_ctx_t *ctx) { IDispatch *disp; - jsdisp_t *obj; VARIANT *v; HRESULT hres; @@ -680,15 +683,8 @@ static HRESULT interp_push_scope(exec_ctx_t *ctx) if(FAILED(hres)) return hres; - obj = to_jsdisp(disp); - if(!obj) { - IDispatch_Release(disp); - FIXME("disp is not jsdisp\n"); - return E_NOTIMPL; - } - - hres = scope_push(ctx->scope_chain, obj, &ctx->scope_chain); - jsdisp_release(obj); + hres = scope_push(ctx->scope_chain, to_jsdisp(disp), disp, &ctx->scope_chain); + IDispatch_Release(disp); return hres; } @@ -2509,7 +2505,7 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) if(FAILED(hres)) return hres; - hres = scope_push(ctx->scope_chain, scope_obj, &ctx->scope_chain); + hres = scope_push(ctx->scope_chain, scope_obj, to_disp(scope_obj), &ctx->scope_chain); jsdisp_release(scope_obj); }else { VARIANT v; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index b3648af..22283aa 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -203,11 +203,12 @@ static inline void *parser_alloc_tmp(parser_ctx_t *ctx, DWORD size) typedef struct _scope_chain_t { LONG ref; - jsdisp_t *obj; + jsdisp_t *jsobj; + IDispatch *obj; struct _scope_chain_t *next; } scope_chain_t; -HRESULT scope_push(scope_chain_t*,jsdisp_t*,scope_chain_t**) DECLSPEC_HIDDEN; +HRESULT scope_push(scope_chain_t*,jsdisp_t*,IDispatch*,scope_chain_t**) DECLSPEC_HIDDEN; void scope_release(scope_chain_t*) DECLSPEC_HIDDEN; static inline void scope_addref(scope_chain_t *scope) diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 23ce98c..e7a011d 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -182,7 +182,7 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis return hres; } - hres = scope_push(function->scope_chain, var_disp, &scope); + hres = scope_push(function->scope_chain, var_disp, to_disp(var_disp), &scope); if(SUCCEEDED(hres)) { hres = create_exec_ctx(ctx, this_obj, var_disp, scope, FALSE, &exec_ctx); scope_release(scope); diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index 4a9f36d..30a1f9c 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -88,6 +88,8 @@ DEFINE_EXPECT(puredisp_noprop_d); DEFINE_EXPECT(testobj_delete); DEFINE_EXPECT(testobj_value); DEFINE_EXPECT(testobj_prop_d); +DEFINE_EXPECT(testobj_withprop_d); +DEFINE_EXPECT(testobj_withprop_i); DEFINE_EXPECT(testobj_noprop_d); DEFINE_EXPECT(testobj_onlydispid_d); DEFINE_EXPECT(testobj_onlydispid_i); @@ -124,6 +126,7 @@ DEFINE_EXPECT(DeleteMemberByDispID); #define DISPID_TESTOBJ_PROP 0x2000 #define DISPID_TESTOBJ_ONLYDISPID 0x2001 +#define DISPID_TESTOBJ_WITHPROP 0x2002 #define JS_E_INVALID_CHAR 0x800a03f6 @@ -297,6 +300,12 @@ static HRESULT WINAPI testObj_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD *pid = DISPID_TESTOBJ_PROP; return S_OK; } + if(!strcmp_wa(bstrName, "withProp")) { + CHECK_EXPECT(testobj_withprop_d); + test_grfdex(grfdex, fdexNameCaseSensitive|fdexNameImplicit); + *pid = DISPID_TESTOBJ_WITHPROP; + return S_OK; + } if(!strcmp_wa(bstrName, "noprop")) { CHECK_EXPECT(testobj_noprop_d); test_grfdex(grfdex, fdexNameCaseSensitive); @@ -360,6 +369,23 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); ok(pei != NULL, "pei == NULL\n"); return DISP_E_MEMBERNOTFOUND; + case DISPID_TESTOBJ_WITHPROP: + CHECK_EXPECT(testobj_withprop_i); + + ok(wFlags == INVOKE_PROPERTYGET, "wFlags = %x\n", wFlags); + ok(pdp != NULL, "pdp == NULL\n"); + ok(!pdp->rgvarg, "rgvarg != NULL\n"); + ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); + ok(!pdp->cArgs, "cArgs = %d\n", pdp->cArgs); + ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); + ok(pvarRes != NULL, "pvarRes == NULL\n"); + ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); + ok(pei != NULL, "pei == NULL\n"); + + V_VT(pvarRes) = VT_I4; + V_I4(pvarRes) = 1; + + return S_OK; } ok(0, "unexpected call %x\n", id); @@ -1754,6 +1780,12 @@ static BOOL run_tests(void) "});"); CHECK_CALLED(global_testargtypes_i); + SET_EXPECT(testobj_withprop_d); + SET_EXPECT(testobj_withprop_i); + parse_script_a("var t = (function () { with(testObj) { return withProp; }})(); ok(t === 1, 't = ' + t);"); + CHECK_CALLED(testobj_withprop_d); + CHECK_CALLED(testobj_withprop_i); + run_from_res("lang.js"); run_from_res("api.js"); run_from_res("regexp.js");
1
0
0
0
Jacek Caban : jscript: Don' t leave current scope in return statement before evaluating the expression.
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: fdbd536983a46a65ed6ba5d51787d99b6aaabe0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fdbd536983a46a65ed6ba5d51…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 13 14:34:11 2012 +0200 jscript: Don't leave current scope in return statement before evaluating the expression. --- dlls/jscript/compile.c | 33 +++++++++++++++++++++------------ dlls/jscript/tests/lang.js | 7 +++++++ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index e45b132..034a55d 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1287,25 +1287,30 @@ static HRESULT compile_forin_statement(compiler_ctx_t *ctx, forin_statement_t *s return S_OK; } -static HRESULT pop_to_stat(compiler_ctx_t *ctx, statement_ctx_t *stat_ctx) +static HRESULT pop_to_stat(compiler_ctx_t *ctx, BOOL var_stack, BOOL scope_stack, statement_ctx_t *stat_ctx) { unsigned stack_pop = 0; statement_ctx_t *iter; for(iter = ctx->stat_ctx; iter != stat_ctx; iter = iter->next) { - if(iter->using_scope && !push_instr(ctx, OP_pop_scope)) - return E_OUTOFMEMORY; - if(iter->using_except && !push_instr(ctx, OP_pop_except)) - return E_OUTOFMEMORY; + if(scope_stack) { + if(iter->using_scope && !push_instr(ctx, OP_pop_scope)) + return E_OUTOFMEMORY; + if(iter->using_except && !push_instr(ctx, OP_pop_except)) + return E_OUTOFMEMORY; + } stack_pop += iter->stack_use; } - /* FIXME: optimize */ - while(stack_pop--) { - if(!push_instr(ctx, OP_pop)) - return E_OUTOFMEMORY; + if(var_stack) { + /* FIXME: optimize */ + while(stack_pop--) { + if(!push_instr(ctx, OP_pop)) + return E_OUTOFMEMORY; + } } + return S_OK; } @@ -1353,7 +1358,7 @@ static HRESULT compile_continue_statement(compiler_ctx_t *ctx, branch_statement_ } } - hres = pop_to_stat(ctx, pop_ctx); + hres = pop_to_stat(ctx, TRUE, TRUE, pop_ctx); if(FAILED(hres)) return hres; @@ -1393,7 +1398,7 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t * } } - hres = pop_to_stat(ctx, pop_ctx->next); + hres = pop_to_stat(ctx, TRUE, TRUE, pop_ctx->next); if(FAILED(hres)) return hres; @@ -1408,7 +1413,7 @@ static HRESULT compile_return_statement(compiler_ctx_t *ctx, expression_statemen { HRESULT hres; - hres = pop_to_stat(ctx, NULL); + hres = pop_to_stat(ctx, TRUE, FALSE, NULL); if(FAILED(hres)) return hres; @@ -1418,6 +1423,10 @@ static HRESULT compile_return_statement(compiler_ctx_t *ctx, expression_statemen return hres; } + hres = pop_to_stat(ctx, FALSE, TRUE, NULL); + if(FAILED(hres)) + return hres; + return push_instr(ctx, OP_ret) ? S_OK : E_OUTOFMEMORY; } diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index dbb9d50..ffb5e2e 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1355,6 +1355,13 @@ 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); +tmp = (function() { + var ret = false; + with({ret: true}) + return ret; +})(); +ok(tmp, "tmp = " + tmp); + /* NoNewline rule parser tests */ while(true) { if(true) break
1
0
0
0
Hans Leidekker : msi: Don't reinstall components shared with other products .
by Alexandre Julliard
13 Sep '12
13 Sep '12
Module: wine Branch: master Commit: dd8f54a49fd29eb5e91cf4ac5798a41580434151 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd8f54a49fd29eb5e91cf4ac5…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Sep 13 13:43:37 2012 +0200 msi: Don't reinstall components shared with other products. --- dlls/msi/action.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 845a0fd..f29be2b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -812,7 +812,7 @@ INSTALLSTATE msi_get_component_action( MSIPACKAGE *package, MSICOMPONENT *comp ) 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 INSTALLSTATE_UNKNOWN; } return comp->ActionRequest; }
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200