[147618] trunk/base/src/port/port.tcl
cal at macports.org
cal at macports.org
Sun Apr 10 04:39:33 PDT 2016
Revision: 147618
https://trac.macports.org/changeset/147618
Author: cal at macports.org
Date: 2016-04-10 04:39:32 -0700 (Sun, 10 Apr 2016)
Log Message:
-----------
port: Use [wrap ...] rather than reimplementing it
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2016-04-10 07:33:24 UTC (rev 147617)
+++ trunk/base/src/port/port.tcl 2016-04-10 11:39:32 UTC (rev 147618)
@@ -5246,35 +5246,8 @@
set notes $notificationsToPrint($name)
ui_notice " $name has the following notes:"
- # If env(COLUMNS) exists, limit each line's width to this width.
- if {[info exists env(COLUMNS)]} {
- set maxlen $env(COLUMNS)
-
- foreach note $notes {
- foreach line [split $note "\n"] {
- set joiner ""
- set lines ""
- set newline " "
-
- foreach word [split $line " "] {
- if {[string length $newline] + [string length $word] >= $maxlen} {
- lappend lines $newline
- set newline " "
- set joiner ""
- }
- ::append newline $joiner $word
- set joiner " "
- }
- if {$newline ne {}} {
- lappend lines $newline
- }
- ui_notice [join $lines "\n"]
- }
- }
- } else {
- foreach note $notes {
- ui_notice $note
- }
+ foreach note $notes {
+ ui_notice [wrap $note 0 " "]
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160410/674bac91/attachment.html>
More information about the macports-changes
mailing list