src/test/SDL_test_log.c
changeset 7191 75360622e65f
parent 6885 700f1b25f77f
child 7405 5a9172b56b18
     1.1 --- a/src/test/SDL_test_log.c	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/test/SDL_test_log.c	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -21,11 +21,11 @@
     1.4  
     1.5  /*
     1.6  
     1.7 - Used by the test framework and test cases. 
     1.8 + Used by the test framework and test cases.
     1.9  
    1.10  */
    1.11  
    1.12 -// quiet windows compiler warnings
    1.13 +/* quiet windows compiler warnings */
    1.14  #define _CRT_SECURE_NO_WARNINGS
    1.15  
    1.16  #include "SDL_config.h"
    1.17 @@ -50,18 +50,18 @@
    1.18   *
    1.19   * \return Ascii representation of the timestamp in localtime in the format '08/23/01 14:55:02'
    1.20   */
    1.21 -char *SDLTest_TimestampToString(const time_t timestamp) 
    1.22 +char *SDLTest_TimestampToString(const time_t timestamp)
    1.23  {
    1.24 -	time_t copy;
    1.25 -	static char buffer[64];
    1.26 -	struct tm *local;
    1.27 +    time_t copy;
    1.28 +    static char buffer[64];
    1.29 +    struct tm *local;
    1.30  
    1.31 -	SDL_memset(buffer, 0, sizeof(buffer));\
    1.32 -	copy = timestamp;
    1.33 -	local = localtime(&copy);
    1.34 -	strftime(buffer, sizeof(buffer), "%x %X", local);
    1.35 +    SDL_memset(buffer, 0, sizeof(buffer));\
    1.36 +    copy = timestamp;
    1.37 +    local = localtime(&copy);
    1.38 +    strftime(buffer, sizeof(buffer), "%x %X", local);
    1.39  
    1.40 -	return buffer;
    1.41 +    return buffer;
    1.42  }
    1.43  
    1.44  /*
    1.45 @@ -69,17 +69,17 @@
    1.46   */
    1.47  void SDLTest_Log(const char *fmt, ...)
    1.48  {
    1.49 -	va_list list;
    1.50 -	char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
    1.51 +    va_list list;
    1.52 +    char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
    1.53  
    1.54 -	// Print log message into a buffer
    1.55 -	SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
    1.56 -	va_start(list, fmt);
    1.57 -	SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
    1.58 -	va_end(list);
    1.59 +    /* Print log message into a buffer */
    1.60 +    SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
    1.61 +    va_start(list, fmt);
    1.62 +    SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
    1.63 +    va_end(list);
    1.64  
    1.65 -	// Log with timestamp and newline
    1.66 -	SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(0)), logMessage);
    1.67 +    /* Log with timestamp and newline */
    1.68 +    SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(0)), logMessage);
    1.69  }
    1.70  
    1.71  /*
    1.72 @@ -87,15 +87,15 @@
    1.73   */
    1.74  void SDLTest_LogError(const char *fmt, ...)
    1.75  {
    1.76 -	va_list list;
    1.77 -	char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
    1.78 +    va_list list;
    1.79 +    char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
    1.80  
    1.81 -	// Print log message into a buffer
    1.82 -	SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
    1.83 -	va_start(list, fmt);
    1.84 -	SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
    1.85 -	va_end(list);
    1.86 +    /* Print log message into a buffer */
    1.87 +    SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
    1.88 +    va_start(list, fmt);
    1.89 +    SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
    1.90 +    va_end(list);
    1.91  
    1.92 -	// Log with timestamp and newline
    1.93 -	SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(0)), logMessage);
    1.94 +    /* Log with timestamp and newline */
    1.95 +    SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(0)), logMessage);
    1.96  }