Public feed #380570

Stuff

public text v1 · immutable
Raw Edit
·published 2007-03-04 04:21 UTC
rendered paste body
proc loadcfg {path} {
        global eggfu grammar
        foreach cfg {eggfu grammar} {
                set cf [open $path$cfg.cfg r]
                while {![eof $cf]} {
                        set stdin [string trim [gets $cf]]
                        if {![regexp #.* $stdin] && $stdin != ""} {  
                                set ${cfg}([trim [lindex [split $stdin :] 0]]) [trim [lindex [split $stdin :] 1]]
                        }
                }
        }
}