diff src/video/bwindow/SDL_sysyuv.cc @ 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 c71e05b4dc2e
line wrap: on
line diff
--- a/src/video/bwindow/SDL_sysyuv.cc	Tue Feb 07 07:03:29 2006 +0000
+++ b/src/video/bwindow/SDL_sysyuv.cc	Tue Feb 07 09:29:18 2006 +0000
@@ -22,10 +22,7 @@
 
 /* This is the BeOS version of SDL YUV video overlays */
 
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
+#include "SDL_stdlib.h"
 #include "SDL_error.h"
 #include "SDL_video.h"
 #include "SDL_sysyuv.h"
@@ -158,7 +155,7 @@
 	}
 
     /* Create the overlay structure */
-    overlay = (SDL_Overlay*)calloc(1, sizeof(SDL_Overlay));
+    overlay = (SDL_Overlay*)SDL_calloc(1, sizeof(SDL_Overlay));
 
     if (overlay == NULL)
     {
@@ -176,7 +173,7 @@
     overlay->hwfuncs = &be_yuvfuncs;
 
     /* Create the pixel data and lookup tables */
-    hwdata = (struct private_yuvhwdata*)calloc(1, sizeof(struct private_yuvhwdata));
+    hwdata = (struct private_yuvhwdata*)SDL_calloc(1, sizeof(struct private_yuvhwdata));
 
     if (hwdata == NULL)
     {
@@ -215,8 +212,8 @@
 	overlay->hwdata->bbitmap = bbitmap;
 	
 	overlay->planes = planes;
-	overlay->pitches = (Uint16*)calloc(overlay->planes, sizeof(Uint16));
-	overlay->pixels  = (Uint8**)calloc(overlay->planes, sizeof(Uint8*));
+	overlay->pitches = (Uint16*)SDL_calloc(overlay->planes, sizeof(Uint16));
+	overlay->pixels  = (Uint8**)SDL_calloc(overlay->planes, sizeof(Uint8*));
 	if (!overlay->pitches || !overlay->pixels)
 	{
         SDL_OutOfMemory();