diff --git a/modules/codepad.pl b/modules/codepad.pl index 197b1508..90be6372 100755 --- a/modules/codepad.pl +++ b/modules/codepad.pl @@ -60,8 +60,7 @@ $code = $preludes{$lang} . $code; if(($lang eq "C" or $lang eq "C++") and not $code =~ m/(int|void) main\s*\([^)]*\)\s*{/) { my $prelude = ''; $prelude = "$1$2" if $code =~ s/^\s*(#.*)(#.*?[>\n])//s; - $code = "$prelude\n\nint main(int argc, char **argv) { $code;/**/ return 0; }"; - $code =~ s/;\s*;\/\*\*\//;/g; + $code = "$prelude\n\nint main(int argc, char **argv) { $code return 0; }"; } $code = pretty($code); diff --git a/modules/ideone.pl b/modules/ideone.pl index 8299e415..0efab9ec 100755 --- a/modules/ideone.pl +++ b/modules/ideone.pl @@ -128,8 +128,7 @@ if(($languages{$lang}{'id'} == 1 or $languages{$lang}{'id'} == 11 or $languages{ my $prelude = ''; $prelude = "$1$2" if $code =~ s/^\s*(#.*)(#.*?[>\n])//s; $code =~ s/^\s+//; - $code = "$prelude\n\nint main(int argc, char **argv) { $code;/**/ return 0;}\n"; - $code =~ s/;\s*;\/\*\*\//;/g; + $code = "$prelude\n\nint main(int argc, char **argv) { $code return 0;}\n"; } $code = pretty($code);