diff src/audio/mme/SDL_mmeaudio.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 b8d311d90021
children 604d73db6802
line wrap: on
line diff
--- a/src/audio/mme/SDL_mmeaudio.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/audio/mme/SDL_mmeaudio.c	Tue Feb 07 06:59:48 2006 +0000
@@ -43,10 +43,10 @@
 {
     if ( device ) {
 	if ( device->hidden ) {
-	    free(device->hidden);
+	    SDL_free(device->hidden);
 	    device->hidden = NULL;
 	}
-	free(device);
+	SDL_free(device);
 	device = NULL;
     }
 }
@@ -56,19 +56,19 @@
     SDL_AudioDevice *this;
 
 /* Initialize all variables that we clean on shutdown */
-    this = malloc(sizeof(SDL_AudioDevice));
+    this = SDL_malloc(sizeof(SDL_AudioDevice));
     if ( this ) {
-	memset(this, 0, (sizeof *this));
-	this->hidden = malloc((sizeof *this->hidden));
+	SDL_memset(this, 0, (sizeof *this));
+	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       =       MME_OpenAudio;
     this->WaitAudio       =       MME_WaitAudio;
@@ -92,7 +92,7 @@
     char errbuf[MAXERRORLENGTH];
 
     sprintf(errbuf, "%s: ", function);
-    len = strlen(errbuf);
+    len = SDL_strlen(errbuf);
     waveOutGetErrorText(code, errbuf+len, MAXERRORLENGTH-len);
     SDL_SetError("%s",errbuf);
 }