Mercurial > sdl-ios-xcode
changeset 3748:9428ae743878 gsoc2009_unit_tests
Have SDL_ATprint just call SDL_ATprintVerbose.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Tue, 04 Aug 2009 17:53:20 +0000 |
parents | f7a3a47e6b50 |
children | 1e277c40babe |
files | test/automated/SDL_at.c test/automated/SDL_at.h |
diffstat | 2 files changed, 8 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/test/automated/SDL_at.c Tue Aug 04 16:39:15 2009 +0000 +++ b/test/automated/SDL_at.c Tue Aug 04 17:53:20 2009 +0000 @@ -262,31 +262,6 @@ /** - * @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, ... )
--- a/test/automated/SDL_at.h Tue Aug 04 16:39:15 2009 +0000 +++ b/test/automated/SDL_at.h Tue Aug 04 17:53:20 2009 +0000 @@ -127,10 +127,17 @@ * @param msg printf formatted string to display. * @return Number of character printed. */ -int SDL_ATprint( const char *msg, ... ); +#define SDL_ATprint(msg, args...) \ + SDL_ATprintVerbose( 0, msg, ## args) /** * @brief Prints some verbose text. * + * Verbosity levels are as follows: + * + * - 0 standard stdout, enabled by default + * - 1 additional information + * - 2 detailed information (spammy) + * * @param level Level of verbosity to print at. * @param msg printf formatted string to display. * @return Number of character printed.