Skip to content
Browse files

Fix ldelete to return a modified list, just as the other l* procs do.…

… This

fixes the root cause of the ethereal port problem.  Since this is the case,
also remove the safety-belt added to options_proc_trace since it's no longer
necessary and I'd just as soon have it error out to avoid masking future
problems of this nature.  Many thanks to Toby for tracking this down!

Submitted by:   Toby Peterson <>

git-svn-id: d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Jordan K. Hubbard
Jordan K. Hubbard committed Jan 6, 2004
1 parent 7f11a14 commit fc7fef554a1b93940e3b48c344840d115d227fdc
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/port1.0/portutil.tcl
@@ -108,7 +108,7 @@ proc options {args} {
global ${option} user_options option_procs \n\
\if \{!\[info exists user_options(${option})\]\} \{ \n\
foreach val \$args \{ \n\
ldelete ${option} \$val \n\
set ${option} \[ldelete \$\{$option\} \$val\] \n\
\} \n\
if \{\[string length \$\{${option}\}\] == 0\} \{ \n\
unset ${option} \n\
@@ -178,9 +178,6 @@ proc option_proc {option args} {
proc option_proc_trace {optionName index op} {
global option_procs
upvar $optionName optionValue
if {![info exists option_procs($optionName)]} {
switch $op {
w {
foreach p $option_procs($optionName) {
@@ -420,11 +417,11 @@ proc tbool {key} {
# ldelete
# Deletes a value from the supplied list
proc ldelete {list value} {
upvar $list uplist
set ix [lsearch -exact $uplist $value]
set ix [lsearch -exact $list $value]
if {$ix >= 0} {
set uplist [lreplace $uplist $ix $ix]
return [lreplace $list $ix $ix]
return $list

# reinplace

0 comments on commit fc7fef5

Please sign in to comment.
You can’t perform that action at this time.