Index: map_2nets.c =================================================================== --- map_2nets.c (revision 34958) +++ map_2nets.c (revision 34959) @@ -62,8 +62,13 @@ ns->seg = seg; ns->net = NULL; - printf("seg=%p %s junc: %ld %ld\n", (void *)seg, (seg->hub ? "HUB" : ""), OID(seg->junction[0]), OID(seg->junction[1])); + if (seg->objs.used > 0) { + ns->term[0] = (((pcb_any_obj_t *)seg->objs.array[0])->term != NULL); + ns->term[1] = (((pcb_any_obj_t *)seg->objs.array[seg->objs.used-1])->term != NULL); + } + printf("seg=%p %s junc: %ld %ld term: %d %d\n", (void *)seg, (seg->hub ? "HUB" : ""), OID(seg->junction[0]), OID(seg->junction[1]), ns->term[0], ns->term[1]); + for(n = 0, o = (pcb_any_obj_t **)seg->objs.array; n < seg->objs.used; n++,o++) { if (*o == NULL) { printf(" NULL\n"); Index: map_2nets.h =================================================================== --- map_2nets.h (revision 34958) +++ map_2nets.h (revision 34959) @@ -40,6 +40,7 @@ pcb_net_t *net; unsigned shorted:1; /* set if the segment connects two different nets */ unsigned used:1; /* already part of an output segment */ + char term[2]; /* 1 if ->seg's corresponding end is a terminal */ pcb_2netmap_iseg_t *next; };