Updated source to match SDL function prototype style

This commit is contained in:
Sam Lantinga
2023-05-23 11:29:41 -07:00
parent 737aa881fa
commit ddbdd73258
173 changed files with 481 additions and 942 deletions

View File

@@ -64,8 +64,7 @@ static void SDL_snprintfcat(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL
va_end(ap);
}
SDLTest_CommonState *
SDLTest_CommonCreateState(char **argv, Uint32 flags)
SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags)
{
int i;
SDLTest_CommonState *state;
@@ -124,8 +123,7 @@ SDLTest_CommonCreateState(char **argv, Uint32 flags)
return state;
}
void
SDLTest_CommonDestroyState(SDLTest_CommonState *state) {
void SDLTest_CommonDestroyState(SDLTest_CommonState *state) {
SDLTest_LogAllocations();
SDL_free(state);
}
@@ -674,8 +672,7 @@ static char *common_usage_video = NULL;
static char *common_usage_audio = NULL;
static char *common_usage_videoaudio = NULL;
SDL_bool
SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv)
SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv)
{
int i = 1;
while (i < argc) {
@@ -1115,8 +1112,7 @@ static SDL_HitTestResult SDLCALL SDLTest_ExampleHitTestCallback(SDL_Window *win,
return SDL_HITTEST_NORMAL;
}
SDL_bool
SDLTest_CommonInit(SDLTest_CommonState *state)
SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
{
int i, j, m, n, w, h;
const SDL_DisplayMode *fullscreen_mode;

View File

@@ -440,14 +440,12 @@ SDLTest_RandomDouble(void)
return r;
}
char *
SDLTest_RandomAsciiString(void)
char *SDLTest_RandomAsciiString(void)
{
return SDLTest_RandomAsciiStringWithMaximumLength(255);
}
char *
SDLTest_RandomAsciiStringWithMaximumLength(int maxLength)
char *SDLTest_RandomAsciiStringWithMaximumLength(int maxLength)
{
int size;
@@ -463,8 +461,7 @@ SDLTest_RandomAsciiStringWithMaximumLength(int maxLength)
return SDLTest_RandomAsciiStringOfSize(size);
}
char *
SDLTest_RandomAsciiStringOfSize(int size)
char *SDLTest_RandomAsciiStringOfSize(int size)
{
char *string;
int counter;

View File

@@ -60,8 +60,7 @@ static Uint32 SDLTest_TestCaseTimeout = 3600;
*
* \returns The generated seed string
*/
char *
SDLTest_GenerateRunSeed(const int length)
char *SDLTest_GenerateRunSeed(const int length)
{
char *seed = NULL;
SDLTest_RandomContext randomContext;

View File

@@ -35,8 +35,7 @@
/* work around compiler warning on older GCCs. */
#if (defined(__GNUC__) && (__GNUC__ <= 2))
static size_t
strftime_gcc2_workaround(char *s, size_t max, const char *fmt, const struct tm *tm)
static size_t strftime_gcc2_workaround(char *s, size_t max, const char *fmt, const struct tm *tm)
{
return strftime(s, max, fmt, tm);
}
@@ -57,8 +56,7 @@ strftime_gcc2_workaround(char *s, size_t max, const char *fmt, const struct tm *
*
* \return Ascii representation of the timestamp in localtime in the format '08/23/01 14:55:02'
*/
static const char *
SDLTest_TimestampToString(const time_t timestamp)
static const char *SDLTest_TimestampToString(const time_t timestamp)
{
time_t copy;
static char buffer[64];