summaryrefslogtreecommitdiff
blob: 1d4f715ac167616fab225075e73bb35b4ab965af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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
--- cvs-local.orig/dirdiff
+++ cvs-local/dirdiff
@@ -563,7 +563,7 @@
 	    if {$d1 == $d2} continue
 	    set any 1
 	    $base.p.$sub1 add command -label "$d2" \
-		    -command "makepatch \"$d1\" \"$d2\""
+		    -command [list makepatch $d1 $d2]
 	}
 	if {$any} {
 	    $base.p add cascade -label "$d1 ->" -menu $base.p.$sub1
@@ -579,7 +579,7 @@
     set i 0
     foreach d $dirs {
 	if {!$dirreadonly($i)} {
-	    $base.t add command -label $d -command "touchfiles \"$d\""
+	    $base.t add command -label $d -command [list touchfiles $d]
 	}
 	incr i
     }
@@ -677,7 +677,7 @@
     set i 0
     foreach d $dirs {
 	.bar.options add checkbutton -label "Read-only $d" \
-		-variable dirreadonly($i) -command "readonlychange $i"
+		-variable dirreadonly($i) -command [list readonlychange $i]
 	incr i
     }
 
@@ -1153,7 +1153,7 @@
 	if {$xi != ""} {
 	    set x [lindex $dirs $xi]
 	    $diffbut add command -label "Show $x" \
-		    -command "showfile \"$x\" \"$selfile\""
+		    -command [list showfile $x $selfile]
 	}
     } elseif {$numgroups > 1} {
 	if {$numgroups > 2} {
@@ -1163,7 +1163,7 @@
 		lappend x [lindex $dirs $i]
 	    }
 	    $diffbut add command -label "$numgroups-way diff" \
-		-command "diffn {$x} {$selfile}"
+		-command [list diffn $x $selfile]
 	}
 	for {set gn 1} {$gn < $numgroups} {incr gn} {
 	    set yi [lindex $groupelts($gn) 0]
@@ -1184,7 +1184,7 @@
 		set xi [lindex $groupelts($go) 0]
 		if {$xi == ""} continue
 		set x [lindex $dirs $xi]
-		set cmd "diff2 \"$x\" \"$y\" \"$selfile\""
+		set cmd [list diff2 $x $y $selfile]
 		if {$numgroups <= 3} {
 		    if {$compound_ok} {
 			$diffbut add command -label "$x vs. $y" \
@@ -1283,7 +1283,7 @@
                 set cl2 [lindex $bgcolors($ng) $age]
                 if {$im2 == "ex"} {set im2 ""}
 		set y [lindex $dirs $dst]
-		set cmd "copyselfile \"$src\" \"$dst\" \"$selfile\" 0"
+		set cmd [list copyselfile $src $dst $selfile 0]
 		if {$any == 1} {
 		    if {$compound_ok} {
 			$copybut add command -label "$x -> $y" \
@@ -1346,7 +1346,7 @@
                 set im2 [lindex $agecolors($ng) $age]
                 set cl2 [lindex $bgcolors($ng) $age]
 		set y [lindex $dirs $dst]
-		set cmd "copyselfile \"$src\" \"$dst\" \"$selfile\" 1"
+		set cmd [list copyselfile $src $dst $selfile 1]
 		if {$any == 1} {
 		    if {$compound_ok} {
 			$copybut add command -label "$x -> $y" \
@@ -1392,10 +1392,10 @@
                 if {$compound_ok} {
 		    $copybut add command -label "Remove from $x" \
                         -image ex -compound left \
-			-command "removeselfile \"$dst\" \"$selfile\""
+			-command [list removeselfile $dst $selfile]
                 } else {
 		    $copybut add command -label "Remove from $x" \
-			-command "removeselfile \"$dst\" \"$selfile\""
+			-command [list removeselfile $dst $selfile]
                 }
 	    }
 	}
@@ -1415,7 +1415,7 @@
 		if {$dirreadonly($d)} continue
 		set y [lindex $dirs $d]
 		$copybut add command -label "$x -> $y" \
-			-command "copyselfile \"$s\" \"$d\" \"$selfile\" 0"
+			-command [list copyselfile $s $d $selfile 0]
 	    }
 	}
 	set needsep 1
@@ -1429,10 +1429,10 @@
             if {$compound_ok} {
 	        $copybut add command -label "Remove from $x" \
                     -image ex -compound left \
-		    -command "removeselfile \"$s\" \"$selfile\""
+		    -command [list removeselfile $s $selfile]
             } else {
 	        $copybut add command -label "Remove from $x" \
-		    -command "removeselfile \"$s\" \"$selfile\""
+		    -command [list removeselfile $s $selfile]
             }
 	}
     }
@@ -1469,7 +1469,7 @@
 
     # Show the file in an external viewer
     if { [llength $showprogram] > 0} {
-       eval "exec $showprogram \"$fn\" &"
+       exec $showprogram $fn &
        return
     }
     # Or make our own viewer
@@ -1569,7 +1569,7 @@
     set diffopts "-U $ctxlines $diffiflag $diffwflag $diffbflag $diffBflag $diffdflag"
 
     if { [llength $diffprogram] > 0} {
-       eval "exec $diffprogram \"$path1\" \"$path2\" &"
+       exec $diffprogram $path1 $path2 &
        return
     }
     # If we used an external diff program, its options are used.  If we didn't,
@@ -1750,7 +1750,7 @@
 	    if {$gx == $g && !$dirreadonly($k)} {
 		set f [lindex $dirs $k]
 		$mergebut.m add command -label "update $f" \
-		    -command "diffmerge $i \"$f\""
+		    -command [list diffmerge $i $f]
 		set path [joinname $f $difffile]
 		set diffmtime($path) [file mtime $path]
 	    }
@@ -1770,7 +1770,7 @@
 	    if {$gx == $g && !$dirreadonly($k)} {
 		set f [lindex $dirs $k]
 		$mpatchbut.m add command -label "for $f" \
-		    -command "diffmpatch $i \"$f\""
+		    -command [list diffmpatch $i $f]
 	    }
 	    incr k
 	}
