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:
@@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.de */
|
||||
/* (C) 2000-2008, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@@ -109,7 +109,7 @@ static void RepeatTokenCheck (TokList* L)
|
||||
* for and replace identifiers that are the repeat counter.
|
||||
*/
|
||||
{
|
||||
if (Tok == TOK_IDENT && L->Data != 0 && strcmp (SVal, L->Data) == 0) {
|
||||
if (Tok == TOK_IDENT && L->Data != 0 && SB_CompareStr (&SVal, L->Data) == 0) {
|
||||
/* Must replace by the repeat counter */
|
||||
Tok = TOK_INTCON;
|
||||
IVal = L->RepCount;
|
||||
@@ -143,7 +143,8 @@ void ParseRepeat (void)
|
||||
ErrorSkip ("Identifier expected");
|
||||
} else {
|
||||
/* Remember the name and skip it */
|
||||
Name = xstrdup (SVal);
|
||||
SB_Terminate (&SVal);
|
||||
Name = xstrdup (SB_GetConstBuf (&SVal));
|
||||
NextTok ();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user