comparison 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
comparison
equal deleted inserted replaced
1335:c39265384763 1336:3692456e7b0f
402 return(keysym); 402 return(keysym);
403 } 403 }
404 404
405 int DIB_CreateWindow(_THIS) 405 int DIB_CreateWindow(_THIS)
406 { 406 {
407 char *windowid = getenv("SDL_WINDOWID"); 407 char *windowid = SDL_getenv("SDL_WINDOWID");
408 408
409 SDL_RegisterApp(NULL, 0, 0); 409 SDL_RegisterApp(NULL, 0, 0);
410 410
411 SDL_windowid = (windowid != NULL); 411 SDL_windowid = (windowid != NULL);
412 if ( SDL_windowid ) { 412 if ( SDL_windowid ) {
413 #if defined(_WIN32_WCE) && (_WIN32_WCE < 300) 413 #if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
414 /* wince 2.1 does not have strtol */ 414 /* wince 2.1 does not have strtol */
415 wchar_t *windowid_t = malloc((strlen(windowid) + 1) * sizeof(wchar_t)); 415 wchar_t *windowid_t = SDL_malloc((SDL_strlen(windowid) + 1) * sizeof(wchar_t));
416 MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, windowid, -1, windowid_t, strlen(windowid) + 1); 416 MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, windowid, -1, windowid_t, SDL_strlen(windowid) + 1);
417 SDL_Window = (HWND)wcstol(windowid_t, NULL, 0); 417 SDL_Window = (HWND)wcstol(windowid_t, NULL, 0);
418 free(windowid_t); 418 SDL_free(windowid_t);
419 #else 419 #else
420 SDL_Window = (HWND)strtol(windowid, NULL, 0); 420 SDL_Window = (HWND)SDL_strtol(windowid, NULL, 0);
421 #endif 421 #endif
422 if ( SDL_Window == NULL ) { 422 if ( SDL_Window == NULL ) {
423 SDL_SetError("Couldn't get user specified window"); 423 SDL_SetError("Couldn't get user specified window");
424 return(-1); 424 return(-1);
425 } 425 }