Ticket #15913: macports.tcl.patch
File macports.tcl.patch, 1.7 KB (added by armahg@…, 16 years ago) |
---|
-
macports.tcl
76 76 # ui_channels returns a list of channels to output the message to, empty for 77 77 # no message. 78 78 # if these functions are not provided, defaults are used. 79 # Clients of the library may optionally provide ui_init with the following 80 # prototype. 81 # proc ui_init {priority prefix channels message} 82 # ui_init needs to correctly define the proc ::ui_$priority {message} or throw 83 # an error. 84 # if this function is not provided or throws an error, default procedures for 85 # ui_$priority are defined. 79 86 80 87 # ui_options accessor 81 88 proc macports::ui_isset {val} { … … 118 125 set prefix [ui_prefix_default $priority] 119 126 } 120 127 121 if {$nbchans == 1} { 122 set chan [lindex $channels 0] 123 proc ::ui_$priority {str} [subst { puts $chan "$prefix\$str" }] 124 } else { 125 proc ::ui_$priority {str} [subst { 126 foreach chan \$channels { 127 puts $chan "$prefix\$str" 128 } 129 }] 128 try { 129 ::ui_init $priority $prefix $channels $message 130 } catch * { 131 if {$nbchans == 1} { 132 set chan [lindex $channels 0] 133 proc ::ui_$priority {str} [subst { puts $chan "$prefix\$str" }] 134 } else { 135 proc ::ui_$priority {str} [subst { 136 foreach chan \$channels { 137 puts $chan "$prefix\$str" 138 } 139 }] 140 } 130 141 } 131 142 132 143 # Call ui_$priority