1 # @(#)gnats.tcl 8.2 (Berkeley) 11/18/95
7 set categoriesFile
[open $catFile r
]
8 while {[gets $categoriesFile line
] >= 0} {
9 lappend categories
$line
12 viMsg
$viScreenId $categories
13 viMapKey
$viScreenId \x0e next
18 set cursor
[viGetCursor
$viScreenId]
19 set lineNum
[lindex $cursor 0]
20 set line
[viGetLine
$viScreenId $lineNum]
21 viMsg
$viScreenId [lindex $line 0]
22 if {[lindex $line 0] == ">Confidential:"} {
23 confNext
$lineNum $line
24 } elseif
{[lindex $line 0] == ">Severity:"} {
25 sevNext
$lineNum $line
26 } elseif
{[lindex $line 0] == ">Priority:"} {
27 priNext
$lineNum $line
28 } elseif
{[lindex $line 0] == ">Class:"} {
29 classNext
$lineNum $line
30 } elseif
{[lindex $line 0] == ">Category:"} {
31 catNext
$lineNum $line
35 proc confNext
{lineNum line
} {
37 viMsg
$viScreenId [lindex $line 1]
38 if {[lindex $line 1] == "yes"} {
39 viSetLine
$viScreenId $lineNum ">Confidential: no"
41 viSetLine
$viScreenId $lineNum ">Confidential: yes"
45 proc sevNext
{lineNum line
} {
47 viMsg
$viScreenId [lindex $line 1]
48 if {[lindex $line 1] == "non-critical"} {
49 viSetLine
$viScreenId $lineNum ">Severity: serious"
50 } elseif
{[lindex $line 1] == "serious"} {
51 viSetLine
$viScreenId $lineNum ">Severity: critical"
52 } elseif
{[lindex $line 1] == "critical"} {
53 viSetLine
$viScreenId $lineNum ">Severity: non-critical"
57 proc priNext
{lineNum line
} {
59 viMsg
$viScreenId [lindex $line 1]
60 if {[lindex $line 1] == "low"} {
61 viSetLine
$viScreenId $lineNum ">Priority: medium"
62 } elseif
{[lindex $line 1] == "medium"} {
63 viSetLine
$viScreenId $lineNum ">Priority: high"
64 } elseif
{[lindex $line 1] == "high"} {
65 viSetLine
$viScreenId $lineNum ">Priority: low"
69 proc classNext
{lineNum line
} {
71 viMsg
$viScreenId [lindex $line 1]
72 if {[lindex $line 1] == "sw-bug"} {
73 viSetLine
$viScreenId $lineNum ">Class: doc-bug"
74 } elseif
{[lindex $line 1] == "doc-bug"} {
75 viSetLine
$viScreenId $lineNum ">Class: change-request"
76 } elseif
{[lindex $line 1] == "change-request"} {
77 viSetLine
$viScreenId $lineNum ">Class: support"
78 } elseif
{[lindex $line 1] == "support"} {
79 viSetLine
$viScreenId $lineNum ">Class: sw-bug"
83 proc catNext
{lineNum line
} {
86 viMsg
$viScreenId [lindex $line 1]
87 set curr
[lsearch -exact $categories [lindex $line 1]]
91 viMsg
$viScreenId $curr
92 viSetLine
$viScreenId $lineNum ">Class: [lindex $categories $curr]"