Differences From:
File
tools/cvs2fossil/lib/c2f_pass.tcl
part of check-in
[43d72c6246]
- Better formatting for --help-passes, align codes.
by
aku on
2007-10-06 03:53:41.
[view]
To:
File
tools/cvs2fossil/lib/c2f_pass.tcl
part of check-in
[70b0aa899a]
- Found easier way to access the typevariables of singletons when writing the rcs parser. Now moved the other singletons to the same construction.
by
aku on
2007-10-06 22:13:25.
[view]
@@ -123,9 +123,10 @@
# # ## ### ##### ######## #############
## Internal methods
proc Ok? {code label ov {emptyok 1}} {
- upvar 1 mydesc mydesc $ov ok
+ upvar 1 $ov ok
+ ::variable mydesc
if {$emptyok && ($code eq "")} return
if {[info exists mydesc($code)]} return
if {$label ne ""} {append label " "}
trouble fatal "Bad ${label}pass code $code"
@@ -133,19 +134,19 @@
return
}
proc Convert {code default} {
- upvar 1 mypasses mypasses
+ ::variable mypasses
return [expr {($code eq "") ? $default : [Id $code]}]
}
proc Id {code} {
- upvar 1 mypasses mypasses
+ ::variable mypasses
return [lsearch -exact $mypasses $code]
}
proc Call {code args} {
- upvar 1 mycmd mycmd
+ ::variable mycmd
set cmd $mycmd($code)
foreach a $args { lappend cmd $a }
eval $cmd
return