1.1 --- a/src/SDL_log.c Wed Jun 04 10:56:43 2014 -0700
1.2 +++ b/src/SDL_log.c Wed Jun 04 10:56:56 2014 -0700
1.3 @@ -26,6 +26,7 @@
1.4
1.5 /* Simple log messages in SDL */
1.6
1.7 +#include "SDL_error.h"
1.8 #include "SDL_log.h"
1.9
1.10 #if HAVE_STDIO_H
1.11 @@ -41,9 +42,6 @@
1.12 #define DEFAULT_APPLICATION_PRIORITY SDL_LOG_PRIORITY_INFO
1.13 #define DEFAULT_TEST_PRIORITY SDL_LOG_PRIORITY_VERBOSE
1.14
1.15 -/* Forward definition of error function */
1.16 -extern int SDL_SetError(const char *fmt, ...);
1.17 -
1.18 typedef struct SDL_LogLevel
1.19 {
1.20 int category;
1.21 @@ -172,7 +170,7 @@
1.22 }
1.23
1.24 void
1.25 -SDL_Log(const char *fmt, ...)
1.26 +SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.27 {
1.28 va_list ap;
1.29
1.30 @@ -182,7 +180,7 @@
1.31 }
1.32
1.33 void
1.34 -SDL_LogVerbose(int category, const char *fmt, ...)
1.35 +SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.36 {
1.37 va_list ap;
1.38
1.39 @@ -192,7 +190,7 @@
1.40 }
1.41
1.42 void
1.43 -SDL_LogDebug(int category, const char *fmt, ...)
1.44 +SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.45 {
1.46 va_list ap;
1.47
1.48 @@ -202,7 +200,7 @@
1.49 }
1.50
1.51 void
1.52 -SDL_LogInfo(int category, const char *fmt, ...)
1.53 +SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.54 {
1.55 va_list ap;
1.56
1.57 @@ -212,7 +210,7 @@
1.58 }
1.59
1.60 void
1.61 -SDL_LogWarn(int category, const char *fmt, ...)
1.62 +SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.63 {
1.64 va_list ap;
1.65
1.66 @@ -222,7 +220,7 @@
1.67 }
1.68
1.69 void
1.70 -SDL_LogError(int category, const char *fmt, ...)
1.71 +SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.72 {
1.73 va_list ap;
1.74
1.75 @@ -232,7 +230,7 @@
1.76 }
1.77
1.78 void
1.79 -SDL_LogCritical(int category, const char *fmt, ...)
1.80 +SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.81 {
1.82 va_list ap;
1.83
1.84 @@ -242,7 +240,7 @@
1.85 }
1.86
1.87 void
1.88 -SDL_LogMessage(int category, SDL_LogPriority priority, const char *fmt, ...)
1.89 +SDL_LogMessage(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
1.90 {
1.91 va_list ap;
1.92