diff src/video/macdsp/SDL_dspvideo.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 c9b51268668f
children 604d73db6802
line wrap: on
line diff
--- a/src/video/macdsp/SDL_dspvideo.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/macdsp/SDL_dspvideo.c	Tue Feb 07 06:59:48 2006 +0000
@@ -238,11 +238,11 @@
    	if (device->hidden) {
    	   
    	   if (device->hidden->dspinfo)
-	         free(device->hidden->dspinfo);
+	         SDL_free(device->hidden->dspinfo);
    	   
-   	   free(device->hidden);
+   	   SDL_free(device->hidden);
    	}
-	   free(device);	
+	   SDL_free(device);	
 	}
 }
 
@@ -251,13 +251,13 @@
 	SDL_VideoDevice *device;
 
 	/* Initialize all variables that we clean on shutdown */
-	device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice));
+	device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
 	if ( device ) {
-		memset(device, 0, sizeof (*device));
+		SDL_memset(device, 0, sizeof (*device));
 		device->hidden = (struct SDL_PrivateVideoData *)
-				malloc((sizeof *device->hidden));
+				SDL_malloc((sizeof *device->hidden));
 	    if (device->hidden)
-	        memset(device->hidden, 0, sizeof ( *(device->hidden) ) );
+	        SDL_memset(device->hidden, 0, sizeof ( *(device->hidden) ) );
 	}
 	if ( (device == NULL) || (device->hidden == NULL) ) {
 		SDL_OutOfMemory();
@@ -267,22 +267,22 @@
 			if (device->hidden)
 		        free (device->hidden);			
 			
-			free(device);
+			SDL_free(device);
 		}
 		
 		return(NULL);
 	}
 	
 	/* Allocate DrawSprocket information */
-	device->hidden->dspinfo = (struct DSpInfo *)malloc(
+	device->hidden->dspinfo = (struct DSpInfo *)SDL_malloc(
 					(sizeof *device->hidden->dspinfo));
 	if ( device->hidden->dspinfo == NULL ) {
 		SDL_OutOfMemory();
-		free(device->hidden);
-		free(device);
+		SDL_free(device->hidden);
+		SDL_free(device);
 		return(0);
 	}
-	memset(device->hidden->dspinfo, 0, (sizeof *device->hidden->dspinfo));
+	SDL_memset(device->hidden->dspinfo, 0, (sizeof *device->hidden->dspinfo));
 
 	/* Set the function pointers */
 	device->VideoInit       = DSp_VideoInit;
@@ -1384,9 +1384,9 @@
 	/* Free list of video modes */
 	if ( SDL_modelist != NULL ) {
 		for ( i=0; SDL_modelist[i]; i++ ) {
-			free(SDL_modelist[i]);
+			SDL_free(SDL_modelist[i]);
 		}
-		free(SDL_modelist);
+		SDL_free(SDL_modelist);
 		SDL_modelist = NULL;
 	}