Tk Library Source Code

Artifact [07176d8257]
Login

Artifact 07176d8257ef3348f4ccba3e00aa7972e418263a:

Attachment "diffs.txt" to ticket [620852ffff] added by mrose 2002-10-10 05:13:43.
--- _mime.tcl	Wed Oct  9 14:56:43 2002
+++ mime.tcl	Wed Oct  9 15:11:41 2002
@@ -1619,7 +1619,6 @@
 
             puts $channel ""
 
-puts stdout "channel=$channel converter=$converter size=$size closeP=$closeP"
 	    while {($size != 0) && (![eof $fd])} {
 		if {$size < 0 || $size > 32766} {
 		    set X [read $fd 32766]
@@ -1630,7 +1629,7 @@
 		    set size [expr {$size - [string length $X]}]
 		}
 		if {[string compare $converter ""]} {
-		    puts $channel [$converter -mode encode -- $X]
+		    puts $channel [string trimright [$converter -mode encode -- $X]]
 		} else {
 		    puts $channel $X
 		}
@@ -1684,7 +1683,7 @@
             puts $channel ""
 
             if {[string compare $converter ""]} {
-                puts $channel [$converter -mode encode -- $state(string)]
+                puts $channel [string trimright [$converter -mode encode -- $state(string)]]
             } else {
 		puts $channel $state(string)
 	    }
@@ -1868,10 +1867,11 @@
 		    set size [expr {$size - [string length $X]}]
 		}
 		if {[string compare $converter ""]} {
-		    append result "[$converter -mode encode -- $X]\n"
+		    append result [string trimright [$converter -mode encode -- $X]]
 		} else {
-		    append result "$X\n"
+		    append result $X
 		}
+                append result "\n"
 	    }
 
             if {$closeP} {
@@ -1916,10 +1916,11 @@
             append result "\n"
 
 	    if {[string compare $converter ""]} {
-		append result "[$converter -mode encode -- $state(string)]\n"
+		append result [string trimright [$converter -mode encode -- $state(string)]]
 	    } else {
-		append result "$state(string)\n"
+		append result $state(string)
 	    }
+            append result "\n"
         }
 	default {
 	    error "Unknown value \"$state(value)\""