[GRASS5] Re: bugs in 5.7's tcltkgrass

Glynn Clements glynn.clements at virgin.net
Fri Oct 15 09:55:33 EDT 2004


Michael Barton wrote:

> > 3. all modules I tried in 5.7 display this instead of percents only:
> > Percent complete:    2%   5%   8% (...) 100%
> 
> On my computer, it goes:
> 
> Percent complete: 2%/b/b/b/b5%/b/b/b and so forth...most of the time. Other
> times, it stops after a few increments, then does nothing until 100%

The prnout function in gui.tcl already tries to handle this, but
there's a bug:

--- gui.tcl~	Thu Oct 14 12:40:18 2004
+++ gui.tcl	Fri Oct 15 14:46:59 2004
@@ -56,7 +56,7 @@
 		close $fh
 	} else {
 		set str [read $fh]
-		while {[set idx [string first {\b} $str]] != -1} {
+		while {[set idx [string first "\b" $str]] != -1} {
 			set last [expr $idx - 1]
 			set str1 [string range $str 1 $last]
 			set first [expr $idx + 1]

Using quotes instead of braces results in the backspaces being
removed.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list