More fixes to compile under Visual C++
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404223
This commit is contained in:
parent
ccfc72055c
commit
224c8b5bec
6 changed files with 52 additions and 14 deletions
|
@ -242,7 +242,7 @@ int SDL_ATvassert( int condition, const char *msg, ... )
|
|||
if (!condition) {
|
||||
/* Get message. */
|
||||
va_start( args, msg );
|
||||
vsnprintf( buf, sizeof(buf), msg, args );
|
||||
SDL_vsnprintf( buf, sizeof(buf), msg, args );
|
||||
va_end( args );
|
||||
/* Failed message. */
|
||||
SDL_ATassertFailed( buf );
|
||||
|
@ -281,6 +281,31 @@ int SDL_ATprintErr( const char *msg, ... )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Displays a message.
|
||||
*/
|
||||
int SDL_ATprint( const char *msg, ... )
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Only print if not quiet. */
|
||||
if (at_quiet)
|
||||
return 0;
|
||||
|
||||
/* Make sure there is something to print. */
|
||||
if (msg == NULL)
|
||||
return 0;
|
||||
else {
|
||||
va_start(ap, msg);
|
||||
ret = vfprintf( stdout, msg, ap );
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Displays a verbose message.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue