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
December 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
3 participants
1233 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Make undefined a property of global object.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: a0467ef11c0d31d06203c9a7a24f62819d128570 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0467ef11c0d31d06203c9a7a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Dec 21 00:24:11 2009 +0100 jscript: Make undefined a property of global object. --- dlls/jscript/engine.c | 3 --- dlls/jscript/engine.h | 1 - dlls/jscript/global.c | 5 +++++ dlls/jscript/lex.c | 1 - dlls/jscript/parser.y | 13 +------------ dlls/jscript/tests/lang.js | 6 ++++++ 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 9a89431..b9c40ae 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -350,9 +350,6 @@ static HRESULT equal2_values(VARIANT *lval, VARIANT *rval, BOOL *ret) static HRESULT literal_to_var(script_ctx_t *ctx, literal_t *literal, VARIANT *v) { switch(literal->type) { - case LT_UNDEFINED: - V_VT(v) = VT_EMPTY; - break; case LT_NULL: V_VT(v) = VT_NULL; break; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 83096db..0bcabf6 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -131,7 +131,6 @@ typedef enum { LT_DOUBLE, LT_STRING, LT_BOOL, - LT_UNDEFINED, LT_NULL, LT_REGEXP }literal_type_t; diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 501da79..af142ed 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -1176,6 +1176,11 @@ HRESULT init_global(script_ctx_t *ctx) if(FAILED(hres)) return hres; + V_VT(&var) = VT_EMPTY; + hres = jsdisp_propput_name(ctx->global, undefinedW, &var, NULL/*FIXME*/, NULL/*FIXME*/); + if(FAILED(hres)) + return hres; + V_VT(&var) = VT_DISPATCH; V_DISPATCH(&var) = (IDispatch*)_IDispatchEx_(math); hres = jsdisp_propput_name(ctx->global, MathW, &var, NULL/*FIXME*/, NULL/*FIXME*/); diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 4e04dea..2e79db9 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -91,7 +91,6 @@ static const struct { {trueW, kTRUE}, {tryW, kTRY}, {typeofW, kTYPEOF}, - {undefinedW, kUNDEFINED}, {varW, kVAR}, {voidW, kVOID}, {whileW, kWHILE}, diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 0683ab6..cc9097d 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -38,7 +38,6 @@ typedef struct _statement_list_t { static literal_t *new_string_literal(parser_ctx_t*,const WCHAR*); static literal_t *new_null_literal(parser_ctx_t*); -static literal_t *new_undefined_literal(parser_ctx_t*); static literal_t *new_boolean_literal(parser_ctx_t*,VARIANT_BOOL); typedef struct _property_list_t { @@ -171,7 +170,7 @@ static source_elements_t *source_elements_add_statement(source_elements_t*,state /* keywords */ %token kBREAK kCASE kCATCH kCONTINUE kDEFAULT kDELETE kDO kELSE kIF kFINALLY kFOR kIN -%token kINSTANCEOF kNEW kNULL kUNDEFINED kRETURN kSWITCH kTHIS kTHROW kTRUE kFALSE kTRY kTYPEOF kVAR kVOID kWHILE kWITH +%token kINSTANCEOF kNEW kNULL kRETURN kSWITCH kTHIS kTHROW kTRUE kFALSE kTRY kTYPEOF kVAR kVOID kWHILE kWITH %token tANDAND tOROR tINC tDEC tHTMLCOMMENT kDIVEQ %token <srcptr> kFUNCTION '}' @@ -800,7 +799,6 @@ Identifier_opt /* ECMA-262 3rd Edition 7.8 */ Literal : kNULL { $$ = new_null_literal(ctx); } - | kUNDEFINED { $$ = new_undefined_literal(ctx); } | BooleanLiteral { $$ = $1; } | tNumericLiteral { $$ = $1; } | tStringLiteral { $$ = new_string_literal(ctx, $1); } @@ -856,15 +854,6 @@ static literal_t *new_null_literal(parser_ctx_t *ctx) return ret; } -static literal_t *new_undefined_literal(parser_ctx_t *ctx) -{ - literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); - - ret->type = LT_UNDEFINED; - - return ret; -} - static literal_t *new_boolean_literal(parser_ctx_t *ctx, VARIANT_BOOL bval) { literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index b13091f..d91b1f2 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1013,4 +1013,10 @@ ok(typeof(doesnotexist) === "undefined", "typeof(doesnotexist) = " + typeof(does (function() { newValue = 1; })(); ok(newValue === 1, "newValue = " + newValue); +obj = {undefined: 3}; + +/* Keep this test in the end of file */ +undefined = 6; +ok(undefined === 6, "undefined = " + undefined); + reportSuccess();
1
0
0
0
Hans Leidekker : wininet: Always set last error in HttpSendRequest{, Ex}.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: 68453a525133529e601b74f6922477514495c349 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68453a525133529e601b74f69…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Dec 21 11:13:44 2009 +0100 wininet: Always set last error in HttpSendRequest{,Ex}. --- dlls/wininet/http.c | 6 ++---- dlls/wininet/tests/http.c | 13 +++++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 6786380..aa5a449 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -4000,8 +4000,7 @@ lend: WININET_Release( &lpwhr->hdr ); TRACE("<---\n"); - if(res != ERROR_SUCCESS) - SetLastError(res); + SetLastError(res); return res == ERROR_SUCCESS; } @@ -4089,8 +4088,7 @@ lend: if( lpwhr ) WININET_Release( &lpwhr->hdr ); - if(res != ERROR_SUCCESS) - SetLastError(res); + SetLastError(res); return res == ERROR_SUCCESS; } diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 892bb1e..345172c 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -971,8 +971,7 @@ static void HttpSendRequestEx_test(void) HINTERNET hRequest; INTERNET_BUFFERS BufferIn; - DWORD dwBytesWritten; - DWORD dwBytesRead; + DWORD dwBytesWritten, dwBytesRead, error; CHAR szBuffer[256]; int i; BOOL ret; @@ -1008,8 +1007,11 @@ static void HttpSendRequestEx_test(void) BufferIn.dwOffsetLow = 0; BufferIn.dwOffsetHigh = 0; + SetLastError(0xdeadbeef); ret = HttpSendRequestEx(hRequest, &BufferIn, NULL, 0 ,0); - ok(ret, "HttpSendRequestEx Failed with error %u\n", GetLastError()); + error = GetLastError(); + ok(ret, "HttpSendRequestEx Failed with error %u\n", error); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); for (i = 3; szPostData[i]; i++) ok(InternetWriteFile(hRequest, &szPostData[i], 1, &dwBytesWritten), @@ -1752,7 +1754,7 @@ static DWORD CALLBACK server_thread(LPVOID param) static void test_basic_request(int port, const char *verb, const char *url) { HINTERNET hi, hc, hr; - DWORD r, count; + DWORD r, count, error; char buffer[0x100]; hi = InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); @@ -1764,8 +1766,11 @@ static void test_basic_request(int port, const char *verb, const char *url) hr = HttpOpenRequest(hc, verb, url, NULL, NULL, NULL, 0, 0); ok(hr != NULL, "HttpOpenRequest failed\n"); + SetLastError(0xdeadbeef); r = HttpSendRequest(hr, NULL, 0, NULL, 0); + error = GetLastError(); ok(r, "HttpSendRequest failed\n"); + ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); count = 0; memset(buffer, 0, sizeof buffer);
1
0
0
0
Michael Stefaniuc : windowscodecs: Don't cast NULL.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: ae8c2ec267db3c9b781b7443889ba30387bd587b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae8c2ec267db3c9b781b74438…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 20 23:33:54 2009 +0100 windowscodecs: Don't cast NULL. --- dlls/windowscodecs/pngformat.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 3334d76..f361363 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -235,7 +235,7 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p This->info_ptr = ppng_create_info_struct(This->png_ptr); if (!This->info_ptr) { - ppng_destroy_read_struct(&This->png_ptr, (png_infopp)NULL, (png_infopp)NULL); + ppng_destroy_read_struct(&This->png_ptr, NULL, NULL); This->png_ptr = NULL; return E_FAIL; } @@ -243,7 +243,7 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p This->end_info = ppng_create_info_struct(This->png_ptr); if (!This->info_ptr) { - ppng_destroy_read_struct(&This->png_ptr, &This->info_ptr, (png_infopp)NULL); + ppng_destroy_read_struct(&This->png_ptr, &This->info_ptr, NULL); This->png_ptr = NULL; return E_FAIL; } @@ -1107,7 +1107,7 @@ static HRESULT WINAPI PngEncoder_Initialize(IWICBitmapEncoder *iface, This->info_ptr = ppng_create_info_struct(This->png_ptr); if (!This->info_ptr) { - ppng_destroy_write_struct(&This->png_ptr, (png_infopp)NULL); + ppng_destroy_write_struct(&This->png_ptr, NULL); This->png_ptr = NULL; return E_FAIL; }
1
0
0
0
Michael Stefaniuc : user32/tests: Don't cast NULL to an integer type.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: 6c7c2401adc5565cb9029b5114291771baed4501 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c7c2401adc5565cb9029b511…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 20 23:33:40 2009 +0100 user32/tests: Don't cast NULL to an integer type. --- dlls/user32/tests/edit.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index e42127f..2ef8fd0 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -2179,7 +2179,7 @@ static void test_dialogmode(void) len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); ok(11 == len, "expected 11, got %d\n", len); - r = SendMessage(hwEdit, WM_GETDLGCODE, (WPARAM)NULL, (LPARAM)NULL); + r = SendMessage(hwEdit, WM_GETDLGCODE, 0, 0); ok(0x8d == r, "expected 0x8d, got 0x%x\n", r); r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); @@ -2187,7 +2187,7 @@ static void test_dialogmode(void) len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); ok(13 == len, "expected 13, got %d\n", len); - r = SendMessage(hwEdit, WM_GETDLGCODE, (WPARAM)NULL, (LPARAM)&msg); + r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); ok(0x8d == r, "expected 0x8d, got 0x%x\n", r); r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); ok(1 == r, "expected 1, got %d\n", r);
1
0
0
0
Michael Stefaniuc : cryptui: Don't cast NULL to an integer type.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: 20c3512b590f45f69f502c49b597ed670378a456 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20c3512b590f45f69f502c49b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 20 23:33:48 2009 +0100 cryptui: Don't cast NULL to an integer type. --- dlls/cryptui/main.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index aefae3e..a95a7a4 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -1464,7 +1464,7 @@ static void enumerate_stores(HWND hwnd, CRYPTUI_ENUM_DATA *pEnumData) static void free_store_info(HWND tree) { HTREEITEM next = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CHILD, - (LPARAM)NULL); + 0); while (next) { @@ -1552,7 +1552,7 @@ static LRESULT CALLBACK select_store_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, { HWND tree = GetDlgItem(hwnd, IDC_STORE_LIST); HTREEITEM selection = (HTREEITEM)SendMessageW(tree, - TVM_GETNEXTITEM, TVGN_CARET, (LPARAM)NULL); + TVM_GETNEXTITEM, TVGN_CARET, 0); selectInfo = (struct SelectStoreInfo *)GetWindowLongPtrW(hwnd, DWLP_USER); @@ -4113,8 +4113,7 @@ static void show_dialog_for_selected_cert(HWND hwnd) memset(&item, 0, sizeof(item)); item.mask = TVIF_HANDLE | TVIF_PARAM; - item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CARET, - (LPARAM)NULL); + item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CARET, 0); SendMessageW(tree, TVM_GETITEMW, 0, (LPARAM)&item); data = get_hierarchy_data_from_tree_item(tree, item.hItem); selection = lparam_to_index(data, item.lParam); @@ -4216,7 +4215,7 @@ static LRESULT CALLBACK hierarchy_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, memset(&item, 0, sizeof(item)); item.mask = TVIF_HANDLE | TVIF_PARAM; item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_ROOT, - (LPARAM)NULL); + 0); data = get_hierarchy_data_from_tree_item(tree, item.hItem); /* Delete the contents of the tree */ SendMessageW(tree, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT);
1
0
0
0
Michael Stefaniuc : comctl32/tests: Don't cast NULL to an integer type.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: 93d45253cdaadba93d02bb745403faf85fa45473 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93d45253cdaadba93d02bb745…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 20 23:33:34 2009 +0100 comctl32/tests: Don't cast NULL to an integer type. --- dlls/comctl32/tests/header.c | 2 +- dlls/comctl32/tests/listview.c | 4 ++-- dlls/comctl32/tests/treeview.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 8d6ad1f..102327a 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -1756,7 +1756,7 @@ static void test_hdm_orderarray(void) if (0) { /* null pointer, crashes native */ - ret = SendMessage(hwnd, HDM_SETORDERARRAY, 3, (LPARAM)NULL); + ret = SendMessage(hwnd, HDM_SETORDERARRAY, 3, 0); expect(FALSE, ret); } /* count out of limits */ diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 8017521..a21eb23 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1945,7 +1945,7 @@ static void test_multiselect(void) expect(items,item_count); /* try with NULL pointer */ - r = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)NULL); + r = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, 0); expect(FALSE, r); /* select all, check notifications */ @@ -2979,7 +2979,7 @@ static void test_hittest(void) y = (bounds.bottom - bounds.top) / 2; test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE, __LINE__); - himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)NULL); + himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, 0); ok(himl2 == himl, "should return handle\n"); r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl); diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index e763feb..c49dd80 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -924,7 +924,7 @@ static void test_itemedit(void) fill_tree(hTree); /* try with null item */ - edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, (LPARAM)NULL); + edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, 0); ok(!IsWindow(edit), "Expected valid handle\n"); /* trigger edit */ @@ -934,14 +934,14 @@ static void test_itemedit(void) r = SendMessage(hTree, TVM_GETITEMSTATE, (WPARAM)hRoot, TVIS_SELECTED); expect(0, r); /* try to cancel with wrong edit handle */ - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)NULL); + r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0); expect(0, r); ok(IsWindow(edit), "Expected edit control to be valid\n"); r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit); expect(0, r); ok(!IsWindow(edit), "Expected edit control to be destroyed\n"); /* try to cancel without creating edit */ - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)NULL); + r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0); expect(0, r); /* try to cancel with wrong (not null) handle */
1
0
0
0
Nikolay Sivov : kernel32/tests: Print line numbers in tests.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: a29bbda1a415bb9c28f106e9fe235d3532a739b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a29bbda1a415bb9c28f106e9f…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Dec 19 16:54:07 2009 +0300 kernel32/tests: Print line numbers in tests. --- dlls/kernel32/tests/actctx.c | 348 +++++++++++++++++++++--------------------- 1 files changed, 174 insertions(+), 174 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a29bbda1a415bb9c28f10…
1
0
0
0
Nikolay Sivov : comctl32/rebar: Don' t read outside of bands array on dragging.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: 48efba00b63b89e1cae097ec0da9adcb49c6e213 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=48efba00b63b89e1cae097ec0…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Dec 19 14:24:53 2009 +0300 comctl32/rebar: Don't read outside of bands array on dragging. --- dlls/comctl32/rebar.c | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 8e744b8..dd385af 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -2020,14 +2020,18 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, const POINT *ptsmove) - (xBand + REBAR_PRE_GRIPPER - infoPtr->ihitoffset); if (movement < 0) { - int cxLeft = REBAR_ShrinkBandsRTL(infoPtr, iRowBegin, iHitBand, -movement, TRUE); + INT cxLeft = REBAR_ShrinkBandsRTL(infoPtr, iRowBegin, iHitBand, -movement, TRUE); hitBand->cxEffective += -movement - cxLeft; hitBand->cx = hitBand->cxEffective; } else if (movement > 0) { - int cxLeft = REBAR_ShrinkBandsLTR(infoPtr, iHitBand, iRowEnd, movement, TRUE); - REBAR_BAND *lpPrev = REBAR_GetBand(infoPtr, prev_visible(infoPtr, iHitBand)); - lpPrev->cxEffective += movement - cxLeft; - lpPrev->cx = lpPrev->cxEffective; + INT prev; + + if ((prev = prev_visible(infoPtr, iHitBand)) >= 0) { + INT cxLeft = REBAR_ShrinkBandsLTR(infoPtr, iHitBand, iRowEnd, movement, TRUE); + REBAR_BAND *lpPrev = REBAR_GetBand(infoPtr, prev_visible(infoPtr, iHitBand)); + lpPrev->cxEffective += movement - cxLeft; + lpPrev->cx = lpPrev->cxEffective; + } } REBAR_SetRowRectsX(infoPtr, iRowBegin, iRowEnd); @@ -3004,13 +3008,14 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam) /* if we are currently dragging a band */ if (infoPtr->iGrabbedBand >= 0) { - REBAR_BAND *band1, *band2; + REBAR_BAND *band1 = NULL, *band2; int yPtMove = (infoPtr->dwStyle & CCS_VERT ? ptMove.x : ptMove.y); if (GetCapture() != infoPtr->hwndSelf) ERR("We are dragging but haven't got capture?!?\n"); - band1 = REBAR_GetBand(infoPtr, infoPtr->iGrabbedBand - 1); + if (infoPtr->iGrabbedBand > 0) + band1 = REBAR_GetBand(infoPtr, infoPtr->iGrabbedBand - 1); band2 = REBAR_GetBand(infoPtr, infoPtr->iGrabbedBand); /* if mouse did not move much, exit */
1
0
0
0
Nikolay Sivov : comctl32/rebar: Collapse some parameter checks and winproc entries.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: 07fc19bbe36eb8bc6e96cdf2e2961afba429c417 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07fc19bbe36eb8bc6e96cdf2e…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Dec 19 14:04:42 2009 +0300 comctl32/rebar: Collapse some parameter checks and winproc entries. --- dlls/comctl32/rebar.c | 49 ++++++++++++++++--------------------------------- 1 files changed, 16 insertions(+), 33 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 3389bd0..8e744b8 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -899,7 +899,7 @@ REBAR_CalcVertBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend) } /* set initial child window rectangle if there is a child */ - if (lpBand->hwndChild != NULL) { + if (lpBand->hwndChild) { int cxBand = rcBand.right - rcBand.left; xoff = (cxBand - lpBand->cyChild) / 2; SetRect (&lpBand->rcChild, @@ -2133,10 +2133,9 @@ REBAR_GetBandInfoT(const REBAR_INFO *infoPtr, UINT uIndex, LPREBARBANDINFOW lprb { REBAR_BAND *lpBand; - if (lprbbi == NULL) - return FALSE; - if (lprbbi->cbSize < REBARBANDINFOA_V3_SIZE) + if (!lprbbi || lprbbi->cbSize < REBARBANDINFOA_V3_SIZE) return FALSE; + if (uIndex >= infoPtr->uNumBands) return FALSE; @@ -2223,10 +2222,7 @@ REBAR_GetBarHeight (const REBAR_INFO *infoPtr) static LRESULT REBAR_GetBarInfo (const REBAR_INFO *infoPtr, LPREBARINFO lpInfo) { - if (lpInfo == NULL) - return FALSE; - - if (lpInfo->cbSize < sizeof (REBARINFO)) + if (!lpInfo || lpInfo->cbSize < sizeof (REBARINFO)) return FALSE; TRACE("getting bar info!\n"); @@ -2388,9 +2384,7 @@ REBAR_InsertBandT(REBAR_INFO *infoPtr, INT iIndex, LPREBARBANDINFOW lprbbi, BOOL { REBAR_BAND *lpBand; - if (lprbbi == NULL) - return FALSE; - if (lprbbi->cbSize < REBARBANDINFOA_V3_SIZE) + if (!lprbbi || lprbbi->cbSize < REBARBANDINFOA_V3_SIZE) return FALSE; /* trace the index as signed to see the -1 */ @@ -2605,10 +2599,9 @@ REBAR_SetBandInfoT(REBAR_INFO *infoPtr, INT iBand, LPREBARBANDINFOW lprbbi, BOOL REBAR_BAND *lpBand; UINT uChanged; - if (lprbbi == NULL) - return FALSE; - if (lprbbi->cbSize < REBARBANDINFOA_V3_SIZE) + if (!lprbbi || lprbbi->cbSize < REBARBANDINFOA_V3_SIZE) return FALSE; + if (iBand >= infoPtr->uNumBands) return FALSE; @@ -2654,10 +2647,7 @@ REBAR_SetBarInfo (REBAR_INFO *infoPtr, LPREBARINFO lpInfo) REBAR_BAND *lpBand; UINT i; - if (lpInfo == NULL) - return FALSE; - - if (lpInfo->cbSize < sizeof (REBARINFO)) + if (!lpInfo || lpInfo->cbSize < sizeof (REBARINFO)) return FALSE; TRACE("setting bar info!\n"); @@ -2798,8 +2788,7 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT iBand, BOOL show) static LRESULT REBAR_SizeToRect (REBAR_INFO *infoPtr, const RECT *lpRect) { - if (lpRect == NULL) - return FALSE; + if (!lpRect) return FALSE; TRACE("[%s]\n", wine_dbgstr_rect(lpRect)); REBAR_SizeToHeight(infoPtr, get_rect_cy(infoPtr, lpRect)); @@ -3122,7 +3111,7 @@ REBAR_NCCreate (HWND hwnd, LPCREATESTRUCTW cs) NONCLIENTMETRICSW ncm; HFONT tfont; - if (infoPtr != NULL) { + if (infoPtr) { ERR("Strange info structure pointer *not* NULL\n"); return FALSE; } @@ -3489,11 +3478,9 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case RB_GETBANDINFO_OLD: case RB_GETBANDINFOA: - return REBAR_GetBandInfoT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, FALSE); - case RB_GETBANDINFOW: - return REBAR_GetBandInfoT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, TRUE); - + return REBAR_GetBandInfoT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, + uMsg == RB_GETBANDINFOW); case RB_GETBARHEIGHT: return REBAR_GetBarHeight (infoPtr); @@ -3537,11 +3524,9 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return REBAR_IdToIndex (infoPtr, wParam); case RB_INSERTBANDA: - return REBAR_InsertBandT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, FALSE); - case RB_INSERTBANDW: - return REBAR_InsertBandT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, TRUE); - + return REBAR_InsertBandT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, + uMsg == RB_INSERTBANDW); case RB_MAXIMIZEBAND: return REBAR_MaximizeBand (infoPtr, wParam, lParam); @@ -3555,11 +3540,9 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return REBAR_PushChevron (infoPtr, wParam, lParam); case RB_SETBANDINFOA: - return REBAR_SetBandInfoT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, FALSE); - case RB_SETBANDINFOW: - return REBAR_SetBandInfoT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, TRUE); - + return REBAR_SetBandInfoT(infoPtr, wParam, (LPREBARBANDINFOW)lParam, + uMsg == RB_SETBANDINFOW); case RB_SETBARINFO: return REBAR_SetBarInfo (infoPtr, (LPREBARINFO)lParam);
1
0
0
0
Nikolay Sivov : comctl32/rebar: Move parameter cast to winproc.
by Alexandre Julliard
21 Dec '09
21 Dec '09
Module: wine Branch: master Commit: b6abcb2f86779c9c9a8b0cd27d91e480aedbdb6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6abcb2f86779c9c9a8b0cd27…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Dec 19 13:52:25 2009 +0300 comctl32/rebar: Move parameter cast to winproc. --- dlls/comctl32/rebar.c | 287 ++++++++++++++++++++++--------------------------- 1 files changed, 127 insertions(+), 160 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b6abcb2f86779c9c9a8b0…
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
124
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
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200