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
Per Johansson : ws2_32: In WSAIoctl(SIO_GET_INTERFACE_LIST), skip interfaces with no IPv4 address.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: a239e8ed27b1c3cde6bc568c3d7b9996a9e846b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a239e8ed27b1c3cde6bc568c3…
Author: Per Johansson <per(a)morth.org> Date: Thu Jun 21 14:13:09 2012 +0200 ws2_32: In WSAIoctl(SIO_GET_INTERFACE_LIST), skip interfaces with no IPv4 address. --- dlls/ws2_32/socket.c | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index b2bed09..51016b7 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3195,27 +3195,27 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID { PIP_ADAPTER_INFO ptr; - if (size*sizeof(INTERFACE_INFO)/sizeof(IP_ADAPTER_INFO) > out_size) - { - WARN("Buffer too small = %u, out_size = %u\n", size, out_size); - HeapFree(GetProcessHeap(),0,table); - release_sock_fd( s, fd ); - status = WSAEFAULT; - break; - } - for (ptr = table, numInt = 0; ptr; - ptr = ptr->Next, intArray++, numInt++) + for (ptr = table, numInt = 0; ptr; ptr = ptr->Next) { unsigned int addr, mask, bcast; struct ifreq ifInfo; + /* Skip interfaces without an IPv4 address. */ + if (ptr->IpAddressList.IpAddress.String[0] == '\0') + continue; + + if ((numInt + 1)*sizeof(INTERFACE_INFO)/sizeof(IP_ADAPTER_INFO) > out_size) + { + WARN("Buffer too small = %u, out_size = %u\n", numInt + 1, out_size); + status = WSAEFAULT; + break; + } + /* Socket Status Flags */ lstrcpynA(ifInfo.ifr_name, ptr->AdapterName, IFNAMSIZ); if (ioctl(fd, SIOCGIFFLAGS, &ifInfo) < 0) { ERR("Error obtaining status flags for socket!\n"); - HeapFree(GetProcessHeap(),0,table); - release_sock_fd( s, fd ); status = WSAEINVAL; break; } @@ -3255,6 +3255,8 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID intArray->iiBroadcastAddress.AddressIn.sin_port = 0; intArray->iiBroadcastAddress.AddressIn.sin_addr. WS_s_addr = bcast; + intArray++; + numInt++; } } else
1
0
0
0
Frédéric Delanoy : po: Update French translation.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 485d3531837e157047ce588fc0fdcdac181a92f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=485d3531837e157047ce588fc…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Jun 22 07:46:28 2012 +0200 po: Update French translation. --- po/fr.po | 40 +++++++++++++--------------------------- 1 files changed, 13 insertions(+), 27 deletions(-) diff --git a/po/fr.po b/po/fr.po index 1e47f2d..1c9f252 100644 --- a/po/fr.po +++ b/po/fr.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-05-10 23:36+0100\n" +"PO-Revision-Date: 2012-06-22 07:46+0100\n" "Last-Translator: Frédéric Delanoy <frederic.delanoy(a)gmail.com>\n" "Language-Team: none\n" "Language: French\n" @@ -3448,47 +3448,39 @@ msgstr "Haute" #: joy.rc:33 msgid "Joysticks" -msgstr "" +msgstr "Joysticks" #: joy.rc:36 winecfg.rc:204 msgid "&Disable" -msgstr "&désactivé" +msgstr "&Désactiver" #: joy.rc:37 -#, fuzzy -#| msgid "&enable" msgid "&Enable" -msgstr "&activer" +msgstr "&Activer" #: joy.rc:38 -#, fuzzy -#| msgid "Disconnected" msgid "Connected" -msgstr "Déconnecté" +msgstr "Connecté" #: joy.rc:40 -#, fuzzy -#| msgid "&Disable" msgid "Disabled" -msgstr "&désactivé" +msgstr "Désactivé" #: joy.rc:46 msgid "Test Joystick" -msgstr "" +msgstr "Tester le joystick" #: joy.rc:50 msgid "Buttons" -msgstr "" +msgstr "Boutons" #: joy.rc:58 msgid "Test Force Feedback" -msgstr "" +msgstr "Tester le retour de force" #: joy.rc:28 -#, fuzzy -#| msgid "Create Control" msgid "Game Controllers" -msgstr "Créer un contrôle" +msgstr "Contrôleurs de jeu" #: jscript.rc:25 msgid "Error converting object to primitive type" @@ -13792,22 +13784,16 @@ msgid "Help topics: " msgstr "Rubriques d'aide : " #: wmic.rc:25 -#, fuzzy -#| msgid "Error: Invalid command line parameters\n" msgid "Error: Command line not supported\n" -msgstr "Erreur : paramètre de ligne de commande invalide\n" +msgstr "Erreur : ligne de commande invalide\n" #: wmic.rc:26 -#, fuzzy -#| msgid "Property set not found.\n" msgid "Error: Alias not found\n" -msgstr "Jeu de propriétés introuvable.\n" +msgstr "Erreur : alias no trouvé\n" #: wmic.rc:27 -#, fuzzy -#| msgid "Error: Invalid key name\n" msgid "Error: Invalid query\n" -msgstr "Erreur : nom de clé invalide\n" +msgstr "Erreur : requête invalide\n" #: wordpad.rc:28 msgid "&New...\tCtrl+N"
1
0
0
0
Dmitry Timoshkov : kernel32: Add a test for deleting a file opened for reading.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 68ffbaa71875fab4f6c264fced0a5c99c80a9667 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68ffbaa71875fab4f6c264fce…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Jun 21 17:29:17 2012 +0900 kernel32: Add a test for deleting a file opened for reading. --- dlls/kernel32/tests/file.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 8768b99..c6e9f18 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -1291,6 +1291,8 @@ static void test_GetTempFileNameA(void) static void test_DeleteFileA( void ) { BOOL ret; + char temp_path[MAX_PATH], temp_file[MAX_PATH]; + HANDLE hfile; ret = DeleteFileA(NULL); ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || @@ -1308,6 +1310,25 @@ static void test_DeleteFileA( void ) GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_INVALID_FUNCTION), "DeleteFileA(\"nul\") returned ret=%d error=%d\n",ret,GetLastError()); + + GetTempPathA(MAX_PATH, temp_path); + GetTempFileName(temp_path, "tst", 0, temp_file); + + SetLastError(0xdeadbeef); + hfile = CreateFile(temp_file, GENERIC_READ, FILE_SHARE_DELETE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = DeleteFile(temp_file); +todo_wine + ok(ret, "DeleteFile error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = CloseHandle(hfile); + ok(ret, "CloseHandle error %d\n", GetLastError()); + ret = DeleteFile(temp_file); +todo_wine + ok(!ret, "DeleteFile should fail\n"); } static void test_DeleteFileW( void )
1
0
0
0
Dmitry Timoshkov : windowscodecs: Create a IWICMetadataReader for a TIFF frame.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 0a8be86277eb2ce8c1325b948d140ee4cfe7e139 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a8be86277eb2ce8c1325b948…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 19 11:40:10 2012 +0900 windowscodecs: Create a IWICMetadataReader for a TIFF frame. --- dlls/windowscodecs/tiffformat.c | 75 +++++++++++++++++++++++++++++++++++--- 1 files changed, 69 insertions(+), 6 deletions(-) diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 669351d..cd3703f 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -58,9 +58,10 @@ static void *libtiff_handle; #define MAKE_FUNCPTR(f) static typeof(f) * p##f MAKE_FUNCPTR(TIFFClientOpen); MAKE_FUNCPTR(TIFFClose); -MAKE_FUNCPTR(TIFFNumberOfDirectories); +MAKE_FUNCPTR(TIFFCurrentDirOffset); MAKE_FUNCPTR(TIFFGetField); MAKE_FUNCPTR(TIFFIsByteSwapped); +MAKE_FUNCPTR(TIFFNumberOfDirectories); MAKE_FUNCPTR(TIFFReadDirectory); MAKE_FUNCPTR(TIFFReadEncodedStrip); MAKE_FUNCPTR(TIFFReadEncodedTile); @@ -89,9 +90,10 @@ static void *load_libtiff(void) } LOAD_FUNCPTR(TIFFClientOpen); LOAD_FUNCPTR(TIFFClose); - LOAD_FUNCPTR(TIFFNumberOfDirectories); + LOAD_FUNCPTR(TIFFCurrentDirOffset); LOAD_FUNCPTR(TIFFGetField); LOAD_FUNCPTR(TIFFIsByteSwapped); + LOAD_FUNCPTR(TIFFNumberOfDirectories); LOAD_FUNCPTR(TIFFReadDirectory); LOAD_FUNCPTR(TIFFReadEncodedStrip); LOAD_FUNCPTR(TIFFReadEncodedTile); @@ -1133,15 +1135,76 @@ static HRESULT WINAPI TiffFrameDecode_Block_GetContainerFormat(IWICMetadataBlock static HRESULT WINAPI TiffFrameDecode_Block_GetCount(IWICMetadataBlockReader *iface, UINT *count) { - FIXME("(%p,%p): stub\n", iface, count); - return E_NOTIMPL; + TRACE("%p,%p\n", iface, count); + + if (!count) return E_INVALIDARG; + + *count = 1; + return S_OK; +} + +static HRESULT create_metadata_reader(TiffFrameDecode *This, IWICMetadataReader **reader) +{ + HRESULT hr; + LARGE_INTEGER dir_offset; + IWICMetadataReader *metadata_reader; + IWICPersistStream *persist; + + /* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */ + + hr = CoCreateInstance(&CLSID_WICIfdMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&metadata_reader); + if (FAILED(hr)) return hr; + + hr = IWICMetadataReader_QueryInterface(metadata_reader, &IID_IWICPersistStream, (void **)&persist); + if (FAILED(hr)) + { + IWICMetadataReader_Release(metadata_reader); + return hr; + } + + EnterCriticalSection(&This->parent->lock); + + dir_offset.QuadPart = pTIFFCurrentDirOffset(This->parent->tiff); + hr = IStream_Seek(This->parent->stream, dir_offset, STREAM_SEEK_SET, NULL); + if (SUCCEEDED(hr)) + { + BOOL byte_swapped = pTIFFIsByteSwapped(This->parent->tiff); +#ifdef WORDS_BIGENDIAN + DWORD persist_options = byte_swapped ? WICPersistOptionsLittleEndian : WICPersistOptionsBigEndian; +#else + DWORD persist_options = byte_swapped ? WICPersistOptionsBigEndian : WICPersistOptionsLittleEndian; +#endif + persist_options |= WICPersistOptionsNoCacheStream; + hr = IWICPersistStream_LoadEx(persist, This->parent->stream, NULL, persist_options); + if (FAILED(hr)) + ERR("IWICPersistStream_LoadEx error %#x\n", hr); + } + + LeaveCriticalSection(&This->parent->lock); + + IWICPersistStream_Release(persist); + + if (FAILED(hr)) + { + IWICMetadataReader_Release(metadata_reader); + return hr; + } + + *reader = metadata_reader; + return S_OK; } static HRESULT WINAPI TiffFrameDecode_Block_GetReaderByIndex(IWICMetadataBlockReader *iface, UINT index, IWICMetadataReader **reader) { - FIXME("(%p,%u,%p): stub\n", iface, index, reader); - return E_NOTIMPL; + TiffFrameDecode *This = impl_from_IWICMetadataBlockReader(iface); + + TRACE("(%p,%u,%p)\n", iface, index, reader); + + if (!reader || index != 0) return E_INVALIDARG; + + return create_metadata_reader(This, reader); } static HRESULT WINAPI TiffFrameDecode_Block_GetEnumerator(IWICMetadataBlockReader *iface,
1
0
0
0
Erich Hoover : hhctrl.ocx: Add support for the CHM code page.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: a02ad10f99fd0ce6b3d756944a30dcb2852b79ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a02ad10f99fd0ce6b3d756944…
Author: Erich Hoover <ehoover(a)mines.edu> Date: Wed Jun 20 14:31:19 2012 -0600 hhctrl.ocx: Add support for the CHM code page. --- dlls/hhctrl.ocx/chm.c | 8 ++++++++ dlls/hhctrl.ocx/content.c | 8 ++++---- dlls/hhctrl.ocx/help.c | 6 +++--- dlls/hhctrl.ocx/hhctrl.h | 4 +++- dlls/hhctrl.ocx/index.c | 6 +++--- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index f040e5d..f051feb 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -133,6 +133,13 @@ static BOOL ReadChmSystem(CHMInfo *chm) heap_free(chm->defTitle); chm->defTitle = strdupnAtoW(buf, entry.len); break; + case 0x4: + /* TODO: Currently only the Locale ID is loaded from this field */ + TRACE("Locale is: %d\n", *(LCID*)&buf[0]); + if(!GetLocaleInfoW(*(LCID*)&buf[0], LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, + (WCHAR *)&chm->codePage, sizeof(chm->codePage)/sizeof(WCHAR))) + chm->codePage = CP_ACP; + break; case 0x5: TRACE("Default window is %s\n", debugstr_an(buf, entry.len)); break; @@ -416,6 +423,7 @@ CHMInfo *OpenCHM(LPCWSTR szFile) if (!(ret = heap_alloc_zero(sizeof(CHMInfo)))) return NULL; + ret->codePage = CP_ACP; if (!(ret->szFile = strdupW(szFile))) { heap_free(ret); diff --git a/dlls/hhctrl.ocx/content.c b/dlls/hhctrl.ocx/content.c index e0ec794..d246c49 100644 --- a/dlls/hhctrl.ocx/content.c +++ b/dlls/hhctrl.ocx/content.c @@ -50,7 +50,7 @@ static void free_content_item(ContentItem *item) } } -static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const char *text) +static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const char *text, UINT code_page) { const char *ptr; LPWSTR *param, merge; @@ -89,11 +89,11 @@ static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const const char *local = strstr(ptr, "::")+2; int local_len = len-(local-ptr); - item->local = decode_html(local, local_len); + item->local = decode_html(local, local_len, code_page); param = &merge; } - *param = decode_html(ptr, len); + *param = decode_html(ptr, len, code_page); if(param == &merge) { SetChmPath(&item->merge, hhc_root->merge.chm_file, merge); @@ -151,7 +151,7 @@ static ContentItem *parse_sitemap_object(HHInfo *info, stream_t *stream, Content if(!strcasecmp(node_name.buf, "/object")) break; if(!strcasecmp(node_name.buf, "param")) - parse_obj_node_param(item, hhc_root, node.buf); + parse_obj_node_param(item, hhc_root, node.buf, info->pCHMInfo->codePage); strbuf_zero(&node); } diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 1726f05..ef41ec2 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -1793,7 +1793,7 @@ static char find_html_symbol(const char *entity, int entity_len) /* * Decode a string containing HTML encoded characters into a unicode string. */ -WCHAR *decode_html(const char *html_fragment, int html_fragment_len) +WCHAR *decode_html(const char *html_fragment, int html_fragment_len, UINT code_page) { const char *h = html_fragment; char *amp, *sem, symbol, *tmp; @@ -1850,9 +1850,9 @@ WCHAR *decode_html(const char *html_fragment, int html_fragment_len) tmp_len += len; tmp[tmp_len++] = 0; /* NULL-terminate the string */ - len = MultiByteToWideChar(CP_ACP, 0, tmp, tmp_len, NULL, 0); + len = MultiByteToWideChar(code_page, 0, tmp, tmp_len, NULL, 0); unicode_text = heap_alloc(len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, tmp, tmp_len, unicode_text, len); + MultiByteToWideChar(code_page, 0, tmp, tmp_len, unicode_text, len); heap_free(tmp); return unicode_text; } diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index 599b6a5..73b2a6b 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -106,6 +106,8 @@ typedef struct CHMInfo WCHAR *defTopic; WCHAR *defTitle; WCHAR *defToc; + + UINT codePage; } CHMInfo; #define TAB_CONTENTS 0 @@ -193,7 +195,7 @@ void ReleaseSearch(HHInfo *info) DECLSPEC_HIDDEN; LPCWSTR skip_schema(LPCWSTR url) DECLSPEC_HIDDEN; -WCHAR *decode_html(const char *html_fragment, int html_fragment_len); +WCHAR *decode_html(const char *html_fragment, int html_fragment_len, UINT code_page); /* memory allocation functions */ diff --git a/dlls/hhctrl.ocx/index.c b/dlls/hhctrl.ocx/index.c index 3b5053a..3cf69de 100644 --- a/dlls/hhctrl.ocx/index.c +++ b/dlls/hhctrl.ocx/index.c @@ -62,7 +62,7 @@ static void fill_index_tree(HWND hwnd, IndexItem *item) * sub-topic then there isn't really a sub-topic, the index will jump * directly to the requested item. */ -static void parse_index_obj_node_param(IndexItem *item, const char *text) +static void parse_index_obj_node_param(IndexItem *item, const char *text, UINT code_page) { const char *ptr; LPWSTR *param; @@ -109,7 +109,7 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text) return; } - *param = decode_html(ptr, len); + *param = decode_html(ptr, len, code_page); } /* Parse the object tag corresponding to a list item. @@ -137,7 +137,7 @@ static IndexItem *parse_index_sitemap_object(HHInfo *info, stream_t *stream) TRACE("%s\n", node.buf); if(!strcasecmp(node_name.buf, "param")) { - parse_index_obj_node_param(item, node.buf); + parse_index_obj_node_param(item, node.buf, info->pCHMInfo->codePage); }else if(!strcasecmp(node_name.buf, "/object")) { break; }else {
1
0
0
0
Erich Hoover : hhctrl.ocx: Use HTML decoder for the index.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: dc482dfe14cde9417cf2606c69e7f6cea3cf4593 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc482dfe14cde9417cf2606c6…
Author: Erich Hoover <ehoover(a)mines.edu> Date: Wed Jun 20 14:31:15 2012 -0600 hhctrl.ocx: Use HTML decoder for the index. --- dlls/hhctrl.ocx/index.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/hhctrl.ocx/index.c b/dlls/hhctrl.ocx/index.c index aa73bc9..3b5053a 100644 --- a/dlls/hhctrl.ocx/index.c +++ b/dlls/hhctrl.ocx/index.c @@ -66,7 +66,7 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text) { const char *ptr; LPWSTR *param; - int len, wlen; + int len; ptr = get_attr(text, "name", &len); if(!ptr) { @@ -109,10 +109,7 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text) return; } - wlen = MultiByteToWideChar(CP_ACP, 0, ptr, len, NULL, 0); - *param = heap_alloc((wlen+1)*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, ptr, len, *param, wlen); - (*param)[wlen] = 0; + *param = decode_html(ptr, len); } /* Parse the object tag corresponding to a list item.
1
0
0
0
Erich Hoover : hhctrl.ocx: Add HTML to Unicode decoding capability to the table of contents.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 9033b14438c44c7d00ddd3542a727d597ac4ca45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9033b14438c44c7d00ddd3542…
Author: Erich Hoover <ehoover(a)mines.edu> Date: Wed Jun 20 14:31:10 2012 -0600 hhctrl.ocx: Add HTML to Unicode decoding capability to the table of contents. --- dlls/hhctrl.ocx/content.c | 14 +--- dlls/hhctrl.ocx/help.c | 202 +++++++++++++++++++++++++++++++++++++++++++++ dlls/hhctrl.ocx/hhctrl.h | 2 + 3 files changed, 206 insertions(+), 12 deletions(-) diff --git a/dlls/hhctrl.ocx/content.c b/dlls/hhctrl.ocx/content.c index 9f468a2..e0ec794 100644 --- a/dlls/hhctrl.ocx/content.c +++ b/dlls/hhctrl.ocx/content.c @@ -50,16 +50,6 @@ static void free_content_item(ContentItem *item) } } -static void store_param(LPWSTR *param, const char *value, int len) -{ - int wlen; - - wlen = MultiByteToWideChar(CP_ACP, 0, value, len, NULL, 0); - *param = heap_alloc((wlen+1)*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, value, len, *param, wlen); - (*param)[wlen] = 0; -} - static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const char *text) { const char *ptr; @@ -99,11 +89,11 @@ static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const const char *local = strstr(ptr, "::")+2; int local_len = len-(local-ptr); - store_param(&item->local, local, local_len); + item->local = decode_html(local, local_len); param = &merge; } - store_param(param, ptr, len); + *param = decode_html(ptr, len); if(param == &merge) { SetChmPath(&item->merge, hhc_root->merge.chm_file, merge); diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index e42fb6d..1726f05 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -50,6 +50,119 @@ static void ExpandContract(HHInfo *pHHInfo); static const WCHAR szEmpty[] = {0}; +struct html_encoded_symbol { + const char *html_code; + char ansi_symbol; +}; + +/* + * Table mapping the conversion between HTML encoded symbols and their ANSI code page equivalent. + * Note: Add additional entries in proper alphabetical order (a binary search is used on this table). + */ +struct html_encoded_symbol html_encoded_symbols[] = +{ + {"AElig", 0xC6}, + {"Aacute", 0xC1}, + {"Acirc", 0xC2}, + {"Agrave", 0xC0}, + {"Aring", 0xC5}, + {"Atilde", 0xC3}, + {"Auml", 0xC4}, + {"Ccedil", 0xC7}, + {"ETH", 0xD0}, + {"Eacute", 0xC9}, + {"Ecirc", 0xCA}, + {"Egrave", 0xC8}, + {"Euml", 0xCB}, + {"Iacute", 0xCD}, + {"Icirc", 0xCE}, + {"Igrave", 0xCC}, + {"Iuml", 0xCF}, + {"Ntilde", 0xD1}, + {"Oacute", 0xD3}, + {"Ocirc", 0xD4}, + {"Ograve", 0xD2}, + {"Oslash", 0xD8}, + {"Otilde", 0xD5}, + {"Ouml", 0xD6}, + {"THORN", 0xDE}, + {"Uacute", 0xDA}, + {"Ucirc", 0xDB}, + {"Ugrave", 0xD9}, + {"Uuml", 0xDC}, + {"Yacute", 0xDD}, + {"aacute", 0xE1}, + {"acirc", 0xE2}, + {"acute", 0xB4}, + {"aelig", 0xE6}, + {"agrave", 0xE0}, + {"amp", '&'}, + {"aring", 0xE5}, + {"atilde", 0xE3}, + {"auml", 0xE4}, + {"brvbar", 0xA6}, + {"ccedil", 0xE7}, + {"cedil", 0xB8}, + {"cent", 0xA2}, + {"copy", 0xA9}, + {"curren", 0xA4}, + {"deg", 0xB0}, + {"divide", 0xF7}, + {"eacute", 0xE9}, + {"ecirc", 0xEA}, + {"egrave", 0xE8}, + {"eth", 0xF0}, + {"euml", 0xEB}, + {"frac12", 0xBD}, + {"frac14", 0xBC}, + {"frac34", 0xBE}, + {"gt", '>'}, + {"iacute", 0xED}, + {"icirc", 0xEE}, + {"iexcl", 0xA1}, + {"igrave", 0xEC}, + {"iquest", 0xBF}, + {"iuml", 0xEF}, + {"laquo", 0xAB}, + {"lt", '<'}, + {"macr", 0xAF}, + {"micro", 0xB5}, + {"middot", 0xB7}, + {"nbsp", ' '}, + {"not", 0xAC}, + {"ntilde", 0xF1}, + {"oacute", 0xF3}, + {"ocirc", 0xF4}, + {"ograve", 0xF2}, + {"ordf", 0xAA}, + {"ordm", 0xBA}, + {"oslash", 0xF8}, + {"otilde", 0xF5}, + {"ouml", 0xF6}, + {"para", 0xB6}, + {"plusmn", 0xB1}, + {"pound", 0xA3}, + {"quot", '"'}, + {"raquo", 0xBB}, + {"reg", 0xAE}, + {"sect", 0xA7}, + {"shy", 0xAD}, + {"sup1", 0xB9}, + {"sup2", 0xB2}, + {"sup3", 0xB3}, + {"szlig", 0xDF}, + {"thorn", 0xFE}, + {"times", 0xD7}, + {"uacute", 0xFA}, + {"ucirc", 0xFB}, + {"ugrave", 0xF9}, + {"uml", 0xA8}, + {"uuml", 0xFC}, + {"yacute", 0xFD}, + {"yen", 0xA5}, + {"yuml", 0xFF} +}; + /* Loads a string from the resource file */ static LPWSTR HH_LoadString(DWORD dwID) { @@ -1654,3 +1767,92 @@ HHInfo *CreateHelpViewer(LPCWSTR filename) return info; } + +/* + * Search the table of HTML entities and return the corresponding ANSI symbol. + */ +static char find_html_symbol(const char *entity, int entity_len) +{ + int max = sizeof(html_encoded_symbols)/sizeof(html_encoded_symbols[0])-1; + int min = 0, dir; + + while(min <= max) + { + int pos = (min+max)/2; + const char *encoded_symbol = html_encoded_symbols[pos].html_code; + dir = strncmp(encoded_symbol, entity, entity_len); + if(dir == 0 && !encoded_symbol[entity_len]) return html_encoded_symbols[pos].ansi_symbol; + if(dir < 0) + min = pos+1; + else + max = pos-1; + } + return 0; +} + +/* + * Decode a string containing HTML encoded characters into a unicode string. + */ +WCHAR *decode_html(const char *html_fragment, int html_fragment_len) +{ + const char *h = html_fragment; + char *amp, *sem, symbol, *tmp; + int len, tmp_len = 0; + WCHAR *unicode_text; + + tmp = heap_alloc(html_fragment_len+1); + while(1) + { + symbol = 0; + amp = strchr(h, '&'); + if(!amp) break; + len = amp-h; + /* Copy the characters prior to the HTML encoded character */ + memcpy(&tmp[tmp_len], h, len); + tmp_len += len; + amp++; /* skip ampersand */ + sem = strchr(amp, ';'); + /* Require a semicolon after the ampersand */ + if(!sem) + { + h = amp; + tmp[tmp_len++] = '&'; + continue; + } + /* Find the symbol either by using the ANSI character number (prefixed by the pound symbol) + * or by searching the HTML entity table */ + len = sem-amp; + if(amp[0] == '#') + { + char *endnum = NULL; + int tmp; + + tmp = (char) strtol(amp, &endnum, 10); + if(endnum == sem) + symbol = tmp; + } + else + symbol = find_html_symbol(amp, len); + if(!symbol) + { + FIXME("Failed to translate HTML encoded character '&%.*s;'.\n", len, amp); + h = amp; + tmp[tmp_len++] = '&'; + continue; + } + /* Insert the new symbol */ + h = sem+1; + tmp[tmp_len++] = symbol; + } + /* Convert any remaining characters */ + len = html_fragment_len-(h-html_fragment); + memcpy(&tmp[tmp_len], h, len); + tmp_len += len; + tmp[tmp_len++] = 0; /* NULL-terminate the string */ + + len = MultiByteToWideChar(CP_ACP, 0, tmp, tmp_len, NULL, 0); + unicode_text = heap_alloc(len*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, tmp, tmp_len, unicode_text, len); + heap_free(tmp); + return unicode_text; +} diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index cbbcb70..599b6a5 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -193,6 +193,8 @@ void ReleaseSearch(HHInfo *info) DECLSPEC_HIDDEN; LPCWSTR skip_schema(LPCWSTR url) DECLSPEC_HIDDEN; +WCHAR *decode_html(const char *html_fragment, int html_fragment_len); + /* memory allocation functions */ static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
1
0
0
0
Dmitry Timoshkov : include/wine/test.h: Fix compilation of standalone tests with PSDK headers.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: b527679d179b3a316b191caf949ee953338b494a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b527679d179b3a316b191caf9…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Jun 21 21:01:29 2012 +0900 include/wine/test.h: Fix compilation of standalone tests with PSDK headers. --- include/wine/test.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/wine/test.h b/include/wine/test.h index b3113a8..401e06a 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -175,6 +175,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ); #ifdef STANDALONE #include <stdio.h> +#include <excpt.h> #if defined(__x86_64__) && defined(__GNUC__) && defined(__WINE_USE_MSVCRT) # define __winetest_va_start(list,arg) __builtin_ms_va_start(list,arg)
1
0
0
0
Vincent Povirk : gdiplus: Fix vertical alignment calculation in GdipAddPathString.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: fe000c773ce89961a4dcfbf6eee75c5833911539 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe000c773ce89961a4dcfbf6e…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Jun 21 15:51:37 2012 -0500 gdiplus: Fix vertical alignment calculation in GdipAddPathString. --- dlls/gdiplus/graphicspath.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index df9613d..471f915 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1008,12 +1008,12 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT } if (format && format->vertalign == StringAlignmentCenter && layoutRect->Y + args.maxY < layoutRect->Height) { - float inc = layoutRect->Height - args.maxY - layoutRect->Y; + float inc = layoutRect->Height + layoutRect->Y - args.maxY; inc /= 2; for (i = backup->pathdata.Count; i < path->pathdata.Count; ++i) path->pathdata.Points[i].Y += inc; } else if (format && format->vertalign == StringAlignmentFar) { - float inc = layoutRect->Height - args.maxY - layoutRect->Y; + float inc = layoutRect->Height + layoutRect->Y - args.maxY; for (i = backup->pathdata.Count; i < path->pathdata.Count; ++i) path->pathdata.Points[i].Y += inc; }
1
0
0
0
Vincent Povirk : gdiplus: Don' t position characters by glyph metrics in GdipAddPathString.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 3cde67e1444e794d220f6344f04774ff88f5e23f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3cde67e1444e794d220f6344f…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Jun 21 15:49:39 2012 -0500 gdiplus: Don't position characters by glyph metrics in GdipAddPathString. --- dlls/gdiplus/graphicspath.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 3095c08..df9613d 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -842,6 +842,7 @@ struct format_string_args GpPath *path; float maxY; float scale; + float ascent; }; static GpStatus format_string_callback(HDC dc, @@ -861,13 +862,15 @@ static GpStatus format_string_callback(HDC dc, if (underlined_index_count) FIXME("hotkey underlines not drawn yet\n"); + if (y + bounds->Height * args->scale > args->maxY) + args->maxY = y + bounds->Height * args->scale; + for (i = index; i < length; ++i) { GLYPHMETRICS gm; TTPOLYGONHEADER *ph = NULL; char *start; DWORD len, ofs = 0; - float bb_end; len = GetGlyphOutlineW(dc, string[i], GGO_BEZIER, &gm, 0, NULL, &identity); if (len == GDI_ERROR) { @@ -882,9 +885,6 @@ static GpStatus format_string_callback(HDC dc, break; } GetGlyphOutlineW(dc, string[i], GGO_BEZIER, &gm, len, start, &identity); - bb_end = (gm.gmBlackBoxY + gm.gmptGlyphOrigin.y) * args->scale; - if (bb_end + y > args->maxY) - args->maxY = bb_end + y; ofs = 0; while (ofs < len) @@ -893,7 +893,7 @@ static GpStatus format_string_callback(HDC dc, ph = (TTPOLYGONHEADER*)&start[ofs]; path->pathdata.Types[path->pathdata.Count] = PathPointTypeStart; path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(ph->pfxStart.x) * args->scale; - path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(ph->pfxStart.y) * args->scale; + path->pathdata.Points[path->pathdata.Count++].Y = y + args->ascent - fromfixedpoint(ph->pfxStart.y) * args->scale; TRACE("Starting at count %i with pos %f, %f)\n", path->pathdata.Count, x, y); ofs += sizeof(*ph); while (ofs - ofs_start < ph->cb) @@ -909,7 +909,7 @@ static GpStatus format_string_callback(HDC dc, { path->pathdata.Types[path->pathdata.Count] = PathPointTypeLine; path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(curve->apfx[j].x) * args->scale; - path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(curve->apfx[j].y) * args->scale; + path->pathdata.Points[path->pathdata.Count++].Y = y + args->ascent - fromfixedpoint(curve->apfx[j].y) * args->scale; } break; case TT_PRIM_CSPLINE: @@ -917,7 +917,7 @@ static GpStatus format_string_callback(HDC dc, { path->pathdata.Types[path->pathdata.Count] = PathPointTypeBezier; path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(curve->apfx[j].x) * args->scale; - path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(curve->apfx[j].y) * args->scale; + path->pathdata.Points[path->pathdata.Count++].Y = y + args->ascent - fromfixedpoint(curve->apfx[j].y) * args->scale; } break; default: @@ -992,6 +992,7 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT args.path = path; args.maxY = 0; args.scale = emSize / native_height; + args.ascent = textmetric.tmAscent * args.scale; status = gdip_format_string(dc, string, length, NULL, &scaled_layout_rect, format, format_string_callback, &args); DeleteDC(dc);
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
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