Mercurial > hg > RemoteEditor > vim7
diff runtime/tools/mve.awk @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/runtime/tools/mve.awk Sat Nov 10 15:07:22 2007 +0900 @@ -0,0 +1,23 @@ +#!/usr/bin/nawk -f +# +# Change "nawk" to "awk" or "gawk" if you get errors. +# +# Make Vim Errors +# Processes errors from cc for use by Vim's quick fix tools +# specifically it translates the ---------^ notation to a +# column number +# +BEGIN { FS="[:,]" } + +/^cfe/ { file=$3 + msg=$5 + split($4,s," ") + line=s[2] +} + +# You may have to substitute a tab character for the \t here: +/^[\t-]*\^/ { + p=match($0, ".*\\^" ) + col=RLENGTH-2 + printf("%s, line %d, col %d : %s\n", file,line,col,msg) +}