diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-06-19 16:12:20 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-06-19 16:12:20 -0700 |
commit | e21ede9c76fbf10394d3c7cfdb944b24e76cbaf2 (patch) | |
tree | 0c5838dfe5e605a097102a254994b58709ef376e /macros.pl | |
parent | 72edbb87ef4dc4d5ca8f214502b3d00a7502b7dd (diff) | |
download | nasm-e21ede9c76fbf10394d3c7cfdb944b24e76cbaf2.tar.gz nasm-e21ede9c76fbf10394d3c7cfdb944b24e76cbaf2.tar.bz2 nasm-e21ede9c76fbf10394d3c7cfdb944b24e76cbaf2.zip |
macros.pl: remove debug prints; improve compression regex
Remove debug print statements from macros.pl
Make sure we test for whitespace at end of statements
Diffstat (limited to 'macros.pl')
-rwxr-xr-x | macros.pl | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -63,13 +63,11 @@ foreach $fname ( @ARGV ) { $s1 =~ s/\\/\\\\/g; $s1 =~ s/"/\\"/g; $s2 = ''; - print $s1, ":"; - while ($s1 =~ /^(.*)(\%[a-zA-Z_][a-zA-Z0-9_]*)(\s*)(.*)$/) { + while ($s1 =~ /^(.*)(\%[a-zA-Z_][a-zA-Z0-9_]*)((\s+)(.*)|)$/) { $s2 .= $1; $pd = $2; - $ws = $3; - $s1 = $4; - print " ", $pd; + $ws = $4; + $s1 = $5; if (defined($pptok_hash{$pd}) && $pptok_hash{$pd} <= 127) { $s2 .= sprintf("\\x%02x\"\"", $pptok_hash{$pd}+128); @@ -77,7 +75,6 @@ foreach $fname ( @ARGV ) { $s2 .= $pd.$ws; } } - print "\n"; $s2 .= $s1; if (length($s2) > 0) { printf OUT " /* %4d */ \"%s\",\n", $index++, $s2; |