SDL: Updated source to match SDL function prototype style

From 737aa881fa80afeba6c7642ecdee99b8d23e0b09 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 23 May 2023 09:37:07 -0700
Subject: [PATCH] Updated source to match SDL function prototype style

---
 src/SDL.c                                     |  3 +-
 src/atomic/SDL_atomic.c                       |  6 +--
 src/audio/SDL_audio.c                         |  9 ++---
 src/core/windows/SDL_windows.c                |  3 +-
 src/dynapi/SDL_dynapi.c                       |  3 +-
 src/events/SDL_mouse.c                        |  9 ++---
 src/file/SDL_rwops.c                          | 39 +++++++------------
 src/joystick/windows/SDL_dinputjoystick.c     |  6 +--
 src/joystick/windows/SDL_xinputjoystick.c     |  6 +--
 src/render/direct3d11/SDL_render_d3d11.c      |  3 +-
 src/render/direct3d12/SDL_render_d3d12.c      |  3 +-
 .../vitagxm/SDL_render_vita_gxm_memory.c      | 12 ++----
 .../vitagxm/SDL_render_vita_gxm_tools.c       |  9 ++---
 src/stdlib/SDL_qsort.c                        |  3 +-
 src/stdlib/SDL_stdlib.c                       |  9 ++---
 src/stdlib/SDL_string.c                       |  9 ++---
 src/test/SDL_test_fuzzer.c                    | 39 +++++++------------
 src/thread/SDL_thread.c                       |  3 +-
 src/thread/generic/SDL_syssem.c               |  6 +--
 src/thread/ngage/SDL_syssem.cpp               |  3 +-
 src/thread/pthread/SDL_syssem.c               |  3 +-
 src/thread/windows/SDL_syssem.c               |  3 +-
 src/timer/SDL_timer.c                         |  3 +-
 src/timer/dummy/SDL_systimer.c                |  6 +--
 src/timer/haiku/SDL_systimer.c                |  6 +--
 src/timer/n3ds/SDL_systimer.c                 |  6 +--
 src/timer/ngage/SDL_systimer.cpp              |  6 +--
 src/timer/ps2/SDL_systimer.c                  |  6 +--
 src/timer/psp/SDL_systimer.c                  |  6 +--
 src/timer/unix/SDL_systimer.c                 |  6 +--
 src/timer/vita/SDL_systimer.c                 |  6 +--
 src/timer/windows/SDL_systimer.c              |  6 +--
 src/video/SDL_clipboard.c                     |  6 +--
 src/video/SDL_pixels.c                        | 10 ++---
 src/video/cocoa/SDL_cocoametalview.m          |  6 +--
 src/video/cocoa/SDL_cocoawindow.m             |  3 +-
 src/video/uikit/SDL_uikitmetalview.m          |  6 +--
 src/video/x11/SDL_x11modes.c                  |  3 +-
 src/video/x11/SDL_x11window.c                 |  6 +--
 39 files changed, 95 insertions(+), 191 deletions(-)

diff --git a/src/SDL.c b/src/SDL.c
index d364b9df6f9e..e1daed6be765 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -448,8 +448,7 @@ void SDL_QuitSubSystem(Uint32 flags)
 #endif
 }
 
-Uint32
-SDL_WasInit(Uint32 flags)
+Uint32 SDL_WasInit(Uint32 flags)
 {
     int i;
     int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c
index b22fc906fecc..3e57a48cfbc3 100644
--- a/src/atomic/SDL_atomic.c
+++ b/src/atomic/SDL_atomic.c
@@ -203,8 +203,7 @@ int SDL_AtomicSet(SDL_AtomicInt *a, int v)
 #endif
 }
 
-void *
-SDL_AtomicSetPtr(void **a, void *v)
+void *SDL_AtomicSetPtr(void **a, void *v)
 {
 #ifdef HAVE_MSC_ATOMICS
     return _InterlockedExchangePointer(a, v);
@@ -270,8 +269,7 @@ int SDL_AtomicGet(SDL_AtomicInt *a)
 #endif
 }
 
-void *
-SDL_AtomicGetPtr(void **a)
+void *SDL_AtomicGetPtr(void **a)
 {
 #ifdef HAVE_ATOMIC_LOAD_N
     return __atomic_load_n(a, __ATOMIC_SEQ_CST);
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 3910b8dc3b17..99c26d406369 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -495,8 +495,7 @@ int SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len)
     return rc;
 }
 
-Uint32
-SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
+Uint32 SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
 {
     SDL_AudioDevice *device = get_audio_device(devid);
     Uint32 rc;
@@ -514,8 +513,7 @@ SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
     return rc;
 }
 
-Uint32
-SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid)
+Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid)
 {
     Uint32 retval = 0;
     SDL_AudioDevice *device = get_audio_device(devid);
@@ -1074,8 +1072,7 @@ static void close_audio_device(SDL_AudioDevice *device)
     SDL_free(device);
 }
 
-static Uint16
-GetDefaultSamplesFromFreq(int freq)
+static Uint16 GetDefaultSamplesFromFreq(int freq)
 {
     /* Pick a default of ~46 ms at desired frequency */
     /* !!! FIXME: remove this when the non-Po2 resampling is in. */
diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c
index ef5ef3d757ae..918b1754dc03 100644
--- a/src/core/windows/SDL_windows.c
+++ b/src/core/windows/SDL_windows.c
@@ -120,8 +120,7 @@ void WIN_CoUninitialize(void)
 }
 
 #ifndef __WINRT__
-void *
-WIN_LoadComBaseFunction(const char *name)
+void *WIN_LoadComBaseFunction(const char *name)
 {
     static SDL_bool s_bLoaded;
     static HMODULE s_hComBase;
diff --git a/src/dynapi/SDL_dynapi.c b/src/dynapi/SDL_dynapi.c
index c2dfa3546fad..cc97d232fc3b 100644
--- a/src/dynapi/SDL_dynapi.c
+++ b/src/dynapi/SDL_dynapi.c
@@ -356,8 +356,7 @@ static Sint32 initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize)
 typedef Sint32(SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize);
 extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32);
 
-Sint32
-SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
+Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
 {
     return initialize_jumptable(apiver, table, tablesize);
 }
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 64680db7d38e..f49aae91d02a 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -885,8 +885,7 @@ void SDL_QuitMouse(void)
                         SDL_MouseRelativeWarpMotionChanged, mouse);
 }
 
-Uint32
-SDL_GetMouseState(float *x, float *y)
+Uint32 SDL_GetMouseState(float *x, float *y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
 
@@ -899,8 +898,7 @@ SDL_GetMouseState(float *x, float *y)
     return GetButtonState(mouse, SDL_TRUE);
 }
 
-Uint32
-SDL_GetRelativeMouseState(float *x, float *y)
+Uint32 SDL_GetRelativeMouseState(float *x, float *y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
 
@@ -915,8 +913,7 @@ SDL_GetRelativeMouseState(float *x, float *y)
     return GetButtonState(mouse, SDL_TRUE);
 }
 
-Uint32
-SDL_GetGlobalMouseState(float *x, float *y)
+Uint32 SDL_GetGlobalMouseState(float *x, float *y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
 
diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c
index 24be00a9a50e..017ae9b67b19 100644
--- a/src/file/SDL_rwops.c
+++ b/src/file/SDL_rwops.c
@@ -669,8 +669,7 @@ void SDL_DestroyRW(SDL_RWops *area)
 }
 
 /* Load all the data from an SDL data stream */
-void *
-SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
+void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
 {
     static const Sint64 FILE_CHUNK_SIZE = 1024;
     Sint64 size;
@@ -733,38 +732,32 @@ SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
     return data;
 }
 
-void *
-SDL_LoadFile(const char *file, size_t *datasize)
+void *SDL_LoadFile(const char *file, size_t *datasize)
 {
     return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1);
 }
 
