summaryrefslogtreecommitdiff
path: root/src/helper/startup.tcl
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-19 07:23:25 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-20 15:03:35 -0800
commita19aaf913688424dbd6384028854c178c9eb5bf2 (patch)
tree3da1fd02ee1cb62d74c05d7c9a1ce2db4ca841e8 /src/helper/startup.tcl
parente5b0a69ba99f58991ebb5d07ad947592f09728f1 (diff)
downloadopenocd+libswd-a19aaf913688424dbd6384028854c178c9eb5bf2.tar.gz
openocd+libswd-a19aaf913688424dbd6384028854c178c9eb5bf2.tar.bz2
openocd+libswd-a19aaf913688424dbd6384028854c178c9eb5bf2.tar.xz
openocd+libswd-a19aaf913688424dbd6384028854c178c9eb5bf2.zip
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.
Diffstat (limited to 'src/helper/startup.tcl')
-rw-r--r--src/helper/startup.tcl16
1 files changed, 1 insertions, 15 deletions
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]