Updated source to match SDL function prototype style

This commit is contained in:
Sam Lantinga
2023-05-23 10:59:03 -07:00
parent 92f72682e7
commit 3f1fd5abff
243 changed files with 1218 additions and 2364 deletions

View File

@@ -53,8 +53,7 @@ typedef struct SDL_cond_generic
} SDL_cond_generic;
/* Create a condition variable */
SDL_cond *
SDL_CreateCond_generic(void)
SDL_cond *SDL_CreateCond_generic(void)
{
SDL_cond_generic *cond;

View File

@@ -33,8 +33,7 @@ struct SDL_mutex
};
/* Create a mutex */
SDL_mutex *
SDL_CreateMutex(void)
SDL_mutex *SDL_CreateMutex(void)
{
SDL_mutex *mutex;

View File

@@ -28,8 +28,7 @@
#if SDL_THREADS_DISABLED
SDL_sem *
SDL_CreateSemaphore(Uint32 initial_value)
SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_SetError("SDL not built with thread support");
return (SDL_sem *)0;
@@ -54,8 +53,7 @@ int SDL_SemWait(SDL_sem *sem)
return SDL_SetError("SDL not built with thread support");
}
Uint32
SDL_SemValue(SDL_sem *sem)
Uint32 SDL_SemValue(SDL_sem *sem)
{
return 0;
}
@@ -75,8 +73,7 @@ struct SDL_semaphore
SDL_cond *count_nonzero;
};
SDL_sem *
SDL_CreateSemaphore(Uint32 initial_value)
SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_sem *sem;
@@ -172,8 +169,7 @@ int SDL_SemWait(SDL_sem *sem)
return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT);
}
Uint32
SDL_SemValue(SDL_sem *sem)
Uint32 SDL_SemValue(SDL_sem *sem)
{
Uint32 value;

View File

@@ -41,8 +41,7 @@ void SDL_SYS_SetupThread(const char *name)
return;
}
SDL_threadID
SDL_ThreadID(void)
SDL_threadID SDL_ThreadID(void)
{
return 0;
}

View File

@@ -22,8 +22,7 @@
#include "../../SDL_internal.h"
#include "../SDL_thread_c.h"
SDL_TLSData *
SDL_SYS_GetTLSData(void)
SDL_TLSData *SDL_SYS_GetTLSData(void)
{
return SDL_Generic_GetTLSData();
}