comparison src/video/directfb/SDL_DirectFB_yuv.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 c9b51268668f
children c71e05b4dc2e
comparison
equal deleted inserted replaced
1337:c687f06c7473 1338:604d73db6802
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 /* This is the DirectFB implementation of YUV video overlays */ 23 /* This is the DirectFB implementation of YUV video overlays */
24 24
25 #include <stdlib.h> 25 #include "SDL_stdlib.h"
26 #include <string.h>
27
28 #include "SDL_error.h" 26 #include "SDL_error.h"
29 #include "SDL_video.h" 27 #include "SDL_video.h"
30 #include "SDL_DirectFB_yuv.h" 28 #include "SDL_DirectFB_yuv.h"
31 #include "SDL_yuvfuncs.h" 29 #include "SDL_yuvfuncs.h"
32 30
146 { 144 {
147 SDL_Overlay *overlay; 145 SDL_Overlay *overlay;
148 struct private_yuvhwdata *hwdata; 146 struct private_yuvhwdata *hwdata;
149 147
150 /* Create the overlay structure */ 148 /* Create the overlay structure */
151 overlay = calloc (1, sizeof(SDL_Overlay)); 149 overlay = SDL_calloc (1, sizeof(SDL_Overlay));
152 if (!overlay) 150 if (!overlay)
153 { 151 {
154 SDL_OutOfMemory(); 152 SDL_OutOfMemory();
155 return NULL; 153 return NULL;
156 } 154 }
162 160
163 /* Set up the YUV surface function structure */ 161 /* Set up the YUV surface function structure */
164 overlay->hwfuncs = &directfb_yuvfuncs; 162 overlay->hwfuncs = &directfb_yuvfuncs;
165 163
166 /* Create the pixel data and lookup tables */ 164 /* Create the pixel data and lookup tables */
167 hwdata = calloc(1, sizeof(struct private_yuvhwdata)); 165 hwdata = SDL_calloc(1, sizeof(struct private_yuvhwdata));
168 overlay->hwdata = hwdata; 166 overlay->hwdata = hwdata;
169 if (!hwdata) 167 if (!hwdata)
170 { 168 {
171 SDL_OutOfMemory(); 169 SDL_OutOfMemory();
172 SDL_FreeYUVOverlay (overlay); 170 SDL_FreeYUVOverlay (overlay);