From f4275a4cc8ee2a5b36adab52f267532624ccbe58 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 1 Mar 2014 20:25:42 +0000 Subject: [PATCH] compiler_vm: more compiler output beautification --- PBot/VERSION.pm | 2 +- modules/compiler_vm/compiler_vm_client.pl | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 2a3ce826..8a1a6ac6 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 493, + BUILD_REVISION => 494, BUILD_DATE => "2014-03-01", }; diff --git a/modules/compiler_vm/compiler_vm_client.pl b/modules/compiler_vm/compiler_vm_client.pl index 61d7238f..1e77379d 100755 --- a/modules/compiler_vm/compiler_vm_client.pl +++ b/modules/compiler_vm/compiler_vm_client.pl @@ -934,6 +934,7 @@ if($output =~ m/^\s*$/) { $output =~ s/In file included from prog.c:\d+:\d+:\s*//msg; $output =~ s/prog: prog.c:\d+: [^:]+: Assertion/Assertion/g; + $output =~ s,/usr/include/[^:]+:\d+:\d+:\s+,,g; unless(defined $got_paste or (defined $got_run and $got_run eq "paste")) { $output =~ s/ Line \d+ ://g; @@ -960,7 +961,13 @@ if($output =~ m/^\s*$/) { $output =~ s/$right_quote/'/msg; $output =~ s/`/'/msg; $output =~ s/\t/ /g; - $output =~ s/(\d+:\d+:\s*)*\s*In function .main.:\s*//g; + if($output =~ /In function '([^']+)':/) { + if($1 eq 'main') { + $output =~ s/(\d+:\d+:\s*)*\s?In function .main.:\s*//g; + } else { + $output =~ s/(\d+:\d+:\s*)*\s?In function .main.:\s?/In function 'main':/g; + } + } $output =~ s/(\d+:\d+:\s*)*warning: unknown conversion type character 'b' in format \[-Wformat=?\]\s+(\d+:\d+:\s*)*warning: too many arguments for format \[-Wformat-extra-args\]/info: %b is a candide extension/g; $output =~ s/(\d+:\d+:\s*)*warning: unknown conversion type character 'b' in format \[-Wformat=?\]//g; $output =~ s/\s\(core dumped\)/./;