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

@@ -34,8 +34,7 @@
#include "../../video/uikit/SDL_uikitvideo.h"
#endif
void *
SDL_LoadObject(const char *sofile)
void *SDL_LoadObject(const char *sofile)
{
void *handle;
const char *loaderror;
@@ -55,8 +54,7 @@ SDL_LoadObject(const char *sofile)
return handle;
}
void *
SDL_LoadFunction(void *handle, const char *name)
void *SDL_LoadFunction(void *handle, const char *name)
{
void *symbol = dlsym(handle, name);
if (symbol == NULL) {

View File

@@ -27,16 +27,14 @@
#include "SDL_loadso.h"
void *
SDL_LoadObject(const char *sofile)
void *SDL_LoadObject(const char *sofile)
{
const char *loaderror = "SDL_LoadObject() not implemented";
SDL_SetError("Failed loading %s: %s", sofile, loaderror);
return NULL;
}
void *
SDL_LoadFunction(void *handle, const char *name)
void *SDL_LoadFunction(void *handle, const char *name)
{
const char *loaderror = "SDL_LoadFunction() not implemented";
SDL_SetError("Failed loading %s: %s", name, loaderror);

View File

@@ -32,8 +32,7 @@
#define INCL_DOSERRORS
#include <os2.h>
void *
SDL_LoadObject(const char *sofile)
void *SDL_LoadObject(const char *sofile)
{
ULONG ulRC;
HMODULE hModule;
@@ -65,8 +64,7 @@ SDL_LoadObject(const char *sofile)
return (void *)hModule;
}
void *
SDL_LoadFunction(void *handle, const char *name)
void *SDL_LoadFunction(void *handle, const char *name)
{
ULONG ulRC;
PFN pFN;
@@ -90,8 +88,7 @@ SDL_LoadFunction(void *handle, const char *name)
return (void *)pFN;
}
void
SDL_UnloadObject(void *handle)
void SDL_UnloadObject(void *handle)
{
if (handle != NULL) {
DosFreeModule((HMODULE)handle);

View File

@@ -29,8 +29,7 @@
#include "SDL_loadso.h"
void *
SDL_LoadObject(const char *sofile)
void *SDL_LoadObject(const char *sofile)
{
void *handle;
LPTSTR tstr;
@@ -61,8 +60,7 @@ SDL_LoadObject(const char *sofile)
return handle;
}
void *
SDL_LoadFunction(void *handle, const char *name)
void *SDL_LoadFunction(void *handle, const char *name)
{
void *symbol = (void *)GetProcAddress((HMODULE)handle, name);
if (symbol == NULL) {