From 62e56496009796497665c1d06819c163589a3877 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Sat, 21 Nov 2009 19:55:50 -0800 Subject: 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. --- src/helper/startup.tcl | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/helper/startup.tcl') 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} { -- cgit v1.2.3