1.1 --- a/src/test/SDL_test_log.c Sat Dec 22 20:43:51 2012 -0800
1.2 +++ b/src/test/SDL_test_log.c Mon Dec 24 14:43:57 2012 -0800
1.3 @@ -31,10 +31,12 @@
1.4 #include "SDL_config.h"
1.5
1.6 #include <stdarg.h> /* va_list */
1.7 -#include <stdio.h>
1.8 +#include <stdio.h>
1.9 #include <string.h>
1.10 #include <time.h>
1.11
1.12 +#include "SDL.h"
1.13 +
1.14 #include "SDL_test.h"
1.15
1.16 /*!
1.17 @@ -54,7 +56,7 @@
1.18 static char buffer[64];
1.19 struct tm *local;
1.20
1.21 - memset(buffer, 0, sizeof(buffer));\
1.22 + SDL_memset(buffer, 0, sizeof(buffer));\
1.23 copy = timestamp;
1.24 local = localtime(©);
1.25 strftime(buffer, sizeof(buffer), "%x %X", local);
1.26 @@ -65,13 +67,13 @@
1.27 /*
1.28 * Prints given message with a timestamp in the TEST category and INFO priority.
1.29 */
1.30 -void SDLTest_Log(char *fmt, ...)
1.31 +void SDLTest_Log(const char *fmt, ...)
1.32 {
1.33 va_list list;
1.34 char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
1.35
1.36 // Print log message into a buffer
1.37 - memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
1.38 + SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
1.39 va_start(list, fmt);
1.40 SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
1.41 va_end(list);
1.42 @@ -83,13 +85,13 @@
1.43 /*
1.44 * Prints given message with a timestamp in the TEST category and the ERROR priority.
1.45 */
1.46 -void SDLTest_LogError(char *fmt, ...)
1.47 +void SDLTest_LogError(const char *fmt, ...)
1.48 {
1.49 va_list list;
1.50 char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
1.51
1.52 // Print log message into a buffer
1.53 - memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
1.54 + SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
1.55 va_start(list, fmt);
1.56 SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
1.57 va_end(list);