diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-06-19 21:42:42 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-06-19 21:42:42 -0700 |
commit | b2a5fda157a0a7203652d0fcb02975629ce02cef (patch) | |
tree | 85c6a5d6d651bb45d5a63d464c02051ede4afae9 /macros.pl | |
parent | f4ae5ad11bb11d85b8e9deb49cce1707db4749f2 (diff) | |
download | nasm-b2a5fda157a0a7203652d0fcb02975629ce02cef.tar.gz |
Somewhat more clever way to generate the %use guard macros
Automatically generate a %define as the first string in the include
block, and just pick the string out of it from that %define statement
to verify existence. That way we eliminate any use of toupper() --
all case-insensitivity in NASM uses tolower()/nasm_tolower().
Diffstat (limited to 'macros.pl')
-rwxr-xr-x | macros.pl | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -56,6 +56,8 @@ foreach $fname ( @ARGV ) { push(@pkg_list, $pkg); $pkg_number{$pkg} = $npkg++; $pkg_index{$pkg} = $index; + printf OUT " /* %4d */ \"\\x%02x\"\"%s\",\n", + $index++, $pptok_hash{'%define'}+128, "__USE_\U$pkg\E__"; } elsif (m/^\s*((\s*([^\"\';\s]+|\"[^\"]*\"|\'[^\']*\'))*)\s*(;.*)?$/) { my $s1, $s2, $pd, $ws; $s1 = $1; |