From 581475bc6416790765c498aa3d611f6868ffb64a Mon Sep 17 00:00:00 2001 From: amber Date: Sun, 14 Nov 2004 16:18:26 +0000 Subject: Fixed some file types git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@172 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/malloc.c | 88 ++++++++++++++++++++++++++--------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'src/common/malloc.c') diff --git a/src/common/malloc.c b/src/common/malloc.c index bc40c6a3f..eda9bc218 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -1,44 +1,44 @@ -#include -#include -#include "malloc.h" - -void* aMalloc_( size_t size, const char *file, int line, const char *func ) -{ - void *ret; - -// printf("%s:%d: in func %s: malloc %d\n",file,line,func,size); - ret=malloc(size); - if(ret==NULL){ - printf("%s:%d: in func %s: malloc error out of memory!\n",file,line,func); - exit(1); - - } - return ret; -} -void* aCalloc_( size_t num, size_t size, const char *file, int line, const char *func ) -{ - void *ret; - -// printf("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size); - ret=calloc(num,size); - if(ret==NULL){ - printf("%s:%d: in func %s: calloc error out of memory!\n",file,line,func); - exit(1); - - } - return ret; -} - -void* aRealloc_( void *p, size_t size, const char *file, int line, const char *func ) -{ - void *ret; - -// printf("%s:%d: in func %s: realloc %p %d\n",file,line,func,p,size); - ret=realloc(p,size); - if(ret==NULL){ - printf("%s:%d: in func %s: realloc error out of memory!\n",file,line,func); - exit(1); - - } - return ret; -} +#include +#include +#include "malloc.h" + +void* aMalloc_( size_t size, const char *file, int line, const char *func ) +{ + void *ret; + +// printf("%s:%d: in func %s: malloc %d\n",file,line,func,size); + ret=malloc(size); + if(ret==NULL){ + printf("%s:%d: in func %s: malloc error out of memory!\n",file,line,func); + exit(1); + + } + return ret; +} +void* aCalloc_( size_t num, size_t size, const char *file, int line, const char *func ) +{ + void *ret; + +// printf("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size); + ret=calloc(num,size); + if(ret==NULL){ + printf("%s:%d: in func %s: calloc error out of memory!\n",file,line,func); + exit(1); + + } + return ret; +} + +void* aRealloc_( void *p, size_t size, const char *file, int line, const char *func ) +{ + void *ret; + +// printf("%s:%d: in func %s: realloc %p %d\n",file,line,func,p,size); + ret=realloc(p,size); + if(ret==NULL){ + printf("%s:%d: in func %s: realloc error out of memory!\n",file,line,func); + exit(1); + + } + return ret; +} -- cgit v1.2.3-70-g09d2