-Sint64
-SDL_RWsize(SDL_RWops *context)
+Sint64 SDL_RWsize(SDL_RWops *context)
 {
     return context->size(context);
 }
 
-Sint64
-SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)
+Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)
 {
     return context->seek(context, offset, whence);
 }
 
-Sint64
-SDL_RWtell(SDL_RWops *context)
+Sint64 SDL_RWtell(SDL_RWops *context)
 {
     return context->seek(context, 0, SDL_RW_SEEK_CUR);
 }
 
-Sint64
-SDL_RWread(SDL_RWops *context, void *ptr, Sint64 size)
+Sint64 SDL_RWread(SDL_RWops *context, void *ptr, Sint64 size)
 {
     return context->read(context, ptr, size);
 }
 
-Sint64
-SDL_RWwrite(SDL_RWops *context, const void *ptr, Sint64 size)
+Sint64 SDL_RWwrite(SDL_RWops *context, const void *ptr, Sint64 size)
 {
     return context->write(context, ptr, size);
 }
@@ -784,8 +777,7 @@ Uint8 SDL_ReadU8(SDL_RWops *src)
     return value;
 }
 
-Uint16
-SDL_ReadLE16(SDL_RWops *src)
+Uint16 SDL_ReadLE16(SDL_RWops *src)
 {
     Uint16 value = 0;
 
@@ -793,8 +785,7 @@ SDL_ReadLE16(SDL_RWops *src)
     return SDL_SwapLE16(value);
 }
 
-Uint16
-SDL_ReadBE16(SDL_RWops *src)
+Uint16 SDL_ReadBE16(SDL_RWops *src)
 {
     Uint16 value = 0;
 
@@ -802,8 +793,7 @@ SDL_ReadBE16(SDL_RWops *src)
     return SDL_SwapBE16(value);
 }
 
-Uint32
-SDL_ReadLE32(SDL_RWops *src)
+Uint32 SDL_ReadLE32(SDL_RWops *src)
 {
     Uint32 value = 0;
 
@@ -811,8 +801,7 @@ SDL_ReadLE32(SDL_RWops *src)
     return SDL_SwapLE32(value);
 }
 
-Uint32
-SDL_ReadBE32(SDL_RWops *src)
+Uint32 SDL_ReadBE32(SDL_RWops *src)
 {
     Uint32 value = 0;
 
@@ -820,8 +809,7 @@ SDL_ReadBE32(SDL_RWops *src)
     return SDL_SwapBE32(value);
 }
 
-Uint64
-SDL_ReadLE64(SDL_RWops *src)
+Uint64 SDL_ReadLE64(SDL_RWops *src)
 {
     Uint64 value = 0;
 
@@ -829,8 +817,7 @@ SDL_ReadLE64(SDL_RWops *src)
     return SDL_SwapLE64(value);
 }
 
-Uint64
-SDL_ReadBE64(SDL_RWops *src)
+Uint64 SDL_ReadBE64(SDL_RWops *src)
 {
     Uint64 value = 0;
 
diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c
index 7b1f2fb168eb..511eecf3040a 100644
--- a/src/joystick/windows/SDL_dinputjoystick.c
+++ b/src/joystick/windows/SDL_dinputjoystick.c
@@ -943,8 +943,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
     return 0;
 }
 
-Uint32
-SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
 {
     Uint32 result = 0;
 
@@ -1193,8 +1192,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
     return SDL_Unsupported();
 }
 
-Uint32
-SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
 {
     return 0;
 }
diff --git a/src/joystick/windows/SDL_xinputjoystick.c b/src/joystick/windows/SDL_xinputjoystick.c
index 6831bd25746e..05a135421774 100644
--- a/src/joystick/windows/SDL_xinputjoystick.c
+++ b/src/joystick/windows/SDL_xinputjoystick.c
@@ -497,8 +497,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
     return 0;
 }
 
-Uint32
-SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
 {
     return SDL_JOYCAP_RUMBLE;
 }
@@ -583,8 +582,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
     return SDL_Unsupported();
 }
 
-Uint32
-SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
 {
     return 0;
 }
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index f5d436b6a516..f6de782d4f37 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -196,8 +196,7 @@ static const GUID SDL_IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, {
 #pragma GCC diagnostic pop
 #endif
 
-Uint32
-D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
+Uint32 D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
 {
     switch (dxgiFormat) {
     case DXGI_FORMAT_B8G8R8A8_UNORM:
diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c
index b563cf8e2c47..3637f1a5a52e 100644
--- a/src/render/direct3d12/SDL_render_d3d12.c
+++ b/src/render/direct3d12/SDL_render_d3d12.c
@@ -272,8 +272,7 @@ UINT D3D12_Align(UINT location, UINT alignment)
     return (location + (alignment - 1)) & ~(alignment - 1);
 }
 
-Uint32
-D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
+Uint32 D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
 {
     switch (dxgiFormat) {
     case DXGI_FORMAT_B8G8R8A8_UNORM:
diff --git a/src/render/vitagxm/SDL_render_vita_gxm_memory.c b/src/render/vitagxm/SDL_render_vita_gxm_memory.c
index 834270fe7c5c..0c29c76cfaa8 100644
--- a/src/render/vitagxm/SDL_render_vita_gxm_memory.c
+++ b/src/render/vitagxm/SDL_render_vita_gxm_memory.c
@@ -25,8 +25,7 @@
 
 #include "SDL_render_vita_gxm_memory.h"
 
-void *
-vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid)
+void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid)
 {
     void *mem;
 
@@ -63,8 +62,7 @@ void vita_mem_free(SceUID uid)
     sceKernelFreeMemBlock(uid);
 }
 
-void *
-vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size)
+void *vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size)
 {
     void *mem;
 
@@ -122,8 +120,7 @@ void vita_gpu_mem_destroy(VITA_GXM_RenderData *data)
     }
 }
 
-void *
-vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
+void *vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
 {
     void *mem = NULL;
 
@@ -150,8 +147,7 @@ void vita_mem_vertex_usse_free(SceUID uid)
     sceKernelFreeMemBlock(uid);
 }
 
-void *
-vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
+void *vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
 {
     void *mem = NULL;
 
diff --git a/src/render/vitagxm/SDL_render_vita_gxm_tools.c b/src/render/vitagxm/SDL_render_vita_gxm_tools.c
index e4c2b2d2642d..bc3e0d8c8e03 100644
--- a/src/render/vitagxm/SDL_render_vita_gxm_tools.c
+++ b/src/render/vitagxm/SDL_render_vita_gxm_tools.c
@@ -79,8 +79,7 @@ static void patcher_host_free(void *user_data, void *mem)
     SDL_free(mem);
 }
 
