diff --git a/doc/xschem_man/developer_info.html b/doc/xschem_man/developer_info.html index fe9a2a71..e1d47ace 100644 --- a/doc/xschem_man/developer_info.html +++ b/doc/xschem_man/developer_info.html @@ -1083,7 +1083,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns" Selects all objects in schematic
  • select_dangling_nets
  •     Select all nets/labels that are dangling, ie not attached to any non pin/port/probe components
    -   Returns 1 if danglings found, 0 otherwise 
    + Returns number of selected items (wires,labels) if danglings found, 0 otherwise
  • select_hilight_net
  •     Select all highlight objects (wires, labels, pins, instances) 
  • selected_set
  • diff --git a/src/scheduler.c b/src/scheduler.c
    index 6e5a0a8d..63849f6e 100644
    --- a/src/scheduler.c
    +++ b/src/scheduler.c
    @@ -3295,12 +3295,11 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
     
         /* select_dangling_nets 
          *   Select all nets/labels that are dangling, ie not attached to any non pin/port/probe components
    -     *   Returns 1 if danglings found, 0 otherwise */
    +     *   Returns number of selected items (wires,labels) if danglings found, 0 otherwise */
         else if(!strcmp(argv[1], "select_dangling_nets"))  
         {       
    -      int r;
    -      r = select_dangling_nets();
    -      Tcl_SetResult(interp, my_itoa(r), TCL_VOLATILE);
    +      select_dangling_nets();
    +      Tcl_SetResult(interp, my_itoa(xctx->lastsel), TCL_VOLATILE);
         }       
     
         /* select_hilight_net
    diff --git a/src/select.c b/src/select.c
    index 461ce479..996c1d9d 100644
    --- a/src/select.c
    +++ b/src/select.c
    @@ -82,6 +82,7 @@ static void check_connected_wire(int stop_at_junction, int n)
     
     int select_dangling_nets(void)
     {
    +  int netlist_lvs_ignore=tclgetboolvar("lvs_ignore");
       int i, p, w, touches, rects, done;
       int ret = 0; /* return code: 1: dangling elements found */
       int *table = NULL;
    @@ -107,6 +108,7 @@ int select_dangling_nets(void)
         RECTORDER(x1, y1, x2, y2);
         for(init_inst_iterator(&ctx, x1, y1, x2, y2); (instptr = inst_iterator_next(&ctx)) ;) {
           i = instptr->n;
    +      if(skip_instance(i, 0, netlist_lvs_ignore)) continue;
           type = (xctx->inst[i].ptr+ xctx->sym)->type;
           rct=(xctx->inst[i].ptr+ xctx->sym)->rect[PINLAYER];
           if(!rct) continue;
    @@ -211,6 +213,7 @@ int select_dangling_nets(void)
             if( type && (!strcmp(type, "label") || !strcmp(type, "probe")) ) {
               goto cont2;
             }
    +        if(skip_instance(n, 0, netlist_lvs_ignore)) goto cont2;
             rct = (xctx->inst[n].ptr+ xctx->sym)->rect[PINLAYER];
             if(!rct) goto cont2;
             rects = (xctx->inst[n].ptr + xctx->sym)->rects[PINLAYER];