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
May 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
955 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Added RegExp.leftContext and RegExp. rightContext stub implementation.
by Alexandre Julliard
27 May '10
27 May '10
Module: wine Branch: master Commit: 0acb7fb1e424f656224f732a223f2f11f05322a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0acb7fb1e424f656224f732a2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 26 19:17:40 2010 +0200 jscript: Added RegExp.leftContext and RegExp.rightContext stub implementation. --- dlls/jscript/regexp.c | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c index ff7ef29..2abf1f8 100644 --- a/dlls/jscript/regexp.c +++ b/dlls/jscript/regexp.c @@ -96,6 +96,11 @@ static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0}; static const WCHAR execW[] = {'e','x','e','c',0}; static const WCHAR testW[] = {'t','e','s','t',0}; +static const WCHAR leftContextW[] = + {'l','e','f','t','C','o','n','t','e','x','t',0}; +static const WCHAR rightContextW[] = + {'r','i','g','h','t','C','o','n','t','e','x','t',0}; + static const WCHAR emptyW[] = {0}; /* FIXME: Better error handling */ @@ -3959,6 +3964,20 @@ HRESULT regexp_string_match(script_ctx_t *ctx, DispatchEx *re, BSTR str, return hres; } +static HRESULT RegExpConstr_leftContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, + DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT RegExpConstr_rightContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, + DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) +{ + FIXME("\n"); + return E_NOTIMPL; +} + static HRESULT RegExpConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { @@ -4019,6 +4038,20 @@ static HRESULT RegExpConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags return S_OK; } +static const builtin_prop_t RegExpConstr_props[] = { + {leftContextW, RegExpConstr_leftContext, 0}, + {rightContextW, RegExpConstr_rightContext, 0} +}; + +static const builtin_info_t RegExpConstr_info = { + JSCLASS_FUNCTION, + {NULL, Function_value, 0}, + sizeof(RegExpConstr_props)/sizeof(*RegExpConstr_props), + RegExpConstr_props, + NULL, + NULL +}; + HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret) { RegExpInstance *regexp; @@ -4030,7 +4063,7 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di if(FAILED(hres)) return hres; - hres = create_builtin_function(ctx, RegExpConstr_value, RegExpW, NULL, + hres = create_builtin_function(ctx, RegExpConstr_value, RegExpW, &RegExpConstr_info, PROPF_CONSTR|2, ®exp->dispex, ret); jsdisp_release(®exp->dispex);
1
0
0
0
Jacek Caban : jscript: Store builtin constructor' s length in instance object.
by Alexandre Julliard
27 May '10
27 May '10
Module: wine Branch: master Commit: 0cbe1574fe3a522284ef57e22dabb12ef4177fd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0cbe1574fe3a522284ef57e22…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 26 19:17:21 2010 +0200 jscript: Store builtin constructor's length in instance object. --- dlls/jscript/dispex.c | 15 +++++++++++++++ dlls/jscript/function.c | 11 ++++++++++- dlls/jscript/jscript.h | 7 +++++-- dlls/jscript/tests/api.js | 7 +++++-- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 6894eae..07880bc 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -358,6 +358,9 @@ static HRESULT prop_put(DispatchEx *This, dispex_prop_t *prop, VARIANT *val, { HRESULT hres; + if(prop->flags & PROPF_CONST) + return S_OK; + switch(prop->type) { case PROP_BUILTIN: if(!(prop->flags & PROPF_METHOD)) { @@ -974,6 +977,18 @@ HRESULT jsdisp_propput_name(DispatchEx *obj, const WCHAR *name, VARIANT *val, js return prop_put(obj, prop, val, ei, caller); } +HRESULT jsdisp_propput_const(DispatchEx *obj, const WCHAR *name, VARIANT *val) +{ + dispex_prop_t *prop; + HRESULT hres; + + hres = ensure_prop_name(obj, name, FALSE, PROPF_ENUM|PROPF_CONST, &prop); + if(FAILED(hres)) + return hres; + + return VariantCopy(&prop->u.var, val); +} + HRESULT jsdisp_propput_idx(DispatchEx *obj, DWORD idx, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller) { WCHAR buf[12]; diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index c7494cf..df46f1d 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -606,7 +606,16 @@ HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc, if(FAILED(hres)) return hres; - hres = set_prototype(ctx, &function->dispex, prototype); + if(builtin_info) { + VARIANT var; + + V_VT(&var) = VT_I4; + V_I4(&var) = function->length; + hres = jsdisp_propput_const(&function->dispex, lengthW, &var); + } + + if(SUCCEEDED(hres)) + hres = set_prototype(ctx, &function->dispex, prototype); if(FAILED(hres)) { jsdisp_release(&function->dispex); return hres; diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index c1c8e60..c58c05d 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -68,6 +68,7 @@ extern HINSTANCE jscript_hinstance; #define PROPF_METHOD 0x0100 #define PROPF_ENUM 0x0200 #define PROPF_CONSTR 0x0400 +#define PROPF_CONST 0x0800 /* NOTE: Keep in sync with names in Object.toString implementation */ typedef enum { @@ -203,6 +204,7 @@ HRESULT disp_propget(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*,IServi HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*); HRESULT jsdisp_propget(DispatchEx*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*); HRESULT jsdisp_propput_name(DispatchEx*,const WCHAR*,VARIANT*,jsexcept_t*,IServiceProvider*); +HRESULT jsdisp_propput_const(DispatchEx*,const WCHAR*,VARIANT*); HRESULT jsdisp_propput_idx(DispatchEx*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*); HRESULT jsdisp_propget_name(DispatchEx*,LPCWSTR,VARIANT*,jsexcept_t*,IServiceProvider*); HRESULT jsdisp_get_idx(DispatchEx*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*); @@ -318,8 +320,9 @@ typedef struct { DWORD len; } match_result_t; -#define REM_CHECK_GLOBAL 0x0001 -#define REM_RESET_INDEX 0x0002 +#define REM_CHECK_GLOBAL 0x0001 +#define REM_RESET_INDEX 0x0002 +#define REM_NO_CTX_UPDATE 0x0004 HRESULT regexp_match_next(script_ctx_t*,DispatchEx*,DWORD,const WCHAR*,DWORD,const WCHAR**,match_result_t**, DWORD*,DWORD*,match_result_t*); HRESULT regexp_match(script_ctx_t*,DispatchEx*,const WCHAR*,DWORD,BOOL,match_result_t**,DWORD*); diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 2fba252..2ccad3d 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -2129,7 +2129,7 @@ ok(ActiveXObject.length == 1, "ActiveXObject.length = " + ActiveXObject.length); ok(Array.length == 1, "Array.length = " + Array.length); ok(Boolean.length == 1, "Boolean.length = " + Boolean.length); ok(CollectGarbage.length == 0, "CollectGarbage.length = " + CollectGarbage.length); -//ok(Date.length == 7, "Date.length = " + Date.length); +ok(Date.length == 7, "Date.length = " + Date.length); ok(Enumerator.length == 7, "Enumerator.length = " + Enumerator.length); ok(Error.length == 1, "Error.length = " + Error.length); ok(EvalError.length == 1, "EvalError.length = " + EvalError.length); @@ -2147,7 +2147,7 @@ ok(ScriptEngineMajorVersion.length == 0, "ScriptEngineMajorVersion.length = " + ScriptEngineMajorVersion.length); ok(ScriptEngineMinorVersion.length == 0, "ScriptEngineMinorVersion.length = " + ScriptEngineMinorVersion.length); -//ok(String.length == 1, "String.length = " + String.length); +ok(String.length == 1, "String.length = " + String.length); ok(SyntaxError.length == 1, "SyntaxError.length = " + SyntaxError.length); ok(TypeError.length == 1, "TypeError.length = " + TypeError.length); ok(URIError.length == 1, "URIError.length = " + URIError.length); @@ -2164,4 +2164,7 @@ ok(parseFloat.length == 1, "parseFloat.length = " + parseFloat.length); ok(parseInt.length == 2, "parseInt.length = " + parseInt.length); ok(unescape.length == 1, "unescape.length = " + unescape.length); +String.length = 3; +ok(String.length == 1, "String.length = " + String.length); + reportSuccess();
1
0
0
0
Matteo Bruni : d3dx9: Shader assembler vs_1_0 and vs_1_1 support.
by Alexandre Julliard
27 May '10
27 May '10
Module: wine Branch: master Commit: 913278c5cb50d0279d63f559b3b623c5eec6e8a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=913278c5cb50d0279d63f559b…
Author: Matteo Bruni <matteo.mystral(a)gmail.com> Date: Sun Aug 16 01:02:16 2009 +0200 d3dx9: Shader assembler vs_1_0 and vs_1_1 support. --- dlls/d3dx9_36/asmparser.c | 110 +++++++++++++++++++++++++++ dlls/d3dx9_36/asmshader.y | 6 +- dlls/d3dx9_36/bytecodewriter.c | 156 +++++++++++++++++++++++++++++++++++++- dlls/d3dx9_36/d3dx9_36_private.h | 3 + dlls/d3dx9_36/tests/asm.c | 15 ++-- 5 files changed, 278 insertions(+), 12 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=913278c5cb50d0279d63f…
1
0
0
0
Alexandre Julliard : gdi32: Only 16 and 32 bpp DIB sections can have bitfields.
by Alexandre Julliard
27 May '10
27 May '10
Module: wine Branch: master Commit: 7f19bda6ec10036f6202d7eeb64c3691082af847 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f19bda6ec10036f6202d7eeb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 27 13:38:30 2010 +0200 gdi32: Only 16 and 32 bpp DIB sections can have bitfields. --- dlls/gdi32/dib.c | 42 ++++++++++++++++++++++++--------- dlls/gdi32/tests/bitmap.c | 55 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 12 deletions(-) diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 2725247..ce5ab8b 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -647,18 +647,24 @@ INT WINAPI GetDIBits( DIB_GetDIBImageBytes( bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, bmp->bitmap.bmBitsPixel ); - info->bmiHeader.biCompression = (bmp->bitmap.bmBitsPixel > 8) ? BI_BITFIELDS : BI_RGB; - switch(bmp->bitmap.bmBitsPixel) + if (bmp->dib) { - case 15: - info->bmiHeader.biBitCount = 16; - break; - case 24: - info->bmiHeader.biBitCount = 32; - break; - default: + info->bmiHeader.biBitCount = bmp->dib->dsBm.bmBitsPixel; + switch (bmp->dib->dsBm.bmBitsPixel) + { + case 16: + case 32: + info->bmiHeader.biCompression = BI_BITFIELDS; + break; + default: + info->bmiHeader.biCompression = BI_RGB; + break; + } + } + else + { + info->bmiHeader.biCompression = (bmp->bitmap.bmBitsPixel > 8) ? BI_BITFIELDS : BI_RGB; info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel; - break; } info->bmiHeader.biXPelsPerMeter = 0; info->bmiHeader.biYPelsPerMeter = 0; @@ -1244,10 +1250,22 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage, &planes, &bpp, &compression, &sizeImage )) == -1)) return 0; - if (compression != BI_RGB && compression != BI_BITFIELDS) + switch (bpp) { - TRACE("can't create a compressed (%u) dibsection\n", compression); + case 16: + case 32: + if (compression == BI_BITFIELDS) break; + /* fall through */ + case 1: + case 4: + case 8: + case 24: + if (compression == BI_RGB) break; + WARN( "invalid %u bpp compression %u\n", bpp, compression ); return 0; + default: + FIXME( "should fail %u bpp compression %u\n", bpp, compression ); + break; } if (!(dib = HeapAlloc( GetProcessHeap(), 0, sizeof(*dib) ))) return 0; diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index b25cfd4..8e5ad2e 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -546,6 +546,18 @@ static void test_dibsections(void) ok(hdib == NULL, "CreateDIBSection should fail when asked to create a compressed DIB section\n"); ok(GetLastError() == 0xdeadbeef, "wrong error %d\n", GetLastError()); + for (i = 0; i < 128; i++) + { + pbmi->bmiHeader.biBitCount = i; + pbmi->bmiHeader.biCompression = BI_RGB; + hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); + if (i == 1 || i == 4 || i == 8 || i == 16 || i == 24 || i == 32) + ok(hdib != NULL, "CreateDIBSection bpp %u\n", i); + else + todo_wine ok(hdib == NULL, "CreateDIBSection bpp %u succeeded\n", i); + if (hdib) DeleteObject( hdib ); + } + pbmi->bmiHeader.biBitCount = 16; pbmi->bmiHeader.biCompression = BI_BITFIELDS; ((PDWORD)pbmi->bmiColors)[0] = 0xf800; @@ -1978,6 +1990,49 @@ static void test_GetDIBits_BI_BITFIELDS(void) DeleteObject(hbm); } + /* 24-bpp DIB sections don't have bitfields */ + + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + dibinfo->bmiHeader.biWidth = 1; + dibinfo->bmiHeader.biHeight = 1; + dibinfo->bmiHeader.biPlanes = 1; + dibinfo->bmiHeader.biBitCount = 24; + dibinfo->bmiHeader.biCompression = BI_BITFIELDS; + dibinfo->bmiHeader.biSizeImage = 0; + dibinfo->bmiHeader.biXPelsPerMeter = 0; + dibinfo->bmiHeader.biYPelsPerMeter = 0; + dibinfo->bmiHeader.biClrUsed = 0; + dibinfo->bmiHeader.biClrImportant = 0; + hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); + ok( hbm == 0, "creating 24-bpp BI_BITFIELDS dibsection should fail\n" ); + dibinfo->bmiHeader.biCompression = BI_RGB; + hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); + ok( hbm != 0, "failed to create bitmap\n" ); + + memset(dibinfo, 0, sizeof(dibinfo_buf)); + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + ret = GetDIBits(hdc, hbm, 0, 0, NULL, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed\n"); + ok( dibinfo->bmiHeader.biBitCount == 24, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); + + ok( dibinfo->bmiHeader.biCompression == BI_RGB, + "compression is %u\n", dibinfo->bmiHeader.biCompression ); + ok( !bitmasks[0], "red mask is set\n" ); + ok( !bitmasks[1], "green mask is set\n" ); + ok( !bitmasks[2], "blue mask is set\n" ); + + dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; + ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed\n"); + ok( dibinfo->bmiHeader.biBitCount == 24, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); + ok( !bitmasks[0], "red mask is set\n" ); + ok( !bitmasks[1], "green mask is set\n" ); + ok( !bitmasks[2], "blue mask is set\n" ); + ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef || + broken(dibinfo->bmiHeader.biSizeImage == 0xdeadbeef), /* win9x */ + "size image not set\n" ); + + DeleteObject(hbm); ReleaseDC(NULL, hdc); }
1
0
0
0
Alexandre Julliard : gdi32: Return the actual DIB section bitfields instead of default values in GetDIBits .
by Alexandre Julliard
27 May '10
27 May '10
Module: wine Branch: master Commit: f4e51a9c45715b45718b66df80365b3fafe2ef71 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4e51a9c45715b45718b66df8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 27 13:37:37 2010 +0200 gdi32: Return the actual DIB section bitfields instead of default values in GetDIBits. --- dlls/gdi32/dib.c | 20 +++++++--- dlls/gdi32/tests/bitmap.c | 90 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 102 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index b19cb9d..2725247 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -827,9 +827,13 @@ INT WINAPI GetDIBits( case 16: if (info->bmiHeader.biCompression == BI_BITFIELDS) { - ((PDWORD)info->bmiColors)[0] = 0xf800; - ((PDWORD)info->bmiColors)[1] = 0x07e0; - ((PDWORD)info->bmiColors)[2] = 0x001f; + if (bmp->dib) memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) ); + else + { + ((PDWORD)info->bmiColors)[0] = 0xf800; + ((PDWORD)info->bmiColors)[1] = 0x07e0; + ((PDWORD)info->bmiColors)[2] = 0x001f; + } } break; @@ -837,9 +841,13 @@ INT WINAPI GetDIBits( case 32: if (info->bmiHeader.biCompression == BI_BITFIELDS) { - ((PDWORD)info->bmiColors)[0] = 0xff0000; - ((PDWORD)info->bmiColors)[1] = 0x00ff00; - ((PDWORD)info->bmiColors)[2] = 0x0000ff; + if (bmp->dib) memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) ); + else + { + ((PDWORD)info->bmiColors)[0] = 0xff0000; + ((PDWORD)info->bmiColors)[1] = 0x00ff00; + ((PDWORD)info->bmiColors)[2] = 0x0000ff; + } } break; } diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index d94239f..b25cfd4 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -1809,9 +1809,11 @@ static void test_GetDIBits_BI_BITFIELDS(void) char dibinfo_buf[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)]; DWORD bits[32]; LPBITMAPINFO dibinfo = (LPBITMAPINFO) dibinfo_buf; + DWORD *bitmasks = (DWORD *)dibinfo->bmiColors; HDC hdc; HBITMAP hbm; int ret; + void *ptr; memset(dibinfo, 0, sizeof(dibinfo_buf)); dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); @@ -1826,8 +1828,6 @@ static void test_GetDIBits_BI_BITFIELDS(void) ok(ret == 1, "GetDIBits failed\n"); if (dibinfo->bmiHeader.biBitCount > 8) { - DWORD *bitmasks = (DWORD *)dibinfo->bmiColors; - ok( dibinfo->bmiHeader.biCompression == BI_BITFIELDS, "compression is %u\n", dibinfo->bmiHeader.biCompression ); @@ -1892,6 +1892,92 @@ static void test_GetDIBits_BI_BITFIELDS(void) else skip("not in 16 bpp BI_BITFIELDS mode, skipping that test\n"); DeleteObject(hbm); + + /* same thing now with a 32-bpp DIB section */ + + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + dibinfo->bmiHeader.biWidth = 1; + dibinfo->bmiHeader.biHeight = 1; + dibinfo->bmiHeader.biPlanes = 1; + dibinfo->bmiHeader.biBitCount = 32; + dibinfo->bmiHeader.biCompression = BI_RGB; + dibinfo->bmiHeader.biSizeImage = 0; + dibinfo->bmiHeader.biXPelsPerMeter = 0; + dibinfo->bmiHeader.biYPelsPerMeter = 0; + dibinfo->bmiHeader.biClrUsed = 0; + dibinfo->bmiHeader.biClrImportant = 0; + bitmasks[0] = 0x0000ff; + bitmasks[1] = 0x00ff00; + bitmasks[2] = 0xff0000; + hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); + ok( hbm != 0, "failed to create bitmap\n" ); + + memset(dibinfo, 0, sizeof(dibinfo_buf)); + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + ret = GetDIBits(hdc, hbm, 0, 0, NULL, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed\n"); + ok( dibinfo->bmiHeader.biBitCount == 32, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); + + ok( dibinfo->bmiHeader.biCompression == BI_BITFIELDS, + "compression is %u\n", dibinfo->bmiHeader.biCompression ); + ok( !bitmasks[0], "red mask is set\n" ); + ok( !bitmasks[1], "green mask is set\n" ); + ok( !bitmasks[2], "blue mask is set\n" ); + + dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; + ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed\n"); + ok( dibinfo->bmiHeader.biBitCount == 32, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); + ok( bitmasks[0] == 0xff0000, "wrong red mask %08x\n", bitmasks[0] ); + ok( bitmasks[1] == 0x00ff00, "wrong green mask %08x\n", bitmasks[1] ); + ok( bitmasks[2] == 0x0000ff, "wrong blue mask %08x\n", bitmasks[2] ); + ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef || + broken(dibinfo->bmiHeader.biSizeImage == 0xdeadbeef), /* win9x */ + "size image not set\n" ); + + DeleteObject(hbm); + + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + dibinfo->bmiHeader.biWidth = 1; + dibinfo->bmiHeader.biHeight = 1; + dibinfo->bmiHeader.biPlanes = 1; + dibinfo->bmiHeader.biBitCount = 32; + dibinfo->bmiHeader.biCompression = BI_BITFIELDS; + dibinfo->bmiHeader.biSizeImage = 0; + dibinfo->bmiHeader.biXPelsPerMeter = 0; + dibinfo->bmiHeader.biYPelsPerMeter = 0; + dibinfo->bmiHeader.biClrUsed = 0; + dibinfo->bmiHeader.biClrImportant = 0; + bitmasks[0] = 0x0000ff; + bitmasks[1] = 0x00ff00; + bitmasks[2] = 0xff0000; + hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); + ok( hbm != 0 || broken(!hbm), /* win9x */ "failed to create bitmap\n" ); + + if (hbm) + { + memset(dibinfo, 0, sizeof(dibinfo_buf)); + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + ret = GetDIBits(hdc, hbm, 0, 0, NULL, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed\n"); + + ok( dibinfo->bmiHeader.biCompression == BI_BITFIELDS, + "compression is %u\n", dibinfo->bmiHeader.biCompression ); + ok( !bitmasks[0], "red mask is set\n" ); + ok( !bitmasks[1], "green mask is set\n" ); + ok( !bitmasks[2], "blue mask is set\n" ); + + dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; + ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed\n"); + ok( bitmasks[0] == 0x0000ff, "wrong red mask %08x\n", bitmasks[0] ); + ok( bitmasks[1] == 0x00ff00, "wrong green mask %08x\n", bitmasks[1] ); + ok( bitmasks[2] == 0xff0000, "wrong blue mask %08x\n", bitmasks[2] ); + ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); + + DeleteObject(hbm); + } + ReleaseDC(NULL, hdc); }
1
0
0
0
Alexandre Julliard : kernel32: Reset stdio handles when they are closed.
by Alexandre Julliard
27 May '10
27 May '10
Module: wine Branch: master Commit: 775e5f7b3e2d4c87035b5fabf436bdea0586913f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=775e5f7b3e2d4c87035b5fabf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 26 22:10:52 2010 +0200 kernel32: Reset stdio handles when they are closed. --- dlls/kernel32/process.c | 10 ++++++---- dlls/kernel32/tests/process.c | 10 ++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index b71a390..af06392 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2713,10 +2713,12 @@ BOOL WINAPI CloseHandle( HANDLE handle ) NTSTATUS status; /* stdio handles need special treatment */ - if ((handle == (HANDLE)STD_INPUT_HANDLE) || - (handle == (HANDLE)STD_OUTPUT_HANDLE) || - (handle == (HANDLE)STD_ERROR_HANDLE)) - handle = GetStdHandle( HandleToULong(handle) ); + if (handle == (HANDLE)STD_INPUT_HANDLE) + handle = InterlockedExchangePointer( &NtCurrentTeb()->Peb->ProcessParameters->hStdInput, 0 ); + else if (handle == (HANDLE)STD_OUTPUT_HANDLE) + handle = InterlockedExchangePointer( &NtCurrentTeb()->Peb->ProcessParameters->hStdOutput, 0 ); + else if (handle == (HANDLE)STD_ERROR_HANDLE) + handle = InterlockedExchangePointer( &NtCurrentTeb()->Peb->ProcessParameters->hStdError, 0 ); if (is_console_handle(handle)) return CloseConsoleHandle(handle); diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 846c338..d66d9f6 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -1742,6 +1742,7 @@ static void test_ProcessName(void) static void test_Handles(void) { HANDLE handle = GetCurrentProcess(); + HANDLE h2; BOOL ret; DWORD code; @@ -1769,6 +1770,15 @@ static void test_Handles(void) ok( !ret, "GetExitCodeProcess succeeded for %p\n", handle ); ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); #endif + + handle = GetStdHandle( STD_ERROR_HANDLE ); + ok( handle != 0, "handle %p\n", handle ); + CloseHandle( (HANDLE)STD_ERROR_HANDLE ); + h2 = GetStdHandle( STD_ERROR_HANDLE ); + ok( h2 == 0 || + broken( h2 == handle) || /* nt4, w2k */ + broken( h2 == INVALID_HANDLE_VALUE), /* win9x */ + "wrong handle %p/%p\n", h2, handle ); } static void test_SystemInfo(void)
1
0
0
0
Robert Wilhelm : msvcrt90: Add stat64i32.
by Alexandre Julliard
26 May '10
26 May '10
Module: wine Branch: master Commit: 5d4a7433a64dae95713fecb8a3d6c4f2a471ca37 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d4a7433a64dae95713fecb8a…
Author: Robert Wilhelm <robert.wilhelm(a)gmx.net> Date: Wed May 26 10:39:06 2010 +0200 msvcrt90: Add stat64i32. --- dlls/msvcr90/msvcr90.c | 14 ++++++++++++++ dlls/msvcr90/msvcr90.spec | 2 +- 2 files changed, 15 insertions(+), 1 deletions(-) diff --git a/dlls/msvcr90/msvcr90.c b/dlls/msvcr90/msvcr90.c index 3372e0b..43a1834 100644 --- a/dlls/msvcr90/msvcr90.c +++ b/dlls/msvcr90/msvcr90.c @@ -189,3 +189,17 @@ int CDECL _fstat64i32(int fd, struct _stat64i32* buf) msvcrt_stat64_to_stat64i32(&buf64, buf); return ret; } + +/********************************************************************* + * _stat64i32 (MSVCRT.@) + */ +int CDECL _stat64i32(const char* path, struct _stat64i32 * buf) +{ + int ret; + struct _stat64 buf64; + + ret = _stat64(path, &buf64); + if (!ret) + msvcrt_stat64_to_stat64i32(&buf64, buf); + return ret; +} diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index f350d18..6592e7c 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -912,7 +912,7 @@ @ stub _stat32 @ stub _stat32i64 @ cdecl _stat64(str ptr) msvcrt._stat64 -@ stub _stat64i32 +@ cdecl _stat64i32(str ptr) @ cdecl _statusfp() msvcrt._statusfp @ stub _statusfp2 @ stub _strcoll_l
1
0
0
0
Robert Wilhelm : msvcrt90: Add fstat64i32.
by Alexandre Julliard
26 May '10
26 May '10
Module: wine Branch: master Commit: d9746e3ed72bf6d6ea072fd7f1258e909b81360f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d9746e3ed72bf6d6ea072fd7f…
Author: Robert Wilhelm <robert.wilhelm(a)gmx.net> Date: Wed May 26 10:34:51 2010 +0200 msvcrt90: Add fstat64i32. --- dlls/msvcr90/msvcr90.c | 31 +++++++++++++++++++++++++++++++ dlls/msvcr90/msvcr90.spec | 2 +- 2 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/msvcr90/msvcr90.c b/dlls/msvcr90/msvcr90.c index eaf9d66..3372e0b 100644 --- a/dlls/msvcr90/msvcr90.c +++ b/dlls/msvcr90/msvcr90.c @@ -26,6 +26,7 @@ #include "windef.h" #include "winbase.h" #include "wine/debug.h" +#include "sys/stat.h" WINE_DEFAULT_DEBUG_CHANNEL(msvcr90); @@ -158,3 +159,33 @@ void* CDECL _recalloc(void* mem, size_t num, size_t size) memset((BYTE*)mem+old_size, 0, size-old_size); return ret; } + +/********************************************************************* + * _fstat64i32 (MSVCRT.@) + */ + +static void msvcrt_stat64_to_stat64i32(const struct _stat64 *buf64, struct _stat64i32 *buf) +{ + buf->st_dev = buf64->st_dev; + buf->st_ino = buf64->st_ino; + buf->st_mode = buf64->st_mode; + buf->st_nlink = buf64->st_nlink; + buf->st_uid = buf64->st_uid; + buf->st_gid = buf64->st_gid; + buf->st_rdev = buf64->st_rdev; + buf->st_size = buf64->st_size; + buf->st_atime = buf64->st_atime; + buf->st_mtime = buf64->st_mtime; + buf->st_ctime = buf64->st_ctime; +} + +int CDECL _fstat64i32(int fd, struct _stat64i32* buf) +{ + int ret; + struct _stat64 buf64; + + ret = _fstat64(fd, &buf64); + if (!ret) + msvcrt_stat64_to_stat64i32(&buf64, buf); + return ret; +} diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index be4a675..f350d18 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -433,7 +433,7 @@ @ stub _fstat32 @ stub _fstat32i64 @ cdecl _fstat64(long ptr) msvcrt._fstat64 -@ stub _fstat64i32 +@ cdecl _fstat64i32(long ptr) @ stub _ftell_nolock @ stub _ftelli64 @ stub _ftelli64_nolock
1
0
0
0
Robert Wilhelm : include: Add struct _stat32i64 and struct _stat64i32.
by Alexandre Julliard
26 May '10
26 May '10
Module: wine Branch: master Commit: b3429e883c8977ceb3df6660d38b24d7d5cfbc16 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3429e883c8977ceb3df6660d…
Author: Robert Wilhelm <robert.wilhelm(a)gmx.net> Date: Wed May 26 10:13:31 2010 +0200 include: Add struct _stat32i64 and struct _stat64i32. --- include/msvcrt/sys/stat.h | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/include/msvcrt/sys/stat.h b/include/msvcrt/sys/stat.h index 1712788..9362d2d 100644 --- a/include/msvcrt/sys/stat.h +++ b/include/msvcrt/sys/stat.h @@ -83,6 +83,34 @@ struct stat { time_t st_ctime; }; +struct _stat32i64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __int64 DECLSPEC_ALIGN(8) st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; +}; + +struct _stat64i32 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; +}; + struct _stati64 { _dev_t st_dev; _ino_t st_ino;
1
0
0
0
Nikolay Sivov : comctl32/listview: Perform ranges validation only when tracing enabled.
by Alexandre Julliard
26 May '10
26 May '10
Module: wine Branch: master Commit: 01fdf21717532e730543d34841a767c61c647d89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=01fdf21717532e730543d3484…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 26 03:01:56 2010 +0400 comctl32/listview: Perform ranges validation only when tracing enabled. --- dlls/comctl32/listview.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index e2bd9a7..4e13577 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -168,9 +168,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(listview); -/* make sure you set this to 0 for production use! */ -#define DEBUG_RANGES 1 - typedef struct tagCOLUMN_INFO { RECT rcHeader; /* tracks the header's rectangle */ @@ -2968,11 +2965,7 @@ static INT CALLBACK ranges_cmp(LPVOID range1, LPVOID range2, LPARAM flags) return cmp; } -#if DEBUG_RANGES -#define ranges_check(ranges, desc) ranges_assert(ranges, desc, __FUNCTION__, __LINE__) -#else -#define ranges_check(ranges, desc) do { } while(0) -#endif +#define ranges_check(ranges, desc) if (TRACE_ON(listview)) ranges_assert(ranges, desc, __FUNCTION__, __LINE__) static void ranges_assert(RANGES ranges, LPCSTR desc, const char *func, int line) { @@ -6961,7 +6954,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR nColumn = lprc->top; - TRACE("(nItem=%d, nSubItem=%d)\n", nItem, lprc->top); + TRACE("(nItem=%d, nSubItem=%d, type=%d)\n", nItem, lprc->top, lprc->left); /* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */ if (lprc->top == 0) return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200