- Fix debug header nonsense
authorAlex Ionescu <aionescu@gmail.com>
Wed, 27 Jul 2005 19:21:46 +0000 (19:21 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Wed, 27 Jul 2005 19:21:46 +0000 (19:21 +0000)
 - Fix some w32api definitions
 - MSVC/PSDK Compatibility fixes.
 - Clean up user32 headers for greater PCH usage.

svn path=/trunk/; revision=16811

43 files changed:
reactos/apps/utils/ps/ps.c
reactos/drivers/dd/mpu401/settings.c
reactos/include/reactos/debug.h
reactos/include/wine/debug.h
reactos/lib/ntdll/inc/ntdll.h
reactos/lib/user32/controls/button.c
reactos/lib/user32/controls/combo.c
reactos/lib/user32/controls/edit.c
reactos/lib/user32/controls/icontitle.c
reactos/lib/user32/controls/listbox.c
reactos/lib/user32/controls/scrollbar.c
reactos/lib/user32/include/controls.h [moved from reactos/lib/user32/controls/controls.h with 100% similarity]
reactos/lib/user32/include/dde_private.h [moved from reactos/lib/user32/misc/dde_private.h with 99% similarity]
reactos/lib/user32/include/debug.h [deleted file]
reactos/lib/user32/include/user32.h
reactos/lib/user32/include/user32p.h
reactos/lib/user32/misc/dde.c
reactos/lib/user32/misc/ddeclient.c
reactos/lib/user32/misc/ddeserver.c
reactos/lib/user32/misc/display.c
reactos/lib/user32/misc/dllmain.c
reactos/lib/user32/misc/exticon.c
reactos/lib/user32/misc/object.c
reactos/lib/user32/misc/stubs.c
reactos/lib/user32/windows/bitmap.c
reactos/lib/user32/windows/clipboard.c
reactos/lib/user32/windows/cursor.c
reactos/lib/user32/windows/defwnd.c
reactos/lib/user32/windows/dialog.c
reactos/lib/user32/windows/draw.c
reactos/lib/user32/windows/font.c
reactos/lib/user32/windows/hook.c
reactos/lib/user32/windows/icon.c
reactos/lib/user32/windows/input.c
reactos/lib/user32/windows/mdi.c
reactos/lib/user32/windows/menu.c
reactos/lib/user32/windows/message.c
reactos/lib/user32/windows/messagebox.c
reactos/lib/user32/windows/nonclient.c
reactos/lib/user32/windows/paint.c
reactos/lib/user32/windows/window.c
reactos/w32api/include/winnls32.h [new file with mode: 0644]
reactos/w32api/include/winuser.h

index ed89e1d..20b19ac 100644 (file)
@@ -268,7 +268,7 @@ int main()
                WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL);
 
                EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThread,
-                                 (ENUMWINDOWSPROC) EnumThreadProc,
+                                 (WNDENUMPROC) EnumThreadProc,
                                  (LPARAM)(LPTSTR) szWindowName );
           }
           CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess +
index 14c5fc5..0f544a0 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "mpu401.h"
 
-// #define NDEBUG
+#define NDEBUG
 #include <debug.h>
 #include "sbdebug.h"  // our own debug helper
 
index ba038e4..db86a7f 100644 (file)
@@ -63,7 +63,7 @@
 #endif
 
 #ifndef NDEBUG
-#define DPRINT(...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0);
+#define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 #define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
 #else
 #ifdef __GNUC__
index 1170716..9f9891a 100644 (file)
@@ -6,6 +6,11 @@
 #include <windows.h>
 #include <wchar.h>
 
+/* Add ROS Master debug functions if not added yet */
+#ifndef __INTERNAL_DEBUG
+#include <reactos/debug.h>
+#endif
+
 #ifndef __GNUC__
 #define        __FUNCTION__ ""
 #define        inline __inline
 
 unsigned long DbgPrint(char *Format,...);
 
