argp -= imacro->im_nargs;
DEBUG printf("%d (nargs = %d)\n", argp, imacro->im_nargs);
- fpop();
- return 0;
+ return fpop();
}
// Pop IFENT levels until we reach the conditional assembly context we
// were at when the input object was entered.
while (ifent != inobj->in_ifent)
- d_endif();
+ {
+ if (d_endif() != 0) // Something bad happened during endif parsing?
+ return -1; // If yes, bail instead of getting stuck in a loop
+ }
tok = inobj->in_otok; // Restore tok and otok
etok = inobj->in_etok;
case SRC_IMACRO:
if ((ln = GetNextMacroLine()) == NULL)
{
- ExitMacro(); // Exit macro (pop args, do fpop(), etc)
- goto retry; // Try for more lines...
+ if (ExitMacro() == 0) // Exit macro (pop args, do fpop(), etc)
+ goto retry; // Try for more lines...
+ else
+ return TKEOF; // Oops, we got a non zero return code, signal EOF
}
lntag = '@';