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
July
June
May
April
March
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 2011
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
852 discussions
Start a n
N
ew thread
Francois Gouget : msvcrt: Statically initialize and name the MSVCRT_file_cs critical section.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: d78bfe1149c1974d29d602a219f4423eaaa4e921 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d78bfe1149c1974d29d602a21…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Nov 16 16:28:20 2011 +0100 msvcrt: Statically initialize and name the MSVCRT_file_cs critical section. --- dlls/msvcrt/file.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 1334ec6..c636e85 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -128,6 +128,13 @@ static const ULONGLONG WCCOM = TOUL('c') << 32 | TOUL('o') << 16 | TOUL('m'); * protection, rather than locking the whole table for every change. */ static CRITICAL_SECTION MSVCRT_file_cs; +static CRITICAL_SECTION_DEBUG MSVCRT_file_cs_debug = +{ + 0, 0, &MSVCRT_file_cs, + { &MSVCRT_file_cs_debug.ProcessLocksList, &MSVCRT_file_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": MSVCRT_file_cs") } +}; +static CRITICAL_SECTION MSVCRT_file_cs = { &MSVCRT_file_cs_debug, -1, 0, 0, 0, 0 }; #define LOCK_FILES() do { EnterCriticalSection(&MSVCRT_file_cs); } while (0) #define UNLOCK_FILES() do { LeaveCriticalSection(&MSVCRT_file_cs); } while (0) @@ -440,8 +447,6 @@ void msvcrt_init_io(void) int i; ioinfo *fdinfo; - InitializeCriticalSection(&MSVCRT_file_cs); - MSVCRT_file_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": MSVCRT_file_cs"); GetStartupInfoA(&si); if (si.cbReserved2 >= sizeof(unsigned int) && si.lpReserved2 != NULL) { @@ -983,7 +988,6 @@ void msvcrt_free_io(void) for(i=0; i<sizeof(MSVCRT_fstream)/sizeof(MSVCRT_fstream[0]); i++) MSVCRT_free(MSVCRT_fstream[i]); - MSVCRT_file_cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&MSVCRT_file_cs); }
1
0
0
0
Francois Gouget : dxgi: Remove an unneeded refcount field.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: fb49b7fd5b43d55840ecabe762ab5e99e11b37bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb49b7fd5b43d55840ecabe76…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Nov 16 16:27:45 2011 +0100 dxgi: Remove an unneeded refcount field. --- dlls/dxgi/dxgi_main.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/dxgi/dxgi_main.c b/dlls/dxgi/dxgi_main.c index 2ef5072..36e3326 100644 --- a/dlls/dxgi/dxgi_main.c +++ b/dlls/dxgi/dxgi_main.c @@ -39,7 +39,6 @@ struct dxgi_main HMODULE d3d10core; struct dxgi_device_layer *device_layers; UINT layer_count; - LONG refcount; }; static struct dxgi_main dxgi_main; @@ -65,11 +64,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hInstDLL); - ++dxgi_main.refcount; break; case DLL_PROCESS_DETACH: - if (!--dxgi_main.refcount) dxgi_main_cleanup(); + dxgi_main_cleanup(); break; }
1
0
0
0
Francois Gouget : rpcrt4: An interface pointer just has the size of a regular pointer.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: e9e0507d2b470fe6edadab777506899d50a75ce5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e9e0507d2b470fe6edadab777…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Nov 16 16:24:39 2011 +0100 rpcrt4: An interface pointer just has the size of a regular pointer. --- dlls/rpcrt4/ndr_stubless.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index fdde3a4..88aae7a 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -211,6 +211,8 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat) break; default: FIXME("Unhandled type %02x\n", *pFormat); + /* fallthrough */ + case RPC_FC_IP: size = sizeof(void *); break; }
1
0
0
0
Huw Davies : msxml3: Re-initialise the variant so that VariantChangeType doesn' t free the user string.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: 8f9c39d2a8a3666efb86d400d9f5f9c464f3ab2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f9c39d2a8a3666efb86d400d…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 16 13:18:49 2011 +0000 msxml3: Re-initialise the variant so that VariantChangeType doesn't free the user string. --- dlls/msxml3/httprequest.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c index 32cfc2c..2385d18 100644 --- a/dlls/msxml3/httprequest.c +++ b/dlls/msxml3/httprequest.c @@ -706,6 +706,7 @@ static HRESULT WINAPI httprequest_open(IXMLHTTPRequest *iface, BSTR method, BSTR if (hr == S_OK) This->user = V_BSTR(&str); + VariantInit(&str); hr = VariantChangeType(&str, &password, 0, VT_BSTR); if (hr == S_OK) This->password = V_BSTR(&str);
1
0
0
0
Jacek Caban : mshtml: Fixed events tests on IE9.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: 938dcab3f48db1909e722712bb3a56dca644b48a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=938dcab3f48db1909e722712b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 16 15:26:49 2011 +0100 mshtml: Fixed events tests on IE9. --- dlls/mshtml/tests/events.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c index 1498818..d83a511 100644 --- a/dlls/mshtml/tests/events.c +++ b/dlls/mshtml/tests/events.c @@ -646,6 +646,7 @@ static void _test_event_obj(unsigned line, const char *type, const xy_test_t *xy _test_event_screenx(line, event, -10); _test_event_screeny(line, event, -10); + V_VT(&v) = VT_NULL; hres = IHTMLEventObj_get_returnValue(event, &v); ok_(__FILE__,line)(hres == S_OK, "get_returnValue failed: %08x\n", hres); ok_(__FILE__,line)(V_VT(&v) == VT_EMPTY, "V_VT(returnValue) = %d\n", V_VT(&v));
1
0
0
0
Jacek Caban : mshtml: Fixed some htmldoc.c tests on IE9.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: 7377dfbb07cc13d45c45b2c1ccdb2a45394b8e33 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7377dfbb07cc13d45c45b2c1c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 16 15:22:12 2011 +0100 mshtml: Fixed some htmldoc.c tests on IE9. --- dlls/mshtml/tests/htmldoc.c | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index b34b037..12717fe 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -927,7 +927,13 @@ static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }; static HRESULT WINAPI Stream_QueryInterface(IStream *iface, REFIID riid, void **ppv) { - ok(0, "unexpected call\n"); + if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ISequentialStream, riid) || IsEqualGUID(&IID_IStream, riid)) { + *ppv = iface; + return S_OK; + } + + ok(0, "unexpected call %s\n", debugstr_guid(riid)); + *ppv = NULL; return E_NOINTERFACE; } @@ -1318,7 +1324,7 @@ static HRESULT WINAPI Moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMon hres = IBindStatusCallback_GetBindInfo(callback, &bindf, &bindinfo); ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == (BINDF_PULLDATA|BINDF_ASYNCSTORAGE|BINDF_ASYNCHRONOUS), "bindf = %08x\n", bindf); + ok((bindf & ~BINDF_HYPERLINK /* IE9 */) == (BINDF_PULLDATA|BINDF_ASYNCSTORAGE|BINDF_ASYNCHRONOUS), "bindf = %08x\n", bindf); ok(bindinfo.cbSize == sizeof(bindinfo), "bindinfo.cbSize=%d\n", bindinfo.cbSize); ok(bindinfo.szExtraInfo == NULL, "bindinfo.szExtraInfo=%p\n", bindinfo.szExtraInfo); /* TODO: test stgmedData */ @@ -2687,6 +2693,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID test_readyState(NULL); return S_OK; case OLECMDID_UPDATETRAVELENTRY_DATARECOVERY: + case 6058: return E_FAIL; /* FIXME */ default: ok(0, "unexpected command %d\n", nCmdID); @@ -3668,6 +3675,12 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid { *ppv = NULL; + if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IWebBrowser, riid) + || IsEqualGUID(&IID_IWebBrowserApp, riid) || IsEqualGUID(&IID_IWebBrowser2, riid)) { + *ppv = iface; + return S_OK; + } + if(IsEqualGUID(riid, &IID_IOleObject)) return E_NOINTERFACE; /* TODO */ @@ -4513,8 +4526,6 @@ static void _test_readyState(unsigned line, IUnknown *unk) hres = IHTMLDocument2_get_readyState(htmldoc, &state); ok(hres == S_OK, "get_ReadyState failed: %08x\n", hres); - trace("STATE %s\n", wine_dbgstr_w(state)); - if(!strcmp_wa(state, "interactive") && load_state == LD_LOADING) load_state = LD_INTERACTIVE; @@ -4557,8 +4568,6 @@ static void _test_readyState(unsigned line, IUnknown *unk) ok_(__FILE__,line) (V_VT(&out) == VT_I4, "V_VT(out)=%d\n", V_VT(&out)); ok_(__FILE__,line) (V_I4(&out) == load_state%5, "VT_I4(out)=%d, expected %d\n", V_I4(&out), load_state%5); - trace("READY STATE %d\n", V_I4(&out)); - test_doscroll((IUnknown*)htmldoc); IHTMLDocument2_Release(htmldoc); @@ -4722,7 +4731,7 @@ static void test_Load(IPersistMoniker *persist, IMoniker *mon) CHECK_CALLED(Invoke_AMBIENT_SILENT); CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); CHECK_CALLED(Invoke_AMBIENT_USERAGENT); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); + CLEAR_CALLED(Invoke_AMBIENT_PALETTE); /* not called on IE9 */ CHECK_CALLED(GetOptionKeyPath); CHECK_CALLED(GetOverrideKeyPath); CHECK_CALLED(GetWindow); @@ -5705,7 +5714,7 @@ static void test_ClientSite(IOleObject *oleobj, DWORD flags) CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); CHECK_CALLED(Invoke_AMBIENT_SILENT); CHECK_CALLED(Invoke_AMBIENT_USERAGENT); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); + CLEAR_CALLED(Invoke_AMBIENT_PALETTE); /* not called on IE9 */ todo_wine CHECK_CALLED(GetTravelLog); set_clientsite = TRUE; @@ -5761,7 +5770,7 @@ static void test_OnAmbientPropertyChange(IHTMLDocument2 *doc) SET_EXPECT(Invoke_AMBIENT_PALETTE); hres = IOleControl_OnAmbientPropertyChange(control, DISPID_AMBIENT_PALETTE); ok(hres == S_OK, "OnAmbientChange failed: %08x\n", hres); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); + CLEAR_CALLED(Invoke_AMBIENT_PALETTE); /* not called on IE9 */ IOleControl_Release(control); } @@ -6857,7 +6866,7 @@ static void test_UIActivate(BOOL do_load, BOOL use_ipsex, BOOL use_ipsw) CHECK_CALLED(Invoke_AMBIENT_SILENT); CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); CHECK_CALLED(Invoke_AMBIENT_USERAGENT); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); + CLEAR_CALLED(Invoke_AMBIENT_PALETTE); /* not called on IE9 */ CHECK_CALLED(GetOptionKeyPath); CHECK_CALLED(GetOverrideKeyPath); CHECK_CALLED(GetWindow);
1
0
0
0
Piotr Caban : msvcr90/tests: Added nonblocking FILE functions test.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: abd0f4318e964fd833923bb524cdec9d0c35755a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=abd0f4318e964fd833923bb52…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Nov 16 12:51:06 2011 +0100 msvcr90/tests: Added nonblocking FILE functions test. --- dlls/msvcr90/tests/msvcr90.c | 113 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 113 insertions(+), 0 deletions(-) diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c index b6ae4c3..09b4a40 100644 --- a/dlls/msvcr90/tests/msvcr90.c +++ b/dlls/msvcr90/tests/msvcr90.c @@ -100,6 +100,15 @@ static void* (__cdecl *p_get_terminate)(void); static void* (__cdecl *p_get_unexpected)(void); static int (__cdecl *p__vswprintf_l)(wchar_t*, const wchar_t*, _locale_t, __ms_va_list); static int (__cdecl *p_vswprintf_l)(wchar_t*, const wchar_t*, _locale_t, __ms_va_list); +static FILE* (__cdecl *p_fopen)(const char*, const char*); +static int (__cdecl *p_fclose)(FILE*); +static int (__cdecl *p_unlink)(const char*); +static void (__cdecl *p_lock_file)(FILE*); +static void (__cdecl *p_unlock_file)(FILE*); +static int (__cdecl *p_fileno)(FILE*); +static int (__cdecl *p_feof)(FILE*); +static int (__cdecl *p_ferror)(FILE*); +static int (__cdecl *p_flsbuf)(int, FILE*); /* type info */ @@ -268,6 +277,15 @@ static BOOL init(void) SET(p_get_unexpected, "_get_unexpected"); SET(p__vswprintf_l, "__vswprintf_l"); SET(p_vswprintf_l, "_vswprintf_l"); + SET(p_fopen, "fopen"); + SET(p_fclose, "fclose"); + SET(p_unlink, "_unlink"); + SET(p_lock_file, "_lock_file"); + SET(p_unlock_file, "_unlock_file"); + SET(p_fileno, "_fileno"); + SET(p_feof, "feof"); + SET(p_ferror, "ferror"); + SET(p_flsbuf, "_flsbuf"); if (sizeof(void *) == 8) { SET(p_type_info_name_internal_method, "?_name_internal_method@type_info@@QEBAPEBDPEAU__type_info_node@@@Z"); @@ -1025,6 +1043,100 @@ static void test__vswprintf_l(void) wine_dbgstr_w(buf), wine_dbgstr_w(format)); } +struct block_file_arg +{ + FILE *read; + FILE *write; + HANDLE blocked; +}; + +static DWORD WINAPI block_file(void *arg) +{ + struct block_file_arg *files = arg; + + p_lock_file(files->read); + p_lock_file(files->write); + SetEvent(files->blocked); + WaitForSingleObject(files->blocked, INFINITE); + p_unlock_file(files->read); + p_unlock_file(files->write); + return 0; +} + +static void test_nonblocking_file_access(void) +{ + HANDLE thread; + struct block_file_arg arg; + FILE *filer, *filew; + int ret; + + if(!p_lock_file || !p_unlock_file) { + win_skip("_lock_file not available\n"); + return; + } + + filew = p_fopen("test_file", "w"); + ok(filew != NULL, "unable to create test file\n"); + if(!filew) + return; + filer = p_fopen("test_file", "r"); + ok(filer != NULL, "unable to open test file\n"); + if(!filer) { + p_fclose(filew); + p_unlink("test_file"); + return; + } + + arg.read = filer; + arg.write = filew; + arg.blocked = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(arg.blocked != NULL, "CreateEvent failed\n"); + if(!arg.blocked) { + p_fclose(filer); + p_fclose(filew); + p_unlink("test_file"); + return; + } + thread = CreateThread(NULL, 0, block_file, (void*)&arg, 0, NULL); + ok(thread != NULL, "CreateThread failed\n"); + if(!thread) { + CloseHandle(arg.blocked); + p_fclose(filer); + p_fclose(filew); + p_unlink("test_file"); + return; + } + WaitForSingleObject(arg.blocked, INFINITE); + + ret = p_fileno(filer); + ok(ret, "_fileno(filer) returned %d\n", ret); + ret = p_fileno(filew); + ok(ret, "_fileno(filew) returned %d\n", ret); + + ret = p_feof(filer); + ok(ret==0, "feof(filer) returned %d\n", ret); + ret = p_feof(filew); + ok(ret==0, "feof(filew) returned %d\n", ret); + + ret = p_ferror(filer); + ok(ret==0, "ferror(filer) returned %d\n", ret); + ret = p_ferror(filew); + ok(ret==0, "ferror(filew) returned %d\n", ret); + + ret = p_flsbuf('a', filer); + ok(ret==-1, "_flsbuf(filer) returned %d\n", ret); + ret = p_flsbuf('a', filew); + ok(ret=='a', "_flsbuf(filew) returned %d\n", ret); + + SetEvent(arg.blocked); + WaitForSingleObject(thread, INFINITE); + CloseHandle(arg.blocked); + CloseHandle(thread); + p_fclose(filer); + p_fclose(filew); + p_unlink("test_file"); +} + START_TEST(msvcr90) { if(!init()) @@ -1046,4 +1158,5 @@ START_TEST(msvcr90) test_typeinfo(); test_getptd(); test__vswprintf_l(); + test_nonblocking_file_access(); }
1
0
0
0
Piotr Caban : msvcrt: Don't use fputc in flsbuf implementation.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: 764b85511c72ab9e4b4ab456c98e0e71b4aa4009 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=764b85511c72ab9e4b4ab456c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Nov 16 12:50:50 2011 +0100 msvcrt: Don't use fputc in flsbuf implementation. --- dlls/msvcrt/file.c | 74 +++++++++++++++++++++++++++------------------------ 1 files changed, 39 insertions(+), 35 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 0ead68a..1334ec6 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -3062,37 +3062,6 @@ int CDECL MSVCRT__wfopen_s(MSVCRT_FILE** pFile, const MSVCRT_wchar_t *filename, return 0; } -/* MSVCRT_fputc calls MSVCRT__flsbuf which calls MSVCRT_fputc */ -int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file); - -/********************************************************************* - * fputc (MSVCRT.@) - */ -int CDECL MSVCRT_fputc(int c, MSVCRT_FILE* file) -{ - int res; - - MSVCRT__lock_file(file); - if(file->_cnt>0) { - *file->_ptr++=c; - file->_cnt--; - if (c == '\n') - { - res = msvcrt_flush_buffer(file); - MSVCRT__unlock_file(file); - return res ? res : c; - } - else { - MSVCRT__unlock_file(file); - return c & 0xff; - } - } else { - res = MSVCRT__flsbuf(c, file); - MSVCRT__unlock_file(file); - return res; - } -} - /********************************************************************* * _flsbuf (MSVCRT.@) */ @@ -3109,10 +3078,17 @@ int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file) return MSVCRT_EOF; } if(file->_bufsiz) { - int res=msvcrt_flush_buffer(file); - if(!res) - res = MSVCRT_fputc(c, file); - return res; + int res = 0; + + if(file->_cnt == 0) + res = msvcrt_flush_buffer(file); + if(!res) { + *file->_ptr++ = c; + file->_cnt--; + res = msvcrt_flush_buffer(file); + } + + return res ? res : c&0xff; } else { unsigned char cc=c; int len; @@ -3127,6 +3103,34 @@ int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file) } /********************************************************************* + * fputc (MSVCRT.@) + */ +int CDECL MSVCRT_fputc(int c, MSVCRT_FILE* file) +{ + int res; + + MSVCRT__lock_file(file); + if(file->_cnt>0) { + *file->_ptr++=c; + file->_cnt--; + if (c == '\n') + { + res = msvcrt_flush_buffer(file); + MSVCRT__unlock_file(file); + return res ? res : c; + } + else { + MSVCRT__unlock_file(file); + return c & 0xff; + } + } else { + res = MSVCRT__flsbuf(c, file); + MSVCRT__unlock_file(file); + return res; + } +} + +/********************************************************************* * _fputchar (MSVCRT.@) */ int CDECL MSVCRT__fputchar(int c)
1
0
0
0
Huw Davies : gdi32: Add a helper to retrieve the octant bias.
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: 666f83bc0f82c4d8bae2f30f7a6dee8f2d4cf584 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=666f83bc0f82c4d8bae2f30f7…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 16 11:20:53 2011 +0000 gdi32: Add a helper to retrieve the octant bias. --- dlls/gdi32/dibdrv/objects.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 3de6cb9..c0dd7d2 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -308,6 +308,12 @@ static inline DWORD get_octant_mask(int dx, int dy) return 1 << (get_octant_number(dx, dy) - 1); } +static inline int get_bias( DWORD mask ) +{ + /* Octants 3, 5, 6 and 8 take a bias */ + return (mask & 0xb4) ? 1 : 0; +} + static void solid_pen_line_callback(dibdrv_physdev *pdev, INT x, INT y) { RECT rect; @@ -653,8 +659,7 @@ static BOOL solid_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end) params.dx = abs(dx); params.dy = abs(dy); params.octant = get_octant_mask(dx, dy); - /* Octants 3, 5, 6 and 8 take a bias */ - params.bias = (params.octant & 0xb4) ? 1 : 0; + params.bias = get_bias(params.octant); for(i = 0; i < clip->numRects; i++) { @@ -926,8 +931,7 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end) params.dx = abs(dx); params.dy = abs(dy); params.octant = get_octant_mask(dx, dy); - /* Octants 3, 5, 6 and 8 take a bias */ - params.bias = (params.octant & 0xb4) ? 1 : 0; + params.bias = get_bias(params.octant); for(i = 0; i < clip->numRects; i++) {
1
0
0
0
Huw Davies : gdi32: Use an array of masks to simplify the bitmap conversion .
by Alexandre Julliard
16 Nov '11
16 Nov '11
Module: wine Branch: master Commit: 48b1e66309ec2dd42ad6b0166cbf184d476f704a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=48b1e66309ec2dd42ad6b0166…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 16 11:20:52 2011 +0000 gdi32: Use an array of masks to simplify the bitmap conversion. --- dlls/gdi32/freetype.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 5fb8cda..3a1ae99 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5049,6 +5049,8 @@ static inline BYTE get_max_level( UINT format ) return 255; } +static const BYTE masks[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}; + static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, LPGLYPHMETRICS lpgm, DWORD buflen, LPVOID buf, const MAT2* lpmat) @@ -5367,7 +5369,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, memset( buf, 0, needed ); while(h--) { for(x = 0; x < pitch && x < ft_face->glyph->bitmap.width; x++) - if (src[x / 8] & (1 << ( (7 - (x % 8))))) dst[x] = max_level; + if (src[x / 8] & masks[x % 8]) dst[x] = max_level; src += ft_face->glyph->bitmap.pitch; dst += pitch; } @@ -5439,7 +5441,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, { for (x = 0; x < width && x < ft_face->glyph->bitmap.width; x++) { - if ( src[x / 8] & (1 << ( (7 - (x % 8)))) ) + if ( src[x / 8] & masks[x % 8] ) ((unsigned int *)dst)[x] = ~0u; } src += src_pitch;
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
86
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
Results per page:
10
25
50
100
200