-#ifdef DBG
-#define DPRINT1 DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
-#else
-#define DPRINT1(...)
-#endif
-
-#if !defined(DBG) || !defined(YDEBUG)
-#define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
-#else
-#define DPRINT DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
-#endif
-
-#define UNIMPLEMENTED   DbgPrint("WARNING:  %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
-
-
 struct _GUID;
 
 /* Exported definitions and macros */
index 7ce2a0f..ccd4710 100644 (file)
@@ -20,6 +20,9 @@
 #define NTOS_MODE_USER
 #include <ndk/ntndk.h>
 
+/* ELF Support */
+#include <elf/elf.h>
+
 /* Internal NTDLL */
 #include "ntdllp.h"
 
index 91d9fa2..db477ee 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#define __WINE__
 #include <user32.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "controls.h"
-#include "wine/unicode.h"
-#include "wine/debug.h"
-
-#ifdef __REACTOS__
-HPEN STDCALL GetSysColorPen(int nIndex);
-#endif
 
 /* GetWindowLong offsets for window extra information */
 #define STATE_GWL_OFFSET  0
@@ -126,33 +114,33 @@ const struct builtin_class_descr BUTTON_builtin_class =
 };
 
 
-inline static LONG get_button_state( HWND hwnd )
+__inline static LONG get_button_state( HWND hwnd )
 {
     return GetWindowLongA( hwnd, STATE_GWL_OFFSET );
 }
 
-inline static void set_button_state( HWND hwnd, LONG state )
+__inline static void set_button_state( HWND hwnd, LONG state )
 {
     SetWindowLongA( hwnd, STATE_GWL_OFFSET, state );
 }
 
-inline static HFONT get_button_font( HWND hwnd )
+__inline static HFONT get_button_font( HWND hwnd )
 {
     return (HFONT)GetWindowLongA( hwnd, HFONT_GWL_OFFSET );
 }
 
-inline static void set_button_font( HWND hwnd, HFONT font )
+__inline static void set_button_font( HWND hwnd, HFONT font )
 {
     SetWindowLongA( hwnd, HFONT_GWL_OFFSET, (LONG)font );
 }
 
-inline static UINT get_button_type( LONG window_style )
+__inline static UINT get_button_type( LONG window_style )
 {
     return (window_style & 0x0f);
 }
 
 /* paint a button of any type */
-inline static void paint_button( HWND hwnd, LONG style, UINT action )
+__inline static void paint_button( HWND hwnd, LONG style, UINT action )
 {
     if (btnPaintFunc[style] && IsWindowVisible(hwnd))
     {
@@ -163,7 +151,7 @@ inline static void paint_button( HWND hwnd, LONG style, UINT action )
 }
 
 /* retrieve the button text; returned buffer must be freed by caller */
-inline static WCHAR *get_button_text( HWND hwnd )
+__inline static WCHAR *get_button_text( HWND hwnd )
 {
     INT len = 512;
     WCHAR *buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) );
index fa36659..cb1fc02 100644 (file)
  * FIXME: roll up in Netscape 3.01.
  */
 
-#define __WINE__
 #include <user32.h>
-#include <stdarg.h>
-#include <string.h>
-
 #define NDEBUG
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "controls.h"
-#include "wine/debug.h"
-#include "wine/unicode.h"
+#include <debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(combo);
 
index 97252a3..be0d076 100644 (file)
  *
  */
 
-#define __WINE__
 #include <user32.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include "controls.h"
-#include "wine/unicode.h"
-#include "wine/debug.h"
+#define NDEBUG
+#include <debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(edit);
 WINE_DECLARE_DEBUG_CHANNEL(combo);
@@ -167,10 +162,10 @@ typedef struct
  *     We still like to call them internally
  *     "static inline" makes them more like macro's
  */
-static inline BOOL     EDIT_EM_CanUndo(EDITSTATE *es);
-static inline void     EDIT_EM_EmptyUndoBuffer(EDITSTATE *es);
-static inline void     EDIT_WM_Clear(EDITSTATE *es);
-static inline void     EDIT_WM_Cut(EDITSTATE *es);
+static __inline BOOL   EDIT_EM_CanUndo(EDITSTATE *es);
+static __inline void   EDIT_EM_EmptyUndoBuffer(EDITSTATE *es);
+static __inline void   EDIT_WM_Clear(EDITSTATE *es);
+static __inline void   EDIT_WM_Cut(EDITSTATE *es);
 
 /*
  *     Helper functions only valid for one type of control
@@ -310,7 +305,7 @@ const struct builtin_class_descr EDIT_builtin_class =
  *     EM_CANUNDO
  *
  */
