]> Shamusworld >> Repos - rmac/blobdiff - procln.c
First stab at removing cruft.
[rmac] / procln.c
index 8127d7337cf070a6f4cb28ac8d66b6b8f61261db..5e84c4118fe260c709d41851dcd43ccb58d3b437 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
@@ -134,6 +134,7 @@ loop:                                                       // Line processing loop label
        // Get another line of tokens
        if (tokln() == TKEOF)
        {
+if (verb_flag) printf("Assemble: Found TKEOF flag...\n");
                if (list_flag && listflag)                      // Flush last line of source
                        listeol();
 
@@ -316,7 +317,7 @@ as68label:
                                if (label != NULL)
                                        warn(lab_ignored);
 
-                               exitmac();
+                               ExitMacro();
                        }
 
                        goto loop;
@@ -533,10 +534,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 +576,7 @@ do_label:
                lab_sym = sy;
 
                if (!j)
-                       ++curenv;
+                       curenv++;
 
                // Make label global
                if (labtyp == DCOLON)