diff src/video/windx5/SDL_dx5events.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 450721ad5436
children 604d73db6802
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5events.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/windx5/SDL_dx5events.c	Tue Feb 07 06:59:48 2006 +0000
@@ -112,13 +112,13 @@
 			error = "Device not initialized";
 			break;
 		default:
-			snprintf(errbuf, SDL_arraysize(errbuf),
+			SDL_snprintf(errbuf, SDL_arraysize(errbuf),
 			         "%s: Unknown DirectInput error: 0x%x",
 								function, code);
 			break;
 	}
 	if ( ! errbuf[0] ) {
-		snprintf(errbuf, SDL_arraysize(errbuf), "%s: %s", function, error);
+		SDL_snprintf(errbuf, SDL_arraysize(errbuf), "%s: %s", function, error);
 	}
 	SDL_SetError("%s", errbuf);
 	return;
@@ -199,7 +199,7 @@
 		}
 
 		/* Set buffered input -- we aren't polling */
-		memset(&dipdw, 0, sizeof(dipdw));
+		SDL_memset(&dipdw, 0, sizeof(dipdw));
 		dipdw.diph.dwSize = sizeof(dipdw);
 		dipdw.diph.dwHeaderSize = sizeof(dipdw.diph);
 		dipdw.diph.dwObj = 0;
@@ -598,7 +598,7 @@
 			result = IDirectInputDevice2_Poll(SDL_DIdev[i]);
 			if ( (result == DIERR_INPUTLOST) ||
 					(result == DIERR_NOTACQUIRED) ) {
-				if ( strcmp(inputs[i].name, "mouse") == 0 ) {
+				if ( SDL_strcmp(inputs[i].name, "mouse") == 0 ) {
 					mouse_lost = 1;
 				}
 				IDirectInputDevice2_Acquire(SDL_DIdev[i]);
@@ -621,7 +621,7 @@
 							evtbuf, &numevents, 0);
 		if ( (result == DIERR_INPUTLOST) ||
 					(result == DIERR_NOTACQUIRED) ) {
-			if ( strcmp(inputs[event].name, "mouse") == 0 ) {
+			if ( SDL_strcmp(inputs[event].name, "mouse") == 0 ) {
 				mouse_lost = 1;
 			}
 			IDirectInputDevice2_Acquire(SDL_DIdev[event]);
@@ -850,7 +850,7 @@
 
 int DX5_CreateWindow(_THIS)
 {
-	char *windowid = getenv("SDL_WINDOWID");
+	char *windowid = SDL_getenv("SDL_WINDOWID");
 	int i;
 
 	/* Clear out DirectInput variables in case we fail */
@@ -864,7 +864,7 @@
 
 	SDL_windowid = (windowid != NULL);
 	if ( SDL_windowid ) {
-		SDL_Window = (HWND)strtol(windowid, NULL, 0);
+		SDL_Window = (HWND)SDL_strtol(windowid, NULL, 0);
 		if ( SDL_Window == NULL ) {
 			SDL_SetError("Couldn't get user specified window");
 			return(-1);