winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2012
----- 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
3 participants
827 discussions
Start a n
N
ew thread
Vincent Povirk : windowscodecs: Implement IWICComponentInfo::GetAuthor.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: 387d1e9790278325757061b95f90059ae5e5c269 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=387d1e9790278325757061b95…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Apr 16 14:55:30 2012 -0500 windowscodecs: Implement IWICComponentInfo::GetAuthor. --- dlls/windowscodecs/info.c | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index 5eab27e..2677ca7 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); static const WCHAR mimetypes_valuename[] = {'M','i','m','e','T','y','p','e','s',0}; +static const WCHAR author_valuename[] = {'A','u','t','h','o','r',0}; static const WCHAR pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}; static const WCHAR containerformat_valuename[] = {'C','o','n','t','a','i','n','e','r','F','o','r','m','a','t',0}; @@ -186,8 +187,12 @@ static HRESULT WINAPI BitmapDecoderInfo_GetSigningStatus(IWICBitmapDecoderInfo * static HRESULT WINAPI BitmapDecoderInfo_GetAuthor(IWICBitmapDecoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual) { - FIXME("(%p,%u,%p,%p): stub\n", iface, cchAuthor, wzAuthor, pcchActual); - return E_NOTIMPL; + BitmapDecoderInfo *This = impl_from_IWICBitmapDecoderInfo(iface); + + TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual); + + return ComponentInfo_GetStringValue(This->classkey, author_valuename, + cchAuthor, wzAuthor, pcchActual); } static HRESULT WINAPI BitmapDecoderInfo_GetVendorGUID(IWICBitmapDecoderInfo *iface, GUID *pguidVendor) @@ -631,8 +636,12 @@ static HRESULT WINAPI BitmapEncoderInfo_GetSigningStatus(IWICBitmapEncoderInfo * static HRESULT WINAPI BitmapEncoderInfo_GetAuthor(IWICBitmapEncoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual) { - FIXME("(%p,%u,%p,%p): stub\n", iface, cchAuthor, wzAuthor, pcchActual); - return E_NOTIMPL; + BitmapEncoderInfo *This = impl_from_IWICBitmapEncoderInfo(iface); + + TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual); + + return ComponentInfo_GetStringValue(This->classkey, author_valuename, + cchAuthor, wzAuthor, pcchActual); } static HRESULT WINAPI BitmapEncoderInfo_GetVendorGUID(IWICBitmapEncoderInfo *iface, GUID *pguidVendor) @@ -901,8 +910,12 @@ static HRESULT WINAPI FormatConverterInfo_GetSigningStatus(IWICFormatConverterIn static HRESULT WINAPI FormatConverterInfo_GetAuthor(IWICFormatConverterInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual) { - FIXME("(%p,%u,%p,%p): stub\n", iface, cchAuthor, wzAuthor, pcchActual); - return E_NOTIMPL; + FormatConverterInfo *This = impl_from_IWICFormatConverterInfo(iface); + + TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual); + + return ComponentInfo_GetStringValue(This->classkey, author_valuename, + cchAuthor, wzAuthor, pcchActual); } static HRESULT WINAPI FormatConverterInfo_GetVendorGUID(IWICFormatConverterInfo *iface, GUID *pguidVendor) @@ -1099,8 +1112,12 @@ static HRESULT WINAPI PixelFormatInfo_GetSigningStatus(IWICPixelFormatInfo2 *ifa static HRESULT WINAPI PixelFormatInfo_GetAuthor(IWICPixelFormatInfo2 *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual) { - FIXME("(%p,%u,%p,%p): stub\n", iface, cchAuthor, wzAuthor, pcchActual); - return E_NOTIMPL; + PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface); + + TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual); + + return ComponentInfo_GetStringValue(This->classkey, author_valuename, + cchAuthor, wzAuthor, pcchActual); } static HRESULT WINAPI PixelFormatInfo_GetVendorGUID(IWICPixelFormatInfo2 *iface, GUID *pguidVendor)
1
0
0
0
Vincent Povirk : windowscodecs: Add stub IWICPixelFormatInfo implementation .
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: 1ceb2f2a48ba43d0893374d7b0c7ee264dec4463 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ceb2f2a48ba43d0893374d7b…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Apr 16 14:50:00 2012 -0500 windowscodecs: Add stub IWICPixelFormatInfo implementation. --- dlls/windowscodecs/info.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 215 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index 86f0adb..5eab27e 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -1006,6 +1006,220 @@ static HRESULT FormatConverterInfo_Constructor(HKEY classkey, REFCLSID clsid, IW return S_OK; } +typedef struct { + IWICPixelFormatInfo2 IWICPixelFormatInfo2_iface; + LONG ref; + HKEY classkey; + CLSID clsid; +} PixelFormatInfo; + +static inline PixelFormatInfo *impl_from_IWICPixelFormatInfo2(IWICPixelFormatInfo2 *iface) +{ + return CONTAINING_RECORD(iface, PixelFormatInfo, IWICPixelFormatInfo2_iface); +} + +static HRESULT WINAPI PixelFormatInfo_QueryInterface(IWICPixelFormatInfo2 *iface, REFIID iid, + void **ppv) +{ + PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface); + TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); + + if (!ppv) return E_INVALIDARG; + + if (IsEqualIID(&IID_IUnknown, iid) || + IsEqualIID(&IID_IWICComponentInfo, iid) || + IsEqualIID(&IID_IWICPixelFormatInfo, iid) || + IsEqualIID(&IID_IWICPixelFormatInfo2 ,iid)) + { + *ppv = This; + } + else + { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI PixelFormatInfo_AddRef(IWICPixelFormatInfo2 *iface) +{ + PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI PixelFormatInfo_Release(IWICPixelFormatInfo2 *iface) +{ + PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + if (ref == 0) + { + RegCloseKey(This->classkey); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI PixelFormatInfo_GetComponentType(IWICPixelFormatInfo2 *iface, + WICComponentType *pType) +{ + TRACE("(%p,%p)\n", iface, pType); + *pType = WICPixelFormat; + return S_OK; +} + +static HRESULT WINAPI PixelFormatInfo_GetCLSID(IWICPixelFormatInfo2 *iface, CLSID *pclsid) +{ + PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface); + TRACE("(%p,%p)\n", iface, pclsid); + + if (!pclsid) + return E_INVALIDARG; + + memcpy(pclsid, &This->clsid, sizeof(CLSID)); + + return S_OK; +} + +static HRESULT WINAPI PixelFormatInfo_GetSigningStatus(IWICPixelFormatInfo2 *iface, DWORD *pStatus) +{ + FIXME("(%p,%p): stub\n", iface, pStatus); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetAuthor(IWICPixelFormatInfo2 *iface, UINT cchAuthor, + WCHAR *wzAuthor, UINT *pcchActual) +{ + FIXME("(%p,%u,%p,%p): stub\n", iface, cchAuthor, wzAuthor, pcchActual); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetVendorGUID(IWICPixelFormatInfo2 *iface, GUID *pguidVendor) +{ + FIXME("(%p,%p): stub\n", iface, pguidVendor); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetVersion(IWICPixelFormatInfo2 *iface, UINT cchVersion, + WCHAR *wzVersion, UINT *pcchActual) +{ + FIXME("(%p,%u,%p,%p): stub\n", iface, cchVersion, wzVersion, pcchActual); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetSpecVersion(IWICPixelFormatInfo2 *iface, UINT cchSpecVersion, + WCHAR *wzSpecVersion, UINT *pcchActual) +{ + FIXME("(%p,%u,%p,%p): stub\n", iface, cchSpecVersion, wzSpecVersion, pcchActual); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetFriendlyName(IWICPixelFormatInfo2 *iface, UINT cchFriendlyName, + WCHAR *wzFriendlyName, UINT *pcchActual) +{ + FIXME("(%p,%u,%p,%p): stub\n", iface, cchFriendlyName, wzFriendlyName, pcchActual); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetFormatGUID(IWICPixelFormatInfo2 *iface, + GUID *pFormat) +{ + FIXME("(%p,%p): stub\n", iface, pFormat); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetColorContext(IWICPixelFormatInfo2 *iface, + IWICColorContext **ppIColorContext) +{ + FIXME("(%p,%p): stub\n", iface, ppIColorContext); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetBitsPerPixel(IWICPixelFormatInfo2 *iface, + UINT *puiBitsPerPixel) +{ + FIXME("(%p,%p): stub\n", iface, puiBitsPerPixel); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetChannelCount(IWICPixelFormatInfo2 *iface, + UINT *puiChannelCount) +{ + FIXME("(%p,%p): stub\n", iface, puiChannelCount); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetChannelMask(IWICPixelFormatInfo2 *iface, + UINT uiChannelIndex, UINT cbMaskBuffer, BYTE *pbMaskBuffer, UINT *pcbActual) +{ + FIXME("(%p,%u,%u,%p,%p): stub\n", iface, uiChannelIndex, cbMaskBuffer, pbMaskBuffer, pcbActual); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_SupportsTransparency(IWICPixelFormatInfo2 *iface, + BOOL *pfSupportsTransparency) +{ + FIXME("(%p,%p): stub\n", iface, pfSupportsTransparency); + return E_NOTIMPL; +} + +static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation(IWICPixelFormatInfo2 *iface, + WICPixelFormatNumericRepresentation *pNumericRepresentation) +{ + FIXME("(%p,%p): stub\n", iface, pNumericRepresentation); + return E_NOTIMPL; +} + +static const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl = { + PixelFormatInfo_QueryInterface, + PixelFormatInfo_AddRef, + PixelFormatInfo_Release, + PixelFormatInfo_GetComponentType, + PixelFormatInfo_GetCLSID, + PixelFormatInfo_GetSigningStatus, + PixelFormatInfo_GetAuthor, + PixelFormatInfo_GetVendorGUID, + PixelFormatInfo_GetVersion, + PixelFormatInfo_GetSpecVersion, + PixelFormatInfo_GetFriendlyName, + PixelFormatInfo_GetFormatGUID, + PixelFormatInfo_GetColorContext, + PixelFormatInfo_GetBitsPerPixel, + PixelFormatInfo_GetChannelCount, + PixelFormatInfo_GetChannelMask, + PixelFormatInfo_SupportsTransparency, + PixelFormatInfo_GetNumericRepresentation +}; + +static HRESULT PixelFormatInfo_Constructor(HKEY classkey, REFCLSID clsid, IWICComponentInfo **ppIInfo) +{ + PixelFormatInfo *This; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(PixelFormatInfo)); + if (!This) + { + RegCloseKey(classkey); + return E_OUTOFMEMORY; + } + + This->IWICPixelFormatInfo2_iface.lpVtbl = &PixelFormatInfo_Vtbl; + This->ref = 1; + This->classkey = classkey; + memcpy(&This->clsid, clsid, sizeof(CLSID)); + + *ppIInfo = (IWICComponentInfo*)This; + return S_OK; +} + static const WCHAR clsid_keyname[] = {'C','L','S','I','D',0}; static const WCHAR instance_keyname[] = {'I','n','s','t','a','n','c','e',0}; @@ -1019,6 +1233,7 @@ static const struct category categories[] = { {WICDecoder, &CATID_WICBitmapDecoders, BitmapDecoderInfo_Constructor}, {WICEncoder, &CATID_WICBitmapEncoders, BitmapEncoderInfo_Constructor}, {WICPixelFormatConverter, &CATID_WICFormatConverters, FormatConverterInfo_Constructor}, + {WICPixelFormat, &CATID_WICPixelFormats, PixelFormatInfo_Constructor}, {0} };
1
0
0
0
Vincent Povirk : windowscodecs: Register pixel formats.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: 9b7dca84536481d2b13cfdfbce77292278c0a41f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b7dca84536481d2b13cfdfbc…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Apr 16 14:31:09 2012 -0500 windowscodecs: Register pixel formats. --- dlls/windowscodecs/regsvr.c | 461 +++++++++++++++++++++++++++++++++++++++++++ include/wincodec.idl | 1 + 2 files changed, 462 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9b7dca84536481d2b13cf…
1
0
0
0
Vincent Povirk : windowscodecs: Add test for IWICComponentInfo.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: f557fa692bc64e6044395876eff0386ef213c6c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f557fa692bc64e6044395876e…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Sat Mar 24 13:17:33 2012 -0500 windowscodecs: Add test for IWICComponentInfo. --- dlls/windowscodecs/tests/info.c | 147 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 138 insertions(+), 9 deletions(-) diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c index cd89a40..3d7ecc8 100644 --- a/dlls/windowscodecs/tests/info.c +++ b/dlls/windowscodecs/tests/info.c @@ -16,6 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdio.h> #include <stdarg.h> #include <math.h> @@ -27,9 +28,43 @@ #include "wincodecsdk.h" #include "wine/test.h" -static void test_decoder_info(void) +#include "initguid.h" +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); + +static const char *debugstr_guid(GUID *guid) +{ + static char buf[50]; + + if(!guid) + return "(null)"; + + sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], + guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], + guid->Data4[5], guid->Data4[6], guid->Data4[7]); + + return buf; +} + +static HRESULT get_component_info(const GUID *clsid, IWICComponentInfo **result) { IWICImagingFactory *factory; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICImagingFactory, (void**)&factory); + ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr); + if (FAILED(hr)) return hr; + + hr = IWICImagingFactory_CreateComponentInfo(factory, clsid, result); + + IWICImagingFactory_Release(factory); + + return hr; +} + +static void test_decoder_info(void) +{ IWICComponentInfo *info; IWICBitmapDecoderInfo *decoder_info; HRESULT hr; @@ -38,13 +73,7 @@ static void test_decoder_info(void) const WCHAR expected_mimetype[] = {'i','m','a','g','e','/','b','m','p',0}; CLSID clsid; - hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, - &IID_IWICImagingFactory, (void**)&factory); - ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr); - if (FAILED(hr)) return; - - hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICBmpDecoder, &info); - ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); + hr = get_component_info(&CLSID_WICBmpDecoder, &info); hr = IWICComponentInfo_QueryInterface(info, &IID_IWICBitmapDecoderInfo, (void**)&decoder_info); ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr); @@ -88,8 +117,107 @@ static void test_decoder_info(void) IWICBitmapDecoderInfo_Release(decoder_info); IWICComponentInfo_Release(info); +} - IWICImagingFactory_Release(factory); +static void test_pixelformat_info(void) +{ + IWICComponentInfo *info; + HRESULT hr; + ULONG len, known_len; + WCHAR value[256]; + GUID guid; + WICComponentType componenttype; + DWORD signing; + + hr = get_component_info(&GUID_WICPixelFormat32bppBGRA, &info); + todo_wine ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); + + if (FAILED(hr)) + return; + + hr = IWICComponentInfo_GetAuthor(info, 0, NULL, 0); + ok(hr == E_INVALIDARG, "GetAuthor failed, hr=%x\n", hr); + + len = 0xdeadbeef; + hr = IWICComponentInfo_GetAuthor(info, 0, NULL, &len); + ok(hr == S_OK, "GetAuthor failed, hr=%x\n", hr); + ok(len < 255 && len > 0, "invalid length 0x%x\n", len); + known_len = len; + + memset(value, 0xaa, 256 * sizeof(WCHAR)); + hr = IWICComponentInfo_GetAuthor(info, len-1, value, NULL); + ok(hr == E_INVALIDARG, "GetAuthor failed, hr=%x\n", hr); + ok(value[0] = 0xaaaa, "string modified\n"); + + len = 0xdeadbeef; + memset(value, 0xaa, 256 * sizeof(WCHAR)); + hr = IWICComponentInfo_GetAuthor(info, known_len-1, value, &len); + ok(hr == WINCODEC_ERR_INSUFFICIENTBUFFER, "GetAuthor failed, hr=%x\n", hr); + ok(len == known_len, "got length of 0x%x, expected 0x%x\n", len, known_len); + ok(value[known_len-1] == 0xaaaa, "string modified past given length\n"); + ok(value[0] == 0xaaaa, "string modified\n"); + + len = 0xdeadbeef; + memset(value, 0xaa, 256 * sizeof(WCHAR)); + hr = IWICComponentInfo_GetAuthor(info, known_len, value, &len); + ok(hr == S_OK, "GetAuthor failed, hr=%x\n", hr); + ok(len == known_len, "got length of 0x%x, expected 0x%x\n", len, known_len); + ok(value[known_len-1] == 0, "string not terminated at expected length\n"); + ok(value[known_len-2] != 0xaaaa, "string not modified at given length\n"); + + len = 0xdeadbeef; + memset(value, 0xaa, 256 * sizeof(WCHAR)); + hr = IWICComponentInfo_GetAuthor(info, known_len+1, value, &len); + ok(hr == S_OK, "GetAuthor failed, hr=%x\n", hr); + ok(len == known_len, "got length of 0x%x, expected 0x%x\n", len, known_len); + ok(value[known_len] == 0xaaaa, "string modified past end\n"); + ok(value[known_len-1] == 0, "string not terminated at expected length\n"); + ok(value[known_len-2] != 0xaaaa, "string not modified at given length\n"); + + hr = IWICComponentInfo_GetCLSID(info, NULL); + ok(hr == E_INVALIDARG, "GetCLSID failed, hr=%x\n", hr); + + memset(&guid, 0xaa, sizeof(guid)); + hr = IWICComponentInfo_GetCLSID(info, &guid); + ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); + ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected CLSID %s\n", debugstr_guid(&guid)); + + hr = IWICComponentInfo_GetComponentType(info, NULL); + ok(hr == E_INVALIDARG, "GetComponentType failed, hr=%x\n", hr); + + hr = IWICComponentInfo_GetComponentType(info, &componenttype); + ok(hr == S_OK, "GetComponentType failed, hr=%x\n", hr); + ok(componenttype == WICPixelFormat, "unexpected component type 0x%x\n", componenttype); + + len = 0xdeadbeef; + hr = IWICComponentInfo_GetFriendlyName(info, 0, NULL, &len); + ok(hr == S_OK, "GetFriendlyName failed, hr=%x\n", hr); + ok(len < 255 && len > 0, "invalid length 0x%x\n", len); + + hr = IWICComponentInfo_GetSigningStatus(info, NULL); + ok(hr == E_INVALIDARG, "GetSigningStatus failed, hr=%x\n", hr); + + hr = IWICComponentInfo_GetSigningStatus(info, &signing); + ok(hr == S_OK, "GetSigningStatus failed, hr=%x\n", hr); + ok(signing == WICComponentSigned, "unexpected signing status 0x%x\n", signing); + + len = 0xdeadbeef; + hr = IWICComponentInfo_GetSpecVersion(info, 0, NULL, &len); + ok(hr == S_OK, "GetSpecVersion failed, hr=%x\n", hr); + ok(len == 0, "invalid length 0x%x\n", len); /* spec version does not apply to pixel formats */ + + memset(&guid, 0xaa, sizeof(guid)); + hr = IWICComponentInfo_GetVendorGUID(info, &guid); + ok(hr == S_OK, "GetVendorGUID failed, hr=%x\n", hr); + ok(IsEqualGUID(&guid, &GUID_VendorMicrosoft) || + broken(IsEqualGUID(&guid, &GUID_NULL)) /* XP */, "unexpected GUID %s\n", debugstr_guid(&guid)); + + len = 0xdeadbeef; + hr = IWICComponentInfo_GetVersion(info, 0, NULL, &len); + ok(hr == S_OK, "GetVersion failed, hr=%x\n", hr); + ok(len == 0, "invalid length 0x%x\n", len); /* version does not apply to pixel formats */ + + IWICComponentInfo_Release(info); } static void test_reader_info(void) @@ -239,6 +367,7 @@ START_TEST(info) test_decoder_info(); test_reader_info(); + test_pixelformat_info(); CoUninitialize(); }
1
0
0
0
Vincent Povirk : include: Add IWICPixelFormatInfo definition.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: 2c5ef84544e4b6baabef292b39f4d445a5830f54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c5ef84544e4b6baabef292b3…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Sat Mar 24 12:30:02 2012 -0500 include: Add IWICPixelFormatInfo definition. --- include/wincodec.idl | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/include/wincodec.idl b/include/wincodec.idl index 9284499..afb0207 100644 --- a/include/wincodec.idl +++ b/include/wincodec.idl @@ -140,6 +140,16 @@ typedef enum WICComponentEnumerateOptions { WICComponentEnumerateDisabled = 0x80000000 } WICComponentEnumerateOptions; +typedef enum WICPixelFormatNumericRepresentation { + WICPixelFormatNumericRepresentationUnspecified = 0x00000000, + WICPixelFormatNumericRepresentationIndexed = 0x00000001, + WICPixelFormatNumericRepresentationUnsignedInteger = 0x00000002, + WICPixelFormatNumericRepresentationSignedInteger = 0x00000003, + WICPixelFormatNumericRepresentationFixed = 0x00000004, + WICPixelFormatNumericRepresentationFloat = 0x00000005, + WICPIXELFORMATNUMERICREPRESENTATION_FORCE_DWORD = CODEC_FORCE_DWORD +} WICPixelFormatNumericRepresentation; + typedef GUID WICPixelFormatGUID; typedef REFGUID REFWICPixelFormatGUID; @@ -446,6 +456,44 @@ interface IWICBitmapFrameDecode : IWICBitmapSource [ object, + uuid(e8eda601-3d48-431a-ab44-69059be88bbe) +] +interface IWICPixelFormatInfo : IWICComponentInfo +{ + HRESULT GetFormatGUID( + [out] GUID* pFormat); + + HRESULT GetColorContext( + [out] IWICColorContext **ppIColorContext); + + HRESULT GetBitsPerPixel( + [out] UINT *puiBitsPerPixel); + + HRESULT GetChannelCount( + [out] UINT *puiChannelCount); + + HRESULT GetChannelMask( + [in] UINT uiChannelIndex, + [in] UINT cbMaskBuffer, + [in, out, unique, size_is(cbMaskBuffer)] BYTE *pbMaskBuffer, + [out] UINT *pcbActual); +} + +[ + object, + uuid(a9db33a2-af5f-43c7-b679-74f5984b5aa4) +] +interface IWICPixelFormatInfo2 : IWICPixelFormatInfo +{ + HRESULT SupportsTransparency( + [out] BOOL *pfSupportsTransparency); + + HRESULT GetNumericRepresentation( + [out] WICPixelFormatNumericRepresentation *pNumericRepresentation); +} + +[ + object, uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714) ] interface IWICBitmapCodecInfo : IWICComponentInfo
1
0
0
0
Piotr Caban : msvcp: Sync spec files.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: 9588617d616242eec5714958a6e9f02b6b06e7dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9588617d616242eec5714958a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jun 14 15:37:54 2012 +0200 msvcp: Sync spec files. --- dlls/msvcp100/msvcp100.spec | 22 +++--- dlls/msvcp70/msvcp70.spec | 130 ++++++++++++++++---------------- dlls/msvcp71/msvcp71.spec | 158 ++++++++++++++++++++-------------------- dlls/msvcp80/msvcp80.spec | 170 +++++++++++++++++++++--------------------- 4 files changed, 240 insertions(+), 240 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9588617d616242eec5714…
1
0
0
0
Piotr Caban : msvcp90: Added operator>>(basic_istream<char>, basic_string< char>) implementation.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: aa2733e833d644e5e87005ee04132a0617911a97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa2733e833d644e5e87005ee0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jun 14 15:37:36 2012 +0200 msvcp90: Added operator>>(basic_istream<char>, basic_string<char>) implementation. --- dlls/msvcp90/ios.c | 41 ++++++++++++++++++++++++++++++++++++----- dlls/msvcp90/msvcp90.spec | 12 ++++++------ 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 7102639..9cb3a59 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -4705,11 +4705,11 @@ basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char * /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */ /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */ -basic_istream_char* __cdecl basic_istream_char_getline_str_delim( +basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim( basic_istream_char *istream, basic_string_char *str, char delim) { IOSB_iostate state = IOSTATE_failbit; - int c; + int c = delim; TRACE("(%p %p %c)\n", istream, str, delim); @@ -4724,16 +4724,47 @@ basic_istream_char* __cdecl basic_istream_char_getline_str_delim( } basic_istream_char_sentry_destroy(istream); - basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state); + basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), + state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); return istream; } /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -basic_istream_char* __cdecl basic_istream_char_getline_str( +basic_istream_char* __cdecl basic_istream_char_getline_bstr( basic_istream_char *istream, basic_string_char *str) { - return basic_istream_char_getline_str_delim(istream, str, '\n'); + return basic_istream_char_getline_bstr_delim(istream, str, '\n'); +} + +/* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ +/* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ +basic_istream_char* __cdecl basic_istream_char_get_bstr( + basic_istream_char *istream, basic_string_char *str) +{ + IOSB_iostate state = IOSTATE_failbit; + int c = '\n'; + + TRACE("(%p %p)\n", istream, str); + + if(basic_istream_char_sentry_create(istream, FALSE)) { + basic_ios_char *base = basic_istream_char_get_basic_ios(istream); + const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc); + + MSVCP_basic_string_char_clear(str); + + for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); + c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c); + c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) { + state = IOSTATE_goodbit; + MSVCP_basic_string_char_append_ch(str, c); + } + } + basic_istream_char_sentry_destroy(istream); + + basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), + state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); + return istream; } /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index f4c3783..5c2477a 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -2,8 +2,8 @@ @ stub -arch=win64 ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z @ stub -arch=win32 ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z @ stub -arch=win64 ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z -@ stub -arch=win32 ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z -@ stub -arch=win64 ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z +@ cdecl -arch=win32 ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_istream_char_get_bstr +@ cdecl -arch=win64 ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_istream_char_get_bstr @ stub -arch=win32 ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z @ stub -arch=win64 ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z @ stub -arch=win32 ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z @@ -386,10 +386,10 @@ @ stub -arch=win64 ??$exp@N@std@@YA?AV?$complex@N@0@AEBV10@@Z @ stub -arch=win32 ??$exp@O@std@@YA?AV?$complex@O@0@ABV10@@Z @ stub -arch=win64 ??$exp@O@std@@YA?AV?$complex@O@0@AEBV10@@Z -@ cdecl -arch=win32 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_istream_char_getline_str -@ cdecl -arch=win64 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_istream_char_getline_str -@ cdecl -arch=win32 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z(ptr ptr long) basic_istream_char_getline_str_delim -@ cdecl -arch=win64 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z(ptr ptr long) basic_istream_char_getline_str_delim +@ cdecl -arch=win32 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_istream_char_getline_bstr +@ cdecl -arch=win64 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_istream_char_getline_bstr +@ cdecl -arch=win32 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z(ptr ptr long) basic_istream_char_getline_bstr_delim +@ cdecl -arch=win64 ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z(ptr ptr long) basic_istream_char_getline_bstr_delim @ stub -arch=win32 ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z @ stub -arch=win64 ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z @ stub -arch=win32 ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@G@Z
1
0
0
0
Piotr Caban : msvcp90: Use codecvt<char>:: is in basic_istream_char__Ipfx function.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: ab999f6d3ab99246a736b5d71afe505edd97e5d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab999f6d3ab99246a736b5d71…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jun 14 15:37:13 2012 +0200 msvcp90: Use codecvt<char>::is in basic_istream_char__Ipfx function. --- dlls/msvcp90/ios.c | 4 ++-- dlls/msvcp90/locale.c | 42 ++++++++++++++++++++++++++---------------- dlls/msvcp90/msvcp90.h | 21 +++++++++++++++++++++ 3 files changed, 49 insertions(+), 18 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 43a951d..7102639 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -4061,6 +4061,7 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) { basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); + const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc); int ch; for(ch = basic_streambuf_char_sgetc(strbuf); ; @@ -4070,8 +4071,7 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b return FALSE; } - /* TODO: use locale class instead of isspace */ - if(!isspace(ch)) + if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch)) break; } } diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 4ad37e8..304c510 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -76,13 +76,6 @@ typedef struct { typedef struct { LCID handle; unsigned page; - const short *table; - int delfl; -} _Ctypevec; - -typedef struct { - LCID handle; - unsigned page; } _Cvtvec; typedef struct { @@ -91,15 +84,6 @@ typedef struct { } collate; typedef struct { - locale_facet facet; -} ctype_base; - -typedef struct { - ctype_base base; - _Ctypevec ctype; -} ctype_char; - -typedef struct { ctype_base base; _Ctypevec ctype; _Cvtvec cvt; @@ -1496,6 +1480,32 @@ MSVCP_size_t __cdecl ctype_char__Getcat(const locale_facet **facet, const locale return LC_CTYPE; } +ctype_char* ctype_char_use_facet(const locale *loc) +{ + static ctype_char *obj = NULL; + + _Lockit lock; + const locale_facet *fac; + + _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); + fac = locale__Getfacet(loc, ctype_char_id.id); + if(fac) { + _Lockit_dtor(&lock); + return (ctype_char*)fac; + } + + if(obj) + return obj; + + ctype_char__Getcat(&fac, loc); + obj = (ctype_char*)fac; + locale_facet__Incref(&obj->base.facet); + locale_facet_register(&obj->base.facet); + _Lockit_dtor(&lock); + + return obj; +} + /* _Tolower */ int __cdecl _Tolower(int ch, const _Ctypevec *ctype) { diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index c7260c2..4523845 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -311,6 +311,26 @@ int __thiscall codecvt_char_in(const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**); int __thiscall codecvt_base_max_length(const codecvt_base*); +typedef struct { + LCID handle; + unsigned page; + const short *table; + int delfl; +} _Ctypevec; + +/* class ctype_base */ +typedef struct { + locale_facet facet; +} ctype_base; + +/* class ctype<char> */ +typedef struct { + ctype_base base; + _Ctypevec ctype; +} ctype_char; + +MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char*, short, char); + /* class locale */ typedef struct { @@ -323,6 +343,7 @@ locale* __thiscall locale_operator_assign(locale*, const locale*); void __thiscall locale_dtor(locale*); void free_locale(void); codecvt_char* codecvt_char_use_facet(const locale*); +ctype_char* ctype_char_use_facet(const locale*); /* class _Lockit */ typedef struct {
1
0
0
0
Piotr Caban : msvcp90: Added basic_ostream<char>::endl implementation.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: bcdcef87137c58f4ed5a74f7582fc782d15f30a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bcdcef87137c58f4ed5a74f75…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jun 14 15:36:56 2012 +0200 msvcp90: Added basic_ostream<char>::endl implementation. --- dlls/msvcp90/ios.c | 11 +++++++++++ dlls/msvcp90/msvcp90.spec | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 7d3a6f1..43a951d 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -3929,6 +3929,17 @@ basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char return NULL; } +/* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */ +/* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */ +basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr) +{ + TRACE("(%p)\n", ostr); + + basic_ostream_char_put(ostr, '\n'); + basic_ostream_char_flush(ostr); + return ostr; +} + /* Caution: basic_istream uses virtual inheritance. */ static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this) { diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 593f3c9..f4c3783 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -3719,8 +3719,8 @@ @ cdecl -arch=win64 ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_end @ thiscall -arch=win32 ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_end @ cdecl -arch=win64 ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_end -@ stub -arch=win32 ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z -@ stub -arch=win64 ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z +@ cdecl -arch=win32 ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z(ptr) basic_ostream_char_endl +@ cdecl -arch=win64 ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z(ptr) basic_ostream_char_endl @ stub -arch=win32 ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z @ stub -arch=win64 ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z @ stub -arch=win32 ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z
1
0
0
0
Piotr Caban : msvcp80: Added _Getcat implementation for supported facets.
by Alexandre Julliard
14 Jun '12
14 Jun '12
Module: wine Branch: master Commit: 2929a0e774cb61102ba7bf15d55a7ee15448e2f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2929a0e774cb61102ba7bf15d…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jun 14 15:36:39 2012 +0200 msvcp80: Added _Getcat implementation for supported facets. --- dlls/msvcp80/msvcp80.c | 123 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp80/msvcp80.spec | 40 +++++++------- 2 files changed, 143 insertions(+), 20 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2929a0e774cb61102ba7b…
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
83
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
Results per page:
10
25
50
100
200