fcpp: Fixed expansion for ## operands, and enable FPPTAG_RIGHTCONCAT. Closes #3629." (#3842)

This commit is contained in:
Branimir Karadžić
2026-07-22 21:46:00 -07:00
committed by GitHub
parent 65551a7db1
commit c2fb64201b
3 changed files with 11 additions and 7 deletions

View File

@@ -144,8 +144,8 @@ ReturnCode fpp_dodefine(struct Global *global)
}
while (global->workp > global->work && type[(unsigned)*(global->workp - 1)] == SPA)
--global->workp; /* Erase leading spaces */
// if ((ret=save(global, TOK_SEP))) /* Stuff a delimiter */
// return(ret);
if ((ret=fpp_save(global, TOK_SEP))) /* Stuff a delimiter */
return(ret);
c = fpp_skipws(global); /* Eat whitespace */
continue;
}

10
3rdparty/fcpp/cpp6.c vendored
View File

@@ -225,13 +225,13 @@ int fpp_catenate(struct Global *global, int lhs_number, ReturnCode *ret)
}
c= fpp_get(global);
if(global->rightconcat) {
*ret=fpp_macroid(global, &c); /* Scan next token */
*ret=fpp_macroid(global, &c); /* Scan and expand next token */
if(*ret)
return(FPP_FALSE);
} /* BK - BUG? Parses token into global->tokenbuf but never uses it.
else
fpp_lookid(global, c);
*/
}
else if(type[c] == LET) {
fpp_lookid(global, c); /* Scan next token into tokenbuf */
}
switch(type[c]) { /* What was it? */
case LET: /* An identifier, ... */
if ((int)strlen(token1) + (int)strlen(global->tokenbuf) >= NWORK) {

View File

@@ -916,6 +916,10 @@ namespace bgfx
m_tagptr->data = (void*)0;
m_tagptr++;
m_tagptr->tag = FPPTAG_RIGHTCONCAT;
m_tagptr->data = (void*)1;
m_tagptr++;
m_tagptr->tag = FPPTAG_INPUT_NAME;
m_tagptr->data = scratch(_filePath);
m_tagptr++;