home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / mac / vim55rt.sit / runtime / tools / mve.awk < prev    next >
Encoding:
AWK Script  |  1999-09-25  |  471 b   |  22 lines  |  [TEXT/ALFA]

  1. #!/usr/bin/nawk  -f
  2. #
  3. # Make Vim Errors
  4. # Processes errors from cc for use by Vim's quick fix tools
  5. # specifically it translates the ---------^ notation to a
  6. # column number
  7. #
  8. BEGIN { FS="[:,]" }
  9.  
  10. /^cfe/ { file=$3
  11.          msg=$5
  12.          split($4,s," ")
  13.          line=s[2]
  14. }
  15.  
  16. # You may have to substitute a tab character for the \t here:
  17. /^[\t-]*\^/ {
  18.         p=match($0, ".*\\^" )
  19.         col=RLENGTH-2
  20.         printf("%s, line %d, col %d : %s\n", file,line,col,msg)
  21. }
  22.