Actually allow up to 9 levels of INCLUDE nesting.
All checks were successful
Remind unit tests / tests (push) Successful in 42s

This commit is contained in:
Dianne Skoll
2024-11-30 23:03:09 -05:00
parent 0df4a79531
commit d161a8ff1a
3 changed files with 1521 additions and 1499 deletions

View File

@@ -858,7 +858,7 @@ static int IncludeCmd(char const *cmd)
got_a_fresh_line();
clear_callstack();
if (IStackPtr+1 >= INCLUDE_NEST) return E_NESTED_INCLUDE;
if (IStackPtr >= INCLUDE_NEST) return E_NESTED_INCLUDE;
i = &IStack[IStackPtr];
/* Use "cmd|" as the filename */
@@ -977,7 +977,7 @@ int IncludeFile(char const *fname)
got_a_fresh_line();
clear_callstack();
if (IStackPtr+1 >= INCLUDE_NEST) return E_NESTED_INCLUDE;
if (IStackPtr >= INCLUDE_NEST) return E_NESTED_INCLUDE;
i = &IStack[IStackPtr];
if (FileName) {

File diff suppressed because one or more lines are too long

View File

@@ -26,8 +26,12 @@ continued so there
# This should work
INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo MSG Yippee
# This should fail
# This should work
INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo MSG Yippee
# This should fail
INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo MSG Yippee
REM MSG Today is [hebday(today())] [hebmon(today())] [hebyear(today())]
fset _h(x, y) trigger(hebdate(x,y))