mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-24 18:00:54 +00:00
fcpp: Fixed expansion for ## operands, and enable FPPTAG_RIGHTCONCAT. Closes #3629." (#3842)
This commit is contained in:
committed by
GitHub
parent
65551a7db1
commit
c2fb64201b
4
3rdparty/fcpp/cpp4.c
vendored
4
3rdparty/fcpp/cpp4.c
vendored
@@ -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
10
3rdparty/fcpp/cpp6.c
vendored
@@ -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) {
|
||||
|
||||
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user