From 63b8aae8ddcb35eb3933980fe3227a814f1c92d0 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 6 May 2010 23:24:55 +0000 Subject: [PATCH] Oops, forget about pointers --- modules/codepad.pl | 2 +- modules/ideone.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/codepad.pl b/modules/codepad.pl index c32290f3..a99fdaa9 100755 --- a/modules/codepad.pl +++ b/modules/codepad.pl @@ -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'; diff --git a/modules/ideone.pl b/modules/ideone.pl index 6a945327..33c967ae 100755 --- a/modules/ideone.pl +++ b/modules/ideone.pl @@ -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';