Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tkt-85a0ec8f50-ak Excluding Merge-Ins
This is equivalent to a diff from c76dc6a3fc to 31bfe3ad8e
2017-08-07
| ||
23:54 | Merged fix for ticket [85a0ec8f50]. check-in: 98a32c3965 user: aku tags: trunk | |
23:53 | Fix infinite loop when splitx is invoked with a regexp matching the empty string. Bumped version. Extended testsuite. Closed-Leaf check-in: 31bfe3ad8e user: aku tags: tkt-85a0ec8f50-ak | |
23:41 | Merged fix for ticket [cb043ecc70e0e90bf]. check-in: c76dc6a3fc user: aku tags: trunk | |
23:40 | Fixed missing version bump for bugfix. Fixed warning in statistics documentation. Closed-Leaf check-in: bf6666afc5 user: aku tags: avl-fix-areaPolygon-and-more | |
2017-06-05
| ||
21:00 | Merged fixes for tkt [71deadcf96]. check-in: 78d7722e1e user: aku tags: trunk | |
Changes to modules/textutil/pkgIndex.tcl.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | if {![package vsatisfies [package provide Tcl] 8.2]} { # FRINK: nocheck return } package ifneeded textutil 0.8 [list source [file join $dir textutil.tcl]] package ifneeded textutil::adjust 0.7.3 [list source [file join $dir adjust.tcl]] |
Changes to modules/textutil/split.tcl.
︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | + + + + + | # Bugfix 476988 if {[string length $str] == 0} { return {} } if {[string length $regexp] == 0} { return [::split $str ""] } if {[regexp $regexp {}]} { return -code error \ "splitting on regexp \"$regexp\" would cause infinite loop" } set list {} set start 0 while {[regexp -start $start -indices -- $regexp $str match submatch]} { foreach {subStart subEnd} $submatch break foreach {matchStart matchEnd} $match break incr matchStart -1 incr matchEnd |
︙ | |||
85 86 87 88 89 90 91 92 93 94 95 96 97 98 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | + + + + | if {[string length $str] == 0} { return {} } if {[string length $regexp] == 0} { return [::split $str {}] } if {[regexp $regexp {}]} { return -code error \ "splitting on regexp \"$regexp\" would cause infinite loop" } set list {} while {[regexp -indices -- $regexp $str match submatch]} { lappend list [string range $str 0 [expr {[lindex $match 0] -1}]] if {[lindex $submatch 0] >= 0} { lappend list [string range $str [lindex $submatch 0] \ [lindex $submatch 1]] |
︙ | |||
160 161 162 163 164 165 166 | 169 170 171 172 173 174 175 176 | - + | namespace eval ::textutil::split { namespace export splitx splitn } # ### ### ### ######### ######### ######### ## Ready |
Changes to modules/textutil/split.test.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + - + - + | # ------------------------------------------------------------------------- test splitn-0.1 {split empty string} { ::textutil::split::splitn "" } [list] |
︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | + + + + + + + | test splitx-4.2 {splitting of empty strings} { ::textutil::split::splitx "" "" } {} test splitx-5.0 {splitting using an empty regexp} { ::textutil::split::splitx "fooo bar bas" "" } {f o o o { } b a r { } b a s} test splitx-6.0 {split with regexp matching "" causes infinite loop eating RAM} { list [catch { ::textutil::split::splitx "Hello, Word" "|" } msg] $msg } {1 {splitting on regexp "|" would cause infinite loop}} |
Changes to modules/textutil/textutil_split.man.
|