src/video/x11/SDL_x11gl.c
changeset 1336 3692456e7b0f
parent 1315 e94b0d7c33bc
child 1338 604d73db6802
     1.1 --- a/src/video/x11/SDL_x11gl.c	Mon Feb 06 17:28:04 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11gl.c	Tue Feb 07 06:59:48 2006 +0000
     1.3 @@ -20,7 +20,7 @@
     1.4      slouken@libsdl.org
     1.5  */
     1.6  
     1.7 -#include <stdlib.h>	/* For getenv() prototype */
     1.8 +#include <stdlib.h>	/* For SDL_getenv() prototype */
     1.9  #include <string.h>
    1.10  
    1.11  #include "SDL_events_c.h"
    1.12 @@ -141,7 +141,7 @@
    1.13  	}
    1.14  
    1.15  #ifdef GLX_DIRECT_COLOR /* Try for a DirectColor visual for gamma support */
    1.16 -	if ( !getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) {
    1.17 +	if ( !SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) {
    1.18  		attribs[i++] = GLX_X_VISUAL_TYPE;
    1.19  		attribs[i++] = GLX_DIRECT_COLOR;
    1.20  	}
    1.21 @@ -151,7 +151,7 @@
    1.22   	glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
    1.23  						  SDL_Screen, attribs);
    1.24  #ifdef GLX_DIRECT_COLOR
    1.25 -	if( !glx_visualinfo && !getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) { /* No DirectColor visual?  Try again.. */
    1.26 +	if( !glx_visualinfo && !SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ) { /* No DirectColor visual?  Try again.. */
    1.27  		attribs[i-3] = None;
    1.28   		glx_visualinfo = this->gl_data->glXChooseVisual(GFX_Display, 
    1.29  						  SDL_Screen, attribs);
    1.30 @@ -389,7 +389,7 @@
    1.31  	}
    1.32  
    1.33  	if ( path == NULL ) {
    1.34 -		path = getenv("SDL_VIDEO_GL_DRIVER");
    1.35 +		path = SDL_getenv("SDL_VIDEO_GL_DRIVER");
    1.36  		if ( path == NULL ) {
    1.37  			path = DEFAULT_OPENGL;
    1.38  		}
    1.39 @@ -454,10 +454,10 @@
    1.40  	this->gl_config.dll_handle = handle;
    1.41  	this->gl_config.driver_loaded = 1;
    1.42  	if ( path ) {
    1.43 -		strncpy(this->gl_config.driver_path, path,
    1.44 +		SDL_strncpy(this->gl_config.driver_path, path,
    1.45  			sizeof(this->gl_config.driver_path)-1);
    1.46  	} else {
    1.47 -		strcpy(this->gl_config.driver_path, "");
    1.48 +		SDL_strcpy(this->gl_config.driver_path, "");
    1.49  	}
    1.50  	return 0;
    1.51  }
    1.52 @@ -476,9 +476,9 @@
    1.53  #undef do_dlsym
    1.54  #endif
    1.55  	retval = do_dlsym(handle, proc);
    1.56 -	if (!retval && strlen(proc) <= 1022) {
    1.57 +	if (!retval && SDL_strlen(proc) <= 1022) {
    1.58  		procname[0] = '_';
    1.59 -		strcpy(procname + 1, proc);
    1.60 +		SDL_strcpy(procname + 1, proc);
    1.61  		retval = do_dlsym(handle, procname);
    1.62  	}
    1.63  	return retval;