diff src/video/windib/SDL_dibevents.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/windib/SDL_dibevents.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/windib/SDL_dibevents.c	Tue Feb 07 06:59:48 2006 +0000
@@ -404,7 +404,7 @@
 
 int DIB_CreateWindow(_THIS)
 {
-	char *windowid = getenv("SDL_WINDOWID");
+	char *windowid = SDL_getenv("SDL_WINDOWID");
 
 	SDL_RegisterApp(NULL, 0, 0);
 
@@ -412,12 +412,12 @@
 	if ( SDL_windowid ) {
 #if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
 		/* wince 2.1 does not have strtol */
-		wchar_t *windowid_t = malloc((strlen(windowid) + 1) * sizeof(wchar_t));
-		MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, windowid, -1, windowid_t, strlen(windowid) + 1);
+		wchar_t *windowid_t = SDL_malloc((SDL_strlen(windowid) + 1) * sizeof(wchar_t));
+		MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, windowid, -1, windowid_t, SDL_strlen(windowid) + 1);
 		SDL_Window = (HWND)wcstol(windowid_t, NULL, 0);
-		free(windowid_t);
+		SDL_free(windowid_t);
 #else
-		SDL_Window = (HWND)strtol(windowid, NULL, 0);
+		SDL_Window = (HWND)SDL_strtol(windowid, NULL, 0);
 #endif
 		if ( SDL_Window == NULL ) {
 			SDL_SetError("Couldn't get user specified window");