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
January 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
879 discussions
Start a n
N
ew thread
Nikolay Sivov : oleaut32/tests: Fix a dead path in test (Valgrind).
by Alexandre Julliard
19 Jan '11
19 Jan '11
Module: wine Branch: master Commit: 9d15067c251565e27f25d16a7142bacb1a8a8d5c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d15067c251565e27f25d16a7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 18 19:52:19 2011 +0300 oleaut32/tests: Fix a dead path in test (Valgrind). --- dlls/oleaut32/tests/safearray.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index 7c16ef7..e653141 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -127,9 +127,11 @@ static HRESULT CALLBACK IRecordInfoImpl_GetSize(IRecordInfo *iface, ULONG* size) { IRecordInfoImpl* This = impl_from_IRecordInfo(iface); This->sizeCalled++; - *size = 17; if (fail_GetSize) + { + *size = RECORD_SIZE_FAIL; return E_UNEXPECTED; + } *size = RECORD_SIZE; return S_OK; } @@ -846,7 +848,10 @@ static void test_VectorCreateLockDestroy(void) int element; if (!pSafeArrayCreateVector) + { + win_skip("SafeArrayCreateVector not supported\n"); return; + } sa = pSafeArrayCreateVector(VT_UI1, 0, 0); ok(sa != NULL, "SACV with 0 elements failed.\n"); @@ -1256,7 +1261,10 @@ static void test_SafeArrayCopyData(void) int dimension,size=1; if (!pSafeArrayCopyData) + { + win_skip("SafeArrayCopyData not supported\n"); return; + } for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) { @@ -1342,7 +1350,10 @@ static void test_SafeArrayCreateEx(void) int dimension; if (!pSafeArrayCreateEx) + { + win_skip("SafeArrayCreateEx not supported\n"); return; + } for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) { @@ -1467,6 +1478,8 @@ static void test_SafeArrayCreateEx(void) ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled); ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %d\n", iRec->ref); } + else + SafeArrayDestroy(sa); } static void test_SafeArrayClear(void) @@ -1672,7 +1685,6 @@ static void test_SafeArrayChangeTypeEx(void) hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY); ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres); VariantClear(&v); - } static void test_SafeArrayDestroyData (void) @@ -1724,6 +1736,7 @@ START_TEST(safearray) GETPTR(SafeArrayGetVartype); GETPTR(SafeArrayCreateEx); GETPTR(SafeArrayCreateVector); + GETPTR(SafeArrayGetRecordInfo); check_for_VT_INT_PTR(); test_safearray();
1
0
0
0
Juan Lang : crypt32: Fix memory leaks when decoding fails (valgrind).
by Alexandre Julliard
19 Jan '11
19 Jan '11
Module: wine Branch: master Commit: d51a7940bcd0796bd098238cf0bc7089f7348892 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d51a7940bcd0796bd098238cf…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Jan 18 10:29:58 2011 -0800 crypt32: Fix memory leaks when decoding fails (valgrind). --- dlls/crypt32/decode.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c index dd0064d..cd9a2a1 100644 --- a/dlls/crypt32/decode.c +++ b/dlls/crypt32/decode.c @@ -759,6 +759,8 @@ static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc, ptr += itemDecoded; } } + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, pvStructInfo); } } if (itemSizes != &itemSize) @@ -1655,6 +1657,8 @@ static BOOL WINAPI CRYPT_AsnDecodeNameValue(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeNameValueInternal( pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, pcbStructInfo, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, value); } } } @@ -1836,6 +1840,8 @@ static BOOL WINAPI CRYPT_AsnDecodeUnicodeNameValue(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeUnicodeNameValueInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, pcbStructInfo, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, value); } } } @@ -1930,6 +1936,8 @@ static BOOL WINAPI CRYPT_AsnDecodeName(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, info); } } } @@ -2025,6 +2033,8 @@ static BOOL WINAPI CRYPT_AsnDecodeUnicodeName(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, info); } } } @@ -2685,6 +2695,8 @@ static BOOL WINAPI CRYPT_AsnDecodePolicyQualifierUserNotice( ret = CRYPT_AsnDecodePolicyQualifierUserNoticeInternal( pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, notice); } } } @@ -2774,6 +2786,8 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSAttribute(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodePKCSAttributeInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, attr); } } } @@ -2909,6 +2923,8 @@ static BOOL WINAPI CRYPT_AsnDecodePubKeyInfo(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodePubKeyInfoInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, info); } } } @@ -3335,6 +3351,8 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSContentInfo(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodePKCSContentInfoInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, pcbStructInfo, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, info); } } } @@ -3404,6 +3422,8 @@ static BOOL WINAPI CRYPT_AsnDecodeAltName(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeAltNameInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, name); } } } @@ -3992,6 +4012,8 @@ static BOOL WINAPI CRYPT_AsnDecodeOctets(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeOctetsInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, blob); } } } @@ -4099,6 +4121,8 @@ static BOOL WINAPI CRYPT_AsnDecodeBits(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeBitsInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, blob); } } } @@ -4189,6 +4213,8 @@ static BOOL WINAPI CRYPT_AsnDecodeInt(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeIntInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, pvStructInfo); } } } @@ -4280,6 +4306,8 @@ static BOOL WINAPI CRYPT_AsnDecodeInteger(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeIntegerInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_ENCODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, blob); } } } @@ -4379,6 +4407,8 @@ static BOOL WINAPI CRYPT_AsnDecodeUnsignedInteger(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeUnsignedIntegerInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_ENCODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, blob); } } } @@ -4629,6 +4659,8 @@ static BOOL WINAPI CRYPT_AsnDecodeUtcTime(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeUtcTimeInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, pvStructInfo); } } } @@ -4758,6 +4790,8 @@ static BOOL WINAPI CRYPT_AsnDecodeChoiceOfTime(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeChoiceOfTimeInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, &bytesNeeded, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, pvStructInfo); } } } @@ -4856,6 +4890,8 @@ static BOOL WINAPI CRYPT_AsnDecodeSequenceOfAny(DWORD dwCertEncodingType, i++; } } + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, seq); } } } @@ -5333,6 +5369,8 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSSignerInfo(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodePKCSSignerInfoInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, pcbStructInfo, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, info); } } } @@ -5497,6 +5535,8 @@ static BOOL WINAPI CRYPT_AsnDecodeCMSSignerInfo(DWORD dwCertEncodingType, ret = CRYPT_AsnDecodeCMSSignerInfoInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo, pcbStructInfo, NULL); + if (!ret && (dwFlags & CRYPT_DECODE_ALLOC_FLAG)) + CRYPT_FreeSpace(pDecodePara, info); } } } @@ -6012,9 +6052,13 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType, pbEncoded, cbEncoded, dwFlags, NULL, pcbStructInfo); if (ret && (ret = CRYPT_DecodeEnsureSpace(dwFlags, pDecodePara, pvStructInfo, pcbStructInfo, *pcbStructInfo))) + { ret = pCryptDecodeObject(dwCertEncodingType, lpszStructType, pbEncoded, cbEncoded, dwFlags, *(BYTE **)pvStructInfo, pcbStructInfo); + if (!ret) + CRYPT_FreeSpace(pDecodePara, *(BYTE **)pvStructInfo); + } } else ret = pCryptDecodeObject(dwCertEncodingType, lpszStructType,
1
0
0
0
Henri Verbeet : wined3d: Pass an IWineD3DSwapChainImpl pointer to findThreadContextForSwapChain().
by Alexandre Julliard
19 Jan '11
19 Jan '11
Module: wine Branch: master Commit: f250ee66a38f9b00f179ac98e697599b77217487 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f250ee66a38f9b00f179ac98e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jan 18 17:55:22 2011 +0100 wined3d: Pass an IWineD3DSwapChainImpl pointer to findThreadContextForSwapChain(). --- dlls/wined3d/context.c | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index bd63f9a..2265188 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1866,19 +1866,18 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte * If none can be found the swapchain is requested to create a new context * *****************************************************************************/ -static struct wined3d_context *findThreadContextForSwapChain(IWineD3DSwapChain *swapchain, DWORD tid) +static struct wined3d_context *findThreadContextForSwapChain(struct IWineD3DSwapChainImpl *swapchain, DWORD tid) { unsigned int i; - for(i = 0; i < ((IWineD3DSwapChainImpl *) swapchain)->num_contexts; i++) { - if(((IWineD3DSwapChainImpl *) swapchain)->context[i]->tid == tid) { - return ((IWineD3DSwapChainImpl *) swapchain)->context[i]; - } - + for (i = 0; i < swapchain->num_contexts; ++i) + { + if (swapchain->context[i]->tid == tid) + return swapchain->context[i]; } /* Create a new context for the thread */ - return swapchain_create_context_for_thread((IWineD3DSwapChainImpl *)swapchain); + return swapchain_create_context_for_thread(swapchain); } /* Do not call while under the GL lock. */ @@ -1914,12 +1913,9 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur if (target->container.type == WINED3D_CONTAINER_SWAPCHAIN) { - IWineD3DSwapChain *swapchain; - TRACE("Rendering onscreen\n"); - swapchain = (IWineD3DSwapChain *)target->container.u.swapchain; - context = findThreadContextForSwapChain(swapchain, tid); + context = findThreadContextForSwapChain(target->container.u.swapchain, tid); } else { @@ -1938,7 +1934,7 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur * * Can also happen on thread switches - in that case findThreadContextForSwapChain * is perfect to call. */ - context = findThreadContextForSwapChain(This->swapchains[0], tid); + context = findThreadContextForSwapChain((IWineD3DSwapChainImpl *)This->swapchains[0], tid); } }
1
0
0
0
Henri Verbeet : wined3d: Pass an IWineD3DSwapChainImpl pointer to swapchain_create_context_for_thread ().
by Alexandre Julliard
19 Jan '11
19 Jan '11
Module: wine Branch: master Commit: b439fa9d8ffc27d31eb7b0a4b49f9aded9f3ee4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b439fa9d8ffc27d31eb7b0a4b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jan 18 17:55:21 2011 +0100 wined3d: Pass an IWineD3DSwapChainImpl pointer to swapchain_create_context_for_thread(). --- dlls/wined3d/context.c | 2 +- dlls/wined3d/swapchain.c | 21 ++++++++++----------- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 40fd2e3..bd63f9a 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1878,7 +1878,7 @@ static struct wined3d_context *findThreadContextForSwapChain(IWineD3DSwapChain * } /* Create a new context for the thread */ - return swapchain_create_context_for_thread(swapchain); + return swapchain_create_context_for_thread((IWineD3DSwapChainImpl *)swapchain); } /* Do not call while under the GL lock. */ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 8f594ae..430c751 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -783,32 +783,31 @@ err: } /* Do not call while under the GL lock. */ -struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *iface) +struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChainImpl *swapchain) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *) iface; struct wined3d_context **newArray; struct wined3d_context *ctx; - TRACE("Creating a new context for swapchain %p, thread %d\n", This, GetCurrentThreadId()); + TRACE("Creating a new context for swapchain %p, thread %u.\n", swapchain, GetCurrentThreadId()); - if (!(ctx = context_create(This, This->front_buffer, This->ds_format))) + if (!(ctx = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format))) { ERR("Failed to create a new context for the swapchain\n"); return NULL; } context_release(ctx); - newArray = HeapAlloc(GetProcessHeap(), 0, sizeof(*newArray) * (This->num_contexts + 1)); + newArray = HeapAlloc(GetProcessHeap(), 0, sizeof(*newArray) * (swapchain->num_contexts + 1)); if(!newArray) { ERR("Out of memory when trying to allocate a new context array\n"); - context_destroy(This->device, ctx); + context_destroy(swapchain->device, ctx); return NULL; } - memcpy(newArray, This->context, sizeof(*newArray) * This->num_contexts); - HeapFree(GetProcessHeap(), 0, This->context); - newArray[This->num_contexts] = ctx; - This->context = newArray; - This->num_contexts++; + memcpy(newArray, swapchain->context, sizeof(*newArray) * swapchain->num_contexts); + HeapFree(GetProcessHeap(), 0, swapchain->context); + newArray[swapchain->num_contexts] = ctx; + swapchain->context = newArray; + swapchain->num_contexts++; TRACE("Returning context %p\n", ctx); return ctx; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 115846a..7ea5067 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2634,7 +2634,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN; -struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; +struct wined3d_context *swapchain_create_context_for_thread(struct IWineD3DSwapChainImpl *swapchain) DECLSPEC_HIDDEN; HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface_type, IWineD3DDeviceImpl *device, WINED3DPRESENT_PARAMETERS *present_parameters, void *parent) DECLSPEC_HIDDEN;
1
0
0
0
Henri Verbeet : wined3d: Pass an IWineD3DVolumeImpl pointer to volume_bind_and_dirtify().
by Alexandre Julliard
19 Jan '11
19 Jan '11
Module: wine Branch: master Commit: 237cdefe7fb6983e5f8b27fce634c37359ceff36 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=237cdefe7fb6983e5f8b27fce…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jan 18 17:55:20 2011 +0100 wined3d: Pass an IWineD3DVolumeImpl pointer to volume_bind_and_dirtify(). --- dlls/wined3d/volume.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index b98d638..a75ca78 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -27,10 +27,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); /* Context activation is done by the caller. */ -static void volume_bind_and_dirtify(IWineD3DVolume *iface) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->resource.device->adapter->gl_info; - IWineD3DBaseTextureImpl *container = (IWineD3DBaseTextureImpl *)This->container; +static void volume_bind_and_dirtify(struct IWineD3DVolumeImpl *volume) +{ + const struct wined3d_gl_info *gl_info = &volume->resource.device->adapter->gl_info; + IWineD3DBaseTextureImpl *container = (IWineD3DBaseTextureImpl *)volume->container; DWORD active_sampler; /* We don't need a specific texture unit, but after binding the texture the current unit is dirty. @@ -50,14 +50,14 @@ static void volume_bind_and_dirtify(IWineD3DVolume *iface) { ENTER_GL(); glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture); LEAVE_GL(); - active_sampler = This->resource.device->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB]; + active_sampler = volume->resource.device->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB]; } else { active_sampler = 0; } if (active_sampler != WINED3D_UNMAPPED_STAGE) { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_SAMPLER(active_sampler)); + IWineD3DDeviceImpl_MarkStateDirty(volume->resource.device, STATE_SAMPLER(active_sampler)); } container->baseTexture.texture_ops->texture_bind(container, FALSE); @@ -289,7 +289,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, int TRACE("iface %p, level %u, srgb %#x, format %s (%#x).\n", iface, gl_level, srgb_mode, debug_d3dformat(format->id), format->id); - volume_bind_and_dirtify(iface); + volume_bind_and_dirtify(This); TRACE("Calling glTexImage3D %x level=%d, intfmt=%x, w=%d, h=%d,d=%d, 0=%d, glFmt=%x, glType=%x, Mem=%p\n", GL_TEXTURE_3D, gl_level, format->glInternal, This->currentDesc.Width, This->currentDesc.Height,
1
0
0
0
Henri Verbeet : wined3d: Pass an IWineD3DVolumeImpl pointer to volume_add_dirty_box().
by Alexandre Julliard
19 Jan '11
19 Jan '11
Module: wine Branch: master Commit: ace5f8e60e1c29dc2ba993d26037aa18f0bc9258 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ace5f8e60e1c29dc2ba993d26…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jan 18 17:55:19 2011 +0100 wined3d: Pass an IWineD3DVolumeImpl pointer to volume_add_dirty_box(). --- dlls/wined3d/volume.c | 34 ++++++++++++++++------------------ dlls/wined3d/volumetexture.c | 8 ++++---- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 566135c..b98d638 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -63,28 +63,26 @@ static void volume_bind_and_dirtify(IWineD3DVolume *iface) { container->baseTexture.texture_ops->texture_bind(container, FALSE); } -void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) +void volume_add_dirty_box(struct IWineD3DVolumeImpl *volume, const WINED3DBOX *dirty_box) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - - This->dirty = TRUE; + volume->dirty = TRUE; if (dirty_box) { - This->lockedBox.Left = min(This->lockedBox.Left, dirty_box->Left); - This->lockedBox.Top = min(This->lockedBox.Top, dirty_box->Top); - This->lockedBox.Front = min(This->lockedBox.Front, dirty_box->Front); - This->lockedBox.Right = max(This->lockedBox.Right, dirty_box->Right); - This->lockedBox.Bottom = max(This->lockedBox.Bottom, dirty_box->Bottom); - This->lockedBox.Back = max(This->lockedBox.Back, dirty_box->Back); + volume->lockedBox.Left = min(volume->lockedBox.Left, dirty_box->Left); + volume->lockedBox.Top = min(volume->lockedBox.Top, dirty_box->Top); + volume->lockedBox.Front = min(volume->lockedBox.Front, dirty_box->Front); + volume->lockedBox.Right = max(volume->lockedBox.Right, dirty_box->Right); + volume->lockedBox.Bottom = max(volume->lockedBox.Bottom, dirty_box->Bottom); + volume->lockedBox.Back = max(volume->lockedBox.Back, dirty_box->Back); } else { - This->lockedBox.Left = 0; - This->lockedBox.Top = 0; - This->lockedBox.Front = 0; - This->lockedBox.Right = This->currentDesc.Width; - This->lockedBox.Bottom = This->currentDesc.Height; - This->lockedBox.Back = This->currentDesc.Depth; + volume->lockedBox.Left = 0; + volume->lockedBox.Top = 0; + volume->lockedBox.Front = 0; + volume->lockedBox.Right = volume->currentDesc.Width; + volume->lockedBox.Bottom = volume->currentDesc.Height; + volume->lockedBox.Back = volume->currentDesc.Depth; } } @@ -255,7 +253,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface, if (!(flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY))) { - volume_add_dirty_box(iface, &This->lockedBox); + volume_add_dirty_box(This, &This->lockedBox); This->container->baseTexture.texture_rgb.dirty = TRUE; This->container->baseTexture.texture_srgb.dirty = TRUE; } @@ -368,7 +366,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT memset(&volume->lockedBox, 0, sizeof(volume->lockedBox)); volume->dirty = TRUE; - volume_add_dirty_box((IWineD3DVolume *)volume, NULL); + volume_add_dirty_box(volume, NULL); return WINED3D_OK; } diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 94f5b05..4a744eb 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -70,9 +70,9 @@ static void volumetexture_preload(IWineD3DBaseTextureImpl *texture, enum WINED3D { for (i = 0; i < texture->baseTexture.level_count; ++i) { - IWineD3DVolume *volume = (IWineD3DVolume *)texture->baseTexture.sub_resources[i]; + IWineD3DVolumeImpl *volume = (IWineD3DVolumeImpl *)texture->baseTexture.sub_resources[i]; volume_add_dirty_box(volume, NULL); - IWineD3DVolume_LoadTexture(volume, i, srgb_mode); + IWineD3DVolume_LoadTexture((IWineD3DVolume *)volume, i, srgb_mode); } } else @@ -336,11 +336,11 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_Unmap(IWineD3DVolumeTexture *ifa static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyBox(IWineD3DVolumeTexture *iface, const WINED3DBOX *dirty_box) { IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DVolume *volume; + IWineD3DVolumeImpl *volume; TRACE("iface %p, dirty_box %p.\n", iface, dirty_box); - if (!(volume = (IWineD3DVolume *)basetexture_get_sub_resource(texture, 0))) + if (!(volume = (IWineD3DVolumeImpl *)basetexture_get_sub_resource(texture, 0))) { WARN("Failed to get sub-resource.\n"); return WINED3DERR_INVALIDCALL; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b1202f3..115846a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2001,7 +2001,7 @@ typedef struct IWineD3DVolumeImpl BOOL dirty; } IWineD3DVolumeImpl; -void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN; +void volume_add_dirty_box(struct IWineD3DVolumeImpl *volume, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN; HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width, UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
1
0
0
0
Nikolay Sivov : msvcrt: Add _atoflt and _atoflt_l implementations.
by Alexandre Julliard
19 Jan '11
19 Jan '11
Module: wine Branch: master Commit: ad6bc9449162567f1b6cfcd4d61015783e87254b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad6bc9449162567f1b6cfcd4d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 18 19:06:07 2011 +0300 msvcrt: Add _atoflt and _atoflt_l implementations. --- dlls/msvcr100/msvcr100.spec | 4 +- dlls/msvcr80/msvcr80.spec | 4 +- dlls/msvcr90/msvcr90.c | 8 +++ dlls/msvcr90/msvcr90.spec | 4 +- dlls/msvcr90/tests/msvcr90.c | 65 ++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.h | 8 +++ dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/string.c | 105 ++++++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/tests/headers.c | 3 + include/msvcrt/crtdefs.h | 54 +++++++++++++++++++++ include/msvcrt/stdlib.h | 1 + 11 files changed, 251 insertions(+), 7 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ad6bc9449162567f1b6cf…
1
0
0
0
Alexandre Julliard : makefiles: Generate . res files directly from message files.
by Alexandre Julliard
18 Jan '11
18 Jan '11
Module: wine Branch: master Commit: 9771ad8ca79220b0892c1e1f20cf8dd37804c13f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9771ad8ca79220b0892c1e1f2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 18 16:56:02 2011 +0100 makefiles: Generate .res files directly from message files. --- .gitignore | 16 ---------------- Make.rules.in | 15 +++++++-------- tools/make_makefiles | 1 - tools/makedep.c | 2 +- 4 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 87aad30..cbc189d 100644 --- a/.gitignore +++ b/.gitignore @@ -57,22 +57,6 @@ dlls/jscript/jscript_classes.h dlls/jscript/jsglobal.tlb dlls/jscript/parser.tab.c dlls/jscript/parser.tab.h -dlls/kernel32/nls/winerr_dan.mc.rc -dlls/kernel32/nls/winerr_deu.mc.rc -dlls/kernel32/nls/winerr_enu.mc.rc -dlls/kernel32/nls/winerr_fra.mc.rc -dlls/kernel32/nls/winerr_ita.mc.rc -dlls/kernel32/nls/winerr_jpn.mc.rc -dlls/kernel32/nls/winerr_kor.mc.rc -dlls/kernel32/nls/winerr_lth.mc.rc -dlls/kernel32/nls/winerr_nld.mc.rc -dlls/kernel32/nls/winerr_nor.mc.rc -dlls/kernel32/nls/winerr_plk.mc.rc -dlls/kernel32/nls/winerr_ptb.mc.rc -dlls/kernel32/nls/winerr_ptg.mc.rc -dlls/kernel32/nls/winerr_rus.mc.rc -dlls/kernel32/nls/winerr_sve.mc.rc -dlls/kernel32/nls/winerr_ukr.mc.rc dlls/libd3dcompiler.def dlls/libd3dx9.def dlls/libkernel.def diff --git a/Make.rules.in b/Make.rules.in index f5b2456..f44bc55 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -26,11 +26,10 @@ IDL_GEN_HEADERS = $(IDL_H_SRCS:.idl=.h) $(IDL_C_SRCS:.idl=.h) $(IDL_I_SRCS:.idl= CLEAN_FILES = *.o *.a *.so *.ln *.res *.fake *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc core CLEAN_TARGETS = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_P_SRCS:%=dlldata.c) \ - $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) \ - $(MC_SRCS:.mc=.mc.rc) $(PO_SRCS:%=rsrc.pot) + $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) $(PO_SRCS:%=rsrc.pot) OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) \ - $(IDL_R_SRCS:.idl=_r.res) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res) $(EXTRA_OBJS) + $(IDL_R_SRCS:.idl=_r.res) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS) CROSSOBJS = $(OBJS:.o=.cross.o) LINTS = $(C_SRCS:.c=.ln) @@ -42,7 +41,7 @@ filter: dummy # Implicit rules -.SUFFIXES: .mc .rc .mc.rc .res .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c _r.res .cross.o @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp +.SUFFIXES: .mc .rc .res .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c _r.res .cross.o @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp .c.o: $(CC) -c $(ALLCFLAGS) -o $@ $< @@ -59,8 +58,8 @@ filter: dummy .l.yy.c: $(FLEX) $(LEXFLAGS) -o$@ $< -.mc.mc.rc: - $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< +.mc.res: + $(LDPATH) $(WMC) -U -O res -o $@ $< .rc.res: $(LDPATH) $(WRC) $(RCFLAGS) -o $@ $< @@ -182,8 +181,8 @@ all: @MAINTAINER_MODE@ $(PO_SRCS:%=rsrc.pot) rsrc.pot: $(WRC) $(LDPATH) $(WRC) $(RCFLAGS) -O pot -o $@ $(PO_SRCS) -$(MC_SRCS:.mc=.mc.rc): $(WMC) -$(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res): $(WRC) +$(MC_SRCS:.mc=.res): $(WMC) +$(RC_SRCS:.rc=.res): $(WRC) $(PO_SRCS:.rc=.res): $(ALL_PO_FILES) # Misc. rules diff --git a/tools/make_makefiles b/tools/make_makefiles index 97c8d40..991ef4b 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -109,7 +109,6 @@ my @ignore_srcs = ( [ 'BISON_SRCS', '\.y', '.tab.c' ], [ 'BISON_SRCS', '\.y', '.tab.h' ], [ 'LEX_SRCS', '\.l', '.yy.c' ], - [ 'MC_SRCS', '\.mc', '.mc.rc' ], [ 'IDL_TLB_SRCS', '\.idl', '.tlb' ], [ 'IDL_H_SRCS', '\.idl', '.h' ], [ 'IDL_C_SRCS', '\.idl', '.h' ], diff --git a/tools/makedep.c b/tools/makedep.c index 27eb1e5..0d592a0 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -858,7 +858,7 @@ static int output_src( FILE *file, INCL_FILE *pFile, int *column ) } else if (!strcmp( ext, "mc" )) /* message file */ { - *column += fprintf( file, "%s.mc.rc: %s", obj, pFile->filename ); + *column += fprintf( file, "%s.res: %s", obj, pFile->filename ); } else if (!strcmp( ext, "idl" )) /* IDL file */ {
1
0
0
0
Alexandre Julliard : wmc: Add support for creating resource and plain binary files.
by Alexandre Julliard
18 Jan '11
18 Jan '11
Module: wine Branch: master Commit: ecd144b40dc5b06c42e77a7f7d88c023397e89eb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ecd144b40dc5b06c42e77a7f7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 18 16:55:37 2011 +0100 wmc: Add support for creating resource and plain binary files. --- tools/wmc/utils.c | 73 +++++++++++++++++++++++++++++++++++ tools/wmc/utils.h | 15 +++++++ tools/wmc/wmc.c | 38 ++++++++++++++++-- tools/wmc/wmc.man.in | 30 ++++++++------ tools/wmc/write.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++- tools/wmc/write.h | 1 + 6 files changed, 243 insertions(+), 18 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ecd144b40dc5b06c42e77…
1
0
0
0
Jacek Caban : mshtml: Added IUri-based implementation of nsIURL::[Get|Set] Ref.
by Alexandre Julliard
18 Jan '11
18 Jan '11
Module: wine Branch: master Commit: e72e7de0e58c41afa928ce4fc81ac60e5d2baf1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e72e7de0e58c41afa928ce4fc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jan 18 12:28:17 2011 +0100 mshtml: Added IUri-based implementation of nsIURL::[Get|Set]Ref. --- dlls/mshtml/nsio.c | 43 +++++++++++++++++++++++++++++++------------ 1 files changed, 31 insertions(+), 12 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index e7a6c2c..617b3f3 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -2217,34 +2217,53 @@ static nsresult NSAPI nsURL_SetQuery(nsIURL *iface, const nsACString *aQuery) static nsresult NSAPI nsURL_GetRef(nsIURL *iface, nsACString *aRef) { nsWineURI *This = impl_from_nsIURL(iface); + char *refa = NULL; + BSTR ref; + HRESULT hres; TRACE("(%p)->(%p)\n", This, aRef); - if(This->nsurl) - return nsIURL_GetRef(This->nsurl, aRef); + if(!ensure_uri(This)) + return NS_ERROR_UNEXPECTED; - FIXME("default action not implemented\n"); - return NS_ERROR_NOT_IMPLEMENTED; + hres = IUri_GetFragment(This->uri, &ref); + if(FAILED(hres)) + return NS_ERROR_UNEXPECTED; + + refa = heap_strdupWtoA(ref); + SysFreeString(ref); + if(ref && !refa) + return NS_ERROR_OUT_OF_MEMORY; + + nsACString_SetData(aRef, refa && *refa == '#' ? refa+1 : refa); + heap_free(refa); + return NS_OK; } static nsresult NSAPI nsURL_SetRef(nsIURL *iface, const nsACString *aRef) { nsWineURI *This = impl_from_nsIURL(iface); const char *refa; + WCHAR *ref; + HRESULT hres; TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aRef)); - if(This->nsurl) { - invalidate_uri(This); - return nsIURL_SetRef(This->nsurl, aRef); - } + if(!ensure_uri_builder(This)) + return NS_ERROR_UNEXPECTED; nsACString_GetData(aRef, &refa); - if(!*refa) - return NS_OK; + ref = heap_strdupAtoW(refa); + if(!ref) + return NS_ERROR_OUT_OF_MEMORY; - FIXME("default action not implemented\n"); - return NS_ERROR_NOT_IMPLEMENTED; + hres = IUriBuilder_SetFragment(This->uri_builder, ref); + heap_free(ref); + if(FAILED(hres)) + return NS_ERROR_UNEXPECTED; + + sync_wine_url(This); + return NS_OK; } static nsresult NSAPI nsURL_GetDirectory(nsIURL *iface, nsACString *aDirectory)
1
0
0
0
← Newer
1
...
32
33
34
35
36
37
38
...
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200