From: <jt...@us...> - 2007-04-15 22:35:29
|
Revision: 248 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=248&view=rev Author: jtytgat Date: 2007-04-15 15:35:27 -0700 (Sun, 15 Apr 2007) Log Message: ----------- Get rid of realloc() (as REALLOC()) implementation Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/support/m.h Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/support/doc/realloc branches/simplified-build/!OsLib/Tools/support/realloc.c branches/simplified-build/!OsLib/Tools/support/realloc.h Deleted: branches/simplified-build/!OsLib/Tools/support/doc/realloc =================================================================== --- branches/simplified-build/!OsLib/Tools/support/doc/realloc 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/doc/realloc 2007-04-15 22:35:27 UTC (rev 248) @@ -1,4 +0,0 @@ -realloc.c ---------- - - Just a portable realloc with no bugs. It's called REALLOC, though. Modified: branches/simplified-build/!OsLib/Tools/support/m.h =================================================================== --- branches/simplified-build/!OsLib/Tools/support/m.h 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/m.h 2007-04-15 22:35:27 UTC (rev 248) @@ -26,11 +26,6 @@ /*From CLib*/ #include <stdlib.h> -/*From Support*/ -#ifndef realloc_H - #include "realloc.h" -#endif - #ifndef trace_H #include "trace.h" #endif @@ -75,7 +70,7 @@ #define m_ALLOC(size) malloc (size) #define m_CALLOC(count, size) calloc (count, size) #define m_FREE(ptr, size) free (ptr) - #define m_REALLOC(ptr, old_size, size) REALLOC (ptr, size) + #define m_REALLOC(ptr, old_size, size) realloc (ptr, size) #define m_SUMMARY() SKIP #define m_VALIDATE_ADDRESS(ptr) ((void *) (ptr)) #endif Deleted: branches/simplified-build/!OsLib/Tools/support/realloc.c =================================================================== --- branches/simplified-build/!OsLib/Tools/support/realloc.c 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/realloc.c 2007-04-15 22:35:27 UTC (rev 248) @@ -1,55 +0,0 @@ -/*realloc.c - portable realloc with no bugs!*/ - -/*OSLib---efficient, type-safe, transparent, extensible,\n" - register-safe A P I coverage of RISC O S*/ -/*Copyright \xA9 1994 Jonathan Coxhead*/ - -/* - OSLib is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - OSLib is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this programme; if not, write to the Free Software - Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. -*/ - -#include <stdlib.h> -#include <string.h> - -#include "realloc.h" - -void *REALLOC -( - void *ptr, - size_t size -) -{ - if (ptr != NULL && size != 0) - { - void *tmp; - - if ((tmp = malloc (size)) == NULL) - return NULL; - - memcpy (tmp, ptr, size); - - free (ptr); - - return tmp; - } - else if (size != 0) - return malloc (size); - else - { - /*ptr != NULL*/ - free (ptr); - return NULL; - } -} Deleted: branches/simplified-build/!OsLib/Tools/support/realloc.h =================================================================== --- branches/simplified-build/!OsLib/Tools/support/realloc.h 2007-04-15 14:07:13 UTC (rev 247) +++ branches/simplified-build/!OsLib/Tools/support/realloc.h 2007-04-15 22:35:27 UTC (rev 248) @@ -1,30 +0,0 @@ -#ifndef realloc_H -#define realloc_H - -/*realloc.c - portable realloc with no bugs!*/ - -/*OSLib---efficient, type-safe, transparent, extensible,\n" - register-safe A P I coverage of RISC O S*/ -/*Copyright \xA9 1994 Jonathan Coxhead*/ - -/* - OSLib is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - OSLib is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this programme; if not, write to the Free Software - Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. -*/ - -#include <stddef.h> - -extern void *REALLOC (void *ptr, size_t size); - -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |