diff options
author | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-18 11:38:23 +0000 |
---|---|---|
committer | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-18 11:38:23 +0000 |
commit | 60ba4476dfef5fae48b85d54e376a3ca27442113 (patch) | |
tree | d830eeb18a83b51cb23f3fb672cb0587c4d92804 /src/helper/command.c | |
parent | 722fcb8d61e98be3ec2be73f26e8c9ab2136d70c (diff) | |
download | riscv-openocd-60ba4476dfef5fae48b85d54e376a3ca27442113.zip riscv-openocd-60ba4476dfef5fae48b85d54e376a3ca27442113.tar.gz riscv-openocd-60ba4476dfef5fae48b85d54e376a3ca27442113.tar.bz2 |
- fix incorrectly registered function openocd_array2mem
- removed unused variables
- reformatted lpc288x.[ch]
- fixed helper/Makefile.am dependencies
- add correct svn props to added files
git-svn-id: svn://svn.berlios.de/openocd/trunk@829 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/command.c')
-rw-r--r-- | src/helper/command.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 7c5d77d..234b64e 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -25,8 +25,9 @@ #endif #include "replacements.h" - +#include "target.h" #include "command.h" +#include "configuration.h" #include "log.h" #include "time_support.h" @@ -44,6 +45,9 @@ Jim_Interp *interp = NULL; int handle_sleep_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int handle_fast_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); + +int run_command(command_context_t *context, command_t *c, char *words[], int num_words); + static void tcl_output(void *privData, const char *file, int line, const char *function, const char *string) { Jim_Obj *tclOutput=(Jim_Obj *)privData; @@ -178,7 +182,6 @@ command_t* register_command(command_context_t *context, command_t *parent, char Jim_CreateCommand(interp, full_name, script_command, c, NULL); free((void *)full_name); - /* accumulate help text in Tcl helptext list. */ Jim_Obj *helptext=Jim_GetGlobalVariableStr(interp, "ocd_helptext", JIM_ERRMSG); if (Jim_IsShared(helptext)) @@ -207,7 +210,6 @@ int unregister_all_commands(command_context_t *context) if (context == NULL) return ERROR_OK; - while(NULL != context->commands) { c = context->commands; @@ -277,7 +279,6 @@ int unregister_command(command_context_t *context, char *name) return ERROR_OK; } - void command_output_text(command_context_t *context, const char *data) { if( context && context->output_handler && data ){ @@ -435,7 +436,6 @@ int command_run_line(command_context_t *context, char *line) return retval; } - int command_run_linef(command_context_t *context, char *format, ...) { int retval=ERROR_FAIL; @@ -451,8 +451,6 @@ int command_run_linef(command_context_t *context, char *format, ...) return retval; } - - void command_set_output_handler(command_context_t* context, int (*output_handler)(struct command_context_s *context, const char* line), void *priv) { context->output_handler = output_handler; @@ -476,7 +474,6 @@ int command_done(command_context_t *context) return ERROR_OK; } - /* find full path to file */ static int jim_find(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { @@ -502,8 +499,6 @@ static int jim_echo(Jim_Interp *interp, int argc, Jim_Obj *const *argv) return JIM_OK; } - - static size_t openocd_jim_fwrite(const void *_ptr, size_t size, size_t n, void *cookie) { size_t nbytes; |