annotate runtime/tools/efm_filter.pl @ 3137:b5a2b4c0c1ca v7.3.339

updated for version 7.3.339 Problem: "make shadow" doesn't link all test files. Solution: Add a line in Makefile and Filelist.
author Bram Moolenaar <bram@vim.org>
date Thu, 20 Oct 2011 16:35:35 +0200
parents 3fc0f57ecb91
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 #!/usr/bin/env perl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 # This program works as a filter that reads from stdin, copies to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 # stdout *and* creates an error file that can be read by vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 # This program has only been tested on SGI, Irix5.3.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 # Written by Ives Aerts in 1996. This little program is not guaranteed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 # to do (or not do) anything at all and can be freely used for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 # whatever purpose you can think of.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 $args = @ARGV;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 unless ($args == 1) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 die("Usage: vimccparse <output filename>\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 $filename = @ARGV[0];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 open (OUT, ">$filename") || die ("Can't open file: \"$filename\"");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 while (<STDIN>) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 print;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if ( (/"(.*)", line (\d+): (e)rror\((\d+)\):/)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 || (/"(.*)", line (\d+): (w)arning\((\d+)\):/) ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 $file=$1;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 $line=$2;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 $errortype="\u$3";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 $errornr=$4;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 chop($errormsg=<STDIN>);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 $errormsg =~ s/^\s*//;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 $sourceline=<STDIN>;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 $column=index(<STDIN>, "^") - 1;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 print OUT "$file>$line:$column:$errortype:$errornr:$errormsg\n";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 close(OUT);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 exit(0);