Module: wine Branch: master Commit: 13ca78cf1a2e0af740813e90a1905e9f480d4ea0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=13ca78cf1a2e0af740813e90a1...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Sep 9 13:12:38 2009 +0200
user32: Use explicit prototypes for function pointers.
---
dlls/user32/hook.c | 17 +++++++++-------- dlls/user32/nonclient.c | 4 +++- 2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index ae4c5f1..916c37e 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -85,7 +85,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay); struct hook_info { INT id; - FARPROC proc; + void *proc; void *handle; DWORD pid, tid; BOOL prev_unicode, next_unicode; @@ -844,24 +844,25 @@ void WINAPI NotifyWinEvent(DWORD event, HWND hwnd, LONG object_id, LONG child_id
do { - if (info.proc) + WINEVENTPROC proc = info.proc; + if (proc) { TRACE( "calling WH_WINEVENT hook %p event %x hwnd %p %x %x module %s\n", - info.proc, event, hwnd, object_id, child_id, debugstr_w(info.module) ); + proc, event, hwnd, object_id, child_id, debugstr_w(info.module) );
- if (!info.module[0] || (info.proc = get_hook_proc( info.proc, info.module )) != NULL) + if (!info.module[0] || (proc = get_hook_proc( proc, info.module )) != NULL) { if (TRACE_ON(relay)) DPRINTF( "%04x:Call winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", - GetCurrentThreadId(), info.proc, info.handle, event, hwnd, object_id, + GetCurrentThreadId(), proc, info.handle, event, hwnd, object_id, child_id, GetCurrentThreadId(), GetCurrentTime());
- info.proc(info.handle, event, hwnd, object_id, child_id, - GetCurrentThreadId(), GetCurrentTime()); + proc( info.handle, event, hwnd, object_id, child_id, + GetCurrentThreadId(), GetCurrentTime());
if (TRACE_ON(relay)) DPRINTF( "%04x:Ret winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", - GetCurrentThreadId(), info.proc, info.handle, event, hwnd, object_id, + GetCurrentThreadId(), proc, info.handle, event, hwnd, object_id, child_id, GetCurrentThreadId(), GetCurrentTime()); } } diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 3353126..03831a3 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -1600,7 +1600,9 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) HMODULE hmodule = LoadLibraryA( "shell32.dll" ); if (hmodule) { - FARPROC aboutproc = GetProcAddress( hmodule, "ShellAboutA" ); + BOOL (WINAPI *aboutproc)(HWND, LPCSTR, LPCSTR, HICON); + + aboutproc = (void *)GetProcAddress( hmodule, "ShellAboutA" ); if (aboutproc) aboutproc( hwnd, PACKAGE_STRING, NULL, 0 ); FreeLibrary( hmodule ); }