summaryrefslogtreecommitdiff
path: root/src/helper/command.h
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-23 15:03:04 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-24 21:37:37 -0800
commit17a9dea53a71e9d7e241262725f3dd707b620d37 (patch)
tree863bbe082bfb4eeb61dcab0b952de506703391d6 /src/helper/command.h
parentcd7e76ebf0e09466aeb3c61498360c45a1a3ad39 (diff)
downloadopenocd+libswd-17a9dea53a71e9d7e241262725f3dd707b620d37.tar.gz
openocd+libswd-17a9dea53a71e9d7e241262725f3dd707b620d37.tar.bz2
openocd+libswd-17a9dea53a71e9d7e241262725f3dd707b620d37.tar.xz
openocd+libswd-17a9dea53a71e9d7e241262725f3dd707b620d37.zip
add jim_handler to command_registration
Adding jim_handler field to command_registration allows removing the register_jim helper. All command registrations now go through the register_command{,s}() functions.
Diffstat (limited to 'src/helper/command.h')
-rw-r--r--src/helper/command.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/helper/command.h b/src/helper/command.h
index 2edeca91..84bdb71e 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -164,6 +164,8 @@ struct command
struct command *parent;
struct command *children;
command_handler_t handler;
+ Jim_CmdProc jim_handler;
+ void *jim_handler_data;
enum command_mode mode;
struct command *next;
};
@@ -198,6 +200,8 @@ char *command_name(struct command *c, char delim);
struct command_registration {
const char *name;
command_handler_t handler;
+ Jim_CmdProc jim_handler;
+ void *jim_handler_data;
enum command_mode mode;
const char *help;
/// a string listing the options and arguments, required or optional
@@ -319,9 +323,6 @@ void process_jim_events(void);
extern Jim_Interp *interp;
-void register_jim(struct command_context *context, const char *name,
- Jim_CmdProc cmd, const char *help);
-
int parse_ulong(const char *str, unsigned long *ul);
int parse_ullong(const char *str, unsigned long long *ul);