From: ian Date: Tue, 13 Dec 2005 22:08:27 +0000 (+0000) Subject: puts -nonewline => p X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=c2f9cdf406044b424771a8063cb5792c1a205b81;p=trains.git puts -nonewline => p --- diff --git a/detpic/crashread b/detpic/crashread index 374c93d..445168b 100755 --- a/detpic/crashread +++ b/detpic/crashread @@ -133,7 +133,7 @@ set ms [expr { proc xmit {b} { global p - puts -nonewline $p [format %c $b] + p $p [format %c $b] } proc xmit_s {b} { @@ -213,9 +213,11 @@ set displine 0 setup_$ms +proc p {s} { puts -nonewline $s } + proc endline {} { global inline displine - if {$inline} { puts -nonewline "\n"; incr displine } + if {$inline} { p "\n"; incr displine } set inline 0 } @@ -223,23 +225,23 @@ proc show {sym} { global insection section displine addr shownsection inline if {$insection && [string compare $section $shownsection]} { endline - puts "---------- $section ----------" + p "---------- $section ----------\n" set shownsection $section set displine 0 } elseif {!$insection && [string length $shownsection]} { endline - puts "------------------------------" + p "------------------------------\n" set shownsection {} set displine 0 } if {[string length $sym]} { if {$displine && $inline && !($displine&3)} { - puts -nonewline "\n" + p "\n" } endline } if {!$inline} { - puts -nonewline [format "%08x %-15s %-20s" $addr \ + p [format "%08x %-15s %-20s" $addr \ [lindex $sym 0] [lindex $sym 1]] set inline 1 } @@ -276,7 +278,7 @@ while {$sectionnum < [llength $sections]} { show {} set bytes [readbytes $addr $now] foreach b $bytes { - puts -nonewline [format " %02x" [expr {$b & 0xff}]] + p [format " %02x" [expr {$b & 0xff}]] incr addr } set inline 1