3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00

Allow function argument list to be empty; e.g., int main() { code }

This commit is contained in:
Pragmatic Software 2013-02-01 23:35:11 +00:00
parent e846f24716
commit 3d492ed76b
2 changed files with 3 additions and 3 deletions

View File

@ -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 => 400, BUILD_REVISION => 401,
BUILD_DATE => "2012-12-30", BUILD_DATE => "2013-02-01",
}; };
1; 1;

View File

@ -764,7 +764,7 @@ if($lang eq 'C89' 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/^([ *\w]+)\s+([*\w]+)\s*\(([^;]+)\s*\)\s*({.*)/ims; my $func_regex = qr/^([ *\w]+)\s+([*\w]+)\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) {