33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Info dictionaries contain at least elements "name" and "size".
proc FileCompare {ch1 ch2 info1 info2} {
set bufsz 65536
while 1 {
set f1 [read $ch1 $bufsz]
set f2 [read $ch2 $bufsz]
if {$f1 eq "" && $f2 eq ""} break
if {![string equal -nocase $f1 $f2]} {
# Returning 0 signals "not equal"
return 0
}
}
# Return 1 means "equal"
# Return 2 means "equal this far", and lets normal compare take over
|
|
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Info dictionaries contain at least elements "name" and "size".
proc FileCompare {ch1 ch2 info1 info2} {
set bufsz 65536
while 1 {
set f1 [read $ch1 $bufsz]
set f2 [read $ch2 $bufsz]
if {$f1 eq "" && $f2 eq ""} break
if { ! [string equal -nocase $f1 $f2]} {
# Returning 0 signals "not equal"
return 0
}
}
# Return 1 means "equal"
# Return 2 means "equal this far", and lets normal compare take over
|