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
October 2013
----- 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
757 discussions
Start a n
N
ew thread
Alexandre Julliard : explorer: Make sure the graphics driver module is always set.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: 040bd407c722e3c073c7cac4df9c1a7d89a64b98 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=040bd407c722e3c073c7cac4d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 18 11:38:42 2013 +0200 explorer: Make sure the graphics driver module is always set. --- programs/explorer/desktop.c | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 694f3f6..4c38edb 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -40,7 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(explorer); #define DESKTOP_CLASS_ATOM ((LPCWSTR)MAKEINTATOM(32769)) #define DESKTOP_ALL_ACCESS 0x01ff -static HMODULE graphics_driver; static BOOL using_root; struct launcher @@ -549,16 +548,16 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR } /* create the desktop and the associated driver window, and make it the current desktop */ -static BOOL create_desktop( const WCHAR *name, unsigned int width, unsigned int height ) +static BOOL create_desktop( HMODULE driver, const WCHAR *name, unsigned int width, unsigned int height ) { static const WCHAR rootW[] = {'r','o','o','t',0}; BOOL ret = FALSE; BOOL (CDECL *create_desktop_func)(unsigned int, unsigned int); /* magic: desktop "root" means use the root window */ - if (graphics_driver && strcmpiW( name, rootW )) + if (driver && strcmpiW( name, rootW )) { - create_desktop_func = (void *)GetProcAddress( graphics_driver, "wine_create_desktop" ); + create_desktop_func = (void *)GetProcAddress( driver, "wine_create_desktop" ); if (create_desktop_func) ret = create_desktop_func( width, height ); } return ret; @@ -749,16 +748,14 @@ void manage_desktop( WCHAR *arg ) if (hwnd == GetDesktopWindow()) { - HMODULE shell32; + HMODULE shell32, graphics_driver; void (WINAPI *pShellDDEInit)( BOOL ); - if (desktop) - { - hdc = GetDC( hwnd ); - graphics_driver = __wine_get_driver_module( hdc ); - using_root = !create_desktop( name, width, height ); - ReleaseDC( hwnd, hdc ); - } + hdc = GetDC( hwnd ); + graphics_driver = __wine_get_driver_module( hdc ); + using_root = !desktop || !create_desktop( graphics_driver, name, width, height ); + ReleaseDC( hwnd, hdc ); + SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)desktop_wnd_proc ); SendMessageW( hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconW( 0, MAKEINTRESOURCEW(OIC_WINLOGO))); if (name) set_desktop_window_title( hwnd, name );
1
0
0
0
Frédéric Delanoy : d3dxof: Use BOOL type where appropriate.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: 497f088715f00eeb5076afe8f035886a843361da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=497f088715f00eeb5076afe8f…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Oct 18 12:35:08 2013 +0200 d3dxof: Use BOOL type where appropriate. --- dlls/d3dxof/parsing.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index f7f67c5..49ff964 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -542,7 +542,7 @@ static BOOL is_float(parse_buffer* buf) DWORD pos = 0; char c; float decimal; - BOOL dot = 0; + BOOL dot = FALSE; while (pos < buf->rem_bytes && !is_separator(c = *(buf->buffer+pos))) { @@ -899,10 +899,10 @@ static inline BOOL is_primitive_type(WORD token) case TOKEN_LPSTR: case TOKEN_UNICODE: case TOKEN_CSTRING: - ret = 1; + ret = TRUE; break; default: - ret = 0; + ret = FALSE; break; } return ret; @@ -948,14 +948,14 @@ static BOOL parse_template_members_list(parse_buffer * buf) while (1) { - BOOL array = 0; + BOOL array = FALSE; int nb_dims = 0; cur_member = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[idx_member]; if (check_TOKEN(buf) == TOKEN_ARRAY) { get_TOKEN(buf); - array = 1; + array = TRUE; } if (check_TOKEN(buf) == TOKEN_NAME)
1
0
0
0
Frédéric Delanoy : oleaut32/tests: Use BOOL type where appropriate.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: 3f91834ffb72a99defe86271f6a2b3ae4c7d621e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f91834ffb72a99defe86271f…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Oct 18 11:25:02 2013 +0200 oleaut32/tests: Use BOOL type where appropriate. --- dlls/oleaut32/tests/olefont.c | 38 +++++++++++++++++++------------------- dlls/oleaut32/tests/typelib.c | 2 +- dlls/oleaut32/tests/vartest.c | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index 2482554..9761778 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -77,9 +77,9 @@ static void test_ifont_size(LONG lo_size, LONG hi_size, S(fd.cySize).Hi = hi_size; fd.sWeight = 0; fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; + fd.fItalic = FALSE; + fd.fUnderline = FALSE; + fd.fStrikethrough = FALSE; /* Create font, test that it worked. */ hres = pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj); @@ -539,9 +539,9 @@ static void test_IsEqual(void) S(fd.cySize).Hi = 100; fd.sWeight = 0; fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; + fd.fItalic = FALSE; + fd.fUnderline = FALSE; + fd.fStrikethrough = FALSE; /* Create font */ pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt); @@ -604,30 +604,30 @@ static void test_IsEqual(void) IFont_Release(ifnt2); /* Test italic setting */ - fd.fItalic = 1; + fd.fItalic = TRUE; pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, "IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08x\n",hres); - fd.fItalic = 0; + fd.fItalic = FALSE; IFont_Release(ifnt2); /* Test underline setting */ - fd.fUnderline = 1; + fd.fUnderline = TRUE; pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, "IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08x\n",hres); - fd.fUnderline = 0; + fd.fUnderline = FALSE; IFont_Release(ifnt2); /* Test strikethrough setting */ - fd.fStrikethrough = 1; + fd.fStrikethrough = TRUE; pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, "IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08x\n",hres); - fd.fStrikethrough = 0; + fd.fStrikethrough = FALSE; IFont_Release(ifnt2); /* Free IFont. */ @@ -652,9 +652,9 @@ static void test_ReleaseHfont(void) S(fd.cySize).Hi = 100; fd.sWeight = 0; fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; + fd.fItalic = FALSE; + fd.fUnderline = FALSE; + fd.fStrikethrough = FALSE; /* Create HFONTs and IFONTs */ pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj1); @@ -722,9 +722,9 @@ static void test_AddRefHfont(void) S(fd.cySize).Hi = 100; fd.sWeight = 0; fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; + fd.fItalic = FALSE; + fd.fUnderline = FALSE; + fd.fStrikethrough = FALSE; /* Create HFONTs and IFONTs */ pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt1); @@ -813,7 +813,7 @@ static void test_AddRefHfont(void) IFont_Release(ifnt2); /* Need to make a new IFONT for testing */ - fd.fUnderline = 1; + fd.fUnderline = TRUE; pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt3); IFont_get_hFont(ifnt3,&hfnt3); diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index c356ae0..9f6fa1f 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -76,7 +76,7 @@ static const WCHAR wszStdOle2[] = {'s','t','d','o','l','e','2','.','t','l','b',0 static WCHAR wszGUID[] = {'G','U','I','D',0}; static WCHAR wszguid[] = {'g','u','i','d',0}; -static const int is_win64 = sizeof(void *) > sizeof(int); +static const BOOL is_win64 = sizeof(void *) > sizeof(int); static HRESULT WINAPI invoketest_QueryInterface(IInvokeTest *iface, REFIID riid, void **ret) { diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 1ee3c4f..2840f47 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -381,9 +381,9 @@ static const VARTYPE ExtraFlags[16] = }; /* Determine if a vt is valid for VariantClear() */ -static int IsValidVariantClearVT(VARTYPE vt, VARTYPE extraFlags) +static BOOL IsValidVariantClearVT(VARTYPE vt, VARTYPE extraFlags) { - int ret = 0; + BOOL ret = FALSE; /* Only the following flags/types are valid */ if ((vt <= VT_LPWSTR || vt == VT_RECORD || vt == VT_CLSID) && @@ -392,10 +392,10 @@ static int IsValidVariantClearVT(VARTYPE vt, VARTYPE extraFlags) (!(extraFlags & (VT_BYREF|VT_ARRAY)) || vt > VT_NULL) && (extraFlags == 0 || extraFlags == VT_BYREF || extraFlags == VT_ARRAY || extraFlags == (VT_ARRAY|VT_BYREF))) - ret = 1; /* ok */ + ret = TRUE; /* ok */ if (!has_i8 && (vt == VT_I8 || vt == VT_UI8)) - ret = 0; /* Old versions of oleaut32 */ + ret = FALSE; /* Old versions of oleaut32 */ return ret; } @@ -681,15 +681,15 @@ static void test_VariantCopy(void) } /* Determine if a vt is valid for VariantCopyInd() */ -static int IsValidVariantCopyIndVT(VARTYPE vt, VARTYPE extraFlags) +static BOOL IsValidVariantCopyIndVT(VARTYPE vt, VARTYPE extraFlags) { - int ret = 0; + BOOL ret = FALSE; if ((extraFlags & VT_ARRAY) || (vt > VT_NULL && vt != (VARTYPE)15 && vt < VT_VOID && !(extraFlags & (VT_VECTOR|VT_RESERVED)))) { - ret = 1; /* ok */ + ret = TRUE; /* ok */ } return ret; } @@ -2875,7 +2875,7 @@ static void test_VarFix(void) for (vt = 0; vt <= VT_BSTR_BLOB; vt++) { - HRESULT bFail = TRUE; + BOOL bFail = TRUE; SKIPTESTS(vt); @@ -2990,7 +2990,7 @@ static void test_VarInt(void) for (vt = 0; vt <= VT_BSTR_BLOB; vt++) { - HRESULT bFail = TRUE; + BOOL bFail = TRUE; SKIPTESTS(vt); @@ -3111,7 +3111,7 @@ static void test_VarNeg(void) for (vt = 0; vt <= VT_BSTR_BLOB; vt++) { - HRESULT bFail = TRUE; + BOOL bFail = TRUE; SKIPTESTS(vt);
1
0
0
0
Frédéric Delanoy : oleaut32: Use BOOL type where appropriate.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: f4dc64918e6629b877adf41f8153bdb50f4c72ca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4dc64918e6629b877adf41f8…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Oct 18 11:25:00 2013 +0200 oleaut32: Use BOOL type where appropriate. --- dlls/oleaut32/olefont.c | 6 +++--- dlls/oleaut32/typelib.c | 9 +++++---- dlls/oleaut32/vartype.c | 28 ++++++++++++++-------------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c index b5c0cb4..c0925a2 100644 --- a/dlls/oleaut32/olefont.c +++ b/dlls/oleaut32/olefont.c @@ -353,9 +353,9 @@ HRESULT WINAPI OleCreateFontIndirect( fd.cySize.s.Hi = 0; fd.sWeight = 0; fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; + fd.fItalic = FALSE; + fd.fUnderline = FALSE; + fd.fStrikethrough = FALSE; lpFontDesc = &fd; } diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index a807eb3..07da928 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -2407,7 +2407,7 @@ static void MSFT_GetTdesc(TLBContext *pcx, INT type, TYPEDESC *pTd) TRACE_(typelib)("vt type = %X\n", pTd->vt); } -static int TLB_is_propgetput(INVOKEKIND invkind) +static BOOL TLB_is_propgetput(INVOKEKIND invkind) { return (invkind == INVOKE_PROPERTYGET || invkind == INVOKE_PROPERTYPUT || @@ -5428,7 +5428,8 @@ static HRESULT WINAPI ITypeLibComp_fnBind( BINDPTR * pBindPtr) { ITypeLibImpl *This = impl_from_ITypeComp(iface); - int typemismatch=0, i; + BOOL typemismatch = FALSE; + int i; TRACE("(%p)->(%s, 0x%x, 0x%x, %p, %p, %p)\n", This, debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr); @@ -5469,7 +5470,7 @@ static HRESULT WINAPI ITypeLibComp_fnBind( return S_OK; } else if (hr == TYPE_E_TYPEMISMATCH) - typemismatch = 1; + typemismatch = TRUE; } if ((pTypeInfo->typekind == TKIND_COCLASS) && @@ -5540,7 +5541,7 @@ static HRESULT WINAPI ITypeLibComp_fnBind( return S_OK; } else if (hr == TYPE_E_TYPEMISMATCH) - typemismatch = 1; + typemismatch = TRUE; } } diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index e1672a1..d492e7d 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -4682,10 +4682,10 @@ static unsigned char VARIANT_int_divbychar(DWORD * p, unsigned int n, unsigned c } /* check to test if encoded number is a zero. Returns 1 if zero, 0 for nonzero */ -static int VARIANT_int_iszero(const DWORD * p, unsigned int n) +static BOOL VARIANT_int_iszero(const DWORD * p, unsigned int n) { - for (; n > 0; n--) if (*p++ != 0) return 0; - return 1; + for (; n > 0; n--) if (*p++ != 0) return FALSE; + return TRUE; } /* multiply two DECIMALS, without changing either one, and place result in third @@ -4695,7 +4695,7 @@ static int VARIANT_int_iszero(const DWORD * p, unsigned int n) */ static int VARIANT_DI_mul(const VARIANT_DI * a, const VARIANT_DI * b, VARIANT_DI * result) { - int r_overflow = 0; + BOOL r_overflow = FALSE; DWORD running[6]; signed int mulstart; @@ -4786,12 +4786,12 @@ static int VARIANT_DI_mul(const VARIANT_DI * a, const VARIANT_DI * b, VARIANT_DI } /* cast DECIMAL into string. Any scale should be handled properly. en_US locale is - hardcoded (period for decimal separator, dash as negative sign). Returns 0 for - success, nonzero if insufficient space in output buffer. + hardcoded (period for decimal separator, dash as negative sign). Returns TRUE for + success, FALSE if insufficient space in output buffer. */ -static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) +static BOOL VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) { - int overflow = 0; + BOOL overflow = FALSE; DWORD quotient[3]; unsigned char remainder; unsigned int i; @@ -4802,7 +4802,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) *s++ = '-'; n--; } - else overflow = 1; + else overflow = TRUE; } /* prepare initial 0 */ @@ -4810,7 +4810,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) if (n >= 2) { s[0] = '0'; s[1] = '\0'; - } else overflow = 1; + } else overflow = TRUE; } i = 0; @@ -4818,7 +4818,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) while (!overflow && !VARIANT_int_iszero(quotient, sizeof(quotient) / sizeof(DWORD))) { remainder = VARIANT_int_divbychar(quotient, sizeof(quotient) / sizeof(DWORD), 10); if (i + 2 > n) { - overflow = 1; + overflow = TRUE; } else { s[i++] = '0' + remainder; s[i] = '\0'; @@ -4839,7 +4839,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) if (i <= a->scale) { unsigned int numzeroes = a->scale + 1 - i; if (i + 1 + numzeroes >= n) { - overflow = 1; + overflow = TRUE; } else { memmove(s + numzeroes, s, (i + 1) * sizeof(WCHAR)); i += numzeroes; @@ -4853,7 +4853,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) if (a->scale > 0) { unsigned int periodpos = i - a->scale; if (i + 2 >= n) { - overflow = 1; + overflow = TRUE; } else { memmove(s + periodpos + 1, s + periodpos, (i + 1 - periodpos) * sizeof(WCHAR)); s[periodpos] = '.'; i++; @@ -4865,7 +4865,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n) } } - return overflow; + return !overflow; } /* shift the bits of a DWORD array to the left. p[0] is assumed LSB */
1
0
0
0
Jacek Caban : crypt32: Use empty_store for new CTL contexts.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: eae8f4eda125693ec6467ffaca1be051845b6881 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eae8f4eda125693ec6467ffac…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 18 10:51:05 2013 +0200 crypt32: Use empty_store for new CTL contexts. --- dlls/crypt32/ctl.c | 2 +- dlls/crypt32/tests/store.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/ctl.c b/dlls/crypt32/ctl.c index ef5410a..7a8c21f 100644 --- a/dlls/crypt32/ctl.c +++ b/dlls/crypt32/ctl.c @@ -453,7 +453,7 @@ PCCTL_CONTEXT WINAPI CertCreateCTLContext(DWORD dwMsgAndCertEncodingType, ctl->pbCtlEncoded = data; ctl->cbCtlEncoded = cbCtlEncoded; ctl->pCtlInfo = ctlInfo; - ctl->hCertStore = NULL; + ctl->hCertStore = &empty_store; ctl->hCryptMsg = msg; ctl->pbCtlContext = content; ctl->cbCtlContext = contentSize; diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index ea85dbf..1fa3ffa 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -2531,6 +2531,7 @@ static void testEmptyStore(void) { const CERT_CONTEXT *cert, *cert2, *cert3; const CRL_CONTEXT *crl; + const CTL_CONTEXT *ctl; HCERTSTORE store; BOOL res; @@ -2594,6 +2595,12 @@ static void testEmptyStore(void) CertFreeCRLContext(crl); + ctl = CertCreateCTLContext(X509_ASN_ENCODING, signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent)); + ok(ctl != NULL, "CertCreateCTLContext failed\n"); + ok(ctl->hCertStore == cert->hCertStore, "unexpected hCertStore\n"); + + CertFreeCTLContext(ctl); + CertFreeCertificateContext(cert); }
1
0
0
0
Jacek Caban : crypt32: Use empty_store for new CRL contexts.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: c01a7084248ca1f71f2b6d1f0e235f115bf927f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c01a7084248ca1f71f2b6d1f0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 18 10:50:53 2013 +0200 crypt32: Use empty_store for new CRL contexts. --- dlls/crypt32/crl.c | 2 +- dlls/crypt32/tests/store.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c index bf67a6b..4686e11 100644 --- a/dlls/crypt32/crl.c +++ b/dlls/crypt32/crl.c @@ -97,7 +97,7 @@ PCCRL_CONTEXT WINAPI CertCreateCRLContext(DWORD dwCertEncodingType, crl->pbCrlEncoded = data; crl->cbCrlEncoded = cbCrlEncoded; crl->pCrlInfo = crlInfo; - crl->hCertStore = 0; + crl->hCertStore = &empty_store; } end: diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 5e99503..ea85dbf 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -2530,6 +2530,7 @@ static DWORD countCRLsInStore(HCERTSTORE store) static void testEmptyStore(void) { const CERT_CONTEXT *cert, *cert2, *cert3; + const CRL_CONTEXT *crl; HCERTSTORE store; BOOL res; @@ -2586,6 +2587,13 @@ static void testEmptyStore(void) ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%x)\n", res, GetLastError()); CertFreeCertificateContext(cert2); + + crl = CertCreateCRLContext(X509_ASN_ENCODING, signedCRL, sizeof(signedCRL)); + ok(crl != NULL, "CertCreateCRLContext failed\n"); + ok(crl->hCertStore == cert->hCertStore, "unexpected hCertStore\n"); + + CertFreeCRLContext(crl); + CertFreeCertificateContext(cert); }
1
0
0
0
Jacek Caban : crypt32: Keep reference to store in contexts.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: 9fb1e4d675043bd078552a7c0de8eec317473cd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9fb1e4d675043bd078552a7c0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 18 10:50:43 2013 +0200 crypt32: Keep reference to store in contexts. --- dlls/crypt32/cert.c | 12 ++--- dlls/crypt32/collectionstore.c | 22 +++++----- dlls/crypt32/context.c | 68 ++++++++++++++++++++---------- dlls/crypt32/crl.c | 4 +- dlls/crypt32/crypt32_private.h | 11 ++--- dlls/crypt32/ctl.c | 4 +- dlls/crypt32/provstore.c | 11 +++++ dlls/crypt32/store.c | 30 ++++++++++---- dlls/crypt32/tests/store.c | 88 ++++++++++++++++++++++++++++++++++++++++ 9 files changed, 190 insertions(+), 60 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9fb1e4d675043bd078552…
1
0
0
0
Jacek Caban : crypt32: Always return TRUE from CertFreeCTLContext.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: 610c863e7531569771fdb3dfcbdd4d3057063451 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=610c863e7531569771fdb3dfc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 18 10:50:23 2013 +0200 crypt32: Always return TRUE from CertFreeCTLContext. --- dlls/crypt32/context.c | 6 +----- dlls/crypt32/crypt32_private.h | 4 +--- dlls/crypt32/ctl.c | 6 ++---- dlls/crypt32/tests/ctl.c | 12 ++++++++++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index 4809eea..d836b6f 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -74,14 +74,11 @@ void Context_AddRef(context_t *context) TRACE("(%p) ref=%d\n", context, context->ref); } -BOOL Context_Release(context_t *context) +void Context_Release(context_t *context) { - BOOL ret = TRUE; - if (context->ref <= 0) { ERR("%p's ref count is %d\n", context, context->ref); - return FALSE; } if (InterlockedDecrement(&context->ref) == 0) { @@ -97,7 +94,6 @@ BOOL Context_Release(context_t *context) } else TRACE("%p's ref count is %d\n", context, context->ref); - return ret; } void Context_CopyProperties(const void *to, const void *from) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index dbb9ee5..50eb9e6 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -403,10 +403,8 @@ void Context_AddRef(context_t*) DECLSPEC_HIDDEN; /* Decrements context's ref count. If context is a link context, releases its * linked context as well. - * If a data context has its ref count reach 0, calls dataContextFree on it. - * Returns FALSE if the reference count is <= 0 when called. */ -BOOL Context_Release(context_t *context) DECLSPEC_HIDDEN; +void Context_Release(context_t *context) DECLSPEC_HIDDEN; /** * Context property list functions diff --git a/dlls/crypt32/ctl.c b/dlls/crypt32/ctl.c index 3717b7d..1f95fdf 100644 --- a/dlls/crypt32/ctl.c +++ b/dlls/crypt32/ctl.c @@ -500,13 +500,11 @@ PCCTL_CONTEXT WINAPI CertDuplicateCTLContext(PCCTL_CONTEXT pCtlContext) BOOL WINAPI CertFreeCTLContext(PCCTL_CONTEXT pCTLContext) { - BOOL ret = TRUE; - TRACE("(%p)\n", pCTLContext); if (pCTLContext) - ret = Context_Release(&ctl_from_ptr(pCTLContext)->base); - return ret; + Context_Release(&ctl_from_ptr(pCTLContext)->base); + return TRUE; } DWORD WINAPI CertEnumCTLContextProperties(PCCTL_CONTEXT pCTLContext, diff --git a/dlls/crypt32/tests/ctl.c b/dlls/crypt32/tests/ctl.c index f292a4c..55bbc6e 100644 --- a/dlls/crypt32/tests/ctl.c +++ b/dlls/crypt32/tests/ctl.c @@ -190,6 +190,7 @@ static void testCreateCTL(void) static void testDupCTL(void) { PCCTL_CONTEXT context, dupContext; + BOOL res; context = CertDuplicateCTLContext(NULL); ok(context == NULL, "expected NULL\n"); @@ -198,8 +199,15 @@ static void testDupCTL(void) dupContext = CertDuplicateCTLContext(context); ok(dupContext != NULL, "expected a context\n"); ok(dupContext == context, "expected identical context addresses\n"); - CertFreeCTLContext(dupContext); - CertFreeCTLContext(context); + + res = CertFreeCTLContext(dupContext); + ok(res, "CertFreeCTLContext failed\n"); + + res = CertFreeCTLContext(context); + ok(res, "CertFreeCTLContext failed\n"); + + res = CertFreeCTLContext(NULL); + ok(res, "CertFreeCTLContext failed\n"); } static void checkHash(const BYTE *data, DWORD dataLen, ALG_ID algID,
1
0
0
0
Jacek Caban : crypt32: Always return TRUE from CertFreeCRLContext.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: 351314145f946dc0913a9fb35ea0de4ef5cba82d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=351314145f946dc0913a9fb35…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 18 10:50:12 2013 +0200 crypt32: Always return TRUE from CertFreeCRLContext. --- dlls/crypt32/crl.c | 6 ++---- dlls/crypt32/tests/crl.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c index 1fa8aa9..967231b 100644 --- a/dlls/crypt32/crl.c +++ b/dlls/crypt32/crl.c @@ -363,13 +363,11 @@ PCCRL_CONTEXT WINAPI CertDuplicateCRLContext(PCCRL_CONTEXT pCrlContext) BOOL WINAPI CertFreeCRLContext(PCCRL_CONTEXT pCrlContext) { - BOOL ret = TRUE; - TRACE("(%p)\n", pCrlContext); if (pCrlContext) - ret = Context_Release(&crl_from_ptr(pCrlContext)->base); - return ret; + Context_Release(&crl_from_ptr(pCrlContext)->base); + return TRUE; } DWORD WINAPI CertEnumCRLContextProperties(PCCRL_CONTEXT pCRLContext, diff --git a/dlls/crypt32/tests/crl.c b/dlls/crypt32/tests/crl.c index 313ebb3..f39d02e 100644 --- a/dlls/crypt32/tests/crl.c +++ b/dlls/crypt32/tests/crl.c @@ -120,6 +120,7 @@ static void testCreateCRL(void) static void testDupCRL(void) { PCCRL_CONTEXT context, dupContext; + BOOL res; context = CertDuplicateCRLContext(NULL); ok(context == NULL, "expected NULL\n"); @@ -128,8 +129,15 @@ static void testDupCRL(void) dupContext = CertDuplicateCRLContext(context); ok(dupContext != NULL, "expected a context\n"); ok(dupContext == context, "expected identical context addresses\n"); - CertFreeCRLContext(dupContext); - CertFreeCRLContext(context); + + res = CertFreeCRLContext(dupContext); + ok(res, "CertFreeCRLContext failed\n"); + + res = CertFreeCRLContext(context); + ok(res, "CertFreeCRLContext failed\n"); + + res = CertFreeCRLContext(NULL); + ok(res, "CertFreeCRLContext failed\n"); } static void testAddCRL(void)
1
0
0
0
Jacek Caban : crypt32: Always return TRUE from CertFreeCertificateContext.
by Alexandre Julliard
18 Oct '13
18 Oct '13
Module: wine Branch: master Commit: f329de4df44d028d544e6d758a9f4a49066ccbb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f329de4df44d028d544e6d758…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 18 10:50:03 2013 +0200 crypt32: Always return TRUE from CertFreeCertificateContext. --- dlls/crypt32/cert.c | 6 ++---- dlls/crypt32/tests/cert.c | 9 +++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 2b60041..2a68544 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -370,13 +370,11 @@ PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(PCCERT_CONTEXT pCertContex BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext) { - BOOL ret = TRUE; - TRACE("(%p)\n", pCertContext); if (pCertContext) - ret = Context_Release(&cert_from_ptr(pCertContext)->base); - return ret; + Context_Release(&cert_from_ptr(pCertContext)->base); + return TRUE; } DWORD WINAPI CertEnumCertificateContextProperties(PCCERT_CONTEXT pCertContext, diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index a96a75f..a117332 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -725,7 +725,8 @@ static void testDupCert(void) dupContext = CertDuplicateCertificateContext(context); ok(dupContext == context, "context != dupContext\n"); - CertFreeCertificateContext(dupContext); + ret = CertFreeCertificateContext(dupContext); + ok(ret, "CertFreeCertificateContext failed\n"); store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); @@ -760,7 +761,8 @@ static void testDupCert(void) ok(context2->hCertStore == context->hCertStore, "Unexpected hCertStore\n"); CertFreeCertificateContext(context2); - CertFreeCertificateContext(context); + ret = CertFreeCertificateContext(context); + ok(ret, "CertFreeCertificateContext failed\n"); CertCloseStore(store, 0); CertCloseStore(store2, 0); @@ -768,6 +770,9 @@ static void testDupCert(void) SetLastError(0xdeadbeef); context = CertDuplicateCertificateContext(NULL); ok(context == NULL, "Expected context to be NULL\n"); + + ret = CertFreeCertificateContext(NULL); + ok(ret, "CertFreeCertificateContext failed\n"); } static void testLinkCert(void)
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
76
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
Results per page:
10
25
50
100
200