52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
#-----------------------------------------------
# the next line restarts using wish \
exec wish "$0" "$@"
package require Tk
set debug 1
set diffver "Version 1.9.5+ 2003-01-10"
set tmpcnt 0
set tmpfiles {}
set thisscript [file join [pwd] [info script]]
set thisdir [file dirname $thisscript]
set ::diff(cvsExists) [expr {![string equal [auto_execok cvs] ""]}]
set ::diff(diffexe) diff
# Experimenting with DiffUtil package
set ::diff(diffutil) [expr {![catch {package require DiffUtil}]}]
set ::diff(diffutil) 0
if {[info exists env(TEMP)]} {
set ::diff(tmpdir) $env(TEMP)
} elseif {[info exists env(TMP)]} {
set ::diff(tmpdir) $env(TMP)
} else {
if {$tcl_platform(platform) == "windows"} {
set ::diff(tmpdir) c:/
} else {
set ::diff(tmpdir) .
}
}
# Support for FreeWrap.
if {[info exists ::freewrap::contents]} {
set debug 0
set thisdir [pwd]
set thisscript ""
# If diff.exe is wrapped, copy it so we can use it.
if {[info exists ::freewrap::pkgInfo(diff.exe)]} {
set ::diff(diffexe) [file join $diff(tmpdir) diff.exe]
::freewrap::pkgfilecopy diff.exe $::diff(diffexe) force
}
}
if {$tcl_platform(platform) == "windows"} {
cd $thisdir
catch {package require dde}
if {!$::diff(cvsExists) && [file exists "c:/bin/cvs.exe"]} {
|
|
>
>
|
>
>
|
>
|
<
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
#-----------------------------------------------
# the next line restarts using wish \
exec wish "$0" "$@"
package require Tk
set debug 1
set diffver "Version 1.9.5+ 2003-02-06"
set tmpcnt 0
set tmpfiles {}
set thisscript [file join [pwd] [info script]]
set thisdir [file dirname $thisscript]
set ::diff(cvsExists) [expr {![string equal [auto_execok cvs] ""]}]
set ::diff(diffexe) diff
set ::diff(thisexe) [list [info nameofexecutable] $thisscript]
# Experimenting with DiffUtil package
set ::diff(diffutil) [expr {![catch {package require DiffUtil}]}]
set ::diff(diffutil) 0
if {[info exists env(TEMP)]} {
set ::diff(tmpdir) $env(TEMP)
} elseif {[info exists env(TMP)]} {
set ::diff(tmpdir) $env(TMP)
} else {
if {$tcl_platform(platform) == "windows"} {
set ::diff(tmpdir) c:/
} else {
set ::diff(tmpdir) .
}
}
# Support for FreeWrap.
if {[info proc ::freewrap::unpack] != ""} {
console show
set debug 0
set thisdir [pwd]
set thisscript ""
set ::diff(thisexe) [list [info nameofexecutable]]
# If diff.exe is wrapped, copy it so we can use it.
set apa [::freewrap::unpack /diff.exe]
if {$apa != ""} {
set ::diff(diffexe) $apa
}
}
if {$tcl_platform(platform) == "windows"} {
cd $thisdir
catch {package require dde}
if {!$::diff(cvsExists) && [file exists "c:/bin/cvs.exe"]} {
|
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
|
incr lineNo
}
close $cho
close $chi
}
cleanupFiles
catch {exec [info nameofexecutable] diff.tcl $f1 $f2 &}
set ::diff(aligns) ""
}
# Mark a line as aligned.
proc markAlign {n line text} {
set ::diff(align$n) $line
|
|
|
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
|
incr lineNo
}
close $cho
close $chi
}
cleanupFiles
catch {eval exec $::diff(thisexe) \$f1 \$f2 &}
set ::diff(aligns) ""
}
# Mark a line as aligned.
proc markAlign {n line text} {
set ::diff(align$n) $line
|
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
|
set ch [open $f1 w]
puts $ch $::diff(separatetext1)
close $ch
set ch [open $f2 w]
puts $ch $::diff(separatetext2)
close $ch
catch {exec [info nameofexecutable] diff.tcl $f1 $f2 &}
unset ::diff(separate1)
unset ::diff(separate2)
}
}
proc hlPopup {n hl X Y x y} {
|
|
|
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
|
set ch [open $f1 w]
puts $ch $::diff(separatetext1)
close $ch
set ch [open $f2 w]
puts $ch $::diff(separatetext2)
close $ch
catch {eval exec $::diff(thisexe) \$f1 \$f2 &}
unset ::diff(separate1)
unset ::diff(separate2)
}
}
proc hlPopup {n hl X Y x y} {
|