Make much more usage of dynamic strings (StrBufs) instead of char* and

friends. Since names and other strings are now StrBufs in many places, code
for output had to be changed.
Added support for string literals to StrBuf.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3825 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2008-03-31 20:54:45 +00:00
parent 6a7e844500
commit 9174f65e54
78 changed files with 1228 additions and 864 deletions

View File

@@ -6,10 +6,10 @@
/* */
/* */
/* */
/* (C) 2003 Ullrich von Bassewitz */
/* R<EFBFBD>merstra<EFBFBD>e 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* (C) 2003-2008, Ullrich von Bassewit */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@@ -52,13 +52,12 @@
/* The name of the symbol used to encode the size. The name of this entry is
* choosen so that it cannot be accessed by the user.
*/
static const char SizeEntryName[] = ".size";
const StrBuf SizeEntryName = LIT_STRBUF_INITIALIZER (".size");
/*****************************************************************************/
/* Code */
/* Code */
/*****************************************************************************/
@@ -68,7 +67,7 @@ SymEntry* GetSizeOfScope (SymTable* Scope)
* encodes the size, and will create a new entry if it does not exist.
*/
{
return SymFind (Scope, SizeEntryName, SYM_ALLOC_NEW);
return SymFind (Scope, &SizeEntryName, SYM_ALLOC_NEW);
}
@@ -79,7 +78,7 @@ SymEntry* GetSizeOfSymbol (SymEntry* Sym)
* does not exist.
*/
{
return SymFindLocal (Sym, SizeEntryName, SYM_ALLOC_NEW);
return SymFindLocal (Sym, &SizeEntryName, SYM_ALLOC_NEW);
}