Mercurial > sdl-ios-xcode
diff src/video/wincommon/SDL_sysmouse.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/wincommon/SDL_sysmouse.c Mon Feb 06 17:28:04 2006 +0000 +++ b/src/video/wincommon/SDL_sysmouse.c Tue Feb 07 06:59:48 2006 +0000 @@ -96,11 +96,11 @@ if ( cursor->curs != NULL ) DestroyCursor(cursor->curs); if ( cursor->ands != NULL ) - free(cursor->ands); + SDL_free(cursor->ands); if ( cursor->xors != NULL ) - free(cursor->xors); + SDL_free(cursor->xors); #endif /* !USE_STATIC_CURSOR */ - free(cursor); + SDL_free(cursor); } WMcursor *WIN_CreateWMCursor(_THIS, @@ -110,7 +110,7 @@ WMcursor *cursor; /* Allocate the cursor */ - cursor = (WMcursor *)malloc(sizeof(*cursor)); + cursor = (WMcursor *)SDL_malloc(sizeof(*cursor)); if ( cursor ) { cursor->curs = LoadCursor(NULL, IDC_ARROW); } @@ -132,7 +132,7 @@ } /* Allocate the cursor */ - cursor = (WMcursor *)malloc(sizeof(*cursor)); + cursor = (WMcursor *)SDL_malloc(sizeof(*cursor)); if ( cursor == NULL ) { SDL_SetError("Out of memory"); return(NULL); @@ -144,8 +144,8 @@ /* Pad out to the normal cursor size */ run = PAD_BITS(w); pad = PAD_BITS(allowed_x)-run; - aptr = cursor->ands = (Uint8 *)malloc((run+pad)*allowed_y); - xptr = cursor->xors = (Uint8 *)malloc((run+pad)*allowed_y); + aptr = cursor->ands = (Uint8 *)SDL_malloc((run+pad)*allowed_y); + xptr = cursor->xors = (Uint8 *)SDL_malloc((run+pad)*allowed_y); if ( (aptr == NULL) || (xptr == NULL) ) { WIN_FreeWMCursor(NULL, cursor); SDL_OutOfMemory(); @@ -158,16 +158,16 @@ memnot(aptr, mask, run); mask += run; aptr += run; - memset(xptr, 0, pad); + SDL_memset(xptr, 0, pad); xptr += pad; - memset(aptr, ~0, pad); + SDL_memset(aptr, ~0, pad); aptr += pad; } pad += run; for ( ; i<allowed_y; ++i ) { - memset(xptr, 0, pad); + SDL_memset(xptr, 0, pad); xptr += pad; - memset(aptr, ~0, pad); + SDL_memset(aptr, ~0, pad); aptr += pad; }