mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Black's fix for #define macro parameters in fteqcc.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2868 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
004ffebb66
commit
ae0a8461b7
1 changed files with 9 additions and 1 deletions
|
@ -2026,6 +2026,13 @@ int QCC_PR_CheakCompConst(void)
|
|||
start = pr_file_p;
|
||||
while(1)
|
||||
{
|
||||
// handle strings correctly by ignoring them
|
||||
if (*pr_file_p == '\"')
|
||||
{
|
||||
do {
|
||||
pr_file_p++;
|
||||
} while( (pr_file_p[-1] == '\\' || pr_file_p[0] != '\"') && *pr_file_p && *pr_file_p != '\n' );
|
||||
}
|
||||
if (*pr_file_p == '(')
|
||||
plevel++;
|
||||
else if (!plevel && (*pr_file_p == ',' || *pr_file_p == ')'))
|
||||
|
@ -2042,6 +2049,8 @@ int QCC_PR_CheakCompConst(void)
|
|||
pr_file_p++;
|
||||
while(*pr_file_p == ' ' || *pr_file_p == '\t')
|
||||
pr_file_p++;
|
||||
// move back by one char because we move forward by one at the end of the loop
|
||||
pr_file_p--;
|
||||
if (param == MAXCONSTANTPARAMS)
|
||||
QCC_PR_ParseError(ERR_TOOMANYPARAMS, "Too many parameters in macro call");
|
||||
} else if (*pr_file_p == ')' )
|
||||
|
@ -2110,7 +2119,6 @@ int QCC_PR_CheakCompConst(void)
|
|||
|
||||
for (p = 0; p < param; p++)
|
||||
{
|
||||
|
||||
if (!STRCMP(qcc_token, c->params[p]))
|
||||
{
|
||||
strcat(buffer, paramoffset[p]);
|
||||
|
|
Loading…
Reference in a new issue