From 60ba4476dfef5fae48b85d54e376a3ca27442113 Mon Sep 17 00:00:00 2001 From: ntfreak Date: Fri, 18 Jul 2008 11:38:23 +0000 Subject: - 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 --- src/helper/command.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/helper/command.c') diff --git a/src/helper/command.c b/src/helper/command.c index 7c5d77d6..234b64ef 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; -- cgit v1.2.3