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
June 2009
----- 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
5 participants
1115 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/listview: Improve grid drawing on LVS_EX_GRIDLINES style.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: 39398aedc7ce83deb5d975bc80beee659884a351 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39398aedc7ce83deb5d975bc8…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Jun 4 02:43:06 2009 +0400 comctl32/listview: Improve grid drawing on LVS_EX_GRIDLINES style. --- dlls/comctl32/listview.c | 37 +++++++++++++++++++++++-------------- 1 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 63500f2..b50bf2b 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4166,10 +4166,11 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) { INT rgntype; INT y, itemheight; + INT col, index; HPEN hPen, hOldPen; RECT rcClip, rcItem = {0}; POINT Origin; - RANGE colRange; + RANGES colRanges; ITERATOR j; BOOL rmost = FALSE; @@ -4182,21 +4183,23 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) /* Get scroll info once before loop */ LISTVIEW_GetOrigin(infoPtr, &Origin); + colRanges = ranges_create(DPA_GetPtrCount(infoPtr->hdpaColumns)); + /* narrow down the columns we need to paint */ - for(colRange.lower = 0; colRange.lower < DPA_GetPtrCount(infoPtr->hdpaColumns); colRange.lower++) - { - LISTVIEW_GetHeaderRect(infoPtr, colRange.lower, &rcItem); - if (rcItem.right + Origin.x >= rcClip.left) break; - } - for(colRange.upper = DPA_GetPtrCount(infoPtr->hdpaColumns); colRange.upper > 0; colRange.upper--) + for(col = 0; col < DPA_GetPtrCount(infoPtr->hdpaColumns); col++) { - LISTVIEW_GetHeaderRect(infoPtr, colRange.upper - 1, &rcItem); - if (rcItem.left + Origin.x < rcClip.right) break; + index = SendMessageW(infoPtr->hwndHeader, HDM_ORDERTOINDEX, col, 0); + + LISTVIEW_GetHeaderRect(infoPtr, index, &rcItem); + if ((rcItem.right + Origin.x >= rcClip.left) && (rcItem.left + Origin.x < rcClip.right)) + ranges_additem(colRanges, index); } + /* is right most vertical line visible? */ if (DPA_GetPtrCount(infoPtr->hdpaColumns) > 0) { - LISTVIEW_GetHeaderRect(infoPtr, DPA_GetPtrCount(infoPtr->hdpaColumns) - 1, &rcItem); + index = SendMessageW(infoPtr->hwndHeader, HDM_ORDERTOINDEX, DPA_GetPtrCount(infoPtr->hdpaColumns) - 1, 0); + LISTVIEW_GetHeaderRect(infoPtr, index, &rcItem); rmost = (rcItem.right + Origin.x < rcClip.right); } @@ -4205,11 +4208,11 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) hOldPen = SelectObject ( hdc, hPen ); /* draw the vertical lines for the columns */ - iterator_rangeitems(&j, colRange); + iterator_rangesitems(&j, colRanges); while(iterator_next(&j)) { LISTVIEW_GetHeaderRect(infoPtr, j.nItem, &rcItem); - if (rcItem.left == 0) continue; /* skip first column */ + if (rcItem.left == 0) continue; /* skip leftmost column */ rcItem.left += Origin.x; rcItem.right += Origin.x; rcItem.top = infoPtr->rcList.top; @@ -4222,8 +4225,14 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) /* draw rightmost grid line if visible */ if (rmost) { - MoveToEx (hdc, rcItem.right, rcItem.top, NULL); - LineTo (hdc, rcItem.right, rcItem.bottom); + index = SendMessageW(infoPtr->hwndHeader, HDM_ORDERTOINDEX, + DPA_GetPtrCount(infoPtr->hdpaColumns) - 1, 0); + LISTVIEW_GetHeaderRect(infoPtr, index, &rcItem); + + rcItem.right += Origin.x; + + MoveToEx (hdc, rcItem.right, infoPtr->rcList.top, NULL); + LineTo (hdc, rcItem.right, infoPtr->rcList.bottom); } /* draw the horizontial lines for the rows */
1
0
0
0
Nikolay Sivov : comctl32/listview: Improve item visibility calculation for report view.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: f8904e156fafa6b25eb70d50bbb0029fd0e1a3dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f8904e156fafa6b25eb70d50b…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Jun 4 01:43:28 2009 +0400 comctl32/listview: Improve item visibility calculation for report view. --- dlls/comctl32/listview.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index b83c697..63500f2 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4096,7 +4096,8 @@ static void LISTVIEW_RefreshReport(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, INT rgntype; RECT rcClip, rcItem; POINT Origin, Position; - RANGE colRange; + RANGES colRanges; + INT col, index; ITERATOR j; TRACE("()\n"); @@ -4107,19 +4108,19 @@ static void LISTVIEW_RefreshReport(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, /* Get scroll info once before loop */ LISTVIEW_GetOrigin(infoPtr, &Origin); - + + colRanges = ranges_create(DPA_GetPtrCount(infoPtr->hdpaColumns)); + /* narrow down the columns we need to paint */ - for(colRange.lower = 0; colRange.lower < DPA_GetPtrCount(infoPtr->hdpaColumns); colRange.lower++) + for(col = 0; col < DPA_GetPtrCount(infoPtr->hdpaColumns); col++) { - LISTVIEW_GetHeaderRect(infoPtr, colRange.lower, &rcItem); - if (rcItem.right + Origin.x >= rcClip.left) break; - } - for(colRange.upper = DPA_GetPtrCount(infoPtr->hdpaColumns); colRange.upper > 0; colRange.upper--) - { - LISTVIEW_GetHeaderRect(infoPtr, colRange.upper - 1, &rcItem); - if (rcItem.left + Origin.x < rcClip.right) break; + index = SendMessageW(infoPtr->hwndHeader, HDM_ORDERTOINDEX, col, 0); + + LISTVIEW_GetHeaderRect(infoPtr, index, &rcItem); + if ((rcItem.right + Origin.x >= rcClip.left) && (rcItem.left + Origin.x < rcClip.right)) + ranges_additem(colRanges, index); } - iterator_rangeitems(&j, colRange); + iterator_rangesitems(&j, colRanges); /* in full row select, we _have_ to draw the main item */ if (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)
1
0
0
0
Nikolay Sivov : comctl32/listview: Some tests for LVS_SORT[A, DE]SCENDING, remove these styles from TODOs.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: 3e4ba3048a64a33f2f8d798f12f37e84a8dda7bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e4ba3048a64a33f2f8d798f1…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Jun 3 22:43:28 2009 +0400 comctl32/listview: Some tests for LVS_SORT[A,DE]SCENDING, remove these styles from TODOs. --- dlls/comctl32/listview.c | 1 - dlls/comctl32/tests/listview.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index aa614c2..b83c697 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -80,7 +80,6 @@ * Styles * -- LVS_NOLABELWRAP * -- LVS_NOSCROLL (see Q137520) - * -- LVS_SORTASCENDING, LVS_SORTDESCENDING * -- LVS_ALIGNTOP * -- LVS_TYPESTYLEMASK * diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index d0aa1f3..a8e0b9b 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -2226,6 +2226,35 @@ static void test_ownerdata(void) "ownerdata getitem selected state 2", FALSE); DestroyWindow(hwnd); + + /* LVS_SORTASCENDING/LVS_SORTDESCENDING aren't compatible with LVS_OWNERDATA */ + hwnd = create_listview_control(LVS_OWNERDATA | LVS_SORTASCENDING); + ok(hwnd != NULL, "failed to create a listview window\n"); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_OWNERDATA, "Expected LVS_OWNERDATA\n"); + ok(style & LVS_SORTASCENDING, "Expected LVS_SORTASCENDING to be set\n"); + SetWindowLongPtrA(hwnd, GWL_STYLE, style & ~LVS_SORTASCENDING); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(!(style & LVS_SORTASCENDING), "Expected LVS_SORTASCENDING not set\n"); + DestroyWindow(hwnd); + /* apparently it's allowed to switch these style on after creation */ + hwnd = create_listview_control(LVS_OWNERDATA); + ok(hwnd != NULL, "failed to create a listview window\n"); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_OWNERDATA, "Expected LVS_OWNERDATA\n"); + SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_SORTASCENDING); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_SORTASCENDING, "Expected LVS_SORTASCENDING to be set\n"); + DestroyWindow(hwnd); + + hwnd = create_listview_control(LVS_OWNERDATA); + ok(hwnd != NULL, "failed to create a listview window\n"); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_OWNERDATA, "Expected LVS_OWNERDATA\n"); + SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_SORTDESCENDING); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_SORTDESCENDING, "Expected LVS_SORTDESCENDING to be set\n"); + DestroyWindow(hwnd); } static void test_norecompute(void)
1
0
0
0
Piotr Caban : jscript: Remove NaN related FIXMEs.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: eb203a149b2d3a20525ddb2eca4edb2ae59f5887 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb203a149b2d3a20525ddb2ec…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Jun 3 21:11:20 2009 +0200 jscript: Remove NaN related FIXMEs. --- dlls/jscript/date.c | 5 +---- dlls/jscript/global.c | 4 ++-- dlls/jscript/jscript.h | 7 +++++++ dlls/jscript/string.c | 4 ++-- dlls/jscript/tests/api.js | 6 ++++++ 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 0dac085..53ff314 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -81,11 +81,8 @@ static const WCHAR setUTCFullYearW[] = {'s','e','t','U','T','C','F','u','l','l', /* ECMA-262 3rd Edition 15.9.1.14 */ static inline DOUBLE time_clip(DOUBLE time) { - /* FIXME: Handle inf */ - if(8.64e15 < time || time < -8.64e15) { - FIXME("return NaN\n"); - return 0.0; + return ret_nan(); } return floor(time); diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 01d9eb2..a714f8e 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -351,8 +351,8 @@ static HRESULT JSGlobal_parseInt(DispatchEx *dispex, LCID lcid, WORD flags, DISP HRESULT hres; if(!arg_cnt(dp)) { - FIXME("NAN\n"); - return E_NOTIMPL; + if(retv) num_set_nan(retv); + return S_OK; } if(arg_cnt(dp) >= 2) { diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 4862b28..6cf3535 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -255,6 +255,13 @@ static inline void num_set_nan(VARIANT *v) #endif } +static inline DOUBLE ret_nan() +{ + VARIANT v; + num_set_nan(&v); + return V_R8(&v); +} + static inline void num_set_inf(VARIANT *v, BOOL positive) { V_VT(v) = VT_R8; diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index eeceb1f..82c1043 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -254,8 +254,8 @@ static HRESULT String_charCodeAt(DispatchEx *dispex, LCID lcid, WORD flags, DISP return hres; if(V_VT(&v) != VT_I4 || V_I4(&v) < 0 || V_I4(&v) >= length) { - FIXME("NAN\n"); - return E_FAIL; + if(retv) num_set_nan(&v); + return S_OK; } idx = V_I4(&v); diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index a17b067..2b6e0b2 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -934,6 +934,12 @@ var date = new Date(); date = new Date(100); ok(date.getTime() === 100, "date.getTime() = " + date.getTime()); ok(Date.prototype.getTime() === 0, "date.prototype.getTime() = " + Date.prototype.getTime()); +date = new Date(8.64e15); +ok(date.getTime() === 8.64e15, "date.getTime() = " + date.getTime()); +date = new Date(8.64e15+1); +ok(isNaN(0+date.getTime()), "date.getTime() is not NaN"); +date = new Date(Infinity); +ok(isNaN(0+date.getTime()), "date.getTime() is not NaN"); ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI)); ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
1
0
0
0
Piotr Caban : jscript: Fix parse_double_literal implementation.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: 931554dd4af64d6ec208152f1e1b8b19c3274cc6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=931554dd4af64d6ec208152f1…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Jun 3 23:17:47 2009 +0200 jscript: Fix parse_double_literal implementation. --- dlls/jscript/lex.c | 42 ++++++++++++++++++++++++++++++++++-------- dlls/jscript/tests/lang.js | 2 ++ 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index c066397..5b7e7a4 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -31,6 +31,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript); +#define LONGLONG_MAX (((LONGLONG)0x7fffffff<<32)|0xffffffff) + static const WCHAR breakW[] = {'b','r','e','a','k',0}; static const WCHAR caseW[] = {'c','a','s','e',0}; static const WCHAR catchW[] = {'c','a','t','c','h',0}; @@ -373,7 +375,8 @@ static literal_t *alloc_int_literal(parser_ctx_t *ctx, LONG l) static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **literal) { - double d, tmp = 1.0; + LONGLONG d, hlp; + int exp = 0; if(ctx->ptr == ctx->end || (!isdigitW(*ctx->ptr) && *ctx->ptr!='.' && *ctx->ptr!='e' && *ctx->ptr!='E')) { @@ -382,13 +385,32 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li } d = int_part; - while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) - d = d*10 + *(ctx->ptr++) - '0'; + while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { + hlp = d*10 + *(ctx->ptr++) - '0'; + if(d>LONGLONG_MAX/10 || hlp<0) { + exp++; + break; + } + else + d = hlp; + } + while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { + exp++; + ctx->ptr++; + } if(*ctx->ptr == '.') ctx->ptr++; + while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { + hlp = d*10 + *(ctx->ptr++) - '0'; + if(d>LONGLONG_MAX/10 || hlp<0) + break; + + d = hlp; + exp--; + } while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) - d += (tmp /= 10.0)*(*ctx->ptr++ - '0'); + ctx->ptr++; if(ctx->ptr < ctx->end && (*ctx->ptr == 'e' || *ctx->ptr == 'E')) { int sign = 1, e = 0; @@ -411,16 +433,20 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li return lex_error(ctx, E_FAIL); } - while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) - e = e*10 + *ctx->ptr++ - '0'; + while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { + if(e > INT_MAX/10 || (e = e*10 + *ctx->ptr++ - '0')<0) + e = INT_MAX; + } e *= sign; - d *= pow(10, e); + if(exp<0 && e<0 && e+exp>0) exp = INT_MIN; + else if(exp>0 && e>0 && e+exp<0) exp = INT_MAX; + else exp += e; } *literal = parser_alloc(ctx, sizeof(literal_t)); (*literal)->vt = VT_R8; - (*literal)->u.dval = d; + (*literal)->u.dval = (double)d*pow(10, exp); return tNumericLiteral; } diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index c4f0194..86eba86 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -35,6 +35,8 @@ ok(undefined === undefined, "undefined === undefined is false"); ok(!(undefined === null), "!(undefined === null) is false"); ok(1E0 === 1, "1E0 === 1 is false"); ok(1000000*1000000 === 1000000000000, "1000000*1000000 === 1000000000000 is false"); +ok(8.64e15 === 8640000000000000, "8.64e15 !== 8640000000000000"+8.64e15); +ok(1e2147483648 === Infinity, "1e2147483648 !== Infinity"); ok(1 !== 2, "1 !== 2 is false"); ok(null !== undefined, "null !== undefined is false");
1
0
0
0
Andrew Nguyen : rundll32: Load the 16-bit kernel32 exports by ordinal.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: 5e72f7b2a53ed270b644c1e12d54947492b12c92 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e72f7b2a53ed270b644c1e12…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Wed Jun 3 16:52:14 2009 -0500 rundll32: Load the 16-bit kernel32 exports by ordinal. --- programs/rundll32/rundll32.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/rundll32/rundll32.c b/programs/rundll32/rundll32.c index 37f831a..b360bed 100644 --- a/programs/rundll32/rundll32.c +++ b/programs/rundll32/rundll32.c @@ -88,7 +88,7 @@ static HINSTANCE16 load_dll16( LPCWSTR dll ) DWORD len = WideCharToMultiByte( CP_ACP, 0, dll, -1, NULL, 0, NULL, NULL ); char *dllA = HeapAlloc( GetProcessHeap(), 0, len ); WideCharToMultiByte( CP_ACP, 0, dll, -1, dllA, len, NULL, NULL ); - pLoadLibrary16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), "LoadLibrary16" ); + pLoadLibrary16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)35 ); if (pLoadLibrary16) ret = pLoadLibrary16( dllA ); HeapFree( GetProcessHeap(), 0, dllA ); return ret; @@ -100,7 +100,7 @@ static FARPROC16 get_entry_point16( HINSTANCE16 inst, LPCWSTR entry ) DWORD len = WideCharToMultiByte( CP_ACP, 0, entry, -1, NULL, 0, NULL, NULL ); char *entryA = HeapAlloc( GetProcessHeap(), 0, len ); WideCharToMultiByte( CP_ACP, 0, entry, -1, entryA, len, NULL, NULL ); - pGetProcAddress16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), "GetProcAddress16" ); + pGetProcAddress16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)37 ); if (pGetProcAddress16) ret = pGetProcAddress16( inst, entryA ); HeapFree( GetProcessHeap(), 0, entryA ); return ret;
1
0
0
0
Aric Stewart : msctf: Implement ITfContext::SetSelection.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: 584175bedf655b3cb719c294f9198d7ab34b9777 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=584175bedf655b3cb719c294f…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jun 3 11:27:31 2009 -0500 msctf: Implement ITfContext::SetSelection. --- dlls/msctf/context.c | 34 ++++++++++++++++++++++++++++++++-- dlls/msctf/msctf_internal.h | 1 + dlls/msctf/range.c | 16 ++++++++++++++++ dlls/msctf/tests/inputprocessor.c | 18 +++++++++++++++++- 4 files changed, 66 insertions(+), 3 deletions(-) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index d8322e6..be1ee2d 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -349,9 +349,39 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface, static HRESULT WINAPI Context_SetSelection (ITfContext *iface, TfEditCookie ec, ULONG ulCount, const TF_SELECTION *pSelection) { + TS_SELECTION_ACP *acp; Context *This = (Context *)iface; - FIXME("STUB:(%p)\n",This); - return E_NOTIMPL; + INT i; + HRESULT hr; + + TRACE("(%p) %i %i %p\n",This,ec,ulCount,pSelection); + + if (!This->pITextStoreACP) + { + FIXME("Context does not have a ITextStoreACP\n"); + return E_NOTIMPL; + } + + if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE) + return TF_E_NOLOCK; + + acp = HeapAlloc(GetProcessHeap(), 0, sizeof(TS_SELECTION_ACP) * ulCount); + if (!acp) + return E_OUTOFMEMORY; + + for (i = 0; i < ulCount; i++) + if (FAILED(TF_SELECTION_to_TS_SELECTION_ACP(&pSelection[i], &acp[i]))) + { + TRACE("Selection Conversion Failed\n"); + HeapFree(GetProcessHeap(), 0 , acp); + return E_FAIL; + } + + hr = ITextStoreACP_SetSelection(This->pITextStoreACP, ulCount, acp); + + HeapFree(GetProcessHeap(), 0, acp); + + return hr; } static HRESULT WINAPI Context_GetStart (ITfContext *iface, diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h index 9181b8c..f88516b 100644 --- a/dlls/msctf/msctf_internal.h +++ b/dlls/msctf/msctf_internal.h @@ -39,6 +39,7 @@ extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, extern HRESULT Context_Initialize(ITfContext *cxt); extern HRESULT Context_Uninitialize(ITfContext *cxt); +extern HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp); /* cookie function */ extern DWORD generate_Cookie(DWORD magic, LPVOID data); diff --git a/dlls/msctf/range.c b/dlls/msctf/range.c index dd92551..8b1f482 100644 --- a/dlls/msctf/range.c +++ b/dlls/msctf/range.c @@ -344,3 +344,19 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l return S_OK; } + +/* Internal conversion functions */ + +HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp) +{ + Range *This = (Range *)tf->range; + + if (!tf || !tsAcp || !tf->range) + return E_INVALIDARG; + + tsAcp->acpStart = This->anchorStart; + tsAcp->acpEnd = This->anchorEnd; + tsAcp->style.ase = tf->style.ase; + tsAcp->style.fInterimChar = tf->style.fInterimChar; + return S_OK; +} diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index 284980e..c4be695 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -64,6 +64,7 @@ static INT test_ACP_GetEndACP = SINK_UNEXPECTED; static INT test_ACP_GetSelection = SINK_UNEXPECTED; static INT test_DoEditSession = SINK_UNEXPECTED; static INT test_ACP_InsertTextAtSelection = SINK_UNEXPECTED; +static INT test_ACP_SetSelection = SINK_UNEXPECTED; /********************************************************************** @@ -177,7 +178,8 @@ static HRESULT WINAPI TextStoreACP_GetSelection(ITextStoreACP *iface, static HRESULT WINAPI TextStoreACP_SetSelection(ITextStoreACP *iface, ULONG ulCount, const TS_SELECTION_ACP *pSelection) { - trace("\n"); + ok(test_ACP_SetSelection == SINK_EXPECTED,"Unexpected TextStoreACP_SetSelection\n"); + test_ACP_SetSelection = SINK_FIRED; return S_OK; } static HRESULT WINAPI TextStoreACP_GetText(ITextStoreACP *iface, @@ -1449,6 +1451,20 @@ TfEditCookie ec) test_InsertAtSelection(ec, cxt); + test_ACP_GetEndACP = SINK_EXPECTED; + hr = ITfContext_GetEnd(cxt,ec,&range); + ok(SUCCEEDED(hr),"Unexpected return code %x\n",hr); + ok(range != NULL,"Range set to NULL\n"); + ok(test_ACP_GetEndACP == SINK_FIRED, "GetEndACP not fired as expected\n"); + + selection.range = range; + selection.style.ase = TF_AE_NONE; + selection.style.fInterimChar = FALSE; + test_ACP_SetSelection = SINK_EXPECTED; + hr = ITfContext_SetSelection(cxt, ec, 1, &selection); + ok(test_ACP_SetSelection == SINK_FIRED, "SetSelection not fired as expected\n"); + ITfRange_Release(range); + ITfContext_Release(cxt); ITfDocumentMgr_Release(dm); return 0xdeadcafe;
1
0
0
0
Aric Stewart : msctf: Implement ITfInsertAtSelection::InsertTextAtSelection .
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: 432db51ac36b4cc635bcd2f268d1a546c8815a7e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=432db51ac36b4cc635bcd2f26…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jun 3 11:27:24 2009 -0500 msctf: Implement ITfInsertAtSelection::InsertTextAtSelection. --- dlls/msctf/context.c | 31 +++++++++++++++++++++++++++++-- dlls/msctf/tests/inputprocessor.c | 24 +++++++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index 9a0c8fe..d8322e6 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -613,8 +613,35 @@ static WINAPI HRESULT InsertAtSelection_InsertTextAtSelection( const WCHAR *pchText, LONG cch, ITfRange **ppRange) { Context *This = impl_from_ITfInsertAtSelectionVtbl(iface); - FIXME("STUB:(%p)\n",This); - return E_NOTIMPL; + EditCookie *cookie; + LONG acpStart, acpEnd; + TS_TEXTCHANGE change; + HRESULT hr; + + TRACE("(%p) %i %x %s %p\n",This, ec, dwFlags, debugstr_wn(pchText,cch), ppRange); + + if (!This->connected) + return TF_E_DISCONNECTED; + + if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE) + return TF_E_NOLOCK; + + cookie = get_Cookie_data(ec); + + if ((cookie->lockType & TS_LF_READWRITE) != TS_LF_READWRITE ) + return TS_E_READONLY; + + if (!This->pITextStoreACP) + { + FIXME("Context does not have a ITextStoreACP\n"); + return E_NOTIMPL; + } + + hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change); + if (SUCCEEDED(hr)) + Range_Constructor((ITfContext*)This, This->pITextStoreACP, cookie->lockType, change.acpStart, change.acpNewEnd, ppRange); + + return hr; } static WINAPI HRESULT InsertAtSelection_InsertEmbeddedAtSelection( diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index bdb9a62..284980e 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -63,6 +63,7 @@ static INT test_ACP_RequestLock = SINK_UNEXPECTED; static INT test_ACP_GetEndACP = SINK_UNEXPECTED; static INT test_ACP_GetSelection = SINK_UNEXPECTED; static INT test_DoEditSession = SINK_UNEXPECTED; +static INT test_ACP_InsertTextAtSelection = SINK_UNEXPECTED; /********************************************************************** @@ -223,7 +224,8 @@ static HRESULT WINAPI TextStoreACP_InsertTextAtSelection(ITextStoreACP *iface, DWORD dwFlags, const WCHAR *pchText, ULONG cch, LONG *pacpStart, LONG *pacpEnd, TS_TEXTCHANGE *pChange) { - trace("\n"); + ok(test_ACP_InsertTextAtSelection == SINK_EXPECTED,"Unexpected TextStoreACP_InsertTextAtSelection\n"); + test_ACP_InsertTextAtSelection = SINK_FIRED; return S_OK; } static HRESULT WINAPI TextStoreACP_InsertEmbeddedAtSelection(ITextStoreACP *iface, @@ -1371,6 +1373,24 @@ static ULONG WINAPI EditSession_Release(ITfEditSession *iface) return ret; } +static void test_InsertAtSelection(TfEditCookie ec, ITfContext *cxt) +{ + HRESULT hr; + ITfInsertAtSelection *iis; + ITfRange *range=NULL; + static const WCHAR txt[] = {'H','e','l','l','o',' ','W','o','r','l','d',0}; + + hr = ITfContext_QueryInterface(cxt, &IID_ITfInsertAtSelection , (LPVOID*)&iis); + ok(SUCCEEDED(hr),"Failed to get ITfInsertAtSelection interface\n"); + test_ACP_InsertTextAtSelection = SINK_EXPECTED; + hr = ITfInsertAtSelection_InsertTextAtSelection(iis, ec, 0, txt, 11, &range); + ok(SUCCEEDED(hr),"ITfInsertAtSelection_InsertTextAtSelection failed %x\n",hr); + ok(test_ACP_InsertTextAtSelection == SINK_FIRED,"expected InsertTextAtSelection not fired\n"); + ok(range != NULL,"No range returned\n"); + ITfRange_Release(range); + ITfInsertAtSelection_Release(iis); +} + static HRESULT WINAPI EditSession_DoEditSession(ITfEditSession *iface, TfEditCookie ec) { @@ -1427,6 +1447,8 @@ TfEditCookie ec) ok(test_ACP_GetSelection == SINK_FIRED," expected ACP_GetSepection not fired\n"); ITfRange_Release(selection.range); + test_InsertAtSelection(ec, cxt); + ITfContext_Release(cxt); ITfDocumentMgr_Release(dm); return 0xdeadcafe;
1
0
0
0
Andrew Talbot : comctl32: Various const qualifier fixes.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: b898f8dd582dc52bbf6b42ca5a19a12988edb21a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b898f8dd582dc52bbf6b42ca5…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Jun 3 21:47:16 2009 +0100 comctl32: Various const qualifier fixes. --- dlls/comctl32/comctl32.h | 6 +++--- dlls/comctl32/dpa.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index 872638d..1f2f63e 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -183,15 +183,15 @@ DWORD WINAPI GetSize (LPVOID); INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT); INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT); -INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID); -BOOL WINAPI DPA_Grow (const HDPA, INT); +INT WINAPI DPA_GetPtrIndex (HDPA, LPCVOID); +BOOL WINAPI DPA_Grow (HDPA, INT); #define DPAM_NOSORT 0x0001 #define DPAM_INSERT 0x0004 #define DPAM_DELETE 0x0008 typedef PVOID (CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM); -BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM); +BOOL WINAPI DPA_Merge (HDPA, HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM); #define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa)) diff --git a/dlls/comctl32/dpa.c b/dlls/comctl32/dpa.c index a14c530..bbad10d 100644 --- a/dlls/comctl32/dpa.c +++ b/dlls/comctl32/dpa.c @@ -217,7 +217,7 @@ HRESULT WINAPI DPA_SaveStream (const HDPA hDpa, DPALOADPROC loadProc, * NOTES * No more information available yet! */ -BOOL WINAPI DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD dwFlags, +BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags, PFNDPACOMPARE pfnCompare, PFNDPAMERGE pfnMerge, LPARAM lParam) { @@ -381,7 +381,7 @@ BOOL WINAPI DPA_Destroy (const HDPA hdpa) * Success: TRUE * Failure: FALSE */ -BOOL WINAPI DPA_Grow (const HDPA hdpa, INT nGrow) +BOOL WINAPI DPA_Grow (HDPA hdpa, INT nGrow) { TRACE("(%p %d)\n", hdpa, nGrow); @@ -504,7 +504,7 @@ LPVOID WINAPI DPA_GetPtr (const HDPA hdpa, INT nIndex) * Success: index of the specified pointer * Failure: -1 */ -INT WINAPI DPA_GetPtrIndex (const HDPA hdpa, LPVOID p) +INT WINAPI DPA_GetPtrIndex (HDPA hdpa, LPCVOID p) { INT i;
1
0
0
0
Paul Vriens : user32/tests: Fix a test failure on Win95.
by Alexandre Julliard
04 Jun '09
04 Jun '09
Module: wine Branch: master Commit: f9ecd7397eefdee6dd11f3ccd478d1d72607f2f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9ecd7397eefdee6dd11f3ccd…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Jun 4 10:54:25 2009 +0200 user32/tests: Fix a test failure on Win95. --- dlls/user32/tests/sysparams.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index d055fa0..7b2edaf 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -2731,12 +2731,14 @@ static void test_EnumDisplaySettings(void) DWORD num; memset(&devmode, 0, sizeof(devmode)); - devmode.dmSize = sizeof(devmode); + /* Win95 doesn't handle ENUM_CURRENT_SETTINGS correctly */ EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); hdc = GetDC(0); val = GetDeviceCaps(hdc, BITSPIXEL); - ok(devmode.dmBitsPerPel == val, "GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d\n", + ok(devmode.dmBitsPerPel == val || + broken(devmode.dmDeviceName[0] == 0), /* Win95 */ + "GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d\n", val, devmode.dmBitsPerPel); val = GetDeviceCaps(hdc, NUMCOLORS);
1
0
0
0
← Newer
1
...
93
94
95
96
97
98
99
...
112
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200