summaryrefslogtreecommitdiff
path: root/src/helper/command.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-15 20:35:53 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-15 20:35:53 +0000
commit4dcd58724a3473be3382f2eaf27a31ed923ced4a (patch)
tree8a384410b4dbed0f88f172e35155ba125b276828 /src/helper/command.c
parentb9522f0e78bbc429dfe913ee873e6b0b390b59b0 (diff)
downloadopenocd_libswd-4dcd58724a3473be3382f2eaf27a31ed923ced4a.tar.gz
openocd_libswd-4dcd58724a3473be3382f2eaf27a31ed923ced4a.tar.bz2
openocd_libswd-4dcd58724a3473be3382f2eaf27a31ed923ced4a.tar.xz
openocd_libswd-4dcd58724a3473be3382f2eaf27a31ed923ced4a.zip
Less wrong handling of JIM_EMBEDDED, follow Jim Tcl doc's and only use JIM_EMBEDDED in a single .c file. Still broken w/-fno-common(i.e. Mac OS).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1794 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/command.c')
-rw-r--r--src/helper/command.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index cb576bb3..9d4956c7 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -30,6 +30,11 @@
#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 "target.h"
#include "command.h"
@@ -675,7 +680,7 @@ command_context_t* command_init()
context->output_handler = NULL;
context->output_handler_priv = NULL;
-#ifdef JIM_EMBEDDED
+#if !BUILD_ECOSBOARD
Jim_InitEmbedded();
/* Create an interpreter */
interp = Jim_CreateInterp();
@@ -721,7 +726,7 @@ command_context_t* command_init()
add_default_dirs();
-#ifdef JIM_EMBEDDED
+#if !BUILD_ECOSBOARD
Jim_EventLoopOnLoad(interp);
#endif
if (Jim_Eval_Named(interp, startup_tcl, "embedded:startup.tcl",1)==JIM_ERR)
@@ -800,7 +805,7 @@ int handle_fast_command(struct command_context_s *cmd_ctx, char *cmd, char **arg
void process_jim_events(void)
{
-#ifdef JIM_EMBEDDED
+#if !BUILD_ECOSBOARD
static int recursion = 0;
if (!recursion)