From 766b0ca8ac484a37d878623a189985b8e51e73cd Mon Sep 17 00:00:00 2001 From: oharboe Date: Sun, 13 Jul 2008 17:31:40 +0000 Subject: Charles Hardin - hopefully final word on startup.tcl => c conversion git-svn-id: svn://svn.berlios.de/openocd/trunk@803 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/openocd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/openocd.c') diff --git a/src/openocd.c b/src/openocd.c index 6c1f5703..813c021c 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -714,8 +714,8 @@ void add_jim(const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj Jim_ListAppendElement(interp, helptext, cmd_entry); } -extern char binary_startup_tcl_start; -extern char binary_startup_tcl_size; +extern unsigned const char startup_tcl[]; +extern unsigned int startup_tcl_len; void initJim(void) { @@ -741,10 +741,10 @@ void initJim(void) add_default_dirs(); - script_len = (int)&binary_startup_tcl_size; + script_len = startup_tcl_len; script = malloc(script_len + sizeof(char)); - memcpy(script, &binary_startup_tcl_start, script_len); - + memcpy(script, startup_tcl, script_len); + /* null terminate */ script[script_len] = 0; -- cgit v1.2.3