Mercurial > sdl-ios-xcode
comparison src/video/Xext/Xxf86dga/XF86DGA.c @ 1338:604d73db6802
Removed uses of stdlib.h and string.h
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 09:29:18 +0000 |
parents | 3692456e7b0f |
children | 19418e4422cb |
comparison
equal
deleted
inserted
replaced
1337:c687f06c7473 | 1338:604d73db6802 |
---|---|
405 AddMap(void) | 405 AddMap(void) |
406 { | 406 { |
407 MapPtr *old; | 407 MapPtr *old; |
408 | 408 |
409 old = mapList; | 409 old = mapList; |
410 mapList = SDL_realloc(mapList, sizeof(MapPtr) * (numMaps + 1)); | 410 mapList = 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] = SDL_malloc(sizeof(MapRec)); | 415 mapList[numMaps] = 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 = SDL_realloc(scrList, sizeof(ScrPtr) * (numScrs + 1)); | 427 scrList = 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] = SDL_malloc(sizeof(ScrRec)); | 432 scrList[numScrs] = 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 |