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
August 2015
----- 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
503 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Implement CreateGlyphRunAnalysis() from IDWriteFactory2.
by Alexandre Julliard
07 Aug '15
07 Aug '15
Module: wine Branch: master Commit: 14e4996f6c33adddc310185780fffd185bb59715 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14e4996f6c33adddc31018578…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Aug 6 19:42:48 2015 +0300 dwrite: Implement CreateGlyphRunAnalysis() from IDWriteFactory2. --- dlls/dwrite/dwrite_private.h | 3 ++- dlls/dwrite/font.c | 2 +- dlls/dwrite/main.c | 15 +++++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 4418c92..caa4177 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -129,7 +129,8 @@ extern HRESULT create_font_file(IDWriteFontFileLoader *loader, const void *refer extern HRESULT create_localfontfileloader(IDWriteLocalFontFileLoader** iface) DECLSPEC_HIDDEN; extern HRESULT create_fontface(DWRITE_FONT_FACE_TYPE,UINT32,IDWriteFontFile* const*,UINT32,DWRITE_FONT_SIMULATIONS,IDWriteFontFace2**) DECLSPEC_HIDDEN; extern HRESULT create_font_collection(IDWriteFactory2*,IDWriteFontFileEnumerator*,BOOL,IDWriteFontCollection**) DECLSPEC_HIDDEN; -extern HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE,DWRITE_MEASURING_MODE,DWRITE_GLYPH_RUN const*,FLOAT,FLOAT,FLOAT,IDWriteGlyphRunAnalysis**) DECLSPEC_HIDDEN; +extern HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE,DWRITE_MEASURING_MODE,DWRITE_GLYPH_RUN const*,FLOAT,DWRITE_GRID_FIT_MODE, + DWRITE_TEXT_ANTIALIAS_MODE,FLOAT,FLOAT,IDWriteGlyphRunAnalysis**) DECLSPEC_HIDDEN; extern BOOL is_system_collection(IDWriteFontCollection*) DECLSPEC_HIDDEN; extern HRESULT get_local_refkey(const WCHAR*,const FILETIME*,void**,UINT32*) DECLSPEC_HIDDEN; extern HRESULT get_filestream_from_file(IDWriteFontFile*,IDWriteFontFileStream**) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 56a3655..db02566 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -3218,7 +3218,7 @@ static const struct IDWriteGlyphRunAnalysisVtbl glyphrunanalysisvtbl = { }; HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEASURING_MODE measuring_mode, DWRITE_GLYPH_RUN const *run, - FLOAT ppdip, FLOAT originX, FLOAT originY, IDWriteGlyphRunAnalysis **ret) + FLOAT ppdip, DWRITE_GRID_FIT_MODE gridfit_mode, DWRITE_TEXT_ANTIALIAS_MODE aa_mode, FLOAT originX, FLOAT originY, IDWriteGlyphRunAnalysis **ret) { struct dwrite_glyphrunanalysis *analysis; diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index 5673bba..9f8756d 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -1079,7 +1079,8 @@ static HRESULT WINAPI dwritefactory_CreateGlyphRunAnalysis(IDWriteFactory2 *ifac TRACE("(%p)->(%p %.2f %p %d %d %.2f %.2f %p)\n", This, run, ppdip, transform, rendering_mode, measuring_mode, originX, originY, analysis); - return create_glyphrunanalysis(rendering_mode, measuring_mode, run, ppdip, originX, originY, analysis); + return create_glyphrunanalysis(rendering_mode, measuring_mode, run, 1.0f, DWRITE_GRID_FIT_MODE_DEFAULT, + DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE, originX, originY, analysis); } static HRESULT WINAPI dwritefactory1_GetEudcFontCollection(IDWriteFactory2 *iface, IDWriteFontCollection **collection, @@ -1155,14 +1156,16 @@ static HRESULT WINAPI dwritefactory2_CreateCustomRenderingParams(IDWriteFactory2 } static HRESULT WINAPI dwritefactory2_CreateGlyphRunAnalysis(IDWriteFactory2 *iface, const DWRITE_GLYPH_RUN *run, - const DWRITE_MATRIX *transform, DWRITE_RENDERING_MODE renderingMode, DWRITE_MEASURING_MODE measuringMode, - DWRITE_GRID_FIT_MODE gridFitMode, DWRITE_TEXT_ANTIALIAS_MODE antialiasMode, FLOAT originX, FLOAT originY, + const DWRITE_MATRIX *transform, DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEASURING_MODE measuring_mode, + DWRITE_GRID_FIT_MODE gridfit_mode, DWRITE_TEXT_ANTIALIAS_MODE aa_mode, FLOAT originX, FLOAT originY, IDWriteGlyphRunAnalysis **analysis) { struct dwritefactory *This = impl_from_IDWriteFactory2(iface); - FIXME("(%p)->(%p %p %d %d %d %d %.2f %.2f %p): stub\n", This, run, transform, renderingMode, measuringMode, - gridFitMode, antialiasMode, originX, originY, analysis); - return E_NOTIMPL; + + TRACE("(%p)->(%p %p %d %d %d %d %.2f %.2f %p)\n", This, run, transform, rendering_mode, measuring_mode, + gridfit_mode, aa_mode, originX, originY, analysis); + + return create_glyphrunanalysis(rendering_mode, measuring_mode, run, 1.0f, gridfit_mode, aa_mode, originX, originY, analysis); } static const struct IDWriteFactory2Vtbl dwritefactoryvtbl = {
1
0
0
0
Nikolay Sivov : dwrite: Use right charmap for symbol encoding.
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: 813368481679a5848bc715d1e181782de157485f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=813368481679a5848bc715d1e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Aug 6 18:03:12 2015 +0300 dwrite: Use right charmap for symbol encoding. --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 2 +- dlls/dwrite/freetype.c | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index cee49df..4418c92 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -190,7 +190,7 @@ extern void freetype_notify_cacheremove(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern BOOL freetype_is_monospaced(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,USHORT,struct glyph_outline**) DECLSPEC_HIDDEN; extern UINT16 freetype_get_glyphcount(IDWriteFontFace2*) DECLSPEC_HIDDEN; -extern UINT16 freetype_get_glyphindex(IDWriteFontFace2*,UINT32) DECLSPEC_HIDDEN; +extern UINT16 freetype_get_glyphindex(IDWriteFontFace2*,UINT32,INT) DECLSPEC_HIDDEN; extern BOOL freetype_has_kerning_pairs(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern INT32 freetype_get_kerning_pair_adjustment(IDWriteFontFace2*,UINT16,UINT16) DECLSPEC_HIDDEN; extern void freetype_get_glyph_bbox(IDWriteFontFace2*,FLOAT,UINT16,BOOL,RECT*) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index a4ed575..56a3655 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -469,7 +469,7 @@ static HRESULT WINAPI dwritefontface_GetGlyphIndices(IDWriteFontFace2 *iface, UI } for (i = 0; i < count; i++) - glyph_indices[i] = freetype_get_glyphindex(iface, codepoints[i]); + glyph_indices[i] = freetype_get_glyphindex(iface, codepoints[i], This->charmap); return S_OK; } diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index e693f9a..3290243 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -437,12 +437,20 @@ UINT16 freetype_get_glyphcount(IDWriteFontFace2 *fontface) return count; } -UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint) +UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint, INT charmap) { UINT16 glyph; EnterCriticalSection(&freetype_cs); - glyph = pFTC_CMapCache_Lookup(cmap_cache, fontface, -1, codepoint); + if (charmap == -1) + glyph = pFTC_CMapCache_Lookup(cmap_cache, fontface, charmap, codepoint); + else { + /* special handling for symbol fonts */ + if (codepoint < 0x100) codepoint += 0xf000; + glyph = pFTC_CMapCache_Lookup(cmap_cache, fontface, charmap, codepoint); + if (!glyph) + glyph = pFTC_CMapCache_Lookup(cmap_cache, fontface, charmap, codepoint - 0xf000); + } LeaveCriticalSection(&freetype_cs); return glyph; @@ -627,7 +635,7 @@ UINT16 freetype_get_glyphcount(IDWriteFontFace2 *fontface) return 0; } -UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint) +UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint, INT charmap) { return 0; }
1
0
0
0
Nikolay Sivov : dwrite: Implement IsSymbolFont().
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: ab7c65ae436fa5027846184c5b4fb6b56aee9ab8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab7c65ae436fa5027846184c5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Aug 6 18:02:43 2015 +0300 dwrite: Implement IsSymbolFont(). --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 7 +++++-- dlls/dwrite/freetype.c | 43 ++++++++++++++++++++++++++++++++++++++++++ dlls/dwrite/tests/font.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 2 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 75098cf..cee49df 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -195,6 +195,7 @@ extern BOOL freetype_has_kerning_pairs(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern INT32 freetype_get_kerning_pair_adjustment(IDWriteFontFace2*,UINT16,UINT16) DECLSPEC_HIDDEN; extern void freetype_get_glyph_bbox(IDWriteFontFace2*,FLOAT,UINT16,BOOL,RECT*) DECLSPEC_HIDDEN; extern void freetype_get_glyph_bitmap(IDWriteFontFace2*,FLOAT,UINT16,const RECT*,BYTE*) DECLSPEC_HIDDEN; +extern INT freetype_get_charmap_index(IDWriteFontFace2*,BOOL*) DECLSPEC_HIDDEN; /* Glyph shaping */ enum SCRIPT_JUSTIFY diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index aaa0f42..a4ed575 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -148,6 +148,8 @@ struct dwrite_fontface { DWRITE_FONT_FACE_TYPE type; DWRITE_FONT_METRICS1 metrics; DWRITE_CARET_METRICS caret; + INT charmap; + BOOL is_symbol; struct dwrite_fonttable cmap; struct dwrite_fonttable vdmx; @@ -401,8 +403,8 @@ static DWRITE_FONT_SIMULATIONS WINAPI dwritefontface_GetSimulations(IDWriteFontF static BOOL WINAPI dwritefontface_IsSymbolFont(IDWriteFontFace2 *iface) { struct dwrite_fontface *This = impl_from_IDWriteFontFace2(iface); - FIXME("(%p): stub\n", This); - return FALSE; + TRACE("(%p)\n", This); + return This->is_symbol; } static void WINAPI dwritefontface_GetMetrics(IDWriteFontFace2 *iface, DWRITE_FONT_METRICS *metrics) @@ -2500,6 +2502,7 @@ HRESULT create_fontface(DWRITE_FONT_FACE_TYPE facetype, UINT32 files_number, IDW fontface->caret.slopeRun = fontface->caret.slopeRise / 3; } } + fontface->charmap = freetype_get_charmap_index(&fontface->IDWriteFontFace2_iface, &fontface->is_symbol); *ret = &fontface->IDWriteFontFace2_iface; return S_OK; diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index 2c02b26..e693f9a 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -28,6 +28,7 @@ #include FT_CACHE_H #include FT_FREETYPE_H #include FT_OUTLINE_H +#include FT_TRUETYPE_TABLES_H #endif /* HAVE_FT2BUILD_H */ #include "windef.h" @@ -64,7 +65,9 @@ typedef struct #define MAKE_FUNCPTR(f) static typeof(f) * p##f = NULL MAKE_FUNCPTR(FT_Done_FreeType); +MAKE_FUNCPTR(FT_Get_First_Char); MAKE_FUNCPTR(FT_Get_Kerning); +MAKE_FUNCPTR(FT_Get_Sfnt_Table); MAKE_FUNCPTR(FT_Glyph_Get_CBox); MAKE_FUNCPTR(FT_Init_FreeType); MAKE_FUNCPTR(FT_Library_Version); @@ -145,7 +148,9 @@ BOOL init_freetype(void) #define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(ft_handle, #f, NULL, 0)) == NULL){WARN("Can't find symbol %s\n", #f); goto sym_not_found;} LOAD_FUNCPTR(FT_Done_FreeType) + LOAD_FUNCPTR(FT_Get_First_Char) LOAD_FUNCPTR(FT_Get_Kerning) + LOAD_FUNCPTR(FT_Get_Sfnt_Table) LOAD_FUNCPTR(FT_Glyph_Get_CBox) LOAD_FUNCPTR(FT_Init_FreeType) LOAD_FUNCPTR(FT_Library_Version) @@ -554,6 +559,38 @@ void freetype_get_glyph_bitmap(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 LeaveCriticalSection(&freetype_cs); } +INT freetype_get_charmap_index(IDWriteFontFace2 *fontface, BOOL *is_symbol) +{ + INT charmap_index = -1; + FT_Face face; + + *is_symbol = FALSE; + + EnterCriticalSection(&freetype_cs); + if (pFTC_Manager_LookupFace(cache_manager, fontface, &face) == 0) { + TT_OS2 *os2 = pFT_Get_Sfnt_Table(face, ft_sfnt_os2); + FT_Int i; + + if (os2) { + FT_UInt dummy; + if (os2->version == 0) + *is_symbol = pFT_Get_First_Char(face, &dummy) >= 0x100; + else + *is_symbol = os2->ulCodePageRange1 & FS_SYMBOL; + } + + for (i = 0; i < face->num_charmaps; i++) + if (face->charmaps[i]->encoding == FT_ENCODING_MS_SYMBOL) { + *is_symbol = TRUE; + charmap_index = i; + break; + } + } + LeaveCriticalSection(&freetype_cs); + + return charmap_index; +} + #else /* HAVE_FREETYPE */ BOOL init_freetype(void) @@ -616,4 +653,10 @@ void freetype_get_glyph_bitmap(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 memset(buf, 0, size); } +INT freetype_get_charmap_index(IDWriteFontFace2 *fontface, BOOL *is_symbol) +{ + *is_symbol = FALSE; + return -1; +} + #endif /* HAVE_FREETYPE */ diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 327a29f..9a75abc 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -4710,6 +4710,50 @@ static void test_CreateAlphaTexture(void) IDWriteFactory_Release(factory); } +static void test_IsSymbolFont(void) +{ + static const WCHAR symbolW[] = {'S','y','m','b','o','l',0}; + IDWriteFontCollection *collection; + IDWriteFontFace *fontface; + IDWriteFactory *factory; + IDWriteFont *font; + HRESULT hr; + BOOL ret; + + factory = create_factory(); + + /* Tahoma */ + fontface = create_fontface(factory); + ret = IDWriteFontFace_IsSymbolFont(fontface); + ok(!ret, "got %d\n", ret); + + hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFontCollection_GetFontFromFontFace(collection, fontface, &font); + ok(hr == S_OK, "got 0x%08x\n", hr); + + ret = IDWriteFont_IsSymbolFont(font); + ok(!ret, "got %d\n", ret); + + IDWriteFontCollection_Release(collection); + IDWriteFont_Release(font); + IDWriteFontFace_Release(fontface); + + /* Symbol */ + font = get_font(factory, symbolW, DWRITE_FONT_STYLE_NORMAL); + ret = IDWriteFont_IsSymbolFont(font); + ok(ret, "got %d\n", ret); + + hr = IDWriteFont_CreateFontFace(font, &fontface); + ok(hr == S_OK, "got 0x%08x\n", hr); + ret = IDWriteFontFace_IsSymbolFont(fontface); + ok(ret, "got %d\n", ret); + IDWriteFont_Release(font); + + IDWriteFactory_Release(factory); +} + START_TEST(font) { IDWriteFactory *factory; @@ -4759,6 +4803,7 @@ START_TEST(font) test_GetRecommendedRenderingMode(); test_GetAlphaBlendParams(); test_CreateAlphaTexture(); + test_IsSymbolFont(); IDWriteFactory_Release(factory); }
1
0
0
0
Nikolay Sivov : dwrite: Properly initialize LOGFONT returned from ConvertFontToLOGFONT().
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: 7540fa5a1a0a5f98f1443e31598221f6af42e7fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7540fa5a1a0a5f98f1443e315…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Aug 6 17:57:26 2015 +0300 dwrite: Properly initialize LOGFONT returned from ConvertFontToLOGFONT(). --- dlls/dwrite/gdiinterop.c | 2 ++ dlls/dwrite/tests/font.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index 86778df..8248431 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -504,6 +504,8 @@ static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface, *is_systemfont = FALSE; + memset(logfont, 0, sizeof(*logfont)); + if (!font) return E_INVALIDARG; diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 0eca7f4..327a29f 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -2731,16 +2731,48 @@ if (0) { /* crashes on native */ IDWriteGdiInterop_ConvertFontToLOGFONT(interop, NULL, &logfont, NULL); IDWriteGdiInterop_ConvertFontToLOGFONT(interop, font, NULL, &system); } + + memset(&logfont, 0xcc, sizeof(logfont)); system = TRUE; hr = IDWriteGdiInterop_ConvertFontToLOGFONT(interop, NULL, &logfont, &system); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); ok(!system, "got %d\n", system); + ok(logfont.lfFaceName[0] == 0, "got face name %s\n", wine_dbgstr_w(logfont.lfFaceName)); system = FALSE; - memset(&logfont, 0, sizeof(logfont)); + + logfont.lfHeight = 10; + logfont.lfWidth = 11; + logfont.lfEscapement = 10; + logfont.lfOrientation = 10; + logfont.lfWeight = 0; + logfont.lfItalic = 1; + logfont.lfUnderline = 1; + logfont.lfStrikeOut = 1; + logfont.lfCharSet = 0; + logfont.lfOutPrecision = 0; + logfont.lfClipPrecision = 0; + logfont.lfQuality = 0; + logfont.lfPitchAndFamily = 0; + logfont.lfFaceName[0] = 0; + hr = IDWriteGdiInterop_ConvertFontToLOGFONT(interop, font, &logfont, &system); ok(hr == S_OK, "got 0x%08x\n", hr); ok(system, "got %d\n", system); + + ok(logfont.lfHeight == 0, "got %d\n", logfont.lfHeight); + ok(logfont.lfWidth == 0, "got %d\n", logfont.lfWidth); + ok(logfont.lfEscapement == 0, "got %d\n", logfont.lfEscapement); + ok(logfont.lfOrientation == 0, "got %d\n", logfont.lfOrientation); + ok(logfont.lfWeight > 0, "got %d\n", logfont.lfWeight); + ok(logfont.lfItalic == 0, "got %d\n", logfont.lfItalic); + ok(logfont.lfUnderline == 0, "got %d\n", logfont.lfUnderline); + ok(logfont.lfStrikeOut == 0, "got %d\n", logfont.lfStrikeOut); + ok(logfont.lfCharSet == DEFAULT_CHARSET, "got %d\n", logfont.lfCharSet); + ok(logfont.lfOutPrecision == OUT_OUTLINE_PRECIS, "got %d\n", logfont.lfOutPrecision); + ok(logfont.lfClipPrecision == 0, "got %d\n", logfont.lfClipPrecision); + ok(logfont.lfQuality == 0, "got %d\n", logfont.lfQuality); + ok(logfont.lfPitchAndFamily == 0, "got %d\n", logfont.lfPitchAndFamily); ok(logfont.lfFaceName[0] != 0, "got face name %s\n", wine_dbgstr_w(logfont.lfFaceName)); IDWriteFactory_Release(factory2);
1
0
0
0
Lauri Kenttä : po: Update Finnish translation.
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: 864105b66d9739d0f58e201600563f0f09c87746 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=864105b66d9739d0f58e20160…
Author: Lauri Kenttä <lauri.kentta(a)gmail.com> Date: Thu Aug 6 16:45:04 2015 +0300 po: Update Finnish translation. --- po/fi.po | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/po/fi.po b/po/fi.po index 1b86d7a..dfae62f 100644 --- a/po/fi.po +++ b/po/fi.po @@ -9934,8 +9934,7 @@ msgid "" "redirected). No check is made that the file is readable text.\n" msgstr "" "TYPE <tiedostonimi> kopioi tiedoston <tiedostonimi> konsolilaitteeseen (tai\n" -"muualle, jos ohjataan muualle). Sitä, onko tiedosto luettavissa, ei\n" -"tarkisteta.\n" +"uudelleenohjattuna muualle). Tiedoston tekstimuotoisuutta ei tarkisteta.\n" #: cmd.rc:253 msgid ""
1
0
0
0
Hans Leidekker : mscms: Let liblcms2 determine input and output format for transform profiles.
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: d2c9e5560a2aa13319e2ea3e8ea8899e5aea1f55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2c9e5560a2aa13319e2ea3e8…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Aug 6 14:46:34 2015 +0200 mscms: Let liblcms2 determine input and output format for transform profiles. --- dlls/mscms/tests/profile.c | 37 ++++++++++++++++ dlls/mscms/transform.c | 102 +++++++++++++++------------------------------ 2 files changed, 71 insertions(+), 68 deletions(-) diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c index 012a7dc..f3ebe03 100644 --- a/dlls/mscms/tests/profile.c +++ b/dlls/mscms/tests/profile.c @@ -35,6 +35,8 @@ static HMODULE huser32; static BOOL (WINAPI *pAssociateColorProfileWithDeviceA)(PCSTR,PCSTR,PCSTR); static BOOL (WINAPI *pCloseColorProfile)(HPROFILE); +static HTRANSFORM (WINAPI *pCreateMultiProfileTransform)(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,DWORD); +static BOOL (WINAPI *pDeleteColorTransform)(HTRANSFORM); static BOOL (WINAPI *pDisassociateColorProfileFromDeviceA)(PCSTR,PCSTR,PCSTR); static BOOL (WINAPI *pGetColorDirectoryA)(PCHAR,PCHAR,PDWORD); static BOOL (WINAPI *pGetColorDirectoryW)(PWCHAR,PWCHAR,PDWORD); @@ -68,6 +70,8 @@ static BOOL init_function_ptrs( void ) { GETFUNCPTR( AssociateColorProfileWithDeviceA ) GETFUNCPTR( CloseColorProfile ) + GETFUNCPTR( CreateMultiProfileTransform ) + GETFUNCPTR( DeleteColorTransform ) GETFUNCPTR( DisassociateColorProfileFromDeviceA ) GETFUNCPTR( GetColorDirectoryA ) GETFUNCPTR( GetColorDirectoryW ) @@ -1334,6 +1338,38 @@ static BOOL have_profile(void) return TRUE; } +static void test_CreateMultiProfileTransform( char *standardprofile, char *testprofile ) +{ + PROFILE profile; + HPROFILE handle[2]; + HTRANSFORM transform; + DWORD intents[2] = { INTENT_PERCEPTUAL, INTENT_PERCEPTUAL }; + + if (testprofile) + { + profile.dwType = PROFILE_FILENAME; + profile.pProfileData = standardprofile; + profile.cbDataSize = strlen(standardprofile); + + handle[0] = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); + ok( handle[0] != NULL, "got %u\n", GetLastError() ); + + profile.dwType = PROFILE_FILENAME; + profile.pProfileData = testprofile; + profile.cbDataSize = strlen(testprofile); + + handle[1] = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); + ok( handle[1] != NULL, "got %u\n", GetLastError() ); + + transform = pCreateMultiProfileTransform( handle, 2, intents, 2, 0, 0 ); + ok( transform != NULL, "got %u\n", GetLastError() ); + + pDeleteColorTransform( transform ); + pCloseColorProfile( handle[0] ); + pCloseColorProfile( handle[1] ); + } +} + START_TEST(profile) { UINT len; @@ -1443,6 +1479,7 @@ START_TEST(profile) test_UninstallColorProfileW( testprofileW ); test_AssociateColorProfileWithDeviceA( testprofile ); + test_CreateMultiProfileTransform( standardprofile, testprofile ); if (testprofile) DeleteFileA( testprofile ); FreeLibrary( huser32 ); diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c index 058cffa..cada332 100644 --- a/dlls/mscms/transform.c +++ b/dlls/mscms/transform.c @@ -36,64 +36,51 @@ WINE_DEFAULT_DEBUG_CHANNEL(mscms); #ifdef HAVE_LCMS2 -static DWORD from_profile( HPROFILE profile ) -{ - PROFILEHEADER header; - - GetColorProfileHeader( profile, &header ); - TRACE( "color space: 0x%08x %s\n", header.phDataColorSpace, dbgstr_tag( header.phDataColorSpace ) ); - - switch (header.phDataColorSpace) - { - case 0x434d594b: return TYPE_CMYK_16; /* 'CMYK' */ - case 0x47524159: return TYPE_GRAY_16; /* 'GRAY' */ - case 0x4c616220: return TYPE_Lab_16; /* 'Lab ' */ - case 0x52474220: return TYPE_RGB_16; /* 'RGB ' */ - case 0x58595a20: return TYPE_XYZ_16; /* 'XYZ ' */ - default: - WARN("unhandled format\n"); - return TYPE_RGB_16; - } -} - static DWORD from_bmformat( BMFORMAT format ) { static BOOL quietfixme = FALSE; - TRACE( "bitmap format: 0x%08x\n", format ); + DWORD ret; switch (format) { - case BM_RGBTRIPLETS: return TYPE_RGB_8; - case BM_BGRTRIPLETS: return TYPE_BGR_8; - case BM_GRAY: return TYPE_GRAY_8; - case BM_xRGBQUADS: return TYPE_ARGB_8; - case BM_xBGRQUADS: return TYPE_ABGR_8; + case BM_RGBTRIPLETS: ret = TYPE_RGB_8; break; + case BM_BGRTRIPLETS: ret = TYPE_BGR_8; break; + case BM_GRAY: ret = TYPE_GRAY_8; break; + case BM_xRGBQUADS: ret = TYPE_ARGB_8; break; + case BM_xBGRQUADS: ret = TYPE_ABGR_8; break; default: if (!quietfixme) { - FIXME("unhandled bitmap format 0x%x\n", format); + FIXME( "unhandled bitmap format %08x\n", format ); quietfixme = TRUE; } - return TYPE_RGB_8; + ret = TYPE_RGB_8; + break; } + TRACE( "color space: %08x -> %08x\n", format, ret ); + return ret; } static DWORD from_type( COLORTYPE type ) { - TRACE( "color type: 0x%08x\n", type ); + DWORD ret; switch (type) { - case COLOR_GRAY: return TYPE_GRAY_16; - case COLOR_RGB: return TYPE_RGB_16; - case COLOR_XYZ: return TYPE_XYZ_16; - case COLOR_Yxy: return TYPE_Yxy_16; - case COLOR_Lab: return TYPE_Lab_16; - case COLOR_CMYK: return TYPE_CMYK_16; + case COLOR_GRAY: ret = TYPE_GRAY_16; break; + case COLOR_RGB: ret = TYPE_RGB_16; break; + case COLOR_XYZ: ret = TYPE_XYZ_16; break; + case COLOR_Yxy: ret = TYPE_Yxy_16; break; + case COLOR_Lab: ret = TYPE_Lab_16; break; + case COLOR_CMYK: ret = TYPE_CMYK_16; break; default: - FIXME("unhandled color type\n"); - return TYPE_RGB_16; + FIXME( "unhandled color type %08x\n", type ); + ret = TYPE_RGB_16; + break; } + + TRACE( "color type: %08x -> %08x\n", type, ret ); + return ret; } #endif /* HAVE_LCMS2 */ @@ -145,7 +132,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, struct transform transform; struct profile *dst, *tgt = NULL; cmsHPROFILE cmsinput, cmsoutput, cmstarget = NULL; - DWORD in_format, out_format, proofing = 0; + DWORD proofing = 0; int intent; TRACE( "( %p, %p, %p, 0x%08x )\n", space, dest, target, flags ); @@ -163,9 +150,6 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, TRACE( "lcsCSType: %s\n", dbgstr_tag( space->lcsCSType ) ); TRACE( "lcsFilename: %s\n", debugstr_w( space->lcsFilename ) ); - in_format = TYPE_RGB_16; - out_format = from_profile( dest ); - cmsinput = cmsCreate_sRGBProfile(); /* FIXME: create from supplied color space */ if (target) { @@ -173,8 +157,9 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, cmstarget = tgt->cmsprofile; } cmsoutput = dst->cmsprofile; - transform.cmstransform = cmsCreateProofingTransform(cmsinput, in_format, cmsoutput, out_format, cmstarget, - intent, INTENT_ABSOLUTE_COLORIMETRIC, proofing); + transform.cmstransform = cmsCreateProofingTransform(cmsinput, 0, cmsoutput, 0, cmstarget, + intent, INTENT_ABSOLUTE_COLORIMETRIC, + proofing); if (!transform.cmstransform) { if (tgt) release_profile( tgt ); @@ -212,10 +197,9 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil { HTRANSFORM ret = NULL; #ifdef HAVE_LCMS2 - cmsHPROFILE *cmsprofiles, cmsconvert = NULL; + cmsHPROFILE *cmsprofiles; struct transform transform; struct profile *profile0, *profile1; - DWORD in_format, out_format; TRACE( "( %p, 0x%08x, %p, 0x%08x, 0x%08x, 0x%08x )\n", profiles, nprofiles, intents, nintents, flags, cmm ); @@ -236,32 +220,14 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil release_profile( profile0 ); return NULL; } - in_format = from_profile( profiles[0] ); - out_format = from_profile( profiles[nprofiles - 1] ); - - if (in_format != out_format) - { - /* insert a conversion profile for pairings that lcms doesn't handle */ - if (out_format == TYPE_RGB_16) cmsconvert = cmsCreate_sRGBProfile(); - if (out_format == TYPE_Lab_16) cmsconvert = cmsCreateLab2Profile( NULL ); - } - cmsprofiles = HeapAlloc( GetProcessHeap(), 0, (nprofiles + 1) * sizeof(cmsHPROFILE) ); - if (cmsprofiles) + if ((cmsprofiles = HeapAlloc( GetProcessHeap(), 0, (nprofiles + 1) * sizeof(cmsHPROFILE) ))) { cmsprofiles[0] = profile0->cmsprofile; - if (cmsconvert) - { - cmsprofiles[1] = cmsconvert; - cmsprofiles[2] = profile1->cmsprofile; - nprofiles++; - } - else - { - cmsprofiles[1] = profile1->cmsprofile; - } - transform.cmstransform = cmsCreateMultiprofileTransform( cmsprofiles, nprofiles, in_format, - out_format, *intents, 0 ); + cmsprofiles[1] = profile1->cmsprofile; + + transform.cmstransform = cmsCreateMultiprofileTransform( cmsprofiles, nprofiles, 0, + 0, *intents, 0 ); HeapFree( GetProcessHeap(), 0, cmsprofiles ); if (!transform.cmstransform) {
1
0
0
0
Hans Leidekker : mscms: Check the return value of a couple of liblcms2 calls.
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: ee849808957773e8ad8b21c86b1f4b347b2f0cbf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee849808957773e8ad8b21c86…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Aug 6 14:46:15 2015 +0200 mscms: Check the return value of a couple of liblcms2 calls. --- dlls/mscms/profile.c | 15 ++++++++++++--- dlls/mscms/transform.c | 22 ++++++++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index eb9b4d0..f0c4087 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -1152,7 +1152,7 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE handle, TAGTYPE type, PBOOL prese release_profile( profile ); return FALSE; } - *present = cmsIsTag( profile->cmsprofile, type ); + *present = (cmsIsTag( profile->cmsprofile, type ) != 0); release_profile( profile ); ret = TRUE; @@ -1406,7 +1406,11 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing if (!(data = HeapAlloc( GetProcessHeap(), 0, profile->cbDataSize ))) return NULL; memcpy( data, profile->pProfileData, profile->cbDataSize ); - cmsprofile = cmsOpenProfileFromMem( data, profile->cbDataSize ); + if (!(cmsprofile = cmsOpenProfileFromMem( data, profile->cbDataSize ))) + { + HeapFree( GetProcessHeap(), 0, data ); + return FALSE; + } size = profile->cbDataSize; } else if (profile->dwType == PROFILE_FILENAME) @@ -1464,7 +1468,12 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing HeapFree( GetProcessHeap(), 0, data ); return NULL; } - cmsprofile = cmsOpenProfileFromMem( data, size ); + if (!(cmsprofile = cmsOpenProfileFromMem( data, size ))) + { + CloseHandle( handle ); + HeapFree( GetProcessHeap(), 0, data ); + return NULL; + } } else { diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c index aed7011..058cffa 100644 --- a/dlls/mscms/transform.c +++ b/dlls/mscms/transform.c @@ -175,6 +175,12 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, cmsoutput = dst->cmsprofile; transform.cmstransform = cmsCreateProofingTransform(cmsinput, in_format, cmsoutput, out_format, cmstarget, intent, INTENT_ABSOLUTE_COLORIMETRIC, proofing); + if (!transform.cmstransform) + { + if (tgt) release_profile( tgt ); + release_profile( dst ); + return FALSE; + } ret = create_transform( &transform ); @@ -254,9 +260,15 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil { cmsprofiles[1] = profile1->cmsprofile; } - transform.cmstransform = cmsCreateMultiprofileTransform( cmsprofiles, nprofiles, in_format, out_format, *intents, 0 ); - + transform.cmstransform = cmsCreateMultiprofileTransform( cmsprofiles, nprofiles, in_format, + out_format, *intents, 0 ); HeapFree( GetProcessHeap(), 0, cmsprofiles ); + if (!transform.cmstransform) + { + release_profile( profile0 ); + release_profile( profile1 ); + return FALSE; + } ret = create_transform( &transform ); } @@ -327,7 +339,8 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM handle, PVOID srcbits, BMFORMAT inpu outputstride, callback, data ); if (!transform) return FALSE; - cmsChangeBuffersFormat( transform->cmstransform, from_bmformat(input), from_bmformat(output) ); + if (!cmsChangeBuffersFormat( transform->cmstransform, from_bmformat(input), from_bmformat(output) )) + return FALSE; cmsDoTransform( transform->cmstransform, srcbits, destbits, width * height ); release_transform( transform ); @@ -368,7 +381,8 @@ BOOL WINAPI TranslateColors( HTRANSFORM handle, PCOLOR in, DWORD count, if (!transform) return FALSE; xfrm = transform->cmstransform; - cmsChangeBuffersFormat( xfrm, from_type(input_type), from_type(output_type) ); + if (!cmsChangeBuffersFormat( xfrm, from_type(input_type), from_type(output_type) )) + return FALSE; switch (input_type) {
1
0
0
0
Piotr Caban : msvcp120: Fix tr2::sys:: _Copy_file test failures on non-ntfs file system.
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: 47a3719f22ef870acc7a869a96d0612923c4c013 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47a3719f22ef870acc7a869a9…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 6 12:07:22 2015 +0200 msvcp120: Fix tr2::sys::_Copy_file test failures on non-ntfs file system. --- dlls/msvcp120/tests/msvcp120.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 84eb096..762a261 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -558,18 +558,20 @@ static void test_tr2_sys__Copy_file(void) char const *dest; MSVCP_bool fail_if_exists; int last_error; + int last_error2; MSVCP_bool is_todo; } tests[] = { - { "f1", "f1_copy", TRUE, ERROR_SUCCESS, FALSE }, - { "f1", "tr2_test_dir\\f1_copy", TRUE, ERROR_SUCCESS, FALSE }, - { "f1", "tr2_test_dir\\f1_copy", TRUE, ERROR_FILE_EXISTS, FALSE }, - { "f1", "tr2_test_dir\\f1_copy", FALSE, ERROR_SUCCESS, FALSE }, - { "tr2_test_dir", "f1", TRUE, ERROR_ACCESS_DENIED, FALSE }, - { "tr2_test_dir", "tr2_test_dir_copy", TRUE, ERROR_ACCESS_DENIED, FALSE }, - { NULL, "f1", TRUE, ERROR_INVALID_PARAMETER, TRUE }, - { "f1", NULL, TRUE, ERROR_INVALID_PARAMETER, TRUE }, - { "not_exist", "tr2_test_dir", TRUE, ERROR_FILE_NOT_FOUND, FALSE }, - { "f1", "not_exist_dir\\f1_copy", TRUE, ERROR_PATH_NOT_FOUND, FALSE } + { "f1", "f1_copy", TRUE, ERROR_SUCCESS, ERROR_SUCCESS, FALSE }, + { "f1", "tr2_test_dir\\f1_copy", TRUE, ERROR_SUCCESS, ERROR_SUCCESS, FALSE }, + { "f1", "tr2_test_dir\\f1_copy", TRUE, ERROR_FILE_EXISTS, ERROR_FILE_EXISTS, FALSE }, + { "f1", "tr2_test_dir\\f1_copy", FALSE, ERROR_SUCCESS, ERROR_SUCCESS, FALSE }, + { "tr2_test_dir", "f1", TRUE, ERROR_ACCESS_DENIED, ERROR_ACCESS_DENIED, FALSE }, + { "tr2_test_dir", "tr2_test_dir_copy", TRUE, ERROR_ACCESS_DENIED, ERROR_ACCESS_DENIED, FALSE }, + { NULL, "f1", TRUE, ERROR_INVALID_PARAMETER, ERROR_INVALID_PARAMETER, TRUE }, + { "f1", NULL, TRUE, ERROR_INVALID_PARAMETER, ERROR_INVALID_PARAMETER, TRUE }, + { "not_exist", "tr2_test_dir", TRUE, ERROR_FILE_NOT_FOUND, ERROR_FILE_NOT_FOUND, FALSE }, + { "f1", "not_exist_dir\\f1_copy", TRUE, ERROR_PATH_NOT_FOUND, ERROR_FILE_NOT_FOUND, FALSE }, + { "f1", "tr2_test_dir", TRUE, ERROR_ACCESS_DENIED, ERROR_FILE_EXISTS, FALSE } }; ret = p_tr2_sys__Make_dir("tr2_test_dir"); @@ -585,17 +587,18 @@ static void test_tr2_sys__Copy_file(void) errno = 0xdeadbeef; ret = p_tr2_sys__Copy_file(tests[i].source, tests[i].dest, tests[i].fail_if_exists); if(tests[i].is_todo) - todo_wine ok(ret == tests[i].last_error, "test_tr2_sys__Copy_file(): test %d expect: %d, got %d\n", i+1, tests[i].last_error, ret); + todo_wine ok(ret == tests[i].last_error || ret == tests[i].last_error2, + "test_tr2_sys__Copy_file(): test %d expect: %d, got %d\n", + i+1, tests[i].last_error, ret); else - ok(ret == tests[i].last_error, "test_tr2_sys__Copy_file(): test %d expect: %d, got %d\n", i+1, tests[i].last_error, ret); + ok(ret == tests[i].last_error || ret == tests[i].last_error2, + "test_tr2_sys__Copy_file(): test %d expect: %d, got %d\n", + i+1, tests[i].last_error, ret); ok(errno == 0xdeadbeef, "test_tr2_sys__Copy_file(): test %d errno expect 0xdeadbeef, got %d\n", i+1, errno); if(ret == ERROR_SUCCESS) ok(p_tr2_sys__File_size(tests[i].source) == p_tr2_sys__File_size(tests[i].dest), "test_tr2_sys__Copy_file(): test %d failed, two files' size are not equal\n", i+1); } - ret = p_tr2_sys__Copy_file("f1", "tr2_test_dir", TRUE); - ok(ret==ERROR_ACCESS_DENIED || ret==ERROR_FILE_EXISTS, - "test_tr2_sys__Copy_file(): expect: ERROR_ACCESS_DENIED or ERROR_FILE_EXISTS, got %d\n", ret); ok(DeleteFileA("f1"), "expect f1 to exist\n"); ok(DeleteFileA("f1_copy"), "expect f1_copy to exist\n");
1
0
0
0
Charles Davis : ws2_32: Implement setting the keep-alive idle timeout and interval on Mac OS.
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: 4829989c19de47b7c64fb8f5deb9877d96602442 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4829989c19de47b7c64fb8f5d…
Author: Charles Davis <cdavis5x(a)gmail.com> Date: Sun Aug 2 17:54:42 2015 -0600 ws2_32: Implement setting the keep-alive idle timeout and interval on Mac OS. --- dlls/ws2_32/socket.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index b06d7e7..79aaaf9 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -172,6 +172,11 @@ #define INADDR_NONE ~0UL #endif +#if !defined(TCP_KEEPIDLE) && defined(TCP_KEEPALIVE) +/* TCP_KEEPALIVE is the Mac OS name for TCP_KEEPIDLE */ +#define TCP_KEEPIDLE TCP_KEEPALIVE +#endif + WINE_DEFAULT_DEBUG_CHANNEL(winsock); WINE_DECLARE_DEBUG_CHANNEL(winediag); @@ -4459,14 +4464,23 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID fd = get_sock_fd(s, 0, NULL); if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&keepalive, sizeof(int)) == -1) status = WSAEINVAL; -#if defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) +#if defined(TCP_KEEPIDLE) || defined(TCP_KEEPINTVL) /* these values need to be set only if SO_KEEPALIVE is enabled */ else if(keepalive) { +#ifndef TCP_KEEPIDLE + FIXME("ignoring keepalive timeout\n"); +#else if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&keepidle, sizeof(int)) == -1) status = WSAEINVAL; - else if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&keepintvl, sizeof(int)) == -1) + else +#endif +#ifdef TCP_KEEPINTVL + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&keepintvl, sizeof(int)) == -1) status = WSAEINVAL; +#else + FIXME("ignoring keepalive interval\n"); +#endif } #else else
1
0
0
0
Akihiro Sagawa : user.exe: Release the Win16 lock due to loading 32-bit dlls in CreateWindow.
by Alexandre Julliard
06 Aug '15
06 Aug '15
Module: wine Branch: master Commit: 9ac7bca209e1b11af898d1b393d13c8dc92c66e1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9ac7bca209e1b11af898d1b39…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Mon Aug 3 23:48:47 2015 +0900 user.exe: Release the Win16 lock due to loading 32-bit dlls in CreateWindow. --- dlls/user.exe16/message.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c index 935b025..b5d9225 100644 --- a/dlls/user.exe16/message.c +++ b/dlls/user.exe16/message.c @@ -2648,11 +2648,17 @@ static DWORD wait_message16( DWORD count, const HANDLE *handles, DWORD timeout, */ HWND create_window16( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE instance, BOOL unicode ) { + DWORD lock; + HWND ret; + /* map to module handle */ if (instance && !((ULONG_PTR)instance >> 16)) instance = HINSTANCE_32( GetExePtr( HINSTANCE_16(instance) )); - return wow_handlers32.create_window( cs, className, instance, unicode ); + ReleaseThunkLock( &lock ); + ret = wow_handlers32.create_window( cs, className, instance, unicode ); + RestoreThunkLock( lock ); + return ret; }
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
51
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
Results per page:
10
25
50
100
200