Index: trunk/src/libcschem/Makefile.dep =================================================================== --- trunk/src/libcschem/Makefile.dep (revision 10097) +++ trunk/src/libcschem/Makefile.dep (revision 10098) @@ -1,7 +1,12 @@ ### Generated file, do not edit, run make dep ### -abstract.o: abstract.c config.h abstract.h ../libcschem/common_types.h \ - ../libcschem/config.h ../libcschem/attrib.h TODO.h +abstract.o: abstract.c config.h hierarchy.h ../libcschem/concrete.h \ + ../libcschem/common_types.h ../libcschem/config.h ../libcschem/rtree.h \ + ../libcschem/attrib.h ../libcschem/oidpath.h ../libcschem/vtoid.h \ + ../../src_3rd/libuundo/uundo.h ../../src_3rd/libminuid/libminuid.h \ + ../../src_3rd/gengeo2d/typecfg_long_double.h ../../src_3rd/opc89.h \ + ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h \ + ../libcschem/abstract.h ../libcschem/TODO.h abstract.h actions_csch.o: actions_csch.c config.h actions_csch.h oidpath.h \ ../libcschem/vtoid.h ../libcschem/common_types.h ../libcschem/config.h attrib.o: attrib.c config.h ../libcschem/common_types.h \ @@ -162,8 +167,8 @@ ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h event.h \ cnc_obj.h attrib.h cnc_pen.h ../libcschem/concrete.h cnc_text.h \ ../libcschem/cnc_text_dyn.h ../libcschem/cnc_text.h cnc_grp.h \ - non_graphical.h ../libcschem/hierarchy.h project.h ../libcschem/engine.h \ - plug_library.h + non_graphical.h ../libcschem/hierarchy.h ../libcschem/abstract.h \ + ../libcschem/TODO.h project.h ../libcschem/engine.h plug_library.h csch_printf.o: csch_printf.c config.h csch_printf.h drc.o: drc.c config.h actions_csch.h drc.h ../libcschem/concrete.h \ ../libcschem/common_types.h ../libcschem/config.h ../libcschem/rtree.h \ @@ -186,7 +191,8 @@ ../../src_3rd/libuundo/uundo.h ../../src_3rd/libminuid/libminuid.h \ ../../src_3rd/gengeo2d/typecfg_long_double.h ../../src_3rd/opc89.h \ ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h cnc_grp.h \ - ../libcschem/concrete.h project.h ../libcschem/engine.h hierarchy.h + ../libcschem/concrete.h project.h ../libcschem/engine.h hierarchy.h \ + ../libcschem/abstract.h ../libcschem/TODO.h htPo.o: htPo.c htPo.h config.h \ ../../src_3rd/gengeo2d/typecfg_long_double.h ../../src_3rd/opc89.h \ ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h @@ -232,7 +238,8 @@ ../../src_3rd/libuundo/uundo.h ../../src_3rd/libminuid/libminuid.h \ ../../src_3rd/gengeo2d/typecfg_long_double.h ../../src_3rd/opc89.h \ ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h \ - non_graphical.h ../libcschem/hierarchy.h ../libcschem/concrete.h + non_graphical.h ../libcschem/hierarchy.h ../libcschem/concrete.h \ + ../libcschem/abstract.h ../libcschem/TODO.h oidpath.o: oidpath.c config.h oidpath.h ../libcschem/vtoid.h \ ../libcschem/common_types.h ../libcschem/config.h concrete.h \ ../libcschem/rtree.h ../libcschem/attrib.h ../libcschem/oidpath.h \ Index: trunk/src/libcschem/abstract.c =================================================================== --- trunk/src/libcschem/abstract.c (revision 10097) +++ trunk/src/libcschem/abstract.c (revision 10098) @@ -237,11 +237,11 @@ } -csch_anet_t *csch_anet_new(csch_abstract_t *abs, const char *netname, int set_no_uname) +csch_anet_t *csch_anet_new(csch_abstract_t *abs, csch_hlevel_t *hlev, csch_ascope_t scope, const char *name_glob, const char *name_loc, int set_no_uname) { csch_anet_t *net = calloc(sizeof(csch_anet_t), 1); csch_aobj_init(abs, &net->hdr, CSCH_ATYPE_NET); - net->name = rnd_strdup(netname); + net->name = rnd_strdup(name_glob); net->no_uname = set_no_uname; htsp_set(&abs->nets, net->name, net); return net; Index: trunk/src/libcschem/abstract.h =================================================================== --- trunk/src/libcschem/abstract.h (revision 10097) +++ trunk/src/libcschem/abstract.h (revision 10098) @@ -215,7 +215,7 @@ /*** net ***/ csch_anet_t *csch_anet_get(csch_abstract_t *abs, const char *netname); csch_anet_t *csch_anet_get_at(csch_abstract_t *abs, csch_hlevel_t *hlev, csch_ascope_t scope, const char *netname); -csch_anet_t *csch_anet_new(csch_abstract_t *abs, const char *netname, int set_no_uname); +csch_anet_t *csch_anet_new(csch_abstract_t *abs, csch_hlevel_t *hlev, csch_ascope_t scope, const char *name_glob, const char *name_loc, int set_no_uname); /*** component and port ***/ csch_acomp_t *csch_acomp_get(csch_abstract_t *abs, const char *name, int alloc); Index: trunk/src/libcschem/compile.c =================================================================== --- trunk/src/libcschem/compile.c (revision 10097) +++ trunk/src/libcschem/compile.c (revision 10098) @@ -192,7 +192,7 @@ net = csch_anet_get_at(dst, hpath->hlev, scope, name_loc); if (net == NULL) { - net = csch_anet_new(dst, name_glob, no_uname); + net = csch_anet_new(dst, hpath->hlev, scope, name_glob, name_loc, no_uname); if (net == NULL) return -1; } @@ -564,8 +564,9 @@ in a term-term connection */ if (net == NULL) { char tmpname[128]; + sprintf(tmpname, "anon_net_%ld", ++dst->ucnt.wirenet); - net = csch_anet_new(dst, tmpname, 1); + net = csch_anet_new(dst, NULL, CSCH_ASCOPE_GLOBAL, tmpname, NULL, 1); if (net == NULL) { rnd_msg_error("failed to create anon net for terminal-terminal connection\n"); return -1; Index: trunk/src/libcschem/util_compile.c =================================================================== --- trunk/src/libcschem/util_compile.c (revision 10097) +++ trunk/src/libcschem/util_compile.c (revision 10098) @@ -141,7 +141,7 @@ net = csch_anet_get(comp->hdr.abst, netname); if (net == NULL) - net = csch_anet_new(comp->hdr.abst, netname, 0); + net = csch_anet_new(comp->hdr.abst, comp->hlev, CSCH_ASCOPE_unknown, netname, netname, 0); if (net == NULL) { rnd_message(RND_MSG_ERROR, "Netname '%s' does not exist\n", netname); Index: trunk/src/plugins/lib_ngrp/lib_ngrp.c =================================================================== --- trunk/src/plugins/lib_ngrp/lib_ngrp.c (revision 10097) +++ trunk/src/plugins/lib_ngrp/lib_ngrp.c (revision 10098) @@ -198,7 +198,7 @@ anet = csch_anet_get(dst, n->name); if (anet == NULL) - anet = csch_anet_new(dst, n->name, 1); + anet = csch_anet_new(dst, NULL, CSCH_ASCOPE_GLOBAL, n->name, n->name, 1); cgrp = get_src_oid(src, &src_oid);; csch_compile_add_source(cgrp, &anet->hdr); @@ -214,7 +214,7 @@ anet = csch_anet_get(dst, cn->netname); if (anet == NULL) - anet = csch_anet_new(dst, cn->netname, 1); + anet = csch_anet_new(dst, NULL, CSCH_ASCOPE_GLOBAL, cn->netname, cn->netname, 1); csch_compile_add_source(cgrp, &aport->hdr); csch_compile_connect_net_to(&anet, &aport->hdr, 1); Index: trunk/src/plugins/sim/mods.c =================================================================== --- trunk/src/plugins/sim/mods.c (revision 10097) +++ trunk/src/plugins/sim/mods.c (revision 10098) @@ -107,7 +107,7 @@ abst->ucnt.wirenet++; sprintf(tmpname, "__sim_net_%ld", abst->ucnt.wirenet); - net = csch_anet_new(abst, tmpname, 1); + net = csch_anet_new(abst, NULL, CSCH_ASCOPE_GLOBAL, tmpname, tmpname, 1); if (net == NULL) rnd_message(RND_MSG_ERROR, "sim lookup_net(): internal error: can't allocate new dummy net\n"); if (port != NULL) { Index: trunk/src/plugins/target_spice/target_spice.c =================================================================== --- trunk/src/plugins/target_spice/target_spice.c (revision 10097) +++ trunk/src/plugins/target_spice/target_spice.c (revision 10098) @@ -608,7 +608,7 @@ netname = tmp->array; new_net = csch_anet_get(abst, netname); if (new_net == NULL) - new_net = csch_anet_new(abst, netname, 1); + new_net = csch_anet_new(abst, NULL, CSCH_ASCOPE_GLOBAL, netname, netname, 1); /*rnd_trace(" net: '%s' %p\n", netname, new_net);*/ old_net = port->conn.net; Index: trunk/src/sch-rnd/Makefile.dep =================================================================== --- trunk/src/sch-rnd/Makefile.dep (revision 10097) +++ trunk/src/sch-rnd/Makefile.dep (revision 10098) @@ -388,8 +388,9 @@ ../../src_3rd/gengeo2d/typecfg_long_double.h ../../src_3rd/opc89.h \ ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h \ ../libcschem/non_graphical.h ../libcschem/hierarchy.h \ + ../libcschem/abstract.h ../libcschem/TODO.h \ ../plugins/lib_ngrp/lib_ngrp.h ../plugins/io_ngrp_fawk/read.h \ - ../libcschem/plug_io.h ../libcschem/abstract.h ../libcschem/TODO.h + ../libcschem/plug_io.h ../plugins/io_ngrp_tedax/io_ngrp_tedax.o: \ ../plugins/io_ngrp_tedax/io_ngrp_tedax.c ../libcschem/config.h \ ../libcschem/plug_io.h ../libcschem/concrete.h \ @@ -408,9 +409,9 @@ ../../src_3rd/gengeo2d/typecfg_long_double.h ../../src_3rd/opc89.h \ ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h \ ../libcschem/non_graphical.h ../libcschem/hierarchy.h \ - ../libcschem/event.h ../plugins/lib_ngrp/lib_ngrp.h \ - ../plugins/lib_tedax/parse.h ../plugins/io_ngrp_tedax/read.h \ - ../libcschem/plug_io.h ../libcschem/abstract.h ../libcschem/TODO.h + ../libcschem/abstract.h ../libcschem/TODO.h ../libcschem/event.h \ + ../plugins/lib_ngrp/lib_ngrp.h ../plugins/lib_tedax/parse.h \ + ../plugins/io_ngrp_tedax/read.h ../libcschem/plug_io.h ../plugins/io_orcad/io_orcad.o: ../plugins/io_orcad/io_orcad.c \ ../libcschem/config.h ../libcschem/plug_io.h ../libcschem/concrete.h \ ../libcschem/common_types.h ../libcschem/rtree.h ../libcschem/attrib.h \ @@ -600,7 +601,7 @@ ../../src_3rd/gengeo2d/typecfg_long_double.h ../../src_3rd/opc89.h \ ../../src_3rd/gengeo2d/common.h ../../src_3rd/gengeo2d/prim.h \ ../libcschem/non_graphical.h ../libcschem/hierarchy.h \ - ../libcschem/compile.h ../libcschem/abstract.h ../libcschem/TODO.h \ + ../libcschem/abstract.h ../libcschem/TODO.h ../libcschem/compile.h \ ../libcschem/project.h ../libcschem/engine.h ../libcschem/cnc_obj.h \ ../libcschem/event.h ../libcschem/attrib.h ../libcschem/cnc_pen.h \ ../libcschem/cnc_text.h ../libcschem/cnc_text_dyn.h \