-static inline BOOL EDIT_EM_CanUndo(EDITSTATE *es)
+static __inline BOOL EDIT_EM_CanUndo(EDITSTATE *es)
 {
        return (es->undo_insert_count || strlenW(es->undo_text));
 }
@@ -321,7 +316,7 @@ static inline BOOL EDIT_EM_CanUndo(EDITSTATE *es)
  *     EM_EMPTYUNDOBUFFER
  *
  */
-static inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es)
+static __inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es)
 {
        es->undo_insert_count = 0;
        *es->undo_text = '\0';
@@ -333,7 +328,7 @@ static inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es)
  *     WM_CLEAR
  *
  */
-static inline void EDIT_WM_Clear(EDITSTATE *es)
+static __inline void EDIT_WM_Clear(EDITSTATE *es)
 {
        static const WCHAR empty_stringW[] = {0};
 
@@ -350,7 +345,7 @@ static inline void EDIT_WM_Clear(EDITSTATE *es)
  *     WM_CUT
  *
  */
-static inline void EDIT_WM_Cut(EDITSTATE *es)
+static __inline void EDIT_WM_Cut(EDITSTATE *es)
 {
        EDIT_WM_Copy(es);
        EDIT_WM_Clear(es);
@@ -406,7 +401,7 @@ static HBRUSH EDIT_NotifyCtlColor(EDITSTATE *es, HDC hdc)
        return (HBRUSH)SendMessageW(GetParent(es->hwndSelf), msg, (WPARAM)hdc, (LPARAM)es->hwndSelf);
 }
 
-static inline LRESULT DefWindowProcT(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
+static __inline LRESULT DefWindowProcT(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
 {
        if(unicode)
                return DefWindowProcW(hwnd, msg, wParam, lParam);
index b55d163..a16a74d 100644 (file)
@@ -18,9 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "user32.h"
-#include "controls.h"
-#include "wine/unicode.h"
+#include <user32.h>
 
 #ifdef __REACTOS__
 #define MAKEINTATOMW(atom)  ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))
index 344a335..b0fe49d 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#define __WINE__
 #include <user32.h>
-#include <string.h>
-#include <stdlib.h>
-#include "controls.h"
-#include "wine/debug.h"
+#define NDEBUG
+#include <debug.h>
 
-#ifdef __REACTOS__
-#include "wine/unicode.h"
 /* Start of hack section -------------------------------- */
 
 typedef short *LPINT16;
@@ -42,10 +37,9 @@ BOOL is_old_app(HWND hwnd)
 #define WM_SYSTIMER         280
 
 UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
-WINBOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
+BOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
 
 /* End of hack section -------------------------------- */
-#endif
 
 /* Unimplemented yet:
  * - LBS_USETABSTOPS
index a7c3469..87b6c7a 100644 (file)
@@ -31,7 +31,9 @@
 /* INCLUDES *******************************************************************/
 
 #include <user32.h>
-#include <oleacc.h>
+#define NDEBUG
+#include <debug.h>
+
 
 /* GLOBAL VARIABLES ***********************************************************/
 
@@ -70,7 +72,7 @@ HBRUSH DefWndControlColor(HDC hDC, UINT ctlType);
 static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
 
 UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
-WINBOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
+BOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
 
 /*********************************************************************
  * scrollbar class descriptor
@@ -1272,10 +1274,11 @@ ScrollBarWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
 //              infoPtr->flags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH;
 //              SCROLL_RefreshScrollBar(hwnd, SB_CTL, TRUE, TRUE);
 //            }
+          HDC hdc;
           DbgPrint("ScrollBarWndProc WM_ENABLE\n");
           NtUserEnableScrollBar(Wnd,SB_CTL,(wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH));
           /* Refresh Scrollbars. */          
-          HDC hdc = GetDCEx( Wnd, 0, DCX_CACHE );
+          hdc = GetDCEx( Wnd, 0, DCX_CACHE );
           if (!hdc) return 1;
           IntDrawScrollBar( Wnd, hdc, SB_CTL);
           ReleaseDC( Wnd, hdc );
similarity index 99%
rename from reactos/lib/user32/misc/dde_private.h
rename to reactos/lib/user32/include/dde_private.h
index 802e8ce..ffce901 100644 (file)
@@ -239,7 +239,7 @@ extern      void            WDML_BroadcastDDEWindows(const char* clsName, UINT uMsg,
                                                 WPARAM wParam, LPARAM lParam);
 extern void            WDML_NotifyThreadExit(DWORD tid);
 
-static inline void WDML_ExtractAck(WORD status, DDEACK* da)
+static __inline void WDML_ExtractAck(WORD status, DDEACK* da)
 {
     *da = *((DDEACK*)&status);
 }
diff --git a/reactos/lib/user32/include/debug.h b/reactos/lib/user32/include/debug.h
deleted file mode 100644 (file)
index 92abc6d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS user32.dll
- * FILE:        include/debug.h
- * PURPOSE:     Debugging support macros
- * DEFINES:     DBG     - Enable debug output
- *              NASSERT - Disable assertions
- */
-#ifndef __DEBUG_H
-#define __DEBUG_H
-
-#define NORMAL_MASK    0x000000FF
-#define SPECIAL_MASK   0xFFFFFF00
-#define MIN_TRACE      0x00000001
-#define MID_TRACE      0x00000002
-#define MAX_TRACE      0x00000003
-
-#define DEBUG_CHECK    0x00000100
-#define DEBUG_OBJECT   0x00000200
-#define DEBUG_WINDOW   0x00000400
-#define DEBUG_ULTRA    0xFFFFFFFF
-
-#ifdef ASSERT
-#undef ASSERT
-#endif
-
-#ifdef DBG
-
-extern DWORD DebugTraceLevel;
-
-#define D(_t_, _x_) \
-    if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
-        ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
-        DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \
-                   DbgPrint _x_; \
-    }
-
-#ifdef NASSERT
-#define ASSERT(x)
-#else /* NASSERT */
-#define ASSERT(x) if (!(x)) { D(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); }
-#endif /* NASSERT */
-
-#define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
-
-#else /* DBG */
-
-#define D(_t_, _x_)
-
-#define ASSERT_IRQL(x)
-#define ASSERT(x)
-
-#endif /* DBG */
-
-#ifdef assert
-#undef assert
-#endif
-#define assert(x) ASSERT(x)
-#define assert_irql(x) ASSERT_IRQL(x)
-
-
-#define UNIMPLEMENTED \
-    D(MIN_TRACE, ("is unimplemented, please try again later.\n"));
-
-#define CHECKPOINT \
-    D(DEBUG_CHECK, ("\n"));
-
-#define DPRINT(X...) D(DEBUG_CHECK, (X))
-
-#define CP CHECKPOINT
-
-#endif /* __DEBUG_H */
-
-/* EOF */
index 69fb884..f7d7a66 100644 (file)
@@ -8,17 +8,17 @@
 
 /* INCLUDES ******************************************************************/
 
-#ifndef USER32_H
-#define USER32_H
-
 /* C Headers */
 #include <stdio.h>
-#include <ctype.h>
+#include <math.h>
 
 /* SDK/NDK Headers */
+#define _USER32_
+#define OEMRESOURCE
+#define NTOS_MODE_USER
 #include <windows.h>
 #include <windowsx.h>
-#define NTOS_MODE_USER
+#include <winnls32.h>
 #include <ndk/ntndk.h>
 
 /* CSRSS Headers */
 #include <win32k/menu.h>
 #include <win32k/paint.h>
 
+/* WINE Headers */
+#include <wine/debug.h>
+#include <wine/unicode.h>
+
 /* Internal User32 Headers */
 #include "user32p.h"
 
 /* FIXME: FILIP */
 HGDIOBJ STDCALL  NtGdiSelectObject(HDC  hDC, HGDIOBJ  hGDIObj);
 DWORD STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, DWORD *);
-
-#endif /* USER32_H */
index a3e3da4..c981b3f 100644 (file)
 /* Private User32 Headers */
 #include "accel.h"
 #include "cursor.h"
-#ifndef __WINE__
-#include "debug.h"
-#endif
+#include "controls.h"
 #include "draw.h"
+#include "dde_private.h"
 #include "menu.h"
 #include "message.h"
 #include "regcontrol.h"
index 75f4895..9b0ad1b 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "wine/config.h"
-#include "wine/port.h"
-
-#include <string.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winerror.h"
-#include "dde.h"
-#include "ddeml.h"
-#include "wine/debug.h"
-#include "dde_private.h"
+#include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(ddeml);
 
index 0274d5c..5a48e00 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <stdarg.h>
-#include <string.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winerror.h"
-#include "winnls.h"
-#include "dde.h"
-#include "ddeml.h"
-#include "wine/debug.h"
-#include "dde_private.h"
+#include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(ddeml);
 
index 8e3a28a..9f57ab2 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <stdarg.h>
-#include <string.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winerror.h"
-#include "dde.h"
-#include "ddeml.h"
-#include "wine/debug.h"
-#include "dde_private.h"
+#include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(ddeml);
 
index d63260a..00d26bf 100644 (file)
@@ -29,6 +29,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 #define SIZEOF_DEVMODEA_300 124
 #define SIZEOF_DEVMODEA_400 148
index d527a57..b32f9f3 100644 (file)
@@ -1,17 +1,12 @@
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* FIXME: Belongs to some header. */
-WINBOOL STDCALL GdiDllInitialize(HANDLE, DWORD, LPVOID);
+BOOL STDCALL GdiDllInitialize(HANDLE, DWORD, LPVOID);
 void InitStockObjects(void);
 VOID DeleteFrameBrushes(VOID);
 
-#ifdef DBG
-
-/* See debug.h for debug/trace constants */
-DWORD DebugTraceLevel = MIN_TRACE;
-
-#endif /* DBG */
-
 extern CRITICAL_SECTION gcsMPH;
 static ULONG User32TlsIndex;
 HINSTANCE User32Instance;
index 61ef35b..b0a69af 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>    /* abs() */
-#include <stddef.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-//#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "wine/unicode.h"
-#include "wine/debug.h"
+#include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* Start of Hack section */
 
index a2d7287..75162d3 100644 (file)
@@ -29,6 +29,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* FUNCTIONS *****************************************************************/
 
index f4b2c41..9886e46 100644 (file)
@@ -11,9 +11,8 @@
  */
 
 #include <user32.h>
-#ifdef __USE_W32API
-typedef PVOID LPIMEPROW, LPIMEPROA;
-#endif
+#define NDEBUG
+#include <debug.h>
 
 /*
  * @unimplemented
index 6be2803..121a280 100644 (file)
@@ -667,6 +667,9 @@ LoadBitmapW(HINSTANCE hInstance, LPCWSTR lpBitmapName)
 HANDLE WINAPI
 CopyImage(HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags)
 {
+    HBITMAP res;
+    BITMAP bm;
+
        switch (type)
        {
         case IMAGE_BITMAP:
@@ -675,8 +678,6 @@ CopyImage(HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags)
                        /* FIXME:  support flags LR_COPYDELETEORG, LR_COPYFROMRESOURCE,
                                                                 LR_COPYRETURNORG, LR_CREATEDIBSECTION,
                                                                 and LR_MONOCHROME; */
-                               HBITMAP res;
-                               BITMAP bm;
 
                                if (!GetObjectW(hnd, sizeof(bm), &bm)) return 0;
                                bm.bmBits = NULL;
index ec1d007..6c7b61b 100644 (file)
@@ -29,6 +29,9 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
+
 
 /* FUNCTIONS *****************************************************************/
 
index 4887c39..a8814a2 100644 (file)
@@ -29,6 +29,9 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
+
 #undef CopyCursor
 
 HBITMAP
index 784be58..79651e1 100644 (file)
@@ -12,6 +12,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 #ifndef WM_SETVISIBLE
 #define WM_SETVISIBLE 9
@@ -369,6 +371,7 @@ UserDrawWindowFrame(HDC hdc, const RECT *rect,
                    ULONG width, ULONG height)
 {
   static HBRUSH hDraggingRectBrush = NULL;
+  HBRUSH hbrush;
 
   if(!hDraggingRectBrush)
   {
@@ -379,7 +382,7 @@ UserDrawWindowFrame(HDC hdc, const RECT *rect,
     hDraggingRectBrush = CreatePatternBrush(hDraggingPattern);
   }
 
-  HBRUSH hbrush = SelectObject( hdc, hDraggingRectBrush );
+  hbrush = SelectObject( hdc, hDraggingRectBrush );
   PatBlt( hdc, rect->left, rect->top,
          rect->right - rect->left - width, height, PATINVERT );
   PatBlt( hdc, rect->left, rect->top + height, width,
index b61d492..1c29f0c 100644 (file)
@@ -32,6 +32,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* MACROS/DEFINITIONS ********************************************************/
 
@@ -1864,7 +1866,7 @@ GetDlgItem(
     GETDLGITEMINFO info;
     info.nIDDlgItem = nIDDlgItem;
     info.control = 0;
-    if(hDlg && !EnumChildWindows(hDlg, (ENUMWINDOWSPROC)&GetDlgItemEnumProc, (LPARAM)&info))
+    if(hDlg && !EnumChildWindows(hDlg, (WNDENUMPROC)&GetDlgItemEnumProc, (LPARAM)&info))
         return info.control;
     else
         return 0;
index ac690cb..8764243 100644 (file)
@@ -29,6 +29,8 @@
 /* INCLUDES *******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* GLOBALS *******************************************************************/
 
index d0f5bef..6d41852 100644 (file)
@@ -29,6 +29,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* FUNCTIONS *****************************************************************/
 
index 5d56b2d..aaf29cf 100644 (file)
@@ -29,6 +29,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* FUNCTIONS *****************************************************************/
 
index eb82e4b..03ce2f0 100644 (file)
@@ -29,6 +29,9 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
+
 
 /* FUNCTIONS *****************************************************************/
 
index c2933a6..cc98f20 100644 (file)
@@ -29,6 +29,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* GLOBALS *******************************************************************/
 
index 0f10e6e..9fb4524 100644 (file)
  *
  */
 
-#define __WINE__
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "wine/unicode.h"
-#include "user32.h"
-#include <winnls.h>
-#include "wine/debug.h"
-#include "dlgs.h"
+#include <user32.h>
+#define NDEBUG
+#include <debug.h>
+
 
 WINE_DEFAULT_DEBUG_CHANNEL(mdi);
 
@@ -208,7 +195,7 @@ static HWND MDI_GetChildByID(HWND hwnd, UINT id)
 {
 #ifdef __REACTOS__
     DWORD Control = id;
-    if (hwnd && !EnumChildWindows(hwnd, (ENUMWINDOWSPROC)&MDI_GetChildByID_EnumProc, (LPARAM)&Control))
+    if (hwnd && !EnumChildWindows(hwnd, (WNDENUMPROC)&MDI_GetChildByID_EnumProc, (LPARAM)&Control))
     {
         return (HWND)Control;
     }
index 7afb063..bc70301 100644 (file)
@@ -34,7 +34,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
-#include "../controls/controls.h"
+#define NDEBUG
+#include <debug.h>
 
 /* internal popup menu window messages */
 #define MM_SETMENUHANDLE (WM_USER + 0)
index 264b015..591ef21 100644 (file)
@@ -9,6 +9,8 @@
  */
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* DDE message exchange
  *
index 4ecde50..a98c2de 100644 (file)
@@ -32,6 +32,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 /* DEFINES *******************************************************************/
 
@@ -82,13 +84,6 @@ typedef struct _MSGBOXINFO {
 
 /* INTERNAL FUNCTIONS ********************************************************/
 
-static inline unsigned int strlenW( const WCHAR *str )
-{
-    const WCHAR *s = str;
-    while (*s) s++;
-    return s - str;
-}
-
 static INT_PTR CALLBACK MessageBoxProc( HWND hwnd, UINT message,
                                         WPARAM wParam, LPARAM lParam )
 {
index 848f481..bd613a2 100644 (file)
@@ -31,6 +31,8 @@ Already defined in makefile now.
 */
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 #define HAS_DLGFRAME(Style, ExStyle) \
             (((ExStyle) & WS_EX_DLGMODALFRAME) || \
index b32e7b5..46fc1b6 100644 (file)
@@ -29,6 +29,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 static HBRUSH FrameBrushes[13];
 static HBITMAP hHatch;
index 55c63f1..acc7a36 100644 (file)
@@ -12,6 +12,8 @@
 /* INCLUDES ******************************************************************/
 
 #include <user32.h>
+#define NDEBUG
+#include <debug.h>
 
 BOOL ControlsInitialized = FALSE;
 
@@ -383,7 +385,7 @@ STATIC
 User32EnumWindows (
        HDESK hDesktop,
        HWND hWndparent,
-       ENUMWINDOWSPROC lpfn,
+       WNDENUMPROC lpfn,
        LPARAM lParam,
        DWORD dwThreadId,
        BOOL bChildren )
@@ -457,7 +459,7 @@ BOOL
 STDCALL
 EnumChildWindows(
        HWND hWndParent,
-       ENUMWINDOWSPROC lpEnumFunc,
+       WNDENUMPROC lpEnumFunc,
        LPARAM lParam)
 {
   if ( !hWndParent )
@@ -472,7 +474,7 @@ EnumChildWindows(
 BOOL
 STDCALL
 EnumThreadWindows(DWORD dwThreadId,
-                 ENUMWINDOWSPROC lpfn,
+                 WNDENUMPROC lpfn,
                  LPARAM lParam)
 {
   if ( !dwThreadId )
@@ -485,7 +487,7 @@ EnumThreadWindows(DWORD dwThreadId,
  * @implemented
  */
 BOOL STDCALL
-EnumWindows(ENUMWINDOWSPROC lpEnumFunc,
+EnumWindows(WNDENUMPROC lpEnumFunc,
            LPARAM lParam)
 {
   return User32EnumWindows ( NULL, NULL, lpEnumFunc, lParam, 0, FALSE );
@@ -499,7 +501,7 @@ BOOL
 STDCALL
 EnumDesktopWindows(
        HDESK hDesktop,
-       ENUMWINDOWSPROC lpfn,
+       WNDENUMPROC lpfn,
        LPARAM lParam)
 {
   return User32EnumWindows ( hDesktop, NULL, lpfn, lParam, 0, FALSE );
diff --git a/reactos/w32api/include/winnls32.h b/reactos/w32api/include/winnls32.h
new file mode 100644 (file)
index 0000000..83f3df3
--- /dev/null
@@ -0,0 +1,74 @@
+#ifndef _WINNLS32_\r
+#define _WINNLS32_\r
+\r
+#if __GNUC__ >=3\r
+#pragma GCC system_header\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+typedef struct _tagDATETIME\r
+{\r
+    WORD year;\r
+    WORD month;\r
+    WORD day;\r
+    WORD hour;\r
+    WORD min;\r
+    WORD sec;\r
+} DATETIME;\r
+\r
+typedef struct _tagIMEPROA\r
+{\r
+    HWND hWnd;\r
+    DATETIME InstDate;\r
+    UINT wVersion;\r
+    BYTE szDescription[50];\r
+    BYTE szName[80];\r
+    BYTE szOptions[30];\r
+} IMEPROA,*PIMEPROA,NEAR *NPIMEPROA,FAR *LPIMEPROA;\r
+\r
+typedef struct _tagIMEPROW\r
+{\r
+    HWND hWnd;\r
+    DATETIME InstDate;\r
+    UINT wVersion;\r
+    WCHAR szDescription[50];\r
+    WCHAR szName[80];\r
+    WCHAR szOptions[30];\r
+} IMEPROW,*PIMEPROW,NEAR *NPIMEPROW,FAR *LPIMEPROW;\r
+\r
+#ifdef UNICODE\r
+typedef IMEPROW IMEPRO;\r
+typedef PIMEPROW PIMEPRO;\r
+typedef NPIMEPROW NPIMEPRO;\r
+typedef LPIMEPROW LPIMEPRO;\r
+#define IMPGetIME IMPGetIMEW\r
+#define IMPQueryIME IMPQueryIMEW\r
+#define IMPSetIME IMPSetIMEW\r
+#else\r
+typedef IMEPROA IMEPRO;\r
+typedef PIMEPROA PIMEPRO;\r
+typedef NPIMEPROA NPIMEPRO;\r
+typedef LPIMEPROA LPIMEPRO;\r
+#define IMPGetIME IMPGetIMEA\r
+#define IMPQueryIME IMPQueryIMEA\r
+#define IMPSetIME IMPSetIMEA\r
+#endif\r
+\r
+BOOL WINAPI IMPGetIMEA(HWND, LPIMEPROA);\r
+BOOL WINAPI IMPGetIMEW(HWND, LPIMEPROW);\r
+BOOL WINAPI IMPQueryIMEA(LPIMEPROA);\r
+BOOL WINAPI IMPQueryIMEW(LPIMEPROW);\r
+BOOL WINAPI IMPSetIMEA(HWND, LPIMEPROA);\r
+BOOL WINAPI IMPSetIMEW(HWND, LPIMEPROW);\r
+UINT WINAPI WINNLSGetIMEHotkey(HWND);\r
+BOOL WINAPI WINNLSEnableIME(HWND, BOOL);\r
+BOOL WINAPI WINNLSGetEnableStatus(HWND);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* _USERENV_H */\r
index fbd6545..686d2ff 100644 (file)
@@ -2459,7 +2459,6 @@ typedef int(CALLBACK *EDITWORDBREAKPROCW)(LPWSTR,int,int,int);
 typedef LRESULT(CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM);
 typedef BOOL(CALLBACK *DRAWSTATEPROC)(HDC,LPARAM,WPARAM,int,int);
 typedef BOOL(CALLBACK *WNDENUMPROC)(HWND,LPARAM);
-typedef BOOL(CALLBACK *ENUMWINDOWSPROC)(HWND,LPARAM);
 typedef BOOL(CALLBACK* MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM);
 typedef BOOL(CALLBACK *NAMEENUMPROCA)(LPSTR,LPARAM);
 typedef BOOL(CALLBACK *NAMEENUMPROCW)(LPWSTR,LPARAM);
@@ -3485,11 +3484,11 @@ BOOL WINAPI EndPaint(HWND,const PAINTSTRUCT*);
 #if (_WIN32_WINNT >= 0x0500)
 BOOL WINAPI EndTask(HWND,BOOL,BOOL);
 #endif
-BOOL WINAPI EnumChildWindows(HWND,ENUMWINDOWSPROC,LPARAM);
+BOOL WINAPI EnumChildWindows(HWND,WNDENUMPROC,LPARAM);
 UINT WINAPI EnumClipboardFormats(UINT);
 BOOL WINAPI EnumDesktopsA(HWINSTA,DESKTOPENUMPROCA,LPARAM);
 BOOL WINAPI EnumDesktopsW(HWINSTA,DESKTOPENUMPROCW,LPARAM);
-BOOL WINAPI EnumDesktopWindows(HDESK,ENUMWINDOWSPROC,LPARAM);
+BOOL WINAPI EnumDesktopWindows(HDESK,WNDENUMPROC,LPARAM);
 BOOL WINAPI EnumDisplayMonitors(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
 #ifndef NOGDI
 BOOL WINAPI EnumDisplaySettingsA(LPCSTR,DWORD,PDEVMODEA);