mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Expand the wine debug macros in all cases. the actual code will get optimized away, but the variables will appear in use. removes about 100-150 warnings. also fix hidden build breakages when the macros are actually used. thanks to art
svn path=/trunk/; revision=16549
This commit is contained in:
parent
c01f0050df
commit
c855fc1edb
8 changed files with 44 additions and 31 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "../roscfg.h"
|
||||
#include <stdarg.h>
|
||||
#include <windows.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -33,9 +33,8 @@
|
|||
#include <k32.h>
|
||||
|
||||
#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 <internal>
|
||||
|
@ -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) ||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<library>comctl32</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<library>wine</library>
|
||||
<file>drawdib.c</file>
|
||||
<file>mciwnd.c</file>
|
||||
<file>msvfw32.rc</file>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue