0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

preproc: refine appropriate handling of PP_RMACRO/PP_RIMACRO/PP_MACRO/PP_IMACRO

This commit is contained in:
Keith Kanios
2009-07-11 14:48:09 -05:00
parent 0af5ee2732
commit 093513d0bc

View File

@@ -2042,7 +2042,6 @@ static int do_directive(Token * tline)
int64_t count;
size_t len;
int severity;
bool is_recursive = false;
origline = tline;
@@ -2592,18 +2591,18 @@ static int do_directive(Token * tline)
case PP_RMACRO:
case PP_RIMACRO:
is_recursive = true;
case PP_MACRO:
case PP_IMACRO:
if (defining) {
error(ERR_FATAL,
"`%%%smacro': already defining a macro",
(i == PP_IMACRO ? "i" : ""));
/* todo: change the above as well... */
return DIRECTIVE_FOUND;
}
defining = nasm_malloc(sizeof(MMacro));
defining->max_depth = (is_recursive ? 65536 : 0); /* remove/change this??? */
defining->casesense = (i == PP_MACRO);
defining = nasm_malloc(sizeof(MMacro));
defining->max_depth = (((i == PP_RMACRO) || (i == PP_RIMACRO)) ? 65536 : 0);
defining->casesense = ((i == PP_MACRO) || (i == PP_RMACRO));
if (!parse_mmacro_spec(tline, defining, pp_directives[i])) {
nasm_free(defining);
defining = NULL;