projects
/
platform
/
upstream
/
ltrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23040c1
)
Support pre-8.5 TCL's by providing our own lreverse in ltrace.exp
author
Petr Machata
<pmachata@redhat.com>
Wed, 6 Nov 2013 11:10:18 +0000
(12:10 +0100)
committer
Chanho Park
<chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:23 +0000
(20:38 +0900)
testsuite/lib/ltrace.exp
patch
|
blob
|
history
diff --git
a/testsuite/lib/ltrace.exp
b/testsuite/lib/ltrace.exp
index
494b3c8
..
abb32f6
100644
(file)
--- 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