diff src/video/cybergfx/SDL_cgxvideo.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_cgxvideo.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxvideo.c	Tue Feb 07 06:59:48 2006 +0000
@@ -149,7 +149,7 @@
 			this->hidden->SB[0]=this->hidden->SB[1]=NULL;
 
 			if(SDL_RastPort && SDL_RastPort != &SDL_Display->RastPort)
-				free(SDL_RastPort);
+				SDL_free(SDL_RastPort);
 
 			SDL_RastPort=NULL;
 		}
@@ -181,12 +181,12 @@
 {
 	if ( device ) {
 		if ( device->hidden ) {
-			free(device->hidden);
+			SDL_free(device->hidden);
 		}
 		if ( device->gl_data ) {
-			free(device->gl_data);
+			SDL_free(device->gl_data);
 		}
-		free(device);
+		SDL_free(device);
 	}
 }
 
@@ -195,13 +195,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));
 		device->gl_data = (struct SDL_PrivateGLData *)
-				malloc((sizeof *device->gl_data));
+				SDL_malloc((sizeof *device->gl_data));
 	}
 	if ( (device == NULL) || (device->hidden == NULL) ||
 	                         (device->gl_data == NULL) ) {
@@ -210,8 +210,8 @@
 		CGX_DeleteDevice(device);
 		return(0);
 	}
-	memset(device->hidden, 0, sizeof(*device->hidden));
-	memset(device->gl_data, 0, sizeof(*device->gl_data));
+	SDL_memset(device->hidden, 0, sizeof(*device->hidden));
+	SDL_memset(device->gl_data, 0, sizeof(*device->gl_data));
 
 	/* Set the driver flags */
 	device->handles_any_size = 1;
@@ -581,7 +581,7 @@
 	}
 
 	/* See if we have been passed a window to use */
-/*	SDL_windowid = getenv("SDL_WINDOWID"); */
+/*	SDL_windowid = SDL_getenv("SDL_WINDOWID"); */
 	SDL_windowid=NULL;
 
 	/* Create the blank cursor */
@@ -649,7 +649,7 @@
 					}
 				}
 			}
-			free(SDL_XPixels);
+			SDL_free(SDL_XPixels);
 			SDL_XPixels = NULL;
 		}
 	}
@@ -664,7 +664,7 @@
 	}
 	if ( flags & SDL_FULLSCREEN ) {
 		flags&=~SDL_RESIZABLE;
-	} else if ( getenv("SDL_VIDEO_CENTERED") ) {
+	} else if ( SDL_getenv("SDL_VIDEO_CENTERED") ) {
 		int display_w, display_h;
 
 		display_w = SDL_Display->Width;
@@ -777,7 +777,7 @@
 	    else
 		ncolors = 1 << screen->format->BitsPerPixel;
 
-	    SDL_XPixels = (Sint32 *)malloc(ncolors * sizeof(Sint32));
+	    SDL_XPixels = (Sint32 *)SDL_malloc(ncolors * sizeof(Sint32));
 
 	    if(SDL_XPixels == NULL) {
 		SDL_OutOfMemory();
@@ -836,7 +836,7 @@
 
 	if(screen->flags & SDL_DOUBLEBUF)
 	{
-		if(SDL_RastPort=malloc(sizeof(struct RastPort)))
+		if(SDL_RastPort=SDL_malloc(sizeof(struct RastPort)))
 		{
 			InitRastPort(SDL_RastPort);
 			SDL_RastPort->BitMap=this->hidden->SB[1]->sb_BitMap;