Eskil

Check-in [3f444e8cd2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Handle -sep better
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3f444e8cd2760de21b4ded46d7641674d02dde09
User & Date: peter 2015-04-19 18:01:26.450
Context
2015-04-19
18:50
Added disassembly view in debug win check-in: 0cd889765c user: peter tags: trunk
18:01
Handle -sep better check-in: 3f444e8cd2 user: peter tags: trunk
17:47
Added grep plugin check-in: 1880320ff2 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to plugins/csv.tcl.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# cho:  An output channel for writing the processed file.
proc PreProcess {side chi cho} {
    # Pick default -sep from command line
    set opts(-sep) ","
    set i [lsearch -exact $::argv "-sep"]
    if {$i >= 0} {
        incr i
        set opts(-sep) [lindex $::argv $i]
    }

    # Look for parameters in info string
    set opts(-ignore) ""
    set opts(-key) ""
    set opts(-header) 0
    foreach {opt val} $::Info {







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# cho:  An output channel for writing the processed file.
proc PreProcess {side chi cho} {
    # Pick default -sep from command line
    set opts(-sep) ","
    set i [lsearch -exact $::argv "-sep"]
    if {$i >= 0} {
        incr i
        set opts(-sep) [subst -nocommands -novariables [lindex $::argv $i]]
    }

    # Look for parameters in info string
    set opts(-ignore) ""
    set opts(-key) ""
    set opts(-header) 0
    foreach {opt val} $::Info {
Changes to plugins/grep.tcl.
1
2
3
4
5
6
7


8
9
10
11
12
13
14
##Eskil Plugin : Compare after filtering lines

# Example file for a plugin.
# A plugin must start exactly like this one.
# The text after : is the summary you can get at the command line

# This plugin only compares lines that match a pattern.



# A plugin must define this procedure to do the job.
# side: left or right
# chi:  An input channel for reading the original file.
# cho:  An output channel for writing the processed file.
proc PreProcess {side chi cho} {
    if {[catch {llength $::Info}]} {







>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
##Eskil Plugin : Compare after filtering lines

# Example file for a plugin.
# A plugin must start exactly like this one.
# The text after : is the summary you can get at the command line

# This plugin only compares lines that match a pattern.
# Example usage:
# eskil -plugin grep -plugininfo "-re {<t>}" f1 f2

# A plugin must define this procedure to do the job.
# side: left or right
# chi:  An input channel for reading the original file.
# cho:  An output channel for writing the processed file.
proc PreProcess {side chi cho} {
    if {[catch {llength $::Info}]} {
Changes to src/eskil.syntax.
58
59
60
61
62
63
64


65
66
67
68
69
70
71
##nagelfar syntax twapi::send_keys x
##nagelfar syntax twapi::get_window_coordinates x
##nagelfar package known twapi

##nagelfar syntax tablelist::tablelist x p*
##nagelfar syntax tablelist::convEventFields x x x
##nagelfar syntax tablelist::synchronize x


##nagelfar syntax tablelist::cellIndex x x x
##nagelfar syntax tablelist::findTabs x x x x n n
##nagelfar syntax mwutil::wrongNumArgs x
##nagelfar package known tablelist_tile

##nagelfar syntax MySpinBox x p*
##nagelfar option MySpinBox -textvariable -from -to -increment -width -format







>
>







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
##nagelfar syntax twapi::send_keys x
##nagelfar syntax twapi::get_window_coordinates x
##nagelfar package known twapi

##nagelfar syntax tablelist::tablelist x p*
##nagelfar syntax tablelist::convEventFields x x x
##nagelfar syntax tablelist::synchronize x
##nagelfar syntax tablelist::updateKeyToRowMap x
##nagelfar syntax tablelist::displayItems x
##nagelfar syntax tablelist::cellIndex x x x
##nagelfar syntax tablelist::findTabs x x x x n n
##nagelfar syntax mwutil::wrongNumArgs x
##nagelfar package known tablelist_tile

##nagelfar syntax MySpinBox x p*
##nagelfar option MySpinBox -textvariable -from -to -increment -width -format
Changes to src/eskil.tcl.
4230
4231
4232
4233
4234
4235
4236

4237
4238
4239
4240
4241
4242
4243
4244
    foreach arg $::eskil(argv) {
        if {$nextArg != ""} {
            if {$nextArg eq "mergeFile"} {
                set opts(mergeFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "ancestorFile"} {
                set opts(ancestorFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "separator"} {

                set opts(separator) $arg
            } elseif {$nextArg eq "printFile"} {
                set opts(printFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "printFont"} {
                set ::Pref(printFont) $arg
            } elseif {$nextArg eq "printHeaderSize"} {
                if {![string is double -strict $arg] || $arg <= 0} {
                    puts "Argument -printHeaderSize must be a positive number"







>
|







4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
    foreach arg $::eskil(argv) {
        if {$nextArg != ""} {
            if {$nextArg eq "mergeFile"} {
                set opts(mergeFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "ancestorFile"} {
                set opts(ancestorFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "separator"} {
                # Handle if separator is given e.g. as '\t'
                set opts(separator) [subst -nocommands -novariables $arg]
            } elseif {$nextArg eq "printFile"} {
                set opts(printFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "printFont"} {
                set ::Pref(printFont) $arg
            } elseif {$nextArg eq "printHeaderSize"} {
                if {![string is double -strict $arg] || $arg <= 0} {
                    puts "Argument -printHeaderSize must be a positive number"