diff --git a/applets/c2english.pl b/applets/c2english.pl index dc3fe90a..721c771b 100755 --- a/applets/c2english.pl +++ b/applets/c2english.pl @@ -383,6 +383,8 @@ if (not $force and $ret != 0) { # don't error about use of #error $output =~ s/^error: #error.*$//gm; + $output =~ s/note: in definition of macro '[^']+'\s*//g; + $output =~ s/^\s+$//; if (length $output) { @@ -402,7 +404,7 @@ close $fh; $output = `./c2eng.pl code2eng.c` if not defined $output; if (not $has_function and not $has_main) { - $output =~ s/Let .main. be a function \(taking no arguments\) and returning int.\s*When called, the function will.\s*(do nothing.)?//i; + $output =~ s/Let .main. be a function \(taking no arguments\) returning int.\s*When called, the function will.\s*(do nothing.)?//i; $output =~ s/\s*Return 0.\s*End of function .main..\s*//; $output =~ s/\s*Finally, return 0.$//; $output =~ s/\s*and then return 0.$/./; @@ -410,7 +412,7 @@ if (not $has_function and not $has_main) { $output =~ s/^\s*(.)/\U$1/; $output =~ s/\.\s+(\S)/. \U$1/g; } elsif ($has_function and not $has_main) { - $output =~ s/\s*Let `main` be a function \(taking no arguments\) and returning int.\s*When called, the function will do nothing.//; + $output =~ s/\s*Let `main` be a function \(taking no arguments\) returning int.\s*When called, the function will do nothing.//; $output =~ s/\s*Finally, return 0.$//; $output =~ s/\s*and then return 0.$/./; } diff --git a/applets/c2english/CGrammar.pm b/applets/c2english/CGrammar.pm index 17c2750f..265cb843 100755 --- a/applets/c2english/CGrammar.pm +++ b/applets/c2english/CGrammar.pm @@ -1375,7 +1375,7 @@ direct_declarator: $item{declarator} } | '(' parameter_type_list ')' - { "function (taking $item{parameter_type_list}) and returning" } + { "function (taking $item{parameter_type_list}) returning" } | '(' declarator array_declarator(s) ')' { $item{'declarator'} . join(' ', @{$item{'array_declarator(s)'}}) } | '(' declarator ')' @@ -1551,9 +1551,9 @@ direct_abstract_declarator: | DAD '[' ']' | DAD '[' array_qualifiers(?) assignment_expression(?) ']' | '(' ')' - { 'function taking unspecified arguments and returning' } + { 'function (taking unspecified arguments) returning' } | '(' parameter_type_list ')' - { "function (taking $item{parameter_type_list}) and returning" } + { "function (taking $item{parameter_type_list}) returning" } | DAD '(' ')' | DAD '(' parameter_type_list ')' diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index dd4a065d..6691f5f4 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4784, + BUILD_REVISION => 4785, BUILD_DATE => "2024-09-19", };