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 2017
----- 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
492 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Added IHTMLSelectionObject2:: get_typeDetail semi-stub implementation.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: fedc26ec3f0fc292189cf60a58ff7cd393cef16f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fedc26ec3f0fc292189cf60a5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jan 25 18:13:00 2017 +0100 mshtml: Added IHTMLSelectionObject2::get_typeDetail semi-stub implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/selection.c | 10 ++++++++-- dlls/mshtml/tests/dom.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/selection.c b/dlls/mshtml/selection.c index 2cf0e0a..dfbb386 100644 --- a/dlls/mshtml/selection.c +++ b/dlls/mshtml/selection.c @@ -307,8 +307,14 @@ static HRESULT WINAPI HTMLSelectionObject2_createRangeCollection(IHTMLSelectionO static HRESULT WINAPI HTMLSelectionObject2_get_typeDetail(IHTMLSelectionObject2 *iface, BSTR *p) { HTMLSelectionObject *This = impl_from_IHTMLSelectionObject2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + static const WCHAR undefinedW[] = {'u','n','d','e','f','i','n','e','d',0}; + + FIXME("(%p)->(%p) semi-stub\n", This, p); + + /* FIXME: We should try to use ISelectionServicesListener::GetTypeDetail here. */ + *p = SysAllocString(undefinedW); + return *p ? S_OK : E_OUTOFMEMORY; } static const IHTMLSelectionObject2Vtbl HTMLSelectionObject2Vtbl = { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index e784189..7524d55 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5381,6 +5381,7 @@ static void test_create_img_elem(IHTMLDocument2 *doc) #define test_doc_selection_type(a,b) _test_doc_selection_type(__LINE__,a,b) static void _test_doc_selection_type(unsigned line, IHTMLDocument2 *doc, const char *type) { + IHTMLSelectionObject2 *selection2; IHTMLSelectionObject *selection; BSTR str; HRESULT hres; @@ -5393,7 +5394,17 @@ static void _test_doc_selection_type(unsigned line, IHTMLDocument2 *doc, const c ok_(__FILE__,line)(!strcmp_wa(str, type), "type = %s, expected %s\n", wine_dbgstr_w(str), type); SysFreeString(str); + hres = IHTMLSelectionObject_QueryInterface(selection, &IID_IHTMLSelectionObject2, (void**)&selection2); + ok_(__FILE__,line)(hres == S_OK, "Could not get IHTMLSelectionObject2 iface: %08x\n", hres); + IHTMLSelectionObject_Release(selection); + + hres = IHTMLSelectionObject2_get_typeDetail(selection2, &str); + ok_(__FILE__,line)(hres == S_OK, "get_typeDetail failed: %08x\n", hres); + ok_(__FILE__,line)(!strcmp_wa(str, "undefined"), "typeDetail = %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + + IHTMLSelectionObject2_Release(selection2); } #define insert_adjacent_elem(a,b,c) _insert_adjacent_elem(__LINE__,a,b,c)
1
0
0
0
Jacek Caban : mshtml/tests: Added text selection type tests.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: f5f4765aab12f24a72e1cf28149b7955e19b95c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5f4765aab12f24a72e1cf281…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jan 25 18:12:45 2017 +0100 mshtml/tests: Added text selection type tests. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/dom.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 8e8a662..e784189 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5378,6 +5378,24 @@ static void test_create_img_elem(IHTMLDocument2 *doc) } } +#define test_doc_selection_type(a,b) _test_doc_selection_type(__LINE__,a,b) +static void _test_doc_selection_type(unsigned line, IHTMLDocument2 *doc, const char *type) +{ + IHTMLSelectionObject *selection; + BSTR str; + HRESULT hres; + + hres = IHTMLDocument2_get_selection(doc, &selection); + ok_(__FILE__,line)(hres == S_OK, "get_selection failed: %08x\n", hres); + + hres = IHTMLSelectionObject_get_type(selection, &str); + ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres); + ok_(__FILE__,line)(!strcmp_wa(str, type), "type = %s, expected %s\n", wine_dbgstr_w(str), type); + SysFreeString(str); + + IHTMLSelectionObject_Release(selection); +} + #define insert_adjacent_elem(a,b,c) _insert_adjacent_elem(__LINE__,a,b,c) static void _insert_adjacent_elem(unsigned line, IHTMLElement *parent, const char *where, IHTMLElement *elem) { @@ -5702,6 +5720,11 @@ static void test_txtrange(IHTMLDocument2 *doc) test_range_set_end_point(range, "xxx", body_range, E_INVALIDARG); + hres = IHTMLTxtRange_select(range); + ok(hres == S_OK, "select failed: %08x\n", hres); + + test_doc_selection_type(doc, "Text"); + IHTMLTxtRange_Release(range); IHTMLTxtRange_Release(range2); IHTMLTxtRange_Release(body_range); @@ -6281,17 +6304,13 @@ static void test_default_selection(IHTMLDocument2 *doc) IHTMLSelectionObject *selection; IHTMLTxtRange *range; IDispatch *disp; - BSTR str; HRESULT hres; + test_doc_selection_type(doc, "None"); + hres = IHTMLDocument2_get_selection(doc, &selection); ok(hres == S_OK, "get_selection failed: %08x\n", hres); - hres = IHTMLSelectionObject_get_type(selection, &str); - ok(hres == S_OK, "get_type failed: %08x\n", hres); - ok(!strcmp_wa(str, "None"), "type = %s\n", wine_dbgstr_w(str)); - SysFreeString(str); - hres = IHTMLSelectionObject_createRange(selection, &disp); IHTMLSelectionObject_Release(selection); ok(hres == S_OK, "createRange failed: %08x\n", hres);
1
0
0
0
Bruno Jesus : maintainers: Add network section.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: af8e6ee6163554a61f5678dea1fec3e990c86705 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af8e6ee6163554a61f5678dea…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Wed Jan 25 15:08:40 2017 -0200 maintainers: Add network section. Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cec6cdb..46e4273 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -159,6 +159,11 @@ Netstat M: André Hentschel <nerv(a)dawncrow.de> F: programs/netstat/ +Network +P: Bruno Jesus <00cpxxx(a)gmail.com> +F: dlls/iphlpapi/ +F: dlls/ws2_32/ + OLE Embedding M: Huw Davies <huw(a)codeweavers.com> F: dlls/ole32/clipboard.c
1
0
0
0
Aric Stewart : usp10: Implement Chaining Context Substitution Format 2: Class-based Chaining Context Glyph Substitution.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: aae5a831e2e76e39b76464ba921dded7c2fbf9e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aae5a831e2e76e39b76464ba9…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jan 25 07:17:38 2017 -0600 usp10: Implement Chaining Context Substitution Format 2: Class-based Chaining Context Glyph Substitution. Used by the font Noto Nastaliq Urdu. Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 155 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 151 insertions(+), 4 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 90df479..d2eb749 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -290,6 +290,41 @@ typedef struct{ }GSUB_ChainContextSubstFormat1; typedef struct { + WORD SubstFormat; /* = 2 */ + WORD Coverage; + WORD BacktrackClassDef; + WORD InputClassDef; + WORD LookaheadClassDef; + WORD ChainSubClassSetCnt; + WORD ChainSubClassSet[1]; +}GSUB_ChainContextSubstFormat2; + +typedef struct { + WORD ChainSubClassRuleCnt; + WORD ChainSubClassRule[1]; +}GSUB_ChainSubClassSet; + +typedef struct { + WORD BacktrackGlyphCount; + WORD Backtrack[1]; +}GSUB_ChainSubClassRule_1; + +typedef struct { + WORD InputGlyphCount; + WORD Input[1]; +}GSUB_ChainSubClassRule_2; + +typedef struct { + WORD LookaheadGlyphCount; + WORD LookAhead[1]; +}GSUB_ChainSubClassRule_3; + +typedef struct { + WORD SubstCount; + GSUB_SubstLookupRecord SubstLookupRecord[1]; +}GSUB_ChainSubClassRule_4; + +typedef struct { WORD SubstFormat; /* = 3 */ WORD BacktrackGlyphCount; WORD Coverage[1]; @@ -1175,10 +1210,122 @@ static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_Lo } else if (GET_BE_WORD(ccsf1->SubstFormat) == 2) { - static int once; - if (!once++) - FIXME(" TODO: subtype 2 (Class-based Chaining Context Glyph Substitution)\n"); - continue; + int newIndex = glyph_index; + WORD offset, count; + const void *backtrack_class_table; + const void *input_class_table; + const void *lookahead_class_table; + int i; + WORD class; + + const GSUB_ChainContextSubstFormat2 *ccsf2 = (const GSUB_ChainContextSubstFormat2*)ccsf1; + const GSUB_ChainSubClassSet *csc; + + TRACE(" subtype 2 (Class-based Chaining Context Glyph Substitution)\n"); + + offset = GET_BE_WORD(ccsf2->Coverage); + + if (GSUB_is_glyph_covered((const BYTE*)ccsf2+offset, glyphs[glyph_index]) == -1) + { + TRACE("Glyph not covered\n"); + continue; + } + offset = GET_BE_WORD(ccsf2->BacktrackClassDef); + backtrack_class_table = (const BYTE*)ccsf2+offset; + offset = GET_BE_WORD(ccsf2->InputClassDef); + input_class_table = (const BYTE*)ccsf2+offset; + offset = GET_BE_WORD(ccsf2->LookaheadClassDef); + lookahead_class_table = (const BYTE*)ccsf2+offset; + count = GET_BE_WORD(ccsf2->ChainSubClassSetCnt); + + class = OT_get_glyph_class(input_class_table, glyphs[glyph_index]); + offset = GET_BE_WORD(ccsf2->ChainSubClassSet[class]); + + if (offset == 0) + { + TRACE("No rules for class\n"); + continue; + } + + csc = (const GSUB_ChainSubClassSet*)((BYTE*)ccsf2+offset); + count = GET_BE_WORD(csc->ChainSubClassRuleCnt); + + TRACE("%i rules to check\n",count); + + for (i = 0; i < count; i++) + { + int k; + int indexGlyphs; + const GSUB_ChainSubClassRule_1 *cscr_1; + const GSUB_ChainSubClassRule_2 *cscr_2; + const GSUB_ChainSubClassRule_3 *cscr_3; + const GSUB_ChainSubClassRule_4 *cscr_4; + + offset = GET_BE_WORD(csc->ChainSubClassRule[i]); + cscr_1 = (const GSUB_ChainSubClassRule_1*)((BYTE*)csc+offset); + + for (k = 0; k < GET_BE_WORD(cscr_1->BacktrackGlyphCount); k++) + { + WORD target_class = GET_BE_WORD(cscr_1->Backtrack[k]); + WORD glyph_class = OT_get_glyph_class(backtrack_class_table, glyphs[glyph_index + (dirBacktrack * (k+1))]); + if (target_class != glyph_class) + break; + } + if (k != GET_BE_WORD(cscr_1->BacktrackGlyphCount)) + continue; + TRACE("Matched Backtrack\n"); + + cscr_2 = (const GSUB_ChainSubClassRule_2*)((BYTE *)cscr_1 + + FIELD_OFFSET(GSUB_ChainSubClassRule_1, Backtrack[GET_BE_WORD(cscr_1->BacktrackGlyphCount)])); + + indexGlyphs = GET_BE_WORD(cscr_2->InputGlyphCount); + for (k = 0; k < indexGlyphs - 1; k++) + { + WORD target_class = GET_BE_WORD(cscr_2->Input[k]); + WORD glyph_class = OT_get_glyph_class(input_class_table, glyphs[glyph_index + (write_dir * (k+1))]); + if (target_class != glyph_class) + break; + } + if (k != indexGlyphs-1) + continue; + TRACE("Matched IndexGlyphs\n"); + + cscr_3 = (const GSUB_ChainSubClassRule_3*)((BYTE *)cscr_2 + + FIELD_OFFSET(GSUB_ChainSubClassRule_2, Input[GET_BE_WORD(cscr_2->InputGlyphCount)-1])); + + for (k = 0; k < GET_BE_WORD(cscr_3->LookaheadGlyphCount); k++) + { + WORD target_class = GET_BE_WORD(cscr_3->LookAhead[k]); + WORD glyph_class = OT_get_glyph_class(lookahead_class_table, glyphs[glyph_index + (dirLookahead * (indexGlyphs+k))]); + if (target_class != glyph_class) + break; + } + if (k != GET_BE_WORD(cscr_3->LookaheadGlyphCount)) + continue; + TRACE("Matched LookAhead\n"); + + cscr_4 = (const GSUB_ChainSubClassRule_4*)((BYTE *)cscr_3 + + FIELD_OFFSET(GSUB_ChainSubClassRule_3, LookAhead[GET_BE_WORD(cscr_3->LookaheadGlyphCount)])); + + if (GET_BE_WORD(cscr_4->SubstCount)) + { + for (k = 0; k < GET_BE_WORD(cscr_4->SubstCount); k++) + { + int lookupIndex = GET_BE_WORD(cscr_4->SubstLookupRecord[k].LookupListIndex); + int SequenceIndex = GET_BE_WORD(cscr_4->SubstLookupRecord[k].SequenceIndex) * write_dir; + + TRACE("SUBST: %i -> %i %i\n",k, SequenceIndex, lookupIndex); + newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); + if (newIndex == -1) + { + ERR("Chain failed to generate a glyph\n"); + continue; + } + } + return newIndex; + } + else return GSUB_E_NOGLYPH; + } } else if (GET_BE_WORD(ccsf1->SubstFormat) == 3) {
1
0
0
0
Aric Stewart : usp10: Implement Contextual Positioning Subtable: Format 2.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: b98a70aa40b1ce8dddbfbcfce5bc0a49117a749d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b98a70aa40b1ce8dddbfbcfce…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jan 25 07:16:29 2017 -0600 usp10: Implement Contextual Positioning Subtable: Format 2. Used by the font Noto Nastaliq Urdu. Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 29ec503..90df479 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -511,6 +511,29 @@ typedef struct { typedef struct { WORD PosFormat; + WORD Coverage; + WORD ClassDef; + WORD PosClassSetCnt; + WORD PosClassSet[1]; +} GPOS_ContextPosFormat2; + +typedef struct { + WORD PosClassRuleCnt; + WORD PosClassRule[1]; +} GPOS_PosClassSet; + +typedef struct { + WORD GlyphCount; + WORD PosCount; + WORD Class[1]; +} GPOS_PosClassRule_1; + +typedef struct { + GPOS_PosLookupRecord PosLookupRecord[1]; +} GPOS_PosClassRule_2; + +typedef struct { + WORD PosFormat; WORD BacktrackGlyphCount; WORD Coverage[1]; } GPOS_ChainContextPosFormat3_1; @@ -1869,6 +1892,109 @@ static BOOL GPOS_apply_MarkToMark(const OT_LookupTable *look, const SCRIPT_ANALY return rc; } +static INT GPOS_apply_ContextPos(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, const SCRIPT_ANALYSIS *analysis, INT* piAdvance, + const OT_LookupList *lookup, const OT_LookupTable *look, const WORD *glyphs, INT glyph_index, + INT glyph_count, INT ppem, GOFFSET *pGoffset) +{ + int j; + int write_dir = (analysis->fRTL && !analysis->fLogicalOrder) ? -1 : 1; + + TRACE("Contextual Positioning Subtable\n"); + + for (j = 0; j < GET_BE_WORD(look->SubTableCount); j++) + { + const GPOS_ContextPosFormat2 *cpf2 = (GPOS_ContextPosFormat2*)GPOS_get_subtable(look, j); + + if (GET_BE_WORD(cpf2->PosFormat) == 1) + { + static int once; + if (!once++) + FIXME(" TODO: subtype 1\n"); + continue; + } + else if (GET_BE_WORD(cpf2->PosFormat) == 2) + { + WORD offset = GET_BE_WORD(cpf2->Coverage); + int index; + + TRACE("Contextual Positioning Subtable: Format 2\n"); + + index = GSUB_is_glyph_covered((const BYTE*)cpf2+offset, glyphs[glyph_index]); + TRACE("Coverage index %i\n",index); + if (index != -1) + { + int k, count, class; + const GPOS_PosClassSet *pcs; + const void *glyph_class_table = NULL; + + offset = GET_BE_WORD(cpf2->ClassDef); + glyph_class_table = (const BYTE *)cpf2 + offset; + + class = OT_get_glyph_class(glyph_class_table,glyphs[glyph_index]); + + offset = GET_BE_WORD(cpf2->PosClassSet[class]); + if (offset == 0) + { + TRACE("No class rule table for class %i\n",class); + continue; + } + pcs = (const GPOS_PosClassSet*)((const BYTE*)cpf2+offset); + count = GET_BE_WORD(pcs->PosClassRuleCnt); + TRACE("PosClassSet has %i members\n",count); + for (k = 0; k < count; k++) + { + const GPOS_PosClassRule_1 *pr; + const GPOS_PosClassRule_2 *pr_2; + int g_count, l; + + offset = GET_BE_WORD(pcs->PosClassRule[k]); + pr = (const GPOS_PosClassRule_1*)((const BYTE*)pcs+offset); + g_count = GET_BE_WORD(pr->GlyphCount); + TRACE("PosClassRule has %i glyphs classes\n",g_count); + for (l = 0; l < g_count-1; l++) + { + int g_class = OT_get_glyph_class(glyph_class_table, glyphs[glyph_index + (write_dir * (l+1))]); + if (g_class != GET_BE_WORD(pr->Class[l])) break; + } + + if (l < g_count-1) + { + TRACE("Rule does not match\n"); + continue; + } + + TRACE("Rule matches\n"); + pr_2 = (const GPOS_PosClassRule_2*)((const BYTE*)pr+ + FIELD_OFFSET(GPOS_PosClassRule_1, Class[g_count-1])); + + for (l = 0; l < GET_BE_WORD(pr->PosCount); l++) + { + int lookupIndex = GET_BE_WORD(pr_2->PosLookupRecord[l].LookupListIndex); + int SequenceIndex = GET_BE_WORD(pr_2->PosLookupRecord[l].SequenceIndex) * write_dir; + + TRACE("Position: %i -> %i %i\n",l, SequenceIndex, lookupIndex); + GPOS_apply_lookup(psc, lpotm, lplogfont, analysis, piAdvance, lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, glyph_count, pGoffset); + } + return glyph_index + 1; + } + } + + TRACE("Not covered\n"); + continue; + } + else if (GET_BE_WORD(cpf2->PosFormat) == 3) + { + static int once; + if (!once++) + FIXME(" TODO: subtype 3\n"); + continue; + } + else + FIXME("Unhandled Contextual Positioning Format %i\n",GET_BE_WORD(cpf2->PosFormat)); + } + return glyph_index + 1; +} + static INT GPOS_apply_ChainContextPos(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, const SCRIPT_ANALYSIS *analysis, INT* piAdvance, const OT_LookupList *lookup, const OT_LookupTable *look, const WORD *glyphs, INT glyph_index, INT glyph_count, INT ppem, GOFFSET *pGoffset) @@ -2117,6 +2243,8 @@ static INT GPOS_apply_lookup(ScriptCache *psc, LPOUTLINETEXTMETRICW lpotm, LPLOG } break; } + case 7: + return GPOS_apply_ContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset); case 8: { return GPOS_apply_ChainContextPos(psc, lpotm, lplogfont, analysis, piAdvance, lookup, look, glyphs, glyph_index, glyph_count, ppem, pGoffset);
1
0
0
0
Aric Stewart : usp10: Implement GSUB Context Substitution types 1 and 2.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: 5e6b2c0ed6c57fa98d1d6003bf234bebe049a34a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e6b2c0ed6c57fa98d1d6003b…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jan 25 07:14:52 2017 -0600 usp10: Implement GSUB Context Substitution types 1 and 2. Used by the font Noto Nastaliq Urdu. Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index d7afbe1..29ec503 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -238,6 +238,51 @@ typedef struct{ }GSUB_SubstLookupRecord; typedef struct{ + WORD SubstFormat; + WORD Coverage; + WORD SubRuleSetCount; + WORD SubRuleSet[1]; +}GSUB_ContextSubstFormat1; + +typedef struct{ + WORD SubRuleCount; + WORD SubRule[1]; +}GSUB_SubRuleSet; + +typedef struct { + WORD GlyphCount; + WORD SubstCount; + WORD Input[1]; +}GSUB_SubRule_1; + +typedef struct { + GSUB_SubstLookupRecord SubstLookupRecord[1]; +}GSUB_SubRule_2; + +typedef struct { + WORD SubstFormat; + WORD Coverage; + WORD ClassDef; + WORD SubClassSetCnt; + WORD SubClassSet[1]; +}GSUB_ContextSubstFormat2; + +typedef struct { + WORD SubClassRuleCnt; + WORD SubClassRule[1]; +}GSUB_SubClassSet; + +typedef struct { + WORD GlyphCount; + WORD SubstCount; + WORD Class[1]; +}GSUB_SubClassRule_1; + +typedef struct { + GSUB_SubstLookupRecord SubstLookupRecord[1]; +}GSUB_SubClassRule_2; + +typedef struct{ WORD SubstFormat; /* = 1 */ WORD Coverage; WORD ChainSubRuleSetCount; @@ -940,6 +985,151 @@ static INT GSUB_apply_LigatureSubst(const OT_LookupTable *look, WORD *glyphs, IN return GSUB_E_NOGLYPH; } +static INT GSUB_apply_ContextSubst(const OT_LookupList* lookup, const OT_LookupTable *look, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) +{ + int j; + TRACE("Context Substitution Subtable\n"); + for (j = 0; j < GET_BE_WORD(look->SubTableCount); j++) + { + const GSUB_ContextSubstFormat1 *csf1; + + csf1 = (const GSUB_ContextSubstFormat1*)GSUB_get_subtable(look, j); + if (GET_BE_WORD(csf1->SubstFormat) == 1) + { + int offset, index; + TRACE("Context Substitution Subtable: Class 1\n"); + offset = GET_BE_WORD(csf1->Coverage); + index = GSUB_is_glyph_covered((const BYTE*)csf1+offset, glyphs[glyph_index]); + TRACE(" Coverage index %i\n",index); + if (index != -1) + { + int k, count; + const GSUB_SubRuleSet *srs; + offset = GET_BE_WORD(csf1->SubRuleSet[index]); + srs = (const GSUB_SubRuleSet*)((const BYTE*)csf1+offset); + count = GET_BE_WORD(srs->SubRuleCount); + TRACE(" SubRuleSet has %i members\n",count); + for (k = 0; k < count; k++) + { + const GSUB_SubRule_1 *sr; + const GSUB_SubRule_2 *sr_2; + int g_count, l; + int newIndex = glyph_index; + + offset = GET_BE_WORD(srs->SubRule[k]); + sr = (const GSUB_SubRule_1*)((const BYTE*)srs+offset); + g_count = GET_BE_WORD(sr->GlyphCount); + TRACE(" SubRule has %i glyphs\n",g_count); + for (l = 0; l < g_count-1; l++) + if (glyphs[glyph_index + (write_dir * (l+1))] != GET_BE_WORD(sr->Input[l])) break; + + if (l < g_count-1) + { + TRACE(" Rule does not match\n"); + continue; + } + + TRACE(" Rule matches\n"); + sr_2 = (const GSUB_SubRule_2*)((const BYTE*)sr+ + FIELD_OFFSET(GSUB_SubRule_1, Input[g_count-1])); + + for (l = 0; l < GET_BE_WORD(sr->SubstCount); l++) + { + int lookupIndex = GET_BE_WORD(sr_2->SubstLookupRecord[l].LookupListIndex); + int SequenceIndex = GET_BE_WORD(sr_2->SubstLookupRecord[l].SequenceIndex) * write_dir; + + TRACE(" SUBST: %i -> %i %i\n",l, SequenceIndex, lookupIndex); + newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); + if (newIndex == -1) + { + ERR(" Chain failed to generate a glyph\n"); + continue; + } + } + return newIndex; + } + } + } + else if (GET_BE_WORD(csf1->SubstFormat) == 2) + { + const GSUB_ContextSubstFormat2 *csf2; + const void *glyph_class_table; + int offset, index; + + csf2 = (const GSUB_ContextSubstFormat2*)csf1; + TRACE("Context Substitution Subtable: Class 2\n"); + offset = GET_BE_WORD(csf2->Coverage); + index = GSUB_is_glyph_covered((const BYTE*)csf2+offset, glyphs[glyph_index]); + TRACE(" Coverage index %i\n",index); + if (index != -1) + { + int k, count, class; + const GSUB_SubClassSet *scs; + + offset = GET_BE_WORD(csf2->ClassDef); + glyph_class_table = (const BYTE *)csf2 + offset; + + class = OT_get_glyph_class(glyph_class_table,glyphs[glyph_index]); + + offset = GET_BE_WORD(csf2->SubClassSet[class]); + if (offset == 0) + { + TRACE(" No class rule table for class %i\n",class); + continue; + } + scs = (const GSUB_SubClassSet*)((const BYTE*)csf2+offset); + count = GET_BE_WORD(scs->SubClassRuleCnt); + TRACE(" SubClassSet has %i members\n",count); + for (k = 0; k < count; k++) + { + const GSUB_SubClassRule_1 *sr; + const GSUB_SubClassRule_2 *sr_2; + int g_count, l; + int newIndex = glyph_index; + + offset = GET_BE_WORD(scs->SubClassRule[k]); + sr = (const GSUB_SubClassRule_1*)((const BYTE*)scs+offset); + g_count = GET_BE_WORD(sr->GlyphCount); + TRACE(" SubClassRule has %i glyphs classes\n",g_count); + for (l = 0; l < g_count-1; l++) + { + int g_class = OT_get_glyph_class(glyph_class_table, glyphs[glyph_index + (write_dir * (l+1))]); + if (g_class != GET_BE_WORD(sr->Class[l])) break; + } + + if (l < g_count-1) + { + TRACE(" Rule does not match\n"); + continue; + } + + TRACE(" Rule matches\n"); + sr_2 = (const GSUB_SubClassRule_2*)((const BYTE*)sr+ + FIELD_OFFSET(GSUB_SubClassRule_1, Class[g_count-1])); + + for (l = 0; l < GET_BE_WORD(sr->SubstCount); l++) + { + int lookupIndex = GET_BE_WORD(sr_2->SubstLookupRecord[l].LookupListIndex); + int SequenceIndex = GET_BE_WORD(sr_2->SubstLookupRecord[l].SequenceIndex) * write_dir; + + TRACE(" SUBST: %i -> %i %i\n",l, SequenceIndex, lookupIndex); + newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); + if (newIndex == -1) + { + ERR(" Chain failed to generate a glyph\n"); + continue; + } + } + return newIndex; + } + } + } + else + FIXME("Unhandled Context Substitution Format %i\n", GET_BE_WORD(csf1->SubstFormat)); + } + return GSUB_E_NOGLYPH; +} + static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_LookupTable *look, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) { int j; @@ -1084,6 +1274,8 @@ static INT GSUB_apply_lookup(const OT_LookupList* lookup, INT lookup_index, WORD return GSUB_apply_AlternateSubst(look, glyphs, glyph_index, write_dir, glyph_count); case 4: return GSUB_apply_LigatureSubst(look, glyphs, glyph_index, write_dir, glyph_count); + case 5: + return GSUB_apply_ContextSubst(lookup, look, glyphs, glyph_index, write_dir, glyph_count); case 6: return GSUB_apply_ChainContextSubst(lookup, look, glyphs, glyph_index, write_dir, glyph_count); case 7:
1
0
0
0
Andrew Eikum : kernel32: Don' t care about case when finding matching locale.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: 72b9acd94bc891b993b69730d6ceb3878342dcad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72b9acd94bc891b993b69730d…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Jan 24 14:44:11 2017 -0600 kernel32: Don't care about case when finding matching locale. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 6 +++--- dlls/kernel32/tests/locale.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 2bf1024..ca59751 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -390,7 +390,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type, GetLocaleInfoW( lcid, LOCALE_SNAME | LOCALE_NOUSEROVERRIDE, buffer, sizeof(buffer)/sizeof(WCHAR) )) { - if (!strcmpW( data->win_name, buffer )) + if (!strcmpiW( data->win_name, buffer )) { matches = 4; /* everything matches */ goto done; @@ -400,7 +400,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type, if (!GetLocaleInfoW( lcid, LOCALE_SISO639LANGNAME | LOCALE_NOUSEROVERRIDE, buffer, sizeof(buffer)/sizeof(WCHAR) )) return TRUE; - if (strcmpW( buffer, data->lang )) return TRUE; + if (strcmpiW( buffer, data->lang )) return TRUE; matches++; /* language name matched */ if (data->country) @@ -408,7 +408,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type, if (GetLocaleInfoW( lcid, LOCALE_SISO3166CTRYNAME|LOCALE_NOUSEROVERRIDE, buffer, sizeof(buffer)/sizeof(WCHAR) )) { - if (strcmpW( buffer, data->country )) goto done; + if (strcmpiW( buffer, data->country )) goto done; matches++; /* country name matched */ } } diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 1bac846..05564c4 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -2704,6 +2704,7 @@ static void test_LocaleNameToLCID(void) INT ret; WCHAR buffer[LOCALE_NAME_MAX_LENGTH]; static const WCHAR enW[] = {'e','n',0}; + static const WCHAR esesW[] = {'e','s','-','e','s',0}; if (!pLocaleNameToLCID) { @@ -2744,6 +2745,10 @@ static void test_LocaleNameToLCID(void) ok(!lcid && GetLastError() == ERROR_INVALID_PARAMETER, "Expected lcid == 0, got %08x, error %d\n", lcid, GetLastError()); + /* lower-case */ + lcid = pLocaleNameToLCID(esesW, 0); + ok(lcid == MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT), "Got wrong lcid for es-es: 0x%x\n", lcid); + /* english neutral name */ lcid = pLocaleNameToLCID(enW, 0); ok(lcid == MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) ||
1
0
0
0
Andrew Eikum : kernel32/tests: Test result from LCIDToLocaleName.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: 3da1616e840fc3e4848662ac1bf2ab34ca9d0185 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3da1616e840fc3e4848662ac1…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Jan 24 14:44:05 2017 -0600 kernel32/tests: Test result from LCIDToLocaleName. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/locale.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 7cbaafa..1bac846 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -2675,25 +2675,26 @@ static void test_LCMapStringEx(void) struct neutralsublang_name_t { WCHAR name[3]; + WCHAR sname[16]; LCID lcid; int todo; }; static const struct neutralsublang_name_t neutralsublang_names[] = { - { {'a','r',0}, MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_SAUDI_ARABIA), SORT_DEFAULT) }, - { {'a','z',0}, MAKELCID(MAKELANGID(LANG_AZERI, SUBLANG_AZERI_LATIN), SORT_DEFAULT) }, - { {'d','e',0}, MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) }, - { {'e','n',0}, MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) }, - { {'e','s',0}, MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT) }, - { {'g','a',0}, MAKELCID(MAKELANGID(LANG_IRISH, SUBLANG_IRISH_IRELAND), SORT_DEFAULT) }, - { {'i','t',0}, MAKELCID(MAKELANGID(LANG_ITALIAN, SUBLANG_ITALIAN), SORT_DEFAULT) }, - { {'m','s',0}, MAKELCID(MAKELANGID(LANG_MALAY, SUBLANG_MALAY_MALAYSIA), SORT_DEFAULT) }, - { {'n','l',0}, MAKELCID(MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH), SORT_DEFAULT) }, - { {'p','t',0}, MAKELCID(MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN), SORT_DEFAULT) }, - { {'s','r',0}, MAKELCID(MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN), SORT_DEFAULT), 1 }, - { {'s','v',0}, MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) }, - { {'u','z',0}, MAKELCID(MAKELANGID(LANG_UZBEK, SUBLANG_UZBEK_LATIN), SORT_DEFAULT) }, - { {'z','h',0}, MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT) }, + { {'a','r',0}, {'a','r','-','S','A',0}, MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_SAUDI_ARABIA), SORT_DEFAULT) }, + { {'a','z',0}, {'a','z','-','L','a','t','n','-','A','Z',0}, MAKELCID(MAKELANGID(LANG_AZERI, SUBLANG_AZERI_LATIN), SORT_DEFAULT) }, + { {'d','e',0}, {'d','e','-','D','E',0}, MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) }, + { {'e','n',0}, {'e','n','-','U','S',0}, MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) }, + { {'e','s',0}, {'e','s','-','E','S',0}, MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT) }, + { {'g','a',0}, {'g','a','-','I','E',0}, MAKELCID(MAKELANGID(LANG_IRISH, SUBLANG_IRISH_IRELAND), SORT_DEFAULT) }, + { {'i','t',0}, {'i','t','-','I','T',0}, MAKELCID(MAKELANGID(LANG_ITALIAN, SUBLANG_ITALIAN), SORT_DEFAULT) }, + { {'m','s',0}, {'m','s','-','M','Y',0}, MAKELCID(MAKELANGID(LANG_MALAY, SUBLANG_MALAY_MALAYSIA), SORT_DEFAULT) }, + { {'n','l',0}, {'n','l','-','N','L',0}, MAKELCID(MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH), SORT_DEFAULT) }, + { {'p','t',0}, {'p','t','-','B','R',0}, MAKELCID(MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN), SORT_DEFAULT) }, + { {'s','r',0}, {'s','r','-','L','a','t','n','-','R','S',0}, MAKELCID(MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN), SORT_DEFAULT), 1 }, + { {'s','v',0}, {'s','v','-','S','E',0}, MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) }, + { {'u','z',0}, {'u','z','-','L','a','t','n','-','U','Z',0}, MAKELCID(MAKELANGID(LANG_UZBEK, SUBLANG_UZBEK_LATIN), SORT_DEFAULT) }, + { {'z','h',0}, {'z','h','-','C','N',0}, MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT) }, { {0} } }; @@ -2761,7 +2762,7 @@ static void test_LocaleNameToLCID(void) *buffer = 0; ret = pLCIDToLocaleName(lcid, buffer, sizeof(buffer)/sizeof(WCHAR), 0); ok(ret > 0, "%s: got %d\n", wine_dbgstr_w(ptr->name), ret); - ok(lstrcmpW(ptr->name, buffer), "%s: got wrong locale name %s\n", + ok(!lstrcmpW(ptr->sname, buffer), "%s: got wrong locale name %s\n", wine_dbgstr_w(ptr->name), wine_dbgstr_w(buffer)); ptr++;
1
0
0
0
Andrew Eikum : kernel32: Use different default sublangs for Spanish and Chinese.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: 7737693693ca46a88c41cfeab95d2b65423d8e51 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7737693693ca46a88c41cfeab…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Jan 24 14:43:53 2017 -0600 kernel32: Use different default sublangs for Spanish and Chinese. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 20 ++++++++++++++++---- dlls/kernel32/nls/esn.nls | 2 +- dlls/kernel32/nls/esp.nls | 2 +- dlls/kernel32/tests/locale.c | 8 ++++---- dlls/msvcr120/tests/msvcr120.c | 8 +++----- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 9b3a957..2bf1024 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -359,6 +359,18 @@ static UINT find_charset( const WCHAR *name ) return 0; } +static WORD get_default_sublang(LCID lang) +{ + switch (PRIMARYLANGID(lang)) + { + case LANG_SPANISH: + return SUBLANG_SPANISH_MODERN; + case LANG_CHINESE: + return SUBLANG_CHINESE_SIMPLIFIED; + default: + return SUBLANG_DEFAULT; + } +} /*********************************************************************** * find_locale_id_callback @@ -402,7 +414,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type, } else /* match default language */ { - if (SUBLANGID(LangID) == SUBLANG_DEFAULT) matches++; + if (SUBLANGID(LangID) == get_default_sublang( LangID )) matches++; } if (data->codepage) @@ -1671,7 +1683,7 @@ INT WINAPI GetLocaleInfoW( LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len ) /* replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT */ if (SUBLANGID(lang_id) == SUBLANG_NEUTRAL) - lang_id = MAKELANGID(PRIMARYLANGID(lang_id), SUBLANG_DEFAULT); + lang_id = MAKELANGID(PRIMARYLANGID(lang_id), get_default_sublang( lang_id )); if (!(hrsrc = FindResourceExW( kernel32_handle, (LPWSTR)RT_STRING, ULongToPtr((lctype >> 4) + 1), lang_id ))) @@ -2776,7 +2788,7 @@ LCID WINAPI ConvertDefaultLocale( LCID lcid ) langid = LANGIDFROMLCID(lcid); if (SUBLANGID(langid) == SUBLANG_NEUTRAL) { - langid = MAKELANGID(PRIMARYLANGID(langid), SUBLANG_DEFAULT); + langid = MAKELANGID(PRIMARYLANGID(langid), get_default_sublang( langid )); lcid = MAKELCID(langid, SORTIDFROMLCID(lcid)); } } @@ -4212,7 +4224,7 @@ static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSiz langId = GetSystemDefaultLangID(); if (SUBLANGID(langId) == SUBLANG_NEUTRAL) - langId = MAKELANGID( PRIMARYLANGID(langId), SUBLANG_DEFAULT ); + langId = MAKELANGID(PRIMARYLANGID(langId), get_default_sublang( langId )); hResource = FindResourceExW( kernel32_handle, (LPWSTR)RT_STRING, szResourceName, langId ); diff --git a/dlls/kernel32/nls/esn.nls b/dlls/kernel32/nls/esn.nls index 7306c00..4108ca2 100644 --- a/dlls/kernel32/nls/esn.nls +++ b/dlls/kernel32/nls/esn.nls @@ -123,7 +123,7 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN LOCALE_SMONTHNAME12 "diciembre" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "." - LOCALE_SNAME "es-ES_modern" + LOCALE_SNAME "es-ES" LOCALE_SNATIVECTRYNAME "España" LOCALE_SNATIVECURRNAME "euro" LOCALE_SNATIVEDIGITS "0123456789" diff --git a/dlls/kernel32/nls/esp.nls b/dlls/kernel32/nls/esp.nls index 5260627..5547752 100644 --- a/dlls/kernel32/nls/esp.nls +++ b/dlls/kernel32/nls/esp.nls @@ -123,7 +123,7 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH LOCALE_SMONTHNAME12 "diciembre" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "." - LOCALE_SNAME "es-ES" + LOCALE_SNAME "es-ES_tradnl" LOCALE_SNATIVECTRYNAME "España" LOCALE_SNATIVECURRNAME "euro" LOCALE_SNATIVEDIGITS "0123456789" diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 4224c0a..7cbaafa 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -255,7 +255,7 @@ static const struct neutralsublang_name2_t neutralsublang_names2[] = { { {'e','s',0}, {'e','s','-','E','S',0}, MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT), MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH), SORT_DEFAULT) /* vista */, - {'e','s','-','E','S','_','t','r','a','d','n','l',0}, 0x1 }, + {'e','s','-','E','S','_','t','r','a','d','n','l',0} }, { {'g','a',0}, {'g','a','-','I','E',0}, MAKELCID(MAKELANGID(LANG_IRISH, SUBLANG_IRISH_IRELAND), SORT_DEFAULT), 0, {0}, 0x3 }, { {'i','t',0}, {'i','t','-','I','T',0}, @@ -273,7 +273,7 @@ static const struct neutralsublang_name2_t neutralsublang_names2[] = { { {'u','z',0}, {'u','z','-','L','a','t','n','-','U','Z',0}, MAKELCID(MAKELANGID(LANG_UZBEK, SUBLANG_UZBEK_LATIN), SORT_DEFAULT) }, { {'z','h',0}, {'z','h','-','C','N',0}, - MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT), 0, {0}, 0x3 }, + MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT) }, { {0} } }; @@ -2684,7 +2684,7 @@ static const struct neutralsublang_name_t neutralsublang_names[] = { { {'a','z',0}, MAKELCID(MAKELANGID(LANG_AZERI, SUBLANG_AZERI_LATIN), SORT_DEFAULT) }, { {'d','e',0}, MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) }, { {'e','n',0}, MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) }, - { {'e','s',0}, MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT), 1 }, + { {'e','s',0}, MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT) }, { {'g','a',0}, MAKELCID(MAKELANGID(LANG_IRISH, SUBLANG_IRISH_IRELAND), SORT_DEFAULT) }, { {'i','t',0}, MAKELCID(MAKELANGID(LANG_ITALIAN, SUBLANG_ITALIAN), SORT_DEFAULT) }, { {'m','s',0}, MAKELCID(MAKELANGID(LANG_MALAY, SUBLANG_MALAY_MALAYSIA), SORT_DEFAULT) }, @@ -2693,7 +2693,7 @@ static const struct neutralsublang_name_t neutralsublang_names[] = { { {'s','r',0}, MAKELCID(MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN), SORT_DEFAULT), 1 }, { {'s','v',0}, MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) }, { {'u','z',0}, MAKELCID(MAKELANGID(LANG_UZBEK, SUBLANG_UZBEK_LATIN), SORT_DEFAULT) }, - { {'z','h',0}, MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT), 1 }, + { {'z','h',0}, MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT) }, { {0} } }; diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index e631738..13f3672 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -453,11 +453,10 @@ static void test____lc_locale_name_func(void) const char *locale; const WCHAR name[10]; const WCHAR broken_name[10]; - BOOL todo; } tests[] = { { "American", {'e','n',0}, {'e','n','-','U','S',0} }, { "Belgian", {'n','l','-','B','E',0} }, - { "Chinese", {'z','h',0}, {'z','h','-','C','N',0}, TRUE }, + { "Chinese", {'z','h',0}, {'z','h','-','C','N',0} }, { "Dutch", {'n','l',0}, {'n','l','-','N','L',0} }, { "English", {'e','n',0}, {'e','n','-','U','S',0} }, { "French", {'f','r',0}, {'f','r','-','F','R',0} }, @@ -476,9 +475,8 @@ static void test____lc_locale_name_func(void) lc_names = p____lc_locale_name_func(); ok(lc_names[0] == NULL, "%d - lc_names[0] = %s\n", i, wine_dbgstr_w(lc_names[0])); - todo_wine_if(tests[i].todo) - ok(!lstrcmpW(lc_names[1], tests[i].name) || broken(!lstrcmpW(lc_names[1], tests[i].broken_name)), - "%d - lc_names[1] = %s\n", i, wine_dbgstr_w(lc_names[1])); + ok(!lstrcmpW(lc_names[1], tests[i].name) || broken(!lstrcmpW(lc_names[1], tests[i].broken_name)), + "%d - lc_names[1] = %s\n", i, wine_dbgstr_w(lc_names[1])); for(j=LC_MIN+2; j<=LC_MAX; j++) { ok(!lstrcmpW(lc_names[1], lc_names[j]), "%d - lc_names[%d] = %s, expected %s\n",
1
0
0
0
Francois Gouget : iphlpapi/tests: Remove an unnecessary NULL cast.
by Alexandre Julliard
25 Jan '17
25 Jan '17
Module: wine Branch: master Commit: 77f78ddbf92bd5b5785c88a041b9aedae0a50d39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77f78ddbf92bd5b5785c88a04…
Author: Francois Gouget <fgouget(a)free.fr> Date: Tue Jan 24 15:52:02 2017 +0100 iphlpapi/tests: Remove an unnecessary NULL cast. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/tests/iphlpapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 6991a39..cb73a9d 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1582,7 +1582,7 @@ static void test_AllocateAndGetTcpExTableFromStack(void) ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); ret = pAllocateAndGetTcpExTableFromStack( (void **)&table_ex, FALSE, INVALID_HANDLE_VALUE, 0, AF_INET ); ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); - ret = pAllocateAndGetTcpExTableFromStack( (void **)NULL, FALSE, GetProcessHeap(), 0, AF_INET ); + ret = pAllocateAndGetTcpExTableFromStack( NULL, FALSE, GetProcessHeap(), 0, AF_INET ); ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); }
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
50
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
Results per page:
10
25
50
100
200