Alexandre Julliard : user: Merged WINPROC_CallProc32WTo32A_fast into WINPROC_CallProc32WTo32A.

Alexandre Julliard julliard at wine.codeweavers.com
Thu May 18 09:43:50 CDT 2006


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 18 11:02:28 2006 +0200

user: Merged WINPROC_CallProc32WTo32A_fast into WINPROC_CallProc32WTo32A.

---

 dlls/user/winproc.c |   59 +++++++++++++++++++--------------------------------
 1 files changed, 22 insertions(+), 37 deletions(-)

diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c
index 659f1f5..a6754de 100644
--- a/dlls/user/winproc.c
+++ b/dlls/user/winproc.c
@@ -2985,13 +2985,19 @@ static LRESULT WINPROC_CallProc32ATo32W(
 
 
 /**********************************************************************
- *	     WINPROC_CallProc32WTo32A_fast
+ *	     WINPROC_CallProc32WTo32A
  *
+ * Call a window procedure, translating args from Unicode to Ansi.
  */
-static BOOL WINPROC_CallProc32WTo32A_fast( WNDPROC func, HWND hwnd,
-                                           UINT msg, WPARAM wParam,
-                                           LPARAM lParam, LRESULT *result )
+static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPARAM wParam,
+                                         LPARAM lParam, BOOL dialog )
 {
+    LRESULT ret = 0;
+    int unmap;
+
+    TRACE_(msg)("func %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
+                func, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam);
+
     switch(msg)
     {
     case WM_NCCREATE:
@@ -3020,7 +3026,7 @@ static BOOL WINPROC_CallProc32WTo32A_fas
             if (class_lenA + name_lenA + 2 > sizeof(buffer))
             {
                 cls = HeapAlloc(GetProcessHeap(), 0, class_lenA + name_lenA + 2);
-                if (!cls) return FALSE;
+                if (!cls) break;
             }
 
             RtlUnicodeToMultiByteN(cls, class_lenA, NULL, csW->lpszClass, class_lenW);
@@ -3043,43 +3049,20 @@ static BOOL WINPROC_CallProc32WTo32A_fas
                 csA.lpCreateParams = &mdi_cs;
             }
 
-            lParam = (LPARAM)&csA;
-            *result = WINPROC_CallWndProc(func, hwnd, msg, wParam, lParam);
+            ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, (LPARAM)&csA );
 
             if (cls != buffer) HeapFree(GetProcessHeap(), 0, cls);
         }
-        return TRUE;
+        break;
 
     default:
-        return FALSE;
-    }
-}
-
-/**********************************************************************
- *	     WINPROC_CallProc32WTo32A
- *
- * Call a window procedure, translating args from Unicode to Ansi.
- */
-static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPARAM wParam,
-                                         LPARAM lParam, BOOL dialog )
-{
-    LRESULT ret;
-    int unmap;
-
-    TRACE_(msg)("func %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
-                func, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam);
-
-    if (WINPROC_CallProc32WTo32A_fast( func, hwnd, msg, wParam, lParam, &ret ))
-        return ret;
-
-    if ((unmap = WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam )) == -1) {
-        ERR_(msg)("Message translation failed. (msg=%s,wp=%08x,lp=%08lx)\n",
-                       SPY_GetMsgName(msg, hwnd), wParam, lParam );
-        return 0;
-    }
-    ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam );
-    if (unmap)
-    {
+        if ((unmap = WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam )) == -1) {
+            ERR_(msg)("Message translation failed. (msg=%s,wp=%08x,lp=%08lx)\n",
+                      SPY_GetMsgName(msg, hwnd), wParam, lParam );
+            return 0;
+        }
+        ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam );
+        if (!unmap) break;
         if (dialog)
         {
             LRESULT result = GetWindowLongPtrW( hwnd, DWLP_MSGRESULT );
@@ -3087,7 +3070,9 @@ static LRESULT WINPROC_CallProc32WTo32A(
             SetWindowLongPtrW( hwnd, DWLP_MSGRESULT, result );
         }
         else ret = WINPROC_UnmapMsg32WTo32A( hwnd, msg, wParam, lParam, ret );
+        break;
     }
+
     return ret;
 }
 




More information about the wine-cvs mailing list