diff src/video/SDL_gamma.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 37d43bd654d7
children 604d73db6802
line wrap: on
line diff
--- a/src/video/SDL_gamma.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/SDL_gamma.c	Tue Feb 07 06:59:48 2006 +0000
@@ -165,13 +165,13 @@
 
 	/* Fill the gamma table with the new values */
 	if ( red ) {
-		memcpy(&video->gamma[0*256], red, 256*sizeof(*video->gamma));
+		SDL_memcpy(&video->gamma[0*256], red, 256*sizeof(*video->gamma));
 	}
 	if ( green ) {
-		memcpy(&video->gamma[1*256], green, 256*sizeof(*video->gamma));
+		SDL_memcpy(&video->gamma[1*256], green, 256*sizeof(*video->gamma));
 	}
 	if ( blue ) {
-		memcpy(&video->gamma[2*256], blue, 256*sizeof(*video->gamma));
+		SDL_memcpy(&video->gamma[2*256], blue, 256*sizeof(*video->gamma));
 	}
 
 	/* Gamma correction always possible on split palettes */
@@ -204,7 +204,7 @@
 
 	/* Lazily allocate the gamma table */
 	if ( ! video->gamma ) {
-		video->gamma = malloc(3*256*sizeof(*video->gamma));
+		video->gamma = SDL_malloc(3*256*sizeof(*video->gamma));
 		if ( ! video->gamma ) {
 			SDL_OutOfMemory();
 			return -1;
@@ -225,13 +225,13 @@
 
 	/* Just copy from our internal table */
 	if ( red ) {
-		memcpy(red, &video->gamma[0*256], 256*sizeof(*red));
+		SDL_memcpy(red, &video->gamma[0*256], 256*sizeof(*red));
 	}
 	if ( green ) {
-		memcpy(green, &video->gamma[1*256], 256*sizeof(*green));
+		SDL_memcpy(green, &video->gamma[1*256], 256*sizeof(*green));
 	}
 	if ( blue ) {
-		memcpy(blue, &video->gamma[2*256], 256*sizeof(*blue));
+		SDL_memcpy(blue, &video->gamma[2*256], 256*sizeof(*blue));
 	}
 	return 0;
 }