diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-09-10 01:43:19 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-09-10 01:43:19 +0300 |
commit | b16fc7ed9f88c842b830a1c72c9cf6c1332d7b93 (patch) | |
tree | 9bd7350566d7a14b7cd1bf756754616071ce6dda | |
parent | db178647b046335520f9cb73398c7b1a7c198238 (diff) | |
download | rex-b16fc7ed9f88c842b830a1c72c9cf6c1332d7b93.tar.gz rex-b16fc7ed9f88c842b830a1c72c9cf6c1332d7b93.tar.bz2 |
Get rid of lappend2
-rwxr-xr-x | rex.exp | 29 |
1 files changed, 4 insertions, 25 deletions
@@ -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 |