From 40774c3c91e01098bdeb22ee3ec576b801f7d3fa Mon Sep 17 00:00:00 2001
From: Francois Gouget <fgouget@free.fr>
Date: Mon, 12 Feb 2001 01:29:08 +0000
Subject: [PATCH] Change the callback declarations to a safer format.

---
 include/process.h         | 2 +-
 include/setupapi.h        | 4 ++--
 include/shlwapi.h         | 2 +-
 include/vfw.h             | 2 +-
 include/winbase.h         | 2 +-
 include/wine/undocshell.h | 2 +-
 include/winsock2.h        | 3 +--
 include/winsvc.h          | 2 +-
 8 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/include/process.h b/include/process.h
index eb03635ca62..3c2e27456b8 100644
--- a/include/process.h
+++ b/include/process.h
@@ -8,7 +8,7 @@
 #define _INC_PROCESS
 
 typedef void (*LPBEGINTHREAD)(LPVOID);
-typedef UINT (WINAPI *LPBEGINTHREADEX)(LPVOID);
+typedef UINT WINAPI (*LPBEGINTHREADEX)(LPVOID);
 
 ULONG _beginthread(LPBEGINTHREAD,UINT,LPVOID);
 void  _endthread(void);
diff --git a/include/setupapi.h b/include/setupapi.h
index ca8881a37fe..cdc421ad4c1 100644
--- a/include/setupapi.h
+++ b/include/setupapi.h
@@ -26,9 +26,9 @@ typedef struct _INFCONTEXT
    UINT  Line;
 } INFCONTEXT, *PINFCONTEXT;
 
-typedef UINT (CALLBACK* PSP_FILE_CALLBACK_A)( PVOID Context, UINT Notification,
+typedef UINT CALLBACK (*PSP_FILE_CALLBACK_A)( PVOID Context, UINT Notification,
                                               UINT Param1, UINT Param2 );
-typedef UINT (CALLBACK* PSP_FILE_CALLBACK_W)( PVOID Context, UINT Notification,
+typedef UINT CALLBACK (*PSP_FILE_CALLBACK_W)( PVOID Context, UINT Notification,
                                               UINT Param1, UINT Param2 );
 #define PSP_FILE_CALLBACK WINELIB_NAME_AW(PSP_FILE_CALLBACK_)
 
diff --git a/include/shlwapi.h b/include/shlwapi.h
index 80ea898252a..64f5a57bc11 100644
--- a/include/shlwapi.h
+++ b/include/shlwapi.h
@@ -237,7 +237,7 @@ typedef struct _DllVersionInfo {
 #define DLLVER_PLATFORM_WINDOWS         0x00000001      // Windows 9x
 #define DLLVER_PLATFORM_NT              0x00000002      // Windows NT
 
-typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
+typedef HRESULT CALLBACK (*DLLGETVERSIONPROC)(DLLVERSIONINFO *);
 
 #ifdef __cplusplus
 } /* extern "C" */
diff --git a/include/vfw.h b/include/vfw.h
index 879a208c69c..1a5c197ef53 100644
--- a/include/vfw.h
+++ b/include/vfw.h
@@ -680,7 +680,7 @@ inline static LRESULT VFWAPI ICDrawSuggestFormat(HIC hic, LPBITMAPINFOHEADER lpb
     ICSendMessage(hic, ICM_DRAW_RENDERBUFFER, 0, 0)
 
 inline static LRESULT VFWAPI ICSetStatusProc(HIC hic, DWORD dwFlags, LRESULT lParam,
-					     LONG (CALLBACK *fpfnStatus)(LPARAM, UINT, LONG))
+					     LONG CALLBACK (*fpfnStatus)(LPARAM, UINT, LONG))
 {
     ICSETSTATUSPROC ic;
 
diff --git a/include/winbase.h b/include/winbase.h
index 80cb6a41203..d673d955a49 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -23,7 +23,7 @@ extern "C" {
 
 typedef DWORD CALLBACK (*LPTHREAD_START_ROUTINE)(LPVOID);
 
-typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
+typedef VOID WINAPI (*PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
 typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
 
 typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
diff --git a/include/wine/undocshell.h b/include/wine/undocshell.h
index a29d14e85dc..a96a962e2be 100644
--- a/include/wine/undocshell.h
+++ b/include/wine/undocshell.h
@@ -641,7 +641,7 @@ BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
  */
 
 /* SHCreateShellFolderViewEx callback function */
-typedef HRESULT (CALLBACK* LPFNSFVCALLBACK)(
+typedef HRESULT CALLBACK (*LPFNSFVCALLBACK)(
 	DWORD dwUser,
 	LPSHELLFOLDER pshf,
 	HWND hWnd,
diff --git a/include/winsock2.h b/include/winsock2.h
index 96de4d4f9f5..336288172a3 100644
--- a/include/winsock2.h
+++ b/include/winsock2.h
@@ -196,8 +196,7 @@ typedef struct _OVERLAPPED *  LPWSAOVERLAPPED;
 typedef HANDLE WSAEVENT;
 typedef unsigned int   GROUP;
 
-typedef void 
-(CALLBACK * LPWSAOVERLAPPED_COMPLETION_ROUTINE)
+typedef void CALLBACK (*LPWSAOVERLAPPED_COMPLETION_ROUTINE)
 (
      DWORD dwError,
      DWORD cbTransferred,
diff --git a/include/winsvc.h b/include/winsvc.h
index 5657b38b42a..0e9e6e00935 100644
--- a/include/winsvc.h
+++ b/include/winsvc.h
@@ -136,7 +136,7 @@ DECL_WINELIB_TYPE_AW(LPENUM_SERVICE_STATUS)
 
 /* Service control handler function prototype */
 
-typedef VOID (WINAPI *LPHANDLER_FUNCTION)(DWORD);
+typedef VOID WINAPI (*LPHANDLER_FUNCTION)(DWORD);
 
 /* API function prototypes */
 
-- 
GitLab