diff src/video/x11/SDL_x11gl.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 e94b0d7c33bc
children 604d73db6802
line wrap: on
line diff
--- a/src/video/x11/SDL_x11gl.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/x11/SDL_x11gl.c	Tue Feb 07 06:59:48 2006 +0000
@@ -20,7 +20,7 @@
     slouken@libsdl.org
 */
 
-#include <stdlib.h>	/* For getenv() prototype */
+#include <stdlib.h>	/* For SDL_getenv() prototype */
 #include <string.h>
 
 #include "SDL_events_c.h"
@@ -141,7 +141,7 @@
 	}
 
 #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */
-	if ( !getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) {
+	if ( !SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) {
 		attribs[i++] = GLX_X_VISUAL_TYPE;
 		attribs[i++] = GLX_DIRECT_COLOR;
 	}
@@ -151,7 +151,7 @@
  	glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
 						  SDL_Screen, attribs);
 #ifdef GLX_DIRECT_COLOR
-	if( !glx_visualinfo && !getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) { /* No DirectColor visual?  Try again.. */
+	if( !glx_visualinfo && !SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) { /* No DirectColor visual?  Try again.. */
 		attribs[i-3] = None;
  		glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
 						  SDL_Screen, attribs);
@@ -389,7 +389,7 @@
 	}
 
 	if ( path == NULL ) {
-		path = getenv("SDL_VIDEO_GL_DRIVER");
+		path = SDL_getenv("SDL_VIDEO_GL_DRIVER");
 		if ( path == NULL ) {
 			path = DEFAULT_OPENGL;
 		}
@@ -454,10 +454,10 @@
 	this->gl_config.dll_handle = handle;
 	this->gl_config.driver_loaded = 1;
 	if ( path ) {
-		strncpy(this->gl_config.driver_path, path,
+		SDL_strncpy(this->gl_config.driver_path, path,
 			sizeof(this->gl_config.driver_path)-1);
 	} else {
-		strcpy(this->gl_config.driver_path, "");
+		SDL_strcpy(this->gl_config.driver_path, "");
 	}
 	return 0;
 }
@@ -476,9 +476,9 @@
 #undef do_dlsym
 #endif
 	retval = do_dlsym(handle, proc);
-	if (!retval && strlen(proc) <= 1022) {
+	if (!retval && SDL_strlen(proc) <= 1022) {
 		procname[0] = '_';
-		strcpy(procname + 1, proc);
+		SDL_strcpy(procname + 1, proc);
 		retval = do_dlsym(handle, procname);
 	}
 	return retval;