static int disabled; // Assembly conditionally disabled
int just_bss; // 1, ds.b in microprocessor mode
VALUE pcloc; // Value of "PC" at beginning of line
-IFENT * ifent; // Current ifent
SYM * lab_sym; // Label on line (or NULL)
const char extra_stuff[] = "extra (unexpected) text found after addressing mode";
switch (state)
{
case MN_IF:
- d_if ();
+ d_if();
goto loop;
case MN_ELSE:
d_else();
goto loop;
case MN_ENDIF:
- d_endif ();
+ d_endif();
goto loop;
case MN_IIF: // .iif --- immediate if
if (disabled || expr(exprbuf, &eval, &eattr, &esym) != OK)
{
// Pop IFENT levels until we reach the conditional assembly context we
// were at when the input object was entered.
+ int numUnmatched = 0;
+
while (ifent != inobj->in_ifent)
{
- if (d_endif() != 0) // Something bad happened during endif parsing?
- return -1; // If yes, bail instead of getting stuck in a loop
+ if (d_endif() != 0) // Something bad happened during endif parsing?
+ return -1; // If yes, bail instead of getting stuck in a loop
+
+ numUnmatched++;
}
- tok = inobj->in_otok; // Restore tok and otok
+ // Give a warning to the user that we had to wipe their bum for them
+ if (numUnmatched > 0)
+ warni("missing %d .endif(s)", numUnmatched);
+
+ tok = inobj->in_otok; // Restore tok and otok
etok = inobj->in_etok;
switch (inobj->in_type)
{
- case SRC_IFILE: // Pop and release an IFILE
+ case SRC_IFILE: // Pop and release an IFILE
if (debug)
printf("[Leaving: %s]\n", curfname);
if ((ln = GetNextLine()) == NULL)
{
if (debug) printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n");
- if (fpop()==0) // Pop input level
+ if (fpop() == 0) // Pop input level
goto retry; // Try for more lines
else
{
#define MAJOR 1 // Major version number
#define MINOR 4 // Minor version number
-#define PATCH 10 // Patch release number
+#define PATCH 11 // Patch release number
#endif // __VERSION_H__