File: dhelp.tcl

package info (click to toggle)
sauce 0.7.7.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 416 kB
  • ctags: 184
  • sloc: tcl: 4,105; makefile: 125; sh: 114
file content (14 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Debugging helper code

proc printarray {an} {
    upvar #0 $an array
    foreach x [array names array] { puts [list "${an}($x)" $array($x)] }
}

proc thrinfo {type} {
    foreach v [uplevel #0 { info vars }] {
	if {[regexp {^([^/]+)/[0-9]+$} $v all t] && [string match $type $t]} {
	    printarray $v
	}
    }
}