Eskil

Diff
Login

Differences From Artifact [e2ffbcdbd8]:

To Artifact [14c846df3d]:


77
78
79
80
81
82
83





















84
85
86
87
88
89

90
91

92
93
94
95
96
97
98
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+






+


+







    }

    if {[file exists $::eskil(thisDir)/../version.txt]} {
        set ch [open $::eskil(thisDir)/../version.txt]
        set ::eskil(diffver) [string trim [read $ch 100]]
        close $ch
    }

    ##nagelfar syntax SubEval c
    if {[catch {package require Thread}]} {
        interp create _tinterp_
        interp alias {} SubEval _tinterp_ eval
    } else {
        set tid [thread::create -preserved]
        interp alias {} SubEval {} thread::send $tid
    }
    SubEval [list set ::auto_path $::auto_path]
    SubEval [list set ::argv0 $::argv0]
    SubEval [list set ::starkit::topdir $::starkit::topdir]
    SubEval {
        if {![file isdir $::starkit::topdir]} {
            vfs::mk4::Mount $::starkit::topdir $::starkit::topdir
        }
    }
    SubEval [list array set ::eskil [array get ::eskil]]
    SubEval [list proc InitReSource {} [info body InitReSource]]
    SubEval {package require snit}
    SubEval {InitReSource}

    # Get all other source files
    InitReSource

    # Diff functionality is in the DiffUtil package.
    package require DiffUtil
    SubEval {package require DiffUtil}
    # Help DiffUtil to find a diff executable, if needed
    catch {DiffUtil::LocateDiffExe $::eskil(thisScript)}
    SubEval [list catch [list DiffUtil::LocateDiffExe $::eskil(thisScript)]]

    # Create font for PDF
    if {$::Pref(printFont) eq ""} {
        set fontfile $::eskil(thisDir)/embedfont.ttf
    } else {
        set fontfile $::Pref(printFont)
    }
1715
1716
1717
1718
1719
1720
1721
1722
1723


1724
1725
1726
1727
1728
1729
1730
1738
1739
1740
1741
1742
1743
1744


1745
1746
1747
1748
1749
1750
1751
1752
1753







-
-
+
+







    }
    if {[info exists ::eskil($top,rightFileDiff)]} {
        set dFile2 $::eskil($top,rightFileDiff)
    } else {
        set dFile2 $::eskil($top,rightFile)
    }

    set differr [catch {DiffUtil::diffFiles {*}$opts \
            $dFile1 $dFile2} diffres]
    set cmd [list DiffUtil::diffFiles {*}$opts $dFile1 $dFile2]
    set differr [catch {SubEval $cmd} diffres]

    # In conflict mode we can use the diff information collected when
    # parsing the conflict file. This makes sure the blocks in the conflict
    # file become change-blocks during merge.
    if {$::eskil($top,mode) eq "conflict" && $::eskil($top,modetype) eq "Pure"} {
        set diffres $::eskil($top,conflictDiff)
    }
3198
3199
3200
3201
3202
3203
3204

3205
3206
3207
3208
3209
3210
3211
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235







+







        AddDebugMenu $top
    }
}

# Runtime disable of C version of DiffUtil
proc DisableDiffUtilC {} {
    uplevel \#0 [list source $::eskil(thisDir)/../lib/diffutil/tcl/diffutil.tcl]
    SubEval [list source $::eskil(thisDir)/../lib/diffutil/tcl/diffutil.tcl]
}

# Add a debug menu to a toplevel window
proc AddDebugMenu {top} {
    set dMenu [DebugMenu $top.m]
    $dMenu add checkbutton -label "Wrap" -variable wrapstate \
        -onvalue char -offvalue none -command \