]> git.sur5r.net Git - openocd/commitdiff
OpenOCD commands w/prefix ocd_ now set the primary Tcl return value instead of messin...
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 24 Jul 2008 20:46:15 +0000 (20:46 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 24 Jul 2008 20:46:15 +0000 (20:46 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@871 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/command.c

index 5ac57a1e2ff47083b7544049a7486870a11af019..d31bb6ecf728dbd6b8dcf3a86d8f5fd856a55e74 100644 (file)
@@ -115,7 +115,7 @@ static int script_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        log_remove_callback(tcl_output, tclOutput);
 
        /* We dump output into this local variable */
-       Jim_SetVariableStr(interp, "ocd_output", tclOutput);
+       Jim_SetResult(interp, tclOutput);
        Jim_DecrRefCount(interp, tclOutput);
 
        for (i = 0; i < nwords; i++)
@@ -205,7 +205,7 @@ command_t* register_command(command_context_t *context, command_t *parent, char
        free((void *)full_name);
        
        /* we now need to add an overrideable proc */
-       const char *override_name=alloc_printf("proc %s%s%s {args} {return [eval \"ocd_%s%s%s $args\"]}", t1, t2, t3, t1, t2, t3);
+       const char *override_name=alloc_printf("proc %s%s%s {args} {eval \"ocd_%s%s%s $args\";return \"\"}", t1, t2, t3, t1, t2, t3);
        Jim_Eval(interp, override_name);        
        free((void *)override_name);