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:
Sam Lantinga 2006-02-07 06:59:48 +00:00
parent 00f6d8e5e3
commit 5d53175e4d
212 changed files with 1840 additions and 1884 deletions

View file

@ -170,7 +170,7 @@ static const char *get_audio_device(int channels)
{
const char *device;
device = getenv("AUDIODEV"); /* Is there a standard variable name? */
device = SDL_getenv("AUDIODEV"); /* Is there a standard variable name? */
if ( device == NULL ) {
if (channels == 6) device = "surround51";
else if (channels == 4) device = "surround40";
@ -202,8 +202,8 @@ static int Audio_Available(void)
static void Audio_DeleteDevice(SDL_AudioDevice *device)
{
free(device->hidden);
free(device);
SDL_free(device->hidden);
SDL_free(device);
UnloadALSALibrary();
}
@ -213,20 +213,20 @@ static SDL_AudioDevice *Audio_CreateDevice(int devindex)
/* Initialize all variables that we clean on shutdown */
LoadALSALibrary();
this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice));
this = (SDL_AudioDevice *)SDL_malloc(sizeof(SDL_AudioDevice));
if ( this ) {
memset(this, 0, (sizeof *this));
SDL_memset(this, 0, (sizeof *this));
this->hidden = (struct SDL_PrivateAudioData *)
malloc((sizeof *this->hidden));
SDL_malloc((sizeof *this->hidden));
}
if ( (this == NULL) || (this->hidden == NULL) ) {
SDL_OutOfMemory();
if ( this ) {
free(this);
SDL_free(this);
}
return(0);
}
memset(this->hidden, 0, (sizeof *this->hidden));
SDL_memset(this->hidden, 0, (sizeof *this->hidden));
/* Set the function pointers */
this->OpenAudio = ALSA_OpenAudio;
@ -435,7 +435,7 @@ static int ALSA_OpenAudio(_THIS, SDL_AudioSpec *spec)
ALSA_CloseAudio(this);
return(-1);
}
memset(mixbuf, spec->silence, spec->size);
SDL_memset(mixbuf, spec->silence, spec->size);
/* Get the parent process id (we're the parent of the audio thread) */
parent = getpid();