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
November 2014
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
394 discussions
Start a n
N
ew thread
Marcus Meissner : PATCH: website: download: adjust opensuse versions
by Jeremy Newman
05 Nov '14
05 Nov '14
Module: website Branch: master Commit: 83d96ce59e582b094a965a795dcfeef7518c630a URL:
http://source.winehq.org/git/website.git/?a=commit;h=83d96ce59e582b094a965a…
Author: Marcus Meissner <meissner(a)suse.de> Date: Wed Nov 5 12:58:10 2014 +0100 PATCH: website: download: adjust opensuse versions --- templates/de/download.template | 2 +- templates/en/download.template | 2 +- templates/fr/download.template | 2 +- templates/he/download.template | 2 +- templates/pl/download.template | 2 +- templates/pt/download.template | 2 +- templates/tr/download.template | 2 +- templates/uk/download.template | 2 +- templates/zh-cn/download.template | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/de/download.template b/templates/de/download.template index fbf449e..bc7717e 100644 --- a/templates/de/download.template +++ b/templates/de/download.template @@ -94,7 +94,7 @@ erbeten hat, dass sie die Wine-Website hosten.</p> <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">SUSE</a></b> - stellt binär und Quellcode .rpms und tägliche snapshot RPMs für alle openSUSE Versionen (derzeit 11.4 bis 13.1) sowie SUSE Linux Enterprise 11 bereit.<br> + stellt binär und Quellcode .rpms und tägliche snapshot RPMs für alle openSUSE Versionen (derzeit 12.3 bis 13.2) sowie SUSE Linux Enterprise 11 bereit.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/en/download.template b/templates/en/download.template index 275fd05..ca13e58 100644 --- a/templates/en/download.template +++ b/templates/en/download.template @@ -93,7 +93,7 @@ requested in exchange for hosting the Wine web site.</p> <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">Download SUSE packages</a></b> - - release binary and source .rpms and daily snapshot RPMs for all openSUSE versions (11.4 up to 13.1) and SUSE Linux Enterprise 11.<br> + - release binary and source .rpms and daily snapshot RPMs for all openSUSE versions (12.3 up to 13.2) and SUSE Linux Enterprise 11.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/fr/download.template b/templates/fr/download.template index 893c88f..4f7384e 100644 --- a/templates/fr/download.template +++ b/templates/fr/download.template @@ -99,7 +99,7 @@ center;"><b>Voyez la </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">Paquets SUSE</a></b> - .rpm binaires et sources et instantanés quotidiens pour openSUSE - 11.4 - 13.1 ainsi que SUSE Linux Enterprise 11.<br> + 12.3 - 13.2 ainsi que SUSE Linux Enterprise 11.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/he/download.template b/templates/he/download.template index 1573b95..d17ea6f 100644 --- a/templates/he/download.template +++ b/templates/he/download.template @@ -93,7 +93,7 @@ <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">הורדת חבילות SUSE</a></b> - - release binary and source .rpms and daily snapshot RPMs for openSUSE 11.4 - 13.1 and SUSE Linux Enterprise 11.<br> + - release binary and source .rpms and daily snapshot RPMs for openSUSE 12.3 - 13.2 and SUSE Linux Enterprise 11.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/pl/download.template b/templates/pl/download.template index 929f1c3..f3a4d00 100644 --- a/templates/pl/download.template +++ b/templates/pl/download.template @@ -92,7 +92,7 @@ <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">Pobierz paczki dla SUSE</a></b> - - binarne i źródłowe paczki .rpm oraz dzienne zrzuty dla openSUSE 11.4 - 13.1 i SUSE Linux Enterprise 11.<br> + - binarne i źródłowe paczki .rpm oraz dzienne zrzuty dla openSUSE 12.3 - 13.2 i SUSE Linux Enterprise 11.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/pt/download.template b/templates/pt/download.template index ba1b076..32055f0 100644 --- a/templates/pt/download.template +++ b/templates/pt/download.template @@ -90,7 +90,7 @@ <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">Descarregar pacotes para SUSE</a></b> - - .rpms binários e do código fonte e RPMs com snapshots diários para openSUSE 11.4 - 13.1 e SUSE Linux Enterprise 11.<br> + - .rpms binários e do código fonte e RPMs com snapshots diários para openSUSE 12.3 - 13.2 e SUSE Linux Enterprise 11.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/tr/download.template b/templates/tr/download.template index 77b7efe..d689dff 100644 --- a/templates/tr/download.template +++ b/templates/tr/download.template @@ -89,7 +89,7 @@ <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">SUSE paketleri indirin</a></b> - - sürüm ikili ve kaynak .rpm dosyaları ve günlük RPM derlemeleri. openSUSE 11.4 - 13.1 ve SUSE Linux Enterprise 11 için.<br> + - sürüm ikili ve kaynak .rpm dosyaları ve günlük RPM derlemeleri. openSUSE 12.3 - 13.2 ve SUSE Linux Enterprise 11 için.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/uk/download.template b/templates/uk/download.template index 42350c1..fd2fae6 100644 --- a/templates/uk/download.template +++ b/templates/uk/download.template @@ -92,7 +92,7 @@ <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">Завантажити пакунки SUSE</a></b> - - бінарні та вихідні .rpm файли та щоденні RPM знімки для всіх версій openSUSE (від 11.4 до 13.1) та SUSE Linux Enterprise 11.<br> + - бінарні та вихідні .rpm файли та щоденні RPM знімки для всіх версій openSUSE (від 12.3 до 13.2) та SUSE Linux Enterprise 11.<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr> diff --git a/templates/zh-cn/download.template b/templates/zh-cn/download.template index 41eaffb..1b70cd7 100644 --- a/templates/zh-cn/download.template +++ b/templates/zh-cn/download.template @@ -91,7 +91,7 @@ requested in exchange for hosting the Wine web site.</p> <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a> </td> <td> <b><a href="
http://en.opensuse.org/Wine#Repositories
">下载 SUSE 安装包</a></b> - - 所有版本的 openSUSE (11.4 至 13.1)和 SUSE Linux Enterprise 11 的发行二进制和源码 .rpms 及每日快照 RPMs。<br> + - 所有版本的 openSUSE (12.3 至 13.2)和 SUSE Linux Enterprise 11 的发行二进制和源码 .rpms 及每日快照 RPMs。<br> </td> <td><a href="mailto:meissner@suse.de">Marcus Meissner</a></td> </tr>
1
0
0
0
Jacek Caban : urlmon: Update existing session if user agent changes.
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: e385df0b8ee9dc57854986319bf2688dfaee4bb0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e385df0b8ee9dc57854986319…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 5 12:57:36 2014 +0100 urlmon: Update existing session if user agent changes. --- dlls/urlmon/protocol.c | 6 ++++++ dlls/urlmon/session.c | 1 + dlls/urlmon/urlmon_main.h | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/urlmon/protocol.c b/dlls/urlmon/protocol.c index 42ee8ed..1437152 100644 --- a/dlls/urlmon/protocol.c +++ b/dlls/urlmon/protocol.c @@ -302,6 +302,12 @@ HINTERNET get_internet_session(IInternetBindInfo *bind_info) return internet_session; } +void update_user_agent(WCHAR *user_agent) +{ + if(internet_session) + InternetSetOptionW(internet_session, INTERNET_OPTION_USER_AGENT, user_agent, strlenW(user_agent)); +} + HRESULT protocol_start(Protocol *protocol, IInternetProtocol *prot, IUri *uri, IInternetProtocolSink *protocol_sink, IInternetBindInfo *bind_info) { diff --git a/dlls/urlmon/session.c b/dlls/urlmon/session.c index bb41c31..e01e647 100644 --- a/dlls/urlmon/session.c +++ b/dlls/urlmon/session.c @@ -718,6 +718,7 @@ HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf heap_free(user_agent); user_agent = new_user_agent; + update_user_agent(user_agent); LeaveCriticalSection(&session_cs); break; diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h index 14a4f08..e134761 100644 --- a/dlls/urlmon/urlmon_main.h +++ b/dlls/urlmon/urlmon_main.h @@ -72,7 +72,8 @@ IInternetProtocol *get_mime_filter(LPCWSTR) DECLSPEC_HIDDEN; BOOL is_registered_protocol(LPCWSTR) DECLSPEC_HIDDEN; HRESULT register_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL) DECLSPEC_HIDDEN; HINTERNET get_internet_session(IInternetBindInfo*) DECLSPEC_HIDDEN; -LPWSTR get_useragent(void) DECLSPEC_HIDDEN; +WCHAR *get_useragent(void) DECLSPEC_HIDDEN; +void update_user_agent(WCHAR*) DECLSPEC_HIDDEN; void free_session(void) DECLSPEC_HIDDEN; HRESULT bind_to_storage(IUri*,IBindCtx*,REFIID,void**) DECLSPEC_HIDDEN;
1
0
0
0
Nikolay Sivov : dpnet/tests: Fix a test failure caused by uninitialized argument.
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: 552d9f3631dc5562a39b14e2cb15f0f5f8315734 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=552d9f3631dc5562a39b14e2c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 5 14:35:05 2014 +0300 dpnet/tests: Fix a test failure caused by uninitialized argument. --- dlls/dpnet/tests/address.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/dpnet/tests/address.c b/dlls/dpnet/tests/address.c index 5908000..bad4fa4 100644 --- a/dlls/dpnet/tests/address.c +++ b/dlls/dpnet/tests/address.c @@ -105,12 +105,22 @@ static void address_addcomponents(void) hr = IDirectPlay8Address_GetComponentByName(localaddr, NULL, &compguid, &size, &type); ok(hr == E_POINTER, "got 0x%08x\n", hr); + size = sizeof(GUID)-1; + hr = IDirectPlay8Address_GetComponentByName(localaddr, UNKNOWN, NULL, &size, &type); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + size = sizeof(GUID); hr = IDirectPlay8Address_GetComponentByName(localaddr, UNKNOWN, NULL, &size, &type); ok(hr == E_POINTER, "got 0x%08x\n", hr); hr = IDirectPlay8Address_GetComponentByName(localaddr, UNKNOWN, &compguid, NULL, &type); ok(hr == E_POINTER, "got 0x%08x\n", hr); + size = sizeof(GUID)-1; + hr = IDirectPlay8Address_GetComponentByName(localaddr, UNKNOWN, &compguid, &size, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + size = sizeof(GUID); hr = IDirectPlay8Address_GetComponentByName(localaddr, UNKNOWN, &compguid, &size, NULL); ok(hr == E_POINTER, "got 0x%08x\n", hr);
1
0
0
0
Michael Stefaniuc : msi: Simplify check for an empty string (PVS-Studio).
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: 481ff775ca281098b6c69d615a3e7c2f07ed10cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=481ff775ca281098b6c69d615…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Nov 5 10:53:56 2014 +0100 msi: Simplify check for an empty string (PVS-Studio). --- dlls/msi/dialog.c | 2 +- dlls/msi/script.c | 2 +- dlls/msi/tests/action.c | 2 +- dlls/msi/tests/db.c | 4 ++-- dlls/msi/tests/package.c | 4 ++-- dlls/msi/tests/source.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 4e1052e..4380879 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -2171,7 +2171,7 @@ static void msi_dialog_update_pathedit( msi_dialog *dialog, msi_control *control /* FIXME: test when this should fail */ static BOOL msi_dialog_verify_path( LPWSTR path ) { - if ( !lstrlenW( path ) ) + if ( !path[0] ) return FALSE; if ( PathIsRelativeW( path ) ) diff --git a/dlls/msi/script.c b/dlls/msi/script.c index 0fec716..c70790f 100644 --- a/dlls/msi/script.c +++ b/dlls/msi/script.c @@ -356,7 +356,7 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function if (FAILED(hr)) goto done; /* Call a function if necessary through the IDispatch interface */ - if (function != NULL && strlenW(function) > 0) { + if (function && function[0]) { TRACE("Calling function %s\n", debugstr_w(function)); hr = IActiveScript_GetScriptDispatch(pActiveScript, NULL, &pDispatch); diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index a8903d9..bd074a2 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -2715,7 +2715,7 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase } if (!expected) - ok_(__FILE__, line)(lstrlenA(val) == 0, "Expected empty string, got %s\n", val); + ok_(__FILE__, line)(!val[0], "Expected empty string, got %s\n", val); else { if (bcase) diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index af8ac8c..5ac9035 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -4534,7 +4534,7 @@ static void test_update(void) size = MAX_PATH; r = MsiRecordGetStringA(rec, 1, result, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrlenA(result), "Expected an empty string, got %s\n", result); + ok(!result[0], "Expected an empty string, got %s\n", result); MsiCloseHandle(rec); @@ -4580,7 +4580,7 @@ static void test_update(void) size = MAX_PATH; r = MsiRecordGetStringA(rec, 1, result, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrlenA(result), "Expected an empty string, got %s\n", result); + ok(!result[0], "Expected an empty string, got %s\n", result); MsiCloseHandle(rec); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 1a5935d..28d3e54 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -2194,7 +2194,7 @@ static void test_props(void) sz = 6; r = MsiGetPropertyA(hpkg, "property", buffer, &sz); ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok( !strlen(buffer), "Expected empty string, got %s\n", buffer); + ok(!buffer[0], "Expected empty string, got %s\n", buffer); MsiCloseHandle( hpkg ); DeleteFileA(msifile); @@ -2347,7 +2347,7 @@ static void test_property_table(void) lstrcpyA(buffer, "aaa"); r = MsiGetPropertyA(hpkg, "dantes", buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(lstrlenA(buffer) == 0, "Expected empty string, got %s\n", buffer); + ok(!buffer[0], "Expected empty string, got %s\n", buffer); r = MsiSetPropertyA(hpkg, "dantes", "mercedes"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index 9fddd90..1ef3c9d 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -176,7 +176,7 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase } if (!expected) - ok_(__FILE__, line)(lstrlenA(val) == 0, "Expected empty string, got %s\n", val); + ok_(__FILE__, line)(!val[0], "Expected empty string, got %s\n", val); else { if (bcase)
1
0
0
0
Nikolay Sivov : dwrite: Implement remaining methods of IDWriteLocalizedStrings.
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: e2eb760ffcb19c4da1460bbea27ad951d2f8a45a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e2eb760ffcb19c4da1460bbea…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 5 08:49:48 2014 +0300 dwrite: Implement remaining methods of IDWriteLocalizedStrings. --- dlls/dwrite/main.c | 49 +++++++++++++++++++++++++++++++++++++++++------- dlls/dwrite/tests/font.c | 17 ++++++++++++++--- 2 files changed, 56 insertions(+), 10 deletions(-) diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index a523de0..023ae4f 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -256,22 +256,57 @@ static HRESULT WINAPI localizedstrings_FindLocaleName(IDWriteLocalizedStrings *i WCHAR const *locale_name, UINT32 *index, BOOL *exists) { struct localizedstrings *This = impl_from_IDWriteLocalizedStrings(iface); - FIXME("(%p)->(%s %p %p): stub\n", This, debugstr_w(locale_name), index, exists); - return E_NOTIMPL; + UINT32 i; + + TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(locale_name), index, exists); + + *exists = FALSE; + *index = ~0; + + for (i = 0; i < This->count; i++) { + if (!strcmpiW(This->data[i].locale, locale_name)) { + *exists = TRUE; + *index = i; + break; + } + } + + return S_OK; } static HRESULT WINAPI localizedstrings_GetLocaleNameLength(IDWriteLocalizedStrings *iface, UINT32 index, UINT32 *length) { struct localizedstrings *This = impl_from_IDWriteLocalizedStrings(iface); - FIXME("(%p)->(%u %p): stub\n", This, index, length); - return E_NOTIMPL; + + TRACE("(%p)->(%u %p)\n", This, index, length); + + if (index >= This->count) { + *length = (UINT32)-1; + return E_FAIL; + } + + *length = strlenW(This->data[index].locale); + return S_OK; } -static HRESULT WINAPI localizedstrings_GetLocaleName(IDWriteLocalizedStrings *iface, UINT32 index, WCHAR *locale_name, UINT32 size) +static HRESULT WINAPI localizedstrings_GetLocaleName(IDWriteLocalizedStrings *iface, UINT32 index, WCHAR *buffer, UINT32 size) { struct localizedstrings *This = impl_from_IDWriteLocalizedStrings(iface); - FIXME("(%p)->(%u %p %u): stub\n", This, index, locale_name, size); - return E_NOTIMPL; + + TRACE("(%p)->(%u %p %u)\n", This, index, buffer, size); + + if (index >= This->count) { + if (buffer) *buffer = 0; + return E_FAIL; + } + + if (size < strlenW(This->data[index].locale)+1) { + if (buffer) *buffer = 0; + return E_NOT_SUFFICIENT_BUFFER; + } + + strcpyW(buffer, This->data[index].locale); + return S_OK; } static HRESULT WINAPI localizedstrings_GetStringLength(IDWriteLocalizedStrings *iface, UINT32 index, UINT32 *length) diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index dec90fe..950377c 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -2051,14 +2051,16 @@ todo_wine static void test_GetFaceNames(void) { static const WCHAR obliqueW[] = {'O','b','l','i','q','u','e',0}; + static const WCHAR enus2W[] = {'e','n','-','U','s',0}; static const WCHAR enusW[] = {'e','n','-','u','s',0}; IDWriteLocalizedStrings *strings, *strings2; IDWriteGdiInterop *interop; IDWriteFactory *factory; + UINT32 count, index; IDWriteFont *font; LOGFONTW logfont; WCHAR buffW[255]; - UINT32 count; + BOOL exists; HRESULT hr; factory = create_factory(); @@ -2087,13 +2089,22 @@ static void test_GetFaceNames(void) count = IDWriteLocalizedStrings_GetCount(strings); ok(count == 1, "got %d\n", count); + index = 1; + exists = FALSE; + hr = IDWriteLocalizedStrings_FindLocaleName(strings, enus2W, &index, &exists); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(index == 0 && exists, "got %d, %d\n", index, exists); + + count = 0; + hr = IDWriteLocalizedStrings_GetLocaleNameLength(strings, 1, &count); + ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(count == ~0, "got %d\n", count); + /* for simulated faces names are also simulated */ buffW[0] = 0; hr = IDWriteLocalizedStrings_GetLocaleName(strings, 0, buffW, sizeof(buffW)/sizeof(WCHAR)); -todo_wine { ok(hr == S_OK, "got 0x%08x\n", hr); ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW)); -} buffW[0] = 0; hr = IDWriteLocalizedStrings_GetString(strings, 0, buffW, sizeof(buffW)/sizeof(WCHAR));
1
0
0
0
Nikolay Sivov : dwrite: Implement GetFaceNames().
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: ad69c7bf6d574e75456c0d92ee200ce2ecab7eae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad69c7bf6d574e75456c0d92e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Nov 4 22:53:19 2014 +0300 dwrite: Implement GetFaceNames(). --- dlls/dwrite/font.c | 52 ++++++++++++++++++++++++++++++++++++++---- dlls/dwrite/tests/font.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 165e395..95fbdc6 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -85,7 +85,7 @@ struct dwrite_font { IDWriteFontFamily *family; - DWRITE_FONT_SIMULATIONS simulations; + USHORT simulations; struct dwrite_font_data *data; }; @@ -111,7 +111,7 @@ struct dwrite_fontface { UINT32 file_count; UINT32 index; - DWRITE_FONT_SIMULATIONS simulations; + USHORT simulations; DWRITE_FONT_FACE_TYPE type; struct dwrite_fonttable cmap; @@ -812,9 +812,53 @@ static BOOL WINAPI dwritefont_IsSymbolFont(IDWriteFont2 *iface) static HRESULT WINAPI dwritefont_GetFaceNames(IDWriteFont2 *iface, IDWriteLocalizedStrings **names) { + static const WCHAR boldobliqueW[] = {'B','o','l','d',' ','O','b','l','i','q','u','e',0}; + static const WCHAR obliqueW[] = {'O','b','l','i','q','u','e',0}; + static const WCHAR boldW[] = {'B','o','l','d',0}; + static const WCHAR enusW[] = {'e','n','-','u','s',0}; + struct dwrite_font *This = impl_from_IDWriteFont2(iface); - FIXME("(%p)->(%p): stub\n", This, names); - return E_NOTIMPL; + IDWriteLocalizedStrings *strings; + const WCHAR *name; + HRESULT hr; + + TRACE("(%p)->(%p)\n", This, names); + + *names = NULL; + + if (This->simulations == DWRITE_FONT_SIMULATIONS_NONE) { + BOOL exists; + return IDWriteFont2_GetInformationalStrings(iface, DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES, + names, &exists); + } + + switch (This->simulations) { + case DWRITE_FONT_SIMULATIONS_BOLD|DWRITE_FONT_SIMULATIONS_OBLIQUE: + name = boldobliqueW; + break; + case DWRITE_FONT_SIMULATIONS_BOLD: + name = boldW; + break; + case DWRITE_FONT_SIMULATIONS_OBLIQUE: + name = obliqueW; + break; + default: + ERR("unknown simulations %d\n", This->simulations); + return E_FAIL; + } + + hr = create_localizedstrings(&strings); + if (FAILED(hr)) return hr; + + hr = add_localizedstring(strings, enusW, name); + if (FAILED(hr)) { + IDWriteLocalizedStrings_Release(strings); + return hr; + } + + *names = strings; + + return S_OK; } static HRESULT WINAPI dwritefont_GetInformationalStrings(IDWriteFont2 *iface, diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index a93ee33..dec90fe 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -2048,6 +2048,64 @@ todo_wine IDWriteFactory_Release(factory); } +static void test_GetFaceNames(void) +{ + static const WCHAR obliqueW[] = {'O','b','l','i','q','u','e',0}; + static const WCHAR enusW[] = {'e','n','-','u','s',0}; + IDWriteLocalizedStrings *strings, *strings2; + IDWriteGdiInterop *interop; + IDWriteFactory *factory; + IDWriteFont *font; + LOGFONTW logfont; + WCHAR buffW[255]; + UINT32 count; + HRESULT hr; + + factory = create_factory(); + + hr = IDWriteFactory_GetGdiInterop(factory, &interop); + ok(hr == S_OK, "got 0x%08x\n", hr); + + memset(&logfont, 0, sizeof(logfont)); + logfont.lfHeight = 12; + logfont.lfWidth = 12; + logfont.lfWeight = FW_NORMAL; + logfont.lfItalic = 1; + lstrcpyW(logfont.lfFaceName, tahomaW); + + hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFont_GetFaceNames(font, &strings); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFont_GetFaceNames(font, &strings2); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(strings != strings2, "got %p, %p\n", strings2, strings); + IDWriteLocalizedStrings_Release(strings2); + + count = IDWriteLocalizedStrings_GetCount(strings); + ok(count == 1, "got %d\n", count); + + /* for simulated faces names are also simulated */ + buffW[0] = 0; + hr = IDWriteLocalizedStrings_GetLocaleName(strings, 0, buffW, sizeof(buffW)/sizeof(WCHAR)); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW)); +} + + buffW[0] = 0; + hr = IDWriteLocalizedStrings_GetString(strings, 0, buffW, sizeof(buffW)/sizeof(WCHAR)); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(buffW, obliqueW), "got %s\n", wine_dbgstr_w(buffW)); + IDWriteLocalizedStrings_Release(strings); + + IDWriteFont_Release(font); + IDWriteGdiInterop_Release(interop); + IDWriteFactory_Release(factory); +} + START_TEST(font) { IDWriteFactory *factory; @@ -2076,6 +2134,7 @@ START_TEST(font) test_GetGdiInterop(); test_CreateFontFaceFromHdc(); test_GetSimulations(); + test_GetFaceNames(); IDWriteFactory_Release(factory); }
1
0
0
0
Nikolay Sivov : dwrite: Fix compiler warning regarding unsigned type of enum member.
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: 16aa4f1faa3757ff51a543ce8b0d9b0ad45a3a37 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16aa4f1faa3757ff51a543ce8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Nov 4 18:50:57 2014 +0300 dwrite: Fix compiler warning regarding unsigned type of enum member. --- dlls/dwrite/analyzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 46cf3b5..82e9fa5 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -1223,7 +1223,7 @@ HRESULT create_numbersubstitution(DWRITE_NUMBER_SUBSTITUTION_METHOD method, cons *ret = NULL; - if (method < DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE || method > DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL) + if ((UINT32)method > DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL) return E_INVALIDARG; if (method != DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE && !IsValidLocaleName(locale))
1
0
0
0
Nikolay Sivov : dwrite: Fix setting oblique simulation on font creation.
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: c0796ecb4940825d717dc320cbdf188cfe82ac8f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0796ecb4940825d717dc320c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Nov 4 18:31:31 2014 +0300 dwrite: Fix setting oblique simulation on font creation. --- dlls/dwrite/font.c | 4 ++-- dlls/dwrite/tests/font.c | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index c9edd91..165e395 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -698,7 +698,7 @@ HRESULT convert_fontface_to_logfont(IDWriteFontFace *face, LOGFONTW *logfont) logfont->lfCharSet = DEFAULT_CHARSET; logfont->lfWeight = weight; - logfont->lfItalic = style == DWRITE_FONT_STYLE_ITALIC || (simulations | DWRITE_FONT_SIMULATIONS_OBLIQUE); + logfont->lfItalic = style == DWRITE_FONT_STYLE_ITALIC || (simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE); logfont->lfOutPrecision = OUT_OUTLINE_PRECIS; /* TODO: set facename */ @@ -1120,7 +1120,7 @@ static HRESULT WINAPI dwritefontfamily_GetFirstMatchingFont(IDWriteFontFamily *i DWRITE_FONT_SIMULATIONS simulations = DWRITE_FONT_SIMULATIONS_NONE; if (((style == DWRITE_FONT_STYLE_ITALIC) || (style == DWRITE_FONT_STYLE_OBLIQUE)) && - This->data->fonts[found]->style == DWRITE_FONT_STYLE_ITALIC) { + This->data->fonts[found]->style == DWRITE_FONT_STYLE_NORMAL) { simulations = DWRITE_FONT_SIMULATIONS_OBLIQUE; } return create_font(This->data->fonts[found], iface, simulations, font); diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 890bb2c..a93ee33 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -1126,6 +1126,7 @@ static void test_system_fontcollection(void) static void test_ConvertFontFaceToLOGFONT(void) { + DWRITE_FONT_SIMULATIONS sim; IDWriteGdiInterop *interop; IDWriteFontFace *fontface; IDWriteFactory *factory; @@ -1154,6 +1155,13 @@ static void test_ConvertFontFaceToLOGFONT(void) hr = IDWriteFont_CreateFontFace(font, &fontface); ok(hr == S_OK, "got 0x%08x\n", hr); + + sim = IDWriteFont_GetSimulations(font); + ok(sim == DWRITE_FONT_SIMULATIONS_OBLIQUE, "sim %d\n", sim); + + sim = IDWriteFontFace_GetSimulations(fontface); + ok(sim == DWRITE_FONT_SIMULATIONS_OBLIQUE, "sim %d\n", sim); + IDWriteFont_Release(font); if (0) /* crashes on native */ @@ -1830,7 +1838,6 @@ static void test_GetFirstMatchingFont(void) ok(hr == S_OK, "got 0x%08x\n", hr); simulations = IDWriteFont_GetSimulations(font); -todo_wine ok(simulations == DWRITE_FONT_SIMULATIONS_OBLIQUE, "%d\n", simulations); IDWriteFont_Release(font); @@ -2009,12 +2016,10 @@ static void test_GetSimulations(void) ok(hr == S_OK, "got 0x%08x\n", hr); simulations = IDWriteFont_GetSimulations(font); -todo_wine ok(simulations == DWRITE_FONT_SIMULATIONS_OBLIQUE, "got %d\n", simulations); hr = IDWriteFont_CreateFontFace(font, &fontface); ok(hr == S_OK, "got 0x%08x\n", hr); simulations = IDWriteFontFace_GetSimulations(fontface); -todo_wine ok(simulations == DWRITE_FONT_SIMULATIONS_OBLIQUE, "got %d\n", simulations); IDWriteFontFace_Release(fontface); IDWriteFont_Release(font); @@ -2030,11 +2035,12 @@ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); simulations = IDWriteFont_GetSimulations(font); - ok(simulations == 0, "got %d\n", simulations); + ok(simulations == DWRITE_FONT_SIMULATIONS_NONE, "got %d\n", simulations); hr = IDWriteFont_CreateFontFace(font, &fontface); ok(hr == S_OK, "got 0x%08x\n", hr); simulations = IDWriteFontFace_GetSimulations(fontface); - ok(simulations == 0, "got %d\n", simulations); +todo_wine + ok(simulations == DWRITE_FONT_SIMULATIONS_NONE, "got %d\n", simulations); IDWriteFontFace_Release(fontface); IDWriteFont_Release(font);
1
0
0
0
Sebastian Lackner : winecoreaudio.drv: Avoid endless loop if registry keys are not accessible.
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: 26eed57018d3c765f674ae91c62588d96a18ce57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26eed57018d3c765f674ae91c…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Nov 4 20:11:46 2014 +0100 winecoreaudio.drv: Avoid endless loop if registry keys are not accessible. --- dlls/winecoreaudio.drv/mmdevdrv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index e58cda1..f8ca7b7 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -562,7 +562,7 @@ static BOOL get_deviceid_by_guid(GUID *guid, AudioDeviceID *id, EDataFlow *flow) GUID reg_guid; key_name_size = sizeof(key_name); - if(RegEnumKeyExW(devices_key, i, key_name, &key_name_size, NULL, + if(RegEnumKeyExW(devices_key, i++, key_name, &key_name_size, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) break; @@ -596,8 +596,6 @@ static BOOL get_deviceid_by_guid(GUID *guid, AudioDeviceID *id, EDataFlow *flow) } RegCloseKey(key); - - ++i; } RegCloseKey(devices_key);
1
0
0
0
Iván Matellanes : msvcrt: Added _ungetwc_nolock implementation.
by Alexandre Julliard
05 Nov '14
05 Nov '14
Module: wine Branch: master Commit: 4f807d9ae9b571afabfa87cfdad7dd08d16d820c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f807d9ae9b571afabfa87cfd…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Tue Nov 4 22:52:11 2014 +0100 msvcrt: Added _ungetwc_nolock implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/file.c | 32 ++++++++++++++++++++------------ dlls/msvcrt/msvcrt.h | 1 + include/msvcrt/stdio.h | 1 + 8 files changed, 27 insertions(+), 17 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 21d380e..45a04cf 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1408,7 +1408,7 @@ @ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock @ cdecl _ungetch(long) @ stub _ungetch_nolock -@ stub _ungetwc_nolock +@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ stub _ungetwch @ stub _ungetwch_nolock @ cdecl _unlink(str) MSVCRT__unlink diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index c33ce06..5fc4ee5 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1766,7 +1766,7 @@ @ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock @ cdecl _ungetch(long) @ stub _ungetch_nolock -@ stub _ungetwc_nolock +@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ stub _ungetwch @ stub _ungetwch_nolock @ cdecl _unlink(str) MSVCRT__unlink diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 49d47e6..c3edd61 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1780,7 +1780,7 @@ @ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock @ cdecl _ungetch(long) @ stub _ungetch_nolock -@ stub _ungetwc_nolock +@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ stub _ungetwch @ stub _ungetwch_nolock @ cdecl _unlink(str) MSVCRT__unlink diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index b9fa3cd..9877784 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1087,7 +1087,7 @@ @ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock @ cdecl _ungetch(long) @ stub _ungetch_nolock -@ stub _ungetwc_nolock +@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ stub _ungetwch @ stub _ungetwch_nolock @ cdecl _unlink(str) MSVCRT__unlink diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 24302c3..4df9203 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1063,7 +1063,7 @@ @ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock @ cdecl _ungetch(long) @ stub _ungetch_nolock -@ stub _ungetwc_nolock +@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ stub _ungetwch @ stub _ungetwch_nolock @ cdecl _unlink(str) MSVCRT__unlink diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 9fc2652..491942d 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -5053,43 +5053,51 @@ int CDECL MSVCRT__ungetc_nolock(int c, MSVCRT_FILE * file) */ MSVCRT_wint_t CDECL MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file) { + MSVCRT_wint_t ret; + + if(!MSVCRT_CHECK_PMT(file != NULL)) return MSVCRT_WEOF; + + MSVCRT__lock_file(file); + ret = MSVCRT__ungetwc_nolock(wc, file); + MSVCRT__unlock_file(file); + + return ret; +} + +/********************************************************************* + * _ungetwc_nolock (MSVCRT.@) + */ +MSVCRT_wint_t CDECL MSVCRT__ungetwc_nolock(MSVCRT_wint_t wc, MSVCRT_FILE * file) +{ MSVCRT_wchar_t mwc = wc; + if(!MSVCRT_CHECK_PMT(file != NULL)) return MSVCRT_WEOF; if (wc == MSVCRT_WEOF) return MSVCRT_WEOF; - MSVCRT__lock_file(file); - if((msvcrt_get_ioinfo(file->_file)->exflag & (EF_UTF8 | EF_UTF16)) || !(msvcrt_get_ioinfo(file->_file)->wxflag & WX_TEXT)) { unsigned char * pp = (unsigned char *)&mwc; int i; for(i=sizeof(MSVCRT_wchar_t)-1;i>=0;i--) { - if(pp[i] != MSVCRT_ungetc(pp[i],file)) { - MSVCRT__unlock_file(file); + if(pp[i] != MSVCRT__ungetc_nolock(pp[i],file)) return MSVCRT_WEOF; - } } }else { char mbs[MSVCRT_MB_LEN_MAX]; int len; len = MSVCRT_wctomb(mbs, mwc); - if(len == -1) { - MSVCRT__unlock_file(file); + if(len == -1) return MSVCRT_WEOF; - } for(len--; len>=0; len--) { - if(mbs[len] != MSVCRT_ungetc(mbs[len], file)) { - MSVCRT__unlock_file(file); + if(mbs[len] != MSVCRT__ungetc_nolock(mbs[len], file)) return MSVCRT_WEOF; - } } } - MSVCRT__unlock_file(file); return mwc; } diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index e19928b..70ac68b 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -924,6 +924,7 @@ MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*); MSVCRT_wint_t __cdecl MSVCRT__fgetwc_nolock(MSVCRT_FILE*); MSVCRT_wint_t __cdecl MSVCRT__fputwc_nolock(MSVCRT_wint_t,MSVCRT_FILE*); MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*); +MSVCRT_wint_t __cdecl MSVCRT__ungetwc_nolock(MSVCRT_wint_t, MSVCRT_FILE*); int __cdecl MSVCRT__fseeki64_nolock(MSVCRT_FILE*,__int64,int); __int64 __cdecl MSVCRT__ftelli64(MSVCRT_FILE* file); __int64 __cdecl MSVCRT__ftelli64_nolock(MSVCRT_FILE*); diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 19fda94..7512efc 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -207,6 +207,7 @@ int __cdecl _putws(const wchar_t*); int __cdecl _snwprintf(wchar_t*,size_t,const wchar_t*,...); int __cdecl _snwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,...); int __cdecl _scwprintf(const wchar_t*,...); +wint_t __cdecl _ungetwc_nolock(wint_t,FILE*); int __cdecl _vscwprintf(const wchar_t*,__ms_va_list); int __cdecl _vscwprintf_p_l(const wchar_t*,_locale_t,__ms_va_list); int __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list);
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
40
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
Results per page:
10
25
50
100
200