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

@ -84,7 +84,7 @@ static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec);
static int Audio_Available(void)
{
unsigned long dummy;
const char *envr = getenv("SDL_AUDIODRIVER");
const char *envr = SDL_getenv("SDL_AUDIODRIVER");
SDL_MintAudio_mint_present = (Getcookie(C_MiNT, &dummy) == C_FOUND);
@ -94,7 +94,7 @@ static int Audio_Available(void)
}
/* Check if user asked a different audio driver */
if ((envr) && (strcmp(envr, MINT_AUDIO_DRIVER_NAME)!=0)) {
if ((envr) && (SDL_strcmp(envr, MINT_AUDIO_DRIVER_NAME)!=0)) {
DEBUG_PRINT((DEBUG_NAME "user asked a different audio driver\n"));
return(0);
}
@ -124,8 +124,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);
}
static SDL_AudioDevice *Audio_CreateDevice(int devindex)
@ -133,20 +133,20 @@ static SDL_AudioDevice *Audio_CreateDevice(int devindex)
SDL_AudioDevice *this;
/* Initialize all variables that we clean on shutdown */
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 = Mint_OpenAudio;
@ -285,7 +285,7 @@ static void Mint_CheckExternalClock(_THIS)
DEBUG_PRINT((DEBUG_NAME "Not enough memory for the measure\n"));
return;
}
memset(buffer, 0, SIZE_BUF_CLOCK_MEASURE);
SDL_memset(buffer, 0, SIZE_BUF_CLOCK_MEASURE);
Buffoper(0);
Settracks(0,0);
@ -477,7 +477,7 @@ static int Mint_OpenAudio(_THIS, SDL_AudioSpec *spec)
}
SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + spec->size ;
SDL_MintAudio_numbuf=0;
memset(SDL_MintAudio_audiobuf[0], spec->silence, spec->size *2);
SDL_memset(SDL_MintAudio_audiobuf[0], spec->silence, spec->size *2);
SDL_MintAudio_audiosize = spec->size;
SDL_MintAudio_mutex = 0;