diff --git a/src/netlist.c b/src/netlist.c index ac2272ef..ffb82900 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -356,7 +356,11 @@ void hash_wires(void) } /* return 0 if library path of s matches any lib name in tcl variable $xschem_libs */ -/* what: 1: netlist exclude lib, 2: hierarchical print exclude lib */ +/* what: + * 1: netlist exclude pattern + * 2: hierarchical print exclude pattern + * 4: hierarchical cell listing exclude pattern + */ int check_lib(int what, const char *s) { int range,i, found; @@ -365,15 +369,17 @@ int check_lib(int what, const char *s) found=0; if(what & 1) tcleval("llength $xschem_libs"); if(what & 2) tcleval("llength $noprint_libs"); + if(what & 4) tcleval("llength $nolist_libs"); range = atoi(tclresult()); dbg(1, "check_lib(): s=%s, range=%d\n", s, range); for(i=0;i %s\n", str, tclresult()); - my_snprintf(str, S(str), "regexp {%s} %s", tclresult(), s); + my_snprintf(str, S(str), "regexp {%s} {%s}", tclresult(), s); dbg(1, "check_lib(): str=%s\n", str); tcleval(str); if( tclresult()[0] == '1') found=1; diff --git a/src/spice_netlist.c b/src/spice_netlist.c index 8e3fa09b..f09ce450 100644 --- a/src/spice_netlist.c +++ b/src/spice_netlist.c @@ -78,7 +78,7 @@ void hier_psprint(char **res, int what) /* netlister driver */ if(!xctx->sym[i].type || !xctx->sym[i].name || !xctx->sym[i].name[0]) continue; /* can not descend into */ my_strdup2(1230, &abs_path, abs_sym_path(xctx->sym[i].name, "")); if(what & 1) flag = check_lib(2, abs_path); /* noprint_libs */ - else flag = check_lib(1, abs_path); /* xschem_libs */ + else flag = check_lib(4, abs_path); /* nolist_libs */ if(strcmp(xctx->sym[i].type,"subcircuit")==0 && flag) { /* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */ diff --git a/src/xschem.tcl b/src/xschem.tcl index 4f91b08e..34126448 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -5280,7 +5280,7 @@ set tctx::global_list { graph_selected graph_sort graph_unlocked hide_empty_graphs hide_symbols hsize incr_hilight infowindow_text input_line_cmd input_line_data launcher_default_program light_colors line_width live_cursor2_backannotate local_netlist_dir measure_text netlist_show - netlist_type no_change_attrs noprint_libs old_selected_tok only_probes path pathlist + netlist_type no_change_attrs nolist_libs noprint_libs old_selected_tok only_probes path pathlist persistent_command preserve_unchanged_attrs prev_symbol ps_colors rainbow_colors rawfile_loaded rcode recentfile replace_key retval retval_orig rotated_text search_exact search_found search_schematic @@ -6279,6 +6279,7 @@ if {[file exists ${XSCHEM_TMP_DIR}/xschem_web] } { # used in C code set_ne xschem_libs {} set_ne noprint_libs {} +set_ne nolist_libs {} set_ne debug_var 0 # used to activate debug from menu set_ne menu_debug_var 0 diff --git a/src/xschemrc b/src/xschemrc index 26a18d66..4032481c 100644 --- a/src/xschemrc +++ b/src/xschemrc @@ -105,6 +105,11 @@ #### variable controls hierarchical print #### default value: empty # set noprint_libs {} +#### nolist_libs is a list with same rules as for xschem_libs. This +#### variable controls cell listing in procedure list_hierarchy. +#### default value: empty +# set nolist_libs {} + ########################################################################### #### CHANGE DEFAULT [] WITH SOME OTHER CHARACTERS FOR BUSSED SIGNALS