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
Jan Zerebecki : dplayx: Add DebugInfo to critical sections.
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: a950a47200c67956c29d918dafa50659b46d36ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a950a47200c67956c29d918da…
Author: Jan Zerebecki <jan.wine(a)zerebecki.de> Date: Thu Mar 8 16:34:13 2007 +0100 dplayx: Add DebugInfo to critical sections. --- dlls/dplayx/dplay.c | 2 ++ dlls/dplayx/dplaysp.c | 2 ++ dlls/dplayx/dplobby.c | 2 ++ dlls/dplayx/lobbysp.c | 2 ++ 4 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 3ca90db..46a4dc7 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -243,6 +243,7 @@ static BOOL DP_CreateIUnknown( LPVOID lpDP ) } InitializeCriticalSection( &This->unk->DP_lock ); + This->unk->DP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlay2AImpl*->DirectPlayIUnknownData*->DP_lock"); return TRUE; } @@ -251,6 +252,7 @@ static BOOL DP_DestroyIUnknown( LPVOID lpDP ) { IDirectPlay2AImpl *This = (IDirectPlay2AImpl *)lpDP; + This->unk->DP_lock.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &This->unk->DP_lock ); HeapFree( GetProcessHeap(), 0, This->unk ); diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index c14a525..b3b1b60 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -144,6 +144,7 @@ static BOOL DPSP_CreateIUnknown( LPVOID lpSP ) } InitializeCriticalSection( &This->unk->DPSP_lock ); + This->unk->DPSP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlaySPImpl*->DirectPlaySPIUnknownData*->DPSP_lock"); return TRUE; } @@ -152,6 +153,7 @@ static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ) { IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)lpSP; + This->unk->DPSP_lock.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &This->unk->DPSP_lock ); HeapFree( GetProcessHeap(), 0, This->unk ); diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c index 6a8cf6b..e911bc8 100644 --- a/dlls/dplayx/dplobby.c +++ b/dlls/dplayx/dplobby.c @@ -154,6 +154,7 @@ static BOOL DPL_CreateIUnknown( LPVOID lpDPL ) } InitializeCriticalSection( &This->unk->DPL_lock ); + This->unk->DPL_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlayLobbyAImpl*->DirectPlayLobbyIUnknownData*->DPL_lock"); return TRUE; } @@ -162,6 +163,7 @@ static BOOL DPL_DestroyIUnknown( LPVOID lpDPL ) { IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)lpDPL; + This->unk->DPL_lock.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &This->unk->DPL_lock ); HeapFree( GetProcessHeap(), 0, This->unk ); diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index a1fd542..a141a64 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -119,6 +119,7 @@ static BOOL DPLSP_CreateIUnknown( LPVOID lpSP ) } InitializeCriticalSection( &This->unk->DPLSP_lock ); + This->unk->DPLSP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDPLobbySPImpl*->DPLobbySPIUnknownData*->DPLSP_lock"); return TRUE; } @@ -127,6 +128,7 @@ static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ) { IDPLobbySPImpl *This = (IDPLobbySPImpl *)lpSP; + This->unk->DPLSP_lock.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &This->unk->DPLSP_lock ); HeapFree( GetProcessHeap(), 0, This->unk );
1
0
0
0
Jan Zerebecki : dmime: Add DebugInfo to critical sections.
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: 93a4c27336ca2f66c44d303df5483ef4485b9b31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93a4c27336ca2f66c44d303df…
Author: Jan Zerebecki <jan.wine(a)zerebecki.de> Date: Thu Mar 8 16:34:00 2007 +0100 dmime: Add DebugInfo to critical sections. --- dlls/dmime/performance.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 5ecf7d0..1b93f75 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -196,6 +196,7 @@ static ULONG WINAPI IDirectMusicPerformance8Impl_Release (LPDIRECTMUSICPERFORMAN TRACE("(%p): ReleaseRef to %d\n", This, ref); if (ref == 0) { + This->safe.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->safe); HeapFree(GetProcessHeap(), 0, This); } @@ -1040,6 +1041,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID obj->pDirectSound = NULL; obj->pDefaultPath = NULL; InitializeCriticalSection(&obj->safe); + obj->safe.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectMusicPerformance8Impl*->safe"); /** * @see
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c…
1
0
0
0
Jan Zerebecki : dinput: Add DebugInfo to critical sections.
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: 52a630a3a8de034dd6db6596428eb183cda8e44c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52a630a3a8de034dd6db65964…
Author: Jan Zerebecki <jan.wine(a)zerebecki.de> Date: Thu Mar 8 16:32:50 2007 +0100 dinput: Add DebugInfo to critical sections. --- dlls/dinput/joystick_linux.c | 2 +- dlls/dinput/joystick_linuxinput.c | 2 ++ dlls/dinput/keyboard.c | 2 ++ dlls/dinput/mouse.c | 2 ++ 4 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index 822cb94..2ed761c 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -471,7 +471,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di newDevice->dinput = dinput; CopyMemory(&newDevice->base.guid, rguid, sizeof(*rguid)); InitializeCriticalSection(&newDevice->base.crit); - newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)"DINPUT_joystick"; + newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->base.crit"); /* setup_dinput_options may change these */ newDevice->deadzone = 0; diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 8df801e..bfade84 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -365,6 +365,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm newDevice->base.ref = 1; memcpy(&newDevice->base.guid, rguid, sizeof(*rguid)); InitializeCriticalSection(&newDevice->base.crit); + newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->base.crit"); newDevice->joyfd = -1; newDevice->dinput = dinput; newDevice->joydev = joydev; @@ -527,6 +528,7 @@ static ULONG WINAPI JoystickAImpl_Release(LPDIRECTINPUTDEVICE8A iface) release_DataFormat(&This->base.data_format); IDirectInput_Release((LPDIRECTINPUTDEVICE8A)This->dinput); + This->base.crit.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->base.crit); HeapFree(GetProcessHeap(),0,This); diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index ca98738..a634156 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -196,6 +196,7 @@ static SysKeyboardImpl *alloc_device(REFGUID rguid, const void *kvt, IDirectInpu memcpy(&newDevice->base.guid, rguid, sizeof(*rguid)); newDevice->dinput = dinput; InitializeCriticalSection(&newDevice->base.crit); + newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit"); /* Create copy of default data format */ if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIKeyboard.dwSize))) goto failed; @@ -290,6 +291,7 @@ static ULONG WINAPI SysKeyboardAImpl_Release(LPDIRECTINPUTDEVICE8A iface) release_DataFormat(&This->base.data_format); IDirectInput_Release((LPDIRECTINPUTDEVICE8A)This->dinput); + This->base.crit.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->base.crit); HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 21f3776..b398f2f 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -177,6 +177,7 @@ static SysMouseImpl *alloc_device(REFGUID rguid, const void *mvt, IDirectInputIm newDevice->base.dwCoopLevel = DISCL_NONEXCLUSIVE | DISCL_BACKGROUND; memcpy(&newDevice->base.guid, rguid, sizeof(*rguid)); InitializeCriticalSection(&newDevice->base.crit); + newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysMouseImpl*->base.crit"); newDevice->dinput = dinput; /* Create copy of default data format */ @@ -278,6 +279,7 @@ static ULONG WINAPI SysMouseAImpl_Release(LPDIRECTINPUTDEVICE8A iface) release_DataFormat(&This->base.data_format); IDirectInput_Release((LPDIRECTINPUTDEVICE8A)This->dinput); + This->base.crit.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->base.crit); HeapFree(GetProcessHeap(),0,This); return 0;
1
0
0
0
Huw Davies : wineps.drv: Remove paper sizes that lack either a PageSize or a PaperDimension entry in the PPD .
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: 6316429c805a01dde1005baed417ec21964d56c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6316429c805a01dde1005baed…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Mar 8 14:44:26 2007 +0000 wineps.drv: Remove paper sizes that lack either a PageSize or a PaperDimension entry in the PPD. --- dlls/wineps.drv/ppd.c | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/wineps.drv/ppd.c b/dlls/wineps.drv/ppd.c index 0c893e7..130613a 100644 --- a/dlls/wineps.drv/ppd.c +++ b/dlls/wineps.drv/ppd.c @@ -551,6 +551,7 @@ PPD *PSDRV_ParsePPD(char *fname) PPD *ppd; PPDTuple tuple; char *default_pagesize = NULL, *default_duplex = NULL; + PAGESIZE *page, *page_cursor2; TRACE("file '%s'\n", fname); @@ -647,7 +648,6 @@ PPD *PSDRV_ParsePPD(char *fname) } else if(!strcmp("*PageSize", tuple.key)) { - PAGESIZE *page; page = PSDRV_PPDGetPageSizeInfo(ppd, tuple.option); if(!page->Name) { @@ -694,7 +694,6 @@ PPD *PSDRV_ParsePPD(char *fname) } else if(!strcmp("*ImageableArea", tuple.key)) { - PAGESIZE *page; page = PSDRV_PPDGetPageSizeInfo(ppd, tuple.option); if(!page->Name) { @@ -719,7 +718,6 @@ PPD *PSDRV_ParsePPD(char *fname) else if(!strcmp("*PaperDimension", tuple.key)) { - PAGESIZE *page; page = PSDRV_PPDGetPageSizeInfo(ppd, tuple.option); if(!page->Name) { @@ -859,10 +857,25 @@ PPD *PSDRV_ParsePPD(char *fname) } + /* Remove any partial page size entries, that is any without a PageSize or a PaperDimension (we can + cope with a missing ImageableArea). */ + LIST_FOR_EACH_ENTRY_SAFE(page, page_cursor2, &ppd->PageSizes, PAGESIZE, entry) + { + if(!page->InvocationString || !page->PaperDimension) + { + WARN("Removing page %s since it has a missing %s entry\n", debugstr_a(page->FullName), + page->InvocationString ? "PaperDimension" : "InvocationString"); + HeapFree(PSDRV_Heap, 0, page->Name); + HeapFree(PSDRV_Heap, 0, page->FullName); + HeapFree(PSDRV_Heap, 0, page->InvocationString); + HeapFree(PSDRV_Heap, 0, page->ImageableArea); + HeapFree(PSDRV_Heap, 0, page->PaperDimension); + list_remove(&page->entry); + } + } ppd->DefaultPageSize = NULL; if(default_pagesize) { - PAGESIZE *page; LIST_FOR_EACH_ENTRY(page, &ppd->PageSizes, PAGESIZE, entry) { if(!strcmp(page->Name, default_pagesize)) { ppd->DefaultPageSize = page;
1
0
0
0
Huw Davies : wineps.drv: Convert the page size list to a standard Wine list .
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: 277f47445150665b0e7a7fa0369a43e9366b6371 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=277f47445150665b0e7a7fa03…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Mar 8 14:16:43 2007 +0000 wineps.drv: Convert the page size list to a standard Wine list. --- dlls/wineps.drv/driver.c | 38 +++++++++++++++++++++++++------------- dlls/wineps.drv/init.c | 2 +- dlls/wineps.drv/ppd.c | 31 +++++++++++++------------------ dlls/wineps.drv/ps.c | 2 +- dlls/wineps.drv/psdrv.h | 6 ++++-- 5 files changed, 44 insertions(+), 35 deletions(-) diff --git a/dlls/wineps.drv/driver.c b/dlls/wineps.drv/driver.c index 124070e..f833486 100644 --- a/dlls/wineps.drv/driver.c +++ b/dlls/wineps.drv/driver.c @@ -67,7 +67,7 @@ void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2, if(dm2->dmPublic.dmFields & DM_PAPERSIZE) { PAGESIZE *page; - for(page = pi->ppd->PageSizes; page; page = page->next) { + LIST_FOR_EACH_ENTRY(page, &pi->ppd->PageSizes, PAGESIZE, entry) { if(page->WinPage == dm2->dmPublic.u1.s1.dmPaperSize) break; } @@ -208,11 +208,13 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg, di = (PSDRV_DLGINFO*)((PROPSHEETPAGEA*)lParam)->lParam; SetWindowLongPtrW(hwnd, DWLP_USER, (LONG_PTR)di); - for(ps = di->pi->ppd->PageSizes, i = 0; ps; ps = ps->next, i++) { + i = 0; + LIST_FOR_EACH_ENTRY(ps, &di->pi->ppd->PageSizes, PAGESIZE, entry) { SendDlgItemMessageA(hwnd, IDD_PAPERS, LB_INSERTSTRING, i, (LPARAM)ps->FullName); if(di->pi->Devmode->dmPublic.u1.s1.dmPaperSize == ps->WinPage) Cursel = i; + i++; } SendDlgItemMessageA(hwnd, IDD_PAPERS, LB_SETCURSEL, Cursel, 0); @@ -242,8 +244,11 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg, case IDD_PAPERS: if(HIWORD(wParam) == LBN_SELCHANGE) { Cursel = SendDlgItemMessageA(hwnd, LOWORD(wParam), LB_GETCURSEL, 0, 0); - for(i = 0, ps = di->pi->ppd->PageSizes; i < Cursel; i++, ps = ps->next) - ; + i = 0; + LIST_FOR_EACH_ENTRY(ps, &di->pi->ppd->PageSizes, PAGESIZE, entry) { + if(i >= Cursel) break; + i++; + } TRACE("Setting pagesize to item %d Winpage = %d\n", Cursel, ps->WinPage); di->dlgdm->dmPublic.u1.s1.dmPaperSize = ps->WinPage; @@ -461,9 +466,12 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP WORD *wp = (WORD *)lpszOutput; int i = 0; - for(ps = pi->ppd->PageSizes; ps; ps = ps->next, i++) + LIST_FOR_EACH_ENTRY(ps, &pi->ppd->PageSizes, PAGESIZE, entry) + { + i++; if(lpszOutput != NULL) *wp++ = ps->WinPage; + } return i; } @@ -473,12 +481,15 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP POINT16 *pt = (POINT16 *)lpszOutput; int i = 0; - for(ps = pi->ppd->PageSizes; ps; ps = ps->next, i++) + LIST_FOR_EACH_ENTRY(ps, &pi->ppd->PageSizes, PAGESIZE, entry) + { + i++; if(lpszOutput != NULL) { pt->x = ps->PaperDimension->x * 254.0 / 72.0; pt->y = ps->PaperDimension->y * 254.0 / 72.0; pt++; } + } return i; } @@ -488,11 +499,14 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP char *cp = lpszOutput; int i = 0; - for(ps = pi->ppd->PageSizes; ps; ps = ps->next, i++) + LIST_FOR_EACH_ENTRY(ps, &pi->ppd->PageSizes, PAGESIZE, entry) + { + i++; if(lpszOutput != NULL) { lstrcpynA(cp, ps->FullName, 64); cp += 64; } + } return i; } @@ -576,15 +590,14 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP case DC_MAXEXTENT: { PAGESIZE *ps; - int i; POINT ptMax; ptMax.x = ptMax.y = 0; if(lpszOutput == NULL) return -1; - i = 0; - for(ps = pi->ppd->PageSizes; ps; ps = ps->next, i++) { + 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) @@ -597,15 +610,14 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP case DC_MINEXTENT: { PAGESIZE *ps; - int i; POINT ptMax; ptMax.x = ptMax.y = 0; if(lpszOutput == NULL) return -1; - i = 0; - for(ps = pi->ppd->PageSizes; ps; ps = ps->next, i++) { + 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) diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index 23b6cfd..3ff0def 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -176,7 +176,7 @@ static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev ) INT width = 0, height = 0; if(physDev->Devmode->dmPublic.dmFields & DM_PAPERSIZE) { - for(page = physDev->pi->ppd->PageSizes; page; page = page->next) { + LIST_FOR_EACH_ENTRY(page, &physDev->pi->ppd->PageSizes, PAGESIZE, entry) { if(page->WinPage == physDev->Devmode->dmPublic.u1.s1.dmPaperSize) break; } diff --git a/dlls/wineps.drv/ppd.c b/dlls/wineps.drv/ppd.c index a5aea3b..0c893e7 100644 --- a/dlls/wineps.drv/ppd.c +++ b/dlls/wineps.drv/ppd.c @@ -469,23 +469,17 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple) */ static PAGESIZE *PSDRV_PPDGetPageSizeInfo(PPD *ppd, char *name) { - PAGESIZE *page = ppd->PageSizes, *lastpage; + PAGESIZE *page; - if(!page) { - page = ppd->PageSizes = HeapAlloc( PSDRV_Heap, - HEAP_ZERO_MEMORY, sizeof(*page) ); - return page; - } else { - for( ; page; page = page->next) { - if(!strcmp(page->Name, name)) - return page; - lastpage = page; - } - - lastpage->next = HeapAlloc( PSDRV_Heap, - HEAP_ZERO_MEMORY, sizeof(*page) ); - return lastpage->next; + LIST_FOR_EACH_ENTRY(page, &ppd->PageSizes, PAGESIZE, entry) + { + if(!strcmp(page->Name, name)) + return page; } + + page = HeapAlloc( PSDRV_Heap, HEAP_ZERO_MEMORY, sizeof(*page) ); + list_add_tail(&ppd->PageSizes, &page->entry); + return page; } /********************************************************************** @@ -573,6 +567,7 @@ PPD *PSDRV_ParsePPD(char *fname) } ppd->ColorDevice = CD_NotSpecified; + list_init(&ppd->PageSizes); /* * The Windows PostScript drivers create the following "virtual bin" for @@ -868,7 +863,7 @@ PPD *PSDRV_ParsePPD(char *fname) ppd->DefaultPageSize = NULL; if(default_pagesize) { PAGESIZE *page; - for(page = ppd->PageSizes; page; page = page->next) { + LIST_FOR_EACH_ENTRY(page, &ppd->PageSizes, PAGESIZE, entry) { if(!strcmp(page->Name, default_pagesize)) { ppd->DefaultPageSize = page; TRACE("DefaultPageSize: %s\n", page->Name); @@ -878,7 +873,7 @@ PPD *PSDRV_ParsePPD(char *fname) HeapFree(PSDRV_Heap, 0, default_pagesize); } if(!ppd->DefaultPageSize) { - ppd->DefaultPageSize = ppd->PageSizes; + ppd->DefaultPageSize = LIST_ENTRY(list_head(&ppd->PageSizes), PAGESIZE, entry); TRACE("Setting DefaultPageSize to first in list\n"); } @@ -911,7 +906,7 @@ PPD *PSDRV_ParsePPD(char *fname) for(fn = ppd->InstalledFonts; fn; fn = fn->next) TRACE("'%s'\n", fn->Name); - for(page = ppd->PageSizes; page; page = page->next) { + LIST_FOR_EACH_ENTRY(page, &ppd->PageSizes, PAGESIZE, entry) { TRACE("'%s' aka '%s' (%d) invoked by '%s'\n", page->Name, page->FullName, page->WinPage, page->InvocationString); if(page->ImageableArea) diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index e4fee13..9f80693 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -365,7 +365,7 @@ INT PSDRV_WriteHeader( PSDRV_PDEVICE *physDev, LPCSTR title ) } } - for(page = physDev->pi->ppd->PageSizes; page; page = page->next) { + LIST_FOR_EACH_ENTRY(page, &physDev->pi->ppd->PageSizes, PAGESIZE, entry) { if(page->WinPage == physDev->Devmode->dmPublic.u1.s1.dmPaperSize) { if(page->InvocationString) { PSDRV_WriteFeature(physDev->job.hJob, "*PageSize", page->Name, diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index e6b6edc..fcdc78d 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -29,6 +29,8 @@ #include "wine/wingdi16.h" #include "winspool.h" +#include "wine/list.h" + typedef struct { INT index; LPCSTR sz; @@ -131,13 +133,13 @@ typedef struct { /* Solaris kludge */ #undef PAGESIZE typedef struct _tagPAGESIZE { + struct list entry; char *Name; char *FullName; char *InvocationString; IMAGEABLEAREA *ImageableArea; PAPERDIMENSION *PaperDimension; WORD WinPage; /*eg DMPAPER_A4. Doesn't really belong here */ - struct _tagPAGESIZE *next; } PAGESIZE; @@ -211,7 +213,7 @@ typedef struct { char *JCLEnd; char *DefaultFont; FONTNAME *InstalledFonts; /* ptr to a list of FontNames */ - PAGESIZE *PageSizes; + struct list PageSizes; PAGESIZE *DefaultPageSize; OPTION *InstalledOptions; CONSTRAINT *Constraints;
1
0
0
0
Francois Gouget : rpcss: Fix a file handle leak in RPCSS_BecomePipeServer() .
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: c69ebe3b472d0d1328f9fafdcf3d34c3cfa4c558 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c69ebe3b472d0d1328f9fafdc…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Mar 8 15:30:29 2007 +0100 rpcss: Fix a file handle leak in RPCSS_BecomePipeServer(). Also, RPCSS_NPConnect() returns a file handle so treat it as such by checking it against INVALID_HANDLE_VALUE and not NULL. --- programs/rpcss/np_server.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/rpcss/np_server.c b/programs/rpcss/np_server.c index 729f156..bcb151e 100644 --- a/programs/rpcss/np_server.c +++ b/programs/rpcss/np_server.c @@ -334,7 +334,7 @@ static VOID NPMainWorkThread(LPVOID ignored) static HANDLE RPCSS_NPConnect(void) { - HANDLE the_pipe = NULL; + HANDLE the_pipe; DWORD dwmode, wait_result; HANDLE master_mutex = RPCSS_GetMasterMutex(); @@ -371,7 +371,6 @@ static HANDLE RPCSS_NPConnect(void) if (GetLastError() != ERROR_PIPE_BUSY) { WINE_WARN("Unable to open named pipe %s (assuming unavailable).\n", wine_dbgstr_a(NAME_RPCSS_NAMED_PIPE)); - the_pipe = NULL; break; } @@ -390,7 +389,7 @@ static HANDLE RPCSS_NPConnect(void) } - if (the_pipe) { + if (the_pipe != INVALID_HANDLE_VALUE) { dwmode = PIPE_READMODE_MESSAGE; /* SetNamedPipeHandleState not implemented ATM, but still seems to work somehow. */ if (! SetNamedPipeHandleState(the_pipe, &dwmode, NULL, NULL)) @@ -468,12 +467,13 @@ BOOL RPCSS_BecomePipeServer(void) * ready to listen on it */ - if ((client_handle = RPCSS_NPConnect()) != NULL) { + if ((client_handle = RPCSS_NPConnect()) != INVALID_HANDLE_VALUE) { msg.message_type = RPCSS_NP_MESSAGE_TYPEID_RANMSG; msg.message.ranmsg.timeout = RPCSS_GetMaxLazyTimeout(); msg.vardata_payload_size = 0; if (!RPCSS_SendReceiveNPMsg(client_handle, &msg, &reply)) WINE_ERR("Something is amiss: RPC_SendReceive failed.\n"); + CloseHandle(client_handle); rslt = FALSE; } if (rslt) {
1
0
0
0
Francois Gouget : ws2_32: Fix an int/long mismatch in a trace.
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: 66c37f518468e801b407ce11f259b508e2027427 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66c37f518468e801b407ce11f…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Mar 8 15:31:00 2007 +0100 ws2_32: Fix an int/long mismatch in a trace. --- dlls/ws2_32/socket.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index aaf9c1b..16222ca 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -4266,9 +4266,9 @@ INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, struct ws2_async *wsa; IO_STATUS_BLOCK* iosb; - TRACE("socket %04x, wsabuf %p, nbufs %d, flags %d, from %p, fromlen %ld, ovl %p, func %p\n", + TRACE("socket %04x, wsabuf %p, nbufs %d, flags %d, from %p, fromlen %d, ovl %p, func %p\n", s, lpBuffers, dwBufferCount, *lpFlags, lpFrom, - (lpFromlen ? *lpFromlen : -1L), + (lpFromlen ? *lpFromlen : -1), lpOverlapped, lpCompletionRoutine); fd = get_sock_fd( s, FILE_READ_DATA, &flags );
1
0
0
0
Francois Gouget : ws2_32: Replace a few -1 literals with SOCKET_ERROR.
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: 7d5883d44bb2654788f5f4bae315b510554d1457 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d5883d44bb2654788f5f4bae…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Mar 8 15:30:53 2007 +0100 ws2_32: Replace a few -1 literals with SOCKET_ERROR. Do a small tweak in WS2_send() so it looks more like WS2_recv(). --- dlls/ws2_32/socket.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 1d007a9..aaf9c1b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1204,7 +1204,7 @@ static int WS2_recv( int fd, struct iovec* iov, int count, if ( !hdr.msg_name ) { WSASetLastError( WSAEFAULT ); - n = -1; + n = SOCKET_ERROR; goto out; } } @@ -1313,7 +1313,7 @@ static int WS2_send( int fd, struct iovec* iov, int count, const struct WS_sockaddr *to, INT tolen, DWORD dwFlags ) { struct msghdr hdr; - int n = -1; + int n; TRACE( "fd %d, iovec %p, count %d addr %s, len %d, flags %x\n", fd, iov, count, debugstr_sockaddr(to), tolen, dwFlags); @@ -1325,6 +1325,7 @@ static int WS2_send( int fd, struct iovec* iov, int count, if ( !hdr.msg_name ) { WSASetLastError( WSAEFAULT ); + n = SOCKET_ERROR; goto out; } @@ -2732,7 +2733,7 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds, if (!(pollfds = fd_sets_to_poll( ws_readfds, ws_writefds, ws_exceptfds, &count )) && count) { SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return -1; + return SOCKET_ERROR; } if (ws_timeout) timeout = (ws_timeout->tv_sec * 1000) + (ws_timeout->tv_usec + 999) / 1000;
1
0
0
0
Francois Gouget : wininet: Fix a couple of reversed checks that could result in leaked socket handles .
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: fa41be3fdb2c9b524a3bf10970dd586d3e2049b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa41be3fdb2c9b524a3bf1097…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Mar 8 15:30:41 2007 +0100 wininet: Fix a couple of reversed checks that could result in leaked socket handles. --- dlls/wininet/ftp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 4373c3c..7cb49e1 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -2007,7 +2007,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, } lerror: - if (!bSuccess && nsocket == -1) + if (!bSuccess && nsocket != -1) closesocket(nsocket); if (!bSuccess && lpwfs) @@ -2378,7 +2378,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs) bSuccess = TRUE; lend: - if (!bSuccess && lpwfs->lstnSocket == -1) + if (!bSuccess && lpwfs->lstnSocket != -1) { closesocket(lpwfs->lstnSocket); lpwfs->lstnSocket = -1;
1
0
0
0
Francois Gouget : wininet: Check file handles against INVALID_HANDLE_VALUE, not NULL.
by Alexandre Julliard
08 Mar '07
08 Mar '07
Module: wine Branch: master Commit: 53e76f8370d90ab0e5c900c2644d607bb06ab845 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53e76f8370d90ab0e5c900c26…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Mar 8 15:29:01 2007 +0100 wininet: Check file handles against INVALID_HANDLE_VALUE, not NULL. Simplify the file handle handling in FTP_FtpPutFileW(). --- dlls/wininet/ftp.c | 7 +++---- dlls/wininet/tests/ftp.c | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 0931ccc..4373c3c 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -271,7 +271,7 @@ lend: BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile, LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext) { - HANDLE hFile = NULL; + HANDLE hFile; BOOL bSuccess = FALSE; LPWININETAPPINFOW hIC = NULL; INT nResCode; @@ -324,8 +324,7 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile, &iar, sizeof(INTERNET_ASYNC_RESULT)); } - if (hFile) - CloseHandle(hFile); + CloseHandle(hFile); return bSuccess; } @@ -1350,7 +1349,7 @@ lend: if (lpwfs->lstnSocket != -1) closesocket(lpwfs->lstnSocket); - if (hFile) + if (INVALID_HANDLE_VALUE != hFile) CloseHandle(hFile); hIC = lpwfs->lpAppInfo; diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c index b12f88b..2eca664 100644 --- a/dlls/wininet/tests/ftp.c +++ b/dlls/wininet/tests/ftp.c @@ -380,7 +380,6 @@ static void test_getfile(void) SetLastError(0xdeadbeef); bRet = FtpGetFileA(hFtp, "welcome.msg", "should_be_non_existing_deadbeef", TRUE, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_UNKNOWN, 0); ok ( bRet == FALSE, "Expected FtpGetFileA to fail\n"); - todo_wine ok ( GetLastError() == ERROR_FILE_EXISTS, "Expected ERROR_FILE_EXISTS, got %d\n", GetLastError()); @@ -388,7 +387,6 @@ static void test_getfile(void) SetLastError(0xdeadbeef); bRet = FtpGetFileA(hFtp, "should_be_non_existing_deadbeef", "should_be_non_existing_deadbeef", TRUE, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_UNKNOWN, 0); ok ( bRet == FALSE, "Expected FtpGetFileA to fail\n"); - todo_wine ok ( GetLastError() == ERROR_FILE_EXISTS, "Expected ERROR_FILE_EXISTS, got %d\n", GetLastError());
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
...
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