-void *
-pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
+void *pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
 {
 
     if ((data->pool_index + size) < VITA_GXM_POOL_SIZE) {
@@ -92,8 +91,7 @@ pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
     return NULL;
 }
 
-void *
-pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment)
+void *pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment)
 {
     unsigned int new_index = (data->pool_index + alignment - 1) & ~(alignment - 1);
     if ((new_index + size) < VITA_GXM_POOL_SIZE) {
@@ -957,8 +955,7 @@ gxm_texture_get_format(const gxm_texture *texture)
     return sceGxmTextureGetFormat(&texture->gxm_tex);
 }
 
-void *
-gxm_texture_get_datap(const gxm_texture *texture)
+void *gxm_texture_get_datap(const gxm_texture *texture)
 {
     return sceGxmTextureGetData(&texture->gxm_tex);
 }
diff --git a/src/stdlib/SDL_qsort.c b/src/stdlib/SDL_qsort.c
index aef800367e97..42a173ac5fe3 100644
--- a/src/stdlib/SDL_qsort.c
+++ b/src/stdlib/SDL_qsort.c
@@ -528,8 +528,7 @@ extern void qsortG(void *base, size_t nmemb, size_t size,
 
 #endif /* HAVE_QSORT */
 
-void *
-SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *))
+void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *))
 {
 #ifdef HAVE_BSEARCH
     return bsearch(key, base, nmemb, size, compare);
diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c
index 29d3a2551675..3924ba1c5a12 100644
--- a/src/stdlib/SDL_stdlib.c
+++ b/src/stdlib/SDL_stdlib.c
@@ -533,8 +533,7 @@ int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a' + ((x) - 'A'
 
 /* This file contains a portable memcpy manipulation function for SDL */
 
-void *
-SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
+void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
 {
 #ifdef __GNUC__
     /* Presumably this is well tuned for speed.
@@ -586,8 +585,7 @@ SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src,
 #endif /* __GNUC__ */
 }
 
-void *
-SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
+void *SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
 {
 #ifdef HAVE_MEMSET
     return memset(dst, c, len);
@@ -636,8 +634,7 @@ SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
 }
 
 /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
-void *
-SDL_memset4(void *dst, Uint32 val, size_t dwords)
+void *SDL_memset4(void *dst, Uint32 val, size_t dwords)
 {
 #if defined(__APPLE__) && defined(HAVE_STRING_H)
     memset_pattern4(dst, &val, dwords * 4);
diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index a2918cd62f61..f8eb4f4eef4c 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -287,8 +287,7 @@ SDL_ScanFloat(const char *text, double *valuep)
 }
 #endif
 
-void *
-SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
+void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
 {
 #ifdef HAVE_MEMMOVE
     return memmove(dst, src, len);
@@ -959,8 +958,7 @@ SDL_strtoul(const char *string, char **endp, int base)
 #endif /* HAVE_STRTOUL */
 }
 
-Sint64
-SDL_strtoll(const char *string, char **endp, int base)
+Sint64 SDL_strtoll(const char *string, char **endp, int base)
 {
 #ifdef HAVE_STRTOLL
     return strtoll(string, endp, base);
@@ -984,8 +982,7 @@ SDL_strtoll(const char *string, char **endp, int base)
 #endif /* HAVE_STRTOLL */
 }
 
-Uint64
-SDL_strtoull(const char *string, char **endp, int base)
+Uint64 SDL_strtoull(const char *string, char **endp, int base)
 {
 #ifdef HAVE_STRTOULL
     return strtoull(string, endp, base);
diff --git a/src/test/SDL_test_fuzzer.c b/src/test/SDL_test_fuzzer.c
index c6de64426a3e..f3d5940b57c7 100644
--- a/src/test/SDL_test_fuzzer.c
+++ b/src/test/SDL_test_fuzzer.c
@@ -71,40 +71,35 @@ Sint8 SDLTest_RandomSint8(void)
     return (Sint8)SDLTest_RandomInt(&rndContext) & 0x000000FF;
 }
 
-Uint16
-SDLTest_RandomUint16(void)
+Uint16 SDLTest_RandomUint16(void)
 {
     fuzzerInvocationCounter++;
 
     return (Uint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF;
 }
 
-Sint16
-SDLTest_RandomSint16(void)
+Sint16 SDLTest_RandomSint16(void)
 {
     fuzzerInvocationCounter++;
 
     return (Sint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF;
 }
 
-Sint32
-SDLTest_RandomSint32(void)
+Sint32 SDLTest_RandomSint32(void)
 {
     fuzzerInvocationCounter++;
 
     return (Sint32)SDLTest_RandomInt(&rndContext);
 }
 
-Uint32
-SDLTest_RandomUint32(void)
+Uint32 SDLTest_RandomUint32(void)
 {
     fuzzerInvocationCounter++;
 
     return (Uint32)SDLTest_RandomInt(&rndContext);
 }
 
-Uint64
-SDLTest_RandomUint64(void)
+Uint64 SDLTest_RandomUint64(void)
 {
     union
     {
@@ -121,8 +116,7 @@ SDLTest_RandomUint64(void)
     return value.v64;
 }
 
-Sint64
-SDLTest_RandomSint64(void)
+Sint64 SDLTest_RandomSint64(void)
 {
     union
     {
@@ -139,8 +133,7 @@ SDLTest_RandomSint64(void)
     return (Sint64)value.v64;
 }
 
-Sint32
-SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
+Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
 {
     Sint64 min = pMin;
     Sint64 max = pMax;
@@ -254,8 +247,7 @@ Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_boo
                                                          validDomain);
 }
 
-Uint16
-SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain)
+Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain)
 {
     /* max value for Uint16 */
     const Uint64 maxValue = USHRT_MAX;
@@ -264,8 +256,7 @@ SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool v
                                                           validDomain);
 }
 
-Uint32
-SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain)
+Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain)
 {
 /* max value for Uint32 */
 #if ((ULONG_MAX) == (UINT_MAX))
@@ -278,8 +269,7 @@ SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool v
                                                           validDomain);
 }
 
-Uint64
-SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
+Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
 {
     /* max value for Uint64 */
     const Uint64 maxValue = UINT64_MAX;
@@ -384,8 +374,7 @@ Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_boo
                                                        validDomain);
 }
 
-Sint16
-SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain)
+Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain)
 {
     /* min & max values for Sint16 */
     const Sint64 maxValue = SHRT_MAX;
@@ -395,8 +384,7 @@ SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool v
                                                         validDomain);
 }
 
-Sint32
-SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
+Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
 {
 /* min & max values for Sint32 */
 #if ((ULONG_MAX) == (UINT_MAX))
@@ -411,8 +399,7 @@ SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool v
                                                         validDomain);
 }
 
-Sint64
-SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
+Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
 {
     /* min & max values for Sint64 */
     const Sint64 maxValue = INT64_MAX;
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 6f05c5efef85..172187d15de3 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -33,8 +33,7 @@ SDL_TLSCreate(void)
     return SDL_AtomicIncRef(&SDL_tls_id) + 1;
 }
 
-void *
-SDL_TLSGet(SDL_TLSID id)
+void *SDL_TLSGet(SDL_TLSID id)
 {
     SDL_TLSData *storage;
 
diff --git a/src/thread/generic/SDL_syssem.c b/src/thread/generic/SDL_syssem.c
index 765bd5fb61e6..20833b7ebdb4 100644
--- a/src/thread/generic/SDL_syssem.c
+++ b/src/thread/generic/SDL_syssem.c
@@ -42,8 +42,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
     return SDL_SetError("SDL not built with thread support");
 }
 
-Uint32
-SDL_GetSemaphoreValue(SDL_Semaphore *sem)
+Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
 {
     return 0;
 }
@@ -144,8 +143,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
     return retval;
 }
 
-Uint32
-SDL_GetSemaphoreValue(SDL_Semaphore *sem)
+Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
 {
     Uint32 value;
 
diff --git a/src/thread/ngage/SDL_syssem.cpp b/src/thread/ngage/SDL_syssem.cpp
index c7da5b8987b3..32eae6b77986 100644
--- a/src/thread/ngage/SDL_syssem.cpp
+++ b/src/thread/ngage/SDL_syssem.cpp
@@ -139,8 +139,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
     return info->iVal;
 }
 
