aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-09-10 01:43:19 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-09-10 01:43:19 +0300
commitb16fc7ed9f88c842b830a1c72c9cf6c1332d7b93 (patch)
tree9bd7350566d7a14b7cd1bf756754616071ce6dda
parentdb178647b046335520f9cb73398c7b1a7c198238 (diff)
downloadrex-b16fc7ed9f88c842b830a1c72c9cf6c1332d7b93.tar.gz
rex-b16fc7ed9f88c842b830a1c72c9cf6c1332d7b93.tar.bz2
Get rid of lappend2
-rwxr-xr-xrex.exp29
1 files changed, 4 insertions, 25 deletions
diff --git a/rex.exp b/rex.exp
index 282d66f..fb2d3c2 100755
--- a/rex.exp
+++ b/rex.exp
@@ -816,12 +816,12 @@ proc rexdbget {args} {
"-host" {
lshift args
set host [lshift args]
- lappend2 qlist $host [::pmres::resolve $host]
+ lappend qlist $host {*}[::pmres::resolve $host]
}
default { break }
}
}
- lappend2 qlist $args
+ lappend qlist {*}$args
if [info exists key] {
set lst {}
foreach q $qlist {
@@ -1279,11 +1279,11 @@ proc add_host_key_list {host key varname} {
upvar $varname comlist
if [rexdbget -return val -key $key -host $host] {
- lappend2 comlist $val
+ lappend comlist {*}$val
return
}
if [info exist config($key)] {
- lappend2 comlist $config($key)
+ lappend comlist {*}$config($key)
}
}
@@ -1515,27 +1515,6 @@ proc lshift listVar {
return $r
}
-proc lappend2 {args} {
- set name [lshift args]
- upvar $name dst
- while {[llength $args] > 0} {
- foreach src [lshift args] {
- lappend dst $src
- }
- }
- return $dst
-}
-
-proc lconcat {args} {
- set dst [lshift args]
- while {[llength $args] > 0} {
- foreach src [lshift args] {
- lappend dst $src
- }
- }
- return $dst
-}
-
proc transition {sid state} {
upvar sidinfo sidinfo
set sidinfo($sid,state) $state

Return to:

Send suggestions and report system problems to the System administrator.