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...
This commit is contained in:
Sam Lantinga
2006-02-07 06:59:48 +00:00
parent b9704a2004
commit 02cc6c0f11
212 changed files with 1840 additions and 1884 deletions

View File

@@ -148,7 +148,7 @@ void SDL_ThreadedTimerCheck(void)
} else {
SDL_timers = next;
}
free(t);
SDL_free(t);
--SDL_timer_running;
removed = SDL_TRUE;
}
@@ -165,7 +165,7 @@ void SDL_ThreadedTimerCheck(void)
static SDL_TimerID SDL_AddTimerInternal(Uint32 interval, SDL_NewTimerCallback callback, void *param)
{
SDL_TimerID t;
t = (SDL_TimerID) malloc(sizeof(struct _SDL_TimerID));
t = (SDL_TimerID) SDL_malloc(sizeof(struct _SDL_TimerID));
if ( t ) {
t->interval = ROUND_RESOLUTION(interval);
t->cb = callback;
@@ -218,7 +218,7 @@ SDL_bool SDL_RemoveTimer(SDL_TimerID id)
} else {
SDL_timers = t->next;
}
free(t);
SDL_free(t);
--SDL_timer_running;
removed = SDL_TRUE;
list_changed = SDL_TRUE;
@@ -256,7 +256,7 @@ int SDL_SetTimer(Uint32 ms, SDL_TimerCallback callback)
while ( SDL_timers ) {
SDL_TimerID freeme = SDL_timers;
SDL_timers = SDL_timers->next;
free(freeme);
SDL_free(freeme);
}
SDL_timer_running = 0;
list_changed = SDL_TRUE;

View File

@@ -256,7 +256,7 @@ int SDL_SYS_TimerInit(void)
struct sigaction action;
/* Set the alarm handler (Linux specific) */
memset(&action, 0, sizeof(action));
SDL_memset(&action, 0, sizeof(action));
action.sa_handler = HandleAlarm;
action.sa_flags = SA_RESTART;
sigemptyset(&action.sa_mask);
@@ -285,7 +285,7 @@ void SDL_SYS_StopTimer(void)
{
struct itimerval timer;
memset(&timer, 0, (sizeof timer));
SDL_memset(&timer, 0, (sizeof timer));
setitimer(ITIMER_REAL, &timer, NULL);
}