-Uint32
-SDL_GetSemaphoreValue(SDL_Semaphore *sem)
+Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
 {
     if (sem == NULL) {
         SDL_InvalidParamError("sem");
diff --git a/src/thread/pthread/SDL_syssem.c b/src/thread/pthread/SDL_syssem.c
index c0fd1701b1a4..64f6a4ab212f 100644
--- a/src/thread/pthread/SDL_syssem.c
+++ b/src/thread/pthread/SDL_syssem.c
@@ -149,8 +149,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
     return retval;
 }
 
-Uint32
-SDL_GetSemaphoreValue(SDL_Semaphore *sem)
+Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
 {
     int ret = 0;
 
diff --git a/src/thread/windows/SDL_syssem.c b/src/thread/windows/SDL_syssem.c
index 0d894e2f27e3..103af9b0388c 100644
--- a/src/thread/windows/SDL_syssem.c
+++ b/src/thread/windows/SDL_syssem.c
@@ -377,8 +377,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
     return SDL_sem_impl_active.WaitTimeoutNS(sem, timeoutNS);
 }
 
-Uint32
-SDL_GetSemaphoreValue(SDL_Semaphore *sem)
+Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
 {
     return SDL_sem_impl_active.Value(sem);
 }
diff --git a/src/timer/SDL_timer.c b/src/timer/SDL_timer.c
index bd4f3f110102..0052ff60f537 100644
--- a/src/timer/SDL_timer.c
+++ b/src/timer/SDL_timer.c
@@ -565,8 +565,7 @@ void SDL_QuitTicks(void)
     tick_start = 0;
 }
 
-Uint64
-SDL_GetTicksNS(void)
+Uint64 SDL_GetTicksNS(void)
 {
     Uint64 starting_value, value;
 
diff --git a/src/timer/dummy/SDL_systimer.c b/src/timer/dummy/SDL_systimer.c
index 56afc84531c5..351f35ceca1b 100644
--- a/src/timer/dummy/SDL_systimer.c
+++ b/src/timer/dummy/SDL_systimer.c
@@ -22,15 +22,13 @@
 
 #if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED)
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     SDL_Unsupported();
     return 0;
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     return 1;
 }
diff --git a/src/timer/haiku/SDL_systimer.c b/src/timer/haiku/SDL_systimer.c
index 71d114e564b0..6bc51e71a9b7 100644
--- a/src/timer/haiku/SDL_systimer.c
+++ b/src/timer/haiku/SDL_systimer.c
@@ -25,14 +25,12 @@
 #include <kernel/OS.h>
 
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     return system_time();
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     return SDL_US_PER_SECOND;
 }
diff --git a/src/timer/n3ds/SDL_systimer.c b/src/timer/n3ds/SDL_systimer.c
index 01cfbb481561..fc8fdc304a7c 100644
--- a/src/timer/n3ds/SDL_systimer.c
+++ b/src/timer/n3ds/SDL_systimer.c
@@ -25,14 +25,12 @@
 #include <3ds.h>
 
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     return svcGetSystemTick();
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     return SYSCLOCK_ARM11;
 }
diff --git a/src/timer/ngage/SDL_systimer.cpp b/src/timer/ngage/SDL_systimer.cpp
index 10b49bc92818..41037a86ed08 100644
--- a/src/timer/ngage/SDL_systimer.cpp
+++ b/src/timer/ngage/SDL_systimer.cpp
@@ -32,15 +32,13 @@ extern "C" {
 #endif
 
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     /* FIXME: Need to account for 32-bit wrapping */
     return (Uint64)User::TickCount();
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     return SDL_US_PER_SECOND;
 }
diff --git a/src/timer/ps2/SDL_systimer.c b/src/timer/ps2/SDL_systimer.c
index efe4708e4ea6..2ba22807c77e 100644
--- a/src/timer/ps2/SDL_systimer.c
+++ b/src/timer/ps2/SDL_systimer.c
@@ -29,14 +29,12 @@
 #include <sys/time.h>
 
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     return GetTimerSystemTime();
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     return kBUSCLK;
 }
diff --git a/src/timer/psp/SDL_systimer.c b/src/timer/psp/SDL_systimer.c
index 31aded8f1bdc..7ccf73fe07c1 100644
--- a/src/timer/psp/SDL_systimer.c
+++ b/src/timer/psp/SDL_systimer.c
@@ -29,8 +29,7 @@
 #include <pspthreadman.h>
 
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     Uint64 ticks;
 	struct timeval now;
