]> Shamusworld >> Repos - rmac/blobdiff - symbol.c
Remove all remaining traces of "as68_flag" from the codebase (issue #186)
[rmac] / symbol.c
index c1abfab58693aa0427abb641a9451c6929c6db4d..50d8379a0963ddae5dde642b68e360edfa63a13e 100644 (file)
--- a/symbol.c
+++ b/symbol.c
@@ -1,7 +1,7 @@
 //
-// RMAC - Reboot's Macro Assembler for all Atari computers
+// RMAC - Renamed Macro Assembler for all Atari computers
 // SYMBOL.C - Symbol Handling
-// Copyright (C) 199x Landon Dyer, 2011-2019 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2021 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source utilised with the kind permission of Landon Dyer
 //
@@ -103,6 +103,9 @@ SYM * NewSymbol(uint8_t * name, int type, int envno)
        symbol->sorder = NULL;
        symbol->uid    = currentUID++;
 
+       // Record filename the symbol is defined (for now only used by macro error reporting)
+       symbol->cfileno = cfileno;
+
        // Install symbol in the symbol table
        int hash = HashSymbol(name, envno);
        symbol->snext = symbolTable[hash];
@@ -254,8 +257,7 @@ uint32_t sy_assign(uint8_t * buf, uint8_t *(* construct)())
                // Export vanilla labels (but don't make them global). An exception is
                // made for equates, which are not exported unless they are referenced.
                else if (sy->stype == LABEL && lsym_flag
-                       && (sy->sattr & (DEFINED | REFERENCED)) != 0
-                       && (!as68_flag || *sy->sname != 'L'))
+                       && (sy->sattr & (DEFINED | REFERENCED)) != 0)
                {
                        sy->senv = scount++;