summaryrefslogtreecommitdiff
path: root/src/helper/startup.tcl
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-21 19:55:50 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-24 21:37:30 -0800
commit62e56496009796497665c1d06819c163589a3877 (patch)
treeef698494bccbc427a6ced251bb674a1879e83ccb /src/helper/startup.tcl
parent769fbfa058946e1581d5f9ad75d17947d1ee9ff1 (diff)
downloadopenocd+libswd-62e56496009796497665c1d06819c163589a3877.tar.gz
openocd+libswd-62e56496009796497665c1d06819c163589a3877.tar.bz2
openocd+libswd-62e56496009796497665c1d06819c163589a3877.tar.xz
openocd+libswd-62e56496009796497665c1d06819c163589a3877.zip
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.tcl17
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} {