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
December 2008
----- 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
1225 discussions
Start a n
N
ew thread
Stefan Dösinger : wined3d: Set up the shaders when delaying fixed func applying.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 6ec741e766629c38287dd5c25e15f92a6118cc00 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ec741e766629c38287dd5c25…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Dec 11 14:16:25 2008 +0100 wined3d: Set up the shaders when delaying fixed func applying. --- dlls/wined3d/arb_program_shader.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index e64cd0e..6fda3ef 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -2903,6 +2903,8 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, } state_texfactor_arbfp(STATE_RENDER(WINED3DRS_TEXTUREFACTOR), stateblock, context); state_arb_specularenable(STATE_RENDER(WINED3DRS_SPECULARENABLE), stateblock, context); + } else if(use_pshader && !isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) { + device->shader_backend->shader_select((IWineD3DDevice *)stateblock->wineD3DDevice, use_pshader, use_vshader); } return; }
1
0
0
0
Stefan Dösinger : wined3d: Fake GL_ARB_multitexture.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 199a3468bfd06ec7165a124fc566e9508c6553bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=199a3468bfd06ec7165a124fc…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Dec 16 13:18:49 2008 +0100 wined3d: Fake GL_ARB_multitexture. --- dlls/wined3d/Makefile.in | 1 + dlls/wined3d/context.c | 58 +++++------ dlls/wined3d/device.c | 24 ++--- dlls/wined3d/directx.c | 26 +----- dlls/wined3d/drawprim.c | 12 +-- dlls/wined3d/gl_compat.c | 181 ++++++++++++++++++++++++++++++++++ dlls/wined3d/nvidia_texture_shader.c | 13 +-- dlls/wined3d/state.c | 82 ++++------------ dlls/wined3d/surface.c | 14 +-- dlls/wined3d/wined3d_private.h | 2 +- 10 files changed, 253 insertions(+), 160 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=199a3468bfd06ec7165a1…
1
0
0
0
Andrew Talbot : user32: Sign-compare warnings fix.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: b5081dacc09d2502c78ba39fe8e62943a4db5439 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b5081dacc09d2502c78ba39fe…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Mon Dec 15 21:21:07 2008 +0000 user32: Sign-compare warnings fix. --- dlls/user32/menu.c | 14 +++++++------- dlls/user32/spy.c | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index ed93eff..3fbb941 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -1111,7 +1111,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop ) { MENUITEM *lpitem; HDC hdc; - int start, i; + UINT start, i; int orgX, orgY, maxX, maxTab, maxTabWidth, maxHeight; lppop->Width = lppop->Height = 0; @@ -1199,7 +1199,8 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, LPPOPUPMENU lppop, HWND hwndOwner ) { MENUITEM *lpitem; - int start, i, orgX, orgY, maxY, helpPos; + UINT start, i, helpPos; + int orgX, orgY, maxY; if ((lprect == NULL) || (lppop == NULL)) return; if (lppop->nItems == 0) return; @@ -1208,7 +1209,7 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, lppop->Height = 0; maxY = lprect->top+1; start = 0; - helpPos = -1; + helpPos = ~0U; lppop->maxBmpSize.cx = 0; lppop->maxBmpSize.cy = 0; while (start < lppop->nItems) @@ -1220,7 +1221,7 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, /* Parse items until line break or end of menu */ for (i = start; i < lppop->nItems; i++, lpitem++) { - if ((helpPos == -1) && (lpitem->fType & MF_RIGHTJUSTIFY)) helpPos = i; + if ((helpPos == ~0U) && (lpitem->fType & MF_RIGHTJUSTIFY)) helpPos = i; if ((i != start) && (lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break; @@ -1246,12 +1247,11 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, /* Flush right all items between the MF_RIGHTJUSTIFY and */ /* the last item (if several lines, only move the last line) */ + if (helpPos == ~0U) return; lpitem = &lppop->items[lppop->nItems-1]; orgY = lpitem->rect.top; orgX = lprect->right; for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--) { - if ( (helpPos==-1) || (helpPos>i) ) - break; /* done */ if (lpitem->rect.top != orgY) break; /* Other line */ if (lpitem->rect.right >= orgX) break; /* Too far right already */ lpitem->rect.left += orgX - lpitem->rect.right; @@ -2671,7 +2671,7 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk, UINT wFlags ) icons such as MDI maximize, restore or close) */ else if ((vk == VK_RIGHT) && !IS_SYSTEM_MENU(menu)) { - int i = menu->FocusedItem + 1; + UINT i = menu->FocusedItem + 1; while (i < menu->nItems) { if ((menu->items[i].wID >= SC_SIZE && menu->items[i].wID <= SC_RESTORE)) { diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c index 2aed057..59fa410 100644 --- a/dlls/user32/spy.c +++ b/dlls/user32/spy.c @@ -2653,7 +2653,8 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn, */ int SPY_Init(void) { - int i, j; + int i; + UINT j; char buffer[1024]; const SPY_NOTIFY *p; const USER_MSG *q; @@ -2700,7 +2701,7 @@ int SPY_Init(void) p = &spnfy_array[0]; j = 0xffffffff; while (p->name) { - if ((UINT)p->value > (UINT)j) { + if (p->value > j) { ERR("Notify message array out of order\n"); ERR(" between values [%08x] %s and [%08x] %s\n", j, (p-1)->name, p->value, p->name);
1
0
0
0
Dan Kegel : msvcrt: fread: Exhaust buffered data before using unbuffered data in ascii mode.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 72ffe1da676b673f6caa84f1859a601f6935dd99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72ffe1da676b673f6caa84f18…
Author: Dan Kegel <dank(a)kegel.com> Date: Mon Dec 15 21:47:56 2008 -0800 msvcrt: fread: Exhaust buffered data before using unbuffered data in ascii mode. --- dlls/msvcrt/file.c | 2 ++ dlls/msvcrt/tests/file.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 76c4ea7..055ccac 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -2597,6 +2597,7 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm /* first buffered data */ if(file->_cnt>0) { + while (file->_cnt>0 && rcnt > 0) { int pcnt= (rcnt>file->_cnt)? file->_cnt:rcnt; memcpy(ptr, file->_ptr, pcnt); file->_cnt -= pcnt; @@ -2606,6 +2607,7 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm read += pcnt ; rcnt -= pcnt ; ptr = (char*)ptr + pcnt; + } } else if(!(file->_flag & MSVCRT__IOREAD )) { if(file->_flag & MSVCRT__IORW) { file->_flag |= MSVCRT__IOREAD; diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 9642d75..6f3fc85 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -306,6 +306,44 @@ static void test_asciimode(void) unlink("ascii.tst"); } +static void test_asciimode2(void) +{ + /* Error sequence from one app was getchar followed by small fread + * with one \r removed had last byte of buffer filled with + * next byte of *unbuffered* data rather than next byte from buffer + * Test case is a short string of one byte followed by a newline + * followed by filler to fill out the sector, then a sector of + * some different byte. + */ + + FILE *fp; + char ibuf[4]; + int i; + static const char obuf[] = +"00\n\ +000000000000000000000000000000000000000000000000000000000000000000000000000000\n\ +000000000000000000000000000000000000000000000000000000000000000000000000000000\n\ +000000000000000000000000000000000000000000000000000000000000000000000000000000\n\ +000000000000000000000000000000000000000000000000000000000000000000000000000000\n\ +000000000000000000000000000000000000000000000000000000000000000000000000000000\n\ +000000000000000000000000000000000000000000000000000000000000000000000000000000\n\ +000000000000000000\n\ +1111111111111111111"; + + fp = fopen("ascii2.tst", "wt"); + fwrite(obuf, 1, sizeof(obuf), fp); + fclose(fp); + + fp = fopen("ascii2.tst", "rt"); + ok(getc(fp) == '0', "first char not 0"); + memset(ibuf, 0, sizeof(ibuf)); + i = fread(ibuf, 1, sizeof(ibuf), fp); + ok(i == sizeof(ibuf), "fread i %d != sizeof(ibuf) %d\n", i, sizeof(ibuf)); + ok(0 == strncmp(ibuf, obuf+1, sizeof(ibuf)), "ibuf != obuf\n"); + fclose(fp); + unlink("ascii2.tst"); +} + static WCHAR* AtoW( const char* p ) { WCHAR* buffer; @@ -1113,6 +1151,7 @@ START_TEST(file) test_fopen_fclose_fcloseall(); test_fileops(); test_asciimode(); + test_asciimode2(); test_readmode(FALSE); /* binary mode */ test_readmode(TRUE); /* ascii mode */ test_fgetc();
1
0
0
0
Alexander Morozov : ntoskrnl.exe: Add stubs for Io{Allocate, Get}DriverObjectExtension.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 902443579f3a165120b2ffa0462e2c8389cec63f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=902443579f3a165120b2ffa04…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Tue Dec 16 12:19:08 2008 +0300 ntoskrnl.exe: Add stubs for Io{Allocate,Get}DriverObjectExtension. --- dlls/ntoskrnl.exe/ntoskrnl.c | 25 +++++++++++++++++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 4 ++-- include/ddk/wdm.h | 2 ++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 652f5ff..a669d3b 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -260,6 +260,31 @@ NTSTATUS wine_ntoskrnl_main_loop( HANDLE stop_event ) /*********************************************************************** + * IoAllocateDriverObjectExtension (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI IoAllocateDriverObjectExtension( PDRIVER_OBJECT DriverObject, + PVOID ClientIdentificationAddress, + ULONG DriverObjectExtensionSize, + PVOID *DriverObjectExtension ) +{ + FIXME( "%p, %p, %u, %p\n", DriverObject, ClientIdentificationAddress, + DriverObjectExtensionSize, DriverObjectExtension ); + return STATUS_NOT_IMPLEMENTED; +} + + +/*********************************************************************** + * IoGetDriverObjectExtension (NTOSKRNL.EXE.@) + */ +PVOID WINAPI IoGetDriverObjectExtension( PDRIVER_OBJECT DriverObject, + PVOID ClientIdentificationAddress ) +{ + FIXME( "%p, %p\n", DriverObject, ClientIdentificationAddress ); + return NULL; +} + + +/*********************************************************************** * IoInitializeIrp (NTOSKRNL.EXE.@) */ void WINAPI IoInitializeIrp( IRP *irp, USHORT size, CCHAR stack_size ) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index cf4c86e..946249d 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -309,7 +309,7 @@ @ stub IoAdapterObjectType @ stub IoAllocateAdapterChannel @ stub IoAllocateController -@ stub IoAllocateDriverObjectExtension +@ stdcall IoAllocateDriverObjectExtension(ptr ptr long ptr) @ stub IoAllocateErrorLogEntry @ stdcall IoAllocateIrp(long long) @ stdcall IoAllocateMdl(ptr long long long ptr) @@ -387,7 +387,7 @@ @ stub IoGetDeviceToVerify @ stub IoGetDiskDeviceObject @ stub IoGetDmaAdapter -@ stub IoGetDriverObjectExtension +@ stdcall IoGetDriverObjectExtension(ptr ptr) @ stub IoGetFileObjectGenericMapping @ stub IoGetInitialStack @ stub IoGetLowerDeviceObject diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index efc3f6a..0f241b6 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1026,6 +1026,7 @@ PVOID WINAPI ExAllocatePoolWithQuotaTag(POOL_TYPE,SIZE_T,ULONG); void WINAPI ExFreePool(PVOID); void WINAPI ExFreePoolWithTag(PVOID,ULONG); +NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*); PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN); NTSTATUS WINAPI IoCreateDevice(DRIVER_OBJECT*,ULONG,UNICODE_STRING*,DEVICE_TYPE,ULONG,BOOLEAN,DEVICE_OBJECT**); NTSTATUS WINAPI IoCreateDriver(UNICODE_STRING*,PDRIVER_INITIALIZE); @@ -1036,6 +1037,7 @@ NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*); void WINAPI IoFreeIrp(IRP*); PEPROCESS WINAPI IoGetCurrentProcess(void); NTSTATUS WINAPI IoGetDeviceObjectPointer(UNICODE_STRING*,ACCESS_MASK,PFILE_OBJECT*,PDEVICE_OBJECT*); +PVOID WINAPI IoGetDriverObjectExtension(PDRIVER_OBJECT,PVOID); PDEVICE_OBJECT WINAPI IoGetRelatedDeviceObject(PFILE_OBJECT); void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
1
0
0
0
Dylan Smith : richedit: Move implementation of WM_CHAR to its own function.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: c87ca3d9e80bf02700412cc896444d1968edfa62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c87ca3d9e80bf02700412cc89…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Tue Dec 16 03:43:33 2008 -0500 richedit: Move implementation of WM_CHAR to its own function. --- dlls/riched20/editor.c | 339 ++++++++++++++++++++++++------------------------ 1 files changed, 172 insertions(+), 167 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c87ca3d9e80bf02700412…
1
0
0
0
Dylan Smith : richedit: Removed some unnecessary SendMessage calls to itself.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: e5f5dc60a7d271504d61dd63ff8737f547d7be59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5f5dc60a7d271504d61dd63f…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Tue Dec 16 03:43:43 2008 -0500 richedit: Removed some unnecessary SendMessage calls to itself. --- dlls/riched20/caret.c | 6 ++---- dlls/riched20/editor.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 4a3ec8c..6cb3cbb 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -1565,11 +1565,9 @@ void ME_SendSelChange(ME_TextEditor *editor) if (!(editor->nEventMask & ENM_SELCHANGE)) return; - - sc.nmhdr.hwndFrom = editor->hWnd; - sc.nmhdr.idFrom = GetWindowLongW(editor->hWnd, GWLP_ID); + sc.nmhdr.code = EN_SELCHANGE; - SendMessageW(editor->hWnd, EM_EXGETSEL, 0, (LPARAM)&sc.chrg); + ME_GetSelection(editor, &sc.chrg.cpMin, &sc.chrg.cpMax); sc.seltyp = SEL_EMPTY; if (sc.chrg.cpMin != sc.chrg.cpMax) sc.seltyp |= SEL_TEXT; diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index d5d382b..b1b956d 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1426,7 +1426,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre ME_DisplayItem *para_item; style = editor->pBuffer->pDefaultStyle; ME_AddRefStyle(style); - SendMessageA(editor->hWnd, EM_SETSEL, 0, 0); + ME_SetSelection(editor, 0, 0); ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor), FALSE); from = to = 0; ME_ClearTempStyle(editor); @@ -1559,7 +1559,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre ME_GetSelection(editor, &to, &to2); /* put the cursor at the top */ if (!(format & SFF_SELECTION)) - SendMessageA(editor->hWnd, EM_SETSEL, 0, 0); + ME_SetSelection(editor, 0, 0); } /* Restore saved undo mode */ @@ -4063,7 +4063,12 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, LRESULT ret; int mask = 0; int changes = 0; - ret = RichEditWndProc_common(hWnd, WM_GETTEXTLENGTH, 0, 0, unicode); + GETTEXTLENGTHEX how; + + /* CR/LF conversion required in 2.0 mode, verbatim in 1.0 mode */ + how.flags = GTL_CLOSE | (editor->bEmulateVersion10 ? 0 : GTL_USECRLF) | GTL_NUMCHARS; + how.codepage = unicode ? 1200 : CP_ACP; + ret = ME_GetTextLengthEx(editor, &how); if (!ret) { /*Check for valid wParam*/
1
0
0
0
Dylan Smith : richedit: Move implementation of EM_GETTEXTEX to its own function.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: c7c2ff1fbcb836efd8c157b43b4c9a7f211f8798 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7c2ff1fbcb836efd8c157b43…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Tue Dec 16 03:43:24 2008 -0500 richedit: Move implementation of EM_GETTEXTEX to its own function. --- dlls/riched20/editor.c | 98 +++++++++++++++++++++++++----------------------- 1 files changed, 51 insertions(+), 47 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index b79fe16..d5d382b 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1938,6 +1938,54 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH return -1; } +static int ME_GetTextEx(ME_TextEditor *editor, GETTEXTEX *ex, LPARAM pText) +{ + int nStart, nCount; /* in chars */ + + if (ex->flags & ~(GT_SELECTION | GT_USECRLF)) + FIXME("GETTEXTEX flags 0x%08x not supported\n", ex->flags & ~(GT_SELECTION | GT_USECRLF)); + + if (ex->flags & GT_SELECTION) + { + ME_GetSelection(editor, &nStart, &nCount); + nCount -= nStart; + } + else + { + nStart = 0; + nCount = 0x7fffffff; + } + if (ex->codepage == 1200) + { + nCount = min(nCount, ex->cb / sizeof(WCHAR) - 1); + return ME_GetTextW(editor, (LPWSTR)pText, nStart, nCount, ex->flags & GT_USECRLF); + } + else + { + /* potentially each char may be a CR, why calculate the exact value with O(N) when + we can just take a bigger buffer? :) + The above assumption still holds with CR/LF counters, since CR->CRLF expansion + occurs only in richedit 2.0 mode, in which line breaks have only one CR + */ + int crlfmul = (ex->flags & GT_USECRLF) ? 2 : 1; + LPWSTR buffer; + DWORD buflen = ex->cb; + LRESULT rc; + DWORD flags = 0; + + nCount = min(nCount, ex->cb - 1); + buffer = heap_alloc((crlfmul*nCount + 1) * sizeof(WCHAR)); + + buflen = ME_GetTextW(editor, buffer, nStart, nCount, ex->flags & GT_USECRLF); + rc = WideCharToMultiByte(ex->codepage, flags, buffer, buflen+1, + (LPSTR)pText, ex->cb, ex->lpDefaultChar, ex->lpUsedDefChar); + if (rc) rc--; /* do not count 0 terminator */ + + heap_free(buffer); + return rc; + } +} + static int ME_GetTextRange(ME_TextEditor *editor, TEXTRANGEW *rng, BOOL unicode) { if (unicode) @@ -3207,7 +3255,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ex.codepage = unicode ? 1200 : CP_ACP; ex.lpDefaultChar = NULL; ex.lpUsedDefChar = NULL; - rc = RichEditWndProc_common(hWnd, EM_GETTEXTEX, (WPARAM)&ex, unicode ? (LPARAM)bufferW : (LPARAM)bufferA, unicode); + + rc = ME_GetTextEx(editor, &ex, unicode ? (LPARAM)bufferW : (LPARAM)bufferA); if (unicode) { @@ -3224,52 +3273,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, return rc; } case EM_GETTEXTEX: - { - GETTEXTEX *ex = (GETTEXTEX*)wParam; - int nStart, nCount; /* in chars */ - - if (ex->flags & ~(GT_SELECTION | GT_USECRLF)) - FIXME("GETTEXTEX flags 0x%08x not supported\n", ex->flags & ~(GT_SELECTION | GT_USECRLF)); - - if (ex->flags & GT_SELECTION) - { - ME_GetSelection(editor, &nStart, &nCount); - nCount -= nStart; - } - else - { - nStart = 0; - nCount = 0x7fffffff; - } - if (ex->codepage == 1200) - { - nCount = min(nCount, ex->cb / sizeof(WCHAR) - 1); - return ME_GetTextW(editor, (LPWSTR)lParam, nStart, nCount, ex->flags & GT_USECRLF); - } - else - { - /* potentially each char may be a CR, why calculate the exact value with O(N) when - we can just take a bigger buffer? :) - The above assumption still holds with CR/LF counters, since CR->CRLF expansion - occurs only in richedit 2.0 mode, in which line breaks have only one CR - */ - int crlfmul = (ex->flags & GT_USECRLF) ? 2 : 1; - LPWSTR buffer; - DWORD buflen = ex->cb; - LRESULT rc; - DWORD flags = 0; - - nCount = min(nCount, ex->cb - 1); - buffer = heap_alloc((crlfmul*nCount + 1) * sizeof(WCHAR)); - - buflen = ME_GetTextW(editor, buffer, nStart, nCount, ex->flags & GT_USECRLF); - rc = WideCharToMultiByte(ex->codepage, flags, buffer, buflen+1, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefChar); - if (rc) rc--; /* do not count 0 terminator */ - - heap_free(buffer); - return rc; - } - } + return ME_GetTextEx(editor, (GETTEXTEX*)wParam, lParam); case EM_GETSELTEXT: { int from, to;
1
0
0
0
Dylan Smith : richedit: Move implementation of EM_GETTEXTRANGE to its own function.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 4f41972b15b865c792ecebce41f63243bdf5def4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f41972b15b865c792ecebce4…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Tue Dec 16 03:43:13 2008 -0500 richedit: Move implementation of EM_GETTEXTRANGE to its own function. The RichEditWndProc_common function is big enough already by handling all the window messages, so moving code to handle a message to its own function makes the code more readable. --- dlls/riched20/editor.c | 36 +++++++++++++++++++++--------------- 1 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 55bc9b8..b79fe16 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1938,6 +1938,25 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH return -1; } +static int ME_GetTextRange(ME_TextEditor *editor, TEXTRANGEW *rng, BOOL unicode) +{ + if (unicode) + return ME_GetTextW(editor, rng->lpstrText, rng->chrg.cpMin, + rng->chrg.cpMax-rng->chrg.cpMin, 0); + else + { + int nLen = rng->chrg.cpMax-rng->chrg.cpMin; + WCHAR *p = ALLOC_N_OBJ(WCHAR, nLen+1); + int nChars = ME_GetTextW(editor, p, rng->chrg.cpMin, nLen, 0); + /* FIXME this is a potential security hole (buffer overrun) + if you know more about wchar->mbyte conversion please explain + */ + WideCharToMultiByte(CP_ACP, 0, p, nChars+1, (char *)rng->lpstrText, nLen+1, NULL, NULL); + FREE_OBJ(p); + return nChars; + } +} + typedef struct tagME_GlobalDestStruct { HGLOBAL hData; @@ -3259,7 +3278,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, tr.chrg.cpMin = from; tr.chrg.cpMax = to; tr.lpstrText = (WCHAR *)lParam; - return RichEditWndProc_common(hWnd, EM_GETTEXTRANGE, 0, (LPARAM)&tr, unicode); + return ME_GetTextRange(editor, &tr, unicode); } case EM_GETSCROLLPOS: { @@ -3274,20 +3293,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, TRACE("EM_GETTEXTRANGE min=%d max=%d unicode=%d emul1.0=%d length=%d\n", rng->chrg.cpMin, rng->chrg.cpMax, unicode, editor->bEmulateVersion10, ME_GetTextLength(editor)); - if (unicode) - return ME_GetTextW(editor, rng->lpstrText, rng->chrg.cpMin, rng->chrg.cpMax-rng->chrg.cpMin, 0); - else - { - int nLen = rng->chrg.cpMax-rng->chrg.cpMin; - WCHAR *p = ALLOC_N_OBJ(WCHAR, nLen+1); - int nChars = ME_GetTextW(editor, p, rng->chrg.cpMin, nLen, 0); - /* FIXME this is a potential security hole (buffer overrun) - if you know more about wchar->mbyte conversion please explain - */ - WideCharToMultiByte(CP_ACP, 0, p, nChars+1, (char *)rng->lpstrText, nLen+1, NULL, NULL); - FREE_OBJ(p); - return nChars; - } + return ME_GetTextRange(editor, rng, unicode); } case EM_GETLINE: {
1
0
0
0
Jeremy Drake : oleaut32/tests: Fix double GlobalFree in olepicture tests.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 970a500fb431b7d729c8ddb959d3c2a80403e28d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=970a500fb431b7d729c8ddb95…
Author: Jeremy Drake <wine(a)jdrake.com> Date: Mon Dec 15 23:41:47 2008 -0800 oleaut32/tests: Fix double GlobalFree in olepicture tests. --- dlls/oleaut32/tests/olepicture.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index 89e99dd..2b5b8bb 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -525,8 +525,6 @@ static void test_apm() ole_expect(IPicture_get_hPal(pict, &handle), E_FAIL); IPicture_Release(pict); IStream_Release(stream); - GlobalUnlock(hglob); - GlobalFree(hglob); } static void test_metafile(void) @@ -545,8 +543,6 @@ static void test_metafile(void) ole_expect(OleLoadPictureEx(stream, sizeof(metafile), TRUE, &IID_IPicture, 100, 100, 0, (LPVOID *)&pict), E_FAIL); IStream_Release(stream); - GlobalUnlock(hglob); - GlobalFree(hglob); } static void test_enhmetafile(void) @@ -584,8 +580,6 @@ static void test_enhmetafile(void) IPicture_Release(pict); IStream_Release(stream); - GlobalUnlock(hglob); - GlobalFree(hglob); } static void test_Render(void)
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
123
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Results per page:
10
25
50
100
200