diff --git a/reactos/include/wine/debug.h b/reactos/include/wine/debug.h index 51f24ab834f..047635334bb 100644 --- a/reactos/include/wine/debug.h +++ b/reactos/include/wine/debug.h @@ -3,6 +3,7 @@ #include "../roscfg.h" #include +#include #include #ifndef __GNUC__ @@ -19,11 +20,7 @@ unsigned long DbgPrint(char *Format,...); #endif #if !defined(DBG) || !defined(YDEBUG) -#ifdef __GNUC__ -#define DPRINT(args...) -#else -#define DPRINT -#endif +#define DPRINT(...) do { DbgPrint(__VA_ARGS__); } while(0) #else #define DPRINT DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint #endif @@ -52,6 +49,24 @@ inline static const char *debugstr_w( const wchar_t *s ) { return wine_dbgstr_wn inline static const char *debugres_a( const char *s ) { return wine_dbgstr_an( s, 80 ); } inline static const char *debugres_w( const wchar_t *s ) { return wine_dbgstr_wn( s, 80 ); } +static inline const char *wine_dbgstr_point( const POINT *pt ) +{ + if (!pt) return "(null)"; + return wine_dbg_sprintf( "(%ld,%ld)", pt->x, pt->y ); +} + +static inline const char *wine_dbgstr_size( const SIZE *size ) +{ + if (!size) return "(null)"; + return wine_dbg_sprintf( "(%ld,%ld)", size->cx, size->cy ); +} + +static inline const char *wine_dbgstr_rect( const RECT *rect ) +{ + if (!rect) return "(null)"; + return wine_dbg_sprintf( "(%ld,%ld)-(%ld,%ld)", rect->left, rect->top, rect->right, rect->bottom ); +} + #define TRACE DPRINT #define TRACE_(ch) DPRINT #ifdef NDEBUG diff --git a/reactos/lib/dbghelp/stack.c b/reactos/lib/dbghelp/stack.c index 61227156b53..5d7e2ec2dcf 100644 --- a/reactos/lib/dbghelp/stack.c +++ b/reactos/lib/dbghelp/stack.c @@ -39,7 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); enum st_mode {stm_start, stm_32bit, stm_16bit, stm_done}; -#if 0 static const char* wine_dbgstr_addr(const ADDRESS* addr) { if (!addr) return "(null)"; @@ -57,7 +56,6 @@ static const char* wine_dbgstr_addr(const ADDRESS* addr) return "unknown"; } } -#endif /* indexes in Reserved array */ #define __CurrentMode 0 diff --git a/reactos/lib/kernel32/misc/lcformat.c b/reactos/lib/kernel32/misc/lcformat.c index 67cc535b0e2..997b7d5be2a 100644 --- a/reactos/lib/kernel32/misc/lcformat.c +++ b/reactos/lib/kernel32/misc/lcformat.c @@ -33,9 +33,8 @@ #include #include "wine/config.h" -//#include "wine/port.h" -#include "wine/debug.h" #include "wine/unicode.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(nls); @@ -140,7 +139,7 @@ static WCHAR* NLS_GetLocaleString(LCID lcid, DWORD dwFlags) TRACE( #type ": %ld (%08lx)\n", (DWORD)num, (DWORD)num) #define GET_LOCALE_STRING(str, type) str = NLS_GetLocaleString(lcid, type|dwFlags); \ - TRACE( #type ": '%s'\n", debugstr_w(str)) + TRACE( #type ": '%S'\n", (str)) /************************************************************************** * NLS_GetFormats @@ -654,7 +653,7 @@ NLS_GetDateTimeFormatW_InvalidFlags: } cchWritten++; /* Include terminating NUL */ - TRACE("returning length=%d, ouput='%s'\n", cchWritten, debugstr_w(lpStr)); + TRACE("returning length=%d, ouput='%S'\n", cchWritten, lpStr); return cchWritten; NLS_GetDateTimeFormatW_Overrun: @@ -677,7 +676,7 @@ static INT NLS_GetDateTimeFormatA(LCID lcid, DWORD dwFlags, INT iRet; TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime, - debugstr_a(lpFormat), lpStr, cchOut); + lpFormat, lpStr, cchOut); if (NLS_IsUnicodeOnlyLcid(lcid)) { @@ -762,7 +761,7 @@ INT WINAPI GetDateFormatA( LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut) { TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime, - debugstr_a(lpFormat), lpDateStr, cchOut); + lpFormat, lpDateStr, cchOut); return NLS_GetDateTimeFormatA(lcid, dwFlags | DATE_DATEVARSONLY, lpTime, lpFormat, lpDateStr, cchOut); @@ -777,8 +776,8 @@ INT WINAPI GetDateFormatA( LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut) { - TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime, - debugstr_w(lpFormat), lpDateStr, cchOut); + TRACE("(0x%04lx,0x%08lx,%p,%S,%p,%d)\n", lcid, dwFlags, lpTime, + lpFormat, lpDateStr, cchOut); return NLS_GetDateTimeFormatW(lcid, dwFlags|DATE_DATEVARSONLY, lpTime, lpFormat, lpDateStr, cchOut); @@ -829,7 +828,7 @@ INT WINAPI GetTimeFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, LPCSTR lpFormat, LPSTR lpTimeStr, INT cchOut) { TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime, - debugstr_a(lpFormat), lpTimeStr, cchOut); + lpFormat, lpTimeStr, cchOut); return NLS_GetDateTimeFormatA(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime, lpFormat, lpTimeStr, cchOut); @@ -843,8 +842,8 @@ INT WINAPI GetTimeFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut) { - TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime, - debugstr_w(lpFormat), lpTimeStr, cchOut); + TRACE("(0x%04lx,0x%08lx,%p,%S,%p,%d)\n",lcid, dwFlags, lpTime, + lpFormat, lpTimeStr, cchOut); return NLS_GetDateTimeFormatW(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime, lpFormat, lpTimeStr, cchOut); @@ -887,7 +886,7 @@ INT WINAPI GetNumberFormatA(LCID lcid, DWORD dwFlags, const NUMBERFMTW *pfmt = NULL; INT iRet; - TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_a(lpszValue), + TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpNumberStr, cchOut); if (NLS_IsUnicodeOnlyLcid(lcid)) @@ -966,7 +965,7 @@ INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags, DWORD dwState = 0, dwDecimals = 0, dwGroupCount = 0, dwCurrentGroupCount = 0; INT iRet; - TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue), + TRACE("(0x%04lx,0x%08lx,%S,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpNumberStr, cchOut); if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpNumberStr) || @@ -1227,7 +1226,7 @@ INT WINAPI GetCurrencyFormatA(LCID lcid, DWORD dwFlags, const CURRENCYFMTW *pfmt = NULL; INT iRet; - TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_a(lpszValue), + TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpCurrencyStr, cchOut); if (NLS_IsUnicodeOnlyLcid(lcid)) @@ -1332,7 +1331,7 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags, DWORD dwState = 0, dwDecimals = 0, dwGroupCount = 0, dwCurrentGroupCount = 0, dwFmt; INT iRet; - TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue), + TRACE("(0x%04lx,0x%08lx,%S,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpCurrencyStr, cchOut); if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpCurrencyStr) || diff --git a/reactos/lib/msvideo/msvfw32.xml b/reactos/lib/msvideo/msvfw32.xml index 741d2f87659..3dea81cefa6 100644 --- a/reactos/lib/msvideo/msvfw32.xml +++ b/reactos/lib/msvideo/msvfw32.xml @@ -13,6 +13,7 @@ comctl32 kernel32 ntdll + wine drawdib.c mciwnd.c msvfw32.rc diff --git a/reactos/lib/shell32/shellord.c b/reactos/lib/shell32/shellord.c index ae1411b90ba..36dd3e0c56a 100644 --- a/reactos/lib/shell32/shellord.c +++ b/reactos/lib/shell32/shellord.c @@ -965,8 +965,8 @@ HRESULT WINAPI SHCreateShellFolderViewEx( IShellView * psf; HRESULT hRes; - TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n", - psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback, + TRACE("sf=%p cb=%p mode=0x%08x parm=%p\n", + psvcbi->pshf, psvcbi->pfnCallback, psvcbi->fvm, psvcbi->psvOuter); psf = IShellView_Constructor(psvcbi->pshf); diff --git a/reactos/lib/user32/controls/combo.c b/reactos/lib/user32/controls/combo.c index 6b19500745a..fa36659d890 100644 --- a/reactos/lib/user32/controls/combo.c +++ b/reactos/lib/user32/controls/combo.c @@ -1829,8 +1829,8 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message, { LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwnd, 0 ); - TRACE("[%p]: msg %s wp %08x lp %08lx\n", - hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam ); + //TRACE("[%p]: msg %s wp %08x lp %08lx\n", + // hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam ); if( lphc || message == WM_NCCREATE ) switch(message) diff --git a/reactos/lib/user32/controls/edit.c b/reactos/lib/user32/controls/edit.c index fbf10b0e81c..97252a3b458 100644 --- a/reactos/lib/user32/controls/edit.c +++ b/reactos/lib/user32/controls/edit.c @@ -433,7 +433,7 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, EDITSTATE *es = (EDITSTATE *)GetWindowLongW( hwnd, 0 ); LRESULT result = 0; - TRACE("hwnd=%p msg=%x (%s) wparam=%x lparam=%lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), wParam, lParam); + //TRACE("hwnd=%p msg=%x (%s) wparam=%x lparam=%lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), wParam, lParam); if (!es && msg != WM_NCCREATE) return DefWindowProcT(hwnd, msg, wParam, lParam, unicode); diff --git a/reactos/lib/user32/controls/listbox.c b/reactos/lib/user32/controls/listbox.c index ee260a93d9b..344a3353e7d 100644 --- a/reactos/lib/user32/controls/listbox.c +++ b/reactos/lib/user32/controls/listbox.c @@ -2565,8 +2565,8 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg, DefWindowProcA( hwnd, msg, wParam, lParam ); } - TRACE("[%p]: msg %s wp %08x lp %08lx\n", - hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); + //TRACE("[%p]: msg %s wp %08x lp %08lx\n", + // hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); switch(msg) { #ifndef __REACTOS__ @@ -3206,8 +3206,8 @@ static LRESULT WINAPI ComboLBWndProc_common( HWND hwnd, UINT msg, DefWindowProcA( hwnd, msg, wParam, lParam ); } - TRACE_(combo)("[%p]: msg %s wp %08x lp %08lx\n", - hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); + //TRACE_(combo)("[%p]: msg %s wp %08x lp %08lx\n", + // hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); if ((lphc = descr->lphc) != NULL) {