]> Shamusworld >> Repos - rmac/blobdiff - procln.c
Fixed problem with nested MACROs.
[rmac] / procln.c
index 8127d7337cf070a6f4cb28ac8d66b6b8f61261db..6963086c9f18e69e3a3ace6004ae1a24f8404678 100644 (file)
--- a/procln.c
+++ b/procln.c
@@ -103,7 +103,7 @@ void init_procln(void)
 //
 // Line Processor
 //
-void assemble(void)
+void Assemble(void)
 {
        int state;                                      // Keyword machine state (output)
        int j;                                          // Random int, must be fast
@@ -316,7 +316,7 @@ as68label:
                                if (label != NULL)
                                        warn(lab_ignored);
 
-                               exitmac();
+                               ExitMacro();
                        }
 
                        goto loop;
@@ -533,10 +533,15 @@ normal:
        if (label != NULL)
        {
 do_label:
+               // Check for dot in front of label; means this is a local label if present
+#if 0
                j = 0;
 
                if (*label == '.')
                        j = curenv;
+#else
+               j = (*label == '.' ? curenv : 0);
+#endif
 
                sy = lookup(label, LABEL, j);
 
@@ -570,7 +575,7 @@ do_label:
                lab_sym = sy;
 
                if (!j)
-                       ++curenv;
+                       curenv++;
 
                // Make label global
                if (labtyp == DCOLON)