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... --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401340
This commit is contained in:
parent
00f6d8e5e3
commit
5d53175e4d
212 changed files with 1840 additions and 1884 deletions
|
@ -137,7 +137,7 @@ const char *SDL_SYS_JoystickName(int index)
|
|||
if ( len >= sizeof(name) ) {
|
||||
len = (sizeof(name) - 1);
|
||||
}
|
||||
memcpy(name, &SYS_DevDef[index].deviceName[1], len);
|
||||
SDL_memcpy(name, &SYS_DevDef[index].deviceName[1], len);
|
||||
name[len] = '\0';
|
||||
|
||||
return name;
|
||||
|
@ -161,14 +161,14 @@ int SDL_SYS_JoystickOpen(SDL_Joystick *joystick)
|
|||
index = joystick->index;
|
||||
|
||||
/* allocate memory for system specific hardware data */
|
||||
joystick->hwdata = (struct joystick_hwdata *) malloc(sizeof(*joystick->hwdata));
|
||||
joystick->hwdata = (struct joystick_hwdata *) SDL_malloc(sizeof(*joystick->hwdata));
|
||||
if (joystick->hwdata == NULL)
|
||||
{
|
||||
SDL_OutOfMemory();
|
||||
return(-1);
|
||||
}
|
||||
memset(joystick->hwdata, 0, sizeof(*joystick->hwdata));
|
||||
strcpy(joystick->hwdata->name, SDL_SYS_JoystickName(index));
|
||||
SDL_memset(joystick->hwdata, 0, sizeof(*joystick->hwdata));
|
||||
SDL_strcpy(joystick->hwdata->name, SDL_SYS_JoystickName(index));
|
||||
joystick->name = joystick->hwdata->name;
|
||||
|
||||
ISpElementList_ExtractByKind(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue