Index: modules/struct/list.tcl ================================================================== --- modules/struct/list.tcl +++ modules/struct/list.tcl @@ -645,11 +645,14 @@ set full 0 while {[string match -* [set opt [::lindex $args 0]]]} { switch -glob -- $opt { -full {set full 1} - -- {break} + -- { + set args [::lrange $args 1 end] + break ; # fix ticket 6e778502b8 -- break exits while loop + } default { return -code error "Unknown option \"$opt\", should be either -full, or --" } } set args [::lrange $args 1 end] @@ -1823,6 +1826,6 @@ namespace eval ::struct { # Get 'list::list' into the general structure namespace. namespace import -force list::list namespace export list } -package provide struct::list 1.8.3 +package provide struct::list 1.8.4 Index: modules/struct/list.test ================================================================== --- modules/struct/list.test +++ modules/struct/list.test @@ -388,10 +388,14 @@ } {' {"}} ; # " help emacs highlighting test flatten-1.6 {flatten command} { flatten [list "{" "}"] } "\\\{ \\\}" + +test flatten-1.7 {check -- argument termination} { + flatten -full -- {1 2 3 {4 5} {6 7} {{8 9}} 10} +} {1 2 3 4 5 6 7 8 9 10} test flatten-2.1 {flatten errors} { list [catch {flatten} msg] $msg } {1 {wrong#args: should be "::struct::list::Lflatten ?-full? ?--? sequence"}} Index: modules/struct/pkgIndex.tcl ================================================================== --- modules/struct/pkgIndex.tcl +++ modules/struct/pkgIndex.tcl @@ -15,11 +15,11 @@ package ifneeded struct::graph 1.2.1 [list source [file join $dir graph1.tcl]] package ifneeded struct::tree 1.2.2 [list source [file join $dir tree1.tcl]] package ifneeded struct::matrix 1.2.1 [list source [file join $dir matrix1.tcl]] if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded struct::list 1.8.3 [list source [file join $dir list.tcl]] +package ifneeded struct::list 1.8.4 [list source [file join $dir list.tcl]] package ifneeded struct::graph 2.4.1 [list source [file join $dir graph.tcl]] if {![package vsatisfies [package provide Tcl] 8.5]} {return} if {![package vsatisfies [package provide Tcl] 8.6]} {return} Index: modules/struct/struct_list.man ================================================================== --- modules/struct/struct_list.man +++ modules/struct/struct_list.man @@ -1,8 +1,8 @@ [comment {-*- tcl -*- doctools manpage}] [comment {$Id: struct_list.man,v 1.24 2010/10/05 21:47:25 andreas_kupries Exp $}] -[vset LIST_VERSION 1.8.3] +[vset LIST_VERSION 1.8.4] [manpage_begin struct::list n [vset LIST_VERSION]] [keywords assign] [keywords common] [keywords comparison] [keywords diff]