freebsd-src/contrib/nvi/tcl_scripts/errors.tcl
Peter Wemm b8ba871bd9 Import of nvi-1.79, minus a few bits that we dont need (eg: postscript
files, curses, db, regex etc that we already have).  The other glue will
follow shortly.

Obtained from: Keith Bostic <bostic@bostic.com>
1996-11-01 06:45:43 +00:00

44 lines
1.2 KiB
Tcl
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# @(#)errors.tcl 8.2 (Berkeley) 11/18/95
#
# File: errors.tcl
#
# Author: George V. Neville-Neil
#
# Purpose: This file contains vi/tcl code that allows a vi user to parse
# compiler errors and warnings from a make.out file.
proc findErr {} {
global errScreen
global currFile
global fileScreen
set errLine [lindex [viGetCursor $errScreen] 0]
set currLine [split [viGetLine $errScreen $errLine] :]
set currFile [lindex $currLine 0]
set fileScreen [viNewScreen $errScreen $currFile]
viSetCursor $fileScreen [lindex $currLine 1] 1
viMapKey $viScreenId  nextErr
}
proc nextErr {} {
global errScreen
global fileScreen
global currFile
set errLine [lindex [viGetCursor $errScreen] 0]
set currLine [split [viGetLine $errScreen $errLine] :]
if {[string match $currFile [lindex $currLine 0]]} {
viSetCursor $fileScreen [lindex $currLine 1] 0
viSwitchScreen $fileScreen
} else {
viEndScreen $fileScreen
set currFile [lindex $currLine 0]
set fileScreen[viNewScreen $errScreen $currFile]
viSetCursor $fileScreen [lindex $currLine 1] 0
}
}
proc initErr {} {
global viScreenId
global errScreen
set errScreen [viNewScreen $viScreenId make.out]
viMapKey $viScreenId  findErr
}