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 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
844 discussions
Start a n
N
ew thread
Hwang YunSong(=?UTF-8?Q?=ED=99=A9=EC=9C=A4=EC=84=B1?=) : oledlg: Updated Korean resource.
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: 7e3926add29807b0dcce28e06e855ec77503f205 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e3926add29807b0dcce28e06…
Author: Hwang YunSong(황윤성) <hys545(a)dreamwiz.com> Date: Wed Mar 14 17:55:58 2007 +0900 oledlg: Updated Korean resource. --- dlls/oledlg/oledlg_Ko.rc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/oledlg/oledlg_Ko.rc b/dlls/oledlg/oledlg_Ko.rc index 0029471..1182cbf 100644 --- a/dlls/oledlg/oledlg_Ko.rc +++ b/dlls/oledlg/oledlg_Ko.rc @@ -56,7 +56,7 @@ STRINGTABLE DISCARDABLE IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ư���� �ٿ��ֱ�" +CAPTION "Ư���ϰ� �ٿ��ֱ�" FONT 8, "MS Shell Dlg" BEGIN LTEXT "����:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
1
0
0
0
Hwang YunSong(=?UTF-8?Q?=ED=99=A9=EC=9C=A4=EC=84=B1?=) : cmd: Updated Korean Resource.
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: 323ff79fe7f45385e0f801e43440c8a9ad604fee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=323ff79fe7f45385e0f801e43…
Author: Hwang YunSong(황윤성) <hys545(a)dreamwiz.com> Date: Wed Mar 14 17:47:18 2007 +0900 cmd: Updated Korean Resource. --- programs/cmd/Ko.rc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cmd/Ko.rc b/programs/cmd/Ko.rc index ad3f33a..ebc3116 100644 --- a/programs/cmd/Ko.rc +++ b/programs/cmd/Ko.rc @@ -230,6 +230,6 @@ HELP <����>�� ġ�� �� ������ ���� ������ ������\n" WCMD_CONFIRM, "����� Ȯ���մϱ�?" WCMD_YES, "��" WCMD_NO, "�ƴϿ�" - WCMD_NOASSOC, "�� ����Ȯ���� %s�� ����� Ǯ���� �����ϴ� \n" - WCMD_NOFTYPE, "No open command associated with file type '%s'\n" + WCMD_NOASSOC, "�� ����Ȯ���� %s�� ����� Ǯ���� �����ϴ�. \n" + WCMD_NOFTYPE, "�� ���� ���� '%s'�� ����� ��� ���ɵ� �����ϴ�.'\n" }
1
0
0
0
Rob Shearman : ole32: Print the contents of the IID input to OleLoad.
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: f1ced14eed40365de0d393467f53b7b576a69824 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1ced14eed40365de0d393467…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Mar 14 15:53:33 2007 +0000 ole32: Print the contents of the IID input to OleLoad. --- dlls/ole32/ole2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 8c49621..924c6cd 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -948,7 +948,7 @@ HRESULT WINAPI OleLoad( STATSTG storageInfo; HRESULT hres; - TRACE("(%p,%p,%p,%p)\n", pStg, riid, pClientSite, ppvObj); + TRACE("(%p, %s, %p, %p)\n", pStg, debugstr_guid(riid), pClientSite, ppvObj); *ppvObj = NULL;
1
0
0
0
Rob Shearman : user32: Add several more MsgWaitForMultipleObjects tests and split them out from the main message tests .
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: c3b30e535102ddfffa8f97a8bed8a94176f95cd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3b30e535102ddfffa8f97a8b…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Mar 14 15:46:56 2007 +0000 user32: Add several more MsgWaitForMultipleObjects tests and split them out from the main message tests. --- dlls/user32/tests/msg.c | 60 ++++++++++++++++++++++++++++++++++------------ 1 files changed, 44 insertions(+), 16 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index a380883..50b00c8 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -3625,6 +3625,49 @@ static const struct message WmSetIcon_2[] = { { 0 } }; +static void test_MsgWaitForMultipleObjects(HWND hwnd) +{ + DWORD ret; + MSG msg; + + ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); + ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); + + PostMessageA(hwnd, WM_USER, 0, 0); + + ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); + ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret); + + ok(PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n"); + ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); + + ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); + ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); + + PostMessageA(hwnd, WM_USER, 0, 0); + + ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); + ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret); + + ok(PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE ), "PeekMessage should succeed\n"); + ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); + + /* shows QS_POSTMESSAGE flag is cleared in the PeekMessage call */ + ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); + ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); + + PostMessageA(hwnd, WM_USER, 0, 0); + + /* new incoming message causes it to become signaled again */ + ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); + ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret); + + ok(PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n"); + ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); + ok(PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n"); + ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); +} + /* test if we receive the right sequence of messages */ static void test_messages(void) { @@ -3632,7 +3675,6 @@ static void test_messages(void) HWND hchild2, hbutton; HMENU hmenu; MSG msg; - DWORD ret; flush_sequence(); @@ -3921,21 +3963,7 @@ static void test_messages(void) while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); flush_sequence(); - /* MsgWaitForMultipleObjects test */ - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); - - PostMessageA(hparent, WM_USER, 0, 0); - - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret); - - ok(PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n"); - ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); - - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); - /* end of MsgWaitForMultipleObjects test */ + test_MsgWaitForMultipleObjects(hparent); /* the following test causes an exception in user.exe under win9x */ if (!PostMessageW( hparent, WM_USER, 0, 0 ))
1
0
0
0
Rob Shearman : rpcrt4: Unmarshal NULL OLE interfaces properly by handling the case of a 0 stream size .
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: 8620d15d3960921a8f316e0653ef0d11ceb55e89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8620d15d3960921a8f316e065…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Mar 14 15:46:16 2007 +0000 rpcrt4: Unmarshal NULL OLE interfaces properly by handling the case of a 0 stream size. --- dlls/rpcrt4/ndr_ole.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/rpcrt4/ndr_ole.c b/dlls/rpcrt4/ndr_ole.c index 6c32121..b65e18b 100644 --- a/dlls/rpcrt4/ndr_ole.c +++ b/dlls/rpcrt4/ndr_ole.c @@ -288,12 +288,14 @@ unsigned char * WINAPI NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg *(LPVOID*)ppMemory = NULL; if (pStubMsg->Buffer + sizeof(DWORD) < (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) { stream = RpcStream_Create(pStubMsg, FALSE); - if (stream) { + if (!stream) RpcRaiseException(E_OUTOFMEMORY); + if (*((RpcStreamImpl *)stream)->size != 0) hr = COM_UnmarshalInterface(stream, &IID_NULL, (LPVOID*)ppMemory); - IStream_Release(stream); - if (FAILED(hr)) + else + hr = S_OK; + IStream_Release(stream); + if (FAILED(hr)) RpcRaiseException(hr); - } } return NULL; }
1
0
0
0
Rob Shearman : include: Add a definition for REGCLS_SURROGATE and add declarations for CoRegisterSurrogate and CoGetObjectContext .
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: 2b5524867d427d2b73d19653fe724609b8b40b89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b5524867d427d2b73d19653f…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Mar 14 15:43:52 2007 +0000 include: Add a definition for REGCLS_SURROGATE and add declarations for CoRegisterSurrogate and CoGetObjectContext. --- include/objbase.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/objbase.h b/include/objbase.h index 79603a0..4d94c05 100644 --- a/include/objbase.h +++ b/include/objbase.h @@ -355,7 +355,8 @@ typedef enum tagREGCLS REGCLS_SINGLEUSE = 0, REGCLS_MULTIPLEUSE = 1, REGCLS_MULTI_SEPARATE = 2, - REGCLS_SUSPENDED = 4 + REGCLS_SUSPENDED = 4, + REGCLS_SURROGATE = 8 } REGCLS; HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv); @@ -363,6 +364,7 @@ HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsC HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister); HRESULT WINAPI CoGetPSClsid(REFIID riid,CLSID *pclsid); HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid); +HRESULT WINAPI CoRegisterSurrogate(LPSURROGATE pSurrogate); HRESULT WINAPI CoSuspendClassObjects(void); HRESULT WINAPI CoResumeClassObjects(void); ULONG WINAPI CoAddRefServerProcess(void); @@ -400,6 +402,7 @@ HRESULT WINAPI CoRevertToSelf(void); HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew); HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew); HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, LPVOID lpvReserved); +HRESULT WINAPI CoGetObjectContext(REFIID riid, LPVOID *ppv); HRESULT WINAPI CoCreateGuid(GUID* pguid); BOOL WINAPI CoIsOle1Class(REFCLSID rclsid);
1
0
0
0
Huw Davies : kernel32: Fix GetPrivateProfileSectionNamesA when the file does not exist.
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: 3f49239063eac5d91fdd6b75c09cc13d1af609b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f49239063eac5d91fdd6b75c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 14 14:55:14 2007 +0000 kernel32: Fix GetPrivateProfileSectionNamesA when the file does not exist. --- dlls/kernel32/profile.c | 2 ++ dlls/kernel32/tests/profile.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index b48f5e9..0abb887 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -1629,6 +1629,8 @@ DWORD WINAPI GetPrivateProfileSectionNamesA( LPSTR buffer, DWORD size, else ret = ret-1; } + else if(size) + buffer[0] = '\0'; RtlFreeUnicodeString(&filenameW); HeapFree(GetProcessHeap(), 0, bufferW); diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 4379ee2..3ee66eb 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -145,6 +145,7 @@ static void test_profile_sections(void) static const char content[]="[section1]\r\n[section2]\r\n[section3]\r\n"; static const char testfile3[]=".\\testwine3.ini"; static const WCHAR testfile3W[]={ '.','\\','t','e','s','t','w','i','n','e','3','.','i','n','i',0 }; + static const WCHAR not_here[] = {'.','\\','n','o','t','_','h','e','r','e','.','i','n','i',0}; DeleteFileA( testfile3 ); h = CreateFileA( testfile3, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); @@ -185,6 +186,19 @@ static void test_profile_sections(void) ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); DeleteFileA( testfile3 ); + + /* Tests on non-existent file */ + memset(buf, 0xcc, sizeof(buf)); + ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" ); + ok( ret == 0, "expected return size 0, got %d\n", ret ); + ok( buf[0] == 0, "returned buffer not terminated with null\n" ); + ok( buf[1] != 0, "returned buffer terminated with double-null\n" ); + + memset(bufW, 0xcc, sizeof(bufW)); + ret = GetPrivateProfileSectionNamesW( bufW, 10, not_here ); + ok( ret == 0, "expected return size 0, got %d\n", ret ); + ok( bufW[0] == 0, "returned buffer not terminated with null\n" ); + ok( bufW[1] != 0, "returned buffer terminated with double-null\n" ); } START_TEST(profile)
1
0
0
0
Aric Stewart : wineps.drv: Values for DC_MINEXTENT and DC_MAXEXTENT are returned, not placed in the data pointer.
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: f1172cd4460972cf6cc000b91845e924ecc11c4d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1172cd4460972cf6cc000b91…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Mar 14 07:31:20 2007 -0500 wineps.drv: Values for DC_MINEXTENT and DC_MAXEXTENT are returned, not placed in the data pointer. --- dlls/wineps.drv/driver.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/wineps.drv/driver.c b/dlls/wineps.drv/driver.c index 30bc0b3..9c3136b 100644 --- a/dlls/wineps.drv/driver.c +++ b/dlls/wineps.drv/driver.c @@ -603,28 +603,26 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP if(ps->PaperDimension->y > ptMax.y) ptMax.y = ps->PaperDimension->y; } - *((POINT*)lpszOutput) = ptMax; - return 1; + return MAKELONG(ptMax.x * 254.0 / 72.0, ptMax.y * 254.0 / 72.0 ); } case DC_MINEXTENT: { PAGESIZE *ps; - POINT ptMax; - ptMax.x = ptMax.y = 0; + POINT ptMin; + ptMin.x = ptMin.y = -1; if(lpszOutput == NULL) return -1; LIST_FOR_EACH_ENTRY(ps, &pi->ppd->PageSizes, PAGESIZE, entry) { - if(ps->PaperDimension->x > ptMax.x) - ptMax.x = ps->PaperDimension->x; - if(ps->PaperDimension->y > ptMax.y) - ptMax.y = ps->PaperDimension->y; + if(ptMin.x == -1 || ps->PaperDimension->x < ptMin.x) + ptMin.x = ps->PaperDimension->x; + if(ptMin.y == -1 || ps->PaperDimension->y < ptMin.y) + ptMin.y = ps->PaperDimension->y; } - *((POINT*)lpszOutput) = ptMax; - return 1; + return MAKELONG(ptMin.x * 254.0 / 72.0, ptMin.y * 254.0 / 72.0); } case DC_SIZE:
1
0
0
0
Alexandre Julliard : libwine: Update the Unicode tables to version 5.0. 1 of the standard.
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: a44d1e5f6e7b3b65a158c89c7e0d0d40c104459d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a44d1e5f6e7b3b65a158c89c7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 14 16:22:46 2007 +0100 libwine: Update the Unicode tables to version 5.0.1 of the standard. --- libs/wine/casemap.c | 200 ++++++++++++++++++++++++++++++++++----------------- libs/wine/compose.c | 163 ++++++++++++++++++++++++----------------- libs/wine/wctype.c | 158 ++++++++++++++++++++++++---------------- 3 files changed, 324 insertions(+), 197 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a44d1e5f6e7b3b65a158c…
1
0
0
0
Alexandre Julliard : libwine: Added support for Unicode surrogates in utf-8 conversions.
by Alexandre Julliard
15 Mar '07
15 Mar '07
Module: wine Branch: master Commit: 62c3d3d6203d45d1d4b75871038c8a1e3ea4ae99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62c3d3d6203d45d1d4b758710…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 14 15:58:56 2007 +0100 libwine: Added support for Unicode surrogates in utf-8 conversions. Also make the conversions more strict against invalid input data. --- libs/wine/utf8.c | 171 +++++++++++++++++++++++++++++++++++------------------- 1 files changed, 112 insertions(+), 59 deletions(-) diff --git a/libs/wine/utf8.c b/libs/wine/utf8.c index be1c672..61d3d37 100644 --- a/libs/wine/utf8.c +++ b/libs/wine/utf8.c @@ -29,30 +29,60 @@ static const char utf8_length[128] = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x90-0x9f */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xa0-0xaf */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xb0-0xbf */ - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xc0-0xcf */ + 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xc0-0xcf */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xd0-0xdf */ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, /* 0xe0-0xef */ - 3,3,3,3,3,3,3,3,4,4,4,4,5,5,0,0 /* 0xf0-0xff */ + 3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0 /* 0xf0-0xff */ }; /* first byte mask depending on UTF-8 sequence length */ -static const unsigned char utf8_mask[6] = { 0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01 }; +static const unsigned char utf8_mask[4] = { 0x7f, 0x1f, 0x0f, 0x07 }; /* minimum Unicode value depending on UTF-8 sequence length */ -static const unsigned int utf8_minval[6] = { 0x0, 0x80, 0x800, 0x10000, 0x200000, 0x4000000 }; +static const unsigned int utf8_minval[4] = { 0x0, 0x80, 0x800, 0x10000 }; +/* get the next char value taking surrogates into account */ +static inline unsigned int get_surrogate_value( const WCHAR *src, unsigned int srclen ) +{ + if (src[0] >= 0xd800 && src[0] <= 0xdfff) /* surrogate pair */ + { + if (src[0] > 0xdbff || /* invalid high surrogate */ + srclen <= 1 || /* missing low surrogate */ + src[1] < 0xdc00 || src[1] > 0xdfff) /* invalid low surrogate */ + return 0; + return 0x10000 + ((src[0] & 0x3ff) << 10) + (src[1] & 0x3ff); + } + return src[0]; +} + /* query necessary dst length for src string */ -inline static int get_length_wcs_utf8( const WCHAR *src, unsigned int srclen ) +static inline int get_length_wcs_utf8( int flags, const WCHAR *src, unsigned int srclen ) { int len; - for (len = 0; srclen; srclen--, src++, len++) + unsigned int val; + + for (len = 0; srclen; srclen--, src++) { - if (*src >= 0x80) + if (*src < 0x80) /* 0x00-0x7f: 1 byte */ { len++; - if (*src >= 0x800) len++; + continue; + } + if (*src < 0x800) /* 0x80-0x7ff: 2 bytes */ + { + len += 2; + continue; + } + if (!(val = get_surrogate_value( src, srclen ))) + { + if (flags & WC_ERR_INVALID_CHARS) return -2; + continue; } + if (val < 0x10000) /* 0x800-0xffff: 3 bytes */ + len += 3; + else /* 0x10000-0x10ffff: 4 bytes */ + len += 4; } return len; } @@ -63,11 +93,12 @@ int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int { int len; - if (!dstlen) return get_length_wcs_utf8( src, srclen ); + if (!dstlen) return get_length_wcs_utf8( flags, src, srclen ); for (len = dstlen; srclen; srclen--, src++) { WCHAR ch = *src; + unsigned int val; if (ch < 0x80) /* 0x00-0x7f: 1 byte */ { @@ -86,53 +117,80 @@ int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int continue; } - /* 0x800-0xffff: 3 bytes */ + if (!(val = get_surrogate_value( src, srclen ))) + { + if (flags & WC_ERR_INVALID_CHARS) return -2; + continue; + } - if ((len -= 3) < 0) return -1; /* overflow */ - dst[2] = 0x80 | (ch & 0x3f); - ch >>= 6; - dst[1] = 0x80 | (ch & 0x3f); - ch >>= 6; - dst[0] = 0xe0 | ch; - dst += 3; + if (val < 0x10000) /* 0x800-0xffff: 3 bytes */ + { + if ((len -= 3) < 0) return -1; /* overflow */ + dst[2] = 0x80 | (val & 0x3f); + val >>= 6; + dst[1] = 0x80 | (val & 0x3f); + val >>= 6; + dst[0] = 0xe0 | val; + dst += 3; + } + else /* 0x10000-0x10ffff: 4 bytes */ + { + if ((len -= 4) < 0) return -1; /* overflow */ + dst[3] = 0x80 | (val & 0x3f); + val >>= 6; + dst[2] = 0x80 | (val & 0x3f); + val >>= 6; + dst[1] = 0x80 | (val & 0x3f); + val >>= 6; + dst[0] = 0xf0 | val; + dst += 4; + } } return dstlen - len; } /* query necessary dst length for src string */ -inline static int get_length_mbs_utf8( const unsigned char *src, int srclen ) +inline static int get_length_mbs_utf8( int flags, const char *src, int srclen ) { - int ret; - const unsigned char *srcend = src + srclen; + int len, ret = 0; + unsigned int res; + const char *srcend = src + srclen; - for (ret = 0; src < srcend; ret++) + while (src < srcend) { unsigned char ch = *src++; - if (ch < 0xc0) continue; + if (ch < 0x80) /* special fast case for 7-bit ASCII */ + { + ret++; + continue; + } + len = utf8_length[ch-0x80]; + if (src + len > srcend) goto bad; + res = ch & utf8_mask[len]; - switch(utf8_length[ch-0x80]) + switch(len) { - case 5: - if (src >= srcend) return ret; /* ignore partial char */ - if ((ch = *src ^ 0x80) >= 0x40) continue; - src++; - case 4: - if (src >= srcend) return ret; /* ignore partial char */ - if ((ch = *src ^ 0x80) >= 0x40) continue; - src++; case 3: - if (src >= srcend) return ret; /* ignore partial char */ - if ((ch = *src ^ 0x80) >= 0x40) continue; + if ((ch = *src ^ 0x80) >= 0x40) goto bad; + res = (res << 6) | ch; src++; case 2: - if (src >= srcend) return ret; /* ignore partial char */ - if ((ch = *src ^ 0x80) >= 0x40) continue; + if ((ch = *src ^ 0x80) >= 0x40) goto bad; + res = (res << 6) | ch; src++; case 1: - if (src >= srcend) return ret; /* ignore partial char */ - if ((ch = *src ^ 0x80) >= 0x40) continue; + if ((ch = *src ^ 0x80) >= 0x40) goto bad; + res = (res << 6) | ch; src++; + if (res < utf8_minval[len]) goto bad; + if (res > 0x10ffff) goto bad; + if (res > 0xffff) ret++; + ret++; + continue; } + bad: + if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ + /* otherwise ignore it */ } return ret; } @@ -141,60 +199,55 @@ inline static int get_length_mbs_utf8( const unsigned char *src, int srclen ) /* return -1 on dst buffer overflow, -2 on invalid input char */ int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int dstlen ) { - int len, count; + int len; unsigned int res; const char *srcend = src + srclen; + WCHAR *dstend = dst + dstlen; - if (!dstlen) return get_length_mbs_utf8( (const unsigned char*)src, srclen ); + if (!dstlen) return get_length_mbs_utf8( flags, src, srclen ); - for (count = dstlen; count && (src < srcend); count--, dst++) + while ((dst < dstend) && (src < srcend)) { unsigned char ch = *src++; if (ch < 0x80) /* special fast case for 7-bit ASCII */ { - *dst = ch; + *dst++ = ch; continue; } len = utf8_length[ch-0x80]; + if (src + len > srcend) goto bad; res = ch & utf8_mask[len]; switch(len) { - case 5: - if (src >= srcend) goto done; /* ignore partial char */ - if ((ch = *src ^ 0x80) >= 0x40) goto bad; - res = (res << 6) | ch; - src++; - case 4: - if (src >= srcend) goto done; /* ignore partial char */ - if ((ch = *src ^ 0x80) >= 0x40) goto bad; - res = (res << 6) | ch; - src++; case 3: - if (src >= srcend) goto done; /* ignore partial char */ if ((ch = *src ^ 0x80) >= 0x40) goto bad; res = (res << 6) | ch; src++; case 2: - if (src >= srcend) goto done; /* ignore partial char */ if ((ch = *src ^ 0x80) >= 0x40) goto bad; res = (res << 6) | ch; src++; case 1: - if (src >= srcend) goto done; /* ignore partial char */ if ((ch = *src ^ 0x80) >= 0x40) goto bad; res = (res << 6) | ch; src++; if (res < utf8_minval[len]) goto bad; - if (res >= 0x10000) goto bad; /* FIXME: maybe we should do surrogates here */ - *dst = res; + if (res > 0x10ffff) goto bad; + if (res <= 0xffff) *dst++ = res; + else /* we need surrogates */ + { + if (dst == dstend - 1) return -1; /* overflow */ + res -= 0x10000; + *dst++ = 0xd800 | (res >> 10); + *dst++ = 0xdc00 | (res & 0x3ff); + } continue; } bad: if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ - *dst = (WCHAR)'?'; + /* otherwise ignore it */ } if (src < srcend) return -1; /* overflow */ -done: - return dstlen - count; + return dstlen - (dstend - dst); }
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
85
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
Results per page:
10
25
50
100
200