3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-24 19:14:39 +01:00

compiler_vm: fix indentation

This commit is contained in:
Pragmatic Software 2011-02-08 01:27:45 +00:00
parent bb05ab5274
commit 8f4152c918

View File

@ -29,7 +29,7 @@ my %preludes = (
'C99' => "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n\n", 'C99' => "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n\n",
'C' => "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n\n", 'C' => "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n\n",
'C++' => "#include <iostream>\n#include <cstdio>\n\nusing namespace std;\n\n", 'C++' => "#include <iostream>\n#include <cstdio>\n\nusing namespace std;\n\n",
); );
sub pretty { sub pretty {
my $code = join '', @_; my $code = join '', @_;
@ -58,11 +58,11 @@ sub paste_codepad {
my %post = ( 'lang' => 'C', 'code' => $text, 'private' => 'True', 'submit' => 'Submit' ); my %post = ( 'lang' => 'C', 'code' => $text, 'private' => 'True', 'submit' => 'Submit' );
my $response = $ua->post("http://codepad.org", \%post); my $response = $ua->post("http://codepad.org", \%post);
if(not $response->is_success) { if(not $response->is_success) {
return $response->status_line; return $response->status_line;
} }
return $response->request->uri; return $response->request->uri;
} }
sub compile { sub compile {
@ -697,8 +697,8 @@ if($output =~ m/^\s*$/) {
$output =~ s/$left_quote/'/g; $output =~ s/$left_quote/'/g;
$output =~ s/$right_quote/'/g; $output =~ s/$right_quote/'/g;
$output =~ s/[\r\n]+/ /g; $output =~ s/[\r\n]+/ /g;
$output =~ s/\s+/ /g; $output =~ s/\s+/ /g;
} }
unless($got_run) { unless($got_run) {