diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-21 19:55:50 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 21:37:30 -0800 |
commit | 62e56496009796497665c1d06819c163589a3877 (patch) | |
tree | ef698494bccbc427a6ced251bb674a1879e83ccb /src/helper/startup.tcl | |
parent | 769fbfa058946e1581d5f9ad75d17947d1ee9ff1 (diff) |
rewrite 'unknown' command dispatching in C
Rewrite the magical 'unknown' command in C as a Jim handler, allowing
it to dispatch commands to any level in the tree.
Diffstat (limited to 'src/helper/startup.tcl')
-rw-r--r-- | src/helper/startup.tcl | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index 845198ad..ede8cdb9 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -44,23 +44,6 @@ proc cmd_help {cmdname h indent} { } } -# If a fn is unknown to Tcl, we try to execute it as an OpenOCD command -# -# We also support two level commands. "flash banks" is translated to -# flash_banks -proc unknown {args} { - # do the name mangling from "flash banks" to "flash_banks" - if {[llength $args]>=2} { - set cmd_name "[lindex $args 0]_[lindex $args 1]" - if {[catch {info body $cmd_name}]==0} { - # the command exists, try it... - return [eval "$cmd_name [lrange $args 2 end]"] - } - } - # This really is an unknown command. - return -code error "Unknown command: $args" -} - # Try flipping / and \ to find file if the filename does not # match the precise spelling proc find {filename} { |