File style cleanup for the SDL 2.0 release
This commit is contained in:
parent
2ac8624930
commit
0cb6385637
376 changed files with 17562 additions and 17773 deletions
|
@ -21,11 +21,11 @@
|
|||
|
||||
/*
|
||||
|
||||
Used by the test framework and test cases.
|
||||
Used by the test framework and test cases.
|
||||
|
||||
*/
|
||||
|
||||
// quiet windows compiler warnings
|
||||
/* quiet windows compiler warnings */
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
@ -50,18 +50,18 @@
|
|||
*
|
||||
* \return Ascii representation of the timestamp in localtime in the format '08/23/01 14:55:02'
|
||||
*/
|
||||
char *SDLTest_TimestampToString(const time_t timestamp)
|
||||
char *SDLTest_TimestampToString(const time_t timestamp)
|
||||
{
|
||||
time_t copy;
|
||||
static char buffer[64];
|
||||
struct tm *local;
|
||||
time_t copy;
|
||||
static char buffer[64];
|
||||
struct tm *local;
|
||||
|
||||
SDL_memset(buffer, 0, sizeof(buffer));\
|
||||
copy = timestamp;
|
||||
local = localtime(©);
|
||||
strftime(buffer, sizeof(buffer), "%x %X", local);
|
||||
SDL_memset(buffer, 0, sizeof(buffer));\
|
||||
copy = timestamp;
|
||||
local = localtime(©);
|
||||
strftime(buffer, sizeof(buffer), "%x %X", local);
|
||||
|
||||
return buffer;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -69,17 +69,17 @@ char *SDLTest_TimestampToString(const time_t timestamp)
|
|||
*/
|
||||
void SDLTest_Log(const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
|
||||
va_list list;
|
||||
char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
|
||||
|
||||
// Print log message into a buffer
|
||||
SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
|
||||
va_start(list, fmt);
|
||||
SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
|
||||
va_end(list);
|
||||
/* Print log message into a buffer */
|
||||
SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
|
||||
va_start(list, fmt);
|
||||
SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
// Log with timestamp and newline
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(0)), logMessage);
|
||||
/* Log with timestamp and newline */
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(0)), logMessage);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -87,15 +87,15 @@ void SDLTest_Log(const char *fmt, ...)
|
|||
*/
|
||||
void SDLTest_LogError(const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
|
||||
va_list list;
|
||||
char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH];
|
||||
|
||||
// Print log message into a buffer
|
||||
SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
|
||||
va_start(list, fmt);
|
||||
SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
|
||||
va_end(list);
|
||||
/* Print log message into a buffer */
|
||||
SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
|
||||
va_start(list, fmt);
|
||||
SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
// Log with timestamp and newline
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(0)), logMessage);
|
||||
/* Log with timestamp and newline */
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(0)), logMessage);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue