From 882e20397de95a421236cb9ef07463094989e785 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 10 Jan 2025 14:12:05 +0100 Subject: [PATCH] get_additional_symbols(), get_sch_from_sym(): allow to resolve schematic calls like: schematic=generator.tcl(@n\) --> let get_tok_value() return backslashes and remove surrounding "..." quotes --- src/actions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions.c b/src/actions.c index f726c945..031a3cef 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1969,7 +1969,7 @@ void get_additional_symbols(int what) dbg(1, "schematic=%s\n", get_tok_value(xctx->inst[i].prop_ptr,"schematic",2)); /* resolve schematic=generator.tcl( @n ) where n=11 is defined in instance attrs */ my_strdup2(_ALLOC_ID_, &sch, - translate3(get_tok_value(xctx->inst[i].prop_ptr,"schematic",2), 1, + translate3(get_tok_value(xctx->inst[i].prop_ptr,"schematic", 6), 1, xctx->inst[i].prop_ptr, NULL, NULL)); dbg(1, "sch=%s\n", sch); @@ -2093,7 +2093,7 @@ void get_sch_from_sym(char *filename, xSymbol *sym, int inst, int fallback) if(inst >= 0) { /* resolve schematic=generator.tcl( @n ) where n=11 is defined in instance attrs */ my_strdup2(_ALLOC_ID_, &str_tmp, - translate3(get_tok_value(xctx->inst[inst].prop_ptr,"schematic",2), 1, + translate3(get_tok_value(xctx->inst[inst].prop_ptr,"schematic", 6), 1, xctx->inst[inst].prop_ptr, NULL, NULL)); } if(!str_tmp) my_strdup2(_ALLOC_ID_, &str_tmp, get_tok_value(sym->prop_ptr, "schematic", 2));