diff --git a/macros.pl b/macros.pl index 3474f682..2c6c1d10 100755 --- a/macros.pl +++ b/macros.pl @@ -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;