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

@@ -198,14 +198,12 @@ static int SDL_inotify_init1(void)
}
#endif
static int
StrHasPrefix(const char *string, const char *prefix)
static int StrHasPrefix(const char *string, const char *prefix)
{
return SDL_strncmp(string, prefix, SDL_strlen(prefix)) == 0;
}
static int
StrIsInteger(const char *string)
static int StrIsInteger(const char *string)
{
const char *p;
@@ -223,8 +221,7 @@ StrIsInteger(const char *string)
}
#endif /* HAVE_INOTIFY */
static void
HIDAPI_InitializeDiscovery()
static void HIDAPI_InitializeDiscovery()
{
SDL_HIDAPI_discovery.m_bInitialized = SDL_TRUE;
SDL_HIDAPI_discovery.m_unDeviceChangeCounter = 1;
@@ -363,8 +360,7 @@ HIDAPI_InitializeDiscovery()
}
}
static void
HIDAPI_UpdateDiscovery()
static void HIDAPI_UpdateDiscovery()
{
if (!SDL_HIDAPI_discovery.m_bInitialized) {
HIDAPI_InitializeDiscovery();
@@ -481,8 +477,7 @@ HIDAPI_UpdateDiscovery()
}
}
static void
HIDAPI_ShutdownDiscovery()
static void HIDAPI_ShutdownDiscovery()
{
if (!SDL_HIDAPI_discovery.m_bInitialized) {
return;
@@ -813,8 +808,7 @@ static struct
#ifndef __FreeBSD__
/* this is awkwardly inlined, so we need to re-implement it here
* so we can override the libusb_control_transfer call */
static int
SDL_libusb_get_string_descriptor(libusb_device_handle *dev,
static int SDL_libusb_get_string_descriptor(libusb_device_handle *dev,
uint8_t descriptor_index, uint16_t lang_id,
unsigned char *data, int length)
{
@@ -965,8 +959,7 @@ static char device_magic;
#if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || defined(HAVE_LIBUSB)
static SDL_hid_device *
CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend)
static SDL_hid_device *CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend)
{
SDL_hid_device *wrapper = (SDL_hid_device *)SDL_malloc(sizeof(*wrapper));
wrapper->magic = &device_magic;
@@ -977,8 +970,7 @@ CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend)
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || HAVE_LIBUSB */
static void
DeleteHIDDeviceWrapper(SDL_hid_device *device)
static void DeleteHIDDeviceWrapper(SDL_hid_device *device)
{
device->magic = NULL;
SDL_free(device);
@@ -1006,8 +998,7 @@ DeleteHIDDeviceWrapper(SDL_hid_device *device)
pDst->var = NULL; \
}
static void
CopyHIDDeviceInfo(struct SDL_hid_device_info *pSrc, struct SDL_hid_device_info *pDst)
static void CopyHIDDeviceInfo(struct SDL_hid_device_info *pSrc, struct SDL_hid_device_info *pDst)
{
COPY_IF_EXISTS(path)
pDst->vendor_id = pSrc->vendor_id;