mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
add __FUNCTION__ to assert macro
This commit is contained in:
parent
9c06582029
commit
fbe6da0ecd
2 changed files with 5 additions and 5 deletions
|
@ -575,11 +575,11 @@ palm_warnf( char* format, ... )
|
||||||
} /* palm_warnf */
|
} /* palm_warnf */
|
||||||
|
|
||||||
void
|
void
|
||||||
palm_assert( Boolean b, int line, char* fileName )
|
palm_assert( Boolean b, int line, const char* func, const char* file )
|
||||||
{
|
{
|
||||||
if ( !b ) {
|
if ( !b ) {
|
||||||
XP_LOGF( "ASSERTION FAILED: line %d in %s", line, fileName );
|
XP_LOGF( "ASSERTION FAILED: line %d, %s(), %s", line, func, file );
|
||||||
XP_WARNF( "ASSERTION FAILED: line %d in %s", line, fileName );
|
XP_WARNF( "ASSERTION FAILED: line %d, %s(), %s", line, func, file );
|
||||||
}
|
}
|
||||||
} /* palmassert */
|
} /* palmassert */
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ typedef XP_U32 XP_Time;
|
||||||
|
|
||||||
void palm_debugf(char*, ...);
|
void palm_debugf(char*, ...);
|
||||||
void p_ignore(char*, ...);
|
void p_ignore(char*, ...);
|
||||||
void palm_assert(Boolean b, int line, char* fileName );
|
void palm_assert(Boolean b, int line, const char* func, const char* file );
|
||||||
void palm_warnf( char* format, ... );
|
void palm_warnf( char* format, ... );
|
||||||
void palm_logf( char* format, ... );
|
void palm_logf( char* format, ... );
|
||||||
XP_U16 palm_snprintf( XP_UCHAR* buf, XP_U16 len, XP_UCHAR* format, ... );
|
XP_U16 palm_snprintf( XP_UCHAR* buf, XP_U16 len, XP_UCHAR* format, ... );
|
||||||
|
@ -84,7 +84,7 @@ XP_U8* palm_realloc(XP_U8* in, XP_U16 size);
|
||||||
#define XP_ABS(a) ((a)>=0?(a):-(a))
|
#define XP_ABS(a) ((a)>=0?(a):-(a))
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define XP_ASSERT(b) palm_assert(b, __LINE__, __FILE__)
|
#define XP_ASSERT(b) palm_assert(b, __LINE__, __FUNCTION__, __FILE__)
|
||||||
#else
|
#else
|
||||||
#define XP_ASSERT(b)
|
#define XP_ASSERT(b)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue