Posted to tcl by venks at Tue Jun 26 03:53:29 GMT 2012view pretty
Slows down gradually to just crawling: while {[gets $fi line] >= 0} { incr linenum set line [string trim $line] if {$linenum % 1000 == 0} { puts -nonewline Read:$n:$linenum\r flush stdout } if {[string length $line] > 0} { set line1 "$line1 $line" if {[regexp {;$} $line] || [regexp {endmodule\s*$} $line]} { puts $fo $line1 set line1 "" } } }
Comments
Posted by venks at Tue Jun 26 04:33:01 GMT 2012 [text] [code]
Fixed by changing the concat to a lappend + eventual join.