From a19aaf913688424dbd6384028854c178c9eb5bf2 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Thu, 19 Nov 2009 07:23:25 -0800 Subject: add add_help_text command handler Rewrite means for scripts to register help text for commands. These cause the new commands to be stored in the command heirarchy, with built-in commands; however, they will never be invoked there because they do not receive a command handler. The same trick is used for the Jim commands. Remove the old helpers that were used to register commands. --- src/helper/startup.tcl | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/helper/startup.tcl') diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index ddfef1dc..fc84943a 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -3,21 +3,6 @@ # Embedded into OpenOCD executable # -# Help text list. A list of command + help text pairs. -# -# Commands can be more than one word and they are stored -# as "flash banks" "help text x x x" - -proc add_help_text {cmd cmd_help} { - global ocd_helptext - lappend ocd_helptext [list $cmd $cmd_help] -} - -proc get_help_text {} { - global ocd_helptext - return $ocd_helptext -} - # We need to explicitly redirect this to the OpenOCD command # as Tcl defines the exit proc @@ -25,6 +10,7 @@ proc exit {} { ocd_throw exit } +# Help text list. A list of command + help text pairs. proc cmd_help {cmdname h indent} { set indent [expr $indent * 2] -- cgit v1.2.3