]> Shamusworld >> Repos - rmac/blobdiff - symbol.c
Fix for bug #174 - when a macro contains an error, actually print the filename it...
[rmac] / symbol.c
index 2635e7a3c369c71d636f905dd019f4bb897f3762..c2da09abece5cd67a0eaf73cc26f72a20764b7f4 100644 (file)
--- a/symbol.c
+++ b/symbol.c
@@ -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];