@@ -42,8 +41,7 @@ SDL_GetPerformanceCounter(void)
     return ticks;
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     return SDL_US_PER_SECOND;
 }
diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c
index 36a45d6eaa72..3691a08d0186 100644
--- a/src/timer/unix/SDL_systimer.c
+++ b/src/timer/unix/SDL_systimer.c
@@ -82,8 +82,7 @@ static void CheckMonotonicTime(void)
     checked_monotonic_time = SDL_TRUE;
 }
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     Uint64 ticks;
 
@@ -116,8 +115,7 @@ SDL_GetPerformanceCounter(void)
     return ticks;
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     if (!checked_monotonic_time) {
         CheckMonotonicTime();
diff --git a/src/timer/vita/SDL_systimer.c b/src/timer/vita/SDL_systimer.c
index 87248fe30ef4..f7523248e81a 100644
--- a/src/timer/vita/SDL_systimer.c
+++ b/src/timer/vita/SDL_systimer.c
@@ -29,14 +29,12 @@
 #include <psp2/kernel/processmgr.h>
 
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     return sceKernelGetProcessTimeWide();
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     return SDL_US_PER_SECOND;
 }
diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c
index 7cdf2a4ab4b3..15c872e68dd2 100644
--- a/src/timer/windows/SDL_systimer.c
+++ b/src/timer/windows/SDL_systimer.c
@@ -25,8 +25,7 @@
 #include "../../core/windows/SDL_windows.h"
 
 
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
 {
     LARGE_INTEGER counter;
     const BOOL rc = QueryPerformanceCounter(&counter);
@@ -34,8 +33,7 @@ SDL_GetPerformanceCounter(void)
     return (Uint64)counter.QuadPart;
 }
 
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
 {
     LARGE_INTEGER frequency;
     const BOOL rc = QueryPerformanceFrequency(&frequency);
diff --git a/src/video/SDL_clipboard.c b/src/video/SDL_clipboard.c
index fdcbf19b3481..2e798b29f675 100644
--- a/src/video/SDL_clipboard.c
+++ b/src/video/SDL_clipboard.c
@@ -78,8 +78,7 @@ int SDL_SetPrimarySelectionText(const char *text)
     }
 }
 
-void *
-SDL_GetClipboardData(size_t *length, const char *mime_type)
+void *SDL_GetClipboardData(size_t *length, const char *mime_type)
 {
     SDL_VideoDevice *_this = SDL_GetVideoDevice();
     if (_this == NULL) {
@@ -193,8 +192,7 @@ SDL_HasPrimarySelectionText(void)
     return SDL_FALSE;
 }
 
-void *
-SDL_GetClipboardUserdata(void)
+void *SDL_GetClipboardUserdata(void)
 {
     SDL_VideoDevice *_this = SDL_GetVideoDevice();
 
diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c
index ba0007667e9f..deb7da735344 100644
--- a/src/video/SDL_pixels.c
+++ b/src/video/SDL_pixels.c
@@ -301,9 +301,7 @@ SDL_GetMasksForPixelFormatEnum(Uint32 format, int *bpp, Uint32 *Rmask,
     return SDL_TRUE;
 }
 
-Uint32
-SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
-                           Uint32 Amask)
+Uint32 SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 {
     switch (bpp) {
     case 1:
@@ -861,8 +859,7 @@ void SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alph
 }
 
 /* Find the opaque pixel value corresponding to an RGB triple */
-Uint32
-SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
+Uint32 SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
 {
     if (format->palette == NULL) {
         return (r >> format->Rloss) << format->Rshift | (g >> format->Gloss) << format->Gshift | (b >> format->Bloss) << format->Bshift | format->Amask;
@@ -872,8 +869,7 @@ SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
 }
 
 /* Find the pixel value corresponding to an RGBA quadruple */
-Uint32
-SDL_MapRGBA(const SDL_PixelFormat *format, Ui

(Patch may be truncated, please check the link at the top of this post.)