From 71c04ad071701b9afa8ebf9ac4b489d18c1027f1 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 16 May 2023 09:52:23 +0200 Subject: [PATCH] fix unneeded there_are_floaters() call in callback.c --- src/callback.c | 6 ++++-- src/tedax_netlist.c | 2 +- src/token.c | 2 +- src/xschem.tcl | 7 ------- xschem_library/generators/symbolgen.tcl | 4 ++-- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/callback.c b/src/callback.c index 6750db20..bf59890f 100644 --- a/src/callback.c +++ b/src/callback.c @@ -664,8 +664,10 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "dataset", my_itoa(track_dset))); } if((xctx->graph_flags & 4) && tclgetboolvar("live_cursor2_backannotate")) { - if(i == xctx->graph_master) backannotate_at_cursor_b_pos(r, gr); - if(there_are_floaters()) set_modify(-2); /* update floater caches to reflect actual backannotation */ + if(i == xctx->graph_master) { + backannotate_at_cursor_b_pos(r, gr); + if(there_are_floaters()) set_modify(-2); /* update floater caches to reflect actual backannotation */ + } redraw_all_at_end = 1; } else { need_redraw = 1; diff --git a/src/tedax_netlist.c b/src/tedax_netlist.c index cc19af22..e7ed923d 100644 --- a/src/tedax_netlist.c +++ b/src/tedax_netlist.c @@ -229,7 +229,7 @@ int global_tedax_netlist(int global) /* netlister driver */ xctx->currsch--; unselect_all(1); xctx->pop_undo(4, 0); - tclvareval("get_directory [list ", xctx->sch[xctx->currsch - 1], "]", NULL); + tclvareval("get_directory [list ", xctx->sch[xctx->currsch], "]", NULL); my_strncpy(xctx->current_dirname, tclresult(), S(xctx->current_dirname)); my_strncpy(xctx->current_name, rel_sym_path(xctx->sch[xctx->currsch]), S(xctx->current_name)); err |= prepare_netlist_structs(1); /* so 'lab=...' attributes for unnamed nets are set */ diff --git a/src/token.c b/src/token.c index 633683bc..8993330f 100644 --- a/src/token.c +++ b/src/token.c @@ -195,7 +195,7 @@ int is_generator(const char *name) #else if (!name) return 0; char cmd[PATH_MAX+100]; - my_snprintf(cmd, S(cmd), "my_regexp {%s} {%s} [list %s]", "-nocase", "^[^ \\t()]+\\([^()]*\\)[ \\t]*$", name); + my_snprintf(cmd, S(cmd), "regexp {%s} {%s} [list %s]", "-nocase", "^[^ \\t()]+\\([^()]*\\)[ \\t]*$", name); tcleval(cmd); int ret = atoi(tclresult()); if (ret > 0) diff --git a/src/xschem.tcl b/src/xschem.tcl index a121519b..3205ae77 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -6405,13 +6405,6 @@ proc setup_tcp_xschem {} { return 1 } -proc my_regexp {options pattern name} { - if { [regexp $options $pattern $name] } { - return 1 - } - return 0 -} - proc setup_tcp_bespice {} { global bespice_listen_port bespice_server_getdata if { [info exists bespice_listen_port] && ($bespice_listen_port ne {}) } { diff --git a/xschem_library/generators/symbolgen.tcl b/xschem_library/generators/symbolgen.tcl index b720d148..d5ba65ed 100755 --- a/xschem_library/generators/symbolgen.tcl +++ b/xschem_library/generators/symbolgen.tcl @@ -22,7 +22,7 @@ L 4 30 -0 40 -0 {} B 5 37.5 -2.5 42.5 2.5 {name=y dir=out } B 5 -42.5 -2.5 -37.5 2.5 {name=a dir=in } A 4 25 -0 5 180 360 {} -T {$arg1 $rout} -47.5 24 0 0 0.3 0.3 {} +T {$arg1 $rout } -47.5 24 0 0 0.3 0.3 {} T {@name} 25 -22 0 0 0.2 0.2 {} T {y} 7.5 -6.5 0 1 0.2 0.2 {} T {a} -17.5 -6.5 0 0 0.2 0.2 {} @@ -44,7 +44,7 @@ L 4 -20 -20 -20 20 {} L 4 -20 20 20 0 {} B 5 37.5 -2.5 42.5 2.5 {name=y dir=out } B 5 -42.5 -2.5 -37.5 2.5 {name=a dir=in } -T {$arg1 $rout} -47.5 24 0 0 0.3 0.3 {} +T {$arg1 $rout } -47.5 24 0 0 0.3 0.3 {} T {@name} 25 -22 0 0 0.2 0.2 {} T {y} 7.5 -6.5 0 1 0.2 0.2 {} T {a} -17.5 -6.5 0 0 0.2 0.2 {}