comparison src/loadso/mint/SDL_sysloadso.c @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents 92947e3a18db
children 3e42ad69f4a3
comparison
equal deleted inserted replaced
1894:c69cee13dd76 1895:c121d94672cb
30 #include <gem.h> 30 #include <gem.h>
31 #include <ldg.h> 31 #include <ldg.h>
32 32
33 #include "SDL_loadso.h" 33 #include "SDL_loadso.h"
34 34
35 void *SDL_LoadObject(const char *sofile) 35 void *
36 SDL_LoadObject(const char *sofile)
36 { 37 {
37 const char *loaderror = "Unknown error"; 38 const char *loaderror = "Unknown error";
38 void *handle = (void *)ldg_open((char *)sofile, ldg_global); 39 void *handle = (void *) ldg_open((char *) sofile, ldg_global);
39 if ( handle == NULL ) { 40 if (handle == NULL) {
40 SDL_SetError("Failed loading %s: %s", sofile, loaderror); 41 SDL_SetError("Failed loading %s: %s", sofile, loaderror);
41 } 42 }
42 return(handle); 43 return (handle);
43 } 44 }
44 45
45 void *SDL_LoadFunction(void *handle, const char *name) 46 void *
47 SDL_LoadFunction(void *handle, const char *name)
46 { 48 {
47 const char *loaderror = "Unknown error"; 49 const char *loaderror = "Unknown error";
48 void *symbol = (void *)ldg_find((char *)name, (LDG *)handle); 50 void *symbol = (void *) ldg_find((char *) name, (LDG *) handle);
49 if ( symbol == NULL ) { 51 if (symbol == NULL) {
50 SDL_SetError("Failed loading %s: %s", name, loaderror); 52 SDL_SetError("Failed loading %s: %s", name, loaderror);
51 } 53 }
52 return(symbol); 54 return (symbol);
53 } 55 }
54 56
55 void SDL_UnloadObject(void *handle) 57 void
58 SDL_UnloadObject(void *handle)
56 { 59 {
57 if ( handle != NULL ) { 60 if (handle != NULL) {
58 ldg_close((LDG *)handle, ldg_global); 61 ldg_close((LDG *) handle, ldg_global);
59 } 62 }
60 } 63 }
61 64
62 #endif /* SDL_LOADSO_LDG */ 65 #endif /* SDL_LOADSO_LDG */
66 /* vi: set ts=4 sw=4 expandtab: */