mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 11:12:07 +00:00
Merge pull request #411 from ISSOtm/recursion_limit
Add a recursion limit
This commit is contained in:
@@ -35,6 +35,8 @@ struct sContext {
|
||||
uint32_t nREPTBlockSize;
|
||||
};
|
||||
|
||||
extern unsigned int nMaxRecursionDepth;
|
||||
|
||||
void fstk_RunInclude(char *tzFileName);
|
||||
void fstk_RunMacroArg(int32_t s);
|
||||
void fstk_Init(char *s);
|
||||
|
||||
@@ -40,6 +40,13 @@ enum eLexerState {
|
||||
LEX_STATE_MACROARGS
|
||||
};
|
||||
|
||||
struct sStringExpansionPos {
|
||||
char *tzName;
|
||||
char *pBuffer;
|
||||
char *pBufferPos;
|
||||
struct sStringExpansionPos *pParent;
|
||||
};
|
||||
|
||||
#define INITIAL 0
|
||||
#define macroarg 3
|
||||
|
||||
@@ -62,14 +69,16 @@ void lex_FloatDeleteSecondRange(uint32_t id, uint16_t start, uint16_t end);
|
||||
void lex_Init(void);
|
||||
void lex_AddStrings(const struct sLexInitString *lex);
|
||||
void lex_SetBuffer(char *buffer, uint32_t len);
|
||||
void lex_BeginStringExpansion(const char *tzName);
|
||||
int yywrap(void);
|
||||
int yylex(void);
|
||||
void yyunput(char c);
|
||||
void yyunputstr(char *s);
|
||||
void yyunputstr(const char *s);
|
||||
void yyskipbytes(uint32_t count);
|
||||
void yyunputbytes(uint32_t count);
|
||||
|
||||
extern YY_BUFFER_STATE pCurrentBuffer;
|
||||
extern struct sStringExpansionPos *pCurrentStringExpansion;
|
||||
|
||||
void upperstring(char *s);
|
||||
void lowerstring(char *s);
|
||||
|
||||
Reference in New Issue
Block a user