Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: LinuxCNC/linuxcnc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: olsonse/linuxcnc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 6 files changed
  • 1 contributor

Commits on Nov 9, 2016

  1. Add new ini parser; merges commonly named sections--allows #INCLUDE t…

    …o be more effective
    
    This patch adds a ini-merging ability whereby tag=value items are merged
    together into the same effective section.  Consider the following ini file:
    ----begin----
    [A]
    var0 = 0
    
    [B]
    var0 = 12
    
    [A]
    var0 = 123
    var1 = hi
    ---end----
    
    With the old parser, only the first instance of the 'A' section would be
    recognized.  The second instance of the 'A' section would be entirely
    ignored.  With this new parser, the final 'A' section contains two values
    for var0 and one value for var1.
    
    The major benefit of this patch is that the #INCLUDE command can be used
    much more effectively.  As an example, one could define a configuration
    file that is fairly generic and _almost_ fits perfectly for a whole series
    of machines.  Then, in order to specialize the configuration for a
    particular machine, one can simply set the specialized tag=value items
    first in the specialized ini-file; following these specialized tag=value
    items, one simply uses #INCLUDE to import the generic configuration, were
    the specialized tag=value items are first taken from the specialized ini
    file.
    
    One additional feature is added with this patch:
    If one uses the ":=" operator, instead of the simple "=" operator, one can
    override all previous values for that particular [SECTION]VARIABLE.  In
    other words, before using a ":=" operator, the above example yields two
    separate values for [A]var0.  If a subsequent assignment to [A]var0 looked
    like:
    -----beg-snip----
    [A]
    var0 := 1010
    -----end-snip----
    then the previous values for [A]var0 would be discarded and only this last
    value remains.
    
    Note:  The new ':=' override operator is implemented both in the c++ _and_
    tcl code.
    
    Signed-off-by: Spencer E Olson <[email protected]>
    olsonse committed Nov 9, 2016
    Configuration menu
    Copy the full SHA
    b9de130 View commit details
    Browse the repository at this point in the history
Loading