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
February 2020
----- 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
874 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Directly return error code instead of using throw_range_error.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: b67c957f395dcb26d5dd60c5be7b7f7eb1b29a72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b67c957f395dcb26d5dd60c5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 31 17:23:00 2020 +0100 jscript: Directly return error code instead of using throw_range_error. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/array.c | 4 ++-- dlls/jscript/error.c | 5 ----- dlls/jscript/jscript.h | 1 - dlls/jscript/number.c | 10 +++++----- dlls/jscript/vbarray.c | 8 ++++---- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/dlls/jscript/array.c b/dlls/jscript/array.c index 51a4cf1d38..5e022bc929 100644 --- a/dlls/jscript/array.c +++ b/dlls/jscript/array.c @@ -149,7 +149,7 @@ static HRESULT Array_set_length(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t val len = floor(len); if(len!=(DWORD)len) - return throw_range_error(ctx, JS_E_INVALID_LENGTH, NULL); + return JS_E_INVALID_LENGTH; for(i=len; i < This->length; i++) { hres = jsdisp_delete_idx(&This->dispex, i); @@ -1281,7 +1281,7 @@ static HRESULT ArrayConstr_value(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, double n = get_number(argv[0]); if(n < 0 || !is_int32(n)) - return throw_range_error(ctx, JS_E_INVALID_LENGTH, NULL); + return JS_E_INVALID_LENGTH; hres = create_array(ctx, n, &obj); if(FAILED(hres)) diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index e52310d473..13bc0e6ba4 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -435,11 +435,6 @@ static HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str, j return error; } -HRESULT throw_range_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str) -{ - return throw_error(ctx, error, str, ctx->range_error_constr); -} - HRESULT throw_reference_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str) { return throw_error(ctx, error, str, ctx->reference_error_constr); diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 05dcfd01a1..fa7058d201 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -312,7 +312,6 @@ HRESULT Function_get_value(script_ctx_t*,jsdisp_t*,jsval_t*) DECLSPEC_HIDDEN; struct _function_code_t *Function_get_code(jsdisp_t*) DECLSPEC_HIDDEN; #define DEFAULT_FUNCTION_VALUE {NULL, Function_value,0, Function_get_value} -HRESULT throw_range_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_reference_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_regexp_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_syntax_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/number.c b/dlls/jscript/number.c index d78cc1e5a9..ff842134bb 100644 --- a/dlls/jscript/number.c +++ b/dlls/jscript/number.c @@ -375,8 +375,8 @@ static HRESULT Number_toFixed(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un if(FAILED(hres)) return hres; - if(prec<0 || prec>20) - return throw_range_error(ctx, JS_E_FRACTION_DIGITS_OUT_OF_RANGE, NULL); + if(prec < 0 || prec > 20) + return JS_E_FRACTION_DIGITS_OUT_OF_RANGE; } val = number->value; @@ -416,8 +416,8 @@ static HRESULT Number_toExponential(script_ctx_t *ctx, vdisp_t *jsthis, WORD fla if(FAILED(hres)) return hres; - if(prec<0 || prec>20) - return throw_range_error(ctx, JS_E_FRACTION_DIGITS_OUT_OF_RANGE, NULL); + if(prec < 0 || prec > 20) + return JS_E_FRACTION_DIGITS_OUT_OF_RANGE; } val = number->value; @@ -458,7 +458,7 @@ static HRESULT Number_toPrecision(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags return hres; if(prec<1 || prec>21) - return throw_range_error(ctx, JS_E_PRECISION_OUT_OF_RANGE, NULL); + return JS_E_PRECISION_OUT_OF_RANGE; } val = number->value; diff --git a/dlls/jscript/vbarray.c b/dlls/jscript/vbarray.c index 4bed5fb076..1a474d6ac0 100644 --- a/dlls/jscript/vbarray.c +++ b/dlls/jscript/vbarray.c @@ -80,7 +80,7 @@ static HRESULT VBArray_getItem(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, un return throw_type_error(ctx, JS_E_VBARRAY_EXPECTED, NULL); if(argc < SafeArrayGetDim(vbarray->safearray)) - return throw_range_error(ctx, JS_E_SUBSCRIPT_OUT_OF_RANGE, NULL); + return JS_E_SUBSCRIPT_OUT_OF_RANGE; indexes = heap_alloc(sizeof(int)*argc); if(!indexes) @@ -97,7 +97,7 @@ static HRESULT VBArray_getItem(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, un hres = SafeArrayGetElement(vbarray->safearray, indexes, (void*)&out); heap_free(indexes); if(hres == DISP_E_BADINDEX) - return throw_range_error(ctx, JS_E_SUBSCRIPT_OUT_OF_RANGE, NULL); + return JS_E_SUBSCRIPT_OUT_OF_RANGE; else if(FAILED(hres)) return hres; @@ -130,7 +130,7 @@ static HRESULT VBArray_lbound(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, uns hres = SafeArrayGetLBound(vbarray->safearray, dim, &dim); if(hres == DISP_E_BADINDEX) - return throw_range_error(ctx, JS_E_SUBSCRIPT_OUT_OF_RANGE, NULL); + return JS_E_SUBSCRIPT_OUT_OF_RANGE; else if(FAILED(hres)) return hres; @@ -216,7 +216,7 @@ static HRESULT VBArray_ubound(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, uns hres = SafeArrayGetUBound(vbarray->safearray, dim, &dim); if(hres == DISP_E_BADINDEX) - return throw_range_error(ctx, JS_E_SUBSCRIPT_OUT_OF_RANGE, NULL); + return JS_E_SUBSCRIPT_OUT_OF_RANGE; else if(FAILED(hres)) return hres;
1
0
0
0
Jacek Caban : jscript: Directly return error code instead of using throw_generic_error.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: 1d487027a0410262f09af195fbc69792291771ad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1d487027a0410262f09af195…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 31 17:22:54 2020 +0100 jscript: Directly return error code instead of using throw_generic_error. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/activex.c | 2 +- dlls/jscript/error.c | 5 ----- dlls/jscript/jscript.h | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/dlls/jscript/activex.c b/dlls/jscript/activex.c index 1c2631cc77..9c8c681b5e 100644 --- a/dlls/jscript/activex.c +++ b/dlls/jscript/activex.c @@ -172,7 +172,7 @@ static HRESULT ActiveXObject_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag obj = create_activex_object(ctx, progid); jsstr_release(progid_str); if(!obj) - return throw_generic_error(ctx, JS_E_CANNOT_CREATE_OBJ, NULL); + return JS_E_CANNOT_CREATE_OBJ; hres = IUnknown_QueryInterface(obj, &IID_IDispatch, (void**)&disp); IUnknown_Release(obj); diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index 7b35e16600..e52310d473 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -435,11 +435,6 @@ static HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str, j return error; } -HRESULT throw_generic_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str) -{ - return throw_error(ctx, error, str, ctx->error_constr); -} - HRESULT throw_range_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str) { return throw_error(ctx, error, str, ctx->range_error_constr); diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 93c6f92bae..05dcfd01a1 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -312,8 +312,6 @@ HRESULT Function_get_value(script_ctx_t*,jsdisp_t*,jsval_t*) DECLSPEC_HIDDEN; struct _function_code_t *Function_get_code(jsdisp_t*) DECLSPEC_HIDDEN; #define DEFAULT_FUNCTION_VALUE {NULL, Function_value,0, Function_get_value} -HRESULT throw_eval_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; -HRESULT throw_generic_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_range_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_reference_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_regexp_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : jscript: Factor out format_error_message implementation.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: 940b02584e6b2119ef0fd456d3612c04d43a6ffa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=940b02584e6b2119ef0fd456…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 31 17:22:48 2020 +0100 jscript: Factor out format_error_message implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/error.c | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index 685fbd362f..7b35e16600 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -19,6 +19,7 @@ #include <math.h> #include <assert.h> +#include <wchar.h> #include "jscript.h" #include "engine.h" @@ -374,9 +375,42 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t *object_prototype) return S_OK; } +static jsstr_t *format_error_message(HRESULT error, const WCHAR *arg) +{ + size_t len, arg_len = 0; + const WCHAR *res, *pos; + WCHAR *buf, *p; + jsstr_t *r; + + if(!is_jscript_error(error)) + return jsstr_empty(); + + len = LoadStringW(jscript_hinstance, HRESULT_CODE(error), (WCHAR*)&res, 0); + + pos = wmemchr(res, '|', len); + if(pos && arg) + arg_len = lstrlenW(arg); + r = jsstr_alloc_buf(len + arg_len - (pos ? 1 : 0), &buf); + if(!r) + return jsstr_empty(); + + p = buf; + if(pos > res) { + memcpy(p, res, (pos - res) * sizeof(WCHAR)); + p += pos - res; + } + pos = pos ? pos + 1 : res; + if(arg_len) { + memcpy(p, arg, arg_len * sizeof(WCHAR)); + p += arg_len; + } + if(pos != res + len) + memcpy(p, pos, (res + len - pos) * sizeof(WCHAR)); + return r; +} + static HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str, jsdisp_t *constr) { - WCHAR buf[1024], *pos = NULL; jsdisp_t *err; jsstr_t *msg; HRESULT hres; @@ -384,22 +418,12 @@ static HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str, j if(!is_jscript_error(error)) return error; - buf[0] = '\0'; - LoadStringW(jscript_hinstance, HRESULT_CODE(error), buf, ARRAY_SIZE(buf)); - - if(str) pos = wcschr(buf, '|'); - if(pos) { - int len = lstrlenW(str); - memmove(pos+len, pos+1, (lstrlenW(pos+1)+1)*sizeof(WCHAR)); - memcpy(pos, str, len*sizeof(WCHAR)); - } - - WARN("%s\n", debugstr_w(buf)); - - msg = jsstr_alloc(buf); + msg = format_error_message(error, str); if(!msg) return E_OUTOFMEMORY; + WARN("%s\n", debugstr_jsstr(msg)); + hres = create_error(ctx, constr, error, msg, &err); jsstr_release(msg); if(FAILED(hres))
1
0
0
0
Jacek Caban : jscript: Suport generic error object for exception with no associated JavaScript exception value.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: f6c5da47f7555dfb0762becdf7245d7db8a22062 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6c5da47f7555dfb0762becd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 31 17:22:42 2020 +0100 jscript: Suport generic error object for exception with no associated JavaScript exception value. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 18 +++++++---- dlls/jscript/error.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/jscript/global.c | 2 +- dlls/jscript/jscript.h | 1 + dlls/jscript/tests/lang.js | 31 ++++++++++++++++++ 5 files changed, 125 insertions(+), 7 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 8b121747fe..2fa171764b 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2753,8 +2753,8 @@ static HRESULT unwind_exception(script_ctx_t *ctx, HRESULT exception_hres) static const WCHAR messageW[] = {'m','e','s','s','a','g','e',0}; WARN("Exception %08x %s", exception_hres, debugstr_jsval(ei->valid_value ? ei->value : jsval_undefined())); - if(ei->valid_value && jsval_type(ctx->ei->value) == JSV_OBJECT) { - error_obj = to_jsdisp(get_object(ctx->ei->value)); + if(ei->valid_value && jsval_type(ei->value) == JSV_OBJECT) { + error_obj = to_jsdisp(get_object(ei->value)); if(error_obj) { hres = jsdisp_propget_name(error_obj, messageW, &msg); if(SUCCEEDED(hres)) { @@ -2768,6 +2768,9 @@ static HRESULT unwind_exception(script_ctx_t *ctx, HRESULT exception_hres) print_backtrace(ctx); } + if(exception_hres != DISP_E_EXCEPTION) + ei->error = exception_hres; + for(frame = ctx->call_ctx; !frame->except_frame; frame = ctx->call_ctx) { DWORD flags; @@ -2779,7 +2782,7 @@ static HRESULT unwind_exception(script_ctx_t *ctx, HRESULT exception_hres) flags = frame->flags; pop_call_frame(ctx); if(!(flags & EXEC_RETURN_TO_INTERP)) - return exception_hres; + return DISP_E_EXCEPTION; } except_frame = frame->except_frame; @@ -2792,13 +2795,16 @@ static HRESULT unwind_exception(script_ctx_t *ctx, HRESULT exception_hres) scope_pop(&frame->scope); frame->ip = catch_off ? catch_off : except_frame->finally_off; - if(catch_off) assert(frame->bytecode->instrs[frame->ip].op == OP_enter_catch); + assert(!catch_off || frame->bytecode->instrs[frame->ip].op == OP_enter_catch); if(ei->valid_value) { except_val = ctx->ei->value; - ctx->ei->valid_value = FALSE; + ei->valid_value = FALSE; }else { - except_val = jsval_undefined(); + jsdisp_t *err; + if(!(err = create_builtin_error(ctx))) + return E_OUTOFMEMORY; + except_val = jsval_obj(err); } /* keep current except_frame if we're entering catch block with finally block associated */ diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index 66dbccfbc0..685fbd362f 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -18,6 +18,7 @@ #include <math.h> +#include <assert.h> #include "jscript.h" #include "engine.h" @@ -444,3 +445,82 @@ HRESULT throw_uri_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str) { return throw_error(ctx, error, str, ctx->uri_error_constr); } + +jsdisp_t *create_builtin_error(script_ctx_t *ctx) +{ + jsdisp_t *constr = ctx->error_constr, *r; + jsexcept_t *ei = ctx->ei; + HRESULT hres; + + assert(FAILED(ei->error) && ei->error != DISP_E_EXCEPTION); + + if(is_jscript_error(ei->error)) { + switch(ei->error) { + case JS_E_SYNTAX: + case JS_E_MISSING_SEMICOLON: + case JS_E_MISSING_LBRACKET: + case JS_E_MISSING_RBRACKET: + case JS_E_EXPECTED_IDENTIFIER: + case JS_E_EXPECTED_ASSIGN: + case JS_E_INVALID_CHAR: + case JS_E_UNTERMINATED_STRING: + case JS_E_MISPLACED_RETURN: + case JS_E_INVALID_BREAK: + case JS_E_INVALID_CONTINUE: + case JS_E_LABEL_REDEFINED: + case JS_E_LABEL_NOT_FOUND: + case JS_E_EXPECTED_CCEND: + case JS_E_DISABLED_CC: + case JS_E_EXPECTED_AT: + constr = ctx->syntax_error_constr; + break; + + case JS_E_TO_PRIMITIVE: + case JS_E_INVALIDARG: + case JS_E_OBJECT_REQUIRED: + case JS_E_INVALID_PROPERTY: + case JS_E_INVALID_ACTION: + case JS_E_MISSING_ARG: + case JS_E_FUNCTION_EXPECTED: + case JS_E_DATE_EXPECTED: + case JS_E_NUMBER_EXPECTED: + case JS_E_OBJECT_EXPECTED: + case JS_E_UNDEFINED_VARIABLE: + case JS_E_BOOLEAN_EXPECTED: + case JS_E_VBARRAY_EXPECTED: + case JS_E_INVALID_DELETE: + case JS_E_JSCRIPT_EXPECTED: + case JS_E_ENUMERATOR_EXPECTED: + case JS_E_ARRAY_EXPECTED: + case JS_E_NONCONFIGURABLE_REDEFINED: + case JS_E_NONWRITABLE_MODIFIED: + case JS_E_PROP_DESC_MISMATCH: + case JS_E_INVALID_WRITABLE_PROP_DESC: + constr = ctx->type_error_constr; + break; + + case JS_E_SUBSCRIPT_OUT_OF_RANGE: + case JS_E_FRACTION_DIGITS_OUT_OF_RANGE: + case JS_E_PRECISION_OUT_OF_RANGE: + case JS_E_INVALID_LENGTH: + constr = ctx->range_error_constr; + break; + + case JS_E_ILLEGAL_ASSIGN: + constr = ctx->reference_error_constr; + break; + + case JS_E_REGEXP_SYNTAX: + constr = ctx->regexp_error_constr; + break; + + case JS_E_INVALID_URI_CODING: + case JS_E_INVALID_URI_CHAR: + constr = ctx->uri_error_constr; + break; + } + } + + hres = create_error(ctx, constr, ei->error, jsstr_empty(), &r); + return SUCCEEDED(hres) ? r : NULL; +} diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index bd1f45b940..2b5f3894ca 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -207,7 +207,7 @@ HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned a hres = compile_script(ctx, src, 0, 0, NULL, NULL, TRUE, FALSE, &code); if(FAILED(hres)) { WARN("parse (%s) failed: %08x\n", debugstr_jsval(argv[0]), hres); - return throw_syntax_error(ctx, hres, NULL); + return hres; } if(!frame || (frame->flags & EXEC_GLOBAL)) diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 1c85691edd..93c6f92bae 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -320,6 +320,7 @@ HRESULT throw_regexp_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_syntax_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_type_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; HRESULT throw_uri_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN; +jsdisp_t *create_builtin_error(script_ctx_t *ctx) DECLSPEC_HIDDEN; HRESULT create_object(script_ctx_t*,jsdisp_t*,jsdisp_t**) DECLSPEC_HIDDEN; HRESULT create_math(script_ctx_t*,jsdisp_t**) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 4812a066d1..be0d0d2fa1 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1186,6 +1186,37 @@ case 3: expect(ret, "try"); })(); +(function() { + var e; + var E_FAIL = -2147467259; + var JS_E_SUBSCRIPT_OUT_OF_RANGE = -2146828279; + + try { + throwInt(E_FAIL); + }catch(ex) { + e = ex; + } + ok(e.name === "Error", "e.name = " + e.name); + ok(e.message === "", "e.message = " + e.message); + ok(e.number === E_FAIL, "e.number = " + e.number); + + try { + throwInt(JS_E_SUBSCRIPT_OUT_OF_RANGE); + }catch(ex) { + e = ex; + } + ok(e.name === "RangeError", "e.name = " + e.name); + ok(e.number === JS_E_SUBSCRIPT_OUT_OF_RANGE, "e.number = " + e.number); + + try { + throwEI(JS_E_SUBSCRIPT_OUT_OF_RANGE); + }catch(ex) { + e = ex; + } + ok(e.name === "RangeError", "e.name = " + e.name); + ok(e.number === JS_E_SUBSCRIPT_OUT_OF_RANGE, "e.number = " + e.number); +})(); + tmp = eval("1"); ok(tmp === 1, "eval(\"1\") !== 1"); eval("{ ok(tmp === 1, 'eval: tmp !== 1'); } tmp = 2;");
1
0
0
0
Vijay Kiran Kamuju : mscms: Add stub for WcsGetDefaultRenderingIntent.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: a0e4dbcfd5d46e325a0811aac4d85ab1ec4ca30e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a0e4dbcfd5d46e325a0811aa…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Fri Jan 31 02:00:28 2020 +0100 mscms: Add stub for WcsGetDefaultRenderingIntent. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48541
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscms/mscms.spec | 2 +- dlls/mscms/profile.c | 10 ++++++++++ include/icm.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/mscms/mscms.spec b/dlls/mscms/mscms.spec index c535d4c88e..cfe32a826e 100644 --- a/dlls/mscms/mscms.spec +++ b/dlls/mscms/mscms.spec @@ -93,7 +93,7 @@ @ stub WcsGetCalibrationManagementState @ stub WcsGetDefaultColorProfile @ stdcall WcsGetDefaultColorProfileSize(long wstr long long long ptr) -@ stub WcsGetDefaultRenderingIntent +@ stdcall WcsGetDefaultRenderingIntent(long ptr) @ stdcall WcsGetUsePerUserProfiles(wstr long ptr) @ stub WcsGpCanInstallOrUninstallProfiles @ stdcall WcsOpenColorProfileA(ptr ptr ptr long long long long) diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index efc0e4b416..ed0ed53158 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -1564,6 +1564,16 @@ BOOL WINAPI WcsGetDefaultColorProfileSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, P return FALSE; } +/****************************************************************************** + * WcsGetDefaultRednderingIntent [MSCMS.@] + */ +BOOL WINAPI WcsGetDefaultRenderingIntent( WCS_PROFILE_MANAGEMENT_SCOPE scope, PDWORD intent) +{ + FIXME( "%d %p\n", scope, intent ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + /****************************************************************************** * WcsOpenColorProfileA [MSCMS.@] */ diff --git a/include/icm.h b/include/icm.h index dab0b5f2e5..cd0e2c0c2a 100644 --- a/include/icm.h +++ b/include/icm.h @@ -500,6 +500,7 @@ BOOL WINAPI UnregisterCMMW(PCWSTR,DWORD); #define UnregisterCMM WINELIB_NAME_AW(UnregisterCMM) BOOL WINAPI WcsEnumColorProfilesSize(WCS_PROFILE_MANAGEMENT_SCOPE,ENUMTYPEW*,DWORD*); BOOL WINAPI WcsGetDefaultColorProfileSize(WCS_PROFILE_MANAGEMENT_SCOPE,const WCHAR*,COLORPROFILETYPE,COLORPROFILESUBTYPE,DWORD,DWORD*); +BOOL WINAPI WcsGetDefaultRenderingIntent(WCS_PROFILE_MANAGEMENT_SCOPE,DWORD*); BOOL WINAPI WcsGetUsePerUserProfiles(const WCHAR*,DWORD,BOOL*); HPROFILE WINAPI WcsOpenColorProfileA(PROFILE*,PROFILE*,PROFILE*,DWORD,DWORD,DWORD,DWORD); HPROFILE WINAPI WcsOpenColorProfileW(PROFILE*,PROFILE*,PROFILE*,DWORD,DWORD,DWORD,DWORD);
1
0
0
0
Vijay Kiran Kamuju : mscms: Add stub for WcsGetDefaultColorProfileSize.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: 87e14f61027eef63cea7bcf68727454c482fa1f9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=87e14f61027eef63cea7bcf6…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Fri Jan 31 01:50:01 2020 +0100 mscms: Add stub for WcsGetDefaultColorProfileSize. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48541
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscms/mscms.spec | 2 +- dlls/mscms/profile.c | 12 ++++++++++++ include/icm.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/mscms/mscms.spec b/dlls/mscms/mscms.spec index fec0af571d..c535d4c88e 100644 --- a/dlls/mscms/mscms.spec +++ b/dlls/mscms/mscms.spec @@ -92,7 +92,7 @@ @ stdcall WcsEnumColorProfilesSize(long ptr ptr) @ stub WcsGetCalibrationManagementState @ stub WcsGetDefaultColorProfile -@ stub WcsGetDefaultColorProfileSize +@ stdcall WcsGetDefaultColorProfileSize(long wstr long long long ptr) @ stub WcsGetDefaultRenderingIntent @ stdcall WcsGetUsePerUserProfiles(wstr long ptr) @ stub WcsGpCanInstallOrUninstallProfiles diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index d45ac4af12..efc0e4b416 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -1552,6 +1552,18 @@ BOOL WINAPI WcsEnumColorProfilesSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, ENUMTY return FALSE; } +/****************************************************************************** + * WcsGetDefaultColorProfileSize [MSCMS.@] + */ +BOOL WINAPI WcsGetDefaultColorProfileSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, PCWSTR device_name, + COLORPROFILETYPE type, COLORPROFILESUBTYPE subtype, + DWORD profile_id, PDWORD profile_size) +{ + FIXME( "%d %s %d %d %d %p\n", scope, debugstr_w(device_name), type, subtype, profile_id, profile_size ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + /****************************************************************************** * WcsOpenColorProfileA [MSCMS.@] */ diff --git a/include/icm.h b/include/icm.h index 67bfcc89fd..dab0b5f2e5 100644 --- a/include/icm.h +++ b/include/icm.h @@ -499,6 +499,7 @@ BOOL WINAPI UnregisterCMMA(PCSTR,DWORD); BOOL WINAPI UnregisterCMMW(PCWSTR,DWORD); #define UnregisterCMM WINELIB_NAME_AW(UnregisterCMM) BOOL WINAPI WcsEnumColorProfilesSize(WCS_PROFILE_MANAGEMENT_SCOPE,ENUMTYPEW*,DWORD*); +BOOL WINAPI WcsGetDefaultColorProfileSize(WCS_PROFILE_MANAGEMENT_SCOPE,const WCHAR*,COLORPROFILETYPE,COLORPROFILESUBTYPE,DWORD,DWORD*); BOOL WINAPI WcsGetUsePerUserProfiles(const WCHAR*,DWORD,BOOL*); HPROFILE WINAPI WcsOpenColorProfileA(PROFILE*,PROFILE*,PROFILE*,DWORD,DWORD,DWORD,DWORD); HPROFILE WINAPI WcsOpenColorProfileW(PROFILE*,PROFILE*,PROFILE*,DWORD,DWORD,DWORD,DWORD);
1
0
0
0
Vijay Kiran Kamuju : include: Add missing defines to icm.h.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: b4db9884c396b22f78e357c01fa77ebac58d2422 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b4db9884c396b22f78e357c0…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Fri Jan 31 01:43:13 2020 +0100 include: Add missing defines to icm.h. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/icm.h | 168 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 137 insertions(+), 31 deletions(-) diff --git a/include/icm.h b/include/icm.h index de5bf2626e..67bfcc89fd 100644 --- a/include/icm.h +++ b/include/icm.h @@ -137,20 +137,20 @@ typedef enum typedef enum { - BM_x555RGB = 0x00, - BM_565RGB = 0x01, - BM_RGBTRIPLETS = 0x02, - BM_BGRTRIPLETS = 0x04, - BM_xRGBQUADS = 0x08, - BM_10b_RGB = 0x09, - BM_16b_RGB = 0x0a, - BM_xBGRQUADS = 0x10, - BM_CMYKQUADS = 0x20, - BM_x555XYZ = 0x101, + BM_x555RGB = 0x0000, + BM_565RGB = 0x0001, + BM_RGBTRIPLETS = 0x0002, + BM_BGRTRIPLETS = 0x0004, + BM_xRGBQUADS = 0x0008, + BM_10b_RGB = 0x0009, + BM_16b_RGB = 0x000a, + BM_xBGRQUADS = 0x0010, + BM_CMYKQUADS = 0x0020, + BM_x555XYZ = 0x0101, BM_x555Yxz, BM_x555Lab, BM_x555G3CH, - BM_XYZTRIPLETS = 0x201, + BM_XYZTRIPLETS = 0x0201, BM_YxyTRIPLETS, BM_LabTRIPLETS, BM_G3CHTRIPLETS, @@ -159,21 +159,28 @@ typedef enum BM_7CHANNEL, BM_8CHANNEL, BM_GRAY, - BM_xXYZQUADS = 0x301, + BM_xXYZQUADS = 0x0301, BM_xYxyQUADS, BM_xLabQUADS, BM_xG3CHQUADS, BM_KYMCQUADS, - BM_10b_XYZ = 0x401, + BM_10b_XYZ = 0x0401, BM_10b_Yxy, BM_10b_Lab, BM_10b_G3CH, BM_NAMED_INDEX, - BM_16b_XYZ = 0x501, + BM_16b_XYZ = 0x0501, BM_16b_Yxy, BM_16b_Lab, BM_16b_G3CH, BM_16b_GRAY, + BM_32b_scRGB = 0x0601, + BM_32b_scARGB, + BM_S2DOT13FIXED_scRGB, + BM_S2DOT13FIXED_scARGB, + BM_R10G10B10A2 = 0x0701, + BM_R10G10B10A2_XR, + BM_R16G16B16A16_FLOAT } BMFORMAT, *PBMFORMAT, *LPBMFORMAT; typedef enum @@ -182,6 +189,36 @@ typedef enum WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER } WCS_PROFILE_MANAGEMENT_SCOPE; +#define DONT_USE_EMBEDDED_WCS_PROFILES 0x00000001 + +#define PROOF_MODE 0x00000001 +#define NORMAL_MODE 0x00000002 +#define BEST_MODE 0x00000003 +#define ENABLE_GAMUT_CHECKING 0x00010000 +#define USE_RELATIVE_COLORIMETRIC 0x00020000 +#define FAST_TRANSLATE 0x00040000 +#define PRESERVEBLACK 0x00100000 +#define WCS_ALWAYS 0x00200000 +#define RESERVED 0x80000000 +#define SEQUENTIAL_TRANSFORM 0x80800000 + +#define CSA_A 1 +#define CSA_ABC 2 +#define CSA_DEF 3 +#define CSA_DEFG 4 +#define CSA_GRAY 5 +#define CSA_RGB 6 +#define CSA_CMYK 7 +#define CSA_Lab 8 + +#define CMM_WIN_VERSION 0 +#define CMM_IDENT 1 +#define CMM_DRIVER_VERSION 2 +#define CMM_DLL_VERSION 3 +#define CMM_VERSION 4 +#define CMM_DESCRIPTION 5 +#define CMM_LOGOICON 6 + typedef BOOL (CALLBACK *PBMCALLBACKFN)(ULONG,ULONG,LPARAM); typedef PBMCALLBACKFN LPPBMCALLBACKFN; @@ -190,6 +227,38 @@ typedef PBMCALLBACKFN LPPBMCALLBACKFN; #define INTENT_SATURATION 2 #define INTENT_ABSOLUTE_COLORIMETRIC 3 +typedef enum +{ + CPT_ICC, + CPT_DMP, + CPT_CAMP, + CPT_GMMP +} COLORPROFILETYPE, *PCOLORPROFILETYPE, *LPCOLORPROFILETYPE; + +typedef enum +{ + CPST_PERCEPTUAL = INTENT_PERCEPTUAL, + CPST_RELATIVE_COLORIMETRIC = INTENT_RELATIVE_COLORIMETRIC, + CPST_SATURATION = INTENT_SATURATION, + CPST_ABSOLUTE_COLORIMETRIC = INTENT_ABSOLUTE_COLORIMETRIC, + CPST_NONE, + CPST_RGB_WORKING_SPACE, + CPST_CUSTOM_WORKING_SPACE, + CPST_STANDARD_DISPLAY_COLOR_MODE, + CPST_EXTENDED_DISPLAY_COLOR_MODE +} COLORPROFILESUBTYPE, *PCOLORPROFILESUBTYPE, *LPCOLORPROFILESUBTYPE; + +typedef enum +{ + COLOR_BYTE = 1, + COLOR_WORD, + COLOR_FLOAT, + COLOR_S2DOT13FIXED, + COLOR_10b_R10G10B10A2, + COLOR_10b_R10G10B10A2_XR, + COLOR_FLOAT16 +} COLORDATATYPE, *PCOLORDATATYPE, *LPCOLORDATATYPE; + typedef struct tagPROFILEHEADER { DWORD phSize; @@ -268,23 +337,43 @@ typedef struct tagENUMTYPEW DWORD dwDeviceClass; } ENUMTYPEW, *PENUMTYPEW, *LPENUMTYPEW; -#define ET_DEVICENAME 0x00000001 -#define ET_MEDIATYPE 0x00000002 -#define ET_DITHERMODE 0x00000004 -#define ET_RESOLUTION 0x00000008 -#define ET_CMMTYPE 0x00000010 -#define ET_CLASS 0x00000020 -#define ET_DATACOLORSPACE 0x00000040 -#define ET_CONNECTIONSPACE 0x00000080 -#define ET_SIGNATURE 0x00000100 -#define ET_PLATFORM 0x00000200 -#define ET_PROFILEFLAGS 0x00000400 -#define ET_MANUFACTURER 0x00000800 -#define ET_MODEL 0x00001000 -#define ET_ATTRIBUTES 0x00002000 -#define ET_RENDERINGINTENT 0x00004000 -#define ET_CREATOR 0x00008000 -#define ET_DEVICECLASS 0x00010000 +#define ET_DEVICENAME 0x00000001 +#define ET_MEDIATYPE 0x00000002 +#define ET_DITHERMODE 0x00000004 +#define ET_RESOLUTION 0x00000008 +#define ET_CMMTYPE 0x00000010 +#define ET_CLASS 0x00000020 +#define ET_DATACOLORSPACE 0x00000040 +#define ET_CONNECTIONSPACE 0x00000080 +#define ET_SIGNATURE 0x00000100 +#define ET_PLATFORM 0x00000200 +#define ET_PROFILEFLAGS 0x00000400 +#define ET_MANUFACTURER 0x00000800 +#define ET_MODEL 0x00001000 +#define ET_ATTRIBUTES 0x00002000 +#define ET_RENDERINGINTENT 0x00004000 +#define ET_CREATOR 0x00008000 +#define ET_DEVICECLASS 0x00010000 +#define ET_STANDARDDISPLAYCOLOR 0x00020000 +#define ET_EXTENDEDDISPLAYCOLOR 0x00040000 + +#define COLOR_MATCH_VERSION 0x0200 + +#define CMS_DISABLEICM 0x00000001 +#define CMS_ENABLEPROOFING 0x00000002 +#define CMS_SETRENDERINTENT 0x00000004 +#define CMS_SETPROOFINTENT 0x00000008 +#define CMS_SETMONITORPROFILE 0x00000010 +#define CMS_SETPRINTERPROFILE 0x00000020 +#define CMS_SETTARGETPROFILE 0x00000040 +#define CMS_USEHOOK 0x00000080 +#define CMS_USEAPPLYCALLBACK 0x00000100 +#define CMS_USEDESCRIPTION 0x00000200 +#define CMS_DISABLEINTENT 0x00000400 +#define CMS_DISABLERENDERINTENT 0x00000800 +#define CMS_TARGETOVERFLOW 0x20000000 +#define CMS_PRINTERROVERFLOW 0x40000000 +#define CMS_MONITOROVERFLOW 0x80000000 struct _tagCOLORMATCHSETUPA; struct _tagCOLORMATCHSETUPW; @@ -420,6 +509,23 @@ HPROFILE WINAPI WcsOpenColorProfileW(PROFILE*,PROFILE*,PROFILE*,DWORD,DWORD,DW #define PROFILE_READ 1 #define PROFILE_READWRITE 2 +#define FLAG_EMBEDDEDPROFILE 0x00000001 +#define FLAG_DEPENDENTONDATA 0x00000002 +#define FLAG_ENABLE_CHROMATIC_ADAPTATION 0x02000000 + +#define ATTRIB_TRANSPARENCY 0x00000001 +#define ATTRIB_MATTE 0x00000002 + +#define CLASS_MONITOR 0x6D6E7472 /* 'mntr' */ +#define CLASS_PRINTER 0x70727472 /* 'prtr' */ +#define CLASS_SCANNER 0x73636E72 /* 'scnr' */ +#define CLASS_LINK 0x6C696E6B /* 'link' */ +#define CLASS_ABSTRACT 0x61627374 /* 'abst' */ +#define CLASS_COLORSPACE 0x73617063 /* 'spac' */ +#define CLASS_NAMED 0x6E6D636C /* 'nmcl' */ +#define CLASS_CAMP 0x63616D70 /* 'camp' */ +#define CLASS_GMMP 0x676D6D70 /* 'gmmp' */ + #define SPACE_XYZ 0x58595A20 /* 'XYZ ' */ #define SPACE_Lab 0x4C616220 /* 'Lab ' */ #define SPACE_Luv 0x4C757620 /* 'Luv ' */
1
0
0
0
Nikolay Sivov : msi: Change unknown platform enum entry name.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: 5aeb9ed82efd4a02d24eac4ffdb64e7badb5f8bd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5aeb9ed82efd4a02d24eac4f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 31 13:34:15 2020 +0300 msi: Change unknown platform enum entry name. Public shlwapi.h defines same name, it seems safer to rename internal type. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/msipriv.h | 2 +- dlls/msi/package.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 6b87cfb3d8..572bb08768 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -363,7 +363,7 @@ typedef struct msi_dialog_tag msi_dialog; enum platform { - PLATFORM_UNKNOWN, + PLATFORM_UNRECOGNIZED, PLATFORM_INTEL, PLATFORM_INTEL64, PLATFORM_X64, diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 86fee09547..5065558827 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1209,7 +1209,7 @@ static enum platform parse_platform( const WCHAR *str ) else if (!wcscmp( str, szX64 ) || !wcscmp( str, szAMD64 )) return PLATFORM_X64; else if (!wcscmp( str, szARM )) return PLATFORM_ARM; else if (!wcscmp( str, szARM64 )) return PLATFORM_ARM64; - return PLATFORM_UNKNOWN; + return PLATFORM_UNRECOGNIZED; } static UINT parse_suminfo( MSISUMMARYINFO *si, MSIPACKAGE *package ) @@ -1237,13 +1237,13 @@ static UINT parse_suminfo( MSISUMMARYINFO *si, MSIPACKAGE *package ) platform = template; if ((q = wcschr( platform, ',' ))) *q = 0; package->platform = parse_platform( platform ); - while (package->platform == PLATFORM_UNKNOWN && q) + while (package->platform == PLATFORM_UNRECOGNIZED && q) { platform = q + 1; if ((q = wcschr( platform, ',' ))) *q = 0; package->platform = parse_platform( platform ); } - if (package->platform == PLATFORM_UNKNOWN) + if (package->platform == PLATFORM_UNRECOGNIZED) { WARN("unknown platform %s\n", debugstr_w(template)); msi_free( template );
1
0
0
0
Nikolay Sivov : include: Fix QITAB definition.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: b066205dd5ca73e319d13aa4c1584f2441ad6499 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b066205dd5ca73e319d13aa4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 31 13:31:12 2020 +0300 include: Fix QITAB definition. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/shlwapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/shlwapi.h b/include/shlwapi.h index d02005763b..8d6801a94d 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -1139,7 +1139,7 @@ BOOL WINAPI IsOS(DWORD); typedef struct { const IID *piid; - int dwOffset; + DWORD dwOffset; } QITAB, *LPQITAB; HRESULT WINAPI QISearch(void* base, const QITAB *pqit, REFIID riid, void **ppv);
1
0
0
0
Nikolay Sivov : wincodecs: Add 32RGBA -> 24BGR conversion path.
by Alexandre Julliard
02 Feb '20
02 Feb '20
Module: wine Branch: master Commit: ec518757305ddedad95b0ffaf2f0a64acee13b95 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec518757305ddedad95b0ffa…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 31 13:27:33 2020 +0300 wincodecs: Add 32RGBA -> 24BGR conversion path. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/converter.c | 42 +++++++++++++++++++++++++++--------- dlls/windowscodecs/tests/converter.c | 31 +++++++++++++++++--------- 2 files changed, 53 insertions(+), 20 deletions(-) diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index dcc2f05693..6e4f5c5f9b 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -1038,6 +1038,7 @@ static HRESULT copypixels_to_24bppBGR(struct FormatConverter *This, const WICRec case format_32bppBGR: case format_32bppBGRA: case format_32bppPBGRA: + case format_32bppRGBA: if (prc) { HRESULT res; @@ -1061,17 +1062,38 @@ static HRESULT copypixels_to_24bppBGR(struct FormatConverter *This, const WICRec { srcrow = srcdata; dstrow = pbBuffer; - for (y=0; y<prc->Height; y++) { - srcpixel=srcrow; - dstpixel=dstrow; - for (x=0; x<prc->Width; x++) { - *dstpixel++=*srcpixel++; /* blue */ - *dstpixel++=*srcpixel++; /* green */ - *dstpixel++=*srcpixel++; /* red */ - srcpixel++; /* alpha */ + + if (source_format == format_32bppRGBA) + { + for (y = 0; y < prc->Height; y++) + { + srcpixel = srcrow; + dstpixel = dstrow; + for (x = 0; x < prc->Width; x++) { + *dstpixel++ = srcpixel[2]; /* blue */ + *dstpixel++ = srcpixel[1]; /* green */ + *dstpixel++ = srcpixel[0]; /* red */ + srcpixel += 4; + } + srcrow += srcstride; + dstrow += cbStride; + } + } + else + { + for (y = 0; y < prc->Height; y++) + { + srcpixel = srcrow; + dstpixel = dstrow; + for (x = 0; x < prc->Width; x++) { + *dstpixel++ = *srcpixel++; /* blue */ + *dstpixel++ = *srcpixel++; /* green */ + *dstpixel++ = *srcpixel++; /* red */ + srcpixel++; /* alpha */ + } + srcrow += srcstride; + dstrow += cbStride; } - srcrow += srcstride; - dstrow += cbStride; } } diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index d4c13658f4..0a7e7238aa 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -470,12 +470,22 @@ static const BYTE bits_32bppBGRA[] = { 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255}; +static const BYTE bits_32bppRGBA[] = { + 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, + 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, + 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, + 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, + 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, + 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, + 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, + 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255}; + static const struct bitmap_data testdata_32bppBGRA = { &GUID_WICPixelFormat32bppBGRA, 32, bits_32bppBGRA, 32, 2, 96.0, 96.0}; static const struct bitmap_data testdata_32bppRGBA = { - &GUID_WICPixelFormat32bppRGBA, 32, bits_32bppBGRA, 32, 2, 96.0, 96.0}; + &GUID_WICPixelFormat32bppRGBA, 32, bits_32bppRGBA, 32, 2, 96.0, 96.0}; static const struct bitmap_data testdata_32bppRGB = { - &GUID_WICPixelFormat32bppRGB, 32, bits_32bppBGRA, 32, 2, 96.0, 96.0}; + &GUID_WICPixelFormat32bppRGB, 32, bits_32bppRGBA, 32, 2, 96.0, 96.0}; static const BYTE bits_32bppPBGRA[] = { 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, @@ -492,14 +502,14 @@ static const struct bitmap_data testdata_32bppPRGBA = { &GUID_WICPixelFormat32bppPRGBA, 32, bits_32bppPBGRA, 32, 2, 96.0, 96.0}; static const BYTE bits_64bppRGBA[] = { - 128,255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255,128, 255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255, - 128,255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255,128, 255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255, - 128,255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255,128, 255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255, - 128,255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255,128, 255,128,0,128,0,128,255,128, 0,128,255,128,0,128,255,128, 0,128,0,128,255,128,255,128, 0,128,0,128,0,128,255, - 128,0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255,128, 0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255, - 128,0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255,128, 0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255, - 128,0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255,128, 0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255, - 128,0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255,128, 0,128,255,128,255,128,255,128, 255,128,0,128,255,128,255,128, 255,128,255,128,0,128,255,128, 255,128,255,128,255,128,255}; + 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, + 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, + 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, + 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, + 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, + 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, + 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, + 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255}; static const struct bitmap_data testdata_64bppRGBA = { &GUID_WICPixelFormat64bppRGBA, 64, bits_64bppRGBA, 32, 2, 96.0, 96.0}; @@ -1818,6 +1828,7 @@ START_TEST(converter) test_conversion(&testdata_32bppBGR, &testdata_24bppRGB, "32bppBGR -> 24bppRGB", FALSE); test_conversion(&testdata_24bppRGB, &testdata_32bppBGR, "24bppRGB -> 32bppBGR", FALSE); test_conversion(&testdata_32bppBGRA, &testdata_24bppRGB, "32bppBGRA -> 24bppRGB", FALSE); + test_conversion(&testdata_32bppRGBA, &testdata_24bppBGR, "32bppRGBA -> 24bppBGR", FALSE); test_conversion(&testdata_64bppRGBA, &testdata_32bppRGBA, "64bppRGBA -> 32bppRGBA", FALSE); test_conversion(&testdata_64bppRGBA, &testdata_32bppRGB, "64bppRGBA -> 32bppRGB", FALSE);
1
0
0
0
← Newer
1
...
83
84
85
86
87
88
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
Results per page:
10
25
50
100
200