diff src/video/nanox/SDL_nximage.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 b8d311d90021
children c71e05b4dc2e
line wrap: on
line diff
--- a/src/video/nanox/SDL_nximage.c	Tue Feb 07 07:03:29 2006 +0000
+++ b/src/video/nanox/SDL_nximage.c	Tue Feb 07 09:29:18 2006 +0000
@@ -25,9 +25,8 @@
     clare@setabox.com
 */
 
-#include <stdlib.h>
-#include <string.h>
-
+#include "SDL_stdlib.h"
+#include "SDL_string.h"
 #include "SDL_error.h"
 
 #include "SDL_nximage_c.h"
@@ -106,7 +105,7 @@
         else
         {
             for (j = h; j > 0; -- j, src += yinc, dest += destinc)
-                memcpy (dest, src, rowinc) ;
+                SDL_memcpy (dest, src, rowinc) ;
         }
         if (!Clientfb) {
             if (currently_fullscreen) {
@@ -128,13 +127,13 @@
     
     Dprintf ("enter NX_SetupImage\n") ;
 
-    screen -> pixels = (void *) malloc (size) ;
+    screen -> pixels = (void *) SDL_malloc (size) ;
 
     if (!Clientfb) {
-        Image_buff = (unsigned char *) malloc (size) ;
+        Image_buff = (unsigned char *) SDL_malloc (size) ;
         if (screen -> pixels == NULL || Image_buff == NULL) {
-            free (screen -> pixels) ;
-            free (Image_buff) ;
+            SDL_free (screen -> pixels) ;
+            SDL_free (Image_buff) ;
             SDL_OutOfMemory () ;
             return -1 ;
         }
@@ -152,8 +151,8 @@
 {
     Dprintf ("enter NX_DestroyImage\n") ;
     
-    if (SDL_Image) free (SDL_Image) ;
-    if (Image_buff) free (Image_buff) ;
+    if (SDL_Image) SDL_free (SDL_Image) ;
+    if (Image_buff) SDL_free (Image_buff) ;
     if (screen) screen -> pixels = NULL ;
     
     Dprintf ("leave NX_DestroyImage\n") ;
@@ -215,7 +214,7 @@
         rowinc = xinc * this -> screen -> w;
 
         for (j = this -> screen -> h; j > 0; -- j, src += yinc, dest += fbinfo.pitch)
-            memcpy (dest, src, rowinc) ;
+            SDL_memcpy (dest, src, rowinc) ;
     }
     else
 #endif