diff options
Diffstat (limited to 'tools/HPMHookGen/HPMHookGen.pl')
-rwxr-xr-x | tools/HPMHookGen/HPMHookGen.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl index 5333f3f03..b035687e2 100755 --- a/tools/HPMHookGen/HPMHookGen.pl +++ b/tools/HPMHookGen/HPMHookGen.pl @@ -7,6 +7,12 @@ use strict; use warnings; use XML::Simple; +# XML Parser hint (some are faster than others) +#local $ENV{XML_SIMPLE_PREFERRED_PARSER} = ''; # 0m7.138s +local $ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::Parser'; # 0m2.674s +#local $ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::SAX::Expat'; # 0m7.026s +#local $ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::LibXML::SAX'; # 0m4.152s + sub trim($) { my $s = $_[0]; $s =~ s/^\s+//; $s =~ s/\s+$//; @@ -265,6 +271,8 @@ foreach my $file (@files) { # Loop through the xml files $key = "ircbot"; } elsif ($key =~ /log_interface/) { $key = "logs"; + } elsif ($key =~ /pc_groups_interface/) { + $key = "pcg"; } else { $key =~ s/_interface//; } @@ -367,6 +375,7 @@ foreach my $file (@files) { # Loop through the xml files my %exportsymbols = map { $_ => &{ sub ($) { return 'battlegrounds' if $_ =~ /^bg$/; + return 'pc_groups' if $_ =~ /^pcg$/; return $_; }}($_); } @keys; @@ -392,7 +401,7 @@ foreach my $key (@keys) { foreach my $if (@{ $ifs{$key} }) { print FH <<"EOF"; - { HP_POP($key\->$if->{name}), HP_POP2($if->{hname}), $idx }, + { HP_POP($key\->$if->{name}, $if->{hname}) }, EOF $idx += 2; |