[34395] trunk/base/src/port/port.tcl
raimue at macports.org
raimue at macports.org
Fri Feb 22 18:51:02 PST 2008
Revision: 34395
http://trac.macosforge.org/projects/macports/changeset/34395
Author: raimue at macports.org
Date: 2008-02-22 18:51:01 -0800 (Fri, 22 Feb 2008)
Log Message:
-----------
port/port.tcl:
Fix indent bug in proc wrapline introduced in r34391
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2008-02-23 02:00:29 UTC (rev 34394)
+++ trunk/base/src/port/port.tcl 2008-02-23 02:51:01 UTC (rev 34395)
@@ -411,15 +411,19 @@
# @return wrapped string
proc wrapline {line maxlen {indent ""}} {
set string [split $line " "]
- set newline [list $indent [lindex $string 0]]
+ set newline $indent
+ append newline [lindex $string 0]
+ set joiner " "
foreach word [lrange $string 1 end] {
if {[string length $newline]+[string length $word] > $maxlen} {
- lappend lines [join $newline " "]
- set newline [list $indent]
+ lappend lines $newline
+ set newline $indent
+ set joiner ""
}
- lappend newline $word
+ append newline $joiner $word
+ set joiner " "
}
- lappend lines [join $newline " "]
+ lappend lines $newline
return [join $lines "\n"]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080222/a053356c/attachment.html
More information about the macports-changes
mailing list