Mercurial > sdl-ios-xcode
comparison src/video/Xext/Xxf86dga/XF86DGA.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 | 0c105755b110 |
children | 604d73db6802 |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
405 AddMap(void) | 405 AddMap(void) |
406 { | 406 { |
407 MapPtr *old; | 407 MapPtr *old; |
408 | 408 |
409 old = mapList; | 409 old = mapList; |
410 mapList = realloc(mapList, sizeof(MapPtr) * (numMaps + 1)); | 410 mapList = SDL_realloc(mapList, sizeof(MapPtr) * (numMaps + 1)); |
411 if (!mapList) { | 411 if (!mapList) { |
412 mapList = old; | 412 mapList = old; |
413 return NULL; | 413 return NULL; |
414 } | 414 } |
415 mapList[numMaps] = malloc(sizeof(MapRec)); | 415 mapList[numMaps] = SDL_malloc(sizeof(MapRec)); |
416 if (!mapList[numMaps]) | 416 if (!mapList[numMaps]) |
417 return NULL; | 417 return NULL; |
418 return mapList[numMaps++]; | 418 return mapList[numMaps++]; |
419 } | 419 } |
420 | 420 |
422 AddScr(void) | 422 AddScr(void) |
423 { | 423 { |
424 ScrPtr *old; | 424 ScrPtr *old; |
425 | 425 |
426 old = scrList; | 426 old = scrList; |
427 scrList = realloc(scrList, sizeof(ScrPtr) * (numScrs + 1)); | 427 scrList = SDL_realloc(scrList, sizeof(ScrPtr) * (numScrs + 1)); |
428 if (!scrList) { | 428 if (!scrList) { |
429 scrList = old; | 429 scrList = old; |
430 return NULL; | 430 return NULL; |
431 } | 431 } |
432 scrList[numScrs] = malloc(sizeof(ScrRec)); | 432 scrList[numScrs] = SDL_malloc(sizeof(ScrRec)); |
433 if (!scrList[numScrs]) | 433 if (!scrList[numScrs]) |
434 return NULL; | 434 return NULL; |
435 return scrList[numScrs++]; | 435 return scrList[numScrs++]; |
436 } | 436 } |
437 | 437 |