mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 11:12:42 +01:00
Minor clean-up of previous commit to remove unnecessary substitutions
This commit is contained in:
parent
1d7791d9a5
commit
a6a2b3eeb3
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 394,
|
BUILD_REVISION => 395,
|
||||||
BUILD_DATE => "2012-11-18",
|
BUILD_DATE => "2012-11-19",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -751,12 +751,11 @@ if($lang eq 'C' or $lang eq 'C99' or $lang eq 'C11' or $lang eq 'C++') {
|
|||||||
|
|
||||||
print "looking for functions, has main: $has_main\n" if $debug >= 2;
|
print "looking for functions, has main: $has_main\n" if $debug >= 2;
|
||||||
|
|
||||||
my $func_regex = qr/^([ a-zA-Z0-9_*]+)\s+([a-zA-Z0-9_*]+)\s*\(([^{]*)\s*({.*)/ms;
|
my $func_regex = qr/^([ A-Z0-9_*]+)\s+([A-Z0-9_*]+)\s*\((.*?)\s*\)\s*({.*)/ims;
|
||||||
|
|
||||||
# look for potential functions to extract
|
# look for potential functions to extract
|
||||||
while($preprecode =~ /$func_regex/ms) {
|
while($preprecode =~ /$func_regex/ms) {
|
||||||
my ($pre_ret, $pre_ident, $pre_params, $pre_potential_body) = ($1, $2, $3, $4);
|
my ($pre_ret, $pre_ident, $pre_params, $pre_potential_body) = ($1, $2, $3, $4);
|
||||||
$pre_params =~ s/\)\s*$//;
|
|
||||||
|
|
||||||
print "looking for functions, found [$pre_ret][$pre_ident][$pre_params][$pre_potential_body], has main: $has_main\n" if $debug >= 1;
|
print "looking for functions, found [$pre_ret][$pre_ident][$pre_params][$pre_potential_body], has main: $has_main\n" if $debug >= 1;
|
||||||
|
|
||||||
@ -776,7 +775,6 @@ if($lang eq 'C' or $lang eq 'C99' or $lang eq 'C11' or $lang eq 'C++') {
|
|||||||
|
|
||||||
$tmpcode =~ m/$func_regex/ms;
|
$tmpcode =~ m/$func_regex/ms;
|
||||||
my ($ret, $ident, $params, $potential_body) = ($1, $2, $3, $4);
|
my ($ret, $ident, $params, $potential_body) = ($1, $2, $3, $4);
|
||||||
$params =~ s/\)\s*$//;
|
|
||||||
|
|
||||||
print "1st extract: [$ret][$ident][$params][$potential_body]\n" if $debug;
|
print "1st extract: [$ret][$ident][$params][$potential_body]\n" if $debug;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user