Skip to content

Commit b74c47d

Browse files
author
Noam Preil
committed
Make it possible to undefine
1 parent dcd3b43 commit b74c47d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

assembler/assembler.c

+3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ int try_expand_macro(struct assembler_state *state, char **line) {
172172
if (strstr(*line, "macro") == *line + 1) { // Cannot expand macros while defining them
173173
return 0;
174174
}
175+
if (strstr(*line, "undefine") == *line + 1) { // Should not expand while removing
176+
return 0;
177+
}
175178
if (strstr(*line, "ifdef") == *line + 1) { // Should not expand when testing for existence
176179
return 0;
177180
}

assembler/directives.c

+2
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ int handle_undef(struct assembler_state *state, char **argv, int argc) {
433433
return 1;
434434
}
435435

436+
scas_log(L_DEBUG, "Looking for %s", argv[0]);
437+
436438
int i;
437439
for (i = 0; i < state->macros->length; i++) {
438440
macro_t *m = state->macros->items[i];

0 commit comments

Comments
 (0)