Alexandre Julliard : user32: Remove some redundant 16-bit message traces.

Alexandre Julliard julliard at winehq.org
Thu Dec 24 10:27:15 CST 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec 22 14:50:58 2009 +0100

user32: Remove some redundant 16-bit message traces.

---

 dlls/user32/msg16.c        |   28 ++++----------------------
 dlls/user32/spy.c          |   45 ++++++++++---------------------------------
 dlls/user32/user_private.h |    8 +-----
 3 files changed, 18 insertions(+), 63 deletions(-)

diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c
index aef453d..407f0ad 100644
--- a/dlls/user32/msg16.c
+++ b/dlls/user32/msg16.c
@@ -614,9 +614,6 @@ LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT1
     LRESULT ret = 0;
     HWND hwnd32 = WIN_Handle32( hwnd );
 
-    TRACE_(msg)("(hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
-                 hwnd32, SPY_GetMsgName(msg, hwnd32), wParam, lParam);
-
     switch(msg)
     {
     case WM_NCCREATE:
@@ -938,9 +935,6 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
 {
     LRESULT ret = 0;
 
-    TRACE_(msg)("(hwnd=%p,msg=%s,wp=%08lx,lp=%08lx)\n",
-                hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam);
-
     switch(msg)
     {
     case WM_NCCREATE:
@@ -1625,8 +1619,6 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR
     LRESULT result;
     HWND hwnd = WIN_Handle32( hwnd16 );
 
-    SPY_EnterMessage( SPY_DEFWNDPROC16, hwnd, msg, wParam, lParam );
-
     switch(msg)
     {
     case WM_NCCREATE:
@@ -1646,10 +1638,8 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR
             cs32.dwExStyle      = cs16->dwExStyle;
             cs32.lpszName       = MapSL(cs16->lpszName);
             cs32.lpszClass      = MapSL(cs16->lpszClass);
-            result = DefWindowProcA( hwnd, msg, wParam, (LPARAM)&cs32 );
+            return DefWindowProcA( hwnd, msg, wParam, (LPARAM)&cs32 );
         }
-        break;
-
     case WM_NCCALCSIZE:
         {
             RECT16 *rect16 = MapSL(lParam);
@@ -1666,9 +1656,8 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR
             rect16->top    = rect32.top;
             rect16->right  = rect32.right;
             rect16->bottom = rect32.bottom;
+            return result;
         }
-        break;
-
     case WM_WINDOWPOSCHANGING:
     case WM_WINDOWPOSCHANGED:
         {
@@ -1692,21 +1681,14 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR
             pos16->cx              = pos32.cx;
             pos16->cy              = pos32.cy;
             pos16->flags           = pos32.flags;
+            return result;
         }
-        break;
-
     case WM_GETTEXT:
     case WM_SETTEXT:
-        result = DefWindowProcA( hwnd, msg, wParam, (LPARAM)MapSL(lParam) );
-        break;
-
+        return DefWindowProcA( hwnd, msg, wParam, (LPARAM)MapSL(lParam) );
     default:
-        result = DefWindowProcA( hwnd, msg, wParam, lParam );
-        break;
+        return DefWindowProcA( hwnd, msg, wParam, lParam );
     }
-
-    SPY_ExitMessage( SPY_RESULT_DEFWND16, hwnd, msg, result, wParam, lParam );
-    return result;
 }
 
 
diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c
index eb126e3..ea6c3d7 100644
--- a/dlls/user32/spy.c
+++ b/dlls/user32/spy.c
@@ -2575,13 +2575,13 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
     switch(iFlag)
     {
     case SPY_DISPATCHMESSAGE16:
-        TRACE("%*s(%04x) %-16s message [%04x] %s dispatched  wp=%04lx lp=%08lx\n",
+        TRACE("%*s(%04x) %-16s [%04x] %s dispatched  wp=%04lx lp=%08lx\n",
               indent, "", HWND_16(hWnd),
               debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, wParam, lParam);
         break;
 
     case SPY_DISPATCHMESSAGE:
-        TRACE("%*s(%p) %-16s message [%04x] %s dispatched  wp=%08lx lp=%08lx\n",
+        TRACE("%*s(%p) %-16s [%04x] %s dispatched  wp=%08lx lp=%08lx\n",
                         indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                         sp_e.msg_name, wParam, lParam);
         break;
@@ -2596,11 +2596,11 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
             else sprintf( taskName, "tid %04x", GetCurrentThreadId() );
 
             if (iFlag == SPY_SENDMESSAGE16)
-                TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04lx lp=%08lx\n",
+                TRACE("%*s(%04x) %-16s [%04x] %s sent from %s wp=%04lx lp=%08lx\n",
                       indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg,
                       sp_e.msg_name, taskName, wParam, lParam );
             else
-            {   TRACE("%*s(%p) %-16s message [%04x] %s sent from %s wp=%08lx lp=%08lx\n",
+            {   TRACE("%*s(%p) %-16s [%04x] %s sent from %s wp=%08lx lp=%08lx\n",
                              indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                              sp_e.msg_name, taskName, wParam, lParam );
                 SPY_DumpStructure(&sp_e, TRUE);
@@ -2608,17 +2608,10 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
         }
         break;
 
-    case SPY_DEFWNDPROC16:
-        if( SPY_ExcludeDWP ) return;
-        TRACE("%*s(%04x)  DefWindowProc16: %s [%04x]  wp=%04lx lp=%08lx\n",
-              indent, "", HWND_16(hWnd), sp_e.msg_name, msg, wParam, lParam );
-        break;
-
     case SPY_DEFWNDPROC:
         if( SPY_ExcludeDWP ) return;
-        TRACE("%*s(%p)  DefWindowProc32: %s [%04x]  wp=%08lx lp=%08lx\n",
-                        indent, "", hWnd, sp_e.msg_name,
-                        msg, wParam, lParam );
+        TRACE("%*s(%p)  DefWindowProc:[%04x] %s  wp=%08lx lp=%08lx\n",
+              indent, "", hWnd, msg, sp_e.msg_name, wParam, lParam );
         break;
     }
     set_indent_level( indent + SPY_INDENT_UNIT );
@@ -2637,7 +2630,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
     DWORD save_error = GetLastError();
 
     if (!TRACE_ON(message) || SPY_EXCLUDE(msg) ||
-        (SPY_ExcludeDWP && (iFlag == SPY_RESULT_DEFWND16 || iFlag == SPY_RESULT_DEFWND)) )
+        (SPY_ExcludeDWP && iFlag == SPY_RESULT_DEFWND))
         return;
 
     sp_e.msgnum = msg;
@@ -2655,39 +2648,23 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
 
     switch(iFlag)
     {
-    case SPY_RESULT_DEFWND16:
-        TRACE(" %*s(%04x)  DefWindowProc16: %s [%04x] returned %08lx\n",
-              indent, "", HWND_16(hWnd), sp_e.msg_name, msg, lReturn );
-        break;
-
     case SPY_RESULT_DEFWND:
-        TRACE(" %*s(%p)  DefWindowProc32: %s [%04x] returned %08lx\n",
-                        indent, "", hWnd, sp_e.msg_name, msg, lReturn );
+        TRACE(" %*s(%p)  DefWindowProc: [%04x] %s returned %08lx\n",
+              indent, "", hWnd, msg, sp_e.msg_name, lReturn );
         break;
 
     case SPY_RESULT_OK16:
-        TRACE(" %*s(%04x) %-16s message [%04x] %s returned %08lx\n",
+        TRACE(" %*s(%04x) %-16s [%04x] %s returned %08lx\n",
               indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg,
               sp_e.msg_name, lReturn );
         break;
 
     case SPY_RESULT_OK:
-        TRACE(" %*s(%p) %-16s message [%04x] %s returned %08lx\n",
+        TRACE(" %*s(%p) %-16s [%04x] %s returned %08lx\n",
                         indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                         sp_e.msg_name, lReturn );
         SPY_DumpStructure(&sp_e, FALSE);
         break;
-
-    case SPY_RESULT_INVALIDHWND16:
-        WARN(" %*s(%04x) %-16s message [%04x] %s HAS INVALID HWND\n",
-             indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name );
-        break;
-
-    case SPY_RESULT_INVALIDHWND:
-        WARN(" %*s(%p) %-16s message [%04x] %s HAS INVALID HWND\n",
-                        indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
-                        sp_e.msg_name );
-        break;
     }
     SetLastError( save_error );
 }
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 7ca39ff..a54f272 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -259,15 +259,11 @@ extern BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
 #define SPY_DISPATCHMESSAGE       0x0101
 #define SPY_SENDMESSAGE16         0x0102
 #define SPY_SENDMESSAGE           0x0103
-#define SPY_DEFWNDPROC16          0x0104
-#define SPY_DEFWNDPROC            0x0105
+#define SPY_DEFWNDPROC            0x0104
 
 #define SPY_RESULT_OK16           0x0000
 #define SPY_RESULT_OK             0x0001
-#define SPY_RESULT_INVALIDHWND16  0x0002
-#define SPY_RESULT_INVALIDHWND    0x0003
-#define SPY_RESULT_DEFWND16       0x0004
-#define SPY_RESULT_DEFWND         0x0005
+#define SPY_RESULT_DEFWND         0x0002
 
 extern const char *SPY_GetClassLongOffsetName( INT offset ) DECLSPEC_HIDDEN;
 extern const char *SPY_GetMsgName( UINT msg, HWND hWnd ) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list