winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
827 discussions
Start a n
N
ew thread
Damjan Jovanovic : shell32: Fix some function prototypes.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: f6be79684f0c5a0a3a03103e8577995bfceb19dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6be79684f0c5a0a3a03103e8…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Wed Jun 20 09:12:23 2012 +0200 shell32: Fix some function prototypes. --- dlls/shell32/shell32.spec | 6 +++--- dlls/shell32/shellord.c | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec index 29685e8..6fcd5e8 100644 --- a/dlls/shell32/shell32.spec +++ b/dlls/shell32/shell32.spec @@ -95,7 +95,7 @@ 100 stdcall -ordinal SHRestricted(long) 102 stdcall -ordinal SHCoCreateInstance(wstr ptr long ptr ptr) - 103 stdcall -ordinal SignalFileOpen(long) + 103 stdcall -ordinal SignalFileOpen(ptr) 104 stdcall -noname FileMenu_DeleteAllItems(long) 105 stdcall -noname FileMenu_DrawItem(long ptr) 106 stdcall -noname FileMenu_FindSubMenuByPidl(long ptr) @@ -150,7 +150,7 @@ 158 stdcall -noname PathGetExtension(str long long) PathGetExtensionAW 159 stdcall -noname PathIsDirectory(ptr) PathIsDirectoryAW 160 stub SHNetConnectionDialog - 161 stdcall -noname SHRunControlPanel(long long) + 161 stdcall -noname SHRunControlPanel(wstr long) 162 stdcall -ordinal SHSimpleIDListFromPath(ptr) SHSimpleIDListFromPathAW 163 stdcall -noname StrToOleStr(wstr str) StrToOleStrAW 164 stdcall -ordinal Win32DeleteFile(str) Win32DeleteFileAW @@ -162,7 +162,7 @@ 170 stdcall -ordinal SHReplaceFromPropSheetExtArray(long long long long) 171 stdcall -ordinal PathCleanupSpec(ptr ptr) 172 stdcall -noname SHCreateLinks(long str ptr long ptr) - 173 stdcall -ordinal SHValidateUNC(long long long) + 173 stdcall -ordinal SHValidateUNC(long wstr long) 174 stdcall -ordinal SHCreateShellFolderViewEx(ptr ptr) 175 stdcall -noname SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathAW 176 stdcall -ordinal SHSetInstanceExplorer(long) diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 05105c5..7f329de 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -614,12 +614,12 @@ WORD WINAPI ArrangeWindows( * NOTES * exported by ordinal */ -DWORD WINAPI -SignalFileOpen (DWORD dwParam1) +BOOL WINAPI +SignalFileOpen (PCIDLIST_ABSOLUTE pidl) { - FIXME("(0x%08x):stub.\n", dwParam1); + FIXME("(%p):stub.\n", pidl); - return 0; + return FALSE; } /************************************************************************* @@ -1131,9 +1131,10 @@ HRESULT WINAPI SHWinHelp (DWORD v, DWORD w, DWORD x, DWORD z) * SHRunControlPanel [SHELL32.161] * */ -HRESULT WINAPI SHRunControlPanel (DWORD x, DWORD z) -{ FIXME("0x%08x 0x%08x stub\n",x,z); - return 0; +BOOL WINAPI SHRunControlPanel (LPCWSTR commandLine, HWND parent) +{ + FIXME("(%s, %p): stub\n", debugstr_w(commandLine), parent); + return FALSE; } static LPUNKNOWN SHELL32_IExplorerInterface=0; @@ -1499,7 +1500,7 @@ HRESULT WINAPI SHLoadOLE(LPARAM lParam) * DriveType [SHELL32.64] * */ -HRESULT WINAPI DriveType(DWORD u) +int WINAPI DriveType(int u) { FIXME("0x%04x stub\n",u); return 0; } @@ -1582,10 +1583,10 @@ DWORD WINAPI RLBuildListOfPaths (void) * SHValidateUNC [SHELL32.173] * */ -HRESULT WINAPI SHValidateUNC (DWORD x, DWORD y, DWORD z) +BOOL WINAPI SHValidateUNC (HWND hwndOwner, PWSTR pszFile, UINT fConnect) { - FIXME("0x%08x 0x%08x 0x%08x stub\n",x,y,z); - return 0; + FIXME("(%p, %s, 0x%08x): stub\n", hwndOwner, debugstr_w(pszFile), fConnect); + return FALSE; } /************************************************************************
1
0
0
0
Damjan Jovanovic : shell32: Fix some return types.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 74fe2989cb87276f9dc488a5ace51a3b398015ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74fe2989cb87276f9dc488a5a…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Wed Jun 20 09:11:27 2012 +0200 shell32: Fix some return types. --- dlls/shell32/brsfolder.c | 2 +- dlls/shell32/control.c | 2 +- dlls/shell32/shlfileop.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c index 38195fe..589ba72 100644 --- a/dlls/shell32/brsfolder.c +++ b/dlls/shell32/brsfolder.c @@ -570,7 +570,7 @@ static HRESULT BrsFolder_Treeview_Changed( browse_info *info, NMTREEVIEWW *pnmtv browsefolder_callback( info->lpBrowseInfo, info->hWnd, BFFM_SELCHANGED, (LPARAM)info->pidlRet ); BrsFolder_CheckValidSelection( info, lptvid ); - return 0; + return S_OK; } static LRESULT BrsFolder_Treeview_Rename(browse_info *info, NMTVDISPINFOW *pnmtv) diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c index d8e4df1..505aff5 100644 --- a/dlls/shell32/control.c +++ b/dlls/shell32/control.c @@ -849,7 +849,7 @@ void WINAPI Control_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdSh HRESULT WINAPI Control_FillCache_RunDLLW(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) { FIXME("%p %p 0x%08x 0x%08x stub\n", hWnd, hModule, w, x); - return 0; + return S_OK; } /************************************************************************* diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 7ae20c1..5fa79a9 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1177,7 +1177,7 @@ static void create_dest_dirs(LPCWSTR szDestDir) } /* the FO_COPY operation */ -static HRESULT copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *flTo) +static DWORD copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *flTo) { DWORD i; const FILE_ENTRY *entryToCopy; @@ -1325,7 +1325,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE } /* the FO_DELETE operation */ -static HRESULT delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom) +static DWORD delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom) { const FILE_ENTRY *fileEntry; DWORD i; @@ -1425,7 +1425,7 @@ static void move_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, co } /* the FO_MOVE operation */ -static HRESULT move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const FILE_LIST *flTo) +static DWORD move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const FILE_LIST *flTo) { DWORD i; const FILE_ENTRY *entryToMove; @@ -1477,7 +1477,7 @@ static HRESULT move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, c } /* the FO_RENAME files */ -static HRESULT rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const FILE_LIST *flTo) +static DWORD rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const FILE_LIST *flTo) { const FILE_ENTRY *feFrom; const FILE_ENTRY *feTo;
1
0
0
0
Aurimas Fišeras : po: Update Lithuanian translation.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 24980e0fa04fab1e9c32f5906d11ffe296ee3ae6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24980e0fa04fab1e9c32f5906…
Author: Aurimas Fišeras <aurimas(a)gmail.com> Date: Wed Jun 20 09:00:45 2012 +0300 po: Update Lithuanian translation. --- po/lt.po | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/po/lt.po b/po/lt.po index 1ef573b..c813285 100644 --- a/po/lt.po +++ b/po/lt.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
http://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2012-06-08 21:40+0300\n" +"PO-Revision-Date: 2012-06-20 09:00+0300\n" "Last-Translator: Aurimas Fišeras <aurimas(a)members.fsf.org>\n" "Language-Team: komp_lt(a)konf.lt\n" "Language: Lithuanian\n" @@ -13653,22 +13653,16 @@ msgid "Help topics: " msgstr "Žinyno temos: " #: wmic.rc:25 -#, fuzzy -#| msgid "Error: Invalid command line parameters\n" msgid "Error: Command line not supported\n" -msgstr "Klaida: Netinkami komandos eilutės parametrai\n" +msgstr "Klaida: Komandos eilutė nepalaikoma\n" #: wmic.rc:26 -#, fuzzy -#| msgid "Property set not found.\n" msgid "Error: Alias not found\n" -msgstr "Savybių aibė nerasta.\n" +msgstr "Klaida: Alternatyvusis vardas nerastas.\n" #: wmic.rc:27 -#, fuzzy -#| msgid "Error: Invalid key name\n" msgid "Error: Invalid query\n" -msgstr "Klaida: Netinkamas rakto vardas\n" +msgstr "Klaida: Netinkama užklausa\n" #: wordpad.rc:28 msgid "&New...\tCtrl+N"
1
0
0
0
Francois Gouget : kernel32/tests: Use the CSTR_XXX macros instead of numeric literals.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 4af794a5b4091cb93d8176fd82a6010b718d0859 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4af794a5b4091cb93d8176fd8…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 20 00:54:18 2012 +0200 kernel32/tests: Use the CSTR_XXX macros instead of numeric literals. --- dlls/kernel32/tests/locale.c | 46 +++++++++++++++++++++--------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index d8a842b..0114dc5 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -1210,27 +1210,27 @@ static void test_CompareStringA(void) } ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "Salute", -1); - ok (ret== 1, "(Salut/Salute) Expected 1, got %d\n", ret); + ok (ret == CSTR_LESS_THAN, "(Salut/Salute) Expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "SaLuT", -1); - ok (ret== 2, "(Salut/SaLuT) Expected 2, got %d\n", ret); + ok (ret == CSTR_EQUAL, "(Salut/SaLuT) Expected CSTR_EQUAL, got %d\n", ret); ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "hola", -1); - ok (ret== 3, "(Salut/hola) Expected 3, got %d\n", ret); + ok (ret == CSTR_GREATER_THAN, "(Salut/hola) Expected CSTR_GREATER_THAN, got %d\n", ret); ret = CompareStringA(lcid, NORM_IGNORECASE, "haha", -1, "hoho", -1); - ok (ret== 1, "(haha/hoho) Expected 1, got %d\n", ret); + ok (ret == CSTR_LESS_THAN, "(haha/hoho) Expected CSTR_LESS_THAN, got %d\n", ret); lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); ret = CompareStringA(lcid, NORM_IGNORECASE, "haha", -1, "hoho", -1); - ok (ret== 1, "(haha/hoho) Expected 1, got %d\n", ret); + ok (ret == CSTR_LESS_THAN, "(haha/hoho) Expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(lcid, NORM_IGNORECASE, "haha", -1, "hoho", 0); - ok (ret== 3, "(haha/hoho) Expected 3, got %d\n", ret); + ok (ret == CSTR_GREATER_THAN, "(haha/hoho) Expected CSTR_GREATER_THAN, got %d\n", ret); ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", 5, "saLuT", -1); - ok (ret == 2, "(Salut/saLuT) Expected 2, got %d\n", ret); + ok (ret == CSTR_EQUAL, "(Salut/saLuT) Expected CSTR_EQUAL, got %d\n", ret); /* test for CompareStringA flags */ SetLastError(0xdeadbeef); @@ -1260,52 +1260,52 @@ static void test_CompareStringA(void) if (0) { /* this requires collation table patch to make it MS compatible */ ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "'o", -1, "-o", -1 ); - ok(ret == 1, "'o vs -o expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "'o vs -o expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "'o", -1, "-o", -1 ); - ok(ret == 1, "'o vs -o expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "'o vs -o expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "'", -1, "-", -1 ); - ok(ret == 1, "' vs - expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "' vs - expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "'", -1, "-", -1 ); - ok(ret == 1, "' vs - expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "' vs - expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "`o", -1, "/m", -1 ); - ok(ret == 3, "`o vs /m expected 3, got %d\n", ret); + ok(ret == CSTR_GREATER_THAN, "`o vs /m CSTR_GREATER_THAN got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "/m", -1, "`o", -1 ); - ok(ret == 1, "/m vs `o expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "/m vs `o expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "`o", -1, "/m", -1 ); - ok(ret == 3, "`o vs /m expected 3, got %d\n", ret); + ok(ret == CSTR_GREATER_THAN, "`o vs /m CSTR_GREATER_THAN got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "/m", -1, "`o", -1 ); - ok(ret == 1, "/m vs `o expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "/m vs `o expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "`o", -1, "-m", -1 ); - ok(ret == 1, "`o vs -m expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "`o vs -m expected CSTR_LESS_THAN, got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "-m", -1, "`o", -1 ); - ok(ret == 3, "-m vs `o expected 3, got %d\n", ret); + ok(ret == CSTR_GREATER_THAN, "-m vs `o CSTR_GREATER_THAN got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "`o", -1, "-m", -1 ); - ok(ret == 3, "`o vs -m expected 3, got %d\n", ret); + ok(ret == CSTR_GREATER_THAN, "`o vs -m CSTR_GREATER_THAN got %d\n", ret); ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "-m", -1, "`o", -1 ); - ok(ret == 1, "-m vs `o expected 1, got %d\n", ret); + ok(ret == CSTR_LESS_THAN, "-m vs `o expected CSTR_LESS_THAN, got %d\n", ret); } /* WinXP handles embedded NULLs differently than earlier versions */ ret = CompareStringA(LOCALE_USER_DEFAULT, 0, "aLuZkUtZ", 8, "aLuZkUtZ\0A", 10); - ok(ret == 1 || ret == 2, "aLuZkUtZ vs aLuZkUtZ\\0A expected 1 or 2, got %d\n", ret); + ok(ret == CSTR_LESS_THAN || ret == CSTR_EQUAL, "aLuZkUtZ vs aLuZkUtZ\\0A expected CSTR_LESS_THAN or CSTR_EQUAL, got %d\n", ret); ret = CompareStringA(LOCALE_USER_DEFAULT, 0, "aLu\0ZkUtZ", 8, "aLu\0ZkUtZ\0A", 10); - ok(ret == 1 || ret == 2, "aLu\\0ZkUtZ vs aLu\\0ZkUtZ\\0A expected 1 or 2, got %d\n", ret); + ok(ret == CSTR_LESS_THAN || ret == CSTR_EQUAL, "aLu\\0ZkUtZ vs aLu\\0ZkUtZ\\0A expected CSTR_LESS_THAN or CSTR_EQUAL, got %d\n", ret); ret = CompareStringA(lcid, 0, "a\0b", -1, "a", -1); - ok(ret == 2, "a vs a expected 2, got %d\n", ret); + ok(ret == CSTR_EQUAL, "a vs a expected CSTR_EQUAL, got %d\n", ret); ret = CompareStringA(lcid, 0, "a\0b", 4, "a", 2); ok(ret == CSTR_EQUAL || /* win2k */ @@ -1313,7 +1313,7 @@ static void test_CompareStringA(void) "a\\0b vs a expected CSTR_EQUAL or CSTR_GREATER_THAN, got %d\n", ret); ret = CompareStringA(lcid, 0, "\2", 2, "\1", 2); - todo_wine ok(ret != 2, "\\2 vs \\1 expected unequal\n"); + todo_wine ok(ret != CSTR_EQUAL, "\\2 vs \\1 expected unequal\n"); ret = CompareStringA(lcid, NORM_IGNORECASE | LOCALE_USE_CP_ACP, "#", -1, ".", -1); todo_wine ok(ret == CSTR_LESS_THAN, "\"#\" vs \".\" expected CSTR_LESS_THAN, got %d\n", ret);
1
0
0
0
Francois Gouget : msvcp90: Use the CSTR_XXX macros instead of numeric literals.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 5adf447d7b679ac6bead2ed1751c1c3ac7bdfa69 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5adf447d7b679ac6bead2ed17…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 20 00:54:01 2012 +0200 msvcp90: Use the CSTR_XXX macros instead of numeric literals. --- dlls/msvcp90/locale.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 5ca0148..e415807 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -784,7 +784,7 @@ int __cdecl _Strcoll(const char *first1, const char *last1, const char *first2, lcid = coll->handle; else lcid = ___lc_handle_func()[LC_COLLATE]; - return CompareStringA(lcid, 0, first1, last1-first1, first2, last2-first2)-2; + return CompareStringA(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL; } /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */ @@ -1045,7 +1045,7 @@ int __cdecl _Wcscoll(const wchar_t *first1, const wchar_t *last1, const wchar_t lcid = coll->handle; else lcid = ___lc_handle_func()[LC_COLLATE]; - return CompareStringW(lcid, 0, first1, last1-first1, first2, last2-first2)-2; + return CompareStringW(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL; } /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1
0
0
0
Francois Gouget : comctl32: Fix lstrncmpiW() so its return value is standard and use the CSTR_XXX macros.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: bede13b335566a5aaf5c8ebf2f48a691068b25f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bede13b335566a5aaf5c8ebf2…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 20 00:53:56 2012 +0200 comctl32: Fix lstrncmpiW() so its return value is standard and use the CSTR_XXX macros. --- dlls/comctl32/listview.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 27b2fd0..e1b9a71 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -559,11 +559,8 @@ static inline int textcmpWT(LPCWSTR aw, LPCWSTR bt, BOOL isW) static inline int lstrncmpiW(LPCWSTR s1, LPCWSTR s2, int n) { - int res; - n = min(min(n, lstrlenW(s1)), lstrlenW(s2)); - res = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, s1, n, s2, n); - return res ? res - sizeof(WCHAR) : res; + return CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, s1, n, s2, n) - CSTR_EQUAL; } /******** Debugging functions *****************************************/
1
0
0
0
Francois Gouget : kernel32/tests: Add line-wrapping tests for FormatMessage ().
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 58d7011133f4774c22372587b970e87dc74c4db2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58d7011133f4774c22372587b…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 20 00:51:39 2012 +0200 kernel32/tests: Add line-wrapping tests for FormatMessage(). --- dlls/kernel32/tests/format_msg.c | 127 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 127 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c index 1f56440..50e13f4 100644 --- a/dlls/kernel32/tests/format_msg.c +++ b/dlls/kernel32/tests/format_msg.c @@ -997,6 +997,132 @@ static void test_message_ignore_inserts_wide(void) ok(!lstrcmpW(s_2sp, out), "Expected output string \" \", got %s\n", wine_dbgstr_w(out)); } +static void test_message_wrap(void) +{ + DWORD ret; + int i; + CHAR in[300], out[300], ref[300]; + + /* No need for wrapping */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 20, + "short long line", 0, 0, out, sizeof(out), NULL); + ok(ret == 15, "Expected FormatMessageW to return 15, got %d\n", ret); + ok(!strcmp("short long line", out),"failed out=[%s]\n",out); + + /* Wrap the last word */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short long\r\nline", out),"failed out=[%s]\n",out); + + /* Strictly less than 10 characters per line! */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 10, + "short long line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong line", out),"failed out=[%s]\n",out); + + /* Word longer than the line */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, + "shortlongline", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 15, "Expected FormatMessageW to return 15, got %d\n", ret); + todo_wine ok(!strcmp("shortlon\r\ngline", out),"failed out=[%s]\n",out); + + /* Wrap the line multiple times */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 7, + "short long line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong\r\nline", out),"failed out=[%s]\n",out); + + /* '\n's in the source are ignored */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short\nlong line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short long\r\nline", out),"failed out=[%s]\n",out); + + /* '%n's are converted into line feeds */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short%n%nlong line", 0, 0, out, sizeof(out), NULL); + ok(ret == 18, "Expected FormatMessageW to return 18, got %d\n", ret); + ok(!strcmp("short\r\n\r\nlong line", out),"failed out=[%s]\n",out); + + /* '%n's count as starting a new line and combine with line wrapping */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 10, + "short%nlong line", 0, 0, out, sizeof(out), NULL); + ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(!strcmp("short\r\nlong line", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, + "short%nlong line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong\r\nline", out),"failed out=[%s]\n",out); + + /* '%r's also count as starting a new line and all */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 10, + "short%rlong line", 0, 0, out, sizeof(out), NULL); + ok(ret == 15, "Expected FormatMessageW to return 15, got %d\n", ret); + ok(!strcmp("short\rlong line", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, + "short%rlong line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\rlong\r\nline", out),"failed out=[%s]\n",out); + + /* IGNORE_INSERTS does not prevent line wrapping or disable '%n' */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | 8, + "short%nlong line%1", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 19, "Expected FormatMessageW to return 19, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong\r\nline%1", out),"failed out=[%s]\n",out); + + /* MAX_WIDTH_MASK is the same as specifying an infinite line width */ + strcpy(in, "first line%n"); + strcpy(ref, "first line\r\n"); + for (i=0; i < 26; i++) + { + strcat(in, "123456789 "); + strcat(ref, "123456789 "); + } + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, + in, 0, 0, out, sizeof(out), NULL); + ok(ret == 272, "Expected FormatMessageW to return 272, got %d\n", ret); + ok(!strcmp(ref, out),"failed out=[%s]\n",out); + + /* Wrapping and non-space characters */ + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long\tline", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong\tline", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long-line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong-line", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long_line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong_line", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long.line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong.line", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long,line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong,line", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long!line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong!line", out),"failed out=[%s]\n",out); + + ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, + "short long?line", 0, 0, out, sizeof(out), NULL); + todo_wine ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + todo_wine ok(!strcmp("short\r\nlong?line", out),"failed out=[%s]\n",out); +} + static void test_message_insufficient_buffer(void) { static const char init_buf[] = {'x', 'x', 'x', 'x', 'x'}; @@ -1593,6 +1719,7 @@ START_TEST(format_msg) test_message_from_string(); test_message_ignore_inserts(); + test_message_wrap(); test_message_insufficient_buffer(); test_message_null_buffer(); test_message_allocate_buffer();
1
0
0
0
Aric Stewart : usp10: Add ShapeCharGlyphProp_Hebrew.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 91f161c8b1681fa4985a59671abddcfc0a6ddd9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91f161c8b1681fa4985a59671…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Jun 19 13:57:26 2012 -0500 usp10: Add ShapeCharGlyphProp_Hebrew. --- dlls/usp10/shape.c | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index c654b07..a99614e 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -65,6 +65,7 @@ typedef VOID (*ShapeCharGlyphPropProc)( HDC , ScriptCache*, SCRIPT_ANALYSIS*, co static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp); static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); +static void ShapeCharGlyphProp_Hebrew( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); static void ShapeCharGlyphProp_None( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); static void ShapeCharGlyphProp_Tibet( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); @@ -398,7 +399,7 @@ static const ScriptShapeData ShapingData[] = {{ latin_features, 2}, NULL, 0, NULL, NULL}, {{ arabic_features, 6}, required_arabic_features, 0, ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, {{ arabic_features, 6}, required_arabic_features, 0, ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, - {{ hebrew_features, 1}, NULL, 0, ContextualShape_Hebrew, NULL}, + {{ hebrew_features, 1}, NULL, 0, ContextualShape_Hebrew, ShapeCharGlyphProp_Hebrew}, {{ syriac_features, 4}, required_syriac_features, 0, ContextualShape_Syriac, ShapeCharGlyphProp_None}, {{ arabic_features, 6}, required_arabic_features, 0, ContextualShape_Arabic, ShapeCharGlyphProp_Arabic}, {{ NULL, 0}, NULL, 0, ContextualShape_Thaana, ShapeCharGlyphProp_None}, @@ -2836,6 +2837,36 @@ static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSI HeapFree(GetProcessHeap(),0,spaces); } +static void ShapeCharGlyphProp_Hebrew( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ) +{ + int i,k; + + for (i = 0; i < cGlyphs; i++) + { + int char_index[20]; + int char_count = 0; + + k = USP10_FindGlyphInLogClust(pwLogClust, cChars, i); + if (k>=0) + { + for (; k < cChars && pwLogClust[k] == i; k++) + char_index[char_count++] = k; + } + + if (char_count == 0) + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + else + { + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_CHARACTER; + if (char_count ==1 && pwcChars[char_index[0]] == 0x0020) /* space */ + pCharProp[char_index[0]].fCanGlyphAlone = 1; + } + } + + OpenType_GDEF_UpdateGlyphProps(hdc, psc, pwGlyphs, cGlyphs, pwLogClust, cChars, pGlyphProp); + UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); +} + static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ) { int i;
1
0
0
0
Andrew Eikum : hhctrl.ocx: Don't use GWLP_USERDATA to store private data.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 8041c9bd8eda5d8b15cfbfa4468bf6f44e5e4341 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8041c9bd8eda5d8b15cfbfa44…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Jun 19 13:22:46 2012 -0500 hhctrl.ocx: Don't use GWLP_USERDATA to store private data. --- dlls/hhctrl.ocx/help.c | 44 ++++++++++++++++++++++---------------------- 1 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index fb9ea08..e42fb6d 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -227,7 +227,7 @@ static void SB_OnLButtonDown(HWND hWnd, WPARAM wParam, LPARAM lParam) static void SB_OnLButtonUp(HWND hWnd, WPARAM wParam, LPARAM lParam) { - HHInfo *pHHInfo = (HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + HHInfo *pHHInfo = (HHInfo *)GetWindowLongPtrW(hWnd, 0); POINT pt; pt.x = (short)LOWORD(lParam); @@ -278,7 +278,7 @@ static void HH_RegisterSizeBarClass(HHInfo *pHHInfo) wcex.style = 0; wcex.lpfnWndProc = SizeBar_WndProc; wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; + wcex.cbWndExtra = sizeof(LONG_PTR); wcex.hInstance = hhctrl_hinstance; wcex.hIcon = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION); wcex.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_SIZEWE); @@ -324,7 +324,7 @@ static BOOL HH_AddSizeBar(HHInfo *pHHInfo) return FALSE; /* store the pointer to the HH info struct */ - SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)pHHInfo); + SetWindowLongPtrW(hWnd, 0, (LONG_PTR)pHHInfo); pHHInfo->hwndSizeBar = hWnd; return TRUE; @@ -428,7 +428,7 @@ static void ResizeTabChild(HHInfo *info, int tab) static LRESULT Child_OnSize(HWND hwnd) { - HHInfo *info = (HHInfo*)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + HHInfo *info = (HHInfo*)GetWindowLongPtrW(hwnd, 0); RECT rect; if(!info || hwnd != info->WinType.hwndNavigation) @@ -447,7 +447,7 @@ static LRESULT Child_OnSize(HWND hwnd) static LRESULT OnTabChange(HWND hwnd) { - HHInfo *info = (HHInfo*)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + HHInfo *info = (HHInfo*)GetWindowLongPtrW(hwnd, 0); int tab_id, tab_index, i; TRACE("%p\n", hwnd); @@ -586,7 +586,7 @@ static LRESULT CALLBACK Child_WndProc(HWND hWnd, UINT message, WPARAM wParam, LP case WM_SIZE: return Child_OnSize(hWnd); case WM_NOTIFY: { - HHInfo *info = (HHInfo*)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + HHInfo *info = (HHInfo*)GetWindowLongPtrW(hWnd, 0); NMHDR *nmhdr = (NMHDR*)lParam; switch(nmhdr->code) { @@ -669,7 +669,7 @@ static void HH_RegisterChildWndClass(HHInfo *pHHInfo) wcex.style = 0; wcex.lpfnWndProc = Child_WndProc; wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; + wcex.cbWndExtra = sizeof(LONG_PTR); wcex.hInstance = hhctrl_hinstance; wcex.hIcon = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION); wcex.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); @@ -735,7 +735,7 @@ static void DisplayPopupMenu(HHInfo *info) static void TB_OnClick(HWND hWnd, DWORD dwID) { - HHInfo *info = (HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + HHInfo *info = (HHInfo *)GetWindowLongPtrW(hWnd, 0); switch (dwID) { @@ -967,7 +967,7 @@ static BOOL HH_AddNavigationPane(HHInfo *info) if (!hWnd) return FALSE; - SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)info); + SetWindowLongPtrW(hWnd, 0, (LONG_PTR)info); hwndTabCtrl = CreateWindowExW(dwExStyles, WC_TABCONTROLW, szEmpty, dwStyles | WS_VISIBLE, 0, TAB_TOP_PADDING, @@ -1039,7 +1039,7 @@ static BOOL HH_AddHTMLPane(HHInfo *pHHInfo) return FALSE; /* store the pointer to the HH info struct */ - SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)pHHInfo); + SetWindowLongPtrW(hWnd, 0, (LONG_PTR)pHHInfo); ShowWindow(hWnd, SW_SHOW); UpdateWindow(hWnd); @@ -1151,7 +1151,7 @@ static BOOL AddSearchTab(HHInfo *info) info->search.hwndContainer = hwndContainer; info->tabs[TAB_SEARCH].hwnd = hwndContainer; - SetWindowLongPtrW(hwndContainer, GWLP_USERDATA, (LONG_PTR)info); + SetWindowLongPtrW(hwndContainer, 0, (LONG_PTR)info); ResizeTabChild(info, TAB_SEARCH); @@ -1191,7 +1191,7 @@ static void ResizePopupChild(HHInfo *info) static LRESULT CALLBACK HelpPopup_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - HHInfo *info = (HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + HHInfo *info = (HHInfo *)GetWindowLongPtrW(hWnd, 0); switch (message) { @@ -1221,7 +1221,7 @@ static LRESULT CALLBACK PopupChild_WndProc(HWND hWnd, UINT message, WPARAM wPara switch(nmhdr->code) { case NM_DBLCLK: { - HHInfo *info = (HHInfo*)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + HHInfo *info = (HHInfo*)GetWindowLongPtrW(hWnd, 0); IndexSubItem *iter; if(info == 0 || lParam == 0) @@ -1234,7 +1234,7 @@ static LRESULT CALLBACK PopupChild_WndProc(HWND hWnd, UINT message, WPARAM wPara return 0; } case NM_RETURN: { - HHInfo *info = (HHInfo*)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + HHInfo *info = (HHInfo*)GetWindowLongPtrW(hWnd, 0); IndexSubItem *iter; LVITEMW lvItem; @@ -1276,7 +1276,7 @@ static BOOL AddIndexPopup(HHInfo *info) wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = HelpPopup_WndProc; wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; + wcex.cbWndExtra = sizeof(LONG_PTR); wcex.hInstance = hhctrl_hinstance; wcex.hIcon = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION); wcex.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); @@ -1290,7 +1290,7 @@ static BOOL AddIndexPopup(HHInfo *info) wcex.style = 0; wcex.lpfnWndProc = PopupChild_WndProc; wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; + wcex.cbWndExtra = sizeof(LONG_PTR); wcex.hInstance = hhctrl_hinstance; wcex.hIcon = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION); wcex.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); @@ -1338,8 +1338,8 @@ static BOOL AddIndexPopup(HHInfo *info) info->popup.hwndCallback = hwndCallback; info->popup.hwndPopup = hwndPopup; info->popup.hwndList = hwndList; - SetWindowLongPtrW(hwndPopup, GWLP_USERDATA, (LONG_PTR)info); - SetWindowLongPtrW(hwndCallback, GWLP_USERDATA, (LONG_PTR)info); + SetWindowLongPtrW(hwndPopup, 0, (LONG_PTR)info); + SetWindowLongPtrW(hwndCallback, 0, (LONG_PTR)info); ResizePopupChild(info); ShowWindow(hwndList, SW_SHOW); @@ -1382,7 +1382,7 @@ static void ExpandContract(HHInfo *pHHInfo) static LRESULT Help_OnSize(HWND hWnd) { - HHInfo *pHHInfo = (HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + HHInfo *pHHInfo = (HHInfo *)GetWindowLongPtrW(hWnd, 0); DWORD dwSize; RECT rc; @@ -1423,7 +1423,7 @@ static LRESULT CALLBACK Help_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPA case WM_SIZE: return Help_OnSize(hWnd); case WM_CLOSE: - ReleaseHelpViewer((HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA)); + ReleaseHelpViewer((HHInfo *)GetWindowLongPtrW(hWnd, 0)); return 0; case WM_DESTROY: if(hh_process) @@ -1454,7 +1454,7 @@ static BOOL HH_CreateHelpWindow(HHInfo *info) wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = Help_WndProc; wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; + wcex.cbWndExtra = sizeof(LONG_PTR); wcex.hInstance = hhctrl_hinstance; wcex.hIcon = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION); wcex.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); @@ -1518,7 +1518,7 @@ static BOOL HH_CreateHelpWindow(HHInfo *info) UpdateWindow(hWnd); /* store the pointer to the HH info struct */ - SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)info); + SetWindowLongPtrW(hWnd, 0, (LONG_PTR)info); info->WinType.hwndHelp = hWnd; return TRUE;
1
0
0
0
Hilko Bengen : sfnt2fnt: Fix broken .fon files on big-endian architectures.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: fb16ce1fe092438216e878a9d5fad63d06100caa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb16ce1fe092438216e878a9d…
Author: Hilko Bengen <bengen(a)hilluzination.de> Date: Mon Jun 18 23:27:49 2012 +0200 sfnt2fnt: Fix broken .fon files on big-endian architectures. --- tools/sfnt2fnt.c | 135 ++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 102 insertions(+), 33 deletions(-) diff --git a/tools/sfnt2fnt.c b/tools/sfnt2fnt.c index df43ec0..07c82b1 100644 --- a/tools/sfnt2fnt.c +++ b/tools/sfnt2fnt.c @@ -43,6 +43,7 @@ #include "wine/unicode.h" #include "wingdi.h" +#include "basetsd.h" #include "pshpack1.h" @@ -187,11 +188,30 @@ typedef struct } FT_Version_t; static FT_Version_t FT_Version; +#include "poppack.h" + #define GET_BE_WORD(ptr) MAKEWORD( ((BYTE *)(ptr))[1], ((BYTE *)(ptr))[0] ) #define GET_BE_DWORD(ptr) ((DWORD)MAKELONG( GET_BE_WORD(&((WORD *)(ptr))[1]), \ GET_BE_WORD(&((WORD *)(ptr))[0]) )) - -#include "poppack.h" +#ifdef WORDS_BIGENDIAN +static WORD byteswap_word(WORD x) +{ + return ( ( (x & 0xff) << 8) | + ( (x & 0xff00) >> 8) ); +} +static DWORD byteswap_dword(DWORD x) +{ + return ( ( (x & 0xff) << 24) | + ( (x & 0xff00) << 8) | + ( (x & 0xff0000) >> 8) | + ( (x & 0xff000000) >> 24) ); +} +# define PUT_LE_WORD(x) byteswap_word(x) +# define PUT_LE_DWORD(x) byteswap_dword(x) +#else +# define PUT_LE_WORD(x) (x) +# define PUT_LE_DWORD(x) (x) +#endif struct fontinfo { @@ -378,7 +398,7 @@ static struct fontinfo *fill_fontinfo( const char *face_name, int ppem, int enc, size_table = (bitmapSizeTable_t *)(eblc + 1); for(i = 0; i < num_sizes; i++) { - if(size_table->hori.ascender - size_table->hori.descender == ppem) + if( (signed char)size_table->hori.ascender - (signed char)size_table->hori.descender == ppem) { ascent = size_table->hori.ascender; break; @@ -570,11 +590,50 @@ static struct fontinfo *fill_fontinfo( const char *face_name, int ppem, int enc, return info; } +static void adjust_fontinfo( FONTINFO16 * fi ) +{ + fi->dfType = PUT_LE_WORD(fi->dfType); + fi->dfPoints = PUT_LE_WORD(fi->dfPoints); + fi->dfVertRes = PUT_LE_WORD(fi->dfVertRes); + fi->dfHorizRes = PUT_LE_WORD(fi->dfHorizRes); + fi->dfAscent = PUT_LE_WORD(fi->dfAscent); + fi->dfInternalLeading = PUT_LE_WORD(fi->dfInternalLeading); + fi->dfExternalLeading = PUT_LE_WORD(fi->dfExternalLeading); + fi->dfWeight = PUT_LE_WORD(fi->dfWeight); + fi->dfPixWidth = PUT_LE_WORD(fi->dfPixWidth); + fi->dfPixHeight = PUT_LE_WORD(fi->dfPixHeight); + fi->dfAvgWidth = PUT_LE_WORD(fi->dfAvgWidth); + fi->dfMaxWidth = PUT_LE_WORD(fi->dfMaxWidth); + fi->dfWidthBytes = PUT_LE_WORD(fi->dfWidthBytes); + fi->dfAspace = PUT_LE_WORD(fi->dfAspace); + fi->dfBspace = PUT_LE_WORD(fi->dfBspace); + fi->dfCspace = PUT_LE_WORD(fi->dfCspace); + fi->dfDevice = PUT_LE_DWORD(fi->dfDevice); + fi->dfFace = PUT_LE_DWORD(fi->dfFace); + fi->dfBitsPointer = PUT_LE_DWORD(fi->dfBitsPointer); + fi->dfBitsOffset = PUT_LE_DWORD(fi->dfBitsOffset); + fi->dfFlags = PUT_LE_DWORD(fi->dfFlags); + fi->dfColorPointer = PUT_LE_DWORD(fi->dfColorPointer); +} + static void write_fontinfo( const struct fontinfo *info, FILE *fp ) { - fwrite( &info->hdr, sizeof(info->hdr), 1, fp ); - fwrite( info->dfCharTable + info->hdr.fi.dfFirstChar, sizeof(*info->dfCharTable), - ((unsigned char)info->hdr.fi.dfLastChar - (unsigned char)info->hdr.fi.dfFirstChar) + 3, fp ); + FNT_HEADER tmp_hdr; + int num_chars, i; + CHAR_TABLE_ENTRY tmp_chartable[258]; + memcpy(&tmp_hdr, &info->hdr, sizeof(info->hdr)); + tmp_hdr.dfVersion = PUT_LE_WORD(tmp_hdr.dfVersion); + tmp_hdr.dfSize = PUT_LE_DWORD(tmp_hdr.dfSize); + adjust_fontinfo(&(tmp_hdr.fi)); + fwrite( &tmp_hdr, sizeof(info->hdr), 1, fp ); + num_chars = ((unsigned char)info->hdr.fi.dfLastChar - (unsigned char)info->hdr.fi.dfFirstChar) + 3; + + memcpy(&tmp_chartable, info->dfCharTable + info->hdr.fi.dfFirstChar, num_chars * sizeof(CHAR_TABLE_ENTRY)); + for (i=0; i < num_chars; ++i) { + tmp_chartable[i].width = PUT_LE_WORD(tmp_chartable[i].width); + tmp_chartable[i].offset = PUT_LE_DWORD(tmp_chartable[i].offset); + } + fwrite( tmp_chartable, sizeof(CHAR_TABLE_ENTRY), num_chars, fp ); fwrite( info->data, info->hdr.dfSize - info->hdr.fi.dfBitsOffset, 1, fp ); } @@ -630,6 +689,7 @@ int main(int argc, char **argv) struct fontinfo **info; char *input_file; char **args; + short tmp16; args = parse_options( argc, argv ); @@ -696,21 +756,21 @@ int main(int argc, char **argv) non_resident_name_off = sizeof(MZ_hdr) + module_ref_off + sizeof(align); memset(&NE_hdr, 0, sizeof(NE_hdr)); - NE_hdr.ne_magic = 0x454e; + NE_hdr.ne_magic = PUT_LE_WORD(0x454e); NE_hdr.ne_ver = 5; NE_hdr.ne_rev = 1; - NE_hdr.ne_flags = NE_FFLAGS_LIBMODULE | NE_FFLAGS_GUI; - NE_hdr.ne_cbnrestab = non_resident_name_len; - NE_hdr.ne_segtab = sizeof(NE_hdr); - NE_hdr.ne_rsrctab = sizeof(NE_hdr); - NE_hdr.ne_restab = resident_name_off; - NE_hdr.ne_modtab = module_ref_off; - NE_hdr.ne_imptab = module_ref_off; + NE_hdr.ne_flags = PUT_LE_WORD(NE_FFLAGS_LIBMODULE | NE_FFLAGS_GUI); + NE_hdr.ne_cbnrestab = PUT_LE_WORD(non_resident_name_len); + NE_hdr.ne_segtab = PUT_LE_WORD(sizeof(NE_hdr)); + NE_hdr.ne_rsrctab = PUT_LE_WORD(sizeof(NE_hdr)); + NE_hdr.ne_restab = PUT_LE_WORD(resident_name_off); + NE_hdr.ne_modtab = PUT_LE_WORD(module_ref_off); + NE_hdr.ne_imptab = PUT_LE_WORD(module_ref_off); NE_hdr.ne_enttab = NE_hdr.ne_modtab; - NE_hdr.ne_nrestab = non_resident_name_off; - NE_hdr.ne_align = 4; + NE_hdr.ne_nrestab = PUT_LE_DWORD(non_resident_name_off); + NE_hdr.ne_align = PUT_LE_WORD(4); NE_hdr.ne_exetyp = NE_OSFLAGS_WINDOWS; - NE_hdr.ne_expver = 0x400; + NE_hdr.ne_expver = PUT_LE_WORD(0x400); fontdir_off = (non_resident_name_off + non_resident_name_len + 15) & ~0xf; font_off = (fontdir_off + fontdir_len + 15) & ~0x0f; @@ -749,34 +809,34 @@ int main(int argc, char **argv) fwrite(MZ_hdr, sizeof(MZ_hdr), 1, ofp); fwrite(&NE_hdr, sizeof(NE_hdr), 1, ofp); - align = 4; + align = PUT_LE_WORD(4); fwrite(&align, sizeof(align), 1, ofp); - rc_type.type_id = NE_RSCTYPE_FONTDIR; - rc_type.count = 1; + rc_type.type_id = PUT_LE_WORD(NE_RSCTYPE_FONTDIR); + rc_type.count = PUT_LE_WORD(1); rc_type.resloader = 0; fwrite(&rc_type, sizeof(rc_type), 1, ofp); - rc_name.offset = fontdir_off >> 4; - rc_name.length = (fontdir_len + 15) >> 4; - rc_name.flags = NE_SEGFLAGS_MOVEABLE | NE_SEGFLAGS_PRELOAD; - rc_name.id = resident_name_off - sizeof("FONTDIR") - NE_hdr.ne_rsrctab; + rc_name.offset = PUT_LE_WORD(fontdir_off >> 4); + rc_name.length = PUT_LE_WORD((fontdir_len + 15) >> 4); + rc_name.flags = PUT_LE_WORD(NE_SEGFLAGS_MOVEABLE | NE_SEGFLAGS_PRELOAD); + rc_name.id = PUT_LE_WORD(resident_name_off - sizeof("FONTDIR") - sizeof(NE_hdr)); rc_name.handle = 0; rc_name.usage = 0; fwrite(&rc_name, sizeof(rc_name), 1, ofp); - rc_type.type_id = NE_RSCTYPE_FONT; - rc_type.count = num_files; + rc_type.type_id = PUT_LE_WORD(NE_RSCTYPE_FONT); + rc_type.count = PUT_LE_WORD(num_files); rc_type.resloader = 0; fwrite(&rc_type, sizeof(rc_type), 1, ofp); for(res = first_res | 0x8000, i = 0; i < num_files; i++, res++) { int len = (info[i]->hdr.dfSize + 15) & ~0xf; - rc_name.offset = font_off >> 4; - rc_name.length = len >> 4; - rc_name.flags = NE_SEGFLAGS_MOVEABLE | NE_SEGFLAGS_SHAREABLE | NE_SEGFLAGS_DISCARDABLE; - rc_name.id = res; + rc_name.offset = PUT_LE_WORD(font_off >> 4); + rc_name.length = PUT_LE_WORD(len >> 4); + rc_name.flags = PUT_LE_WORD(NE_SEGFLAGS_MOVEABLE | NE_SEGFLAGS_SHAREABLE | NE_SEGFLAGS_DISCARDABLE); + rc_name.id = PUT_LE_WORD(res); rc_name.handle = 0; rc_name.usage = 0; fwrite(&rc_name, sizeof(rc_name), 1, ofp); @@ -812,12 +872,21 @@ int main(int argc, char **argv) fputc(0x00, ofp); /* FONTDIR resource */ - fwrite(&num_files, sizeof(num_files), 1, ofp); + tmp16 = PUT_LE_WORD(num_files); + fwrite(&tmp16, sizeof(tmp16), 1, ofp); for(res = first_res, i = 0; i < num_files; i++, res++) { + FNT_HEADER tmp_hdr; + int sz; const char *name = get_face_name( info[i] ); - fwrite(&res, sizeof(res), 1, ofp); - fwrite(&info[i]->hdr, FIELD_OFFSET(FNT_HEADER,fi.dfBitsOffset), 1, ofp); + tmp16 = PUT_LE_WORD(res); + fwrite(&tmp16, sizeof(tmp16), 1, ofp); + sz = FIELD_OFFSET(FNT_HEADER,fi.dfBitsOffset); + memcpy(&tmp_hdr, &info[i]->hdr, sz); + tmp_hdr.dfVersion = PUT_LE_WORD(tmp_hdr.dfVersion); + tmp_hdr.dfSize = PUT_LE_DWORD(tmp_hdr.dfSize); + adjust_fontinfo(&(tmp_hdr.fi)); + fwrite(&tmp_hdr, FIELD_OFFSET(FNT_HEADER,fi.dfBitsOffset), 1, ofp); fputc(0x00, ofp); fwrite(name, strlen(name) + 1, 1, ofp); }
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200