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
October 2021
----- 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
1165 discussions
Start a n
N
ew thread
Alexandre Julliard : wine.inf: Fix the Tcpip database path.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: 910d7e52e51c1c38e42feca382a14dafbc7bb124 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=910d7e52e51c1c38e42feca3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 15 17:28:13 2021 +0200 wine.inf: Fix the Tcpip database path. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50318
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a7a1e2643afd93de4fc123a9113834da59aed43d) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- loader/wine.inf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 2f0b9dc3d41..8e5798f754b 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -3944,7 +3944,7 @@ ErrorControl=1 HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r" HKLM,"System\CurrentControlSet\Services\Eventlog\Application",,16 HKLM,"System\CurrentControlSet\Services\Eventlog\System","Sources",0x10000,"" -HKLM,"System\CurrentControlSet\Services\Tcpip\Parameters","DataBasePath",2,"%11%\drivers" +HKLM,"System\CurrentControlSet\Services\Tcpip\Parameters","DataBasePath",,"%12%\etc" HKLM,"System\CurrentControlSet\Services\VxD\MSTCP",,16 HKLM,"System\CurrentControlSet\Services\Winsock\Parameters",,16 HKLM,"System\CurrentControlSet\Services\Winsock2\Parameters\Protocol_Catalog9\Catalog_Entries",,16
1
0
0
0
Andrey Turkin : ieframe: Implement IWebBrowser2::get_LocationName().
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: 1edb71ad07afb7cbac6a74b2a96e7e8f0d6fac87 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1edb71ad07afb7cbac6a74b2…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Thu Apr 22 18:48:17 2021 +0200 ieframe: Implement IWebBrowser2::get_LocationName(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=12457
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 92713253ab4662127c5c1e2b7f35b358585cc215) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ieframe/tests/webbrowser.c | 15 +++++++++++++++ dlls/ieframe/webbrowser.c | 21 +++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c index 52d1f707357..d1206b02c0f 100644 --- a/dlls/ieframe/tests/webbrowser.c +++ b/dlls/ieframe/tests/webbrowser.c @@ -254,6 +254,19 @@ static void _test_LocationURL(unsigned line, IWebBrowser2 *wb, const WCHAR *exur } } +#define test_LocationName(a,b) _test_LocationName(__LINE__,a,b) +static void _test_LocationName(unsigned line, IWebBrowser2 *wb, const WCHAR *exname) +{ + BSTR name = (void*)0xdeadbeef; + HRESULT hres; + + hres = IWebBrowser2_get_LocationName(wb, &name); + ok_(__FILE__,line) (hres == (*exname ? S_OK : S_FALSE), "get_LocationName failed: %08x\n", hres); + ok_(__FILE__,line) (!lstrcmpW(name, exname) || broken(is_http && !lstrcmpW(name, current_url)) /* Win10 2004 */, + "expected %s, got %s\n", wine_dbgstr_w(exname), wine_dbgstr_w(name)); + SysFreeString(name); +} + #define test_ready_state(a,b) _test_ready_state(__LINE__,a,b) static void _test_ready_state(unsigned line, READYSTATE exstate, VARIANT_BOOL expect_busy) { @@ -2785,11 +2798,13 @@ static void test_ConnectionPoint(IWebBrowser2 *unk, BOOL init) static void test_Navigate2(IWebBrowser2 *webbrowser, const WCHAR *nav_url) { + const WCHAR *title = L"WineHQ - Run Windows applications on Linux, BSD, Solaris and Mac OS X"; VARIANT url; BOOL is_file; HRESULT hres; test_LocationURL(webbrowser, is_first_load ? L"" : current_url); + test_LocationName(webbrowser, is_first_load ? L"" : (is_http ? title : current_url)); test_ready_state(is_first_load ? READYSTATE_UNINITIALIZED : READYSTATE_COMPLETE, VARIANT_FALSE); is_http = !memcmp(nav_url, "http:", 5); diff --git a/dlls/ieframe/webbrowser.c b/dlls/ieframe/webbrowser.c index 87b74b8e01f..26ce666b4ba 100644 --- a/dlls/ieframe/webbrowser.c +++ b/dlls/ieframe/webbrowser.c @@ -539,8 +539,25 @@ static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, LONG Height) static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName) { WebBrowser *This = impl_from_IWebBrowser2(iface); - FIXME("(%p)->(%p)\n", This, LocationName); - return E_NOTIMPL; + IHTMLDocument2 *doc; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, LocationName); + + if(This->doc_host.document && + SUCCEEDED(IUnknown_QueryInterface(This->doc_host.document, &IID_IHTMLDocument2, (void **)&doc))) { + hres = IHTMLDocument2_get_title(doc, LocationName); + if(hres == S_OK && !SysStringLen(*LocationName)) { + SysFreeString(*LocationName); + hres = get_location_url(&This->doc_host, LocationName); + } + IHTMLDocument2_Release(doc); + } else { + *LocationName = SysAllocString(L""); + hres = S_FALSE; + } + + return hres; } static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
1
0
0
0
Alexandre Julliard : ws2_32: Install network database files.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: 6622aed36ef2c1d5652014f7e47eccc693bcbb7f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6622aed36ef2c1d5652014f7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 15 15:51:05 2021 +0200 ws2_32: Install network database files. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=12076
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 50c40b913a9ac99162f9729ab8a0869ebaae9917) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ws2_32/hosts | 1 + dlls/ws2_32/networks | 1 + dlls/ws2_32/protocol | 21 ++++ dlls/ws2_32/services | 325 +++++++++++++++++++++++++++++++++++++++++++++++++ dlls/ws2_32/version.rc | 12 ++ loader/wine.inf.in | 15 ++- 6 files changed, 371 insertions(+), 4 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6622aed36ef2c1d56520…
1
0
0
0
Vijay Kiran Kamuju : dhtmled.ocx: Fake success in IDHTMLEdit::NewDocument.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: f636870dd841dc68c3eec26a7b8a778359f9816a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f636870dd841dc68c3eec26a…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Sat Apr 3 20:39:50 2021 +0200 dhtmled.ocx: Fake success in IDHTMLEdit::NewDocument. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b87f938c4d68388495ab46bb10be6568c187cfa6) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dhtmled.ocx/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index e111f0b7979..fc518de7323 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -191,7 +191,7 @@ static HRESULT WINAPI DHTMLEdit_NewDocument(IDHTMLEdit *iface) { DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); FIXME("(%p)->() stub\n", This); - return E_NOTIMPL; + return S_OK; } static HRESULT WINAPI DHTMLEdit_LoadURL(IDHTMLEdit *iface, BSTR url)
1
0
0
0
Vijay Kiran Kamuju : dhtmled.ocx: Add stub IOleControl interface.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: b973686abc78b422d6faa5e1f39b9a767f0a04cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b973686abc78b422d6faa5e1…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Sat Apr 3 20:39:49 2021 +0200 dhtmled.ocx: Add stub IOleControl interface. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50916
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 95538bb5d33e0a7a434e33b9a833ad47639cefc8) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dhtmled.ocx/edit.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 53dcdfc9ac6..e111f0b7979 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -30,6 +30,7 @@ typedef struct IDHTMLEdit IDHTMLEdit_iface; IOleObject IOleObject_iface; IPersistStreamInit IPersistStreamInit_iface; + IOleControl IOleControl_iface; IOleClientSite *client_site; SIZEL extent; LONG ref; @@ -50,6 +51,11 @@ static inline DHTMLEditImpl *impl_from_IPersistStreamInit(IPersistStreamInit *if return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStreamInit_iface); } +static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface); +} + static ULONG dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -83,6 +89,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IPersistStreamInit_iface; return S_OK; } + else if(IsEqualGUID(iid, &IID_IOleControl)) + { + dhtml_edit_addref(This); + *out = &This->IOleControl_iface; + return S_OK; + } *out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -858,6 +870,59 @@ static const IPersistStreamInitVtbl PersistStreamInitVtbl = { PersistStreamInit_InitNew }; +static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IOleControl(iface), iid, out); +} + +static ULONG WINAPI OleControl_AddRef(IOleControl *iface) +{ + return dhtml_edit_addref(impl_from_IOleControl(iface)); +} + +static ULONG WINAPI OleControl_Release(IOleControl *iface) +{ + return dhtml_edit_release(impl_from_IOleControl(iface)); +} + +static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%p)\n", This, pCI); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *msg) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%p)\n", This, msg); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%d)\n", This, dispID); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL freeze) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%x)\n", This, freeze); + return E_NOTIMPL; +} + +static const IOleControlVtbl OleControlVtbl = { + OleControl_QueryInterface, + OleControl_AddRef, + OleControl_Release, + OleControl_GetControlInfo, + OleControl_OnMnemonic, + OleControl_OnAmbientPropertyChange, + OleControl_FreezeEvents +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -874,6 +939,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl; This->IOleObject_iface.lpVtbl = &OleObjectVtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; + This->IOleControl_iface.lpVtbl = &OleControlVtbl; This->client_site = NULL; This->ref = 1;
1
0
0
0
Lauri Kenttä : msvcrt: Handle negative zero, infinity and nan in _ecvt and others.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: ae66cb71b4df87aea0ce44f6c3791a33c178a4ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ae66cb71b4df87aea0ce44f6…
Author: Lauri Kenttä <lauri.kentta(a)gmail.com> Date: Thu Apr 1 20:58:46 2021 +0200 msvcrt: Handle negative zero, infinity and nan in _ecvt and others. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50885
Signed-off-by: Lauri Kenttä <lauri.kentta(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 97b420224e767b24d89722ff5efeca38a8ecf1e2) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/math.c | 65 ++++++++++++++++++---------------------------- dlls/msvcrt/tests/printf.c | 11 ++++++++ 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index e6e837e52c6..4e1f7b24a9c 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2400,21 +2400,22 @@ char * CDECL _ecvt( double number, int ndigits, int *decpt, int *sign ) int prec, len; thread_data_t *data = msvcrt_get_thread_data(); /* FIXME: check better for overflow (native supports over 300 chars) */ - ndigits = min( ndigits, 80 - 7); /* 7 : space for dec point, 1 for "e", + ndigits = min( ndigits, 80 - 8); /* 8 : space for sign, dec point, "e", * 4 for exponent and one for * terminating '\0' */ if (!data->efcvt_buffer) data->efcvt_buffer = malloc( 80 ); /* ought to be enough */ - if( number < 0) { - *sign = TRUE; - number = -number; - } else - *sign = FALSE; /* handle cases with zero ndigits or less */ prec = ndigits; if( prec < 1) prec = 2; len = _snprintf(data->efcvt_buffer, 80, "%.*le", prec - 1, number); + + if (data->efcvt_buffer[0] == '-') { + memmove( data->efcvt_buffer, data->efcvt_buffer + 1, len-- ); + *sign = 1; + } else *sign = 0; + /* take the decimal "point away */ if( prec != 1) memmove( data->efcvt_buffer + 1, data->efcvt_buffer + 2, len - 1 ); @@ -2443,7 +2444,6 @@ int CDECL _ecvt_s( char *buffer, size_t length, double number, int ndigits, int { int prec, len; char *result; - const char infret[] = "1#INF"; if (!MSVCRT_CHECK_PMT(buffer != NULL)) return EINVAL; if (!MSVCRT_CHECK_PMT(decpt != NULL)) return EINVAL; @@ -2451,30 +2451,17 @@ int CDECL _ecvt_s( char *buffer, size_t length, double number, int ndigits, int if (!MSVCRT_CHECK_PMT_ERR( length > 2, ERANGE )) return ERANGE; if (!MSVCRT_CHECK_PMT_ERR(ndigits < (int)length - 1, ERANGE )) return ERANGE; - /* special case - inf */ - if(number == HUGE_VAL || number == -HUGE_VAL) - { - memset(buffer, '0', ndigits); - memcpy(buffer, infret, min(ndigits, sizeof(infret) - 1 ) ); - buffer[ndigits] = '\0'; - (*decpt) = 1; - if(number == -HUGE_VAL) - (*sign) = 1; - else - (*sign) = 0; - return 0; - } /* handle cases with zero ndigits or less */ prec = ndigits; if( prec < 1) prec = 2; - result = malloc(prec + 7); - - if( number < 0) { - *sign = TRUE; - number = -number; - } else - *sign = FALSE; - len = _snprintf(result, prec + 7, "%.*le", prec - 1, number); + result = malloc(prec + 8); + + len = _snprintf(result, prec + 8, "%.*le", prec - 1, number); + if (result[0] == '-') { + memmove( result, result + 1, len-- ); + *sign = 1; + } else *sign = 0; + /* take the decimal "point away */ if( prec != 1) memmove( result + 1, result + 2, len - 1 ); @@ -2511,12 +2498,6 @@ char * CDECL _fcvt( double number, int ndigits, int *decpt, int *sign ) if (!data->efcvt_buffer) data->efcvt_buffer = malloc( 80 ); /* ought to be enough */ - if (number < 0) - { - *sign = 1; - number = -number; - } else *sign = 0; - stop = _snprintf(buf, 80, "%.*f", ndigits < 0 ? 0 : ndigits, number); ptr1 = buf; ptr2 = data->efcvt_buffer; @@ -2524,6 +2505,11 @@ char * CDECL _fcvt( double number, int ndigits, int *decpt, int *sign ) dec1 = 0; dec2 = 0; + if (*ptr1 == '-') { + *sign = 1; + ptr1++; + } else *sign = 0; + /* For numbers below the requested resolution, work out where the decimal point will be rather than finding it in the string */ if (number < 1.0 && number > 0.0) { @@ -2595,12 +2581,6 @@ int CDECL _fcvt_s(char* outbuffer, size_t size, double number, int ndigits, int return EINVAL; } - if (number < 0) - { - *sign = 1; - number = -number; - } else *sign = 0; - stop = _snprintf(buf, 80, "%.*f", ndigits < 0 ? 0 : ndigits, number); ptr1 = buf; ptr2 = outbuffer; @@ -2608,6 +2588,11 @@ int CDECL _fcvt_s(char* outbuffer, size_t size, double number, int ndigits, int dec1 = 0; dec2 = 0; + if (*ptr1 == '-') { + *sign = 1; + ptr1++; + } else *sign = 0; + /* For numbers below the requested resolution, work out where the decimal point will be rather than finding it in the string */ if (number < 1.0 && number > 0.0) { diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index fbb43c78168..6905b8d01ca 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -643,6 +643,9 @@ static struct { { 0.0, 5, "00000", "00000", 0, 0, 0 }, { 0.0, 0, "", "", 0, 0, 0 }, { 0.0, -1, "", "", 0, 0, 0 }, + { -0.0, 5, "00000", "00000", 0, 0, 1 }, + { -0.0, 0, "", "", 0, 0, 1 }, + { -0.0, -1, "", "", 0, 0, 1 }, { -123.0001, 0, "", "123", 3, 3, 1 }, { -123.0001, -1, "", "12", 3, 3, 1 }, { -123.0001, -2, "", "1", 3, 3, 1 }, @@ -656,6 +659,14 @@ static struct { { 0.4, 0, "", "", 0, 0, 0 }, { 0.49, 0, "", "", 0, 0, 0 }, { 0.51, 0, "", "1", 1, 1, 0 }, + { NAN, 2, "1$", "1#R", 1, 1, 0 }, + { NAN, 5, "1#QNB", "1#QNAN", 1, 1, 0 }, + { -NAN, 2, "1$", "1#J", 1, 1, 1 }, + { -NAN, 5, "1#IND", "1#IND0", 1, 1, 1 }, + { INFINITY, 2, "1$", "1#J", 1, 1, 0 }, + { INFINITY, 5, "1#INF", "1#INF0", 1, 1, 0 }, + { -INFINITY, 2, "1$", "1#J", 1, 1, 1 }, + { -INFINITY, 5, "1#INF", "1#INF0", 1, 1, 1 }, { 1.0, 30, "100000000000000000000000000000", "1000000000000000000000000000000", 1, 1, 0}, { 123456789012345678901.0, 30, "123456789012345680000000000000",
1
0
0
0
Piotr Caban : msvcrt: Cleanup _ecvt tests.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: 7dfaf259392752c857653eb41761f67d95ab9d53 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7dfaf259392752c857653eb4…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Apr 1 20:58:36 2021 +0200 msvcrt: Cleanup _ecvt tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0f7ed5685200ac53884a99f52c9c7b7fc471367a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/tests/printf.c | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index 8960671f23e..fbb43c78168 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -634,27 +634,20 @@ static struct { int expsign; } test_cvt_testcases[] = { { 45.0, 2, "45", "4500", 2, 2, 0 }, - /* Numbers less than 1.0 with different precisions */ { 0.0001, 1, "1", "", -3, -3, 0 }, { 0.0001, 10,"1000000000", "1000000", -3, -3, 0 }, - /* Basic sign test */ { -111.0001, 5, "11100", "11100010", 3, 3, 1 }, { 111.0001, 5, "11100", "11100010", 3, 3, 0 }, - /* big numbers with low precision */ { 3333.3, 2, "33", "333330", 4, 4, 0 }, {999999999999.9, 3, "100","999999999999900", 13, 12, 0 }, - /* 0.0 with different precisions */ { 0.0, 5, "00000", "00000", 0, 0, 0 }, { 0.0, 0, "", "", 0, 0, 0 }, { 0.0, -1, "", "", 0, 0, 0 }, - /* Numbers > 1.0 with 0 or -ve precision */ { -123.0001, 0, "", "123", 3, 3, 1 }, { -123.0001, -1, "", "12", 3, 3, 1 }, { -123.0001, -2, "", "1", 3, 3, 1 }, { -123.0001, -3, "", "", 3, 3, 1 }, - /* Numbers > 1.0, but with rounding at the point of precision */ { 99.99, 1, "1", "1000", 3, 3, 0 }, - /* Numbers < 1.0 where rounding occurs at the point of precision */ { 0.0063, 2, "63", "1", -2, -1, 0 }, { 0.0063, 3, "630", "6", -2, -2, 0 }, { 0.09999999996, 2, "10", "10", 0, 0, 0 }, @@ -663,12 +656,10 @@ static struct { { 0.4, 0, "", "", 0, 0, 0 }, { 0.49, 0, "", "", 0, 0, 0 }, { 0.51, 0, "", "1", 1, 1, 0 }, - /* ask for ridiculous precision, ruin formatting this table */ { 1.0, 30, "100000000000000000000000000000", "1000000000000000000000000000000", 1, 1, 0}, { 123456789012345678901.0, 30, "123456789012345680000000000000", "123456789012345680000000000000000000000000000000000", 21, 21, 0}, - /* end marker */ { 0, 0, "END"} }; @@ -683,14 +674,14 @@ static void test_xcvt(void) test_cvt_testcases[i].nrdigits, &decpt, &sign); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_e, 15), - "_ecvt() bad return, got \n'%s' expected \n'%s'\n", str, + ok( !strncmp( str, test_cvt_testcases[i].expstr_e, 15), + "%d) _ecvt() bad return, got '%s' expected '%s'\n", i, str, test_cvt_testcases[i].expstr_e); ok( decpt == test_cvt_testcases[i].expdecpt_e, - "_ecvt() decimal point wrong, got %d expected %d\n", decpt, + "%d) _ecvt() decimal point wrong, got %d expected %d\n", i, decpt, test_cvt_testcases[i].expdecpt_e); ok( sign == test_cvt_testcases[i].expsign, - "_ecvt() sign wrong, got %d expected %d\n", sign, + "%d) _ecvt() sign wrong, got %d expected %d\n", i, sign, test_cvt_testcases[i].expsign); } for( i = 0; strcmp( test_cvt_testcases[i].expstr_e, "END"); i++){ @@ -699,14 +690,14 @@ static void test_xcvt(void) test_cvt_testcases[i].nrdigits, &decpt, &sign); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_f, 15), - "_fcvt() bad return, got \n'%s' expected \n'%s'\n", str, + ok( !strncmp( str, test_cvt_testcases[i].expstr_f, 15), + "%d) _fcvt() bad return, got '%s' expected '%s'\n", i, str, test_cvt_testcases[i].expstr_f); ok( decpt == test_cvt_testcases[i].expdecpt_f, - "_fcvt() decimal point wrong, got %d expected %d\n", decpt, + "%d) _fcvt() decimal point wrong, got %d expected %d\n", i, decpt, test_cvt_testcases[i].expdecpt_f); ok( sign == test_cvt_testcases[i].expsign, - "_fcvt() sign wrong, got %d expected %d\n", sign, + "%d) _fcvt() sign wrong, got %d expected %d\n", i, sign, test_cvt_testcases[i].expsign); } @@ -717,14 +708,14 @@ static void test_xcvt(void) decpt = sign = 100; err = p__ecvt_s(str, 1024, test_cvt_testcases[i].value, test_cvt_testcases[i].nrdigits, &decpt, &sign); ok(err == 0, "_ecvt_s() failed with error code %d\n", err); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_e, 15), - "_ecvt_s() bad return, got \n'%s' expected \n'%s'\n", str, + ok( !strncmp( str, test_cvt_testcases[i].expstr_e, 15), + "%d) _ecvt_s() bad return, got '%s' expected '%s'\n", i, str, test_cvt_testcases[i].expstr_e); ok( decpt == test_cvt_testcases[i].expdecpt_e, - "_ecvt_s() decimal point wrong, got %d expected %d\n", decpt, + "%d) _ecvt_s() decimal point wrong, got %d expected %d\n", i, decpt, test_cvt_testcases[i].expdecpt_e); ok( sign == test_cvt_testcases[i].expsign, - "_ecvt_s() sign wrong, got %d expected %d\n", sign, + "%d) _ecvt_s() sign wrong, got %d expected %d\n", i, sign, test_cvt_testcases[i].expsign); } free(str); @@ -761,15 +752,15 @@ static void test_xcvt(void) for( i = 0; strcmp( test_cvt_testcases[i].expstr_e, "END"); i++){ decpt = sign = 100; err = p__fcvt_s(str, 1024, test_cvt_testcases[i].value, test_cvt_testcases[i].nrdigits, &decpt, &sign); - ok(err == 0, "_fcvt_s() failed with error code %d\n", err); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_f, 15), - "_fcvt_s() bad return, got '%s' expected '%s'. test %d\n", str, + ok(!err, "%d) _fcvt_s() failed with error code %d\n", i, err); + ok( !strncmp( str, test_cvt_testcases[i].expstr_f, 15), + "%d) _fcvt_s() bad return, got '%s' expected '%s'. test %d\n", i, str, test_cvt_testcases[i].expstr_f, i); ok( decpt == test_cvt_testcases[i].expdecpt_f, - "_fcvt_s() decimal point wrong, got %d expected %d\n", decpt, + "%d) _fcvt_s() decimal point wrong, got %d expected %d\n", i, decpt, test_cvt_testcases[i].expdecpt_f); ok( sign == test_cvt_testcases[i].expsign, - "_fcvt_s() sign wrong, got %d expected %d\n", sign, + "%d) _fcvt_s() sign wrong, got %d expected %d\n", i, sign, test_cvt_testcases[i].expsign); } free(str);
1
0
0
0
Louis Lenders : advapi32: Update version resource.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: 23ac462cff195d9037f48674feca755e5c30ca24 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=23ac462cff195d9037f48674…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Sat Apr 3 23:56:45 2021 +0200 advapi32: Update version resource. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50854
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 145210af9f49348a07d2f2e4acd20391d85c873f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/advapi32/version.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/advapi32/version.rc b/dlls/advapi32/version.rc index 1c05b9cac95..d22f12b1c7d 100644 --- a/dlls/advapi32/version.rc +++ b/dlls/advapi32/version.rc @@ -18,9 +18,9 @@ #define WINE_FILEDESCRIPTION_STR "Wine advapi32 dll" #define WINE_FILENAME_STR "advapi32.dll" -#define WINE_FILEVERSION 5,1,2600,2180 -#define WINE_FILEVERSION_STR "5.1.2600.2180" -#define WINE_PRODUCTVERSION 5,1,2600,2180 -#define WINE_PRODUCTVERSION_STR "5.1.2600.2180" +#define WINE_FILEVERSION 10,0,10240,16384 +#define WINE_FILEVERSION_STR "10.0.10240.16384" +#define WINE_PRODUCTVERSION 10,0,10240,16384 +#define WINE_PRODUCTVERSION_STR "10.0.10240.16384" #include "wine/wine_common_ver.rc"
1
0
0
0
Jacek Caban : jscript: Use quiet NaNs in jsval.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: adc1b84adb9bd39a74a9ef3914073316feaa78cf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=adc1b84adb9bd39a74a9ef39…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 5 20:40:42 2021 +0200 jscript: Use quiet NaNs in jsval. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50845
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit d9a4392d6bbd50b0a9690aa20fe7baa199f38d96) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/jscript/jsval.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/jsval.h b/dlls/jscript/jsval.h index 963f59f6a08..9f451b12831 100644 --- a/dlls/jscript/jsval.h +++ b/dlls/jscript/jsval.h @@ -35,8 +35,8 @@ #endif #ifdef JSVAL_DOUBLE_LAYOUT_PTR32 -/* NaN exponent and our 0x80000 marker */ -#define JSV_VAL(x) (0x7ff80000|x) +/* NaN exponent, quiet bit 0x80000 and our 0x10000 marker */ +#define JSV_VAL(x) (0x7ff90000|x) #else #define JSV_VAL(x) x #endif @@ -150,10 +150,10 @@ static inline jsval_t jsval_number(double n) if((ret.u.s.tag & 0x7ff00000) == 0x7ff00000) { /* isinf */ if(ret.u.s.tag & 0xfffff) { - ret.u.s.tag = 0x7ff00000; + ret.u.s.tag = 0x7ff80000; ret.u.s.u.as_uintptr = ~0; }else if(ret.u.s.u.as_uintptr) { - ret.u.s.tag = 0x7ff00000; + ret.u.s.tag = 0x7ff80000; } } #else @@ -191,7 +191,7 @@ static inline BOOL is_string(jsval_t v) static inline BOOL is_number(jsval_t v) { #ifdef JSVAL_DOUBLE_LAYOUT_PTR32 - return (v.u.s.tag & 0x7ff80000) != 0x7ff80000; + return (v.u.s.tag & 0x7ff10000) != 0x7ff10000; #else return v.type == JSV_NUMBER; #endif
1
0
0
0
Akihiro Sagawa : gdi32: Fix text metrics used in EnumFonts families.
by Alexandre Julliard
26 Oct '21
26 Oct '21
Module: wine Branch: stable Commit: 08397d23464bb24e7da741185494d7e8ccfd8473 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=08397d23464bb24e7da74118…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Tue Apr 6 21:34:21 2021 +0900 gdi32: Fix text metrics used in EnumFonts families. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50818
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 837c4f4b87b4a810e57d7e50af2023b38d03b5cd) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/gdi32/font.c | 36 ++++++++++++++++++++++++++++++++++-- dlls/gdi32/tests/font.c | 19 +++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 6f50cc92a83..814c6153b89 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -2685,7 +2685,9 @@ static UINT get_font_type( const NEWTEXTMETRICEXW *ntm ) static BOOL get_face_enum_data( struct gdi_font_face *face, ENUMLOGFONTEXW *elf, NEWTEXTMETRICEXW *ntm ) { struct gdi_font *font; - LOGFONTW lf = { .lfHeight = 100 }; + LOGFONTW lf = { .lfHeight = -4096 /* preferable EM Square size */ }; + + if (!face->scalable) lf.lfHeight = 0; if (!(font = create_gdi_font( face, NULL, &lf ))) return FALSE; @@ -2695,12 +2697,42 @@ static BOOL get_face_enum_data( struct gdi_font_face *face, ENUMLOGFONTEXW *elf, return FALSE; } + if (font->scalable && -lf.lfHeight % font->otm.otmEMSquare != 0) + { + /* reload with the original EM Square size */ + lf.lfHeight = -font->otm.otmEMSquare; + free_gdi_font( font ); + + if (!(font = create_gdi_font( face, NULL, &lf ))) return FALSE; + if (!font_funcs->load_font( font )) + { + free_gdi_font( font ); + return FALSE; + } + } + if (font_funcs->set_outline_text_metrics( font )) { - memcpy( &ntm->ntmTm, &font->otm.otmTextMetrics, sizeof(TEXTMETRICW) ); + static const DWORD ntm_ppem = 32; + +#define TM font->otm.otmTextMetrics +#define SCALE_NTM(value) (MulDiv( ntm->ntmTm.tmHeight, (value), TM.tmHeight )) + ntm->ntmTm.tmHeight = MulDiv( ntm_ppem, font->ntmCellHeight, font->otm.otmEMSquare ); + ntm->ntmTm.tmAscent = SCALE_NTM( TM.tmAscent ); + ntm->ntmTm.tmDescent = ntm->ntmTm.tmHeight - ntm->ntmTm.tmAscent; + ntm->ntmTm.tmInternalLeading = SCALE_NTM( TM.tmInternalLeading ); + ntm->ntmTm.tmExternalLeading = SCALE_NTM( TM.tmExternalLeading ); + ntm->ntmTm.tmAveCharWidth = SCALE_NTM( TM.tmAveCharWidth ); + ntm->ntmTm.tmMaxCharWidth = SCALE_NTM( TM.tmMaxCharWidth ); + + memcpy((char *)&ntm->ntmTm + offsetof( TEXTMETRICW, tmWeight ), + (const char *)&TM + offsetof( TEXTMETRICW, tmWeight ), + sizeof(TEXTMETRICW) - offsetof( TEXTMETRICW, tmWeight )); ntm->ntmTm.ntmSizeEM = font->otm.otmEMSquare; ntm->ntmTm.ntmCellHeight = font->ntmCellHeight; ntm->ntmTm.ntmAvgWidth = font->ntmAvgWidth; +#undef SCALE_NTM +#undef TM } else if (font_funcs->set_bitmap_text_metrics( font )) { diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index da5fdf2238e..0344e5621e8 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -3927,6 +3927,25 @@ static void test_text_metrics(const LOGFONTA *lf, const NEWTEXTMETRICA *ntm) ok(ntm->ntmCellHeight == cell_height, "%s: ntmCellHeight %u != %u, os2.usWinAscent/os2.usWinDescent %u/%u\n", font_name, ntm->ntmCellHeight, cell_height, ascent, descent); + /* NEWTEXTMETRIC's scaling method is different from TEXTMETRIC's */ +#define SCALE_NTM(value) (MulDiv(ntm->tmHeight, (value), cell_height)) + size = MulDiv(32, ntm->ntmCellHeight, ntm->ntmSizeEM); + ok(ntm->tmHeight == size, "%s: ntm->tmHeight %d != %d (%u/%u)\n", + font_name, ntm->tmHeight, size, ntm->ntmCellHeight, ntm->ntmSizeEM); + size = SCALE_NTM(ntm->ntmAvgWidth); + ok(ntm->tmAveCharWidth == size, "%s: ntm->tmAveCharWidth %d != %d (%u/%u,%d)\n", + font_name, ntm->tmAveCharWidth, size, ntm->ntmAvgWidth, cell_height, ntm->tmHeight); + size = SCALE_NTM(ascent); + ok(ntm->tmAscent == size, "%s: ntm->tmAscent %d != %d (%u/%u,%d)\n", + font_name, ntm->tmAscent, size, ascent, cell_height, ntm->tmHeight); + size = ntm->tmHeight - ntm->tmAscent; + ok(ntm->tmDescent == size, "%s: ntm->tmDescent %d != %d (%u/%u,%d)\n", + font_name, ntm->tmDescent, size, descent, cell_height, ntm->tmHeight); + size = SCALE_NTM(cell_height - ntm->ntmSizeEM); + ok(ntm->tmInternalLeading == size, "%s: ntm->tmInternalLeading %d != %d (%u/%u,%d)\n", + font_name, ntm->tmInternalLeading, size, cell_height - ntm->ntmSizeEM, cell_height, ntm->tmHeight); +#undef SCALE_NTM + version = GET_BE_WORD(tt_os2.version); os2_first_char = GET_BE_WORD(tt_os2.usFirstCharIndex);
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
117
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200