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 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1348 discussions
Start a n
N
ew thread
Alexandre Julliard : winedump: Implement dumping of relocations.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: 83fc73395dc5bba3709951a6528ddff1e22337c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83fc73395dc5bba3709951a65…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 6 15:11:47 2009 +0100 winedump: Implement dumping of relocations. --- tools/winedump/pe.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 46 insertions(+), 3 deletions(-) diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index 2f6c46b..491228f 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -803,6 +803,52 @@ static void dump_dir_clr_header(void) printf("\n"); } +static void dump_dir_reloc(void) +{ + unsigned int i, size = 0; + const USHORT *relocs; + const IMAGE_BASE_RELOCATION *rel = get_dir_and_size(IMAGE_DIRECTORY_ENTRY_BASERELOC, &size); + const IMAGE_BASE_RELOCATION *end = (IMAGE_BASE_RELOCATION *)((char *)rel + size); + static const char * const names[] = + { + "BASED_ABSOLUTE", + "BASED_HIGH", + "BASED_LOW", + "BASED_HIGHLOW", + "BASED_HIGHADJ", + "BASED_MIPS_JMPADDR", + "BASED_SECTION", + "BASED_REL", + "unknown 8", + "BASED_IA64_IMM64", + "BASED_DIR64", + "BASED_HIGH3ADJ", + "unknown 12", + "unknown 13", + "unknown 14", + "unknown 15" + }; + + if (!rel) return; + + printf( "Relocations\n" ); + while (rel < end - 1 && rel->SizeOfBlock) + { + printf( " Page %x\n", rel->VirtualAddress ); + relocs = (const USHORT *)(rel + 1); + i = (rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT); + while (i--) + { + USHORT offset = *relocs & 0xfff; + int type = *relocs >> 12; + printf( " off %04x type %s\n", offset, names[type] ); + relocs++; + } + rel = (const IMAGE_BASE_RELOCATION *)relocs; + } + printf("\n"); +} + static void dump_dir_tls(void) { IMAGE_TLS_DIRECTORY64 dir; @@ -1247,11 +1293,8 @@ void pe_dump(void) dump_dir_tls(); if (all || !strcmp(globals.dumpsect, "clr")) dump_dir_clr_header(); -#if 0 - /* FIXME: not implemented yet */ if (all || !strcmp(globals.dumpsect, "reloc")) dump_dir_reloc(); -#endif } if (globals.do_debug) dump_debug();
1
0
0
0
Alexandre Julliard : winedump: List exported functions sorted by ordinal.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: d6617258b71e6041bcbe72f4221f89e8f5a97369 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d6617258b71e6041bcbe72f42…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 6 15:11:06 2009 +0100 winedump: List exported functions sorted by ordinal. --- tools/winedump/pe.c | 46 ++++++++++++++++++---------------------------- 1 files changed, 18 insertions(+), 28 deletions(-) diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index 31a744e..2f6c46b 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -469,7 +469,7 @@ static void dump_dir_exported_functions(void) const DWORD* pFunc; const DWORD* pName; const WORD* pOrdl; - DWORD* map; + DWORD* funcs; if (!exportDir) return; @@ -496,37 +496,27 @@ static void dump_dir_exported_functions(void) pOrdl = RVA(exportDir->AddressOfNameOrdinals, exportDir->NumberOfNames * sizeof(WORD)); if (!pOrdl) {printf("Can't grab functions' ordinal table\n"); return;} - /* bit map of used funcs */ - map = calloc(((exportDir->NumberOfFunctions + 31) & ~31) / 32, sizeof(DWORD)); - if (!map) fatal("no memory"); + funcs = calloc( exportDir->NumberOfFunctions, sizeof(*funcs) ); + if (!funcs) fatal("no memory"); - for (i = 0; i < exportDir->NumberOfNames; i++, pName++, pOrdl++) - { - map[*pOrdl / 32] |= 1 << (*pOrdl % 32); + for (i = 0; i < exportDir->NumberOfNames; i++) funcs[pOrdl[i]] = pName[i]; - printf(" %08X %4u %s", pFunc[*pOrdl], exportDir->Base + *pOrdl, - get_symbol_str((const char*)RVA(*pName, sizeof(DWORD)))); - /* check for forwarded function */ - if ((const char *)RVA(pFunc[*pOrdl],sizeof(void*)) >= (const char *)exportDir && - (const char *)RVA(pFunc[*pOrdl],sizeof(void*)) < (const char *)exportDir + size) - printf( " (-> %s)", (const char *)RVA(pFunc[*pOrdl],1)); - printf("\n"); - } - pFunc = RVA(exportDir->AddressOfFunctions, exportDir->NumberOfFunctions * sizeof(DWORD)); - if (!pFunc) - { - printf("Can't grab functions' address table\n"); - free(map); - return; - } for (i = 0; i < exportDir->NumberOfFunctions; i++) { - if (pFunc[i] && !(map[i / 32] & (1 << (i % 32)))) - { - printf(" %08X %4u <by ordinal>\n", pFunc[i], exportDir->Base + i); - } + if (!pFunc[i]) continue; + printf(" %08X %5u ", pFunc[i], exportDir->Base + i); + if (funcs[i]) + { + printf("%s", get_symbol_str((const char*)RVA(funcs[i], sizeof(DWORD)))); + /* check for forwarded function */ + if ((const char *)RVA(pFunc[i],1) >= (const char *)exportDir && + (const char *)RVA(pFunc[i],1) < (const char *)exportDir + size) + printf(" (-> %s)", (const char *)RVA(pFunc[i],1)); + printf("\n"); + } + else printf("<by ordinal>\n"); } - free(map); + free(funcs); printf("\n"); }
1
0
0
0
Hans Leidekker : usp10: Improve some traces.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: 9a847b3ab02d1c8c2be0407843406c95e17f1734 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a847b3ab02d1c8c2be040784…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 6 11:21:07 2009 +0100 usp10: Improve some traces. --- dlls/usp10/usp10.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 0c32c6f..fc2f8e9 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1287,7 +1287,9 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, HRESULT hr; unsigned int i; - TRACE("(%p, %p, %p, %d, %d, %p)\n", hdc, psc, pwcChars, cChars, cMaxGlyphs, psa); + TRACE("(%p, %p, %s, %d, %d, %p, %p, %p, %p, %p)\n", hdc, psc, debugstr_wn(pwcChars, cChars), + cChars, cMaxGlyphs, psa, pwOutGlyphs, pwLogClust, psva, pcGlyphs); + if (psa) TRACE("psa values: %d, %d, %d, %d, %d, %d, %d\n", psa->eScript, psa->fRTL, psa->fLayoutRTL, psa->fLinkBefore, psa->fLinkAfter, psa->fLogicalOrder, psa->fNoGlyphIndex); @@ -1362,8 +1364,8 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, HRESULT hr; int i; - TRACE("(%p, %p, %p, %s, %d, %p, %p, %p)\n", hdc, psc, pwGlyphs, - debugstr_wn(pwGlyphs, cGlyphs), cGlyphs, psva, psa, piAdvance); + TRACE("(%p, %p, %p, %d, %p, %p, %p, %p, %p)\n", hdc, psc, pwGlyphs, cGlyphs, psva, psa, + piAdvance, pGoffset, pABC); if (!psva) return E_INVALIDARG; if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
1
0
0
0
Hans Leidekker : usp10: Set better visual attribute values in ScriptShape.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: 83f66d0246ecfe10208ee96e9829b6efaf3f89f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83f66d0246ecfe10208ee96e9…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 6 11:20:57 2009 +0100 usp10: Set better visual attribute values in ScriptShape. --- dlls/usp10/usp10.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 0975dcb..0c32c6f 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1322,10 +1322,12 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, for (i = 0; i < cChars; i++) { /* FIXME: set to better values */ - psva[i].uJustification = 2; + psva[i].uJustification = (pwcChars[i] == ' ') ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER; psva[i].fClusterStart = 1; psva[i].fDiacritic = 0; psva[i].fZeroWidth = 0; + psva[i].fReserved = 0; + psva[i].fShapeReserved = 0; if (pwLogClust) pwLogClust[i] = i; }
1
0
0
0
Hans Leidekker : usp10: Handle CR/LF in ScriptItemize.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: 8a5eae2122478f5f057b1f696523157003d0dbcc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a5eae2122478f5f057b1f696…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 6 11:20:41 2009 +0100 usp10: Handle CR/LF in ScriptItemize. --- dlls/usp10/tests/usp10.c | 38 ++++++++++++++++++++++++++++++++++++++ dlls/usp10/usp10.c | 23 +++++++++++++++++++---- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 429f51c..1dba682 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -1426,6 +1426,43 @@ static void test_ScriptBreak(void) ok(!la.fReserved, "fReserved set\n"); } +static void test_newlines(void) +{ + static const WCHAR test1[] = {'t','e','x','t','\r','t','e','x','t',0}; + static const WCHAR test2[] = {'t','e','x','t','\n','t','e','x','t',0}; + static const WCHAR test3[] = {'t','e','x','t','\r','\n','t','e','x','t',0}; + static const WCHAR test4[] = {'t','e','x','t','\n','\r','t','e','x','t',0}; + static const WCHAR test5[] = {'1','2','3','4','\n','\r','1','2','3','4',0}; + SCRIPT_ITEM items[5]; + HRESULT hr; + int count; + + count = 0; + hr = ScriptItemize(test1, lstrlenW(test1), 5, NULL, NULL, items, &count); + ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); + ok(count == 3, "got %d expected 3\n", count); + + count = 0; + hr = ScriptItemize(test2, lstrlenW(test2), 5, NULL, NULL, items, &count); + ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); + ok(count == 3, "got %d expected 3\n", count); + + count = 0; + hr = ScriptItemize(test3, lstrlenW(test3), 5, NULL, NULL, items, &count); + ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); + ok(count == 4, "got %d expected 4\n", count); + + count = 0; + hr = ScriptItemize(test4, lstrlenW(test4), 5, NULL, NULL, items, &count); + ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); + ok(count == 4, "got %d expected 4\n", count); + + count = 0; + hr = ScriptItemize(test5, lstrlenW(test5), 5, NULL, NULL, items, &count); + ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); + ok(count == 4, "got %d expected 4\n", count); +} + START_TEST(usp10) { HWND hwnd; @@ -1471,6 +1508,7 @@ START_TEST(usp10) test_digit_substitution(); test_ScriptGetProperties(); test_ScriptBreak(); + test_newlines(); ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index fb920ca..0975dcb 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -519,6 +519,8 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem #define Script_Arabic 6 #define Script_Latin 1 #define Script_Numeric 5 +#define Script_CR 22 +#define Script_LF 23 int cnt = 0, index = 0; int New_Script = SCRIPT_UNDEFINED; @@ -532,6 +534,12 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem pItems[index].iCharPos = 0; memset(&pItems[index].a, 0, sizeof(SCRIPT_ANALYSIS)); + if (pwcInChars[cnt] == '\r') + pItems[index].a.eScript = Script_CR; + else + if (pwcInChars[cnt] == '\n') + pItems[index].a.eScript = Script_LF; + else if (pwcInChars[cnt] >= Numeric_start && pwcInChars[cnt] <= Numeric_stop) pItems[index].a.eScript = Script_Numeric; else @@ -546,10 +554,16 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem TRACE("New_Script=%d, eScript=%d index=%d cnt=%d iCharPos=%d\n", New_Script, pItems[index].a.eScript, index, cnt, - pItems[index].iCharPos = cnt); + pItems[index].iCharPos); - for (cnt=0; cnt < cInChars; cnt++) + for (cnt=1; cnt < cInChars; cnt++) { + if (pwcInChars[cnt] == '\r') + New_Script = Script_CR; + else + if (pwcInChars[cnt] == '\n') + New_Script = Script_LF; + else if ((pwcInChars[cnt] >= Numeric_start && pwcInChars[cnt] <= Numeric_stop) || (New_Script == Script_Numeric && pwcInChars[cnt] == Numeric_space)) New_Script = Script_Numeric; @@ -558,7 +572,8 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem || (New_Script == Script_Arabic && pwcInChars[cnt] == Numeric_space)) New_Script = Script_Arabic; else - if ((WCHAR) pwcInChars[cnt] >= Latin_start && (WCHAR) pwcInChars[cnt] <= Latin_stop) + if ((pwcInChars[cnt] >= Latin_start && pwcInChars[cnt] <= Latin_stop) + || (New_Script == Script_Latin && pwcInChars[cnt] == Numeric_space)) New_Script = Script_Latin; else New_Script = SCRIPT_UNDEFINED; @@ -580,7 +595,7 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem if (New_Script == Script_Arabic) pItems[index].a.s.uBidiLevel = 1; - TRACE("index=%d cnt=%d iCharPos=%d\n", index, cnt, pItems[index].iCharPos = cnt); + TRACE("index=%d cnt=%d iCharPos=%d\n", index, cnt, pItems[index].iCharPos); } }
1
0
0
0
Hans Leidekker : usp10: Improve handling of whitespace in ScriptBreak.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: 020456f71b61c8d4868ca63ac5820611b3ef07d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=020456f71b61c8d4868ca63ac…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 6 11:20:26 2009 +0100 usp10: Improve handling of whitespace in ScriptBreak. --- dlls/usp10/tests/usp10.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ dlls/usp10/usp10.c | 8 +++++++- 2 files changed, 52 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index c63c6c8..429f51c 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -1382,6 +1382,50 @@ static void test_ScriptGetProperties(void) ok(hr == S_OK, "ScriptGetProperties failed: 0x%08x\n", hr); } +static void test_ScriptBreak(void) +{ + static const WCHAR test[] = {' ','\r','\n',0}; + SCRIPT_ITEM items[4]; + SCRIPT_LOGATTR la; + HRESULT hr; + + hr = ScriptItemize(test, 3, 4, NULL, NULL, items, NULL); + ok(!hr, "ScriptItemize should return S_OK not %08x\n", hr); + + memset(&la, 0, sizeof(la)); + hr = ScriptBreak(test, 1, &items[0].a, &la); + ok(!hr, "ScriptBreak should return S_OK not %08x\n", hr); + + ok(!la.fSoftBreak, "fSoftBreak set\n"); + ok(la.fWhiteSpace, "fWhiteSpace not set\n"); + ok(la.fCharStop, "fCharStop not set\n"); + ok(!la.fWordStop, "fWordStop set\n"); + ok(!la.fInvalid, "fInvalid set\n"); + ok(!la.fReserved, "fReserved set\n"); + + memset(&la, 0, sizeof(la)); + hr = ScriptBreak(test + 1, 1, &items[1].a, &la); + ok(!hr, "ScriptBreak should return S_OK not %08x\n", hr); + + ok(!la.fSoftBreak, "fSoftBreak set\n"); + ok(!la.fWhiteSpace, "fWhiteSpace set\n"); + ok(la.fCharStop, "fCharStop not set\n"); + ok(!la.fWordStop, "fWordStop set\n"); + ok(!la.fInvalid, "fInvalid set\n"); + ok(!la.fReserved, "fReserved set\n"); + + memset(&la, 0, sizeof(la)); + hr = ScriptBreak(test + 2, 1, &items[2].a, &la); + ok(!hr, "ScriptBreak should return S_OK not %08x\n", hr); + + ok(!la.fSoftBreak, "fSoftBreak set\n"); + ok(!la.fWhiteSpace, "fWhiteSpace set\n"); + ok(la.fCharStop, "fCharStop not set\n"); + ok(!la.fWordStop, "fWordStop set\n"); + ok(!la.fInvalid, "fInvalid set\n"); + ok(!la.fReserved, "fReserved set\n"); +} + START_TEST(usp10) { HWND hwnd; @@ -1426,6 +1470,7 @@ START_TEST(usp10) test_ScriptLayout(); test_digit_substitution(); test_ScriptGetProperties(); + test_ScriptBreak(); ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 4af14ae..fb920ca 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1041,8 +1041,14 @@ HRESULT WINAPI ScriptBreak(const WCHAR *chars, int count, const SCRIPT_ANALYSIS memset(&la[i], 0, sizeof(SCRIPT_LOGATTR)); /* FIXME: set the other flags */ - la[i].fWhiteSpace = isspaceW(chars[i]); + la[i].fWhiteSpace = (chars[i] == ' '); la[i].fCharStop = 1; + + if (i > 0 && la[i - 1].fWhiteSpace) + { + la[i].fSoftBreak = 1; + la[i].fWordStop = 1; + } } return S_OK; }
1
0
0
0
Paul Vriens : shell32/tests: Fix some test failures on Vista.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: 36bd62c01264f5ba06629a69c0d3af14fd786056 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36bd62c01264f5ba06629a69c…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Jan 6 11:54:27 2009 +0100 shell32/tests: Fix some test failures on Vista. --- dlls/shell32/tests/shlfileop.c | 35 +++++++++++++++++++++++++---------- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 5bd3c34..7705292 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -34,8 +34,10 @@ /* Error codes could be pre-Win32 */ #define DE_SAMEFILE 0x71 +#define DE_MANYSRC1DEST 0x72 #define DE_OPCANCELLED 0x75 #define DE_DESTSUBTREE 0x76 +#define DE_INVALIDFILES 0x7C #define DE_DESTSAMETREE 0x7D #define expect_retval(ret, ret_prewin32)\ ok(retval == ret ||\ @@ -667,8 +669,9 @@ static void test_rename(void) shfo.pTo = "a.txt\0"; retval = SHFileOperationA(&shfo); ok(retval == ERROR_GEN_FAILURE || + retval == DE_MANYSRC1DEST || /* Vista */ broken(!retval), /* Win9x */ - "Expected ERROR_GEN_FAILURE, got %d\n", retval); + "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST, got %d\n", retval); ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); ok(!file_exists("a.txt"), "Expected a.txt to not exist\n"); @@ -677,7 +680,9 @@ static void test_rename(void) shfo.pFrom = "idontexist\0"; shfo.pTo = "newfile\0"; retval = SHFileOperationA(&shfo); - ok(retval == 1026, "Expected 1026, got %d\n", retval); + ok(retval == 1026 || + retval == ERROR_FILE_NOT_FOUND, /* Vista */ + "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", retval); ok(!file_exists("newfile"), "Expected newfile to not exist\n"); /* pTo already exist */ @@ -696,7 +701,9 @@ static void test_rename(void) /* pFrom is empty */ shfo.pFrom = "\0"; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", retval); + ok(retval == ERROR_ACCESS_DENIED || + retval == ERROR_INVALID_TARGET_HANDLE, /* Vista */ + "Expected ERROR_ACCESS_DENIED or ERROR_INVALID_TARGET_HANDLE, got %d\n", retval); /* pFrom is NULL, commented out because it crashes on nt 4.0 */ #if 0 @@ -1227,8 +1234,9 @@ static void test_copy(void) shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperation(&shfo); ok(retval == 1148 || retval == 1026 || - retval == ERROR_ACCESS_DENIED, /* win2k */ - "Expected 1148, 1026 or ERROR_ACCESS_DENIED, got %d\n", retval); + retval == ERROR_ACCESS_DENIED || /* win2k */ + retval == DE_INVALIDFILES, /* Vista */ + "Unexpected return value, got %d\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); if (file_exists("two.txt")) /* Vista and W2K8 (broken or new behavior ?) */ @@ -1275,8 +1283,9 @@ static void test_copy(void) shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperation(&shfo); ok(retval == 1148 || retval == 1026 || - retval == ERROR_ACCESS_DENIED, /* win2k */ - "Expected 1148, 1026 or ERROR_ACCESS_DENIED, got %d\n", retval); + retval == ERROR_ACCESS_DENIED || /* win2k */ + retval == DE_INVALIDFILES, /* Vista */ + "Unexpected return value, got %d\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); if (dir_exists("two.txt")) /* Vista and W2K8 (broken or new behavior ?) */ @@ -1782,16 +1791,22 @@ static void test_sh_path_prepare(void) /* file exists, SHPPFW_NONE */ set_curr_dir_path(path, "test1.txt\0"); res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_DIRECTORY)\n", res); + ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || + res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ + "Unexpected result : 0x%08x\n", res); /* file exists, SHPPFW_DIRCREATE */ res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_DIRCREATE); - ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_DIRECTORY)\n", res); + ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || + res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ + "Unexpected result : 0x%08x\n", res); /* file exists, SHPPFW_NONE, trailing \ */ set_curr_dir_path(path, "test1.txt\\\0"); res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_DIRECTORY)\n", res); + ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || + res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ + "Unexpected result : 0x%08x\n", res); /* relative path exists, SHPPFW_DIRCREATE */ res = pSHPathPrepareForWriteA(0, 0, ".\\testdir2", SHPPFW_DIRCREATE);
1
0
0
0
Paul Vriens : shell32/tests: Change some tests with respect to Vista.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: dda78ca69bd8aec90706f49872dc7fcc1aa6cc7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dda78ca69bd8aec90706f4987…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Jan 6 11:34:32 2009 +0100 shell32/tests: Change some tests with respect to Vista. --- dlls/shell32/tests/shlfileop.c | 81 ++++++++++++++++++++++----------------- 1 files changed, 46 insertions(+), 35 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dda78ca69bd8aec90706f…
1
0
0
0
Paul Vriens : shell32/tests: Fix some test failures on Win9x and NT4.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: 7c1885181e84358fe82b9f3f97d00ea44f19fe5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c1885181e84358fe82b9f3f9…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Jan 6 09:16:37 2009 +0100 shell32/tests: Fix some test failures on Win9x and NT4. --- dlls/shell32/tests/shlfileop.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 262e7a6..91ffe0b 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -736,7 +736,7 @@ static void test_copy(void) } else { - ok(retval == ERROR_CANCELLED, "Expected ERROR_CANCELLED, got %d\n", retval); + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); ok(!file_exists("test6.txt"), "The file is copied - many files are " "specified as a target\n"); } @@ -771,7 +771,7 @@ static void test_copy(void) } else { - ok(retval == ERROR_CANCELLED, "Expected ERROR_CANCELLED, got %d\n", retval); + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); ok(!file_exists("test6.txt"), "The file is copied - many files are " "specified as a target\n"); } @@ -1552,7 +1552,7 @@ static void test_move(void) } else { - ok(retval == ERROR_CANCELLED, "Expected ERROR_CANCELLED, got %d\n", retval); + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); ok(!file_exists("test6.txt"), "The file is not moved - many files are " "specified as a target\n"); } @@ -1580,7 +1580,7 @@ static void test_move(void) } else { - ok(retval == ERROR_CANCELLED, "Expected ERROR_CANCELLED, got %d\n", retval); + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); ok(file_exists("test1.txt"), "The file is moved. Many files are specified\n"); ok(dir_exists("test4.txt"), "The directory is moved. Many files are specified\n"); }
1
0
0
0
Hans Leidekker : setupapi: Add tests for StringTableAddStringEx and StringTableLookupStringEx.
by Alexandre Julliard
06 Jan '09
06 Jan '09
Module: wine Branch: master Commit: b4dcc6b42a505a0d74e166ba706a054eff0fd4bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4dcc6b42a505a0d74e166ba7…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 6 10:39:20 2009 +0100 setupapi: Add tests for StringTableAddStringEx and StringTableLookupStringEx. --- dlls/setupapi/tests/stringtable.c | 95 +++++++++++++++++++++++++++++++++++++ 1 files changed, 95 insertions(+), 0 deletions(-) diff --git a/dlls/setupapi/tests/stringtable.c b/dlls/setupapi/tests/stringtable.c index 6a8f24d..f93f2d8 100644 --- a/dlls/setupapi/tests/stringtable.c +++ b/dlls/setupapi/tests/stringtable.c @@ -40,10 +40,12 @@ DECLARE_HANDLE(HSTRING_TABLE); #define ST_CASE_SENSITIVE_COMPARE 0x00000001 static DWORD (WINAPI *pStringTableAddString)(HSTRING_TABLE, LPWSTR, DWORD); +static DWORD (WINAPI *pStringTableAddStringEx)(HSTRING_TABLE, LPWSTR, DWORD, LPVOID, DWORD); static VOID (WINAPI *pStringTableDestroy)(HSTRING_TABLE); static HSTRING_TABLE (WINAPI *pStringTableDuplicate)(HSTRING_TABLE hStringTable); static HSTRING_TABLE (WINAPI *pStringTableInitialize)(VOID); static DWORD (WINAPI *pStringTableLookUpString)(HSTRING_TABLE, LPWSTR, DWORD); +static DWORD (WINAPI *pStringTableLookUpStringEx)(HSTRING_TABLE, LPWSTR, DWORD, LPVOID, LPDWORD); static LPWSTR (WINAPI *pStringTableStringFromId)(HSTRING_TABLE, DWORD); #if 0 static BOOL (WINAPI *pStringTableStringFromIdEx)(HSTRING_TABLE, DWORD, LPWSTR, LPDWORD); @@ -67,6 +69,10 @@ static void load_it_up(void) if (!pStringTableAddString) pStringTableAddString = (void*)GetProcAddress(hdll, "pSetupStringTableAddString"); + pStringTableAddStringEx = (void*)GetProcAddress(hdll, "StringTableAddStringEx"); + if (!pStringTableAddStringEx) + pStringTableAddStringEx = (void*)GetProcAddress(hdll, "pSetupStringTableAddStringEx"); + pStringTableDuplicate = (void*)GetProcAddress(hdll, "StringTableDuplicate"); if (!pStringTableDuplicate) pStringTableDuplicate = (void*)GetProcAddress(hdll, "pSetupStringTableDuplicate"); @@ -79,6 +85,10 @@ static void load_it_up(void) if (!pStringTableLookUpString) pStringTableLookUpString = (void*)GetProcAddress(hdll, "pSetupStringTableLookUpString"); + pStringTableLookUpStringEx = (void*)GetProcAddress(hdll, "StringTableLookUpStringEx"); + if (!pStringTableLookUpStringEx) + pStringTableLookUpStringEx = (void*)GetProcAddress(hdll, "pSetupStringTableLookUpStringEx"); + pStringTableStringFromId = (void*)GetProcAddress(hdll, "StringTableStringFromId"); if (!pStringTableStringFromId) pStringTableStringFromId = (void*)GetProcAddress(hdll, "pSetupStringTableStringFromId"); @@ -111,6 +121,33 @@ static void test_StringTableAddString(void) pStringTableDestroy(table); } +static void test_StringTableAddStringEx(void) +{ + DWORD retval, hstring, hString, hfoo; + HANDLE table; + + table = pStringTableInitialize(); + ok(table != NULL,"Failed to Initialize String Table\n"); + + /* case insensitive */ + hstring = pStringTableAddStringEx(table, string, 0, NULL, 0); + ok(hstring != ~0u, "Failed to add string to String Table\n"); + + retval = pStringTableAddStringEx(table, String, 0, NULL, 0); + ok(retval != ~0u, "Failed to add String to String Table\n"); + ok(hstring == retval, "string handle %x != String handle %x in String Table\n", hstring, retval); + + hfoo = pStringTableAddStringEx(table, foo, 0, NULL, 0); + ok(hfoo != ~0u, "Failed to add foo to String Table\n"); + ok(hfoo != hstring, "foo and string share the same ID %x in String Table\n", hfoo); + + /* case sensitive */ + hString = pStringTableAddStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0); + ok(hstring != hString, "String handle and string share same ID %x in Table\n", hstring); + + pStringTableDestroy(table); +} + static void test_StringTableDuplicate(void) { HANDLE table, table2; @@ -182,6 +219,62 @@ static void test_StringTableLookUpString(void) pStringTableDestroy(table2); } +static void test_StringTableLookUpStringEx(void) +{ + DWORD retval, retval2, hstring, hString, hfoo; + HANDLE table, table2; + + table = pStringTableInitialize(); + ok(table != NULL,"Failed to Initialize String Table\n"); + + hstring = pStringTableAddString(table, string, 0); + ok(hstring != ~0u, "failed to add 'string' to string table\n"); + + hString = pStringTableAddString(table, String, 0); + ok(hString != ~0u,"failed to add 'String' to string table\n"); + + hfoo = pStringTableAddString(table, foo, 0); + ok(hfoo != ~0u, "failed to add 'foo' to string table\n"); + + table2 = pStringTableDuplicate(table); + ok(table2 != NULL, "Failed to duplicate String Table\n"); + + /* case insensitive */ + retval = pStringTableLookUpStringEx(table, string, 0, NULL, NULL); + ok(retval != ~0u, "Failed find string in String Table 1\n"); + ok(retval == hstring, + "Lookup for string (%x) does not match previous handle (%x) in String Table 1\n", + retval, hstring); + + retval = pStringTableLookUpStringEx(table2, string, 0, NULL, NULL); + ok(retval != ~0u, "Failed find string in String Table 2\n"); + + retval = pStringTableLookUpStringEx(table, String, 0, NULL, NULL); + ok(retval != ~0u, "Failed find String in String Table 1\n"); + + retval = pStringTableLookUpStringEx(table2, String, 0, NULL, NULL); + ok(retval != ~0u, "Failed find String in String Table 2\n"); + + retval=pStringTableLookUpStringEx(table, foo, 0, NULL, NULL); + ok(retval != ~0u, "Failed find foo in String Table 1\n"); + ok(retval == hfoo, + "Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n", + retval, hfoo); + + retval = pStringTableLookUpStringEx(table2, foo, 0, NULL, NULL); + ok(retval != ~0u, "Failed find foo in String Table 2\n"); + + /* case sensitive */ + retval = pStringTableLookUpStringEx(table, string,ST_CASE_SENSITIVE_COMPARE, NULL, NULL); + retval2 = pStringTableLookUpStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, NULL); + ok(retval != retval2, "Lookup of string equals String in Table 1\n"); + ok(retval == hString, + "Lookup for String (%x) does not match previous handle (%x) in String Table 1\n", + retval, hString); + + pStringTableDestroy(table); +} + static void test_StringTableStringFromId(void) { HANDLE table; @@ -210,7 +303,9 @@ START_TEST(stringtable) load_it_up(); test_StringTableAddString(); + test_StringTableAddStringEx(); test_StringTableDuplicate(); test_StringTableLookUpString(); + test_StringTableLookUpStringEx(); test_StringTableStringFromId(); }
1
0
0
0
← Newer
1
...
107
108
109
110
111
112
113
...
135
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Results per page:
10
25
50
100
200