Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 21903) +++ trunk/src/brave.c (revision 21904) @@ -51,7 +51,6 @@ static desc_t desc[] = { {PCB_BRAVE_NOXOR, "noxor", "avoid xor drawing", "use alternative rendering instead of xor draw", 0}, - {PCB_BRAVE_NEWFIND, "newfind", "use new find.c", "use the new implementation of find.c wherever possible", 0}, {0, NULL, NULL, NULL} }; Index: trunk/src/brave.h =================================================================== --- trunk/src/brave.h (revision 21903) +++ trunk/src/brave.h (revision 21904) @@ -3,7 +3,6 @@ typedef enum { /* bitfield */ PCB_BRAVE_OFF = 0, PCB_BRAVE_NOXOR = 1, - PCB_BRAVE_NEWFIND = 2, PCB_BRACE_max } pcb_brave_t; Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 21903) +++ trunk/src/rats.c (revision 21904) @@ -56,7 +56,6 @@ #include "obj_term.h" #include "obj_subc_parent.h" #include "obj_pstk_inlines.h" -#include "brave.h" #define STEP_POINT 100 @@ -505,40 +504,6 @@ PCB_END_LOOP; } -/* OLD VERSION, uses the old find.c API, scheduled for removal */ -static pcb_bool GatherSubnetsOld(pcb_netlist_t *Netl, pcb_bool NoWarn, pcb_bool AndRats) -{ - pcb_net_t *a, *b; - pcb_bool Warned = pcb_false; - pcb_cardinal_t m, n; - - for (m = 0; Netl->NetN > 0 && m < Netl->NetN; m++) { - a = &Netl->Net[m]; - pcb_reset_conns(pcb_false); - pcb_rat_find_hook(a->Connection[0].obj, pcb_false, AndRats); - - /* now anybody connected to the first point has PCB_FLAG_DRC set */ - /* so move those to this subnet */ - PCB_FLAG_CLEAR(PCB_FLAG_DRC, (pcb_any_obj_t *)a->Connection[0].obj); - for (n = m + 1; n < Netl->NetN; n++) { - b = &Netl->Net[n]; - /* There can be only one connection in net b */ - if (PCB_FLAG_TEST(PCB_FLAG_DRC, (pcb_any_obj_t *)b->Connection[0].obj)) { - PCB_FLAG_CLEAR(PCB_FLAG_DRC, (pcb_any_obj_t *)b->Connection[0].obj); - TransferNet(Netl, b, a); - /* back up since new subnet is now at old index */ - n--; - } - } - - gather_subnet_objs(PCB->Data, Netl, a); - if (!NoWarn) - Warned |= CheckShorts(a->Connection[0].menu); - } - pcb_reset_conns(pcb_false); - return Warned; -} - /* Determine existing interconnections of the net and gather into sub-nets. * Initially the netlist has each connection in its own individual net * afterwards there can be many fewer nets with multiple connections each */ @@ -554,7 +519,6 @@ memset(&fctx, 0, sizeof(fctx)); fctx.flag_set = PCB_FLAG_DRC; -/* fctx.consider_rats = AndRats;*/ pcb_data_clear_flag(PCB->Data, PCB_FLAG_DRC, 0, 0); pcb_find_from_obj(&fctx, PCB->Data, a->Connection[0].obj); pcb_find_free(&fctx); @@ -583,10 +547,7 @@ static pcb_bool GatherSubnets(pcb_netlist_t *Netl, pcb_bool NoWarn, pcb_bool AndRats) { - if (pcb_brave & PCB_BRAVE_NEWFIND) - return gather_subnets(Netl, NoWarn, AndRats); - else - return GatherSubnetsOld(Netl, NoWarn, AndRats); + return gather_subnets(Netl, NoWarn, AndRats); } Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 21903) +++ trunk/src/rats_act.c (revision 21904) @@ -50,9 +50,6 @@ #include "obj_rat_draw.h" -TODO("find.c: remove this") -#include "brave.h" - static const char pcb_acts_AddRats[] = "AddRats(AllRats|SelectedRats|Close)"; static const char pcb_acth_AddRats[] = "Add one or more rat lines to the board."; /* DOC: addrats.html */ @@ -121,21 +118,16 @@ case F_Find: { pcb_coord_t x, y; - pcb_hid_get_coords(_("Click on a connection"), &x, &y, 0); - if (pcb_brave & PCB_BRAVE_NEWFIND) { unsigned long res; pcb_find_t fctx; - - memset(&fctx, 0, sizeof(fctx)); - fctx.flag_set = PCB_FLAG_FOUND; - fctx.flag_chg_undoable = 1; - fctx.consider_rats = !!conf_core.editor.conn_find_rat; - res = pcb_find_from_xy(&fctx, PCB->Data, x, y); - pcb_message(PCB_MSG_INFO, "found %ld objects\n", res); - pcb_find_free(&fctx); - } - else - pcb_lookup_conn(x, y, pcb_true, 1, PCB_FLAG_FOUND); + pcb_hid_get_coords(_("Click on a connection"), &x, &y, 0); + memset(&fctx, 0, sizeof(fctx)); + fctx.flag_set = PCB_FLAG_FOUND; + fctx.flag_chg_undoable = 1; + fctx.consider_rats = !!conf_core.editor.conn_find_rat; + res = pcb_find_from_xy(&fctx, PCB->Data, x, y); + pcb_message(PCB_MSG_INFO, "found %ld objects\n", res); + pcb_find_free(&fctx); break; }