From c9544e411dce8e1c9f0513dee55834779f32bcb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Sat, 18 Dec 2010 10:16:26 +0100 Subject: [PATCH] script: support only Tcl comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only Tcl comments are now supported. For classic style commands comments were supported at the end of the line. Move in the direction of letting the script language decide syntax, rather than have special rules for some commands. Before this patch goes in, the scripts should be updated to use ;# instead of # for end of line comments. > mdw 0 1 2 mdw ['phys'] address [count] zy1000.cpu mdw address [count] Command handler execution failed in procedure 'mdw' > mdw 0 1 #2 mdw ['phys'] address [count] zy1000.cpu mdw address [count] Command handler execution failed in procedure 'mdw' > mdw 0 1 ;#2 0x00000000: ffffffff > mdw 0 1 0x00000000: ffffffff > mdw 0 0x00000000: ffffffff Signed-off-by: Øyvind Harboe --- src/helper/command.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/helper/command.c b/src/helper/command.c index af1d66f2..fd5e5f94 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -144,11 +144,6 @@ void script_debug(Jim_Interp *interp, const char *name, { int len; const char *w = Jim_GetString(argv[i], &len); - - /* end of line comment? */ - if (*w == '#') - break; - char * t = alloc_printf("%s %s", dbg, w); free (dbg); dbg = t; @@ -175,10 +170,6 @@ static const char **script_command_args_alloc( { int len; const char *w = Jim_GetString(argv[i], &len); - /* a comment may end the line early */ - if (*w == '#') - break; - words[i] = strdup(w); if (words[i] == NULL) { -- 2.39.5