︙ | | |
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
-
+
|
source $srcdir/preprocess.tcl
}
proc InitReSource {{srcdir {}}} {
if {$srcdir eq ""} {
set srcdir $::eskil(thisDir)
}
InitSourceEarly $srcdir
# Get all other source files
source $srcdir/eskil.tcl
source $srcdir/clip.tcl
source $srcdir/compare.tcl
source $srcdir/map.tcl
source $srcdir/merge.tcl
|
︙ | | |
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
+
+
+
+
+
+
-
+
-
-
+
+
|
foreach name [lsort -dictionary [dict keys $::eskil(opts,info)]] {
set outName $name
if {![dict exists $::eskil(opts,info) $name flag]} {
puts "Internal Error: BOHOHOHO $name"
break
}
if {![dict get $::eskil(opts,info) $name flag]} {
set valueName v
# Detect a reference in short description
set short [dict get $::eskil(opts,info) $name shortdescr]
if {[regexp {<(.*?)>} $short -> var] } {
set valueName $var
}
append outName " <v>"
append outName " <$valueName>"
}
# Line up shorter ones
if {[string length $outName] < 10} {
set outName [format %-10s $outName]
if {[string length $outName] < 12} {
set outName [format %-12s $outName]
}
set outName "$outName : "
set indent [string length $outName]
set len [expr {80 - $indent}]
set d [dict get $::eskil(opts,info) $name shortdescr]
if {$d eq "_"} continue
while {$d ne ""} {
|
︙ | | |
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
|
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
|
-
+
|
type ""
validator ""
filter ""
sideeffect ""
shortdescr ""
longdescr ""
source ""
}
}
}
# Add a command line flag that do not take a value
proc addFlags {args} {
foreach name $args {
dict set ::eskil(opts) $name 0
dict set ::eskil(opts,info) $name $::eskil(defoptinfo)
dict set ::eskil(opts,info) $name flag 1
|
︙ | | |
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
|
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
|
-
+
-
+
-
+
|
Init
return [makeDiffWin]
}
# Set up all options info
initOpts
addFlags --help -help
addPrefFlag -w ignore -w
addPrefFlag -b ignore -b
addPrefFlag -b ignore -b
addPrefFlag -noignore ignore " "
docFlag -w "Ignore all spaces"
docFlag -b "Ignore space changes (default)"
docFlag -noignore "Don't ignore any whitespace"
addPrefFlag -noparse parse 0
addPrefFlag -line parse 1
addPrefFlag -smallblock parse 2
addPrefFlag -block parse 3
docFlag -noparse "No block analysis"
docFlag -line "Line based block analysis"
docFlag -smallblock "Do block analysis on small blocks (default)"
docFlag -block "Full block analysis. This can be slow if there are large change blocks"
addPrefFlag -char lineparsewords 0
addPrefFlag -word lineparsewords 1
docFlag -char "Character based change view (default)"
docFlag -word "Word based change view"
addPrefFlag -i nocase
addPrefFlag -nocase nocase
addPrefFlag -nocase nocase
docFlag -i "Ignore case changes"
docFlag -nocase "Ignore case changes"
addPrefFlag -nodigit nodigit
docFlag -nodigit "Ignore digit changes"
addPrefFlag -nokeyword dir,ignorekey
docFlag -nokeyword "In directory diff, ignore \$ Keywords: \$"
addPrefFlag -noempty noempty
|
︙ | | |
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
|
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
|
-
+
-
+
|
}
addFlags -dir -clip -fourway -patch -review -
docFlag -dir "Start in directory diff mode. Ignores other args"
docFlag -clip "Start in clip diff mode. Ignores other args"
docFlag -fourway "Start in fourway diff mode. Ignores other args"
docFlag -patch "View patch file"
docFlag - "Read patch file from standard input, to allow pipes"
docFlag -review "View revision control tree as a patch."
docFlag -review "View revision control tree as a patch"
addFlags -browse -nodiff
docFlag -browse "Automatically bring up file dialog after starting"
docFlag -nodiff "Do not run diff after startup"
addFlags -server -cvs -svn -debug
docFlag -server "Set up Eskil to be controllable from the outside"
docFlag -cvs "Detect CVS first, if multiple version systems are used"
docFlag -svn "Detect SVN first, if multiple version systems are used"
docFlag -debug "Start in debug mode"
addFlags -foreach -close
docFlag -foreach "Open one diff window per file listed"
docFlag -close "Close windows with no changes"
docFlag -close "Close any window with no changes"
addFlags -nonewline -nonewline+ -nocdiff
docFlag -nonewline "Try to ignore newline changes"
docFlag -nonewline+ "Try to ignore newline changes, and don't display"
docFlag -nocdiff "Disable C version of DiffUtil. For debug"
addFlags -pluginlist
addMultFlags -pluginallow
docFlag -pluginlist "List known plugins"
|
︙ | | |
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
|
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
|
-
+
-
+
-
-
+
+
-
+
-
+
|
docFlag -pivot "Pivot setting for diff algorithm (10)"
addPrefOpt -context context optValidateNatural
docFlag -context "Show only differences, with <n> lines of context"
addPrefOpt -printHeaderSize printHeaderSize optValidatePositive
addPrefOpt -printCharsPerLine printCharsPerLine optValidatePositive
addPrefOpt -printPaper printPaper optValidatePaper
addPrefOpt -printColorChange printColorChange optValidatePdfColor
addPrefOpt -printColorOld printColorOld optValidatePdfColor
addPrefOpt -printColorOld printColorOld optValidatePdfColor
addPrefOpt -printColorNew printColorNew optValidatePdfColor
addPrefOpt -printFont printFont
docFlag -printHeaderSize "Font size for page header (10)"
docFlag -printCharsPerLine "Adapt font size for this line length and wrap (80)"
docFlag -printPaper "Select paper size (a4)"
docFlag -printColorChange "Color for change (1.0 0.7 0.7)"
docFlag -printColorOld "Color for old text (0.7 1.0 0.7)"
docFlag -printColorNew "Color for new text (0.8 0.8 1.0)"
docFlag -printFont "Select font to use in PDF, afm or ttf. If <fontfile> is given as \"Courier\", PDF built in font is used"
addPrefMultOpt -excludedir dir,exdirs
docFlag -excludedir "Exclude from directory diff"
addPrefMultOpt -excludefile dir,exfiles
docFlag -excludefile "Exclude from directory diff"
# These affect Pref but via special processing later
addMultOpt -prefix
docFlag -prefix "Care mainly about words starting with \"str\""
docFlag -prefix "Care mainly about words starting with <str>"
addMultOpt -preprocess
addMultOpt -preprocessleft
addMultOpt -preprocessright
docFlag -preprocess "TBW <pair>"
docFlag -preprocessleft "TBW <pair>"
docFlag -preprocessright "TBW <pair>"
# These affect opts
addOptsOpt -limit limitlines
docFlag -limit "Do not process more than <lines> lines"
addOptsFlag -gz gz
docFlag -gz "Uncompress input files with gunzip"
addOptsOpt -maxwidth maxwidth
docFlag -maxwidth "Limit column width in table mode"
addOptsOpt -o mergeFile
docFlag -o "Specify merge result output file"
addOptsOpt -o mergeFile
docFlag -o "Specify merge result output <file>"
addFilter -o [list file join [pwd]]
addOptsOpt -a ancestorFile
docFlag -a "Give ancestor file for three way merge"
docFlag -a "Give ancestor <file> for three way merge"
addFilter -a [list file join [pwd]]
# Default is no ignore on three-way merge
addSideEffect -a { set ::Pref(ignore) " " }
addOptsOpt -sep separatorview
docFlag -sep "See char <c> as separator between columns in files"
addOptsOpt -print printFile
docFlag -print "Generate PDF and exit."
docFlag -print "Generate PDF and exit"
addOptsOpt -printpdf printFile ;# Old option
docFlag -printpdf "_"
addSideEffect -print { set opts(printFileCmd) 1 }
addSideEffect -printpdf { set opts(printFileCmd) 1 }
addMultOpt -r
docFlag -r "Version info for version control mode"
|
︙ | | |