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
March 2006
----- 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
4 participants
581 discussions
Start a n
N
ew thread
Francois Gouget : Fix compatibility with native advpack dlls.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: 9a722d0afd7672ea631b91b81fc7cb9569e15a2d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9a722d0afd7672ea631b91b…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Mar 6 11:11:09 2006 +0100 Fix compatibility with native advpack dlls. Most native advpack dlls in circulation don't have RegInstallA. So mshtml and urlmon should do a GetProcAddress() on 'RegInstall' instead. --- dlls/mshtml/main.c | 2 +- dlls/urlmon/regsvr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index e921e45..5aa506e 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -316,7 +316,7 @@ static HRESULT register_server(BOOL do_r strtable.pse = pse; hAdvpack = LoadLibraryW(wszAdvpack); - pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hAdvpack, "RegInstallA"); + pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hAdvpack, "RegInstall"); hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable); diff --git a/dlls/urlmon/regsvr.c b/dlls/urlmon/regsvr.c index 302584d..c04803b 100644 --- a/dlls/urlmon/regsvr.c +++ b/dlls/urlmon/regsvr.c @@ -608,7 +608,7 @@ static HRESULT register_inf(BOOL doregis strtable.pse = pse; hAdvpack = LoadLibraryW(wszAdvpack); - pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hAdvpack, "RegInstallA"); + pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hAdvpack, "RegInstall"); hres = pRegInstall(URLMON_hInstance, doregister ? "RegisterDll" : "UnregisterDll", &strtable);
1
0
0
0
Mike McCormack : wrc: Don't use identifiers starting yy*, they' re reserved for flex.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: 69dcbaaf93a65820a28fe2485b6d15a90f423899 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=69dcbaaf93a65820a28fe24…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Mon Mar 6 21:41:00 2006 +0900 wrc: Don't use identifiers starting yy*, they're reserved for flex. --- tools/wrc/parser.l | 106 ++++++++++++++++++++++++++-------------------------- 1 files changed, 53 insertions(+), 53 deletions(-) diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index aea3fb8..9ad1751 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -68,11 +68,11 @@ */ /* Exclusive string handling */ -%x yystr +%x tkstr /* Exclusive unicode string handling */ -%x yylstr +%x tklstr /* Exclusive rcdata single quoted data handling */ -%x yyrcd +%x tkrcd /* Exclusive comment eating... */ %x comment /* Set when stripping c-junk */ @@ -428,102 +428,102 @@ static struct keyword *iskeyword(char *k * Wide string scanning */ L\" { - yy_push_state(yylstr); + yy_push_state(tklstr); wbufidx = 0; if(!win32) yywarning("16bit resource contains unicode strings\n"); } -<yylstr>\"{ws}+ | -<yylstr>\" { +<tklstr>\"{ws}+ | +<tklstr>\" { yy_pop_state(); yylval.str = get_buffered_wstring(); return tSTRING; } -<yylstr>\\[0-7]{1,6} { /* octal escape sequence */ +<tklstr>\\[0-7]{1,6} { /* octal escape sequence */ unsigned int result; result = strtoul(yytext+1, 0, 8); if ( result > 0xffff ) yyerror("Character constant out of range"); addwchar((WCHAR)result); } -<yylstr>\\x[0-9a-fA-F]{4} { /* hex escape sequence */ +<tklstr>\\x[0-9a-fA-F]{4} { /* hex escape sequence */ unsigned int result; result = strtoul(yytext+2, 0, 16); addwchar((WCHAR)result); } -<yylstr>\\x[0-9a-fA-F]{1,3} { yyerror("Invalid hex escape sequence '%s'", yytext); } +<tklstr>\\x[0-9a-fA-F]{1,3} { yyerror("Invalid hex escape sequence '%s'", yytext); } -<yylstr>\\[0-9]+ yyerror("Bad escape sequence"); -<yylstr>\\\n{ws}* line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ -<yylstr>\\a addwchar('\a'); -<yylstr>\\b addwchar('\b'); -<yylstr>\\f addwchar('\f'); -<yylstr>\\n addwchar('\n'); -<yylstr>\\r addwchar('\r'); -<yylstr>\\t addwchar('\t'); -<yylstr>\\v addwchar('\v'); -<yylstr>\\. addwchar(yytext[1]); -<yylstr>\\\r\n addwchar(yytext[2]); line_number++; char_number = 1; -<yylstr>\"\" addwchar('\"'); /* "bla""bla" -> "bla\"bla" */ -<yylstr>\\\"\" addwchar('\"'); /* "bla\""bla" -> "bla\"bla" */ -<yylstr>\"{ws}+\" ; /* "bla" "bla" -> "blabla" */ -<yylstr>[^\\\n\"]+ { +<tklstr>\\[0-9]+ yyerror("Bad escape sequence"); +<tklstr>\\\n{ws}* line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ +<tklstr>\\a addwchar('\a'); +<tklstr>\\b addwchar('\b'); +<tklstr>\\f addwchar('\f'); +<tklstr>\\n addwchar('\n'); +<tklstr>\\r addwchar('\r'); +<tklstr>\\t addwchar('\t'); +<tklstr>\\v addwchar('\v'); +<tklstr>\\. addwchar(yytext[1]); +<tklstr>\\\r\n addwchar(yytext[2]); line_number++; char_number = 1; +<tklstr>\"\" addwchar('\"'); /* "bla""bla" -> "bla\"bla" */ +<tklstr>\\\"\" addwchar('\"'); /* "bla\""bla" -> "bla\"bla" */ +<tklstr>\"{ws}+\" ; /* "bla" "bla" -> "blabla" */ +<tklstr>[^\\\n\"]+ { char *yptr = yytext; while(*yptr) /* FIXME: codepage translation */ addwchar(*yptr++ & 0xff); } -<yylstr>\n yyerror("Unterminated string"); +<tklstr>\n yyerror("Unterminated string"); /* * Normal string scanning */ -\" yy_push_state(yystr); cbufidx = 0; -<yystr>\"{ws}+ | -<yystr>\" { +\" yy_push_state(tkstr); cbufidx = 0; +<tkstr>\"{ws}+ | +<tkstr>\" { yy_pop_state(); yylval.str = get_buffered_cstring(); return tSTRING; } -<yystr>\\[0-7]{1,3} { /* octal escape sequence */ +<tkstr>\\[0-7]{1,3} { /* octal escape sequence */ int result; result = strtol(yytext+1, 0, 8); if ( result > 0xff ) yyerror("Character constant out of range"); addcchar((char)result); } -<yystr>\\x[0-9a-fA-F]{2} { /* hex escape sequence */ +<tkstr>\\x[0-9a-fA-F]{2} { /* hex escape sequence */ int result; result = strtol(yytext+2, 0, 16); addcchar((char)result); } -<yystr>\\x[0-9a-fA-F] { yyerror("Invalid hex escape sequence '%s'", yytext); } +<tkstr>\\x[0-9a-fA-F] { yyerror("Invalid hex escape sequence '%s'", yytext); } -<yystr>\\[0-9]+ yyerror("Bad escape sequence"); -<yystr>\\\n{ws}* line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ -<yystr>\\a addcchar('\a'); -<yystr>\\b addcchar('\b'); -<yystr>\\f addcchar('\f'); -<yystr>\\n addcchar('\n'); -<yystr>\\r addcchar('\r'); -<yystr>\\t addcchar('\t'); -<yystr>\\v addcchar('\v'); -<yystr>\\. addcchar(yytext[1]); -<yystr>\\\r\n addcchar(yytext[2]); line_number++; char_number = 1; -<yystr>[^\\\n\"]+ { +<tkstr>\\[0-9]+ yyerror("Bad escape sequence"); +<tkstr>\\\n{ws}* line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ +<tkstr>\\a addcchar('\a'); +<tkstr>\\b addcchar('\b'); +<tkstr>\\f addcchar('\f'); +<tkstr>\\n addcchar('\n'); +<tkstr>\\r addcchar('\r'); +<tkstr>\\t addcchar('\t'); +<tkstr>\\v addcchar('\v'); +<tkstr>\\. addcchar(yytext[1]); +<tkstr>\\\r\n addcchar(yytext[2]); line_number++; char_number = 1; +<tkstr>[^\\\n\"]+ { char *yptr = yytext; while(*yptr) addcchar(*yptr++); } -<yystr>\"\" addcchar('\"'); /* "bla""bla" -> "bla\"bla" */ -<yystr>\\\"\" addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ -<yystr>\"{ws}+\" ; /* "bla" "bla" -> "blabla" */ -<yystr>\n yyerror("Unterminated string"); +<tkstr>\"\" addcchar('\"'); /* "bla""bla" -> "bla\"bla" */ +<tkstr>\\\"\" addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ +<tkstr>\"{ws}+\" ; /* "bla" "bla" -> "blabla" */ +<tkstr>\n yyerror("Unterminated string"); /* * Raw data scanning */ -\' yy_push_state(yyrcd); cbufidx = 0; -<yyrcd>\' { +\' yy_push_state(tkrcd); cbufidx = 0; +<tkrcd>\' { yy_pop_state(); yylval.raw = new_raw_data(); yylval.raw->size = cbufidx; @@ -531,14 +531,14 @@ L\" { memcpy(yylval.raw->data, cbuffer, yylval.raw->size); return tRAWDATA; } -<yyrcd>[0-9a-fA-F]{2} { +<tkrcd>[0-9a-fA-F]{2} { int result; result = strtol(yytext, 0, 16); addcchar((char)result); } -<yyrcd>{ws}+ ; /* Ignore space */ -<yyrcd>\n line_number++; char_number = 1; -<yyrcd>. yyerror("Malformed data-line"); +<tkrcd>{ws}+ ; /* Ignore space */ +<tkrcd>\n line_number++; char_number = 1; +<tkrcd>. yyerror("Malformed data-line"); /* * Comment stripping
1
0
0
0
Mike McCormack : avifil32: Fix some more gcc 4. 1 warnings caused by windowsx.h macros.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: 8723936de63387a9871367848ebbb6487d7a4bf3 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8723936de63387a98713678…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Mon Mar 6 20:33:13 2006 +0900 avifil32: Fix some more gcc 4.1 warnings caused by windowsx.h macros. --- dlls/avifil32/editstream.c | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/dlls/avifil32/editstream.c b/dlls/avifil32/editstream.c index eba563a..29f6a4d 100644 --- a/dlls/avifil32/editstream.c +++ b/dlls/avifil32/editstream.c @@ -26,7 +26,6 @@ #include "wingdi.h" #include "winnls.h" #include "winerror.h" -#include "windowsx.h" #include "mmsystem.h" #include "vfw.h" @@ -330,11 +329,11 @@ static BOOL AVIFILE_FormatsEqual(PAVISTR return FALSE; /* sizes match, now get formats and compare them */ - fmt1 = GlobalAllocPtr(GHND, size1); + fmt1 = GlobalLock(GlobalAlloc(GHND, size1)); if (fmt1 == NULL) return FALSE; if (SUCCEEDED(AVIStreamReadFormat(avi1, start1, fmt1, &size1))) { - fmt2 = GlobalAllocPtr(GHND, size1); + fmt2 = GlobalLock(GlobalAlloc(GHND, size1)); if (fmt2 != NULL) { if (SUCCEEDED(AVIStreamReadFormat(avi2, start2, fmt2, &size1))) status = (memcmp(fmt1, fmt2, size1) == 0); @@ -342,8 +341,12 @@ static BOOL AVIFILE_FormatsEqual(PAVISTR } if (fmt2 != NULL) - GlobalFreePtr(fmt2); - GlobalFreePtr(fmt1); + { + GlobalUnlock(GlobalHandle(fmt2)); + GlobalFree(GlobalHandle(fmt2)); + } + GlobalUnlock(GlobalHandle(fmt1)); + GlobalFree(GlobalHandle(fmt1)); return status; } @@ -404,7 +407,8 @@ static ULONG WINAPI IAVIEditStream_fnR if (This->pStreams[i].pStream != NULL) IAVIStream_Release(This->pStreams[i].pStream); } - GlobalFreePtr(This->pStreams); + GlobalUnlock(GlobalHandle(This->pStreams)); + GlobalFree(GlobalHandle(This->pStreams)); } LocalFree((HLOCAL)This); @@ -470,8 +474,8 @@ static HRESULT WINAPI IAVIEditStream_fnC } else { /* splitting */ if (This->nStreams + 1 >= This->nTableSize) { - This->pStreams = - GlobalReAllocPtr(This->pStreams, (This->nTableSize + 32) * sizeof(EditStreamTable), GMEM_SHARE|GHND); + GlobalUnlock(GlobalHandle(This->pStreams)); + This->pStreams = GlobalLock(GlobalReAlloc(GlobalHandle(This->pStreams), (This->nTableSize + 32) * sizeof(EditStreamTable), GMEM_SHARE|GHND)); if (This->pStreams == NULL) return AVIERR_MEMORY; This->nTableSize += 32; @@ -662,8 +666,8 @@ static HRESULT WINAPI IAVIEditStream_fnP if (This->nStreams + nStreams + 1 > This->nTableSize) { n = This->nStreams + nStreams + 33; - This->pStreams = - GlobalReAllocPtr(This->pStreams, n * sizeof(EditStreamTable), GMEM_SHARE|GHND); + GlobalUnlock(GlobalHandle(This->pStreams)); + This->pStreams = GlobalLock(GlobalReAlloc(GlobalHandle(This->pStreams), n * sizeof(EditStreamTable), GMEM_SHARE|GHND)); if (This->pStreams == NULL) return AVIERR_MEMORY; This->nTableSize = n; @@ -752,7 +756,8 @@ static HRESULT WINAPI IAVIEditStream_fnC if (pEdit == NULL) return AVIERR_MEMORY; if (This->nStreams > pEdit->nTableSize) { - pEdit->pStreams = GlobalReAllocPtr(pEdit->pStreams, This->nStreams * sizeof(EditStreamTable),GMEM_SHARE|GHND); + GlobalUnlock(GlobalHandle(pEdit->pStreams)); + pEdit->pStreams = GlobalLock(GlobalReAlloc(GlobalHandle(pEdit->pStreams), This->nStreams * sizeof(EditStreamTable), GMEM_SHARE|GHND)); if (pEdit->pStreams == NULL) return AVIERR_MEMORY; pEdit->nTableSize = This->nStreams; @@ -841,7 +846,7 @@ static HRESULT WINAPI IEditAVIStream_fnC if (This->pStreams == NULL) { This->pStreams = - GlobalAllocPtr(GMEM_SHARE|GHND, 256 * sizeof(EditStreamTable)); + GlobalLock(GlobalAlloc(GMEM_SHARE|GHND, 256 * sizeof(EditStreamTable))); if (This->pStreams == NULL) return AVIERR_MEMORY; This->nTableSize = 256;
1
0
0
0
Jacek Caban : shdocvw: Added get_LocationURL implementation.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: 87e04f2f4a020a4209f051c2ee39f4c0a463d985 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=87e04f2f4a020a4209f051c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 6 15:53:31 2006 +0100 shdocvw: Added get_LocationURL implementation. --- dlls/shdocvw/navigate.c | 15 ++++++++++----- dlls/shdocvw/webbrowser.c | 13 +++++++++++-- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index 5a6b45a..d1030d2 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -315,7 +315,7 @@ static IBindStatusCallback *create_callb return BINDSC(ret); } -static void on_before_navigate2(WebBrowser *This, PBYTE post_data, ULONG post_data_len, +static void on_before_navigate2(WebBrowser *This, LPWSTR url, PBYTE post_data, ULONG post_data_len, LPWSTR headers, VARIANT_BOOL *cancel) { VARIANT var_url, var_flags, var_frame_name, var_post_data, var_post_data2, var_headers; @@ -366,13 +366,14 @@ static void on_before_navigate2(WebBrows V_VT(params+5) = (VT_BYREF|VT_VARIANT); V_VARIANTREF(params+5) = &var_url; V_VT(&var_url) = VT_BSTR; - V_BSTR(&var_url) = SysAllocString(This->url); + V_BSTR(&var_url) = SysAllocString(url); V_VT(params+6) = (VT_DISPATCH); V_DISPATCH(params+6) = (IDispatch*)WEBBROWSER2(This); call_sink(This->cp_wbe2, DISPID_BEFORENAVIGATE2, &dispparams); + SysFreeString(V_BSTR(&var_url)); if(post_data_len) SafeArrayDestroy(V_ARRAY(&var_post_data)); } @@ -472,6 +473,7 @@ HRESULT navigate_hlink(WebBrowser *This, IBindStatusCallback *callback) { IHttpNegotiate *http_negotiate; + LPWSTR url = NULL; PBYTE post_data = NULL; ULONG post_data_len = 0; LPWSTR headers = NULL; @@ -480,8 +482,8 @@ HRESULT navigate_hlink(WebBrowser *This, DWORD bindf = 0; HRESULT hres; - IMoniker_GetDisplayName(mon, NULL, NULL, &This->url); - TRACE("navigating to %s\n", debugstr_w(This->url)); + IMoniker_GetDisplayName(mon, NULL, NULL, &url); + TRACE("navigating to %s\n", debugstr_w(url)); hres = IBindStatusCallback_QueryInterface(callback, &IID_IHttpNegotiate, (void**)&http_negotiate); @@ -504,16 +506,19 @@ HRESULT navigate_hlink(WebBrowser *This, post_data = bindinfo.stgmedData.u.hGlobal; } - on_before_navigate2(This, post_data, post_data_len, headers, &cancel); + on_before_navigate2(This, url, post_data, post_data_len, headers, &cancel); CoTaskMemFree(headers); ReleaseBindInfo(&bindinfo); if(cancel) { FIXME("navigation canceled\n"); + CoTaskMemFree(url); return S_OK; } + This->url = url; + return navigate(This, mon, bindctx, callback); } diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index 493a124..a2021e1 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -351,8 +351,17 @@ static HRESULT WINAPI WebBrowser_get_Loc static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL) { WebBrowser *This = WEBBROWSER_THIS(iface); + FIXME("(%p)->(%p)\n", This, LocationURL); - return E_NOTIMPL; + + if(!This->url) { + static const WCHAR null_char = 0; + *LocationURL = SysAllocString(&null_char); + return S_FALSE; + } + + *LocationURL = SysAllocString(This->url); + return S_OK; } static HRESULT WINAPI WebBrowser_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool) @@ -543,7 +552,7 @@ static HRESULT WINAPI WebBrowser_Navigat return E_INVALIDARG; headers = V_BSTR(Headers); - FIXME("Headers: %s\n", debugstr_w(headers)); + TRACE("Headers: %s\n", debugstr_w(headers)); } if(!This->doc_view_hwnd)
1
0
0
0
Jacek Caban : mshtml: Added IHTMLElementCollection implementation.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: d6d76870cb1ccb83f6feb8736dfca6d9dc1d984d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d6d76870cb1ccb83f6feb87…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Mar 5 21:56:04 2006 +0100 mshtml: Added IHTMLElementCollection implementation. - Added IHTMLElementCollection implementation. - Added get_all implementation. --- dlls/mshtml/htmlelem.c | 267 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/htmlnode.c | 1 2 files changed, 266 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 9502b7a..818a3a3 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -36,6 +36,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); +static HRESULT HTMLElementCollection_Create(IUnknown*,HTMLElement**,DWORD,IDispatch**); + #define HTMLELEM_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement, iface) static HRESULT WINAPI HTMLElement_QueryInterface(IHTMLElement *iface, @@ -738,11 +740,67 @@ static HRESULT WINAPI HTMLElement_get_ch return E_NOTIMPL; } +static void create_all_list(HTMLDocument *doc, HTMLElement *elem, HTMLElement ***list, DWORD *size, + DWORD *len) +{ + nsIDOMNodeList *nsnode_list; + nsIDOMNode *iter; + PRUint32 list_len = 0, i; + HTMLDOMNode *node; + nsresult nsres; + + nsres = nsIDOMNode_GetChildNodes(elem->node->nsnode, &nsnode_list); + if(NS_FAILED(nsres)) { + ERR("GetChildNodes failed: %08lx\n", nsres); + return; + } + + nsIDOMNodeList_GetLength(nsnode_list, &list_len); + if(!list_len) + return; + + for(i=0; i<list_len; i++) { + nsres = nsIDOMNodeList_Item(nsnode_list, i, &iter); + if(NS_FAILED(nsres)) { + ERR("Item failed: %08lx\n", nsres); + continue; + } + + node = get_node(doc, iter); + if(node->node_type != NT_HTMLELEM) + continue; + + if(*len == *size) { + *size <<= 1; + *list = HeapReAlloc(GetProcessHeap(), 0, *list, *size * sizeof(HTMLElement**)); + } + + (*list)[(*len)++] = (HTMLElement*)node->impl.elem; + + create_all_list(doc, (HTMLElement*)node->impl.elem, list, size, len); + } +} + static HRESULT WINAPI HTMLElement_get_all(IHTMLElement *iface, IDispatch **p) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + HTMLElement **elem_list; + DWORD list_size = 8, len = 0; + + TRACE("(%p)->(%p)\n", This, p); + + elem_list = HeapAlloc(GetProcessHeap(), 0, list_size*sizeof(HTMLElement**)); + + create_all_list(This->node->doc, This, &elem_list, &list_size, &len); + + if(!len) { + HeapFree(GetProcessHeap(), 0, elem_list); + elem_list = NULL; + }else if(list_size > len) { + elem_list = HeapReAlloc(GetProcessHeap(), 0, elem_list, len*sizeof(HTMLElement**)); + } + + return HTMLElementCollection_Create((IUnknown*)HTMLELEM(This), elem_list, len, p); } static void HTMLElement_destructor(IUnknown *iface) @@ -873,3 +931,208 @@ void HTMLElement_Create(HTMLDOMNode *nod nsIDOMNode_QueryInterface(node->nsnode, &IID_nsIDOMHTMLElement, (void**)&ret->nselem); } + +typedef struct { + const IHTMLElementCollectionVtbl *lpHTMLElementCollectionVtbl; + + IUnknown *ref_unk; + HTMLElement **elems; + DWORD len; + + LONG ref; +} HTMLElementCollection; + +#define HTMLELEMCOL(x) ((IHTMLElementCollection*) &(x)->lpHTMLElementCollectionVtbl) + +#define ELEMCOL_THIS(iface) DEFINE_THIS(HTMLElementCollection, HTMLElementCollection, iface) + +static HRESULT WINAPI HTMLElementCollection_QueryInterface(IHTMLElementCollection *iface, + REFIID riid, void **ppv) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + + *ppv = NULL; + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = HTMLELEMCOL(This); + }else if(IsEqualGUID(&IID_IDispatch, riid)) { + TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); + *ppv = HTMLELEMCOL(This); + }else if(IsEqualGUID(&IID_IHTMLElementCollection, riid)) { + TRACE("(%p)->(IID_IHTMLElementCollection %p)\n", This, ppv); + *ppv = HTMLELEMCOL(This); + } + + if(*ppv) { + IHTMLElementCollection_AddRef(HTMLELEMCOL(This)); + return S_OK; + } + + FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} + +static ULONG WINAPI HTMLElementCollection_AddRef(IHTMLElementCollection *iface) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%ld\n", This, ref); + + return ref; +} + +static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%ld\n", This, ref); + + if(!ref) { + IUnknown_Release(This->ref_unk); + HeapFree(GetProcessHeap(), 0, This->elems); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI HTMLElementCollection_GetTypeInfoCount(IHTMLElementCollection *iface, + UINT *pctinfo) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%p)\n", This, pctinfo); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLElementCollection_GetTypeInfo(IHTMLElementCollection *iface, + UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%u %lu %p)\n", This, iTInfo, lcid, ppTInfo); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLElementCollection_GetIDsOfNames(IHTMLElementCollection *iface, + REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%s %p %u %lu %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLElementCollection_Invoke(IHTMLElementCollection *iface, + DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLElementCollection_toString(IHTMLElementCollection *iface, + BSTR *String) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%p)\n", This, String); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLElementCollection_put_length(IHTMLElementCollection *iface, + long v) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%ld)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLElementCollection_get_length(IHTMLElementCollection *iface, + long *p) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + + TRACE("(%p)->(%p)\n", This, p); + + *p = This->len; + return S_OK; +} + +static HRESULT WINAPI HTMLElementCollection_get__newEnum(IHTMLElementCollection *iface, + IUnknown **p) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface, + VARIANT name, VARIANT index, IDispatch **pdisp) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + + if(V_VT(&index) != VT_I4) { + WARN("Invalid index vt=%d\n", V_VT(&index)); + return E_INVALIDARG; + } + + if(V_VT(&name) != VT_I4 || V_I4(&name) != V_I4(&index)) + FIXME("Unsupproted name vt=%d\n", V_VT(&name)); + + TRACE("(%p)->(%ld %ld %p)\n", This, V_I4(&name), V_I4(&index), pdisp); + + if(V_I4(&index) < 0 || V_I4(&index) >= This->len) + return E_INVALIDARG; + + *pdisp = (IDispatch*)This->elems[V_I4(&index)]; + IDispatch_AddRef(*pdisp); + return S_OK; +} + +static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface, + VARIANT tagName, IDispatch **pdisp) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + FIXME("(%p)->(%s %p)\n", This, debugstr_w(V_BSTR(&tagName)), pdisp); + return E_NOTIMPL; +} + +#undef ELEMCOL_THIS + +static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { + HTMLElementCollection_QueryInterface, + HTMLElementCollection_AddRef, + HTMLElementCollection_Release, + HTMLElementCollection_GetTypeInfoCount, + HTMLElementCollection_GetTypeInfo, + HTMLElementCollection_GetIDsOfNames, + HTMLElementCollection_Invoke, + HTMLElementCollection_toString, + HTMLElementCollection_put_length, + HTMLElementCollection_get_length, + HTMLElementCollection_get__newEnum, + HTMLElementCollection_item, + HTMLElementCollection_tags +}; + +static HRESULT HTMLElementCollection_Create(IUnknown *ref_unk, HTMLElement **elems, DWORD len, + IDispatch **p) +{ + HTMLElementCollection *ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HTMLElementCollection)); + + ret->lpHTMLElementCollectionVtbl = &HTMLElementCollectionVtbl; + ret->ref = 1; + ret->elems = elems; + ret->len = len; + + IUnknown_AddRef(ref_unk); + ret->ref_unk = ref_unk; + + TRACE("ret=%p len=%ld\n", ret, len); + + *p = (IDispatch*)ret; + return S_OK; +} diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index cb4e8e6..ef8f5fa 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -328,6 +328,7 @@ HTMLDOMNode *get_node(HTMLDocument *This ret->lpHTMLDOMNodeVtbl = &HTMLDOMNodeVtbl; ret->node_type = NT_UNKNOWN; ret->impl.unk = NULL; + ret->destructor = NULL; ret->doc = This; nsIDOMNode_AddRef(nsnode);
1
0
0
0
Alexandre Julliard : shell32: Grow the file list dynamically in SHFileOperation.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: 1110d62752947c82723d1eb252be8e49cac3dfb0 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1110d62752947c82723d1eb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 6 17:47:57 2006 +0100 shell32: Grow the file list dynamically in SHFileOperation. This avoids searching the same directories twice, once to count the files and then once for real. --- dlls/shell32/shlfileop.c | 73 +++++++++++----------------------------------- 1 files changed, 18 insertions(+), 55 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 19cf225..4f2a799 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -760,53 +760,20 @@ typedef struct typedef struct { FILE_ENTRY *feFiles; + DWORD num_alloc; DWORD dwNumFiles; BOOL bAnyFromWildcard; BOOL bAnyDirectories; BOOL bAnyDontExist; } FILE_LIST; -/* count the number of expanded files from a given wildcard */ -static DWORD count_wildcard_files(LPCWSTR szWildFile) -{ - WIN32_FIND_DATAW wfd; - HANDLE hFile = FindFirstFileW(szWildFile, &wfd); - BOOL res = TRUE; - DWORD dwCount = 0; - - if (hFile == INVALID_HANDLE_VALUE) - return 0; - - while (res) - { - if (!IsDotDir(wfd.cFileName)) dwCount++; - res = FindNextFileW(hFile, &wfd); - } - FindClose(hFile); - return dwCount; -} - -/* counts the number of files in a file list including expanded wildcard files */ -static DWORD count_files(LPCWSTR szFileList) +static inline void grow_list(FILE_LIST *list) { - DWORD dwCount = 0; - LPCWSTR str = szFileList; - - /* test empty list */ - if (!szFileList[0]) return -1; - - while (*str) - { - if (StrPBrkW(str, wWildcardChars)) - dwCount += count_wildcard_files(str); - else - dwCount++; - - str += lstrlenW(str) + 1; - } - - return dwCount; + FILE_ENTRY *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles, + list->num_alloc * 2 * sizeof(*new) ); + list->feFiles = new; + list->num_alloc *= 2; } /* adds a file to the FILE_ENTRY struct @@ -861,6 +828,7 @@ static void parse_wildcard_files(FILE_LI for (res = TRUE; res; res = FindNextFileW(hFile, &wfd)) { if (IsDotDir(wfd.cFileName)) continue; + if (*pdwListIndex >= flList->num_alloc) grow_list( flList ); szFullPath = wildcard_to_file(szFile, wfd.cFileName); file = &flList->feFiles[(*pdwListIndex)++]; add_file_to_entry(file, szFullPath); @@ -878,7 +846,7 @@ static HRESULT parse_file_list(FILE_LIST { LPCWSTR ptr = szFiles; WCHAR szCurFile[MAX_PATH]; - DWORD i, dwDirLen; + DWORD i = 0, dwDirLen; if (!szFiles) return ERROR_INVALID_PARAMETER; @@ -886,19 +854,19 @@ static HRESULT parse_file_list(FILE_LIST flList->bAnyFromWildcard = FALSE; flList->bAnyDirectories = FALSE; flList->bAnyDontExist = FALSE; - flList->dwNumFiles = count_files(szFiles); + flList->num_alloc = 32; + flList->dwNumFiles = 0; /* empty list */ - if (flList->dwNumFiles == -1) + if (!szFiles[0]) return ERROR_ACCESS_DENIED; flList->feFiles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - flList->dwNumFiles * sizeof(FILE_ENTRY)); + flList->num_alloc * sizeof(FILE_ENTRY)); - for (i = 0; i < flList->dwNumFiles; i++) + while (*ptr) { - if (!*ptr) - return ERROR_ACCESS_DENIED; + if (i >= flList->num_alloc) grow_list( flList ); /* change relative to absolute path */ if (PathIsRelativeW(ptr)) @@ -925,21 +893,16 @@ static HRESULT parse_file_list(FILE_LIST FILE_ENTRY *file = &flList->feFiles[i]; add_file_to_entry(file, szCurFile); file->attributes = GetFileAttributesW( file->szFullPath ); + file->bExists = (file->attributes != INVALID_FILE_ATTRIBUTES); + if (!file->bExists) flList->bAnyDontExist = TRUE; if (IsAttribDir(file->attributes)) flList->bAnyDirectories = TRUE; } - /* record whether the file exists */ - if (!PathFileExistsW(flList->feFiles[i].szFullPath)) - { - flList->feFiles[i].bExists = FALSE; - flList->bAnyDontExist = TRUE; - } - else - flList->feFiles[i].bExists = TRUE; - /* advance to the next string */ ptr += strlenW(ptr) + 1; + i++; } + flList->dwNumFiles = i; return S_OK; }
1
0
0
0
Alexandre Julliard : shell32: Store only the file attributes in the file list for SHFileOperation.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: 23cb632be2265cf9f927cae54237c78dea161358 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=23cb632be2265cf9f927cae…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 6 16:44:31 2006 +0100 shell32: Store only the file attributes in the file list for SHFileOperation. We don't need the rest of the WIN32_FIND_DATA structure. --- dlls/shell32/shlfileop.c | 60 +++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 33 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index d6c9159..19cf225 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -748,7 +748,7 @@ int WINAPI SHFileOperationA(LPSHFILEOPST typedef struct { - WIN32_FIND_DATAW wfd; + DWORD attributes; LPWSTR szDirectory; LPWSTR szFilename; LPWSTR szFullPath; @@ -810,13 +810,11 @@ static DWORD count_files(LPCWSTR szFileL } /* adds a file to the FILE_ENTRY struct - * returns TRUE if szFile is a directory, FALSE otherwise */ -static BOOL add_file_to_entry(FILE_ENTRY *feFile, LPWSTR szFile, BOOL bFromWildcard) +static void add_file_to_entry(FILE_ENTRY *feFile, LPWSTR szFile) { DWORD dwLen = strlenW(szFile) + 1; LPWSTR ptr; - HANDLE h; feFile->szFullPath = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); strcpyW(feFile->szFullPath, szFile); @@ -832,19 +830,7 @@ static BOOL add_file_to_entry(FILE_ENTRY feFile->szFilename = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); strcpyW(feFile->szFilename, ptr + 1); /* skip over backslash */ } - - feFile->bFromWildcard = bFromWildcard; - h = FindFirstFileW(feFile->szFullPath, &feFile->wfd); - if (h != INVALID_HANDLE_VALUE) - { - FindClose(h); - if (IsAttribDir(feFile->wfd.dwFileAttributes)) - return TRUE; - } - else - feFile->wfd.dwFileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY; - - return FALSE; + feFile->bFromWildcard = FALSE; } static LPWSTR wildcard_to_file(LPWSTR szWildCard, LPWSTR szFileName) @@ -868,6 +854,7 @@ static void parse_wildcard_files(FILE_LI { WIN32_FIND_DATAW wfd; HANDLE hFile = FindFirstFileW(szFile, &wfd); + FILE_ENTRY *file; LPWSTR szFullPath; BOOL res; @@ -875,9 +862,11 @@ static void parse_wildcard_files(FILE_LI { if (IsDotDir(wfd.cFileName)) continue; szFullPath = wildcard_to_file(szFile, wfd.cFileName); - if (add_file_to_entry(&flList->feFiles[(*pdwListIndex)++], - szFullPath, TRUE)) - flList->bAnyDirectories = TRUE; + file = &flList->feFiles[(*pdwListIndex)++]; + add_file_to_entry(file, szFullPath); + file->bFromWildcard = TRUE; + file->attributes = wfd.dwFileAttributes; + if (IsAttribDir(file->attributes)) flList->bAnyDirectories = TRUE; HeapFree(GetProcessHeap(), 0, szFullPath); } @@ -931,8 +920,13 @@ static HRESULT parse_file_list(FILE_LIST flList->bAnyFromWildcard = TRUE; i--; } - else if (add_file_to_entry(&flList->feFiles[i], szCurFile, FALSE)) - flList->bAnyDirectories = TRUE; + else + { + FILE_ENTRY *file = &flList->feFiles[i]; + add_file_to_entry(file, szCurFile); + file->attributes = GetFileAttributesW( file->szFullPath ); + if (IsAttribDir(file->attributes)) flList->bAnyDirectories = TRUE; + } /* record whether the file exists */ if (!PathFileExistsW(flList->feFiles[i].szFullPath)) @@ -1007,7 +1001,7 @@ static void copy_to_dir(LPSHFILEOPSTRUCT PathCombineW(szDestPath, feTo->szFullPath, feFrom->szFilename); - if (IsAttribFile(feFrom->wfd.dwFileAttributes)) + if (IsAttribFile(feFrom->attributes)) SHNotifyCopyFileW(feFrom->szFullPath, szDestPath, FALSE); else if (!(lpFileOp->fFlags & FOF_FILESONLY && feFrom->bFromWildcard)) copy_dir_to_dir(lpFileOp, feFrom, szDestPath); @@ -1057,7 +1051,7 @@ static HRESULT copy_files(LPSHFILEOPSTRU if (flFrom->dwNumFiles > 1 && flTo->dwNumFiles == 1 && !PathFileExistsW(flTo->feFiles[0].szFullPath) && - IsAttribFile(fileDest->wfd.dwFileAttributes)) + IsAttribFile(fileDest->attributes)) { bCancelIfAnyDirectories = TRUE; } @@ -1071,7 +1065,7 @@ static HRESULT copy_files(LPSHFILEOPSTRU if (!(lpFileOp->fFlags & FOF_MULTIDESTFILES) && flFrom->dwNumFiles != 1 && PathFileExistsW(fileDest->szFullPath) && - IsAttribFile(fileDest->wfd.dwFileAttributes)) + IsAttribFile(fileDest->attributes)) { return ERROR_CANCELLED; } @@ -1083,31 +1077,31 @@ static HRESULT copy_files(LPSHFILEOPSTRU if (lpFileOp->fFlags & FOF_MULTIDESTFILES) fileDest = &flTo->feFiles[i]; - if (IsAttribDir(entryToCopy->wfd.dwFileAttributes) && + if (IsAttribDir(entryToCopy->attributes) && !lstrcmpW(entryToCopy->szFullPath, fileDest->szDirectory)) { return ERROR_SUCCESS; } - if (IsAttribDir(entryToCopy->wfd.dwFileAttributes) && bCancelIfAnyDirectories) + if (IsAttribDir(entryToCopy->attributes) && bCancelIfAnyDirectories) return ERROR_CANCELLED; create_dest_dirs(fileDest->szDirectory); if (!strcmpW(entryToCopy->szFullPath, fileDest->szFullPath)) { - if (IsAttribFile(entryToCopy->wfd.dwFileAttributes)) + if (IsAttribFile(entryToCopy->attributes)) return ERROR_NO_MORE_SEARCH_HANDLES; else return ERROR_SUCCESS; } if ((flFrom->dwNumFiles > 1 && flTo->dwNumFiles == 1) || - (flFrom->dwNumFiles == 1 && IsAttribDir(fileDest->wfd.dwFileAttributes))) + (flFrom->dwNumFiles == 1 && IsAttribDir(fileDest->attributes))) { copy_to_dir(lpFileOp, entryToCopy, fileDest); } - else if (IsAttribDir(entryToCopy->wfd.dwFileAttributes)) + else if (IsAttribDir(entryToCopy->attributes)) { copy_dir_to_dir(lpFileOp, entryToCopy, fileDest->szFullPath); } @@ -1141,7 +1135,7 @@ static HRESULT delete_files(LPSHFILEOPST fileEntry = &flFrom->feFiles[i]; /* delete the file or directory */ - if (IsAttribFile(fileEntry->wfd.dwFileAttributes)) + if (IsAttribFile(fileEntry->attributes)) bPathExists = DeleteFileW(fileEntry->szFullPath); else if (!(lpFileOp->fFlags & FOF_FILESONLY && fileEntry->bFromWildcard)) bPathExists = SHELL_DeleteDirectoryW(fileEntry->szFullPath, bConfirm); @@ -1185,7 +1179,7 @@ static void move_to_dir(LPSHFILEOPSTRUCT PathCombineW(szDestPath, feTo->szFullPath, feFrom->szFilename); - if (IsAttribFile(feFrom->wfd.dwFileAttributes)) + if (IsAttribFile(feFrom->attributes)) SHNotifyMoveFileW(feFrom->szFullPath, szDestPath); else if (!(lpFileOp->fFlags & FOF_FILESONLY && feFrom->bFromWildcard)) move_dir_to_dir(lpFileOp, feFrom, szDestPath); @@ -1234,7 +1228,7 @@ static HRESULT move_files(LPSHFILEOPSTRU if (!PathFileExistsW(fileDest->szDirectory)) return ERROR_CANCELLED; - if (fileDest->bExists && IsAttribDir(fileDest->wfd.dwFileAttributes)) + if (fileDest->bExists && IsAttribDir(fileDest->attributes)) move_to_dir(lpFileOp, entryToMove, fileDest); else SHNotifyMoveFileW(entryToMove->szFullPath, fileDest->szFullPath);
1
0
0
0
Alexandre Julliard : shell32: Fixed handling of null-terminated file list in SHFileOperation.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: b222001defc8d9db67232aae68f2d3a83c4ecd5d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=b222001defc8d9db67232aa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 6 16:42:34 2006 +0100 shell32: Fixed handling of null-terminated file list in SHFileOperation. --- dlls/shell32/shlfileop.c | 28 +++++++++------------------- 1 files changed, 9 insertions(+), 19 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 18d1133..d6c9159 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -791,29 +791,19 @@ static DWORD count_wildcard_files(LPCWST static DWORD count_files(LPCWSTR szFileList) { DWORD dwCount = 0; - LPCWSTR p = szFileList; - LPCWSTR q = p + 1; - LPCWSTR str = p; + LPCWSTR str = szFileList; /* test empty list */ - if (!szFileList[0] && !szFileList[1]) - return -1; - - /* p,q search: stop when we reach double null terminator */ - while (*p || *q) - { - if (!*q) - { - if (StrPBrkW(str, wWildcardChars)) - dwCount += count_wildcard_files(str); - else - dwCount++; + if (!szFileList[0]) return -1; - str = q + 1; - } + while (*str) + { + if (StrPBrkW(str, wWildcardChars)) + dwCount += count_wildcard_files(str); + else + dwCount++; - p++; - q++; + str += lstrlenW(str) + 1; } return dwCount;
1
0
0
0
Aric Stewart : shell32: Skip dot directories in SHFileOperation.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: c29b7c352438669ee22961466360e926a831d313 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=c29b7c352438669ee229614…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri Mar 3 10:08:32 2006 -0600 shell32: Skip dot directories in SHFileOperation. In ShFileOperation when generating a file list with * wildcards, for example for deletion, do not include the dot directories (. and ..) in the list, because that cause the operation to spiral out of control. --- dlls/shell32/shlfileop.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index e12df61..18d1133 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -779,7 +779,7 @@ static DWORD count_wildcard_files(LPCWST while (res) { - dwCount++; + if (!IsDotDir(wfd.cFileName)) dwCount++; res = FindNextFileW(hFile, &wfd); } @@ -879,18 +879,16 @@ static void parse_wildcard_files(FILE_LI WIN32_FIND_DATAW wfd; HANDLE hFile = FindFirstFileW(szFile, &wfd); LPWSTR szFullPath; - BOOL res = TRUE, bDir; - - while (res) + BOOL res; + + for (res = TRUE; res; res = FindNextFileW(hFile, &wfd)) { + if (IsDotDir(wfd.cFileName)) continue; szFullPath = wildcard_to_file(szFile, wfd.cFileName); - bDir = add_file_to_entry(&flList->feFiles[(*pdwListIndex)++], - szFullPath, TRUE); - HeapFree(GetProcessHeap(), 0, szFullPath); - res = FindNextFileW(hFile, &wfd); - - if (bDir) + if (add_file_to_entry(&flList->feFiles[(*pdwListIndex)++], + szFullPath, TRUE)) flList->bAnyDirectories = TRUE; + HeapFree(GetProcessHeap(), 0, szFullPath); } FindClose(hFile);
1
0
0
0
Alexandre Julliard : server: Avoid crash in set_thread_desktop if the thread doesn't have a queue.
by Alexandre Julliard
06 Mar '06
06 Mar '06
Module: wine Branch: refs/heads/master Commit: 71b94726d9661d2f51afe4bd72539de656dcd0a3 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=71b94726d9661d2f51afe4b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 6 15:10:59 2006 +0100 server: Avoid crash in set_thread_desktop if the thread doesn't have a queue. --- server/winstation.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/winstation.c b/server/winstation.c index 30cbe18..da24be4 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -477,7 +477,7 @@ DECL_HANDLER(set_thread_desktop) else current->desktop = req->handle; /* FIXME: should we close the old one? */ - if (old_desktop != new_desktop) detach_thread_input( current ); + if (old_desktop != new_desktop && current->queue) detach_thread_input( current ); if (old_desktop) release_object( old_desktop ); release_object( new_desktop );
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
59
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
Results per page:
10
25
50
100
200