3 # This program works as a filter that reads from stdin, copies to
4 # stdout *and* creates an error file that can be read by vim.
6 # This program has only been tested on SGI, Irix5.3.
8 # Written by Ives Aerts in 1996. This little program is not guaranteed
9 # to do (or not do) anything at all and can be freely used for
10 # whatever purpose you can think of.
15 die("Usage: vimccparse <output filename>\n");
19 open (OUT
, ">$filename") || die ("Can't open file: \"$filename\"");
23 if ( (/"(.*)", line (\d+): (e)rror\((\d+)\):/)
24 || (/"(.*)", line (\d+): (w)arning\((\d+)\):/) ) {
29 chop($errormsg=<STDIN
>);
30 $errormsg =~ s/^\s*//;
32 $column=index(<STDIN
>, "^") - 1;
34 print OUT
"$file>$line:$column:$errortype:$errornr:$errormsg\n";