view runtime/tools/mve.awk @ 27273:a9f0c1f06c84 v8.2.4165

patch 8.2.4165: the nv_g_cmd() function is too long Commit: https://github.com/vim/vim/commit/05386ca1d4823e5c98c24b8cd038af49aee62577 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Jan 20 20:18:27 2022 +0000 patch 8.2.4165: the nv_g_cmd() function is too long Problem: The nv_g_cmd() function is too long. Solution: Move code to separate functions. (Yegappan Lakshmanan, closes #9576)
author Bram Moolenaar <Bram@vim.org>
date Thu, 20 Jan 2022 21:30:03 +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)
}