ref: 90bc8d91100b23c6e4283c2983cc353434bb8956
parent: 193cc06561775b9eaa5d63d19ffed8cdec9cb3d8
author: Antonio Niño Díaz <[email protected]>
date: Thu Oct 26 19:23:13 EDT 2017
Reintroduce EQU __LINE__ It was removed in commit 6198cc185c24ec4ba794ed27c969ae65d31f89c3, but the documentation wasn't updated back then. It makes more sense to reintroduce it now than to remove it from the docs. Signed-off-by: Antonio Niño Díaz <[email protected]>
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -20,6 +20,7 @@
struct sSymbol *pScope = NULL;
struct sSymbol *pPCSymbol = NULL;
struct sSymbol *p_NARGSymbol = NULL;
+struct sSymbol *p__LINE__Symbol = NULL;
char *currentmacroargs[MAXMACROARGS + 1];
char *newmacroargs[MAXMACROARGS + 1];
char SavedTIME[256];
@@ -60,6 +61,13 @@
return (i);
}
+SLONG
+Callback__LINE__(struct sSymbol * sym)
+{
+ sym = sym;
+ return (nLineNo);
+}
+
/*
* Get the nValue field of a symbol
*/
@@ -864,6 +872,9 @@
sym_AddEqu("_NARG", 0);
p_NARGSymbol = findsymbol("_NARG", NULL);
p_NARGSymbol->Callback = Callback_NARG;
+ sym_AddEqu("__LINE__", 0);
+ p__LINE__Symbol = findsymbol("__LINE__", NULL);
+ p__LINE__Symbol->Callback = Callback__LINE__;
math_DefinePI();
}
@@ -890,6 +901,9 @@
sym_AddEqu("_NARG", 0);
p_NARGSymbol = findsymbol("_NARG", NULL);
p_NARGSymbol->Callback = Callback_NARG;
+ sym_AddEqu("__LINE__", 0);
+ p__LINE__Symbol = findsymbol("__LINE__", NULL);
+ p__LINE__Symbol->Callback = Callback__LINE__;
sym_AddSet("_RS", 0);