summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-05-20 14:21:29 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-05-20 14:21:29 -0700
commita4835d466c50237afcc30ff99bc980aeb5d17ce6 (patch)
tree66357bce22a451743c6b1b02e71f6860d9d84bd2 /preproc.c
parent73252a92ae00ab63a6f52f9c987d4550c20b9100 (diff)
downloadnasm-a4835d466c50237afcc30ff99bc980aeb5d17ce6.tar.gz
nasm-a4835d466c50237afcc30ff99bc980aeb5d17ce6.tar.bz2
nasm-a4835d466c50237afcc30ff99bc980aeb5d17ce6.zip
Avoid #including .c files; instead compile as separate units
Don't #include .c files, even if they are auto-generated; instead compile them as separate compilation units and let the linker do its job.
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/preproc.c b/preproc.c
index 9e97257..0560beb 100644
--- a/preproc.c
+++ b/preproc.c
@@ -50,6 +50,7 @@
#include "hashtbl.h"
#include "stdscan.h"
#include "tokens.h"
+#include "tables.h"
typedef struct SMacro SMacro;
typedef struct MMacro MMacro;
@@ -352,10 +353,9 @@ static MMacro *defining;
#define PARAM_DELTA 16
/*
- * The standard macro set: defined as `static char *stdmac[]'. Also
- * gives our position in the macro set, when we're processing it.
+ * The standard macro set: defined in macros.c in the array nasm_stdmac.
+ * This gives our position in the macro set, when we're processing it.
*/
-#include "macros.c"
static const char * const *stdmacpos;
/*
@@ -3723,9 +3723,9 @@ pp_reset(char *file, int apass, efunc errfunc, evalfunc eval,
init_macros();
unique = 0;
if (tasm_compatible_mode) {
- stdmacpos = stdmac;
+ stdmacpos = nasm_stdmac;
} else {
- stdmacpos = &stdmac[TASM_MACRO_COUNT];
+ stdmacpos = nasm_stdmac_after_tasm;
}
any_extrastdmac = (extrastdmac != NULL);
list = listgen;