revert: better detection of expr() in netlister functions

This commit is contained in:
stefan schippers 2025-03-04 09:07:55 +01:00
parent 0ea6af2c99
commit b449bb2728
1 changed files with 5 additions and 5 deletions

View File

@ -1199,7 +1199,7 @@ static void print_vhdl_primitive(FILE *fd, int inst) /* netlist primitives, 200
}
}
my_strdup2(_ALLOC_ID_, &result, tcl_hook2(result)); /* tcl evaluation if tcleval(....) */
if(strstr(result, "expr(") == result) {
if(strstr(result, "expr(")) {
result = eval_expr(result);
}
dbg(1, "print_vhdl_primitive(): after translate3() result=%s\n", result);
@ -2463,7 +2463,7 @@ int print_spice_element(FILE *fd, int inst)
value = spiceprefixtag;
}
if(strstr(value, "expr(") == value) {
if(strstr(value, "expr(")) {
value = eval_expr(value);
}
/* token=%xxxx and xxxx is not defined in prop_ptr or template: return xxxx */
@ -2518,7 +2518,7 @@ int print_spice_element(FILE *fd, int inst)
if(result) {
my_strdup(_ALLOC_ID_, &result, tcl_hook2(result));
}
if(strstr(result, "expr(") == result) {
if(strstr(result, "expr(")) {
result = eval_expr(result);
}
if(result) fprintf(fd, "%s", result);
@ -3155,7 +3155,7 @@ static void print_verilog_primitive(FILE *fd, int inst) /* netlist switch level
}
}
my_strdup2(_ALLOC_ID_, &result, tcl_hook2(result)); /* tcl evaluation if tcleval(....) */
if(strstr(result, "expr(") == result) {
if(strstr(result, "expr(")) {
result = eval_expr(result);
}
dbg(1, "print_verilog_primitive(): after translate3() result=%s\n", result);
@ -4652,7 +4652,7 @@ const char *translate(int inst, const char* s)
* can be calculated */
my_strdup2(_ALLOC_ID_, &result, spice_get_node(tcl_hook2(result)));
if(strstr(result, "expr(") == result) {
if(strstr(result, "expr(")) {
dbg(1, "translate(): expr():%s\n", result);
my_strdup2(_ALLOC_ID_, &result, eval_expr(
translate3(result, 1, xctx->inst[inst].prop_ptr, xctx->sym[xctx->inst[inst].ptr].templ,