[nasm:nasm-2.15.xx] preproc: add a %null directive for the masm macro package
nasm-bot for H. Peter Anvin (Intel)
hpa at zytor.com
Fri Jul 10 02:57:03 PDT 2020
Commit-ID: a79a700208d771fb3b8e6e7f03fcc195c2d1831c
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=a79a700208d771fb3b8e6e7f03fcc195c2d1831c
Author: H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Fri, 10 Jul 2020 02:55:50 -0700
Committer: H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Fri, 10 Jul 2020 02:55:50 -0700
preproc: add a %null directive for the masm macro package
Instead of %pragma ignore, use a new %null directive which ignores the
rest of the line, without bothering to expand it.
Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>
---
asm/pptok.dat | 1 +
asm/preproc.c | 5 +++++
macros/masm.mac | 4 ++--
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/asm/pptok.dat b/asm/pptok.dat
index b6285c36..0fdbbad6 100644
--- a/asm/pptok.dat
+++ b/asm/pptok.dat
@@ -89,6 +89,7 @@
%include
%line
%local
+%null
%pop
%pragma
%push
diff --git a/asm/preproc.c b/asm/preproc.c
index 4fcdb359..ccb00f3b 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -4649,6 +4649,11 @@ issue_error:
case PP_LINE:
nasm_panic("`%s' directive not preprocessed early", dname);
break;
+
+ case PP_NULL:
+ /* Goes nowhere, does nothing... */
+ break;
+
}
done:
diff --git a/macros/masm.mac b/macros/masm.mac
index da7e6eea..6bd27273 100644
--- a/macros/masm.mac
+++ b/macros/masm.mac
@@ -50,7 +50,7 @@ USE: masm
%endmacro
%imacro ends 0+.nolist
- %pragma ignore ends %00
+ %null ends %00
%endmacro
%imacro proc 0-*.nolist
@@ -65,7 +65,7 @@ USE: masm
%endmacro
%imacro endp 0.nolist
- %pragma ignore endp %00
+ %null endp %00
%undef ret
%endmacro
More information about the Nasm-commits
mailing list