diff --git src/port1.0/portutil.tcl src/port1.0/portutil.tcl
index 1370678..7881715 100644
|
|
proc handle_option {option args} { |
97 | 97 | } |
98 | 98 | |
99 | 99 | ## |
| 100 | # Handle option-contains |
| 101 | # |
| 102 | # @param option name of the option |
| 103 | # @param args arguments, can contain one of lsearch's options |
| 104 | proc handle_option-contains {option args} { |
| 105 | global $option user_options option_procs |
| 106 | |
| 107 | if {![info exists user_options($option)] && [info exists $option]} { |
| 108 | set arg0 [lindex $args 0] |
| 109 | if {[string index $arg0 0] eq "-"} { |
| 110 | set searchopt $arg0 |
| 111 | set args [lrange $args 1 end] |
| 112 | } else { |
| 113 | set searchopt "-exact" |
| 114 | } |
| 115 | if {[lsearch $searchopt [set $option] $args] >= 0} { |
| 116 | return yes |
| 117 | } |
| 118 | } |
| 119 | return no |
| 120 | } |
| 121 | |
| 122 | ## |
100 | 123 | # Handle option-append |
101 | 124 | # |
102 | 125 | # @param option name of the option |
… |
… |
proc handle_option-replace {option args} { |
204 | 220 | proc options {args} { |
205 | 221 | foreach option $args { |
206 | 222 | interp alias {} $option {} handle_option $option |
| 223 | interp alias {} $option-contains {} handle_option-contains $option |
207 | 224 | interp alias {} $option-append {} handle_option-append $option |
208 | 225 | interp alias {} $option-prepend {} handle_option-prepend $option |
209 | 226 | interp alias {} $option-delete {} handle_option-delete $option |