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 2011
----- 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
849 discussions
Start a n
N
ew thread
Juan Lang : cryptnet/tests: Add more tests for revocation checking.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 0f6a6dcd2be702a7195bf422db95209597972a5c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f6a6dcd2be702a7195bf422d…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Mar 11 13:53:54 2011 -0800 cryptnet/tests: Add more tests for revocation checking. --- dlls/cryptnet/tests/cryptnet.c | 129 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 123 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0f6a6dcd2be702a7195bf…
1
0
0
0
Andrew Eikum : oleaut32: Convert CustData to use standard linked lists.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: ec0a86002e67020e63460b01ee64220b815a9b6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec0a86002e67020e63460b01e…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Mar 11 15:15:47 2011 -0600 oleaut32: Convert CustData to use standard linked lists. --- dlls/oleaut32/typelib.c | 331 ++++++++++++++++++++++------------------------- 1 files changed, 156 insertions(+), 175 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ec0a86002e67020e63460…
1
0
0
0
Andrew Eikum : oleaut32: Use helper function to get CustData by GUID.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 28fc129258f8f4e680859d9fd2227ecd6fb8b18b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28fc129258f8f4e680859d9fd…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Mar 11 15:15:44 2011 -0600 oleaut32: Use helper function to get CustData by GUID. --- dlls/oleaut32/typelib.c | 109 +++++++++++++++++++++++------------------------ 1 files changed, 53 insertions(+), 56 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 1a1d379..5cc0219 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -1614,6 +1614,17 @@ static inline TLBVarDesc *TLB_get_vardesc_by_name(TLBVarDesc *vardescs, return NULL; } +static inline TLBCustData *TLB_get_custdata_by_guid(TLBCustData **custdata_list, REFGUID guid) +{ + TLBCustData *cust_data = *custdata_list; + while(cust_data){ + if(IsEqualIID(&cust_data->guid, guid)) + return cust_data; + cust_data = cust_data->next; + } + return NULL; +} + /********************************************************************** * * Functions for reading MSFT typelibs (those created by CreateTypeLib2) @@ -4599,20 +4610,16 @@ static HRESULT WINAPI ITypeLib2_fnGetCustData( ITypeLibImpl *This = (ITypeLibImpl *)iface; TLBCustData *pCData; - for(pCData=This->pCustData; pCData; pCData = pCData->next) - { - if( IsEqualIID(guid, &pCData->guid)) break; - } + TRACE("%p %s %p\n", This, debugstr_guid(guid), pVarVal); - TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT"); + pCData = TLB_get_custdata_by_guid(&This->pCustData, guid); + if(!pCData) + return TYPE_E_ELEMENTNOTFOUND; - if(pCData) - { - VariantInit( pVarVal); - VariantCopy( pVarVal, &pCData->data); - return S_OK; - } - return E_INVALIDARG; /* FIXME: correct? */ + VariantInit(pVarVal); + VariantCopy(pVarVal, &pCData->data); + + return S_OK; } /* ITypeLib2::GetLibStatistics @@ -7236,10 +7243,9 @@ static HRESULT WINAPI ITypeInfo2_fnGetCustData( ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData; - for(pCData=This->pCustData; pCData; pCData = pCData->next) - if( IsEqualIID(guid, &pCData->guid)) break; + TRACE("%p %s %p\n", This, debugstr_guid(guid), pVarVal); - TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT"); + pCData = TLB_get_custdata_by_guid(&This->pCustData, guid); VariantInit( pVarVal); if (pCData) @@ -7260,23 +7266,22 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncCustData( VARIANT *pVarVal) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - TLBCustData *pCData=NULL; + TLBCustData *pCData; TLBFuncDesc *pFDesc = &This->funcdescs[index]; + TRACE("%p %u %s %p\n", This, index, debugstr_guid(guid), pVarVal); + if(index >= This->TypeAttr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; - for(pCData=pFDesc->pCustData; pCData; pCData = pCData->next) - if( IsEqualIID(guid, &pCData->guid)) break; + pCData = TLB_get_custdata_by_guid(&pFDesc->pCustData, guid); + if(!pCData) + return TYPE_E_ELEMENTNOTFOUND; - TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT"); + VariantInit(pVarVal); + VariantCopy(pVarVal, &pCData->data); - if(pCData){ - VariantInit( pVarVal); - VariantCopy( pVarVal, &pCData->data); - return S_OK; - } - return TYPE_E_ELEMENTNOTFOUND; + return S_OK; } /* ITypeInfo2::GetParamCustData @@ -7294,25 +7299,23 @@ static HRESULT WINAPI ITypeInfo2_fnGetParamCustData( TLBCustData *pCData; TLBFuncDesc *pFDesc = &This->funcdescs[indexFunc]; + TRACE("%p %u %u %s %p\n", This, indexFunc, indexParam, + debugstr_guid(guid), pVarVal); + if(indexFunc >= This->TypeAttr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; if(indexParam >= pFDesc->funcdesc.cParams) return TYPE_E_ELEMENTNOTFOUND; - for(pCData=pFDesc->pParamDesc[indexParam].pCustData; pCData; - pCData = pCData->next) - if( IsEqualIID(guid, &pCData->guid)) break; + pCData = TLB_get_custdata_by_guid(&pFDesc->pParamDesc[indexParam].pCustData, guid); + if(!pCData) + return TYPE_E_ELEMENTNOTFOUND; - TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT"); + VariantInit(pVarVal); + VariantCopy(pVarVal, &pCData->data); - if(pCData) - { - VariantInit( pVarVal); - VariantCopy( pVarVal, &pCData->data); - return S_OK; - } - return TYPE_E_ELEMENTNOTFOUND; + return S_OK; } /* ITypeInfo2::GetVarCustData @@ -7326,7 +7329,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarCustData( VARIANT *pVarVal) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - TLBCustData *pCData=NULL; + TLBCustData *pCData; TLBVarDesc *pVDesc = &This->vardescs[index]; TRACE("%p %s %p\n", This, debugstr_guid(guid), pVarVal); @@ -7334,14 +7337,13 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarCustData( if(index >= This->TypeAttr.cVars) return TYPE_E_ELEMENTNOTFOUND; - for(pCData=pVDesc->pCustData; pCData; pCData = pCData->next) - if(IsEqualIID(guid, &pCData->guid)) - break; + pCData = TLB_get_custdata_by_guid(&pVDesc->pCustData, guid); if(!pCData) return TYPE_E_ELEMENTNOTFOUND; - VariantInit( pVarVal); - VariantCopy( pVarVal, &pCData->data); + VariantInit(pVarVal); + VariantCopy(pVarVal, &pCData->data); + return S_OK; } @@ -7356,27 +7358,22 @@ static HRESULT WINAPI ITypeInfo2_fnGetImplTypeCustData( VARIANT *pVarVal) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - TLBCustData *pCData=NULL; + TLBCustData *pCData; TLBImplType *pRDesc = &This->impltypes[index]; + TRACE("%p %u %s %p\n", This, index, debugstr_guid(guid), pVarVal); + if(index >= This->TypeAttr.cImplTypes) return TYPE_E_ELEMENTNOTFOUND; - for(pCData = pRDesc->pCustData; pCData; pCData = pCData->next) - { - if( IsEqualIID(guid, &pCData->guid)) break; - } + pCData = TLB_get_custdata_by_guid(&pRDesc->pCustData, guid); + if(!pCData) + return TYPE_E_ELEMENTNOTFOUND; - TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT"); + VariantInit(pVarVal); + VariantCopy(pVarVal, &pCData->data); - if(pCData) - { - VariantInit( pVarVal); - VariantCopy( pVarVal, &pCData->data); - return S_OK; - } - - return TYPE_E_ELEMENTNOTFOUND; + return S_OK; } /* ITypeInfo2::GetDocumentation2
1
0
0
0
Aric Stewart : usp10: Update ScriptCPtoX to handle RTL runs.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 3f7ad460ef159f6e71b6909e1ced0ce698ce4ba3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f7ad460ef159f6e71b6909e1…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri Mar 11 12:47:37 2011 -0600 usp10: Update ScriptCPtoX to handle RTL runs. --- dlls/usp10/tests/usp10.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/usp10/usp10.c | 37 ++++++++++++++- 2 files changed, 146 insertions(+), 2 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 1145ca9..5b7fa97 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -1076,6 +1076,7 @@ static void test_ScriptXtoX(void) int cGlyphs; WORD pwLogClustXtoCP[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; WORD pwLogClustCPtoX[10] = {0, 0, 0, 1, 1, 2, 2, 3, 3, 3}; + WORD pwLogClustCPtoX_RTL[10] = {3, 3, 3, 2, 2, 1, 1, 0, 0, 0}; SCRIPT_VISATTR psva[10]; int piAdvance[10] = {200, 190, 210, 180, 170, 204, 189, 195, 212, 203}; int piCP, piX; @@ -1276,6 +1277,116 @@ static void test_ScriptXtoX(void) ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); ok(piX == 1953, "iCP=%d should return piX=1953 not %d\n", iCP, piX); + + items[0].a.fRTL = TRUE; + + iCP=0; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 780, + "iCP=%d should return piX=780 not %d\n", iCP, piX); + + iCP=1; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 720, + "iCP=%d should return piX=720 not %d\n", iCP, piX); + + iCP=2; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 660, + "iCP=%d should return piX=660 not %d\n", iCP, piX); + + iCP=3; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 600, + "iCP=%d should return piX=600 not %d\n", iCP, piX); + + iCP=4; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 495, + "iCP=%d should return piX=495 not %d\n", iCP, piX); + + iCP=5; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 390, + "iCP=%d should return piX=390 not %d\n", iCP, piX); + + iCP=6; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 295, + "iCP=%d should return piX=295 not %d\n", iCP, piX); + + iCP=7; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 200, + "iCP=%d should return piX=200 not %d\n", iCP, piX); + + iCP=8; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 133, + "iCP=%d should return piX=133 not %d\n", iCP, piX); + + iCP=9; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 66, + "iCP=%d should return piX=66 not %d\n", iCP, piX); + + iCP=10; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 0, + "iCP=%d should return piX=0 not %d\n", iCP, piX); + + iCP=11; + fTrailing = FALSE; + cChars = 10; + cGlyphs = 10; + hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClustCPtoX_RTL, psva, piAdvance, &items[0].a, &piX); + ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); + ok(piX == 0, + "iCP=%d should return piX=0 %d\n", iCP, piX); } static void test_ScriptString(HDC hdc) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index b58b60e..d575425 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1106,13 +1106,39 @@ HRESULT WINAPI ScriptCPtoX(int iCP, int iCluster = -1; int clust_size = 1; float special_size = 0.0; + int iMaxPos = 0; + BOOL rtl = FALSE; TRACE("(%d,%d,%d,%d,%p,%p,%p,%p,%p)\n", iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, psa, piX); + if (psa->fRTL && ! psa->fLogicalOrder) + rtl = TRUE; + if (fTrailing) - iCP++; + { + if (rtl) + iCP--; + else + iCP++; + } + + if (rtl) + { + int max_clust = pwLogClust[0]; + + for (item=0; item < cGlyphs; item++) + if (pwLogClust[item] > max_clust) + { + ERR("We do not handle non reversed clusters properly\n"); + break; + } + + iMaxPos = 0; + for (item = max_clust; item >=0; item --) + iMaxPos += piAdvance[item]; + } iPosX = 0.0; for (item=0; item < iCP && item < cGlyphs; item++) @@ -1136,7 +1162,7 @@ HRESULT WINAPI ScriptCPtoX(int iCP, else break; } - if (check >= cGlyphs) + if (check >= cGlyphs && !iMaxPos) { for (check = clust; check < cGlyphs; check++) special_size += piAdvance[check]; @@ -1153,6 +1179,13 @@ HRESULT WINAPI ScriptCPtoX(int iCP, iPosX += piAdvance[pwLogClust[iCluster]] / (float)clust_size; } + if (iMaxPos > 0) + { + iPosX = iMaxPos - iPosX; + if (iPosX < 0) + iPosX = 0; + } + *piX = iPosX; TRACE("*piX=%d\n", *piX); return S_OK;
1
0
0
0
Francois Gouget : wininet: Avoid a conflict with the sun macro when compiling on Solaris.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 4bacb3f24e3919d93330e82e25a1ba88a2aabd59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4bacb3f24e3919d93330e82e2…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Mar 11 18:22:23 2011 +0100 wininet: Avoid a conflict with the sun macro when compiling on Solaris. --- dlls/wininet/http.c | 27 ++++++++++++--------------- 1 files changed, 12 insertions(+), 15 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index a0574bf..5ae3e4d 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3582,21 +3582,18 @@ static void HTTP_InsertCookies(http_request_t *request) static WORD HTTP_ParseDay(LPCWSTR day) { - static const WCHAR sun[] = { 's','u','n',0 }; - static const WCHAR mon[] = { 'm','o','n',0 }; - static const WCHAR tue[] = { 't','u','e',0 }; - static const WCHAR wed[] = { 'w','e','d',0 }; - static const WCHAR thu[] = { 't','h','u',0 }; - static const WCHAR fri[] = { 'f','r','i',0 }; - static const WCHAR sat[] = { 's','a','t',0 }; - - if (!strcmpiW(day, sun)) return 0; - if (!strcmpiW(day, mon)) return 1; - if (!strcmpiW(day, tue)) return 2; - if (!strcmpiW(day, wed)) return 3; - if (!strcmpiW(day, thu)) return 4; - if (!strcmpiW(day, fri)) return 5; - if (!strcmpiW(day, sat)) return 6; + static const WCHAR days[7][4] = {{ 's','u','n',0 }, + { 'm','o','n',0 }, + { 't','u','e',0 }, + { 'w','e','d',0 }, + { 't','h','u',0 }, + { 'f','r','i',0 }, + { 's','a','t',0 }}; + int i; + for (i = 0; i < sizeof(days)/sizeof(*days); i++) + if (!strcmpiW(day, days[i])) + return i; + /* Invalid */ return 7; }
1
0
0
0
Juan Lang : cryptnet: Fix typo.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 2a1f26b6dabcf5b194dd780481abad0ae29b026b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a1f26b6dabcf5b194dd78048…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Mar 11 08:28:51 2011 -0800 cryptnet: Fix typo. Spotted by Joris Huizer. --- dlls/cryptnet/tests/cryptnet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c index ba6298d..663ba45 100644 --- a/dlls/cryptnet/tests/cryptnet.c +++ b/dlls/cryptnet/tests/cryptnet.c @@ -367,7 +367,7 @@ static void test_retrieveObjectByUrl(void) NULL, NULL, NULL, NULL); /* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, older w2k: CRYPT_E_ASN1_BADTAG */ ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH || - broken(GetLastError() == CRYPT_E_NO_MATCH)), + broken(GetLastError() == CRYPT_E_ASN1_BADTAG)), "got 0x%x/%u (expected CRYPT_E_NO_MATCH)\n", GetLastError(), GetLastError()); /* only newer versions of cryptnet do the cleanup */
1
0
0
0
Alexandre Julliard : version: Allocate the full virtual size of the section when loading PE resources.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 0136bc27d1e3c6420247e393b6ec98a5503f4af2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0136bc27d1e3c6420247e393b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 14 12:13:39 2011 +0100 version: Allocate the full virtual size of the section when loading PE resources. --- dlls/version/resource.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/version/resource.c b/dlls/version/resource.c index 64d39dd..5772487 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -220,7 +220,7 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff ) PIMAGE_DATA_DIRECTORY resDataDir; PIMAGE_SECTION_HEADER sections; LPBYTE resSection; - DWORD resSectionSize; + DWORD section_size, data_size; const void *resDir; const IMAGE_RESOURCE_DIRECTORY *resPtr; const IMAGE_RESOURCE_DATA_ENTRY *resData; @@ -282,8 +282,9 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff ) } /* Read in resource section */ - resSectionSize = sections[i].SizeOfRawData; - resSection = HeapAlloc( GetProcessHeap(), 0, resSectionSize ); + data_size = sections[i].SizeOfRawData; + section_size = max( data_size, sections[i].Misc.VirtualSize ); + resSection = HeapAlloc( GetProcessHeap(), 0, section_size ); if ( !resSection ) { HeapFree( GetProcessHeap(), 0, sections ); @@ -291,7 +292,8 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff ) } LZSeek( lzfd, sections[i].PointerToRawData, SEEK_SET ); - if ( resSectionSize != LZRead( lzfd, (char*)resSection, resSectionSize ) ) goto done; + if (data_size != LZRead( lzfd, (char*)resSection, data_size )) goto done; + if (data_size < section_size) memset( (char *)resSection + data_size, 0, section_size - data_size ); /* Find resource */ resDir = resSection + (resDataDir->VirtualAddress - sections[i].VirtualAddress);
1
0
0
0
Alexandre Julliard : gdi32: Avoid null pointer access when we are out of gdi handles.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 46bfaeae9e7ad2217a99ac8e9feaab4e116c962d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=46bfaeae9e7ad2217a99ac8e9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Mar 12 20:40:30 2011 +0100 gdi32: Avoid null pointer access when we are out of gdi handles. --- dlls/gdi32/dc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index bdaab13..6cfe482 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -151,7 +151,7 @@ DC *alloc_dc_ptr( const DC_FUNCTIONS *funcs, WORD magic ) if (!(dc->hSelf = alloc_gdi_handle( &dc->header, magic, &dc_funcs ))) { HeapFree( GetProcessHeap(), 0, dc ); - dc = NULL; + return NULL; } dc->nulldrv.hdc = dc->hSelf; return dc;
1
0
0
0
Alexandre Julliard : gdi32: Add null driver entry points for the path functions.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 9c7b528b6f9a722a9e8fd1e37371002c8d63a1cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c7b528b6f9a722a9e8fd1e37…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 11 20:43:15 2011 +0100 gdi32: Add null driver entry points for the path functions. --- dlls/gdi32/driver.c | 20 ++-- dlls/gdi32/gdi_private.h | 10 ++ dlls/gdi32/path.c | 382 +++++++++++++++++++++++++--------------------- 3 files changed, 230 insertions(+), 182 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9c7b528b6f9a722a9e8fd…
1
0
0
0
Alexandre Julliard : gdi32: Add null driver entry points for the palette functions.
by Alexandre Julliard
14 Mar '11
14 Mar '11
Module: wine Branch: master Commit: 0d27e3c0ed5743f35ba9af4f6dfeeb346258f6e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d27e3c0ed5743f35ba9af4f6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 11 18:26:55 2011 +0100 gdi32: Add null driver entry points for the palette functions. --- dlls/gdi32/dc.c | 3 +- dlls/gdi32/driver.c | 24 ++++++++++-- dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/palette.c | 93 +++++++++++++++++++++------------------------- 4 files changed, 65 insertions(+), 56 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index e7da659..bdaab13 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -274,7 +274,8 @@ static BOOL DC_DeleteObject( HGDIOBJ handle ) */ void DC_InitDC( DC* dc ) { - if (dc->funcs->pRealizeDefaultPalette) dc->funcs->pRealizeDefaultPalette( dc->physDev ); + PHYSDEV physdev = GET_DC_PHYSDEV( dc, pRealizeDefaultPalette ); + physdev->funcs->pRealizeDefaultPalette( physdev ); SetTextColor( dc->hSelf, dc->textColor ); SetBkColor( dc->hSelf, dc->backgroundColor ); SelectObject( dc->hSelf, dc->hPen ); diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 969d660..0bd7bdb 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -413,6 +413,12 @@ static INT CDECL nulldrv_GetPixelFormat( PHYSDEV dev ) return 0; } +static UINT CDECL nulldrv_GetSystemPaletteEntries( PHYSDEV dev, UINT start, + UINT count, PALETTEENTRY *entries ) +{ + return 0; +} + static BOOL CDECL nulldrv_LineTo( PHYSDEV dev, INT x, INT y ) { return TRUE; @@ -456,6 +462,16 @@ static BOOL CDECL nulldrv_Polyline( PHYSDEV dev, const POINT *points, INT count return TRUE; } +static UINT CDECL nulldrv_RealizeDefaultPalette( PHYSDEV dev ) +{ + return 0; +} + +static UINT CDECL nulldrv_RealizePalette( PHYSDEV dev, HPALETTE palette, BOOL primary ) +{ + return 0; +} + static BOOL CDECL nulldrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) { return TRUE; @@ -706,10 +722,10 @@ const DC_FUNCTIONS null_driver = NULL, /* pGetDeviceCaps */ nulldrv_GetDeviceGammaRamp, /* pGetDeviceGammaRamp */ nulldrv_GetICMProfile, /* pGetICMProfile */ - NULL, /* pGetNearestColor */ + nulldrv_GetNearestColor, /* pGetNearestColor */ nulldrv_GetPixel, /* pGetPixel */ nulldrv_GetPixelFormat, /* pGetPixelFormat */ - NULL, /* pGetSystemPaletteEntries */ + nulldrv_GetSystemPaletteEntries, /* pGetSystemPaletteEntries */ NULL, /* pGetTextExtentExPoint */ NULL, /* pGetTextMetrics */ nulldrv_IntersectClipRect, /* pIntersectClipRect */ @@ -731,8 +747,8 @@ const DC_FUNCTIONS null_driver = nulldrv_Polygon, /* pPolygon */ nulldrv_Polyline, /* pPolyline */ nulldrv_PolylineTo, /* pPolylineTo */ - NULL, /* pRealizeDefaultPalette */ - NULL, /* pRealizePalette */ + nulldrv_RealizeDefaultPalette, /* pRealizeDefaultPalette */ + nulldrv_RealizePalette, /* pRealizePalette */ nulldrv_Rectangle, /* pRectangle */ NULL, /* pResetDC */ NULL, /* pRestoreDC */ diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index aa9ba4b..db7fdc8 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -520,6 +520,7 @@ extern INT CDECL nulldrv_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT r extern INT CDECL nulldrv_ExtSelectClipRgn( PHYSDEV dev, HRGN rgn, INT mode ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_FillRgn( PHYSDEV dev, HRGN rgn, HBRUSH brush ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_FrameRgn( PHYSDEV dev, HRGN rgn, HBRUSH brush, INT width, INT height ) DECLSPEC_HIDDEN; +extern COLORREF CDECL nulldrv_GetNearestColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; extern INT CDECL nulldrv_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_InvertRgn( PHYSDEV dev, HRGN rgn ) DECLSPEC_HIDDEN; extern INT CDECL nulldrv_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/palette.c b/dlls/gdi32/palette.c index e94ed7b..a60f342 100644 --- a/dlls/gdi32/palette.c +++ b/dlls/gdi32/palette.c @@ -513,8 +513,8 @@ UINT WINAPI GetSystemPaletteEntries( if ((dc = get_dc_ptr( hdc ))) { - if (dc->funcs->pGetSystemPaletteEntries) - ret = dc->funcs->pGetSystemPaletteEntries( dc->physDev, start, count, entries ); + PHYSDEV physdev = GET_DC_PHYSDEV( dc, pGetSystemPaletteEntries ); + ret = physdev->funcs->pGetSystemPaletteEntries( physdev, start, count, entries ); release_dc_ptr( dc ); } return ret; @@ -563,47 +563,22 @@ UINT WINAPI GetNearestPaletteIndex( } -/*********************************************************************** - * GetNearestColor [GDI32.@] - * - * Gets a system color to match. - * - * RETURNS - * Success: Color from system palette that corresponds to given color - * Failure: CLR_INVALID - */ -COLORREF WINAPI GetNearestColor( - HDC hdc, /* [in] Handle of device context */ - COLORREF color) /* [in] Color to be matched */ +/* null driver fallback implementation for GetNearestColor */ +COLORREF CDECL nulldrv_GetNearestColor( PHYSDEV dev, COLORREF color ) { unsigned char spec_type; - COLORREF nearest; - DC *dc; - if (!(dc = get_dc_ptr( hdc ))) return CLR_INVALID; - - if (dc->funcs->pGetNearestColor) - { - nearest = dc->funcs->pGetNearestColor( dc->physDev, color ); - release_dc_ptr( dc ); - return nearest; - } - - if (!(GetDeviceCaps(hdc, RASTERCAPS) & RC_PALETTE)) - { - release_dc_ptr( dc ); - return color; - } + if (!(GetDeviceCaps( dev->hdc, RASTERCAPS ) & RC_PALETTE)) return color; spec_type = color >> 24; if (spec_type == 1 || spec_type == 2) { /* we need logical palette for PALETTERGB and PALETTEINDEX colorrefs */ - UINT index; PALETTEENTRY entry; - HPALETTE hpal = dc->hPalette ? dc->hPalette : GetStockObject( DEFAULT_PALETTE ); + HPALETTE hpal = GetCurrentObject( dev->hdc, OBJ_PAL ); + if (!hpal) hpal = GetStockObject( DEFAULT_PALETTE ); if (spec_type == 2) /* PALETTERGB */ index = GetNearestPaletteIndex( hpal, color ); else /* PALETTEINDEX */ @@ -612,18 +587,36 @@ COLORREF WINAPI GetNearestColor( if (!GetPaletteEntries( hpal, index, 1, &entry )) { WARN("RGB(%x) : idx %d is out of bounds, assuming NULL\n", color, index ); - if (!GetPaletteEntries( hpal, 0, 1, &entry )) - { - release_dc_ptr( dc ); - return CLR_INVALID; - } + if (!GetPaletteEntries( hpal, 0, 1, &entry )) return CLR_INVALID; } color = RGB( entry.peRed, entry.peGreen, entry.peBlue ); } - nearest = color & 0x00ffffff; - release_dc_ptr( dc ); + return color & 0x00ffffff; +} + - TRACE("(%06x): returning %06x\n", color, nearest ); +/*********************************************************************** + * GetNearestColor [GDI32.@] + * + * Gets a system color to match. + * + * RETURNS + * Success: Color from system palette that corresponds to given color + * Failure: CLR_INVALID + */ +COLORREF WINAPI GetNearestColor( + HDC hdc, /* [in] Handle of device context */ + COLORREF color) /* [in] Color to be matched */ +{ + COLORREF nearest = CLR_INVALID; + DC *dc; + + if ((dc = get_dc_ptr( hdc ))) + { + PHYSDEV physdev = GET_DC_PHYSDEV( dc, pGetNearestColor ); + nearest = physdev->funcs->pGetNearestColor( physdev, color ); + release_dc_ptr( dc ); + } return nearest; } @@ -729,21 +722,19 @@ UINT WINAPI GDIRealizePalette( HDC hdc ) if( dc->hPalette == GetStockObject( DEFAULT_PALETTE )) { - if (dc->funcs->pRealizeDefaultPalette) - realized = dc->funcs->pRealizeDefaultPalette( dc->physDev ); + PHYSDEV physdev = GET_DC_PHYSDEV( dc, pRealizeDefaultPalette ); + realized = physdev->funcs->pRealizeDefaultPalette( physdev ); } else if (InterlockedExchangePointer( (void **)&hLastRealizedPalette, dc->hPalette ) != dc->hPalette) { - if (dc->funcs->pRealizePalette) + PHYSDEV physdev = GET_DC_PHYSDEV( dc, pRealizePalette ); + PALETTEOBJ *palPtr = GDI_GetObjPtr( dc->hPalette, OBJ_PAL ); + if (palPtr) { - PALETTEOBJ *palPtr = GDI_GetObjPtr( dc->hPalette, OBJ_PAL ); - if (palPtr) - { - realized = dc->funcs->pRealizePalette( dc->physDev, dc->hPalette, - (dc->hPalette == hPrimaryPalette) ); - palPtr->funcs = dc->funcs; - GDI_ReleaseObj( dc->hPalette ); - } + realized = physdev->funcs->pRealizePalette( physdev, dc->hPalette, + (dc->hPalette == hPrimaryPalette) ); + palPtr->funcs = dc->funcs; + GDI_ReleaseObj( dc->hPalette ); } } else TRACE(" skipping (hLastRealizedPalette = %p)\n", hLastRealizedPalette);
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
85
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Results per page:
10
25
50
100
200