Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 23380) +++ trunk/src/brave.c (revision 23381) @@ -53,7 +53,7 @@ {PCB_BRAVE_NOXOR, "noxor", "avoid xor drawing", "use alternative rendering instead of xor draw", 0}, {PCB_BRAVE_CLIPBATCH, "clipbatch", "batch poly clipping", "batch polygon clipping in some expensive user operations", 0}, {PCB_BRAVE_LESSTIF_TREETABLE, "lesstifttbl", "lesstif tree table", "enable experimental lesstif tree table support", 0}, - {PCB_BRAVE_NETLIST2, "netlist2", "new netlist engine", "use the new netlist engine instead of the old one where possible", 0}, + {PCB_BRAVE_OLD_NETLIST, "old_netlist", "old netlist engine", "use the old netlist engine instead of the new one where possible (for testing)", 0}, {0, NULL, NULL, NULL} }; Index: trunk/src/brave.h =================================================================== --- trunk/src/brave.h (revision 23380) +++ trunk/src/brave.h (revision 23381) @@ -5,7 +5,7 @@ PCB_BRAVE_NOXOR = 1, PCB_BRAVE_CLIPBATCH = 2, PCB_BRAVE_LESSTIF_TREETABLE = 4, - PCB_BRAVE_NETLIST2 = 8, + PCB_BRAVE_OLD_NETLIST = 8, PCB_BRAVE_max } pcb_brave_t; Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 23380) +++ trunk/src/netlist_act.c (revision 23381) @@ -194,7 +194,7 @@ static void pcb_netlist_find(pcb_net_t *new_net, pcb_net_term_t *term, pcb_lib_menu_t *old_net, pcb_lib_entry_t *old_pin) { - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) pcb_net_crawl_flag(PCB, pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], new_net->name, 0), PCB_FLAG_FOUND, 0); else pcb_netlist_setclrflg(term, old_pin, PCB_FLAG_FOUND, 0); @@ -202,7 +202,7 @@ static void pcb_netlist_select(pcb_net_t *new_net, pcb_net_term_t *term, pcb_lib_menu_t *old_net, pcb_lib_entry_t *old_pin) { - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) pcb_net_crawl_flag(PCB, pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], new_net->name, 0), PCB_FLAG_SELECTED, 0); else pcb_netlist_setclrflg(term, old_pin, PCB_FLAG_SELECTED, 0); @@ -210,7 +210,7 @@ static void pcb_netlist_unselect(pcb_net_t *new_net, pcb_net_term_t *term, pcb_lib_menu_t *old_net, pcb_lib_entry_t *old_pin) { - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) pcb_net_crawl_flag(PCB, pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], new_net->name, 0), 0, PCB_FLAG_SELECTED); else pcb_netlist_setclrflg(term, old_pin, 0, PCB_FLAG_SELECTED); @@ -218,7 +218,7 @@ static void pcb_netlist_rats(pcb_net_t *new_net, pcb_net_term_t *term, pcb_lib_menu_t *old_net, pcb_lib_entry_t *old_pin) { - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { pcb_net_t *n = pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], new_net->name, 0); if (n != NULL) n->inhibit_rats = 0; @@ -230,7 +230,7 @@ static void pcb_netlist_norats(pcb_net_t *new_net, pcb_net_term_t *term, pcb_lib_menu_t *old_net, pcb_lib_entry_t *old_pin) { - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { pcb_net_t *n = pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], new_net->name, 0); if (n != NULL) n->inhibit_rats = 1; @@ -304,7 +304,7 @@ static void pcb_netlist_clear(pcb_net_t *new_net, pcb_net_term_t *term, pcb_lib_menu_t *old_net, pcb_lib_entry_t *old_pin) { - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) pcb_netlist_clear_new(new_net, term); else pcb_netlist_clear_old(old_net, old_pin); @@ -361,7 +361,7 @@ } if (argc > 3) { - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { char *refdes, *termid; refdes = pcb_strdup(a2); termid = strchr(refdes, '-'); @@ -396,7 +396,7 @@ } else if (argc > 2) { pin_found = 1; - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { for(term = pcb_termlist_first(&net->conns); term != NULL; term = pcb_termlist_next(term)) func(net, term, old_net, NULL); } @@ -478,7 +478,7 @@ PCB_ACT_FAIL(Netlist); } - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { pcb_netlist_t *nl = &PCB->netlist[PCB_NETLIST_EDITED]; net = pcb_net_get(PCB, nl, a1, 0); if (net == NULL) Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 23380) +++ trunk/src/rats_act.c (revision 23381) @@ -70,7 +70,7 @@ } switch (op) { case F_AllRats: - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { if (pcb_net_add_all_rats(PCB, PCB_RATACC_PRECISE | PCB_RATACC_INFO) > 0) pcb_board_set_changed_flag(pcb_true); } Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 23380) +++ trunk/src/rats_patch.c (revision 23381) @@ -246,7 +246,7 @@ case RATP_ADD_CONN: case RATP_DEL_CONN: if (htsp_get(seen, n->arg1.net_name) == NULL) { - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { /* document the original (input) state */ pcb_net_t *net = pcb_net_get(pcb, &pcb->netlist[PCB_NETLIST_INPUT], n->arg1.net_name, 0); if (net != NULL) { Index: trunk/src/tool_line.c =================================================================== --- trunk/src/tool_line.c (revision 23380) +++ trunk/src/tool_line.c (revision 23381) @@ -161,7 +161,7 @@ if (PCB->RatDraw) { pcb_rat_t *line; - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) line = pcb_net_create_by_rat_coords(PCB, pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, pcb_crosshair.AttachedLine.Point2.X, pcb_crosshair.AttachedLine.Point2.Y, 1); else line = pcb_rat_add_net_old(); Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 23380) +++ trunk/src_plugins/autoplace/autoplace.c (revision 23381) @@ -379,7 +379,7 @@ pcb_box_list_t componentside = { 0, 0, NULL }; /* component side bounds */ - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { htsp_entry_t *e; for(e = htsp_first(&PCB->netlist[PCB_NETLIST_EDITED]); e != NULL; e = htsp_next(&PCB->netlist[PCB_NETLIST_EDITED], e)) { pcb_net_t *net = e->value; Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 23380) +++ trunk/src_plugins/autoroute/autoroute.c (revision 23381) @@ -1268,7 +1268,7 @@ usedGroup[front] = pcb_true; usedGroup[back] = pcb_true; - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) CreateRouteData_nets(rd, layergroupboxes); else CreateRouteData_nets_old(rd, layergroupboxes); Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 23380) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 23381) @@ -95,7 +95,7 @@ if (val.str_value != NULL) pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_name, &val); if (ctx->pcb != NULL) { - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { pcb_net_term_t *term = pcb_net_find_by_obj(&ctx->pcb->netlist[PCB_NETLIST_EDITED], obj); if (term != NULL) { val.str_value = term->parent.net->name; Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 23380) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 23381) @@ -274,7 +274,7 @@ if (proto == NULL) return; - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { pcb_net_term_t *term = pcb_net_find_by_obj(&ctx->pcb->netlist[PCB_NETLIST_EDITED], (pcb_any_obj_t *)pstk); t.netname = (term == NULL) ? "N/C" : term->parent.net->name; } @@ -319,7 +319,7 @@ memset(t, 0, sizeof(test_feature_t)); - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { pcb_net_term_t *term = pcb_net_find_by_obj(&ctx->pcb->netlist[PCB_NETLIST_EDITED], (pcb_any_obj_t *)o); t->netname = (term == NULL) ? "N/C" : term->parent.net->name; } Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 23380) +++ trunk/src_plugins/export_xy/xy.c (revision 23381) @@ -690,7 +690,7 @@ for(o = pcb_data_first(&it, subc->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) { if (o->term != NULL) { ctx.pad_netname = NULL; - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { pcb_net_term_t *t = pcb_net_find_by_obj(&PCB->netlist[PCB_NETLIST_EDITED], o); if (t != NULL) ctx.pad_netname = t->parent.net->name; Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 23380) +++ trunk/src_plugins/io_kicad/write.c (revision 23381) @@ -985,7 +985,7 @@ /* now come the netlist "equipotential" descriptors */ - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) write_kicad_equipotential_netlists(FP, PCB, baseSExprIndent); else write_kicad_equipotential_netlists_old(FP, PCB, baseSExprIndent); Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 23380) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 23381) @@ -487,7 +487,7 @@ fputs("At STD N 00E0FFFF\n", FP); /* through hole STD pin, all copper layers */ - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) print_pstk_net(FP, pcb, ps); else print_pstk_net_old(FP, pcb, ps); @@ -579,7 +579,7 @@ else fputs("At SMD N 00888000\n", FP); - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) print_pstk_net(FP, pcb, ps); else print_pstk_net_old(FP, pcb, ps); @@ -845,7 +845,7 @@ fputs("$EndSETUP\n", FP); - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) write_kicad_legacy_equipotential_netlists(FP, PCB); else write_kicad_legacy_equipotential_netlists_old(FP, PCB); Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 23380) +++ trunk/src_plugins/io_lihata/write.c (revision 23381) @@ -1270,7 +1270,7 @@ nl = lht_dom_node_alloc(LHT_LIST, name); - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { htsp_entry_t *e; for(e = htsp_first(netlist); e != NULL; e = htsp_next(netlist, e)) { pcb_net_t *net = e->value; Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 23380) +++ trunk/src_plugins/io_pcb/file.c (revision 23381) @@ -749,7 +749,7 @@ io_pcb_WriteSubcData(ctx, FP, PCB->Data); WritePCBRatData(FP); WriteLayers(FP, PCB->Data); - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) WritePCBNetlistData(FP); else WritePCBNetlistData_old(FP); Index: trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 23380) +++ trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 23381) @@ -164,7 +164,7 @@ tooltip_update_timeout_id = 0; /* check if there are any pins or pads at that position */ - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) description = describe_location(crosshairx, crosshairy); else description = describe_location_old(crosshairx, crosshairy); @@ -173,7 +173,7 @@ return FALSE; gtk_widget_set_tooltip_text(drawing_area, description); - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) free(description); else g_free(description); Index: trunk/src_plugins/lib_gtk_common/dlg_netlist.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_netlist.c (revision 23380) +++ trunk/src_plugins/lib_gtk_common/dlg_netlist.c (revision 23381) @@ -889,7 +889,7 @@ const char pcb_gtk_acth_netlistpresent[] = "Presents the netlist window."; fgw_error_t pcb_gtk_act_netlistpresent(pcb_gtk_common_t *com, fgw_arg_t *res, int argc, fgw_arg_t *argv) { - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) pcb_actionl("NetlistDialog", NULL); else pcb_gtk_dlg_netlist_show(com, TRUE); Index: trunk/src_plugins/lib_gtk_hid/actions.c =================================================================== --- trunk/src_plugins/lib_gtk_hid/actions.c (revision 23380) +++ trunk/src_plugins/lib_gtk_hid/actions.c (revision 23381) @@ -130,7 +130,7 @@ pcb_gtk_dlg_log_show(raise); } else if (strcmp(a, "4") == 0 || pcb_strcasecmp(a, "Netlist") == 0) { - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) pcb_actionl("NetlistDialog", NULL); else pcb_gtk_dlg_netlist_show(&ghidgui->common, raise); Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 23380) +++ trunk/src_plugins/report/report.c (revision 23381) @@ -721,7 +721,7 @@ if (!tofind) return 1; - if (pcb_brave & PCB_BRAVE_NETLIST2) { + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) { net = pcb_net_get_user(PCB, &PCB->netlist[PCB_NETLIST_EDITED], tofind); if (net != NULL) { pcb_net_term_t *term; Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 23380) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 23381) @@ -369,7 +369,7 @@ static fgw_error_t pcb_act_smartdisperse(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - if (pcb_brave & PCB_BRAVE_NETLIST2) + if (!(pcb_brave & PCB_BRAVE_OLD_NETLIST)) return pcb_act_smartdisperse_new(res, argc, argv); return pcb_act_smartdisperse_old(res, argc, argv); }