src/video/directfb/SDL_DirectFB_video.c
changeset 1338 604d73db6802
parent 1336 3692456e7b0f
child 1358 c71e05b4dc2e
     1.1 --- a/src/video/directfb/SDL_DirectFB_video.c	Tue Feb 07 07:03:29 2006 +0000
     1.2 +++ b/src/video/directfb/SDL_DirectFB_video.c	Tue Feb 07 09:29:18 2006 +0000
     1.3 @@ -27,9 +27,6 @@
     1.4  /* DirectFB video driver implementation.
     1.5  */
     1.6  
     1.7 -#include <stdlib.h>
     1.8 -#include <string.h>
     1.9 -#include <stdio.h>
    1.10  #include <fcntl.h>
    1.11  #include <unistd.h>
    1.12  #include <sys/mman.h>
    1.13 @@ -38,6 +35,8 @@
    1.14  #include <directfb_version.h>
    1.15  
    1.16  #include "SDL.h"
    1.17 +#include "SDL_stdlib.h"
    1.18 +#include "SDL_string.h"
    1.19  #include "SDL_error.h"
    1.20  #include "SDL_video.h"
    1.21  #include "SDL_mouse.h"
    1.22 @@ -110,7 +109,7 @@
    1.23    device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
    1.24    if (device)
    1.25      {
    1.26 -      memset (device, 0, (sizeof *device));
    1.27 +      SDL_memset (device, 0, (sizeof *device));
    1.28        device->hidden = (struct SDL_PrivateVideoData *) malloc (sizeof (*device->hidden));
    1.29      }
    1.30    if (device == NULL  ||  device->hidden == NULL)
    1.31 @@ -122,7 +121,7 @@
    1.32          }
    1.33        return(0);
    1.34      }
    1.35 -  memset (device->hidden, 0, sizeof (*device->hidden));
    1.36 +  SDL_memset (device->hidden, 0, sizeof (*device->hidden));
    1.37  
    1.38    /* Set the function pointers */
    1.39    device->VideoInit = DirectFB_VideoInit;
    1.40 @@ -195,7 +194,7 @@
    1.41  
    1.42    HIDDEN->nummodes++;
    1.43  
    1.44 -  enumrect = calloc(1, sizeof(struct DirectFBEnumRect));
    1.45 +  enumrect = SDL_calloc(1, sizeof(struct DirectFBEnumRect));
    1.46    if (!enumrect)
    1.47      {
    1.48        SDL_OutOfMemory();
    1.49 @@ -294,14 +293,14 @@
    1.50    SDL_Palette *palette;
    1.51    SDL_Color   *colors;
    1.52  
    1.53 -  palette = calloc (1, sizeof(SDL_Palette));
    1.54 +  palette = SDL_calloc (1, sizeof(SDL_Palette));
    1.55    if (!palette)
    1.56      {
    1.57        SDL_OutOfMemory();
    1.58        return NULL;
    1.59      }
    1.60  
    1.61 -  colors = calloc (size, sizeof(SDL_Color));
    1.62 +  colors = SDL_calloc (size, sizeof(SDL_Color));
    1.63    if (!colors)
    1.64      {
    1.65        SDL_OutOfMemory();
    1.66 @@ -432,7 +431,7 @@
    1.67        goto error;
    1.68      }
    1.69  
    1.70 -  HIDDEN->modelist = calloc (HIDDEN->nummodes + 1, sizeof(SDL_Rect *));
    1.71 +  HIDDEN->modelist = SDL_calloc (HIDDEN->nummodes + 1, sizeof(SDL_Rect *));
    1.72    if (!HIDDEN->modelist)
    1.73      {
    1.74        SDL_OutOfMemory();
    1.75 @@ -614,7 +613,7 @@
    1.76    else if (!current->hwdata)
    1.77      {
    1.78        /* Allocate the hardware acceleration data */
    1.79 -      current->hwdata = (struct private_hwdata *) calloc (1, sizeof(*current->hwdata));
    1.80 +      current->hwdata = (struct private_hwdata *) SDL_calloc (1, sizeof(*current->hwdata));
    1.81        if (!current->hwdata)
    1.82          {
    1.83            SDL_OutOfMemory();
    1.84 @@ -821,7 +820,7 @@
    1.85      return -1;
    1.86  
    1.87    /* Allocate the hardware acceleration data */
    1.88 -  surface->hwdata = (struct private_hwdata *) calloc (1, sizeof(*surface->hwdata));
    1.89 +  surface->hwdata = (struct private_hwdata *) SDL_calloc (1, sizeof(*surface->hwdata));
    1.90    if (surface->hwdata == NULL)
    1.91      {
    1.92        SDL_OutOfMemory();