︙ | | | ︙ | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Stop Tk from meddling with the command line by copying it first.
set ::eskil(argv) $::argv
set ::eskil(argc) $::argc
set ::argv {}
set ::argc 0
set ::eskil(debug) 0
set ::eskil(diffver) "Version 2.6 2011-10-30"
set ::eskil(thisScript) [file join [pwd] [info script]]
namespace import tcl::mathop::+
namespace import tcl::mathop::-
namespace import tcl::mathop::*
namespace import tcl::mathop::/
|
|
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Stop Tk from meddling with the command line by copying it first.
set ::eskil(argv) $::argv
set ::eskil(argc) $::argc
set ::argv {}
set ::argc 0
set ::eskil(debug) 0
set ::eskil(diffver) "Version 2.6+ 2011-11-01"
set ::eskil(thisScript) [file join [pwd] [info script]]
namespace import tcl::mathop::+
namespace import tcl::mathop::-
namespace import tcl::mathop::*
namespace import tcl::mathop::/
|
︙ | | | ︙ | |
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
|
while {[file type $tmplink] eq "link"} {
set tmplink [file readlink $tmplink]
set tmplink [file normalize [file join $::eskil(thisDir) $tmplink]]
set ::eskil(thisDir) [file dirname $tmplink]
}
# Get all other source files
source $::eskil(thisDir)/clip.tcl
source $::eskil(thisDir)/compare.tcl
source $::eskil(thisDir)/map.tcl
source $::eskil(thisDir)/merge.tcl
source $::eskil(thisDir)/registry.tcl
source $::eskil(thisDir)/dirdiff.tcl
source $::eskil(thisDir)/help.tcl
source $::eskil(thisDir)/plugin.tcl
source $::eskil(thisDir)/printobj.tcl
source $::eskil(thisDir)/print.tcl
source $::eskil(thisDir)/rev.tcl
source $::eskil(thisDir)/debug.tcl
# Diff functionality is in the DiffUtil package.
package require DiffUtil
# Help DiffUtil to find a diff executable, if needed
catch {DiffUtil::LocateDiffExe $::eskil(thisScript)}
# Figure out a place to store temporary files.
|
|
<
<
<
<
<
<
<
<
<
<
<
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
while {[file type $tmplink] eq "link"} {
set tmplink [file readlink $tmplink]
set tmplink [file normalize [file join $::eskil(thisDir) $tmplink]]
set ::eskil(thisDir) [file dirname $tmplink]
}
# Get all other source files
InitReSource
# Diff functionality is in the DiffUtil package.
package require DiffUtil
# Help DiffUtil to find a diff executable, if needed
catch {DiffUtil::LocateDiffExe $::eskil(thisScript)}
# Figure out a place to store temporary files.
|
︙ | | | ︙ | |
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
# Create a double up arrow
set ih [image height $::img(up)]
set iw [image width $::img(up)]
set ::img(upup) [image create photo -height $ih -width [expr {2 * $iw}]]
$::img(upup) copy $::img(up) -to 0 0 [expr {2 * $iw - 1}] [expr {$ih - 1}]
}
# Debug function to be able to reread the source even when wrapped in a kit.
proc EskilRereadSource {} {
set this $::eskil(thisScript)
# FIXA: Better detection of starkit?
# Maybe look at ::starkit::topdir ?
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
# Create a double up arrow
set ih [image height $::img(up)]
set iw [image width $::img(up)]
set ::img(upup) [image create photo -height $ih -width [expr {2 * $iw}]]
$::img(upup) copy $::img(up) -to 0 0 [expr {2 * $iw - 1}] [expr {$ih - 1}]
}
proc InitReSource {} {
# Get all other source files
source $::eskil(thisDir)/clip.tcl
source $::eskil(thisDir)/compare.tcl
source $::eskil(thisDir)/map.tcl
source $::eskil(thisDir)/merge.tcl
source $::eskil(thisDir)/registry.tcl
source $::eskil(thisDir)/dirdiff.tcl
source $::eskil(thisDir)/help.tcl
source $::eskil(thisDir)/plugin.tcl
source $::eskil(thisDir)/printobj.tcl
source $::eskil(thisDir)/print.tcl
source $::eskil(thisDir)/rev.tcl
source $::eskil(thisDir)/debug.tcl
}
# Debug function to be able to reread the source even when wrapped in a kit.
proc EskilRereadSource {} {
set this $::eskil(thisScript)
# FIXA: Better detection of starkit?
# Maybe look at ::starkit::topdir ?
|
︙ | | | ︙ | |
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
if {[file readable $src]} {
set this $src
}
}
}
puts "Resourcing $this"
uplevel \#0 [list source $this]
}
# This function is called when a toplevel is closed.
# If it is the last remaining toplevel, the application quits.
# If top = "all" it means quit.
# If eskil is embedded, this should be used to close an eskil toplevel.
proc cleanupAndExit {top} {
|
>
>
|
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
if {[file readable $src]} {
set this $src
}
}
}
puts "Resourcing $this"
uplevel \#0 [list source $this]
# Get all other source files
InitReSource
}
# This function is called when a toplevel is closed.
# If it is the last remaining toplevel, the application quits.
# If top = "all" it means quit.
# If eskil is embedded, this should be used to close an eskil toplevel.
proc cleanupAndExit {top} {
|
︙ | | | ︙ | |