diff src/video/cybergfx/SDL_cgxmodes.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/cybergfx/SDL_cgxmodes.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxmodes.c	Tue Feb 07 06:59:48 2006 +0000
@@ -137,12 +137,12 @@
 					{
 						nmodes++;
 
-						SDL_modelist = (SDL_Rect **)realloc(SDL_modelist,(nmodes+1)*sizeof(SDL_Rect *));
+						SDL_modelist = (SDL_Rect **)SDL_realloc(SDL_modelist,(nmodes+1)*sizeof(SDL_Rect *));
 						SDL_modelist[nmodes]=NULL;
 
 						if ( SDL_modelist )
 						{
-							SDL_modelist[nmodes-1] = (SDL_Rect *)malloc(sizeof(SDL_Rect));
+							SDL_modelist[nmodes-1] = (SDL_Rect *)SDL_malloc(sizeof(SDL_Rect));
 
 							if ( SDL_modelist[nmodes-1] == NULL )
 								break;
@@ -175,10 +175,10 @@
 	}
 
     if ( SDL_modelist == NULL ) {
-        SDL_modelist = (SDL_Rect **)malloc((1+1)*sizeof(SDL_Rect *));
+        SDL_modelist = (SDL_Rect **)SDL_malloc((1+1)*sizeof(SDL_Rect *));
         i = 0;
         if ( SDL_modelist ) {
-            SDL_modelist[i] = (SDL_Rect *)malloc(sizeof(SDL_Rect));
+            SDL_modelist[i] = (SDL_Rect *)SDL_malloc(sizeof(SDL_Rect));
             if ( SDL_modelist[i] ) {
                 SDL_modelist[i]->x = 0;
                 SDL_modelist[i]->y = 0;
@@ -238,9 +238,9 @@
 
     if ( SDL_modelist ) {
         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;
     }
 }