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
February 2013
----- 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
459 discussions
Start a n
N
ew thread
Michael Stefaniuc : wined3d: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: 50a9fb579c592b56ec3ec0ff0a00d671cde46bf0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50a9fb579c592b56ec3ec0ff0…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Feb 5 15:49:14 2013 +0100 wined3d: Remove ERR() on HeapAlloc failure for small sizes known at compile time. --- dlls/wined3d/ati_fragment_shader.c | 4 +--- dlls/wined3d/buffer.c | 5 ----- dlls/wined3d/context.c | 3 --- dlls/wined3d/device.c | 4 +--- dlls/wined3d/directx.c | 3 --- dlls/wined3d/glsl_shader.c | 3 --- dlls/wined3d/palette.c | 3 --- dlls/wined3d/query.c | 3 --- dlls/wined3d/sampler.c | 3 --- dlls/wined3d/shader.c | 12 ------------ dlls/wined3d/shader_sm1.c | 3 --- dlls/wined3d/stateblock.c | 3 --- dlls/wined3d/surface.c | 3 --- dlls/wined3d/swapchain.c | 3 --- dlls/wined3d/texture.c | 3 --- dlls/wined3d/vertexdeclaration.c | 3 --- dlls/wined3d/view.c | 3 --- dlls/wined3d/volume.c | 1 - 18 files changed, 2 insertions(+), 63 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=50a9fb579c592b56ec3ec…
1
0
0
0
Jactry Zeng : Simplified Chinese translation for release 1.5.22
by Jeremy Newman
05 Feb '13
05 Feb '13
Module: website Branch: master Commit: 2cc67ff1bbdcd858e1fdff0e493d363693aea366 URL:
http://source.winehq.org/git/website.git/?a=commit;h=2cc67ff1bbdcd858e1fdff…
Author: Jactry Zeng <jactry92(a)gmail.com> Date: Wed Feb 6 04:21:30 2013 +0800 Simplified Chinese translation for release 1.5.22 --- news/zh-cn/2013011801.xml | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/news/zh-cn/2013011801.xml b/news/zh-cn/2013011801.xml new file mode 100644 index 0000000..d06d956 --- /dev/null +++ b/news/zh-cn/2013011801.xml @@ -0,0 +1,16 @@ +<news> +<date>一月 18, 2013</date> +<title>Wine 1.5.22 发布</title> +<body> +<p> Wine 开发版 1.5.22 现在可以使用了。</p> +<p> 本次<a href="{$root}/announce/1.5.22">更新</a>: +<ul> + <li>新的 Gecko 引擎。</li> + <li>开始 Mac 图像后端驱动的开发。</li> + <li>对 ARM64 平台的支持。</li> + <li>改进 Uniscribe 对 RTL(从右往左)文本的支持。</li> + <li>各种 bug 修复。</li> +</ul></p> +<p><p>源代码可以从<a href="
http://prdownloads.sourceforge.net/wine/wine-1.5.22.tar.bz2
">这里</a>获取。 +二进制包正在构建中,稍后将出现在各自相应的<a href="{$root}/download">下载位置</a>。 +</p></body></news>
1
0
0
0
Jactry Zeng : Simplified Chinese translation for release 1.5.23
by Jeremy Newman
05 Feb '13
05 Feb '13
Module: website Branch: master Commit: eb6ed2010e13fec23f8a7e265ca1e69d2d03abc5 URL:
http://source.winehq.org/git/website.git/?a=commit;h=eb6ed2010e13fec23f8a7e…
Author: Jactry Zeng <jactry92(a)gmail.com> Date: Wed Feb 6 03:58:21 2013 +0800 Simplified Chinese translation for release 1.5.23 --- news/zh-cn/2013020101.xml | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/news/zh-cn/2013020101.xml b/news/zh-cn/2013020101.xml new file mode 100644 index 0000000..b8965e3 --- /dev/null +++ b/news/zh-cn/2013020101.xml @@ -0,0 +1,16 @@ +<news> +<date>二月 1, 2013</date> +<title>Wine 1.5.23 发布</title> +<body> +<p> Wine 开发版 1.5.23 现在可以使用了。</p> +<p> 本次<a href="{$root}/announce/1.5.23">更新</a>: +<ul> + <li>解除 HTTPS 支持对 OpenSSL 的依赖。</li> + <li>对 Mac 后端驱动事件处理的支持。</li> + <li>一个功能性的 Netstat 内置应用。</li> + <li>一些 C++ 运行时的数学函数。</li> + <li>各种 bug 修复。</li> +</ul></p> +<p><p>源代码可以从<a href="
http://prdownloads.sourceforge.net/wine/wine-1.5.23.tar.bz2
">这里</a>获取。 +二进制包正在构建中,稍后将出现在各自相应的<a href="{$root}/download">下载位置</a>。 +</p></body></news>
1
0
0
0
Aric Stewart : usp10: Update diacritical script handling for non OpenType Itemization.
by Alexandre Julliard
05 Feb '13
05 Feb '13
Module: wine Branch: master Commit: ef4b7c5948e43d4ceeed98ba4ddbf6c222259d36 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef4b7c5948e43d4ceeed98ba4…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 5 08:57:44 2013 -0600 usp10: Update diacritical script handling for non OpenType Itemization. --- dlls/usp10/usp10.c | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index da0752d..41a7f32 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1329,8 +1329,36 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars, forceLevels = TRUE; /* Diacritical marks merge with other scripts */ - if (scripts[i] == Script_Diacritical && i > 0) - scripts[i] = scripts[i-1]; + if (scripts[i] == Script_Diacritical) + { + if (i > 0) + { + if (pScriptTags) + scripts[i] = scripts[i-1]; + else + { + int j; + BOOL asian = FALSE; + WORD first_script = scripts[i-1]; + for (j = i-1; j >= 0 && scripts[j] == first_script && pwcInChars[j] != Numeric_space; j--) + { + WORD original = scripts[j]; + if (original == Script_Ideograph || original == Script_Kana || original == Script_Yi || original == Script_CJK_Han || original == Script_Bopomofo) + { + asian = TRUE; + break; + } + if (original != Script_MathAlpha && scriptInformation[scripts[j]].props.fComplex) + break; + scripts[j] = scripts[i]; + if (original == Script_Punctuation2) + break; + } + if (scriptInformation[scripts[j]].props.fComplex || asian) + scripts[i] = scripts[j]; + } + } + } } for (i = 0; i < cInChars; i++)
1
0
0
0
Aric Stewart : usp10: Split the core Itemize function out to be able to support differences between the normal and OpenType versions .
by Alexandre Julliard
05 Feb '13
05 Feb '13
Module: wine Branch: master Commit: e70b9b1c1e0b239e9c3f76696650c7187b57570f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e70b9b1c1e0b239e9c3f76696…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 5 08:57:38 2013 -0600 usp10: Split the core Itemize function out to be able to support differences between the normal and OpenType versions. --- dlls/usp10/usp10.c | 69 +++++++++++++++++++++++++++------------------------- 1 files changed, 36 insertions(+), 33 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index fb09808..da0752d 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1270,28 +1270,11 @@ static inline WORD base_indic(WORD script) }; } -/*********************************************************************** - * ScriptItemizeOpenType (USP10.@) - * - * Split a Unicode string into shapeable parts. - * - * PARAMS - * pwcInChars [I] String to split. - * cInChars [I] Number of characters in pwcInChars. - * cMaxItems [I] Maximum number of items to return. - * psControl [I] Pointer to a SCRIPT_CONTROL structure. - * psState [I] Pointer to a SCRIPT_STATE structure. - * pItems [O] Buffer to receive SCRIPT_ITEM structures. - * pScriptTags [O] Buffer to receive OPENTYPE_TAGs. - * pcItems [O] Number of script items returned. - * - * RETURNS - * Success: S_OK - * Failure: Non-zero HRESULT value. - */ -HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int cMaxItems, - const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, - SCRIPT_ITEM *pItems, OPENTYPE_TAG *pScriptTags, int *pcItems) + +static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars, + int cMaxItems, const SCRIPT_CONTROL *psControl, + const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, + OPENTYPE_TAG *pScriptTags, int *pcItems) { #define Numeric_space 0x0020 @@ -1496,7 +1479,8 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int pItems[index].iCharPos = 0; pItems[index].a = scriptInformation[scripts[cnt]].a; - pScriptTags[index] = scriptInformation[scripts[cnt]].scriptTag; + if (pScriptTags) + pScriptTags[index] = scriptInformation[scripts[cnt]].scriptTag; if (strength && strength[cnt] == BIDI_STRONG) str = strength[cnt]; @@ -1590,7 +1574,8 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int memset(&pItems[index].a, 0, sizeof(SCRIPT_ANALYSIS)); pItems[index].a = scriptInformation[New_Script].a; - pScriptTags[index] = scriptInformation[New_Script].scriptTag; + if (pScriptTags) + pScriptTags[index] = scriptInformation[New_Script].scriptTag; if (levels) { if (levels[cnt] == 0) @@ -1633,6 +1618,32 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int } /*********************************************************************** + * ScriptItemizeOpenType (USP10.@) + * + * Split a Unicode string into shapeable parts. + * + * PARAMS + * pwcInChars [I] String to split. + * cInChars [I] Number of characters in pwcInChars. + * cMaxItems [I] Maximum number of items to return. + * psControl [I] Pointer to a SCRIPT_CONTROL structure. + * psState [I] Pointer to a SCRIPT_STATE structure. + * pItems [O] Buffer to receive SCRIPT_ITEM structures. + * pScriptTags [O] Buffer to receive OPENTYPE_TAGs. + * pcItems [O] Number of script items returned. + * + * RETURNS + * Success: S_OK + * Failure: Non-zero HRESULT value. + */ +HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int cMaxItems, + const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, + SCRIPT_ITEM *pItems, OPENTYPE_TAG *pScriptTags, int *pcItems) +{ + return _ItemizeInternal(pwcInChars, cInChars, cMaxItems, psControl, psState, pItems, pScriptTags, pcItems); +} + +/*********************************************************************** * ScriptItemize (USP10.@) * * Split a Unicode string into shapeable parts. @@ -1654,15 +1665,7 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, int *pcItems) { - OPENTYPE_TAG *discarded_tags; - HRESULT res; - - discarded_tags = heap_alloc(cMaxItems * sizeof(OPENTYPE_TAG)); - if (!discarded_tags) - return E_OUTOFMEMORY; - res = ScriptItemizeOpenType(pwcInChars, cInChars, cMaxItems, psControl, psState, pItems, discarded_tags, pcItems); - heap_free(discarded_tags); - return res; + return _ItemizeInternal(pwcInChars, cInChars, cMaxItems, psControl, psState, pItems, NULL, pcItems); } static inline int getGivenTabWidth(ScriptCache *psc, SCRIPT_TABDEF *pTabdef, int charPos, int current_x)
1
0
0
0
Aric Stewart : usp10: Fix typo with Script_Khmer_Numeric.
by Alexandre Julliard
05 Feb '13
05 Feb '13
Module: wine Branch: master Commit: 8077975e70843f43b788c58412e58534b0d269a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8077975e70843f43b788c5841…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 5 08:56:47 2013 -0600 usp10: Fix typo with Script_Khmer_Numeric. --- dlls/usp10/usp10.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index e2e72fc..fb09808 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -513,7 +513,7 @@ const scriptData scriptInformation[] = { {0x53, 0, 1, 1, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 1, 0, 0, 0, 0}, MS_MAKE_TAG('k','h','m','r'), {'D','a','u','n','P','e','n','h'}}, - {{Script_Khmer, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, + {{Script_Khmer_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0x53, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('k','h','m','r'), {'D','a','u','n','P','e','n','h'}},
1
0
0
0
Huw Davies : riched20: Move the text to the paragraph level.
by Alexandre Julliard
05 Feb '13
05 Feb '13
Module: wine Branch: master Commit: 5168d66be7367473c1819c010bf7037e01a45f09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5168d66be7367473c1819c010…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Feb 5 13:19:41 2013 +0000 riched20: Move the text to the paragraph level. --- dlls/riched20/caret.c | 2 +- dlls/riched20/editor.h | 12 +++++++----- dlls/riched20/editstr.h | 2 +- dlls/riched20/list.c | 4 +++- dlls/riched20/para.c | 23 +++++++++++++++-------- dlls/riched20/run.c | 14 +++++++------- dlls/riched20/string.c | 39 +++++++++++++++++++++------------------ dlls/riched20/undo.c | 6 +++--- 8 files changed, 58 insertions(+), 44 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5168d66be7367473c1819…
1
0
0
0
Huw Davies : riched20: Pass character ptrs to the whitespace finding functions.
by Alexandre Julliard
05 Feb '13
05 Feb '13
Module: wine Branch: master Commit: b730efc9b422f0ef8c61c4d13924acbed1263404 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b730efc9b422f0ef8c61c4d13…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Feb 5 13:19:40 2013 +0000 riched20: Pass character ptrs to the whitespace finding functions. --- dlls/riched20/string.c | 27 -------------------------- dlls/riched20/wrap.c | 49 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/dlls/riched20/string.c b/dlls/riched20/string.c index 8db1a3b..0e13394 100644 --- a/dlls/riched20/string.c +++ b/dlls/riched20/string.c @@ -121,33 +121,6 @@ void ME_StrDeleteV(ME_String *s, int nVChar, int nChars) s->nLen -= nChars; } -int ME_FindNonWhitespaceV(const ME_String *s, int nVChar) { - int i; - for (i = nVChar; i<s->nLen && ME_IsWSpace(s->szData[i]); i++) - ; - - return i; -} - -/* note: returns offset of the first trailing whitespace */ -int ME_ReverseFindNonWhitespaceV(const ME_String *s, int nVChar) { - int i; - for (i = nVChar; i>0 && ME_IsWSpace(s->szData[i-1]); i--) - ; - - return i; -} - -/* note: returns offset of the first trailing nonwhitespace */ -int ME_ReverseFindWhitespaceV(const ME_String *s, int nVChar) { - int i; - for (i = nVChar; i>0 && !ME_IsWSpace(s->szData[i-1]); i--) - ; - - return i; -} - - static int ME_WordBreakProc(LPWSTR s, INT start, INT len, INT code) { diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 9c72285..b63697b 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -206,13 +206,46 @@ static void ME_WrapSizeRun(ME_WrapContext *wc, ME_DisplayItem *p) wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, &p->member.run); } + +static int find_non_whitespace(const WCHAR *s, int len, int start) +{ + int i; + for (i = start; i < len && ME_IsWSpace( s[i] ); i++) + ; + + return i; +} + +/* note: these two really return the first matching offset (starting from EOS)+1 + * in other words, an offset of the first trailing white/black */ + +/* note: returns offset of the first trailing whitespace */ +static int reverse_find_non_whitespace(const WCHAR *s, int start) +{ + int i; + for (i = start; i > 0 && ME_IsWSpace( s[i - 1] ); i--) + ; + + return i; +} + +/* note: returns offset of the first trailing nonwhitespace */ +static int reverse_find_whitespace(const WCHAR *s, int start) +{ + int i; + for (i = start; i > 0 && !ME_IsWSpace( s[i - 1] ); i--) + ; + + return i; +} + static ME_DisplayItem *ME_MaximizeSplit(ME_WrapContext *wc, ME_DisplayItem *p, int i) { ME_DisplayItem *pp, *piter = p; int j; if (!i) return NULL; - j = ME_ReverseFindNonWhitespaceV(p->member.run.strText, i); + j = reverse_find_non_whitespace( get_text( &p->member.run, 0 ), i); if (j>0) { pp = ME_SplitRun(wc, piter, j); wc->pt.x += piter->member.run.nWidth; @@ -232,8 +265,8 @@ static ME_DisplayItem *ME_MaximizeSplit(ME_WrapContext *wc, ME_DisplayItem *p, i } if (piter->member.run.nFlags & MERF_ENDWHITE) { - i = ME_ReverseFindNonWhitespaceV(piter->member.run.strText, - piter->member.run.len); + i = reverse_find_non_whitespace( get_text( &piter->member.run, 0 ), + piter->member.run.len ); pp = ME_SplitRun(wc, piter, i); wc->pt = pp->member.run.pt; return pp; @@ -261,7 +294,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem assert(i<len); if (i) { /* don't split words */ - i = ME_ReverseFindWhitespaceV(run->strText, i); + i = reverse_find_whitespace( get_text( run, 0 ), i ); pp = ME_MaximizeSplit(wc, p, i); if (pp) return pp; @@ -285,9 +318,9 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem run = &piter->member.run; len = run->len; /* don't split words */ - i = ME_ReverseFindWhitespaceV(run->strText, len); + i = reverse_find_whitespace( get_text( run, 0 ), len ); if (i == len) - i = ME_ReverseFindNonWhitespaceV(run->strText, len); + i = reverse_find_non_whitespace( get_text( run, 0 ), len ); if (i) { ME_DisplayItem *piter2 = ME_SplitRun(wc, piter, i); wc->pt = piter2->member.run.pt; @@ -357,7 +390,7 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) if (run->nFlags & MERF_STARTWHITE) { /* try to split the run at the first non-white char */ int black; - black = ME_FindNonWhitespaceV(run->strText, 0); + black = find_non_whitespace( get_text( run, 0 ), run->len, 0 ); if (black) { wc->bOverflown = FALSE; pp = ME_SplitRun(wc, p, black); @@ -410,7 +443,7 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) if (run->nFlags & MERF_ENDWHITE) { /* we aren't sure if it's *really* necessary, it's a good start however */ - int black = ME_ReverseFindNonWhitespaceV(run->strText, len); + int black = reverse_find_non_whitespace( get_text( run, 0 ), len ); ME_SplitRun(wc, p, black); /* handle both parts again */ return p;
1
0
0
0
Huw Davies : riched20: Pass a character ptr and length to SplitParagraph.
by Alexandre Julliard
05 Feb '13
05 Feb '13
Module: wine Branch: master Commit: 872a2ad0312c14fd5b1d40609f36f374204b6158 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=872a2ad0312c14fd5b1d40609…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Feb 5 13:19:39 2013 +0000 riched20: Pass a character ptr and length to SplitParagraph. --- dlls/riched20/caret.c | 13 ++++++------- dlls/riched20/editor.h | 2 +- dlls/riched20/para.c | 10 ++++++---- dlls/riched20/table.c | 13 +++++-------- dlls/riched20/undo.c | 4 +--- 5 files changed, 19 insertions(+), 23 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 4c7ee8a..1457778 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -558,13 +558,12 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, WCHAR space = ' '; ME_InternalInsertTextFromCursor(editor, nCursor, &space, 1, style, 0); } else { - ME_String *eol_str; + const WCHAR cr = '\r', *eol_str = str; - if (!editor->bEmulateVersion10) { - WCHAR cr = '\r'; - eol_str = ME_MakeStringN(&cr, 1); - } else { - eol_str = ME_MakeStringN(str, eol_len); + if (!editor->bEmulateVersion10) + { + eol_str = &cr; + eol_len = 1; } p = &editor->pCursors[nCursor]; @@ -572,7 +571,7 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, ME_SplitRunSimple(editor, p); tmp_style = ME_GetInsertStyle(editor, nCursor); /* ME_SplitParagraph increases style refcount */ - tp = ME_SplitParagraph(editor, p->pRun, p->pRun->member.run.style, eol_str, 0); + tp = ME_SplitParagraph(editor, p->pRun, p->pRun->member.run.style, eol_str, eol_len, 0); p->pRun = ME_FindItemFwd(tp, diRun); p->pPara = tp; end_run = ME_FindItemBack(tp, diRun); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index de1a7bc..2dbd7e0 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -202,7 +202,7 @@ void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN; ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *run) DECLSPEC_HIDDEN; void ME_GetSelectionParas(ME_TextEditor *editor, ME_DisplayItem **para, ME_DisplayItem **para_end) DECLSPEC_HIDDEN; void ME_MakeFirstParagraph(ME_TextEditor *editor) DECLSPEC_HIDDEN; -ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *rp, ME_Style *style, ME_String *eol_str, int paraFlags) DECLSPEC_HIDDEN; +ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *rp, ME_Style *style, const WCHAR *eol_str, int eol_len, int paraFlags) DECLSPEC_HIDDEN; ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, BOOL keepFirstParaFormat) DECLSPEC_HIDDEN; void ME_DumpParaStyle(ME_Paragraph *s) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 7960972..ccb025a 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -192,7 +192,7 @@ static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const /* split paragraph at the beginning of the run */ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, - ME_Style *style, ME_String *eol_str, + ME_Style *style, const WCHAR *eol_str, int eol_len, int paraFlags) { ME_DisplayItem *next_para = NULL; @@ -202,6 +202,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, int ofs, i; ME_DisplayItem *pp; int run_flags = MERF_ENDPARA; + ME_String *str; if (!editor->bEmulateVersion10) { /* v4.1 */ /* At most 1 of MEPF_CELL, MEPF_ROWSTART, or MEPF_ROWEND should be set. */ @@ -218,7 +219,8 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, run_para = ME_GetParagraph(run); assert(run_para->member.para.pFmt->cbSize == sizeof(PARAFORMAT2)); - end_run = ME_MakeRun(style, eol_str, run_flags); + str = ME_MakeStringN( eol_str, eol_len ); + end_run = ME_MakeRun(style, str, run_flags); ofs = end_run->member.run.nCharOfs = run->member.run.nCharOfs; end_run->member.run.para = run->member.run.para; @@ -244,7 +246,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, pp = ME_FindItemFwd(pp, diRunOrParagraphOrEnd); } new_para->member.para.nCharOfs = run_para->member.para.nCharOfs + ofs; - new_para->member.para.nCharOfs += eol_str->nLen; + new_para->member.para.nCharOfs += eol_len; new_para->member.para.nFlags = MEPF_REWRAP; /* FIXME initialize format style and call ME_SetParaFormat blah blah */ @@ -311,7 +313,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, new_para->member.para.prev_para->member.para.nFlags |= MEPF_REWRAP; /* we've added the end run, so we need to modify nCharOfs in the next paragraphs */ - ME_PropagateCharOffset(next_para, eol_str->nLen); + ME_PropagateCharOffset(next_para, eol_len); editor->nParagraphs++; return new_para; diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c index 06287fb..d5fbfcb 100644 --- a/dlls/riched20/table.c +++ b/dlls/riched20/table.c @@ -58,7 +58,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit_lists); static ME_DisplayItem* ME_InsertEndParaFromCursor(ME_TextEditor *editor, int nCursor, - ME_String *eol_str, + const WCHAR *eol_str, int eol_len, int paraFlags) { ME_Style *pStyle = ME_GetInsertStyle(editor, nCursor); @@ -67,7 +67,7 @@ static ME_DisplayItem* ME_InsertEndParaFromCursor(ME_TextEditor *editor, if (cursor->nOffset) ME_SplitRunSimple(editor, cursor); - tp = ME_SplitParagraph(editor, cursor->pRun, pStyle, eol_str, paraFlags); + tp = ME_SplitParagraph(editor, cursor->pRun, pStyle, eol_str, eol_len, paraFlags); ME_ReleaseStyle(pStyle); cursor->pPara = tp; cursor->pRun = ME_FindItemFwd(tp, diRun); @@ -78,8 +78,7 @@ ME_DisplayItem* ME_InsertTableRowStartFromCursor(ME_TextEditor *editor) { ME_DisplayItem *para; WCHAR cr_lf[] = {'\r', '\n', 0}; - ME_String *eol_str = ME_MakeStringN(cr_lf, 2); - para = ME_InsertEndParaFromCursor(editor, 0, eol_str, MEPF_ROWSTART); + para = ME_InsertEndParaFromCursor(editor, 0, cr_lf, 2, MEPF_ROWSTART); return para->member.para.prev_para; } @@ -122,8 +121,7 @@ ME_DisplayItem* ME_InsertTableCellFromCursor(ME_TextEditor *editor) { ME_DisplayItem *para; WCHAR tab = '\t'; - ME_String *eol_str = ME_MakeStringN(&tab, 1); - para = ME_InsertEndParaFromCursor(editor, 0, eol_str, MEPF_CELL); + para = ME_InsertEndParaFromCursor(editor, 0, &tab, 1, MEPF_CELL); return para; } @@ -131,8 +129,7 @@ ME_DisplayItem* ME_InsertTableRowEndFromCursor(ME_TextEditor *editor) { ME_DisplayItem *para; WCHAR cr_lf[] = {'\r', '\n', 0}; - ME_String *eol_str = ME_MakeStringN(cr_lf, 2); - para = ME_InsertEndParaFromCursor(editor, 0, eol_str, MEPF_ROWEND); + para = ME_InsertEndParaFromCursor(editor, 0, cr_lf, 2, MEPF_ROWEND); return para->member.para.prev_para; } diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index bfac1ed..07926ed 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -394,9 +394,7 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, struct undo_item *undo) this_para->member.para.nFlags &= ~MEPF_ROWSTART; } new_para = ME_SplitParagraph(editor, tmp.pRun, tmp.pRun->member.run.style, - undo->u.split_para.eol_str, paraFlags); - /* ME_SplitParagraph owns eol_str */ - undo->u.split_para.eol_str = NULL; + undo->u.split_para.eol_str->szData, undo->u.split_para.eol_str->nLen, paraFlags); if (bFixRowStart) new_para->member.para.nFlags |= MEPF_ROWSTART; *new_para->member.para.pFmt = undo->u.split_para.fmt;
1
0
0
0
Michael Stefaniuc : crypt32: Use assignment instead of memcpy to copy structs.
by Alexandre Julliard
05 Feb '13
05 Feb '13
Module: wine Branch: master Commit: 6af92365ea7ae08b33fcf08e6f7b6deeebd0cb79 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6af92365ea7ae08b33fcf08e6…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Feb 5 13:22:27 2013 +0100 crypt32: Use assignment instead of memcpy to copy structs. --- dlls/crypt32/cert.c | 15 +++++---------- dlls/crypt32/message.c | 3 +-- dlls/crypt32/serialize.c | 6 +++--- dlls/crypt32/tests/main.c | 4 ++-- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 478fff3..c137746 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -842,7 +842,7 @@ static BOOL container_matches_cert(PCCERT_CONTEXT pCert, LPCSTR container, * keyProvInfo->pwszContainerName to be NULL or a heap-allocated container * name. */ - memcpy(©, keyProvInfo, sizeof(copy)); + copy = *keyProvInfo; copy.pwszContainerName = containerW; matches = key_prov_info_matches_cert(pCert, ©); if (matches) @@ -2216,9 +2216,7 @@ BOOL WINAPI CryptSignAndEncodeCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCrypt info.ToBeSigned.cbData = encodedSize; info.ToBeSigned.pbData = encoded; - memcpy(&info.SignatureAlgorithm, - pSignatureAlgorithm, - sizeof(info.SignatureAlgorithm)); + info.SignatureAlgorithm = *pSignatureAlgorithm; info.Signature.cbData = hashSize; info.Signature.pbData = hash; info.Signature.cUnusedBits = 0; @@ -2986,8 +2984,7 @@ static PCCERT_CONTEXT CRYPT_CreateSignedCert(const CRYPT_DER_BLOB *blob, signedInfo.ToBeSigned.cbData = blob->cbData; signedInfo.ToBeSigned.pbData = blob->pbData; - memcpy(&signedInfo.SignatureAlgorithm, sigAlgo, - sizeof(signedInfo.SignatureAlgorithm)); + signedInfo.SignatureAlgorithm = *sigAlgo; signedInfo.Signature.cbData = sigSize; signedInfo.Signature.pbData = sig; signedInfo.Signature.cUnusedBits = 0; @@ -3038,8 +3035,7 @@ static void CRYPT_MakeCertInfo(PCERT_INFO info, const CRYPT_DATA_BLOB *pSerialNu info->SerialNumber.cbData = pSerialNumber->cbData; info->SerialNumber.pbData = pSerialNumber->pbData; if (pSignatureAlgorithm) - memcpy(&info->SignatureAlgorithm, pSignatureAlgorithm, - sizeof(info->SignatureAlgorithm)); + info->SignatureAlgorithm = *pSignatureAlgorithm; else { info->SignatureAlgorithm.pszObjId = oid; @@ -3066,8 +3062,7 @@ static void CRYPT_MakeCertInfo(PCERT_INFO info, const CRYPT_DATA_BLOB *pSerialNu } info->Subject.cbData = pSubjectIssuerBlob->cbData; info->Subject.pbData = pSubjectIssuerBlob->pbData; - memcpy(&info->SubjectPublicKeyInfo, pubKey, - sizeof(info->SubjectPublicKeyInfo)); + info->SubjectPublicKeyInfo = *pubKey; if (pExtensions) { info->cExtension = pExtensions->cExtension; diff --git a/dlls/crypt32/message.c b/dlls/crypt32/message.c index 7e163de..5b77c87 100644 --- a/dlls/crypt32/message.c +++ b/dlls/crypt32/message.c @@ -285,8 +285,7 @@ BOOL WINAPI CryptHashMessage(PCRYPT_HASH_MESSAGE_PARA pHashPara, memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info); info.hCryptProv = pHashPara->hCryptProv; - memcpy(&info.HashAlgorithm, &pHashPara->HashAlgorithm, - sizeof(info.HashAlgorithm)); + info.HashAlgorithm = pHashPara->HashAlgorithm; info.pvHashAuxInfo = pHashPara->pvHashAuxInfo; msg = CryptMsgOpenToEncode(pHashPara->dwMsgEncodingType, flags, CMSG_HASHED, &info, NULL, NULL); diff --git a/dlls/crypt32/serialize.c b/dlls/crypt32/serialize.c index 5b6b794..7ca881c 100644 --- a/dlls/crypt32/serialize.c +++ b/dlls/crypt32/serialize.c @@ -652,21 +652,21 @@ static BOOL CRYPT_WriteSerializedStoreToStream(HCERTSTORE store, ret = output(handle, fileHeader, sizeof(fileHeader)); if (ret) { - memcpy(&interface, pCertInterface, sizeof(interface)); + interface = *pCertInterface; interface.serialize = (SerializeElementFunc)CRYPT_SerializeCertNoHash; ret = CRYPT_SerializeContextsToStream(output, handle, &interface, store); } if (ret) { - memcpy(&interface, pCRLInterface, sizeof(interface)); + interface = *pCRLInterface; interface.serialize = (SerializeElementFunc)CRYPT_SerializeCRLNoHash; ret = CRYPT_SerializeContextsToStream(output, handle, &interface, store); } if (ret) { - memcpy(&interface, pCTLInterface, sizeof(interface)); + interface = *pCTLInterface; interface.serialize = (SerializeElementFunc)CRYPT_SerializeCTLNoHash; ret = CRYPT_SerializeContextsToStream(output, handle, &interface, store); diff --git a/dlls/crypt32/tests/main.c b/dlls/crypt32/tests/main.c index 8ceec7b..a0019b5 100644 --- a/dlls/crypt32/tests/main.c +++ b/dlls/crypt32/tests/main.c @@ -181,12 +181,12 @@ static void test_verifyTimeValidity(void) /* Check with 0 NotBefore and NotAfter */ ret = CertVerifyTimeValidity(&fileTime, &info); ok(ret == 1, "Expected 1, got %d\n", ret); - memcpy(&info.NotAfter, &fileTime, sizeof(info.NotAfter)); + info.NotAfter = fileTime; /* Check with NotAfter equal to comparison time */ ret = CertVerifyTimeValidity(&fileTime, &info); ok(ret == 0, "Expected 0, got %d\n", ret); /* Check with NotBefore after comparison time */ - memcpy(&info.NotBefore, &fileTime, sizeof(info.NotBefore)); + info.NotBefore = fileTime; info.NotBefore.dwLowDateTime += 5000; ret = CertVerifyTimeValidity(&fileTime, &info); ok(ret == -1, "Expected -1, got %d\n", ret);
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
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
Results per page:
10
25
50
100
200