diff test/automated/SDL_at.c @ 3482:78db4f7ae2f3

More fixes to compile under Visual C++
author Sam Lantinga <slouken@libsdl.org>
date Sun, 22 Nov 2009 07:00:26 +0000
parents 06c66b8d5033
children
line wrap: on
line diff
--- a/test/automated/SDL_at.c	Sun Nov 22 06:42:58 2009 +0000
+++ b/test/automated/SDL_at.c	Sun Nov 22 07:00:26 2009 +0000
@@ -242,7 +242,7 @@
    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 );
@@ -282,6 +282,31 @@
 
 
 /**
+ * @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.
  */
 int SDL_ATprintVerbose( int level, const char *msg, ... )