Mercurial > sdl-ios-xcode
comparison src/loadso/macos/SDL_loadso.c @ 1336:3692456e7b0f
Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 06:59:48 +0000 |
parents | c9b51268668f |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
50 Ptr mainAddr; | 50 Ptr mainAddr; |
51 Str255 errName; | 51 Str255 errName; |
52 OSErr error; | 52 OSErr error; |
53 char psofile[512]; | 53 char psofile[512]; |
54 | 54 |
55 strncpy(psofile, sofile, SDL_TABLESIZE(psofile)); | 55 SDL_strncpy(psofile, sofile, SDL_TABLESIZE(psofile)); |
56 psofile[SDL_TABLESIZE(psofile)-1] = '\0'; | 56 psofile[SDL_TABLESIZE(psofile)-1] = '\0'; |
57 error = GetSharedLibrary(C2PStr(psofile), kCompiledCFragArch, | 57 error = GetSharedLibrary(C2PStr(psofile), kCompiledCFragArch, |
58 kLoadCFrag, &library_id, &mainAddr, errName); | 58 kLoadCFrag, &library_id, &mainAddr, errName); |
59 switch (error) { | 59 switch (error) { |
60 case noErr: | 60 case noErr: |
88 const char *loaderror = NULL; | 88 const char *loaderror = NULL; |
89 CFragSymbolClass class; | 89 CFragSymbolClass class; |
90 CFragConnectionID library_id = (CFragConnectionID)handle; | 90 CFragConnectionID library_id = (CFragConnectionID)handle; |
91 char pname[512]; | 91 char pname[512]; |
92 | 92 |
93 strncpy(pname, name, SDL_TABLESIZE(pname)); | 93 SDL_strncpy(pname, name, SDL_TABLESIZE(pname)); |
94 pname[SDL_TABLESIZE(pname)-1] = '\0'; | 94 pname[SDL_TABLESIZE(pname)-1] = '\0'; |
95 if ( FindSymbol(library_id, C2PStr(pname), | 95 if ( FindSymbol(library_id, C2PStr(pname), |
96 (char **)&symbol, &class) != noErr ) { | 96 (char **)&symbol, &class) != noErr ) { |
97 loaderror = "Symbol not found"; | 97 loaderror = "Symbol not found"; |
98 } | 98 } |