The fix in 10.55 of exf.c had unwanted side effects.
[nvi.git] / tcl_scripts / errors.tcl
blob52804d5f1d72e9c8986e25d8056cac0d733c417a
1 # $Id: errors.tcl,v 8.2 1995/11/18 12:59:07 bostic Exp $ (Berkeley) $Date: 1995/11/18 12:59:07 $
3 # File: errors.tcl
5 # Author: George V. Neville-Neil
7 # Purpose: This file contains vi/tcl code that allows a vi user to parse
8 # compiler errors and warnings from a make.out file.
10 proc findErr {} {
11 global errScreen
12 global currFile
13 global fileScreen
14 set errLine [lindex [viGetCursor $errScreen] 0]
15 set currLine [split [viGetLine $errScreen $errLine] :]
16 set currFile [lindex $currLine 0]
17 set fileScreen [viNewScreen $errScreen $currFile]
18 viSetCursor $fileScreen [lindex $currLine 1] 1
19 viMapKey $viScreenId \x05 nextErr
22 proc nextErr {} {
23 global errScreen
24 global fileScreen
25 global currFile
26 set errLine [lindex [viGetCursor $errScreen] 0]
27 set currLine [split [viGetLine $errScreen $errLine] :]
28 if {[string match $currFile [lindex $currLine 0]]} {
29 viSetCursor $fileScreen [lindex $currLine 1] 0
30 viSwitchScreen $fileScreen
31 } else {
32 viEndScreen $fileScreen
33 set currFile [lindex $currLine 0]
34 set fileScreen[viNewScreen $errScreen $currFile]
35 viSetCursor $fileScreen [lindex $currLine 1] 0
39 proc initErr {} {
40 global viScreenId
41 global errScreen
42 set errScreen [viNewScreen $viScreenId make.out]
43 viMapKey $viScreenId \x05 findErr