X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fhelper%2Fcommand.c;h=ef0afa2b56bca06e5b88e13ce4c5ca2c97b4ec2b;hb=1b0c22dd5693233ac348d1f16aed18177e97c010;hp=6f7dcadc95f2f8dbb69f4fd8ae9f16e35c185dbb;hpb=8b00e56e6433cff3ff818835953b27765aaabab0;p=fw%2Fopenocd diff --git a/src/helper/command.c b/src/helper/command.c index 6f7dcadc9..ef0afa2b5 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -31,10 +31,8 @@ #include "config.h" #endif -#if !BUILD_ECOSBOARD /* see Embedder-HOWTO.txt in Jim Tcl project hosted on BerliOS*/ #define JIM_EMBEDDED -#endif /* @todo the inclusion of target.h here is a layering violation */ #include @@ -291,7 +289,7 @@ static struct command **command_list_for_parent( static void command_free(struct command *c) { - /* / @todo if command has a handler, unregister its jim command! */ + /** @todo if command has a handler, unregister its jim command! */ while (NULL != c->children) { struct command *tmp = c->children; @@ -1280,7 +1278,6 @@ struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp context->output_handler = NULL; context->output_handler_priv = NULL; -#if !BUILD_ECOSBOARD /* Create a jim interpreter if we were not handed one */ if (interp == NULL) { /* Create an interpreter */ @@ -1289,7 +1286,7 @@ struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp Jim_RegisterCoreCommands(interp); Jim_InitStaticExtensions(interp); } -#endif + context->interp = interp; /* Stick to lowercase for HostOS strings. */ @@ -1314,6 +1311,8 @@ struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp HostOs = "ecos"; #elif defined(__FreeBSD__) HostOs = "freebsd"; +#elif defined(__OpenBSD__) + HostOs = "openbsd"; #else #warning "Unrecognized host OS..." HostOs = "other"; @@ -1349,7 +1348,6 @@ int command_context_mode(struct command_context *cmd_ctx, enum command_mode mode void process_jim_events(struct command_context *cmd_ctx) { -#if !BUILD_ECOSBOARD static int recursion; if (recursion) return; @@ -1357,7 +1355,6 @@ void process_jim_events(struct command_context *cmd_ctx) recursion++; Jim_ProcessEvents(cmd_ctx->interp, JIM_ALL_EVENTS | JIM_DONT_WAIT); recursion--; -#endif } #define DEFINE_PARSE_NUM_TYPE(name, type, func, min, max) \