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
March 2018
----- 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
785 discussions
Start a n
N
ew thread
Nikolay Sivov : user32/tests: Added some tests for WM_GETTEXTLENGTH/ WM_GETTEXT after EM_GETHANDLE was used.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: aa0ead79d36e032382f8c85df0750b64ba67e17a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa0ead79d36e032382f8c85d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Dec 4 21:31:35 2017 +0300 user32/tests: Added some tests for WM_GETTEXTLENGTH/WM_GETTEXT after EM_GETHANDLE was used. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 71eac4a70b56ce5a8b20a0e10bacc7dcf7638627) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/tests/edit.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index b9aa1c9..d745023 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -2722,6 +2722,7 @@ static void test_EM_GETHANDLE(void) { static const char str0[] = "untouched"; static const char str1[] = "1111+1111+1111#"; + static const char str1_1[] = "2111+1111+1111#"; static const char str2[] = "2222-2222-2222-2222#"; static const char str3[] = "3333*3333*3333*3333*3333#"; CHAR current[42]; @@ -2770,6 +2771,33 @@ static void test_EM_GETHANDLE(void) "got %d and \"%s\" (expected %d and \"%s\")\n", len, buffer, lstrlenA(str1), str1); LocalUnlock(hmem); + /* See if WM_GETTEXTLENGTH/WM_GETTEXT still work. */ + len = SendMessageA(hEdit, WM_GETTEXTLENGTH, 0, 0); +todo_wine + ok(len == lstrlenA(str1), "Unexpected text length %d.\n", len); + + lstrcpyA(current, str0); + r = SendMessageA(hEdit, WM_GETTEXT, sizeof(current), (LPARAM)current); +todo_wine + ok((r == lstrlenA(str1)) && !lstrcmpA(current, str1), + "Unexpected retval %d and text \"%s\" (expected %d and \"%s\")\n", r, current, lstrlenA(str1), str1); + + /* Application altered buffer contents, see if WM_GETTEXTLENGTH/WM_GETTEXT pick that up. */ + buffer = LocalLock(hmem); + ok(buffer != NULL, "got %p (expected != NULL)\n", buffer); + buffer[0] = '2'; + LocalUnlock(hmem); + + len = SendMessageA(hEdit, WM_GETTEXTLENGTH, 0, 0); +todo_wine + ok(len == lstrlenA(str1), "Unexpected text length %d.\n", len); + + lstrcpyA(current, str0); + r = SendMessageA(hEdit, WM_GETTEXT, sizeof(current), (LPARAM)current); +todo_wine + ok((r == lstrlenA(str1_1)) && !lstrcmpA(current, str1_1), + "Unexpected retval %d and text \"%s\" (expected %d and \"%s\")\n", r, current, lstrlenA(str1_1), str1_1); + /* use LocalAlloc first to get a different handle */ halloc = LocalAlloc(LMEM_MOVEABLE, 42); ok(halloc != NULL, "got %p (expected != NULL)\n", halloc);
1
0
0
0
Andrew Eikum : xaudio2: Account for abandoned buffer bytes.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 0d57e76476393a0b13e3ad1142a0cf931776411d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0d57e76476393a0b13e3ad11…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Dec 11 10:41:35 2017 -0600 xaudio2: Account for abandoned buffer bytes. This should fix bug 44148, a regression caused by e2c73fc394ba. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit f57246e5e55a6ea65a35458a7256c8547ccc5462) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/xaudio2_7/xaudio_dll.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index c2d2ee2..f641046 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -2277,13 +2277,14 @@ static void update_source_state(XA2SourceImpl *src) src->first_al_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; src->al_bufs_used -= processed; - if(processed > src->abandoned_albufs){ - for(i = src->abandoned_albufs; i < processed; ++i){ - ALint bufsize; + for(i = 0; i < processed; ++i){ + ALint bufsize; - alGetBufferi(al_buffers[i], AL_SIZE, &bufsize); + alGetBufferi(al_buffers[i], AL_SIZE, &bufsize); - src->in_al_bytes -= bufsize; + src->in_al_bytes -= bufsize; + + if(src->abandoned_albufs == 0){ src->played_frames += bufsize / src->submit_blocksize; if(al_buffers[i] == src->buffers[src->first_buf].latest_al_buf){ @@ -2309,11 +2310,10 @@ static void update_source_state(XA2SourceImpl *src) src->buffers[src->first_buf].xa2buffer.pContext); } } + }else{ + src->abandoned_albufs--; } - - src->abandoned_albufs = 0; - }else - src->abandoned_albufs -= processed; + } } if(!src->running)
1
0
0
0
Andrew Eikum : xaudio2: Ignore buffers returned from OpenAL after Stop.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: f65b7f886f9fc7df027f5eee1d30e2531142b8b4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f65b7f886f9fc7df027f5eee…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Nov 30 08:01:53 2017 -0600 xaudio2: Ignore buffers returned from OpenAL after Stop. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit e2c73fc394bace00c4463b6fcb6dfe9dc64084bc) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/xaudio2_7/tests/xaudio2.c | 78 ++++++++++++++++++++++++++++++++++++++++ dlls/xaudio2_7/xaudio_dll.c | 79 +++++++++++++++++++++++++---------------- dlls/xaudio2_7/xaudio_private.h | 2 +- 3 files changed, 128 insertions(+), 31 deletions(-) diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c index 54176ea..ff402f8 100644 --- a/dlls/xaudio2_7/tests/xaudio2.c +++ b/dlls/xaudio2_7/tests/xaudio2.c @@ -841,6 +841,82 @@ static void test_submix(IXAudio2 *xa) IXAudio2MasteringVoice_DestroyVoice(master); } +static void test_flush(IXAudio2 *xa) +{ + HRESULT hr; + IXAudio2MasteringVoice *master; + IXAudio2SourceVoice *src; + WAVEFORMATEX fmt; + XAUDIO2_BUFFER buf; + XAUDIO2_VOICE_STATE state; + + XA2CALL_0V(StopEngine); + + if(xaudio27) + hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); + else + hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); + ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + + fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; + fmt.nChannels = 2; + fmt.nSamplesPerSec = 44100; + fmt.wBitsPerSample = 32; + fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8; + fmt.nAvgBytesPerSec = fmt.nSamplesPerSec * fmt.nBlockAlign; + fmt.cbSize = 0; + + XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, NULL, NULL, NULL); + ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + + memset(&buf, 0, sizeof(buf)); + buf.AudioBytes = 22050 * fmt.nBlockAlign; + buf.pAudioData = HeapAlloc(GetProcessHeap(), 0, buf.AudioBytes); + fill_buf((float*)buf.pAudioData, &fmt, 440, 22050); + + hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Start failed: %08x\n", hr); + + XA2CALL_0(StartEngine); + ok(hr == S_OK, "StartEngine failed: %08x\n", hr); + + while(1){ + if(xaudio27) + IXAudio27SourceVoice_GetState((IXAudio27SourceVoice*)src, &state); + else + IXAudio2SourceVoice_GetState(src, &state, 0); + if(state.SamplesPlayed >= 2205) + break; + Sleep(10); + } + + hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Stop failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_FlushSourceBuffers(src); + ok(hr == S_OK, "FlushSourceBuffers failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Start failed: %08x\n", hr); + + Sleep(100); + + hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + + if(xaudio27){ + IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src); + }else{ + IXAudio2SourceVoice_DestroyVoice(src); + } + IXAudio2MasteringVoice_DestroyVoice(master); + + HeapFree(GetProcessHeap(), 0, (void*)buf.pAudioData); +} + static UINT32 test_DeviceDetails(IXAudio27 *xa) { HRESULT hr; @@ -1136,6 +1212,7 @@ START_TEST(xaudio2) test_buffer_callbacks((IXAudio2*)xa27); test_looping((IXAudio2*)xa27); test_submix((IXAudio2*)xa27); + test_flush((IXAudio2*)xa27); }else skip("No audio devices available\n"); @@ -1159,6 +1236,7 @@ START_TEST(xaudio2) test_buffer_callbacks(xa); test_looping(xa); test_submix(xa); + test_flush(xa); }else skip("No audio devices available\n"); diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index f3a749c..c2d2ee2 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -414,6 +414,7 @@ static void WINAPI XA2SRC_DestroyVoice(IXAudio2SourceVoice *iface) This->nbufs = 0; This->first_buf = 0; This->cur_buf = 0; + This->abandoned_albufs = 0; LeaveCriticalSection(&This->lock); } @@ -438,11 +439,18 @@ static HRESULT WINAPI XA2SRC_Stop(IXAudio2SourceVoice *iface, UINT32 Flags, UINT32 OperationSet) { XA2SourceImpl *This = impl_from_IXAudio2SourceVoice(iface); + ALint bufs; TRACE("%p, 0x%x, 0x%x\n", This, Flags, OperationSet); + palcSetThreadContext(This->xa2->al_ctx); + EnterCriticalSection(&This->lock); + alGetSourcei(This->al_src, AL_BUFFERS_QUEUED, &bufs); + + This->abandoned_albufs = bufs; + This->running = FALSE; LeaveCriticalSection(&This->lock); @@ -2264,44 +2272,53 @@ static void update_source_state(XA2SourceImpl *src) ALuint al_buffers[XAUDIO2_MAX_QUEUED_BUFFERS]; alSourceUnqueueBuffers(src->al_src, processed, al_buffers); + src->first_al_buf += processed; src->first_al_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; src->al_bufs_used -= processed; - for(i = 0; i < processed; ++i){ - ALint bufsize; - - alGetBufferi(al_buffers[i], AL_SIZE, &bufsize); + if(processed > src->abandoned_albufs){ + for(i = src->abandoned_albufs; i < processed; ++i){ + ALint bufsize; - src->in_al_bytes -= bufsize; - src->played_frames += bufsize / src->submit_blocksize; + alGetBufferi(al_buffers[i], AL_SIZE, &bufsize); - if(al_buffers[i] == src->buffers[src->first_buf].latest_al_buf){ - DWORD old_buf = src->first_buf; + src->in_al_bytes -= bufsize; + src->played_frames += bufsize / src->submit_blocksize; - src->first_buf++; - src->first_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; - src->nbufs--; + if(al_buffers[i] == src->buffers[src->first_buf].latest_al_buf){ + DWORD old_buf = src->first_buf; - TRACE("%p: done with buffer %u\n", src, old_buf); + src->first_buf++; + src->first_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; + src->nbufs--; - if(src->buffers[old_buf].xa2buffer.Flags & XAUDIO2_END_OF_STREAM) - src->played_frames = 0; + TRACE("%p: done with buffer %u\n", src, old_buf); - if(src->cb){ - IXAudio2VoiceCallback_OnBufferEnd(src->cb, - src->buffers[old_buf].xa2buffer.pContext); if(src->buffers[old_buf].xa2buffer.Flags & XAUDIO2_END_OF_STREAM) - IXAudio2VoiceCallback_OnStreamEnd(src->cb); - - if(src->nbufs > 0) - IXAudio2VoiceCallback_OnBufferStart(src->cb, - src->buffers[src->first_buf].xa2buffer.pContext); + src->played_frames = 0; + + if(src->cb){ + IXAudio2VoiceCallback_OnBufferEnd(src->cb, + src->buffers[old_buf].xa2buffer.pContext); + if(src->buffers[old_buf].xa2buffer.Flags & XAUDIO2_END_OF_STREAM) + IXAudio2VoiceCallback_OnStreamEnd(src->cb); + + if(src->nbufs > 0) + IXAudio2VoiceCallback_OnBufferStart(src->cb, + src->buffers[src->first_buf].xa2buffer.pContext); + } } } - } + + src->abandoned_albufs = 0; + }else + src->abandoned_albufs -= processed; } + if(!src->running) + return; + alGetSourcei(src->al_src, AL_BYTE_OFFSET, &bufpos); /* maintain IN_AL_PERIODS periods in AL */ @@ -2375,12 +2392,12 @@ static void do_engine_tick(IXAudio2Impl *This) EnterCriticalSection(&src->lock); - if(!src->in_use || !src->running){ + if(!src->in_use){ LeaveCriticalSection(&src->lock); continue; } - if(src->cb){ + if(src->cb && This->running){ #if XAUDIO2_VER == 0 IXAudio20VoiceCallback_OnVoiceProcessingPassStart((IXAudio20VoiceCallback*)src->cb); #else @@ -2394,12 +2411,14 @@ static void do_engine_tick(IXAudio2Impl *This) update_source_state(src); - alGetSourcei(src->al_src, AL_SOURCE_STATE, &st); - if(st != AL_PLAYING) - alSourcePlay(src->al_src); + if(This->running){ + alGetSourcei(src->al_src, AL_SOURCE_STATE, &st); + if(st != AL_PLAYING) + alSourcePlay(src->al_src); - if(src->cb) - IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(src->cb); + if(src->cb) + IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(src->cb); + } LeaveCriticalSection(&src->lock); } diff --git a/dlls/xaudio2_7/xaudio_private.h b/dlls/xaudio2_7/xaudio_private.h index f28a0ae..1a4aa08 100644 --- a/dlls/xaudio2_7/xaudio_private.h +++ b/dlls/xaudio2_7/xaudio_private.h @@ -81,7 +81,7 @@ typedef struct _XA2SourceImpl { /* most cases will only need about 4 AL buffers, but some corner cases * could require up to MAX_QUEUED_BUFFERS */ ALuint al_bufs[XAUDIO2_MAX_QUEUED_BUFFERS]; - DWORD first_al_buf, al_bufs_used; + DWORD first_al_buf, al_bufs_used, abandoned_albufs; struct list entry; } XA2SourceImpl;
1
0
0
0
Lucian Poston : shell32: Stub GetRedirectionCapabilities with S_OK.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 27bb92df21c12666f349c35fd2605aa5988074e1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27bb92df21c12666f349c35f…
Author: Lucian Poston <lucian.poston(a)gmail.com> Date: Wed Nov 22 12:20:46 2017 -0800 shell32: Stub GetRedirectionCapabilities with S_OK. Signed-off-by: Lucian Poston <lucian.poston(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 349064216a606c9c16be05da71ab5923a63d7c79) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/shell32/shellpath.c | 6 ++++-- dlls/shell32/tests/shellpath.c | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 9230623..e35eb09 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -5396,8 +5396,10 @@ static HRESULT WINAPI knownfolder_GetRedirectionCapabilities( IKnownFolder *iface, KF_REDIRECTION_CAPABILITIES *pCapabilities) { - FIXME("%p\n", pCapabilities); - return E_NOTIMPL; + FIXME("%p stub\n", pCapabilities); + if(!pCapabilities) return E_INVALIDARG; + *pCapabilities = KF_REDIRECTION_CAPABILITIES_DENY_ALL; + return S_OK; } static HRESULT WINAPI knownfolder_GetFolderDefinition( diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 3c757ec..bb550aa 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -2121,7 +2121,6 @@ static void test_knownFolders(void) CoTaskMemFree(folderPath); hr = IKnownFolder_GetRedirectionCapabilities(folder, &redirectionCapabilities); - todo_wine ok(hr == S_OK, "failed to get redirection capabilities: 0x%08x\n", hr); todo_wine ok(redirectionCapabilities==0, "invalid redirection capabilities returned: %d\n", redirectionCapabilities);
1
0
0
0
Alex Henrie : libport: Move rint fallback implementations from msvcrt to libport.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 59f4b9e527f5915aabd9df257cb259269f5c1aa0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=59f4b9e527f5915aabd9df25…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Nov 6 21:01:13 2017 -0500 libport: Move rint fallback implementations from msvcrt to libport. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 06d9c7e25e4ff71731c81f172269c8cd81b0c68a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dsound/dsound_convert.c | 1 + dlls/msvcrt/math.c | 24 ---------------- include/wine/port.h | 24 ++++++++++++++++ libs/port/Makefile.in | 1 + libs/port/rint.c | 66 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 92 insertions(+), 24 deletions(-) diff --git a/dlls/dsound/dsound_convert.c b/dlls/dsound/dsound_convert.c index 0c9a34b..ad0442e 100644 --- a/dlls/dsound/dsound_convert.c +++ b/dlls/dsound/dsound_convert.c @@ -35,6 +35,7 @@ */ #include "config.h" +#include "wine/port.h" #include <stdarg.h> #include <math.h> diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index f2d41c8..e56fdaa 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2477,11 +2477,7 @@ LDOUBLE CDECL MSVCR120_log2l(LDOUBLE x) */ double CDECL MSVCR120_rint(double x) { -#ifdef HAVE_RINT return rint(x); -#else - return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); -#endif } /********************************************************************* @@ -2489,11 +2485,7 @@ double CDECL MSVCR120_rint(double x) */ float CDECL MSVCR120_rintf(float x) { -#ifdef HAVE_RINTF return rintf(x); -#else - return MSVCR120_rint(x); -#endif } /********************************************************************* @@ -2509,11 +2501,7 @@ LDOUBLE CDECL MSVCR120_rintl(LDOUBLE x) */ MSVCRT_long CDECL MSVCR120_lrint(double x) { -#ifdef HAVE_LRINT return lrint(x); -#else - return MSVCR120_rint(x); -#endif } /********************************************************************* @@ -2521,11 +2509,7 @@ MSVCRT_long CDECL MSVCR120_lrint(double x) */ MSVCRT_long CDECL MSVCR120_lrintf(float x) { -#ifdef HAVE_LRINTF return lrintf(x); -#else - return MSVCR120_lrint(x); -#endif } /********************************************************************* @@ -2541,11 +2525,7 @@ MSVCRT_long CDECL MSVCR120_lrintl(LDOUBLE x) */ MSVCRT_longlong CDECL MSVCR120_llrint(double x) { -#ifdef HAVE_LLRINT return llrint(x); -#else - return MSVCR120_rint(x); -#endif } /********************************************************************* @@ -2553,11 +2533,7 @@ MSVCRT_longlong CDECL MSVCR120_llrint(double x) */ MSVCRT_longlong CDECL MSVCR120_llrintf(float x) { -#ifdef HAVE_LLRINTF return llrintf(x); -#else - return MSVCR120_llrint(x); -#endif } /********************************************************************* diff --git a/include/wine/port.h b/include/wine/port.h index 2989b39..addece0 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -272,6 +272,22 @@ int isinf(double x); int isnan(double x); #endif +#ifndef HAVE_LLRINT +__int64 llrint(double x); +#endif + +#ifndef HAVE_LLRINTF +__int64 llrintf(float x); +#endif + +#ifndef HAVE_LRINT +long lrint(double x); +#endif + +#ifndef HAVE_LRINTF +long lrintf(float x); +#endif + #ifndef HAVE_LSTAT int lstat(const char *file_name, struct stat *buf); #endif /* HAVE_LSTAT */ @@ -308,6 +324,14 @@ ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset ); int readlink( const char *path, char *buf, size_t size ); #endif /* HAVE_READLINK */ +#ifndef HAVE_RINT +double rint(double x); +#endif + +#ifndef HAVE_RINTF +float rintf(float x); +#endif + #ifndef HAVE_STATVFS int statvfs( const char *path, struct statvfs *buf ); #endif diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 9d7e44f..7fefda1 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -96,6 +96,7 @@ C_SRCS = \ pread.c \ pwrite.c \ readlink.c \ + rint.c \ spawn.c \ statvfs.c \ strcasecmp.c \ diff --git a/libs/port/rint.c b/libs/port/rint.c new file mode 100644 index 0000000..a99c00b --- /dev/null +++ b/libs/port/rint.c @@ -0,0 +1,66 @@ +/* + * rint family + * + * Copyright 2017 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/port.h" + +#include <math.h> + +#ifndef HAVE_RINT +double rint(double x) +{ + return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); +} +#endif + +#ifndef HAVE_RINTF +float rintf(float x) +{ + return rintf(x); +} +#endif + +#ifndef HAVE_LRINT +long lrint(double x) +{ + return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); +} +#endif + +#ifndef HAVE_LRINTF +long lrintf(float x) +{ + return lrint(x); +} +#endif + +#ifndef HAVE_LLRINT +__int64 llrint(double x) +{ + return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); +} +#endif + +#ifndef HAVE_LLRINTF +__int64 llrintf(float x) +{ + return llrint(x); +} +#endif
1
0
0
0
Piotr Caban : msvcp90: Use correct locale in basic_ios:: narrow and basic_ios::widen.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 9c332d3299330b04d04461861c99ed178c415aac URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9c332d3299330b04d0446186…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 28 19:13:43 2017 +0100 msvcp90: Use correct locale in basic_ios::narrow and basic_ios::widen. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 53bab55d303dd8ee8ce696b94c47718feb7bc3d4) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcp90/ios.c | 8 ++++---- dlls/msvcp90/tests/ios.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 84a6bf2c..5d80443 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -5832,7 +5832,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12) char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def) { TRACE("(%p %c %c)\n", this, ch, def); - return ctype_char_narrow_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf)), ch, def); + return ctype_char_narrow_ch(ctype_char_use_facet(IOS_LOCALE(&this->base)), ch, def); } /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */ @@ -5905,7 +5905,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8) char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch) { TRACE("(%p %c)\n", this, ch); - return ctype_char_widen_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf)), ch); + return ctype_char_widen_ch(ctype_char_use_facet(IOS_LOCALE(&this->base)), ch); } /* ?swap@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXAAV12@@Z */ @@ -6113,7 +6113,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12) char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def) { TRACE("(%p %c %c)\n", this, ch, def); - return ctype_wchar_narrow_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf)), ch, def); + return ctype_wchar_narrow_ch(ctype_wchar_use_facet(IOS_LOCALE(&this->base)), ch, def); } /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */ @@ -6200,7 +6200,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8) wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch) { TRACE("(%p %c)\n", this, ch); - return ctype_wchar_widen_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf)), ch); + return ctype_wchar_widen_ch(ctype_wchar_use_facet(IOS_LOCALE(&this->base)), ch); } /* ?swap@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXAAV12@@Z */ diff --git a/dlls/msvcp90/tests/ios.c b/dlls/msvcp90/tests/ios.c index 91c546e..2117df4 100644 --- a/dlls/msvcp90/tests/ios.c +++ b/dlls/msvcp90/tests/ios.c @@ -496,10 +496,14 @@ static basic_ostream_wchar* (*__thiscall p_basic_ostream_short_print_ushort)(bas /* basic_ios */ static locale* (*__thiscall p_basic_ios_char_imbue)(basic_ios_char*, locale*, const locale*); +static basic_ios_char* (*__thiscall p_basic_ios_char_ctor)(basic_ios_char*); +static char (*__thiscall p_basic_ios_char_widen)(basic_ios_char*, char); +static void (*__thiscall p_basic_ios_char_dtor)(basic_ios_char*); static locale* (*__thiscall p_basic_ios_wchar_imbue)(basic_ios_wchar*, locale*, const locale*); /* ios_base */ +static void (*__thiscall p_ios_base__Init)(ios_base*); static IOSB_iostate (*__thiscall p_ios_base_rdstate)(const ios_base*); static IOSB_fmtflags (*__thiscall p_ios_base_setf_mask)(ios_base*, IOSB_fmtflags, IOSB_fmtflags); static void (*__thiscall p_ios_base_unsetf)(ios_base*, IOSB_fmtflags); @@ -737,6 +741,8 @@ static BOOL init(void) SET(p_basic_ostream_char_print_complex_ldouble, "??$?6ODU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@O@0@@Z"); + SET(p_ios_base__Init, + "?_Init@ios_base@std@@IEAAXXZ"); SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QEBAHXZ"); SET(p_ios_base_setf_mask, @@ -748,6 +754,12 @@ static BOOL init(void) SET(p_basic_ios_char_imbue, "?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z"); + SET(p_basic_ios_char_ctor, + "??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ"); + SET(p_basic_ios_char_widen, + "?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z"); + SET(p_basic_ios_char_dtor, + "??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ"); SET(p_basic_ios_wchar_imbue, "?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z"); @@ -869,6 +881,8 @@ static BOOL init(void) SET(p_basic_ostream_char_print_complex_ldouble, "??$?6ODU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@O@0@@Z"); + SET(p_ios_base__Init, + "?_Init@ios_base@std@@IAAXXZ"); SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QBAHXZ"); SET(p_ios_base_setf_mask, @@ -880,6 +894,12 @@ static BOOL init(void) SET(p_basic_ios_char_imbue, "?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAA?AVlocale@2@ABV32@@Z"); + SET(p_basic_ios_char_ctor, + "??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAA@XZ"); + SET(p_basic_ios_char_widen, + "?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBADD@Z"); + SET(p_basic_ios_char_dtor, + "??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAA@XZ"); SET(p_basic_ios_wchar_imbue, "?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAA?AVlocale@2@ABV32@@Z"); @@ -1000,6 +1020,8 @@ static BOOL init(void) SET(p_basic_ostream_char_print_complex_ldouble, "??$?6ODU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@O@0@@Z"); + SET(p_ios_base__Init, + "?_Init@ios_base@std@@IAEXXZ"); SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QBEHXZ"); SET(p_ios_base_setf_mask, @@ -1011,6 +1033,12 @@ static BOOL init(void) SET(p_basic_ios_char_imbue, "?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z"); + SET(p_basic_ios_char_ctor, + "??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ"); + SET(p_basic_ios_char_widen, + "?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z"); + SET(p_basic_ios_char_dtor, + "??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ"); SET(p_basic_ios_wchar_imbue, "?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z"); @@ -2344,6 +2372,20 @@ static void test_istream_read_complex_double(void) } } +static void test_basic_ios(void) +{ + basic_ios_char bi; + char c; + + call_func1(p_basic_ios_char_ctor, &bi); + call_func1(p_ios_base__Init, &bi.base); + + c = (UINT_PTR)call_func2(p_basic_ios_char_widen, &bi, 'a'); + ok(c == 'a', "basic_ios::widen('a') returned %x\n", c); + + call_func1(p_basic_ios_char_dtor, &bi); +} + START_TEST(ios) { if(!init()) @@ -2369,6 +2411,7 @@ START_TEST(ios) test_ostream_print_complex_double(); test_ostream_print_complex_ldouble(); test_istream_read_complex_double(); + test_basic_ios(); ok(!invalid_parameter, "invalid_parameter_handler was invoked too many times\n");
1
0
0
0
Piotr Caban : msvcrt: Correctly set rounding mode in _ftol implementation.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: b7b880c3bba73cb59a550fdb9f5b6e5fbacc2b35 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7b880c3bba73cb59a550fdb…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Dec 18 12:10:28 2017 +0100 msvcrt: Correctly set rounding mode in _ftol implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 22edbd849ada33e8037f6f2b7fde75b1617f3f78) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 8a84a26..f2d41c8 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -596,7 +596,7 @@ __ASM_GLOBAL_FUNC(MSVCRT__ftol, "subl $12, %esp\n\t" /* sizeof(LONGLONG) + 2*sizeof(WORD) */ "fnstcw (%esp)\n\t" "mov (%esp), %ax\n\t" - "or $0xc, %ax\n\t" + "or $0xc00, %ax\n\t" "mov %ax, 2(%esp)\n\t" "fldcw 2(%esp)\n\t" "fistpq 4(%esp)\n\t"
1
0
0
0
Piotr Caban : msvcrt: Call cdecl functions with empty FPU stack in _CI* functions.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 24f97b33e1cc7118fe983a6ac939ed36cf4c5073 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=24f97b33e1cc7118fe983a6a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Nov 27 20:29:44 2017 +0100 msvcrt: Call cdecl functions with empty FPU stack in _CI* functions. The FPU stack should be empty on cdecl function call. Failing to do so breaks GCC 6.4.0 -O2 optimized code. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ee33d38c5041a8293c64257801572d1c742b0aba) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/math.c | 269 ++++++++++++++++++++++------------------------------- 1 file changed, 111 insertions(+), 158 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 775fbac..8a84a26 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -496,164 +496,117 @@ double CDECL MSVCRT_tanh( double x ) #if defined(__GNUC__) && defined(__i386__) -#define FPU_DOUBLE(var) double var; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) -#define FPU_DOUBLES(var1,var2) double var1,var2; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) - -/********************************************************************* - * _CIacos (MSVCRT.@) - */ -double CDECL _CIacos(void) -{ - FPU_DOUBLE(x); - return MSVCRT_acos(x); -} - -/********************************************************************* - * _CIasin (MSVCRT.@) - */ -double CDECL _CIasin(void) -{ - FPU_DOUBLE(x); - return MSVCRT_asin(x); -} - -/********************************************************************* - * _CIatan (MSVCRT.@) - */ -double CDECL _CIatan(void) -{ - FPU_DOUBLE(x); - return MSVCRT_atan(x); -} - -/********************************************************************* - * _CIatan2 (MSVCRT.@) - */ -double CDECL _CIatan2(void) -{ - FPU_DOUBLES(x,y); - return MSVCRT_atan2(x,y); -} - -/********************************************************************* - * _CIcos (MSVCRT.@) - */ -double CDECL _CIcos(void) -{ - FPU_DOUBLE(x); - return MSVCRT_cos(x); -} - -/********************************************************************* - * _CIcosh (MSVCRT.@) - */ -double CDECL _CIcosh(void) -{ - FPU_DOUBLE(x); - return MSVCRT_cosh(x); -} - -/********************************************************************* - * _CIexp (MSVCRT.@) - */ -double CDECL _CIexp(void) -{ - FPU_DOUBLE(x); - return MSVCRT_exp(x); -} - -/********************************************************************* - * _CIfmod (MSVCRT.@) - */ -double CDECL _CIfmod(void) -{ - FPU_DOUBLES(x,y); - return MSVCRT_fmod(x,y); -} - -/********************************************************************* - * _CIlog (MSVCRT.@) - */ -double CDECL _CIlog(void) -{ - FPU_DOUBLE(x); - return MSVCRT_log(x); -} - -/********************************************************************* - * _CIlog10 (MSVCRT.@) - */ -double CDECL _CIlog10(void) -{ - FPU_DOUBLE(x); - return MSVCRT_log10(x); -} - -/********************************************************************* - * _CIpow (MSVCRT.@) - */ -double CDECL _CIpow(void) -{ - FPU_DOUBLES(x,y); - return MSVCRT_pow(x,y); -} - -/********************************************************************* - * _CIsin (MSVCRT.@) - */ -double CDECL _CIsin(void) -{ - FPU_DOUBLE(x); - return MSVCRT_sin(x); -} - -/********************************************************************* - * _CIsinh (MSVCRT.@) - */ -double CDECL _CIsinh(void) -{ - FPU_DOUBLE(x); - return MSVCRT_sinh(x); -} - -/********************************************************************* - * _CIsqrt (MSVCRT.@) - */ -double CDECL _CIsqrt(void) -{ - FPU_DOUBLE(x); - return MSVCRT_sqrt(x); -} - -/********************************************************************* - * _CItan (MSVCRT.@) - */ -double CDECL _CItan(void) -{ - FPU_DOUBLE(x); - return MSVCRT_tan(x); -} - -/********************************************************************* - * _CItanh (MSVCRT.@) - */ -double CDECL _CItanh(void) -{ - FPU_DOUBLE(x); - return MSVCRT_tanh(x); -} - -/********************************************************************* - * _ftol (MSVCRT.@) - */ -LONGLONG CDECL MSVCRT__ftol(void) -{ - FPU_DOUBLE(x); - return (LONGLONG)x; -} +#define CREATE_FPU_FUNC1(name, call) \ + __ASM_GLOBAL_FUNC(name, \ + "pushl %ebp\n\t" \ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") \ + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") \ + "movl %esp, %ebp\n\t" \ + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") \ + "subl $68, %esp\n\t" /* sizeof(double)*8 + sizeof(int) */ \ + "fstpl (%esp)\n\t" /* store function argument */ \ + "fwait\n\t" \ + "movl $1, %ecx\n\t" /* empty FPU stack */ \ + "1:\n\t" \ + "fxam\n\t" \ + "fstsw %ax\n\t" \ + "and $0x4500, %ax\n\t" \ + "cmp $0x4100, %ax\n\t" \ + "je 2f\n\t" \ + "fstpl (%esp,%ecx,8)\n\t" \ + "fwait\n\t" \ + "incl %ecx\n\t" \ + "jmp 1b\n\t" \ + "2:\n\t" \ + "movl %ecx, -4(%ebp)\n\t" \ + "call " __ASM_NAME( #call ) "\n\t" \ + "movl -4(%ebp), %ecx\n\t" \ + "fstpl (%esp)\n\t" /* save result */ \ + "3:\n\t" /* restore FPU stack */ \ + "decl %ecx\n\t" \ + "fldl (%esp,%ecx,8)\n\t" \ + "cmpl $0, %ecx\n\t" \ + "jne 3b\n\t" \ + "leave\n\t" \ + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") \ + __ASM_CFI(".cfi_same_value %ebp\n\t") \ + "ret") + +#define CREATE_FPU_FUNC2(name, call) \ + __ASM_GLOBAL_FUNC(name, \ + "pushl %ebp\n\t" \ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") \ + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") \ + "movl %esp, %ebp\n\t" \ + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") \ + "subl $68, %esp\n\t" /* sizeof(double)*8 + sizeof(int) */ \ + "fstpl 8(%esp)\n\t" /* store function argument */ \ + "fwait\n\t" \ + "fstpl (%esp)\n\t" \ + "fwait\n\t" \ + "movl $2, %ecx\n\t" /* empty FPU stack */ \ + "1:\n\t" \ + "fxam\n\t" \ + "fstsw %ax\n\t" \ + "and $0x4500, %ax\n\t" \ + "cmp $0x4100, %ax\n\t" \ + "je 2f\n\t" \ + "fstpl (%esp,%ecx,8)\n\t" \ + "fwait\n\t" \ + "incl %ecx\n\t" \ + "jmp 1b\n\t" \ + "2:\n\t" \ + "movl %ecx, -4(%ebp)\n\t" \ + "call " __ASM_NAME( #call ) "\n\t" \ + "movl -4(%ebp), %ecx\n\t" \ + "fstpl 8(%esp)\n\t" /* save result */ \ + "3:\n\t" /* restore FPU stack */ \ + "decl %ecx\n\t" \ + "fldl (%esp,%ecx,8)\n\t" \ + "cmpl $1, %ecx\n\t" \ + "jne 3b\n\t" \ + "leave\n\t" \ + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") \ + __ASM_CFI(".cfi_same_value %ebp\n\t") \ + "ret") + +CREATE_FPU_FUNC1(_CIacos, MSVCRT_acos) +CREATE_FPU_FUNC1(_CIasin, MSVCRT_asin) +CREATE_FPU_FUNC1(_CIatan, MSVCRT_atan) +CREATE_FPU_FUNC2(_CIatan2, MSVCRT_atan2) +CREATE_FPU_FUNC1(_CIcos, MSVCRT_cos) +CREATE_FPU_FUNC1(_CIcosh, MSVCRT_cosh) +CREATE_FPU_FUNC1(_CIexp, MSVCRT_exp) +CREATE_FPU_FUNC2(_CIfmod, MSVCRT_fmod) +CREATE_FPU_FUNC1(_CIlog, MSVCRT_log) +CREATE_FPU_FUNC1(_CIlog10, MSVCRT_log10) +CREATE_FPU_FUNC2(_CIpow, MSVCRT_pow) +CREATE_FPU_FUNC1(_CIsin, MSVCRT_sin) +CREATE_FPU_FUNC1(_CIsinh, MSVCRT_sinh) +CREATE_FPU_FUNC1(_CIsqrt, MSVCRT_sqrt) +CREATE_FPU_FUNC1(_CItan, MSVCRT_tan) +CREATE_FPU_FUNC1(_CItanh, MSVCRT_tanh) + +__ASM_GLOBAL_FUNC(MSVCRT__ftol, + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp, %ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "subl $12, %esp\n\t" /* sizeof(LONGLONG) + 2*sizeof(WORD) */ + "fnstcw (%esp)\n\t" + "mov (%esp), %ax\n\t" + "or $0xc, %ax\n\t" + "mov %ax, 2(%esp)\n\t" + "fldcw 2(%esp)\n\t" + "fistpq 4(%esp)\n\t" + "fldcw (%esp)\n\t" + "movl 4(%esp), %eax\n\t" + "movl 8(%esp), %edx\n\t" + "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret") #endif /* defined(__GNUC__) && defined(__i386__) */
1
0
0
0
Fabian Maurer : gdiplus: In GdipPrivateAddMemoryFont allow loading fonts with long names.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: f14c832313f51a0ea2e5556d8d06bd88f61b0e0c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f14c832313f51a0ea2e5556d…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Nov 26 14:33:18 2017 +0100 gdiplus: In GdipPrivateAddMemoryFont allow loading fonts with long names. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 89366f740f1e3629a58711057afba39681a07ad6) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/gdiplus/font.c | 38 ++++++++++-------- dlls/gdiplus/tests/Makefile.in | 5 +++ dlls/gdiplus/tests/font.c | 73 +++++++++++++++++++++++++++++++++++ dlls/gdiplus/tests/resource.rc | 22 +++++++++++ dlls/gdiplus/tests/wine_longname.sfd | 66 +++++++++++++++++++++++++++++++ dlls/gdiplus/tests/wine_longname.ttf | Bin 0 -> 2216 bytes 6 files changed, 188 insertions(+), 16 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f14c832313f51a0ea2e5…
1
0
0
0
Nikolay Sivov : msvcrt: Added _get_purecall_handler().
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 135b7b40cd8975c991c9934eb7e7b00d5eb938bb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=135b7b40cd8975c991c9934e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Nov 24 21:17:08 2017 +0300 msvcrt: Added _get_purecall_handler(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b8d294cd7b277893de98721f6b81626d12952fd6) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- .../api-ms-win-crt-private-l1-1-0.spec | 2 +- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/exit.c | 9 +++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- dlls/vcruntime140/vcruntime140.spec | 2 +- 10 files changed, 18 insertions(+), 9 deletions(-) diff --git a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec index d1cd0b4..bc5414c 100644 --- a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec +++ b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec @@ -55,7 +55,7 @@ @ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr) ucrtbase._except_handler2 @ cdecl -arch=i386 _except_handler3(ptr ptr ptr ptr) ucrtbase._except_handler3 @ cdecl -arch=i386 _except_handler4_common(ptr ptr ptr ptr ptr ptr) ucrtbase._except_handler4_common -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() ucrtbase._get_purecall_handler @ cdecl _get_unexpected() ucrtbase._get_unexpected @ cdecl -arch=i386 _global_unwind2(ptr) ucrtbase._global_unwind2 @ stub _is_exception_typeof diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 6a85cbe..8a7e29e 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -883,7 +883,7 @@ @ cdecl _get_output_format() MSVCRT__get_output_format @ cdecl _get_pgmptr(ptr) @ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() @ cdecl _get_terminate() MSVCRT__get_terminate @ cdecl _get_timezone(ptr) @ cdecl _get_tzname(ptr str long long) MSVCRT__get_tzname diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index d7c2044..feba5d3 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1230,7 +1230,7 @@ @ cdecl _get_output_format() MSVCRT__get_output_format @ cdecl _get_pgmptr(ptr) @ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() @ cdecl _get_terminate() MSVCRT__get_terminate @ cdecl _get_timezone(ptr) @ cdecl _get_tzname(ptr str long long) MSVCRT__get_tzname diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 0a09475..9d9d891 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1230,7 +1230,7 @@ @ cdecl _get_output_format() MSVCRT__get_output_format @ cdecl _get_pgmptr(ptr) @ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() @ cdecl _get_terminate() MSVCRT__get_terminate @ cdecl _get_timezone(ptr) @ cdecl _get_tzname(ptr str long long) MSVCRT__get_tzname diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 68992a5..cedc09f 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1158,7 +1158,7 @@ @ cdecl _get_output_format() msvcr120._get_output_format @ cdecl _get_pgmptr(ptr) msvcr120._get_pgmptr @ cdecl _get_printf_count_output() msvcr120._get_printf_count_output -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() msvcr120._get_purecall_handler @ cdecl _get_terminate() msvcr120._get_terminate @ cdecl _get_timezone(ptr) msvcr120._get_timezone @ cdecl _get_tzname(ptr str long long) msvcr120._get_tzname diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 96c4f0f..947479b 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -552,7 +552,7 @@ @ cdecl _get_output_format() MSVCRT__get_output_format @ cdecl _get_pgmptr(ptr) @ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() @ cdecl _get_sbh_threshold() @ cdecl _get_terminate() MSVCRT__get_terminate @ cdecl _get_timezone(ptr) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index a6a02ed..38ce86c 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -533,7 +533,7 @@ @ cdecl _get_output_format() MSVCRT__get_output_format @ cdecl _get_pgmptr(ptr) @ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() @ cdecl _get_sbh_threshold() @ cdecl _get_terminate() MSVCRT__get_terminate @ cdecl _get_timezone(ptr) diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index 9fd373e..475082b 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -440,6 +440,15 @@ MSVCRT_purecall_handler CDECL _set_purecall_handler(MSVCRT_purecall_handler func } /********************************************************************* + * _get_purecall_handler + */ +MSVCRT_purecall_handler CDECL _get_purecall_handler(void) +{ + TRACE("\n"); + return purecall_handler; +} + +/********************************************************************* * _purecall (MSVCRT.@) */ void CDECL _purecall(void) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index eb87ba6..ef616e0 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -372,7 +372,7 @@ @ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle @ cdecl _get_pgmptr(ptr) @ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() @ cdecl _get_stream_buffer_pointers(ptr ptr ptr ptr) MSVCRT__get_stream_buffer_pointers @ cdecl _get_terminate() MSVCRT__get_terminate @ cdecl _get_thread_local_invalid_parameter_handler() diff --git a/dlls/vcruntime140/vcruntime140.spec b/dlls/vcruntime140/vcruntime140.spec index 1b9f3f9..b2ea7a7 100644 --- a/dlls/vcruntime140/vcruntime140.spec +++ b/dlls/vcruntime140/vcruntime140.spec @@ -57,7 +57,7 @@ @ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr) ucrtbase._except_handler2 @ cdecl -arch=i386 _except_handler3(ptr ptr ptr ptr) ucrtbase._except_handler3 @ cdecl -arch=i386 _except_handler4_common(ptr ptr ptr ptr ptr ptr) ucrtbase._except_handler4_common -@ stub _get_purecall_handler +@ cdecl _get_purecall_handler() ucrtbase._get_purecall_handler @ cdecl _get_unexpected() ucrtbase._get_unexpected @ cdecl -arch=i386 _global_unwind2(ptr) ucrtbase._global_unwind2 @ stub _is_exception_typeof
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
79
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
Results per page:
10
25
50
100
200