revert changes: `allow tcleval() in node alias names` and `allow tcleval(xxxx) in % dataset specification on graph nodes`: just wrap the whole list of nodes (including aliases, % specifications et all) into a tcleval(...)

This commit is contained in:
stefan schippers 2023-11-16 00:02:25 +01:00
parent c85727ae62
commit 5117001a9c
2 changed files with 6 additions and 6 deletions

View File

@ -2750,14 +2750,14 @@ static void draw_graph_variables(int wcnt, int wave_color, int n_nodes, int swee
/* draw node labels in graph */
if(bus_msb) {
if(gr->unity != 1.0) my_snprintf(tmpstr, S(tmpstr), "%s[%c]",
tcl_hook2(find_nth(ntok, ";,", "\"", 0, 1)), gr->unity_suffix);
else my_snprintf(tmpstr, S(tmpstr), "%s",tcl_hook2(find_nth(ntok, ";,", "\"", 0, 1)));
find_nth(ntok, ";,", "\"", 0, 1), gr->unity_suffix);
else my_snprintf(tmpstr, S(tmpstr), "%s",find_nth(ntok, ";,", "\"", 0, 1));
} else {
char *ntok_ptr = NULL;
char *alias_ptr = NULL;
dbg(1, "ntok=%s\n", ntok);
if(strstr(ntok, ";")) {
my_strdup2(_ALLOC_ID_, &alias_ptr, tcl_hook2(find_nth(ntok, ";", "\"", 0, 1)));
my_strdup2(_ALLOC_ID_, &alias_ptr, find_nth(ntok, ";", "\"", 0, 1));
my_strdup2(_ALLOC_ID_, &ntok_ptr, find_nth(ntok, ";", "\"", 0, 2));
}
else {
@ -3349,7 +3349,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct)
my_free(_ALLOC_ID_, &node_rawfile);
my_free(_ALLOC_ID_, &node_sim_type);
}
if(pos == 2) node_dataset = atoi(tcl_hook2(nd));
if(pos == 2) node_dataset = atoi(nd);
else node_dataset = -1;
dbg(1, "nd=|%s|, node_dataset = %d\n", nd, node_dataset);
my_strdup(_ALLOC_ID_, &ntok_copy, find_nth(ntok, "%", "\"", 4, 1));

View File

@ -2276,12 +2276,12 @@ proc graph_update_nodelist {} {
set col [xschem getprop rect 2 $graph_selected color]
set col [string trim $col " \n"]
set regx {(?:(tcleval\()?"[^"]+"\)?)|(?:(tcleval\()?[^\n \t]+\)?)}
set regx {(?:tcleval\(\n*)?("[^"]+"|[^ \t\n)]+)(?:\))?}
set txt [.graphdialog.center.right.text1 get 1.0 {end - 1 chars}]
set tt {}
set cc {}
set start 0
while {[regexp -indices -start $start $regx $txt idx]} {
while {[regexp -indices -start $start $regx $txt idxall idx]} {
lappend tt [lindex $idx 0]
set start [expr {[lindex $idx 1] + 1}]
lappend cc $start