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 2017
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
595 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Added IHTMLInputTextElement2:: selectionStart property implementation.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: 03febf448e989afa92317e2ec045358a31c683cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03febf448e989afa92317e2ec…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 15 13:47:37 2017 +0200 mshtml: Added IHTMLInputTextElement2::selectionStart property implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlinput.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index c89dad6..00f714d 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1263,15 +1263,34 @@ static HRESULT WINAPI HTMLInputTextElement2_Invoke(IHTMLInputTextElement2 *iface static HRESULT WINAPI HTMLInputTextElement2_put_selectionStart(IHTMLInputTextElement2 *iface, LONG v) { HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - FIXME("(%p)->(%d)\n", This, v); - return E_NOTIMPL; + nsresult nsres; + + TRACE("(%p)->(%d)\n", This, v); + + nsres = nsIDOMHTMLInputElement_SetSelectionStart(This->nsinput, v); + if(NS_FAILED(nsres)) { + ERR("SetSelectionStart failed: %08x\n", nsres); + return E_FAIL; + } + return S_OK; } static HRESULT WINAPI HTMLInputTextElement2_get_selectionStart(IHTMLInputTextElement2 *iface, LONG *p) { HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + INT32 selection_start; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMHTMLInputElement_GetSelectionStart(This->nsinput, &selection_start); + if(NS_FAILED(nsres)) { + ERR("GetSelectionStart failed: %08x\n", nsres); + return E_FAIL; + } + + *p = selection_start; + return S_OK; } static HRESULT WINAPI HTMLInputTextElement2_put_selectionEnd(IHTMLInputTextElement2 *iface, LONG v)
1
0
0
0
Jacek Caban : mshtml: Added IHTMLInputTextElement2 stub implementation.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: 0fed758ef022d4b96dfff4d6f18dc3512a1c45c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0fed758ef022d4b96dfff4d6f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 15 14:55:11 2017 +0200 mshtml: Added IHTMLInputTextElement2 stub implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlinput.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 8271bf4..c89dad6 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -39,6 +39,7 @@ struct HTMLInputElement { IHTMLInputElement IHTMLInputElement_iface; IHTMLInputTextElement IHTMLInputTextElement_iface; + IHTMLInputTextElement2 IHTMLInputTextElement2_iface; nsIDOMHTMLInputElement *nsinput; }; @@ -1206,6 +1207,109 @@ static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = { HTMLInputTextElement_createTextRange }; +static inline HTMLInputElement *impl_from_IHTMLInputTextElement2(IHTMLInputTextElement2 *iface) +{ + return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputTextElement2_iface); +} + +static HRESULT WINAPI HTMLInputTextElement2_QueryInterface(IHTMLInputTextElement2 *iface, REFIID riid, void **ppv) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv); +} + +static ULONG WINAPI HTMLInputTextElement2_AddRef(IHTMLInputTextElement2 *iface) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface); +} + +static ULONG WINAPI HTMLInputTextElement2_Release(IHTMLInputTextElement2 *iface) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface); +} + +static HRESULT WINAPI HTMLInputTextElement2_GetTypeInfoCount(IHTMLInputTextElement2 *iface, UINT *pctinfo) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo); +} + +static HRESULT WINAPI HTMLInputTextElement2_GetTypeInfo(IHTMLInputTextElement2 *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); +} + +static HRESULT WINAPI HTMLInputTextElement2_GetIDsOfNames(IHTMLInputTextElement2 *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, + cNames, lcid, rgDispId); +} + +static HRESULT WINAPI HTMLInputTextElement2_Invoke(IHTMLInputTextElement2 *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); +} + +static HRESULT WINAPI HTMLInputTextElement2_put_selectionStart(IHTMLInputTextElement2 *iface, LONG v) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + FIXME("(%p)->(%d)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputTextElement2_get_selectionStart(IHTMLInputTextElement2 *iface, LONG *p) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputTextElement2_put_selectionEnd(IHTMLInputTextElement2 *iface, LONG v) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + FIXME("(%p)->(%d)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputTextElement2_get_selectionEnd(IHTMLInputTextElement2 *iface, LONG *p) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLInputTextElement2_setSelectionRange(IHTMLInputTextElement2 *iface, LONG start, LONG end) +{ + HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); + FIXME("(%p)->(%d %d)\n", This, start, end); + return E_NOTIMPL; +} + +static const IHTMLInputTextElement2Vtbl HTMLInputTextElement2Vtbl = { + HTMLInputTextElement2_QueryInterface, + HTMLInputTextElement2_AddRef, + HTMLInputTextElement2_Release, + HTMLInputTextElement2_GetTypeInfoCount, + HTMLInputTextElement2_GetTypeInfo, + HTMLInputTextElement2_GetIDsOfNames, + HTMLInputTextElement2_Invoke, + HTMLInputTextElement2_put_selectionStart, + HTMLInputTextElement2_get_selectionStart, + HTMLInputTextElement2_put_selectionEnd, + HTMLInputTextElement2_get_selectionEnd, + HTMLInputTextElement2_setSelectionRange +}; + static inline HTMLInputElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLInputElement, element.node); @@ -1229,6 +1333,9 @@ static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) { TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv); *ppv = &This->IHTMLInputTextElement_iface; + }else if(IsEqualGUID(&IID_IHTMLInputTextElement2, riid)) { + TRACE("(%p)->(IID_IHTMLInputTextElement2 %p)\n", This, ppv); + *ppv = &This->IHTMLInputTextElement2_iface; } if(*ppv) { @@ -1361,6 +1468,7 @@ HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem ret->IHTMLInputElement_iface.lpVtbl = &HTMLInputElementVtbl; ret->IHTMLInputTextElement_iface.lpVtbl = &HTMLInputTextElementVtbl; + ret->IHTMLInputTextElement2_iface.lpVtbl = &HTMLInputTextElement2Vtbl; ret->element.node.vtbl = &HTMLInputElementImplVtbl; HTMLElement_Init(&ret->element, doc, nselem, &HTMLInputElement_dispex);
1
0
0
0
Jacek Caban : mshtml.idl: Added IHTMLInputTextElement2 declaration.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: dadad569f30bea93f9bcf5086b8c861fb3bb62ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dadad569f30bea93f9bcf5086…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 15 13:47:14 2017 +0200 mshtml.idl: Added IHTMLInputTextElement2 declaration. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/mshtmdid.h | 5 +++++ include/mshtml.idl | 44 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/include/mshtmdid.h b/include/mshtmdid.h index 9393b84..947e1b8 100644 --- a/include/mshtmdid.h +++ b/include/mshtmdid.h @@ -2767,6 +2767,11 @@ #define DISPID_IHTMLINPUTTEXTELEMENT_READONLY DISPID_INPUT+5 #define DISPID_IHTMLINPUTTEXTELEMENT_CREATETEXTRANGE DISPID_INPUT+6 +/* IHTMLInputTextElement2 */ +#define DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONSTART DISPID_INPUT+25 +#define DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONEND DISPID_INPUT+26 +#define DISPID_IHTMLINPUTTEXTELEMENT2_SETSELECTIONRANGE DISPID_INPUT+27 + /* IHTMLSelectElement */ #define DISPID_IHTMLSELECTELEMENT_SIZE DISPID_SELECT+2 #define DISPID_IHTMLSELECTELEMENT_MULTIPLE DISPID_SELECT+3 diff --git a/include/mshtml.idl b/include/mshtml.idl index 4a8913f..10aa69d 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -10955,6 +10955,33 @@ interface IHTMLInputTextElement : IDispatch HRESULT createTextRange([retval, out] IHTMLTxtRange **range); } +/***************************************************************************** + * IHTMLInputTextElement2 interface + */ +[ + odl, + oleautomation, + dual, + uuid(3050f2d2-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLInputTextElement2 : IDispatch +{ + [propput, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONSTART)] + HRESULT selectionStart([in] long v); + + [propget, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONSTART)] + HRESULT selectionStart([out, retval] long *p); + + [propput, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONEND)] + HRESULT selectionEnd([in] long v); + + [propget, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONEND)] + HRESULT selectionEnd([out, retval] long *p); + + [id(DISPID_IHTMLINPUTTEXTELEMENT2_SETSELECTIONRANGE)] + HRESULT setSelectionRange([in] long start, [in] long end); +} + [ hidden, uuid(3050f57d-98b5-11cf-bb82-00aa00bdce0b) @@ -11162,6 +11189,21 @@ methods: [propget, id(DISPID_IHTMLINPUTELEMENT2_USEMAP), displaybind, bindable] BSTR useMap(); + + [propput, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONSTART)] + void selectionStart(long v); + + [propget, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONSTART)] + long selectionStart(); + + [propput, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONEND)] + void selectionEnd(long v); + + [propget, id(DISPID_IHTMLINPUTTEXTELEMENT2_SELECTIONEND)] + long selectionEnd(); + + [id(DISPID_IHTMLINPUTTEXTELEMENT2_SETSELECTIONRANGE)] + void setSelectionRange([in] long start, [in] long end); } /***************************************************************************** @@ -11183,7 +11225,7 @@ coclass HTMLInputElement interface IHTMLInputElement; /* interface IHTMLInputElement2; */ interface IHTMLInputTextElement; - /* interface IHTMLInputTextElement2; */ + interface IHTMLInputTextElement2; /* interface IHTMLInputHiddenElement; */ /* interface IHTMLInputButtonElement; */ /* interface IHTMLInputFileElement; */
1
0
0
0
Jacek Caban : oleaut32: Simplify VarCat implementation.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: 840ab7cd1c797f4a05866dd0eae15bb627b1b637 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=840ab7cd1c797f4a05866dd0e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 15 15:03:52 2017 +0200 oleaut32: Simplify VarCat implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/variant.c | 123 +++++++++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 70 deletions(-) diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index ee203d7..a760a65 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -2517,14 +2517,15 @@ VarNumFromParseNum_DecOverflow: */ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out) { - VARTYPE leftvt,rightvt,resultvt; + BSTR left_str = NULL, right_str = NULL; + VARTYPE leftvt, rightvt; HRESULT hres; + TRACE("%s,%s,%p)\n", debugstr_variant(left), debugstr_variant(right), out); + leftvt = V_VT(left); rightvt = V_VT(right); - TRACE("%s,%s,%p)\n", debugstr_variant(left), debugstr_variant(right), out); - /* when both left and right are NULL the result is NULL */ if (leftvt == VT_NULL && rightvt == VT_NULL) { @@ -2532,9 +2533,6 @@ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out) return S_OK; } - hres = S_OK; - resultvt = VT_EMPTY; - /* There are many special case for errors and return types */ if (leftvt == VT_VARIANT && (rightvt == VT_ERROR || rightvt == VT_DATE || rightvt == VT_DECIMAL)) @@ -2560,7 +2558,7 @@ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out) rightvt == VT_UINT || rightvt == VT_EMPTY || rightvt == VT_NULL || rightvt == VT_DATE || rightvt == VT_DECIMAL || rightvt == VT_DISPATCH)) - resultvt = VT_BSTR; + hres = S_OK; else if (rightvt == VT_ERROR && leftvt < VT_VOID) hres = DISP_E_TYPEMISMATCH; else if (leftvt == VT_ERROR && (rightvt == VT_DATE || @@ -2590,87 +2588,72 @@ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out) /* if result type is not S_OK, then no need to go further */ if (hres != S_OK) { - V_VT(out) = resultvt; + V_VT(out) = VT_EMPTY; return hres; } - /* Else proceed with formatting inputs to strings */ + + if (leftvt == VT_BSTR) + left_str = V_BSTR(left); else { - VARIANT bstrvar_left, bstrvar_right; - VARIANT *tmp; - VARIANT fetched; + VARIANT converted, *tmp = left; - V_VT(out) = VT_BSTR; + VariantInit(&converted); + if(leftvt == VT_DISPATCH) + { + hres = VARIANT_FetchDispatchValue(left, &converted); + if(FAILED(hres)) + goto failed; - VariantInit(&bstrvar_left); - VariantInit(&bstrvar_right); - VariantInit(&fetched); + tmp = &converted; + } - /* Convert left side variant to string */ - if (leftvt != VT_BSTR) + hres = VariantChangeTypeEx(&converted, tmp, 0, VARIANT_ALPHABOOL|VARIANT_LOCALBOOL, VT_BSTR); + if (SUCCEEDED(hres)) + left_str = V_BSTR(&converted); + else if (hres != DISP_E_TYPEMISMATCH) { - tmp = left; - - if(leftvt == VT_DISPATCH) - { - hres = VARIANT_FetchDispatchValue(left, &fetched); - if(FAILED(hres)) - goto failed; + VariantClear(&converted); + goto failed; + } + } - tmp = &fetched; - } + if (rightvt == VT_BSTR) + right_str = V_BSTR(right); + else + { + VARIANT converted, *tmp = right; - hres = VariantChangeTypeEx(&bstrvar_left,tmp,0,VARIANT_ALPHABOOL|VARIANT_LOCALBOOL,VT_BSTR); - VariantClear(&fetched); - if (hres == DISP_E_TYPEMISMATCH) - { - V_VT(&bstrvar_left) = VT_BSTR; - V_BSTR(&bstrvar_left) = SysAllocStringLen(NULL, 0); - } - else if(hres != S_OK) + VariantInit(&converted); + if(rightvt == VT_DISPATCH) + { + hres = VARIANT_FetchDispatchValue(right, &converted); + if(FAILED(hres)) goto failed; + + tmp = &converted; } - /* convert right side variant to string */ - if (rightvt != VT_BSTR) + hres = VariantChangeTypeEx(&converted, tmp, 0, VARIANT_ALPHABOOL|VARIANT_LOCALBOOL, VT_BSTR); + if (SUCCEEDED(hres)) + right_str = V_BSTR(&converted); + else if (hres != DISP_E_TYPEMISMATCH) { - tmp = right; - - if(rightvt == VT_DISPATCH) - { - hres = VARIANT_FetchDispatchValue(right, &fetched); - if(FAILED(hres)) - goto failed; - - tmp = &fetched; - } - - hres = VariantChangeTypeEx(&bstrvar_right,tmp,0,VARIANT_ALPHABOOL|VARIANT_LOCALBOOL,VT_BSTR); - VariantClear(&fetched); - if (hres == DISP_E_TYPEMISMATCH) - { - V_VT(&bstrvar_right) = VT_BSTR; - V_BSTR(&bstrvar_right) = SysAllocStringLen(NULL, 0); - } - else if(hres != S_OK) - goto failed; + VariantClear(&converted); + goto failed; } + } - /* Concat the resulting strings together */ - if (leftvt == VT_BSTR && rightvt == VT_BSTR) - hres = VarBstrCat (V_BSTR(left), V_BSTR(right), &V_BSTR(out)); - else if (leftvt != VT_BSTR && rightvt != VT_BSTR) - hres = VarBstrCat (V_BSTR(&bstrvar_left), V_BSTR(&bstrvar_right), &V_BSTR(out)); - else if (leftvt != VT_BSTR && rightvt == VT_BSTR) - hres = VarBstrCat (V_BSTR(&bstrvar_left), V_BSTR(right), &V_BSTR(out)); - else if (leftvt == VT_BSTR && rightvt != VT_BSTR) - hres = VarBstrCat (V_BSTR(left), V_BSTR(&bstrvar_right), &V_BSTR(out)); + + V_VT(out) = VT_BSTR; + hres = VarBstrCat(left_str, right_str, &V_BSTR(out)); failed: - VariantClear(&bstrvar_left); - VariantClear(&bstrvar_right); - return hres; - } + if(V_VT(left) != VT_BSTR) + SysFreeString(left_str); + if(V_VT(right) != VT_BSTR) + SysFreeString(right_str); + return hres; }
1
0
0
0
Hugh McMaster : regedit: Add data parsing operations to the state machine.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: 191b81dbd38065c01d19007fd150ce4d1beeb112 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=191b81dbd38065c01d19007fd…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jun 15 12:01:47 2017 +0000 regedit: Add data parsing operations to the state machine. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ar.po | 2 +- po/bg.po | 2 +- po/ca.po | 4 +- po/cs.po | 2 +- po/da.po | 2 +- po/de.po | 4 +- po/el.po | 2 +- po/en.po | 4 +- po/en_US.po | 4 +- po/eo.po | 2 +- po/es.po | 2 +- po/fa.po | 2 +- po/fi.po | 4 +- po/fr.po | 4 +- po/he.po | 2 +- po/hi.po | 2 +- po/hr.po | 2 +- po/hu.po | 2 +- po/it.po | 2 +- po/ja.po | 4 +- po/ko.po | 2 +- po/lt.po | 4 +- po/ml.po | 2 +- po/nb_NO.po | 4 +- po/nl.po | 2 +- po/or.po | 2 +- po/pa.po | 2 +- po/pl.po | 4 +- po/pt_BR.po | 4 +- po/pt_PT.po | 2 +- po/rm.po | 2 +- po/ro.po | 2 +- po/ru.po | 4 +- po/sk.po | 2 +- po/sl.po | 2 +- po/sr_RS(a)cyrillic.po | 2 +- po/sr_RS(a)latin.po | 2 +- po/sv.po | 2 +- po/te.po | 2 +- po/th.po | 2 +- po/tr.po | 4 +- po/uk.po | 4 +- po/wa.po | 2 +- po/wine.pot | 2 +- po/zh_CN.po | 4 +- po/zh_TW.po | 2 +- programs/regedit/regedit.rc | 2 +- programs/regedit/regproc.c | 329 ++++++++++++++++++++++----------------- programs/regedit/tests/regedit.c | 16 +- 49 files changed, 267 insertions(+), 202 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=191b81dbd38065c01d190…
1
0
0
0
Hugh McMaster : regedit: Perform value name operations in the state machine.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: d60c31eadb121e834c44e4e8ff8cba663effc3e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d60c31eadb121e834c44e4e8f…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jun 15 12:01:26 2017 +0000 regedit: Perform value name operations in the state machine. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/regproc.c | 146 +++++++++++++++++++++++++++------------ programs/regedit/tests/regedit.c | 2 +- 2 files changed, 101 insertions(+), 47 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index e1352a7..ad3c5d5 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -138,6 +138,10 @@ enum parser_state LINE_START, /* at the beginning of a registry line */ KEY_NAME, /* parsing a key name */ DELETE_KEY, /* deleting a registry key */ + DEFAULT_VALUE_NAME, /* parsing a default value name */ + QUOTED_VALUE_NAME, /* parsing a double-quoted value name */ + DATA_START, /* preparing for data parsing operations */ + DELETE_VALUE, /* deleting a registry value */ SET_VALUE, /* adding a value to the registry */ NB_PARSER_STATES }; @@ -163,6 +167,10 @@ static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos); static WCHAR *line_start_state(struct parser *parser, WCHAR *pos); static WCHAR *key_name_state(struct parser *parser, WCHAR *pos); static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos); +static WCHAR *default_value_name_state(struct parser *parser, WCHAR *pos); +static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos); +static WCHAR *data_start_state(struct parser *parser, WCHAR *pos); +static WCHAR *delete_value_state(struct parser *parser, WCHAR *pos); static WCHAR *set_value_state(struct parser *parser, WCHAR *pos); static const parser_state_func parser_funcs[NB_PARSER_STATES] = @@ -172,6 +180,10 @@ static const parser_state_func parser_funcs[NB_PARSER_STATES] = line_start_state, /* LINE_START */ key_name_state, /* KEY_NAME */ delete_key_state, /* DELETE_KEY */ + default_value_name_state, /* DEFAULT_VALUE_NAME */ + quoted_value_name_state, /* QUOTED_VALUE_NAME */ + data_start_state, /* DATA_START */ + delete_value_state, /* DELETE_VALUE */ set_value_state, /* SET_VALUE */ }; @@ -435,7 +447,7 @@ static LONG setValue(WCHAR* val_name, WCHAR* val_data, BOOL is_unicode) DWORD dwData, dwLen; WCHAR del[] = {'-',0}; - if ( (val_name == NULL) || (val_data == NULL) ) + if (!val_data) return ERROR_INVALID_PARAMETER; if (lstrcmpW(val_data, del) == 0) @@ -549,49 +561,6 @@ static LONG openKeyW(WCHAR* stdInput) } -/****************************************************************************** - * This function is a wrapper for the setValue function. It prepares the - * land and cleans the area once completed. - * Note: this function modifies the line parameter. - * - * line - registry file unwrapped line. Should have the registry value name and - * complete registry value data. - */ -static void processSetValue(WCHAR* line, BOOL is_unicode) -{ - WCHAR *val_name; - int len = 0; - LONG res; - - /* get value name */ - val_name = line; - - if (*line == '@') - *line++ = 0; - else if (!REGPROC_unescape_string(++val_name, &line)) - goto error; - - while (*line == ' ' || *line == '\t') line++; - if (*line != '=') - goto error; - line++; - while (*line == ' ' || *line == '\t') line++; - - /* trim trailing blanks */ - len = strlenW(line); - while (len > 0 && (line[len - 1] == ' ' || line[len - 1] == '\t')) len--; - line[len] = 0; - - res = setValue(val_name, line, is_unicode); - if ( res != ERROR_SUCCESS ) - output_message(STRING_SETVALUE_FAILED, val_name, currentKeyName); - return; - -error: - output_message(STRING_SETVALUE_FAILED, val_name, currentKeyName); - output_message(STRING_INVALID_LINE_SYNTAX); -} - enum reg_versions { REG_VERSION_31, REG_VERSION_40, @@ -728,9 +697,11 @@ static WCHAR *line_start_state(struct parser *parser, WCHAR *pos) set_state(parser, KEY_NAME); return p + 1; case '@': - case '"': - processSetValue(p, parser->is_unicode); + set_state(parser, DEFAULT_VALUE_NAME); return p; + case '"': + set_state(parser, QUOTED_VALUE_NAME); + return p + 1; case ' ': case '\t': break; @@ -778,6 +749,86 @@ static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos) return p; } +/* handler for parser DEFAULT_VALUE_NAME state */ +static WCHAR *default_value_name_state(struct parser *parser, WCHAR *pos) +{ + parser->value_name = NULL; + + set_state(parser, DATA_START); + return pos + 1; +} + +/* handler for parser QUOTED_VALUE_NAME state */ +static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos) +{ + WCHAR *val_name = pos, *p; + + if (parser->value_name) + { + HeapFree(GetProcessHeap(), 0, parser->value_name); + parser->value_name = NULL; + } + + if (!REGPROC_unescape_string(val_name, &p)) + goto invalid; + + /* copy the value name in case we need to parse multiple lines and the buffer is overwritten */ + parser->value_name = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(val_name) + 1) * sizeof(WCHAR)); + CHECK_ENOUGH_MEMORY(parser->value_name); + lstrcpyW(parser->value_name, val_name); + + set_state(parser, DATA_START); + return p; + +invalid: + set_state(parser, LINE_START); + return p; +} + +/* handler for parser DATA_START state */ +static WCHAR *data_start_state(struct parser *parser, WCHAR *pos) +{ + WCHAR *p = pos; + unsigned int len; + + while (*p == ' ' || *p == '\t') p++; + if (*p != '=') goto done; + p++; + while (*p == ' ' || *p == '\t') p++; + + /* trim trailing whitespace */ + len = strlenW(p); + while (len > 0 && (p[len - 1] == ' ' || p[len - 1] == '\t')) len--; + p[len] = 0; + + if (*p == '-') + { + set_state(parser, DELETE_VALUE); + return p; + } + else if (setValue(parser->value_name, p, parser->is_unicode) != ERROR_SUCCESS) + output_message(STRING_SETVALUE_FAILED, parser->value_name, currentKeyName); + +done: + set_state(parser, LINE_START); + return p; +} + +/* handler for parser DELETE_VALUE state */ +static WCHAR *delete_value_state(struct parser *parser, WCHAR *pos) +{ + WCHAR *p = pos + 1; + + while (*p == ' ' || *p == '\t') p++; + if (*p && *p != ';') goto done; + + RegDeleteValueW(currentKeyHandle, parser->value_name); + +done: + set_state(parser, LINE_START); + return p; +} + /* handler for parser SET_VALUE state */ static WCHAR *set_value_state(struct parser *parser, WCHAR *pos) { @@ -1432,6 +1483,9 @@ BOOL import_registry_file(FILE *reg_file) if (parser.reg_version == REG_VERSION_FUZZY || parser.reg_version == REG_VERSION_INVALID) return parser.reg_version == REG_VERSION_FUZZY; + if (parser.value_name) + HeapFree(GetProcessHeap(), 0, parser.value_name); + closeKey(); return TRUE; } diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 32d190c..c7465d8 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -1289,7 +1289,7 @@ static void test_value_deletion(void) verify_reg_nonexist(hkey, "Wine46b"); verify_reg_nonexist(hkey, "Wine46c"); verify_reg(hkey, "Wine46d", REG_MULTI_SZ, "Line concatenation\0", 20, 0); - todo_wine verify_reg_nonexist(hkey, "Wine46e"); + verify_reg_nonexist(hkey, "Wine46e"); verify_reg(hkey, "Wine46f", REG_NONE, "V\0a\0l\0u\0e\0\0", 12, 0); lr = RegCloseKey(hkey);
1
0
0
0
Hugh McMaster : regedit: Perform key operations in the state machine.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: ca98e234518ac0fd61ffd95090dbd20763690fe8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca98e234518ac0fd61ffd9509…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jun 15 12:00:55 2017 +0000 regedit: Perform key operations in the state machine. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/regproc.c | 150 ++++++++++++++++++++++----------------------- 1 file changed, 73 insertions(+), 77 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 15ad04e..e1352a7 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -136,6 +136,8 @@ enum parser_state HEADER, /* parsing the registry file version header */ PARSE_WIN31_LINE, /* parsing a Windows 3.1 registry line */ LINE_START, /* at the beginning of a registry line */ + KEY_NAME, /* parsing a key name */ + DELETE_KEY, /* deleting a registry key */ SET_VALUE, /* adding a value to the registry */ NB_PARSER_STATES }; @@ -159,6 +161,8 @@ typedef WCHAR *(*parser_state_func)(struct parser *parser, WCHAR *pos); static WCHAR *header_state(struct parser *parser, WCHAR *pos); static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos); static WCHAR *line_start_state(struct parser *parser, WCHAR *pos); +static WCHAR *key_name_state(struct parser *parser, WCHAR *pos); +static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos); static WCHAR *set_value_state(struct parser *parser, WCHAR *pos); static const parser_state_func parser_funcs[NB_PARSER_STATES] = @@ -166,6 +170,8 @@ static const parser_state_func parser_funcs[NB_PARSER_STATES] = header_state, /* HEADER */ parse_win31_line_state, /* PARSE_WIN31_LINE */ line_start_state, /* LINE_START */ + key_name_state, /* KEY_NAME */ + delete_key_state, /* DELETE_KEY */ set_value_state, /* SET_VALUE */ }; @@ -348,21 +354,20 @@ static BOOL REGPROC_unescape_string(WCHAR *str, WCHAR **unparsed) return ret; } -static HKEY parseKeyName(LPWSTR lpKeyName, LPWSTR *lpKeyPath) +static HKEY parse_key_name(WCHAR *key_name, WCHAR **key_path) { unsigned int i; - if (lpKeyName == NULL) - return 0; + if (!key_name) return 0; - *lpKeyPath = strchrW(lpKeyName, '\\'); - if (*lpKeyPath) (*lpKeyPath)++; + *key_path = strchrW(key_name, '\\'); + if (*key_path) (*key_path)++; for (i = 0; i < ARRAY_SIZE(reg_class_keys); i++) { int len = lstrlenW(reg_class_namesW[i]); - if (!strncmpW(lpKeyName, reg_class_namesW[i], len) && - (lpKeyName[len] == 0 || lpKeyName[len] == '\\')) + if (!strncmpW(key_name, reg_class_namesW[i], len) && + (key_name[len] == 0 || key_name[len] == '\\')) { return reg_class_keys[i]; } @@ -500,36 +505,36 @@ static LONG setValue(WCHAR* val_name, WCHAR* val_data, BOOL is_unicode) return res; } +static void closeKey(void) +{ + if (currentKeyHandle) + { + HeapFree(GetProcessHeap(), 0, currentKeyName); + currentKeyName = NULL; + + RegCloseKey(currentKeyHandle); + currentKeyHandle = NULL; + } +} + /****************************************************************************** - * A helper function for processRegEntry() that opens the current key. - * That key must be closed by calling closeKey(). + * Opens the registry key given by the input path. + * This key must be closed by calling close_key(). */ static LONG openKeyW(WCHAR* stdInput) { - HKEY keyClass; - WCHAR* keyPath; - DWORD dwDisp; + HKEY key_class; + WCHAR *key_path; LONG res; - /* Sanity checks */ - if (stdInput == NULL) - return ERROR_INVALID_PARAMETER; + closeKey(); /* Get the registry class */ - if (!(keyClass = parseKeyName(stdInput, &keyPath))) + if (!stdInput || !(key_class = parse_key_name(stdInput, &key_path))) return ERROR_INVALID_PARAMETER; - res = RegCreateKeyExW( - keyClass, /* Class */ - keyPath, /* Sub Key */ - 0, /* MUST BE 0 */ - NULL, /* object type */ - REG_OPTION_NON_VOLATILE, /* option, REG_OPTION_NON_VOLATILE ... */ - KEY_ALL_ACCESS, /* access mask, KEY_ALL_ACCESS */ - NULL, /* security attribute */ - ¤tKeyHandle, /* result */ - &dwDisp); /* disposition, REG_CREATED_NEW_KEY or - REG_OPENED_EXISTING_KEY */ + res = RegCreateKeyExW(key_class, key_path, 0, NULL, REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, NULL, ¤tKeyHandle, NULL); if (res == ERROR_SUCCESS) { @@ -545,19 +550,6 @@ static LONG openKeyW(WCHAR* stdInput) } /****************************************************************************** - * Close the currently opened key. - */ -static void closeKey(void) -{ - if (currentKeyHandle) - { - HeapFree(GetProcessHeap(), 0, currentKeyName); - RegCloseKey(currentKeyHandle); - currentKeyHandle = NULL; - } -} - -/****************************************************************************** * This function is a wrapper for the setValue function. It prepares the * land and cleans the area once completed. * Note: this function modifies the line parameter. @@ -600,38 +592,6 @@ error: output_message(STRING_INVALID_LINE_SYNTAX); } -/****************************************************************************** - * This function receives the currently read entry and performs the - * corresponding action. - * isUnicode affects parsing of REG_MULTI_SZ values - */ -static void processRegEntry(WCHAR* stdInput, BOOL isUnicode) -{ - if ( stdInput[0] == '[') /* We are reading a new key */ - { - WCHAR* keyEnd; - closeKey(); /* Close the previous key */ - - /* Get rid of the square brackets */ - stdInput++; - keyEnd = strrchrW(stdInput, ']'); - if (keyEnd) - *keyEnd='\0'; - else return; - - /* delete the key if we encounter '-' at the start of reg key */ - if (stdInput[0] == '-') - delete_registry_key(stdInput + 1); - else if (openKeyW(stdInput) != ERROR_SUCCESS) - output_message(STRING_OPEN_KEY_FAILED, stdInput); - } else if( currentKeyHandle && - (( stdInput[0] == '@') || /* reading a default @=data pair */ - ( stdInput[0] == '\"'))) /* reading a new value=data pair */ - { - processSetValue(stdInput, isUnicode); - } -} - enum reg_versions { REG_VERSION_31, REG_VERSION_40, @@ -765,11 +725,12 @@ static WCHAR *line_start_state(struct parser *parser, WCHAR *pos) switch (*p) { case '[': + set_state(parser, KEY_NAME); + return p + 1; case '@': case '"': - processRegEntry(p, parser->is_unicode); - set_state(parser, LINE_START); - return line; + processSetValue(p, parser->is_unicode); + return p; case ' ': case '\t': break; @@ -782,6 +743,41 @@ static WCHAR *line_start_state(struct parser *parser, WCHAR *pos) return p; } +/* handler for parser KEY_NAME state */ +static WCHAR *key_name_state(struct parser *parser, WCHAR *pos) +{ + WCHAR *p = pos, *key_end; + + if (*p == ' ' || *p == '\t' || !(key_end = strrchrW(p, ']'))) + goto done; + + *key_end = 0; + + if (*p == '-') + { + set_state(parser, DELETE_KEY); + return p + 1; + } + else if (openKeyW(p) != ERROR_SUCCESS) + output_message(STRING_OPEN_KEY_FAILED, p); + +done: + set_state(parser, LINE_START); + return p; +} + +/* handler for parser DELETE_KEY state */ +static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos) +{ + WCHAR *p = pos; + + if (*p == 'H') + delete_registry_key(p); + + set_state(parser, LINE_START); + return p; +} + /* handler for parser SET_VALUE state */ static WCHAR *set_value_state(struct parser *parser, WCHAR *pos) { @@ -1348,7 +1344,7 @@ BOOL export_registry_key(WCHAR *file_name, WCHAR *reg_key_name, DWORD format) lstrcpyW(reg_key_name_buf, reg_key_name); /* open the specified key */ - if (!(reg_key_class = parseKeyName(reg_key_name, &branch_name))) { + if (!(reg_key_class = parse_key_name(reg_key_name, &branch_name))) { output_message(STRING_INCORRECT_REG_CLASS, reg_key_name); exit(1); } @@ -1455,7 +1451,7 @@ void delete_registry_key(WCHAR *reg_key_name) if (!reg_key_name || !reg_key_name[0]) return; - if (!(key_class = parseKeyName(reg_key_name, &key_name))) { + if (!(key_class = parse_key_name(reg_key_name, &key_name))) { output_message(STRING_INCORRECT_REG_CLASS, reg_key_name); exit(1); }
1
0
0
0
Hugh McMaster : regedit: Introduce a partial state machine for importing registry data.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: ec87800856c20b90a73924e05ab442a6bae0eec0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec87800856c20b90a73924e05…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jun 15 12:00:31 2017 +0000 regedit: Introduce a partial state machine for importing registry data. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/regproc.c | 265 ++++++++++++++++++++++++++++----------- programs/regedit/tests/regedit.c | 16 +-- 2 files changed, 201 insertions(+), 80 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ec87800856c20b90a7392…
1
0
0
0
Hugh McMaster : regedit: Free the stringValueData buffer before using it again (Coverity).
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: b1e48fb469c8bba38716b85a49965deefb79ec5f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1e48fb469c8bba38716b85a4…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jun 15 11:58:54 2017 +0000 regedit: Free the stringValueData buffer before using it again (Coverity). Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/edit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index fcf2a60..d88061c 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -378,6 +378,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName) { int index = SendMessageW(g_pChildWnd->hListWnd, LVM_GETNEXTITEM, -1, MAKELPARAM(LVNI_FOCUSED | LVNI_SELECTED, 0)); + HeapFree(GetProcessHeap(), 0, stringValueData); stringValueData = read_value(hwnd, hKey, valueName, &type, &len); format_value_data(g_pChildWnd->hListWnd, index, type, stringValueData, len); }
1
0
0
0
Hugh McMaster : regedit/tests: Test whether "" is interpreted as the default registry value.
by Alexandre Julliard
15 Jun '17
15 Jun '17
Module: wine Branch: master Commit: 06b0a6d94d1428dce9714cebe2092cf4e72e1c0a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=06b0a6d94d1428dce9714cebe…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jun 15 11:58:46 2017 +0000 regedit/tests: Test whether "" is interpreted as the default registry value. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/tests/regedit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 6800380..c470414 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -264,8 +264,10 @@ static void test_basic_import(void) exec_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" - "\"Empty string\"=\"\"\n\n"); + "\"Empty string\"=\"\"\n" + "\"\"=\"Default registry value\"\n\n"); verify_reg(hkey, "Empty string", REG_SZ, "", 1, 0); + verify_reg(hkey, NULL, REG_SZ, "Default registry value", 23, 0); exec_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
60
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
Results per page:
10
25
50
100
200