Ticket #18719: macports.tcl.diff
File macports.tcl.diff, 1.8 KB (added by blb@…, 16 years ago) |
---|
-
macports.tcl
old new 108 108 109 109 110 110 proc macports::ui_init {priority args} { 111 global macports::channels 112 111 113 # Get the list of channels. 112 114 try { 113 115 set channels [ui_channels $priority] … … 116 118 } 117 119 118 120 # Simplify ui_$priority. 119 set nbchans [llength $channels] 120 if {$nbchans == 0} { 121 if {[llength $channels] == 0} { 121 122 proc ::ui_$priority {args} {} 122 123 } else { 123 124 try { … … 129 130 try { 130 131 eval ::ui_init $priority $prefix $channels $args 131 132 } catch * { 132 if {$nbchans == 1}{133 set chan [lindex $channels 0]134 proc ::ui_$priority {args} [subst{133 proc ::ui_$priority {args} [subst { 134 global macports::channels 135 foreach chan {$macports::channels} { 135 136 if {\[lindex \$args 0\] == "-nonewline"} { 136 puts -nonewline $chan "$prefix\[lindex \$args 1\]"137 puts -nonewline \$chan "$prefix\[lindex \$args 1\]" 137 138 } else { 138 puts $chan "$prefix\[lindex \$args 0\]"139 puts \$chan "$prefix\[lindex \$args 0\]" 139 140 } 140 }] 141 } else { 142 proc ::ui_$priority {args} [subst { 143 foreach chan \$channels { 144 if {\[lindex \$args 0\] == "-nonewline"} { 145 puts -nonewline $chan "$prefix\[lindex \$args 1\]" 146 } else { 147 puts $chan "$prefix\[lindex \$args 0\]" 148 } 149 } 150 }] 151 } 141 } 142 }] 152 143 } 153 144 154 145 # Call ui_$priority