︙ | | |
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
-
+
+
-
|
# 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 debug 0
set diffver "Version 2.0.7+ 2005-02-20"
set diffver "Version 2.0.7+ 2005-03-24"
set ::thisScript [file join [pwd] [info script]]
# Do initalisations for needed packages and globals.
# This is not run until needed to speed up command line error reporting.
proc Init {} {
package require Tk 8.4
catch {package require textSearch}
package require wcb
if {[catch {package require psballoon}]} {
# Add a dummy if it does not exist.
proc addBalloon {args} {}
} else {
namespace import -force psballoon::addBalloon
}
set ::thisScript [file join [pwd] [info script]]
set ::thisDir [file dirname $::thisScript]
# Follow any link
set tmplink $::thisScript
while {[file type $tmplink] eq "link"} {
set tmplink [file readlink $tmplink]
set tmplink [file normalize [file join $::thisDir $tmplink]]
|
︙ | | |
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
|
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
|
+
|
-nodiff : Normally, if there are enough information on the
command line to run diff, Eskil will do so unless
this option is specified.
-dir : Start in directory diff mode. Ignores other args.
-clip : Start in clip diff mode. Ignores other args.
-patch : View patch file.
-context <n>: Show only differences, with <n> lines of context.
-noparse : Eskil can perform analysis of changed blocks to
-line : improve display. See online help for details.
-smallblock : The default. Do block analysis on small blocks.
-block : Full block analysis. This can be slow if there
are large change blocks.
|
︙ | | |
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
|
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
|
-
+
|
makeDiffWin
return
}
set allOpts {
-w --help -help -b -noignore -i -nocase -nodigit -nokeyword -prefix
-noparse -line -smallblock -block -char -word -limit -nodiff -dir
-clip -patch -browse -conflict -print -server -o -r
-clip -patch -browse -conflict -print -server -o -r -context
}
# If the first option is "--query", use it to ask about options.
if {$::eskil(argc) == 2 && [lindex $::eskil(argv) 0] == "--query"} {
set arg [lindex $::eskil(argv) 1]
if {[lsearch -exact $allOpts $arg] < 0} {
set match [lsearch -glob -all -inline $allOpts $arg*]
|
︙ | | |
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
|
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
|
+
+
|
} elseif {$nextArg eq "printFile"} {
set opts(printFile) [file join [pwd] $arg]
} elseif {$nextArg eq "revision"} {
set opts(doptrev$revNo) $arg
incr revNo
} elseif {$nextArg eq "limitlines"} {
set opts(limitlines) $arg
} elseif {$nextArg eq "context"} {
set Pref(context) $arg
} elseif {$nextArg eq "prefix"} {
set RE [string map [list % $arg] {^.*?\m(%\w+).*$}]
if {$Pref(nocase)} {
set RE "(?i)$RE"
}
set ::Pref(regsub) [list $RE {\1}]
}
|
︙ | | |
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
|
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
|
+
+
|
set Pref(nocase) 1
} elseif {$arg eq "-nodigit"} {
set Pref(nodigit) 1
} elseif {$arg eq "-nokeyword"} {
set Pref(dir,ignorekey) 1
} elseif {$arg eq "-prefix"} {
set nextArg prefix
} elseif {$arg eq "-context"} {
set nextArg context
} elseif {$arg eq "-noparse"} {
set Pref(parse) 0
} elseif {$arg eq "-line"} {
set Pref(parse) 1
} elseif {$arg eq "-smallblock"} {
set Pref(parse) 2
} elseif {$arg eq "-block"} {
|
︙ | | |
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
|
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
|
+
+
+
+
+
|
set Pref(bgnew2) \#e0e0ff
set Pref(context) 0
set Pref(marklast) 1
set Pref(linewidth) 80
set Pref(lines) 60
set Pref(editor) ""
set Pref(regsub) {}
# Print options
set Pref(grayLevel1) 0.6
set Pref(grayLevel2) 0.8
set Pref(wideLines) 0
# Directory diff options
set Pref(comparelevel) 1
set Pref(dir,ignorekey) 0
set Pref(recursive) 0
set Pref(dir,onlydiffs) 0
set Pref(nodir) 0
|
︙ | | |