summaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-16 20:20:15 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-16 20:20:15 +0000
commit3287b8661dcd300c6c662f173528cca423e19ce4 (patch)
treef594babec7ef91964f4fb36d25f191e6a9a23f63 /src/openocd.c
parentffe9257a1766ece36a75a4b33d9fa6959182e970 (diff)
downloadopenocd+libswd-3287b8661dcd300c6c662f173528cca423e19ce4.tar.gz
openocd+libswd-3287b8661dcd300c6c662f173528cca423e19ce4.tar.bz2
openocd+libswd-3287b8661dcd300c6c662f173528cca423e19ce4.tar.xz
openocd+libswd-3287b8661dcd300c6c662f173528cca423e19ce4.zip
Fixes to \ and / handling for OpenOCD
git-svn-id: svn://svn.berlios.de/openocd/trunk@815 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/openocd.c')
-rw-r--r--src/openocd.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/openocd.c b/src/openocd.c
index e535b9fe..3090bc44 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -614,34 +614,6 @@ static int Jim_Command_echo(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
return JIM_OK;
}
-static int Jim_Command_script(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
-{
- int retval;
- const char *file;
- char *full_path;
-
- if (argc != 2)
- {
- Jim_WrongNumArgs(interp, 1, argv, "file name missing");
- return JIM_ERR;
- }
-
- /* Run a tcl script file */
- file = Jim_GetString(argv[1], NULL);
- full_path = find_file(file);
- if (full_path == NULL)
- {
- Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
- Jim_AppendStrings(interp, Jim_GetResult(interp), "script: could not open file", file, NULL);
- return JIM_ERR;
- }
- retval = Jim_EvalFile(interp, full_path);
- free(full_path);
- /* convert a return to ok */
- if (retval == JIM_RETURN)
- return JIM_OK;
- return retval;
-}
static size_t openocd_jim_fwrite(const void *_ptr, size_t size, size_t n, void *cookie)
@@ -752,9 +724,8 @@ void initJim(void)
{
Jim_CreateCommand(interp, "openocd", Jim_Command_openocd, NULL, NULL);
Jim_CreateCommand(interp, "openocd_throw", Jim_Command_openocd_throw, NULL, NULL);
- Jim_CreateCommand(interp, "find", Jim_Command_find, NULL, NULL);
+ Jim_CreateCommand(interp, "openocd_find", Jim_Command_find, NULL, NULL);
Jim_CreateCommand(interp, "echo", Jim_Command_echo, NULL, NULL);
- Jim_CreateCommand(interp, "script", Jim_Command_script, NULL, NULL);
Jim_CreateCommand(interp, "mem2array", Jim_Command_mem2array, NULL, NULL );
Jim_CreateCommand(interp, "array2mem", Jim_Command_array2mem, NULL, NULL );