Andrew Talbot : winmm: Declare some functions static.

Alexandre Julliard julliard at winehq.org
Mon Feb 2 09:01:12 CST 2009


Module: wine
Branch: master
Commit: 84666d84a56860dcd6a7a63ab7f77b6b84bfee27
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=84666d84a56860dcd6a7a63ab7f77b6b84bfee27

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Sat Jan 31 13:02:34 2009 +0000

winmm: Declare some functions static.

---

 dlls/winmm/mci.c    |   80 ++++++++++++++++++++++++++-------------------------
 dlls/winmm/winemm.h |    5 ---
 2 files changed, 41 insertions(+), 44 deletions(-)

diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index b0d90e7..dfb0ba7 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -85,6 +85,8 @@ static const WCHAR wszSystemIni[] = {'s','y','s','t','e','m','.','i','n','i',0};
 
 static WINE_MCIDRIVER *MciDrivers;
 
+static UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data);
+
 /* dup a string and uppercase it */
 static inline LPWSTR str_dup_upper( LPCWSTR str )
 {
@@ -117,7 +119,7 @@ LPWINE_MCIDRIVER	MCI_GetDriver(UINT16 wDevID)
 /**************************************************************************
  * 				MCI_GetDriverFromString		[internal]
  */
-UINT	MCI_GetDriverFromString(LPCWSTR lpstrName)
+static UINT MCI_GetDriverFromString(LPCWSTR lpstrName)
 {
     LPWINE_MCIDRIVER	wmd;
     UINT		ret = 0;
@@ -931,6 +933,41 @@ errCleanUp:
 }
 
 /**************************************************************************
+ * 			MCI_SendCommandFrom32			[internal]
+ */
+static DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
+{
+    DWORD		dwRet = MCIERR_INVALID_DEVICE_ID;
+    LPWINE_MCIDRIVER	wmd = MCI_GetDriver(wDevID);
+
+    if (wmd) {
+	if (wmd->bIs32) {
+	    dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
+	} else if (pFnMciMapMsg32WTo16) {
+	    WINMM_MapType	res;
+
+	    switch (res = pFnMciMapMsg32WTo16(wmd->wType, wMsg, dwParam1, &dwParam2)) {
+	    case WINMM_MAP_MSGERROR:
+		TRACE("Not handled yet (%s)\n", MCI_MessageToString(wMsg));
+		dwRet = MCIERR_DRIVER_INTERNAL;
+		break;
+	    case WINMM_MAP_NOMEM:
+		TRACE("Problem mapping msg=%s from 32a to 16\n", MCI_MessageToString(wMsg));
+		dwRet = MCIERR_OUT_OF_MEMORY;
+		break;
+	    case WINMM_MAP_OK:
+	    case WINMM_MAP_OKMEM:
+		dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
+		if (res == WINMM_MAP_OKMEM)
+		    pFnMciUnMapMsg32WTo16(wmd->wType, wMsg, dwParam1, dwParam2);
+		break;
+	    }
+	}
+    }
+    return dwRet;
+}
+
+/**************************************************************************
  * 			MCI_FinishOpen				[internal]
  */
 static	DWORD	MCI_FinishOpen(LPWINE_MCIDRIVER wmd, LPMCI_OPEN_PARMSW lpParms,
@@ -1551,44 +1588,9 @@ BOOL WINAPI mciFreeCommandResource(UINT uTable)
 }
 
 /**************************************************************************
- * 			MCI_SendCommandFrom32			[internal]
- */
-DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
-{
-    DWORD		dwRet = MCIERR_INVALID_DEVICE_ID;
-    LPWINE_MCIDRIVER	wmd = MCI_GetDriver(wDevID);
-
-    if (wmd) {
-	if (wmd->bIs32) {
-	    dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
-	} else if (pFnMciMapMsg32WTo16) {
-	    WINMM_MapType	res;
-
-	    switch (res = pFnMciMapMsg32WTo16(wmd->wType, wMsg, dwParam1, &dwParam2)) {
-	    case WINMM_MAP_MSGERROR:
-		TRACE("Not handled yet (%s)\n", MCI_MessageToString(wMsg));
-		dwRet = MCIERR_DRIVER_INTERNAL;
-		break;
-	    case WINMM_MAP_NOMEM:
-		TRACE("Problem mapping msg=%s from 32a to 16\n", MCI_MessageToString(wMsg));
-		dwRet = MCIERR_OUT_OF_MEMORY;
-		break;
-	    case WINMM_MAP_OK:
-	    case WINMM_MAP_OKMEM:
-		dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
-		if (res == WINMM_MAP_OKMEM)
-		    pFnMciUnMapMsg32WTo16(wmd->wType, wMsg, dwParam1, dwParam2);
-		break;
-	    }
-	}
-    }
-    return dwRet;
-}
-
-/**************************************************************************
  * 			MCI_SendCommandFrom16			[internal]
  */
-DWORD MCI_SendCommandFrom16(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
+static DWORD MCI_SendCommandFrom16(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
 {
     DWORD		dwRet = MCIERR_INVALID_DEVICE_ID;
     LPWINE_MCIDRIVER	wmd = MCI_GetDriver(wDevID);
@@ -1805,7 +1807,7 @@ static	DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
 /**************************************************************************
  * 			MCI_WriteString				[internal]
  */
-DWORD	MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr)
+static DWORD MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr)
 {
     DWORD	ret = 0;
 
@@ -2301,7 +2303,7 @@ static void MyUserYield(void)
 /**************************************************************************
  * 				MCI_DefYieldProc	       	[internal]
  */
-UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data)
+static UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data)
 {
     INT16	ret;
 
diff --git a/dlls/winmm/winemm.h b/dlls/winmm/winemm.h
index dcd2290..3ddff08 100644
--- a/dlls/winmm/winemm.h
+++ b/dlls/winmm/winemm.h
@@ -202,14 +202,9 @@ void            MMDRV_InstallMap(unsigned int, MMDRV_MAPFUNC, MMDRV_UNMAPFUNC,
                                  MMDRV_MAPFUNC, MMDRV_UNMAPFUNC, LPDRVCALLBACK);
 
 WINE_MCIDRIVER* MCI_GetDriver(UINT16 uDevID);
-UINT		MCI_GetDriverFromString(LPCWSTR str);
-DWORD		MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr);
 const char* 	MCI_MessageToString(UINT wMsg);
-UINT	WINAPI	MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data);
 LRESULT		MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2);
 DWORD		MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2, BOOL bFrom32);
-DWORD		MCI_SendCommandFrom32(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
-DWORD		MCI_SendCommandFrom16(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
 UINT		MCI_SetCommandTable(void *table, UINT uDevType);
 BOOL	        MCI_DeleteCommandTable(UINT uTbl, BOOL delete);
 LPWSTR          MCI_strdupAtoW(LPCSTR str);




More information about the wine-cvs mailing list