@@ -3424,7 +3424,7 @@
     $w.bar.edit.m add command -label Copy -command "tk_textCopy $w.t"
     $w.bar.edit.m add command -label Paste -command "tk_textPaste $w.t"
     $w.bar.edit.m add command -label Find \
-	    -command "difffind :merge:$di:$fi $w.t"
+	    -command [list difffind :merge:$di:$fi $w.t]
     pack $w.bar.edit -side left
     frame $w.f -relief sunk -border 2
     entry $w.f.filename
@@ -3533,7 +3533,7 @@
     $w.bar.edit.m add command -label Copy -command "tk_textCopy $w.t"
     $w.bar.edit.m add command -label Paste -command "tk_textPaste $w.t"
     $w.bar.edit.m add command -label Find \
-	    -command "difffind :mpatch:$fi $w.t"
+	    -command [list difffind :mpatch:$fi $w.t]
     pack $w.bar.edit -side left
     frame $w.f -relief sunk -border 2
     entry $w.f.filename
@@ -3993,7 +3993,7 @@
        $w.bar.edit.m add command -label Copy -command "tk_textCopy $w.t"
        $w.bar.edit.m add command -label Paste -command "tk_textPaste $w.t"
        $w.bar.edit.m add command -label Find \
-	    -command "difffind :patch:$patchnum $w.t"
+	    -command [list difffind :patch:$patchnum $w.t]
        pack $w.bar.edit -side left
        frame $w.f -relief sunk -border 2
        label $w.f.l -text "Filename: "
@@ -4032,23 +4032,23 @@
 	set p1 [joinname $d1 $f]
 	set p2 [joinname $d2 $f]
 	if {[file exists $p1] && [file exists $p2]} {
-	    set fh [open "|diff $contextopt $p1 $p2" r]
+	    set fh [open [list |diff $contextopt $p1 $p2] r]
 	} elseif {[file exists $p1] && ! [file exists $p2]} {
-	    set fh [open "|diff $contextopt $p1 $nullfile" r]
+	    set fh [open [list |diff $contextopt $p1 $nullfile] r]
 	} elseif {! [file exists $p1] && [file exists $p2]} {
-	    set fh [open "|diff $contextopt $nullfile $p2" r]
+	    set fh [open [list |diff $contextopt $nullfile $p2] r]
 	} else {
             continue
 	}
 	fconfigure $fh -blocking 0
-	fileevent $fh readable "readpatch $fh $pnum $w $d1 $d2 $i \"$f\""
+	fileevent $fh readable [list readpatch $fh $pnum $w $d1 $d2 $i $f]
 	return
     }
     if {[string match ".*" $w]} {
        $w.t delete "end - 1c" end
     } else {
         close $w
-        eval "exec $showprogram \"$patch_outfile\" &"
+        exec $showprogram $patch_outfile &
         # Should we remove the tempfile here?  We don't have it if we used 
         # the internal viewer
     }