1 |
< |
# SCCSid "$SunId$ LBL" |
1 |
> |
# RCSid: $Id$ |
2 |
|
# |
3 |
|
# Get help from a file, formatted like so: |
4 |
|
# |
129 |
|
.helpwin.txt insert end "Loading $fname..." |
130 |
|
update |
131 |
|
set curhelp(fid) [open $fname r] |
132 |
< |
if {! [file exists $ifile] || |
132 |
> |
if {! [file isfile $ifile] || |
133 |
|
[file mtime $fname] > [file mtime $ifile]} { |
134 |
|
set helpindex(catlist) {} |
135 |
|
while {[gets $curhelp(fid) li] >= 0} { |
230 |
|
if [regexp -nocase -indices \ |
231 |
|
$curhelp(search) $li mi] { |
232 |
|
.helpwin.txt tag add highlight\ |
233 |
< |
"end - 1 c - $ll c\ |
233 |
> |
"end - 2 c - $ll c\ |
234 |
|
+ [lindex $mi 0] c"\ |
235 |
< |
"end - $ll c\ |
235 |
> |
"end - 1 c - $ll c\ |
236 |
|
+ [lindex $mi 1] c" |
237 |
|
} |
238 |
|
} |
246 |
|
# Highlight next category and topic |
247 |
|
if {$ll > 0} { |
248 |
|
.helpwin.txt insert end "Next: $cat $top" |
249 |
< |
.helpwin.txt tag add highlight "end linestart" end |
249 |
> |
.helpwin.txt tag add highlight end-1lines end |
250 |
|
set curhelp(next) "$cat $top" |
251 |
|
.helpwin.but.next configure -state normal |
252 |
|
} else { |