diff options
-rw-r--r-- | testsuite/lib/ltrace.exp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/lib/ltrace.exp b/testsuite/lib/ltrace.exp index 494b3c8..abb32f6 100644 --- a/testsuite/lib/ltrace.exp +++ b/testsuite/lib/ltrace.exp @@ -38,6 +38,18 @@ set LTRACE_OPTIONS {} set LTRACE_ARGS {} set LTRACE_TEMP_FILES {} +# Pre-8.5 TCL doesn't have lreverse. The following is taken from: +# http://www2.tcl.tk/17188 + +if {[info command lreverse] == ""} { + proc lreverse l { + set r {} + set i [llength $l] + while {[incr i -1]} {lappend r [lindex $l $i]} + lappend r [lindex $l 0] + } +} + # ltrace_compile SOURCE DEST TYPE OPTIONS # # Compile PUT(program under test) by native compiler. ltrace_compile runs |