From be826386838ea9f8dbc7cc3a6987300f04dc466b Mon Sep 17 00:00:00 2001 From: borutr Date: Sat, 17 Nov 2007 19:04:58 +0000 Subject: [PATCH] as/hc08/asstore.c, as/mcs51/asstore.c: deleted git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4970 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 2 +- as/hc08/asstore.c | 44 -------------------------------------------- as/mcs51/asstore.c | 44 -------------------------------------------- 3 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 as/hc08/asstore.c delete mode 100644 as/mcs51/asstore.c diff --git a/ChangeLog b/ChangeLog index 8c2c58d1..33c6111c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,7 +16,7 @@ * as/asxxsrc: created as/asxxsrc/assym.c, as/asxxsrc/strcmpi.c: moved as/hc08/assym.c, as/mcs51/assym.c, as/strcmpi.c, - as/z80/assym.c: deleted + as/z80/assym.c, as/hc08/asstore.c, as/mcs51/asstore.c: deleted as/hc08/Makefile.bcc, as/hc08/Makefile.in, as/hc08/as_hc08.dsp, as/hc08/asm.h, as/link/hc08/Makefile.bcc, as/link/hc08/Makefile.in, as/link/hc08/link_hc08.dsp, as/link/mcs51/Makefile.bcc, diff --git a/as/hc08/asstore.c b/as/hc08/asstore.c deleted file mode 100644 index 947c7b81..00000000 --- a/as/hc08/asstore.c +++ /dev/null @@ -1,44 +0,0 @@ -/* strstore.c */ - -#include -#include -#include -#include "asm.h" - -/* - * Allocate space for "str", copy str into new space - * Return a pointer to the allocated name, or NULL if out of memory - */ -char *StoreString( char *str ) -{ - /* To avoid wasting memory headers on small allocations, we - / allocate a big chunk and parcel it out as required. - / These static variables remember our hunk - */ - #define STR_STORE_HUNK 2000 - static char *pNextFree = NULL; - static int bytesLeft = 0; - - int length; - char *pStoredString; - - length = strlen( str ) + 1; /* what we need, including null */ - - if (length > bytesLeft) - { - /* no space. Allocate a new hunk. We lose the pointer to any - / old hunk. We don't care, as the names are never deleted. - */ - pNextFree = (char*)new( STR_STORE_HUNK ); - bytesLeft = STR_STORE_HUNK; - } - - /* Copy the name and terminating null into the name store */ - pStoredString = pNextFree; - memcpy( pStoredString, str, length ); - - pNextFree += length; - bytesLeft -= length; - - return pStoredString; -} diff --git a/as/mcs51/asstore.c b/as/mcs51/asstore.c deleted file mode 100644 index 947c7b81..00000000 --- a/as/mcs51/asstore.c +++ /dev/null @@ -1,44 +0,0 @@ -/* strstore.c */ - -#include -#include -#include -#include "asm.h" - -/* - * Allocate space for "str", copy str into new space - * Return a pointer to the allocated name, or NULL if out of memory - */ -char *StoreString( char *str ) -{ - /* To avoid wasting memory headers on small allocations, we - / allocate a big chunk and parcel it out as required. - / These static variables remember our hunk - */ - #define STR_STORE_HUNK 2000 - static char *pNextFree = NULL; - static int bytesLeft = 0; - - int length; - char *pStoredString; - - length = strlen( str ) + 1; /* what we need, including null */ - - if (length > bytesLeft) - { - /* no space. Allocate a new hunk. We lose the pointer to any - / old hunk. We don't care, as the names are never deleted. - */ - pNextFree = (char*)new( STR_STORE_HUNK ); - bytesLeft = STR_STORE_HUNK; - } - - /* Copy the name and terminating null into the name store */ - pStoredString = pNextFree; - memcpy( pStoredString, str, length ); - - pNextFree += length; - bytesLeft -= length; - - return pStoredString; -} -- 2.30.2