3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 13:59:47 +01:00

Oops, forget about pointers

This commit is contained in:
Pragmatic Software 2010-05-06 23:24:55 +00:00
parent eb371e3977
commit 63b8aae8dd
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ if($lang eq "C" or $lang eq "C++") {
my $prelude = '';
$prelude = "$1$2" if $precode =~ s/^\s*(#.*)(#.*?[>\n])//s;
while($precode =~ s/([a-zA-Z0-9_]+)\s+([a-zA-Z0-9_]+)\s*\((.*?)\)\s*{(.*?)}//) {
while($precode =~ s/([a-zA-Z0-9_*]+)\s+([a-zA-Z0-9_*]+)\s*\((.*?)\)\s*{(.*?)}//) {
my ($ret, $ident, $params, $body) = ($1, $2, $3, $4);
$code .= "$ret $ident($params) { $body }\n\n";
$has_main = 1 if $ident eq 'main';

View File

@ -134,7 +134,7 @@ if($languages{$lang}{'id'} == 1 or $languages{$lang}{'id'} == 11 or $languages{$
my $prelude = '';
$prelude = "$1$2" if $precode =~ s/^\s*(#.*)(#.*?[>\n])//s;
while($precode =~ s/([a-zA-Z0-9_]+)\s+([a-zA-Z0-9_]+)\s*\((.*?)\)\s*{(.*?)}//) {
while($precode =~ s/([a-zA-Z0-9_*]+)\s+([a-zA-Z0-9_*]+)\s*\((.*?)\)\s*{(.*?)}//) {
my ($ret, $ident, $params, $body) = ($1, $2, $3, $4);
$code .= "$ret $ident($params) { $body }\n\n";
$has_main = 1 if $ident eq 'main';