view runtime/tools/mve.awk @ 8665:7a2346148551 v7.4.1622

commit https://github.com/vim/vim/commit/17b56c9f8327e6869580e3cfd82efcf8966d797a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 20 18:54:19 2016 +0100 patch 7.4.1622 Problem: Channel demo doesn't work with Python 2.6. Solution: Add number in formatting placeholder
author Christian Brabandt <cb@256bit.org>
date Sun, 20 Mar 2016 19:00:06 +0100
parents 3fc0f57ecb91
children
line wrap: on
line source

#!/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)
}