Module: wine Branch: master Commit: de5a266aa08f920fb4b2d7fbefa12dd0c0878edc URL: http://source.winehq.org/git/wine.git/?a=commit;h=de5a266aa08f920fb4b2d7fbef...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 1 13:26:05 2008 +0100
dplayx: Remove some unused functions.
---
dlls/dplayx/dplay.c | 4 +- dlls/dplayx/dplay_global.h | 2 - dlls/dplayx/dplayx_global.c | 69 +----------------------------------------- dlls/dplayx/dplayx_global.h | 11 ------- 4 files changed, 4 insertions(+), 82 deletions(-)
diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 03aa02f..360e22b 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -202,7 +202,7 @@ static BOOL DP_BuildSPCompoundAddr( LPGUID lpcSpGuid, LPVOID* lplpAddrBuf, static inline DPID DP_NextObjectId(void); static DPID DP_GetRemoteNextObjectId(void);
- +static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ); static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc, LPCDPSESSIONDESC2 srcSessDesc, BOOL bAnsi );
@@ -3349,7 +3349,7 @@ static HRESULT WINAPI DirectPlay2WImpl_SetSessionDesc }
/* FIXME: See about merging some of this stuff with dplayx_global.c stuff */ -DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ) +static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ) { DWORD dwSize = 0;
diff --git a/dlls/dplayx/dplay_global.h b/dlls/dplayx/dplay_global.h index 3537c75..6c9c61a 100644 --- a/dlls/dplayx/dplay_global.h +++ b/dlls/dplayx/dplay_global.h @@ -31,8 +31,6 @@ extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, DWORD dwAddressSize, LPVOID lpContext );
-extern DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ); - /***************************************************************************** * Predeclare the interface implementation structures */ diff --git a/dlls/dplayx/dplayx_global.c b/dlls/dplayx/dplayx_global.c index fc72dce..6bf9f3d 100644 --- a/dlls/dplayx/dplayx_global.c +++ b/dlls/dplayx/dplayx_global.c @@ -89,8 +89,7 @@ typedef struct
static DPLAYX_MEM_SLICE* lpMemArea;
-void DPLAYX_PrivHeapFree( LPVOID addr ); -void DPLAYX_PrivHeapFree( LPVOID addr ) +static void DPLAYX_PrivHeapFree( LPVOID addr ) { LPVOID lpAddrStart; DWORD dwBlockUsed; @@ -107,9 +106,7 @@ void DPLAYX_PrivHeapFree( LPVOID addr ) lpMemArea[ dwBlockUsed ].used = 0; }
-/* FIXME: This should be static, but is being used for a hack right now */ -LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size ); -LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size ) +static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size ) { LPVOID lpvArea = NULL; UINT uBlockUsed; @@ -144,27 +141,6 @@ LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size ) return lpvArea; }
-LPSTR DPLAYX_strdupA( DWORD flags, LPCSTR str ); -LPSTR DPLAYX_strdupA( DWORD flags, LPCSTR str ) -{ - LPSTR p = DPLAYX_PrivHeapAlloc( flags, strlen(str) + 1 ); - if(p) { - strcpy( p, str ); - } - return p; -} - -LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str ); -LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str ) -{ - INT len = strlenW(str) + 1; - LPWSTR p = DPLAYX_PrivHeapAlloc( flags, len * sizeof(WCHAR) ); - if(p) { - strcpyW( p, str ); - } - return p; -} -
enum { numSupportedLobbies = 32, numSupportedSessions = 32 }; typedef struct tagDPLAYX_LOBBYDATA @@ -1062,15 +1038,6 @@ DWORD DPLAYX_SizeOfLobbyDataW( const DPLCONNECTION *lpConn )
-static LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateSessionDesc2A( LPCDPSESSIONDESC2 lpSessionSrc ) -{ - LPDPSESSIONDESC2 lpSessionDest = - HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpSessionSrc ) ); - DPLAYX_CopyIntoSessionDesc2A( lpSessionDest, lpSessionSrc ); - - return lpSessionDest; -} - /* Copy an ANSI session desc structure to the given buffer */ BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest, LPCDPSESSIONDESC2 lpSessionSrc ) @@ -1093,38 +1060,6 @@ BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest, return TRUE; }
-/* Start the index at 0. index will be updated to equal that which should - be passed back into this function for the next element */ -LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateLocalSession( UINT* index ) -{ - for( ; (*index) < numSupportedSessions; (*index)++ ) - { - if( sessionData[(*index)].dwSize != 0 ) - { - return DPLAYX_CopyAndAllocateSessionDesc2A( &sessionData[(*index)++] ); - } - } - - /* No more sessions */ - return NULL; -} - -/* Start the index at 0. index will be updated to equal that which should - be passed back into this function for the next element */ -BOOL DPLAYX_CopyLocalSession( UINT* index, LPDPSESSIONDESC2 lpsd ) -{ - for( ; (*index) < numSupportedSessions; (*index)++ ) - { - if( sessionData[(*index)].dwSize != 0 ) - { - return DPLAYX_CopyIntoSessionDesc2A( lpsd, &sessionData[(*index)++] ); - } - } - - /* No more sessions */ - return FALSE; -} - void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd ) { UINT i; diff --git a/dlls/dplayx/dplayx_global.h b/dlls/dplayx/dplayx_global.h index a4d109a..b9d48f4 100644 --- a/dlls/dplayx/dplayx_global.h +++ b/dlls/dplayx/dplayx_global.h @@ -44,7 +44,6 @@ HRESULT DPLAYX_SetConnectionSettingsW ( DWORD dwFlags, const DPLCONNECTION *lpConn );
BOOL DPLAYX_CreateLobbyApplication( DWORD dwAppID ); -BOOL DPLAYX_DestroyLobbyApplication( DWORD dwAppID );
BOOL DPLAYX_WaitForConnectionSettings( BOOL bWait ); BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void); @@ -52,20 +51,10 @@ BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void); BOOL DPLAYX_SetLobbyHandles( DWORD dwAppID, HANDLE hStart, HANDLE hDeath, HANDLE hConnRead );
-LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateLocalSession( UINT* index ); -BOOL DPLAYX_CopyLocalSession( UINT* index, LPDPSESSIONDESC2 lpsd ); void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd );
BOOL DPLAYX_SetLobbyMsgThreadId( DWORD dwAppId, DWORD dwThreadId );
-/* FIXME: This should not be here */ -LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size ); -void DPLAYX_PrivHeapFree( LPVOID addr ); - -LPSTR DPLAYX_strdupA( DWORD flags, LPCSTR str ); -LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str ); -/* FIXME: End shared data alloc which should be local */ -
/* Convert a DP or DPL HRESULT code into a string for human consumption */ LPCSTR DPLAYX_HresultToString( HRESULT hr );