I've located the source of the problem, at least for Linux (and presumably other
Unix machines). If the ^M precedes a number, the internal workings of tkdiff
assume that it is derived from the `diff` output. I have a fix to the code,
in "proc run-command":
Instead of:
set failed [catch "$cmd \"2>$errfile\"" stdout]
do the following:
regsub "^exec " $cmd "" cmd_noexec
set fl [open "| $cmd_noexec \"2>$errfile\""]
fconfigure $fl -translation lf
set stdout [read $fl]
set failed [catch {close $fl}]
This is the first time I've programmed in tcl, so I apologize if I missed
something, but I've tested this fix and it does indeed handle imbedded ^M
characters correctly (for Unix derivations, it was unclear to me that the
-translation option to fconfigure would work on other machines).
Hope this helps,
Marc Pack
marc.pack@computer.org
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -1,4 +1,3 @@-
I've reported a bug in ^M handeling in kompare, and juste saw that
tkdiff is also affected while xemacs and vim -d aren't
status: open --> closed-fixed
assigned_to: michael-m
Group: --> v1.0 (example)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've located the source of the problem, at least for Linux (and presumably other
Unix machines). If the ^M precedes a number, the internal workings of tkdiff
assume that it is derived from the `diff` output. I have a fix to the code,
in "proc run-command":
Instead of:
set failed [catch "$cmd \"2>$errfile\"" stdout]
do the following:
regsub "^exec " $cmd "" cmd_noexec
set fl [open "| $cmd_noexec \"2>$errfile\""]
fconfigure $fl -translation lf
set stdout [read $fl]
set failed [catch {close $fl}]
This is the first time I've programmed in tcl, so I apologize if I missed
something, but I've tested this fix and it does indeed handle imbedded ^M
characters correctly (for Unix derivations, it was unclear to me that the
-translation option to fconfigure would work on other machines).
Hope this helps,
Marc Pack
marc.pack@computer.org
Diff:
Right idea - just wrong place in the code to fix. Repaired in V4.3