Index: src/eskil.tcl ================================================================== --- src/eskil.tcl +++ src/eskil.tcl @@ -1257,11 +1257,15 @@ if {$::widgets($top,eqLabel) != "="} { makeMergeWin $top } } if {$::diff($top,printFile) != ""} { - after idle "doPrint $top 1 ; cleanupAndExit all" + if {$::diff($top,printMode) eq "PS"} { + after idle "doPrint $top 1 ; cleanupAndExit all" + } else { + after idle "doPrint2 $top 1 ; cleanupAndExit all" + } } } # This is the entrypoint to do a diff via DDE or Send proc remoteDiff {file1 file2} { @@ -2317,10 +2321,11 @@ proc initDiffData {top} { set ::diff($top,leftOK) 0 set ::diff($top,rightOK) 0 set ::diff($top,mode) "" set ::diff($top,printFile) "" + set ::diff($top,printMode) "PS" set ::diff($top,mergeFile) "" set ::diff($top,conflictFile) "" set ::diff($top,limitlines) 0 } @@ -3163,11 +3168,12 @@ -o : Specify merge result output file. -browse : Automatically bring up file dialog after starting. -server : Set up Eskil to be controllable from the outside. - -print : Generate postscript and exit. + -printps : Generate postscript and exit. + -printpdf : Generate pdf and exit. -limit : Do not process more than lines. To list all options matching a prefix, run 'eskil --query prefix'. In tcsh use this line to get option completion: @@ -3188,11 +3194,12 @@ } 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 -context + -clip -patch -browse -conflict -print -printps -printpdf + -server -o -r -context -foreach -preprocess -close -nonewline } # If the first option is "--query", use it to ask about options. if {$::eskil(argc) == 2 && [lindex $::eskil(argv) 0] == "--query"} { @@ -3323,12 +3330,15 @@ set ::eskil(ignorenewline) 2 } elseif {$arg eq "-close"} { set ::eskil(autoclose) 1 } elseif {$arg eq "-conflict"} { set opts(mode) "conflict" - } elseif {$arg eq "-print"} { + } elseif {$arg eq "-print" || $arg eq "-printps"} { + set nextArg printFile + } elseif {$arg eq "-printpdf"} { set nextArg printFile + set opts(printMode) "PDF" } elseif {$arg eq "-server"} { if {$::tcl_platform(platform) eq "windows"} { catch { package require dde dde servername Eskil