Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4869) +++ trunk/doc-rnd/hacking/renames (revision 4870) @@ -281,3 +281,12 @@ LookupConnection -> pcb_lookup_conn LookupConnectionByPin -> pcb_lookup_conn_by_pin LookupUnusedPins -> pcb_lookup_unused_pins +ResetFoundLinesAndPolygons -> pcb_reset_found_lines_polys +ResetFoundPinsViasAndPads -> pcb_reset_found_pins_vias_pads +ResetConnections -> pcb_reset_conns +InitConnectionLookup -> pcb_conn_lookup_init +InitComponentLookup -> pcb_component_lookup_init +InitLayoutLookup -> pcb_layout_lookup_init +FreeConnectionLookupMemory -> pcb_conn_lookup_uninit +FreeComponentLookupMemory -> pcb_component_lookup_uninit +FreeLayoutLookupMemory -> pcb_layout_lookup_uninit Index: trunk/src/find.h =================================================================== --- trunk/src/find.h (revision 4869) +++ trunk/src/find.h (revision 4870) @@ -71,15 +71,15 @@ void pcb_lookup_conn(pcb_coord_t, pcb_coord_t, pcb_bool, pcb_coord_t, int); void pcb_lookup_conn_by_pin(int type, void *ptr1); void pcb_lookup_unused_pins(FILE *); -pcb_bool ResetFoundLinesAndPolygons(pcb_bool); -pcb_bool ResetFoundPinsViasAndPads(pcb_bool); -pcb_bool ResetConnections(pcb_bool); -void InitConnectionLookup(void); -void InitComponentLookup(void); -void InitLayoutLookup(void); -void FreeConnectionLookupMemory(void); -void FreeComponentLookupMemory(void); -void FreeLayoutLookupMemory(void); +pcb_bool pcb_reset_found_lines_polys(pcb_bool); +pcb_bool pcb_reset_found_pins_vias_pads(pcb_bool); +pcb_bool pcb_reset_conns(pcb_bool); +void pcb_conn_lookup_init(void); +void pcb_component_lookup_init(void); +void pcb_layout_lookup_init(void); +void pcb_conn_lookup_uninit(void); +void pcb_component_lookup_uninit(void); +void pcb_layout_lookup_uninit(void); void RatFindHook(int, void *, void *, void *, pcb_bool, pcb_bool); void SaveFindFlag(int); void RestoreFindFlag(void); Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 4869) +++ trunk/src/find_drc.c (revision 4870) @@ -336,11 +336,11 @@ SaveStackAndVisibility(); ResetStackAndVisibility(); hid_action("LayersChanged"); - InitConnectionLookup(); + pcb_conn_lookup_init(); TheFlag = PCB_FLAG_FOUND | PCB_FLAG_DRC | PCB_FLAG_SELECTED; - if (ResetConnections(pcb_true)) { + if (pcb_reset_conns(pcb_true)) { IncrementUndoSerialNumber(); pcb_draw(); } @@ -390,7 +390,7 @@ END_LOOP; TheFlag = (IsBad) ? PCB_FLAG_DRC : (PCB_FLAG_FOUND | PCB_FLAG_DRC | PCB_FLAG_SELECTED); - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); TheFlag = PCB_FLAG_SELECTED; /* check minimum widths and polygon clearances */ if (!IsBad) { @@ -596,7 +596,7 @@ END_LOOP; } - FreeConnectionLookupMemory(); + pcb_conn_lookup_uninit(); TheFlag = PCB_FLAG_FOUND; Bloat = 0; @@ -728,7 +728,7 @@ DumpList(); /* make the flag changes undoable */ TheFlag = PCB_FLAG_FOUND | PCB_FLAG_SELECTED; - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); User = pcb_true; drc = pcb_false; Bloat = -PCB->Shrink; @@ -765,7 +765,7 @@ } /* now check the bloated condition */ drc = pcb_false; - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); TheFlag = PCB_FLAG_FOUND; ListStart(What, ptr1, ptr2, ptr3); Bloat = PCB->Bloat; @@ -774,7 +774,7 @@ DumpList(); /* make the flag changes undoable */ TheFlag = PCB_FLAG_FOUND | PCB_FLAG_SELECTED; - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); User = pcb_true; drc = pcb_false; Bloat = 0; @@ -818,7 +818,7 @@ drc = pcb_false; DumpList(); TheFlag = PCB_FLAG_FOUND | PCB_FLAG_SELECTED; - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); return (pcb_false); } Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 4869) +++ trunk/src/find_lookup.c (revision 4870) @@ -166,7 +166,7 @@ /* --------------------------------------------------------------------------- * releases all allocated memory */ -void FreeLayoutLookupMemory(void) +void pcb_layout_lookup_uninit(void) { pcb_cardinal_t i; @@ -184,7 +184,7 @@ RatList.Data = NULL; } -void FreeComponentLookupMemory(void) +void pcb_component_lookup_uninit(void) { /*fprintf(stderr, "PadList free both\n");*/ free(PadList[0].Data); @@ -197,7 +197,7 @@ * allocates memory for component related stacks ... * initializes index and sorts it by X1 and X2 */ -void InitComponentLookup(void) +void pcb_component_lookup_init(void) { pcb_cardinal_t i; @@ -231,7 +231,7 @@ * allocates memory for component related stacks ... * initializes index and sorts it by X1 and X2 */ -void InitLayoutLookup(void) +void pcb_layout_lookup_init(void) { pcb_cardinal_t i; Index: trunk/src/find_misc.c =================================================================== --- trunk/src/find_misc.c (revision 4869) +++ trunk/src/find_misc.c (revision 4870) @@ -245,7 +245,7 @@ TheFlag = which_flag; User = AndDraw; - InitConnectionLookup(); + pcb_conn_lookup_init(); /* now add the object to the appropriate list and start scanning * This is step (1) from the description @@ -261,24 +261,24 @@ pcb_draw(); if (AndDraw && conf_core.editor.beep_when_finished) gui->beep(); - FreeConnectionLookupMemory(); + pcb_conn_lookup_uninit(); } void pcb_lookup_conn_by_pin(int type, void *ptr1) { User = 0; - InitConnectionLookup(); + pcb_conn_lookup_init(); ListStart(type, NULL, ptr1, NULL); DoIt(pcb_true, pcb_false); - FreeConnectionLookupMemory(); + pcb_conn_lookup_uninit(); } /* --------------------------------------------------------------------------- * find connections for rats nesting - * assumes InitConnectionLookup() has already been done + * assumes pcb_conn_lookup_init() has already been done */ void RatFindHook(int type, void *ptr1, void *ptr2, void *ptr3, pcb_bool undo, pcb_bool AndRats) { @@ -292,7 +292,7 @@ /* --------------------------------------------------------------------------- * resets all used flags of pins and vias */ -pcb_bool ResetFoundPinsViasAndPads(pcb_bool AndDraw) +pcb_bool pcb_reset_found_pins_vias_pads(pcb_bool AndDraw) { pcb_bool change = pcb_false; @@ -344,7 +344,7 @@ /* --------------------------------------------------------------------------- * resets all used flags of LOs */ -pcb_bool ResetFoundLinesAndPolygons(pcb_bool AndDraw) +pcb_bool pcb_reset_found_lines_polys(pcb_bool AndDraw) { pcb_bool change = pcb_false; @@ -404,12 +404,12 @@ /* --------------------------------------------------------------------------- * resets all found connections */ -pcb_bool ResetConnections(pcb_bool AndDraw) +pcb_bool pcb_reset_conns(pcb_bool AndDraw) { pcb_bool change = pcb_false; - change = ResetFoundPinsViasAndPads(AndDraw) || change; - change = ResetFoundLinesAndPolygons(AndDraw) || change; + change = pcb_reset_found_pins_vias_pads(AndDraw) || change; + change = pcb_reset_found_lines_polys(AndDraw) || change; return change; } @@ -463,14 +463,14 @@ TheFlag = OldFlag; } -void InitConnectionLookup(void) +void pcb_conn_lookup_init(void) { - InitComponentLookup(); - InitLayoutLookup(); + pcb_component_lookup_init(); + pcb_layout_lookup_init(); } -void FreeConnectionLookupMemory(void) +void pcb_conn_lookup_uninit(void) { - FreeComponentLookupMemory(); - FreeLayoutLookupMemory(); + pcb_component_lookup_uninit(); + pcb_layout_lookup_uninit(); } Index: trunk/src/find_print.c =================================================================== --- trunk/src/find_print.c (revision 4869) +++ trunk/src/find_print.c (revision 4870) @@ -217,8 +217,8 @@ { /* reset all currently marked connections */ User = pcb_true; - ResetConnections(pcb_true); - InitConnectionLookup(); + pcb_reset_conns(pcb_true); + pcb_conn_lookup_init(); ELEMENT_LOOP(PCB->Data); { @@ -232,7 +232,7 @@ if (conf_core.editor.beep_when_finished) gui->beep(); - FreeConnectionLookupMemory(); + pcb_conn_lookup_uninit(); IncrementUndoSerialNumber(); User = pcb_false; pcb_draw(); @@ -246,13 +246,13 @@ /* reset all currently marked connections */ User = pcb_true; TheFlag = PCB_FLAG_FOUND; - ResetConnections(pcb_true); - InitConnectionLookup(); + pcb_reset_conns(pcb_true); + pcb_conn_lookup_init(); PrintElementConnections(Element, FP, pcb_true); SetChangedFlag(pcb_true); if (conf_core.editor.beep_when_finished) gui->beep(); - FreeConnectionLookupMemory(); + pcb_conn_lookup_uninit(); IncrementUndoSerialNumber(); User = pcb_false; pcb_draw(); @@ -267,8 +267,8 @@ /* reset all currently marked connections */ User = pcb_false; TheFlag = PCB_FLAG_FOUND; - ResetConnections(pcb_false); - InitConnectionLookup(); + pcb_reset_conns(pcb_false); + pcb_conn_lookup_init(); ELEMENT_LOOP(PCB->Data); { @@ -277,12 +277,12 @@ break; SEPARATE(FP); if (conf_core.editor.reset_after_element && gdl_it_idx(&__it__) != 1) - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); } END_LOOP; if (conf_core.editor.beep_when_finished) gui->beep(); - ResetConnections(pcb_false); - FreeConnectionLookupMemory(); + pcb_reset_conns(pcb_false); + pcb_conn_lookup_uninit(); pcb_redraw(); } Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 4869) +++ trunk/src/gui_act.c (revision 4870) @@ -378,7 +378,7 @@ pcb_notify_crosshair_change(pcb_false); conf_toggle_editor(auto_drc); if (conf_core.editor.auto_drc && conf_core.editor.mode == PCB_MODE_LINE) { - if (ResetConnections(pcb_true)) { + if (pcb_reset_conns(pcb_true)) { IncrementUndoSerialNumber(); pcb_draw(); } Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 4869) +++ trunk/src/rats.c (revision 4870) @@ -402,7 +402,7 @@ for (m = 0; Netl->NetN > 0 && m < Netl->NetN; m++) { a = &Netl->Net[m]; - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); RatFindHook(a->Connection[0].type, a->Connection[0].ptr1, a->Connection[0].ptr2, a->Connection[0].ptr2, pcb_false, AndRats); /* now anybody connected to the first point has PCB_FLAG_DRC set */ /* so move those to this subnet */ @@ -476,7 +476,7 @@ if (!NoWarn) Warned |= CheckShorts(a->Connection[0].menu); } - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); return (Warned); } @@ -632,8 +632,8 @@ /* Sadly adding a rat line messes up the sorted arrays in connection finder */ /* hace: perhaps not necessarily now that they aren't stored in normal layers */ if (changed) { - FreeConnectionLookupMemory(); - InitConnectionLookup(); + pcb_conn_lookup_uninit(); + pcb_conn_lookup_init(); } return (changed); } @@ -664,7 +664,7 @@ } changed = pcb_false; /* initialize finding engine */ - InitConnectionLookup(); + pcb_conn_lookup_init(); SaveFindFlag(PCB_FLAG_DRC); Nets = (pcb_netlist_t *) calloc(1, sizeof(pcb_netlist_t)); /* now we build another netlist (Nets) for each @@ -698,7 +698,7 @@ END_LOOP; FreeNetListMemory(Nets); free(Nets); - FreeConnectionLookupMemory(); + pcb_conn_lookup_uninit(); RestoreFindFlag(); if (funcp) return (pcb_true); @@ -749,7 +749,7 @@ return result; } /* initialize finding engine */ - InitConnectionLookup(); + pcb_conn_lookup_init(); SaveFindFlag(PCB_FLAG_DRC); /* now we build another netlist (Nets) for each * net in Wantlist that shows how it actually looks now, @@ -780,7 +780,7 @@ GatherSubnets(Nets, SelectedOnly, pcb_false); } END_LOOP; - FreeConnectionLookupMemory(); + pcb_conn_lookup_uninit(); RestoreFindFlag(); return result; } Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 4869) +++ trunk/src/rats_act.c (revision 4870) @@ -157,7 +157,7 @@ } case F_ResetLinesAndPolygons: - if (ResetFoundLinesAndPolygons(pcb_true)) { + if (pcb_reset_found_lines_polys(pcb_true)) { IncrementUndoSerialNumber(); pcb_draw(); } @@ -164,7 +164,7 @@ break; case F_ResetPinsViasAndPads: - if (ResetFoundPinsViasAndPads(pcb_true)) { + if (pcb_reset_found_pins_vias_pads(pcb_true)) { IncrementUndoSerialNumber(); pcb_draw(); } @@ -171,7 +171,7 @@ break; case F_Reset: - if (ResetConnections(pcb_true)) { + if (pcb_reset_conns(pcb_true)) { IncrementUndoSerialNumber(); pcb_draw(); } Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 4869) +++ trunk/src/select.c (revision 4870) @@ -975,8 +975,8 @@ } END_LOOP; if (Type & PCB_TYPE_NET) { - InitConnectionLookup(); - changed = ResetConnections(pcb_true) || changed; + pcb_conn_lookup_init(); + changed = pcb_reset_conns(pcb_true) || changed; MENU_LOOP(&(PCB->NetlistLib[NETLIST_EDITED])); { @@ -994,8 +994,8 @@ END_LOOP; changed = SelectConnection(Flag) || changed; - changed = ResetConnections(pcb_false) || changed; - FreeConnectionLookupMemory(); + changed = pcb_reset_conns(pcb_false) || changed; + pcb_conn_lookup_uninit(); } if (method == SM_REGEX) Index: trunk/src/set.c =================================================================== --- trunk/src/set.c (revision 4869) +++ trunk/src/set.c (revision 4870) @@ -226,7 +226,7 @@ Crosshair.AttachedBox.State = STATE_FIRST; Crosshair.AttachedLine.State = STATE_FIRST; if (Mode == PCB_MODE_LINE && conf_core.editor.auto_drc) { - if (ResetConnections(pcb_true)) { + if (pcb_reset_conns(pcb_true)) { IncrementUndoSerialNumber(); pcb_draw(); } Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4869) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4870) @@ -935,7 +935,7 @@ * this saves on searching the trees to find the nets */ /* use the PCB_FLAG_DRC to mark objects as they are entered */ - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); Nets = CollectSubnets(pcb_false); { routebox_t *last_net = NULL; Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4869) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4870) @@ -500,8 +500,8 @@ if (selected_net == node_selected_net) node_selected_net = NULL; - InitConnectionLookup(); - ResetConnections(pcb_true); + pcb_conn_lookup_init(); + pcb_reset_conns(pcb_true); for (i = selected_net->EntryN, entry = selected_net->Entry; i; i--, entry++) if (SeekPad(entry, &conn, pcb_false)) @@ -508,8 +508,8 @@ RatFindHook(conn.type, conn.ptr1, conn.ptr2, conn.ptr2, pcb_true, pcb_true); SelectConnection(select_flag); - ResetConnections(pcb_false); - FreeConnectionLookupMemory(); + pcb_reset_conns(pcb_false); + pcb_conn_lookup_uninit(); IncrementUndoSerialNumber(); pcb_draw(); } Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 4869) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 4870) @@ -115,8 +115,8 @@ pcb_connection_t conn; int i; - InitConnectionLookup(); - ResetConnections(pcb_true); + pcb_conn_lookup_init(); + pcb_reset_conns(pcb_true); for (i = net->EntryN, entry = net->Entry; i; i--, entry++) if (SeekPad(entry, &conn, pcb_false)) @@ -123,8 +123,8 @@ RatFindHook(conn.type, conn.ptr1, conn.ptr2, conn.ptr2, pcb_true, pcb_true); SelectConnection(select_flag); - ResetConnections(pcb_false); - FreeConnectionLookupMemory(); + pcb_reset_conns(pcb_false); + pcb_conn_lookup_uninit(); IncrementUndoSerialNumber(); pcb_draw(); } Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 4869) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 4870) @@ -327,8 +327,8 @@ } - ResetFoundLinesAndPolygons(pcb_false); - ResetFoundPinsViasAndPads(pcb_false); + pcb_reset_found_lines_polys(pcb_false); + pcb_reset_found_pins_vias_pads(pcb_false); RestoreFindFlag(); find_callback = old_cb; Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4869) +++ trunk/src_plugins/report/report.c (revision 4870) @@ -502,7 +502,7 @@ } /* Assumes that we start with a blank connection state, - * e.g. ResetConnections() has been run. + * e.g. pcb_reset_conns() has been run. * Does not add its own changes to the undo system */ static double XYtoNetLength(pcb_coord_t x, pcb_coord_t y, int *found) @@ -556,10 +556,10 @@ * * After this, we don't add any changes to the undo system, but * ensure we get back to a point where we can Undo() our changes - * by resetting the connections with ResetConnections() before + * by resetting the connections with pcb_reset_conns() before * calling Undo() at the end of the procedure. */ - ResetConnections(pcb_true); + pcb_reset_conns(pcb_true); IncrementUndoSerialNumber(); for (ni = 0; ni < PCB->NetlistLib[NETLIST_EDITED].MenuN; ni++) { @@ -616,7 +616,7 @@ length = XYtoNetLength(x, y, &found); /* Reset connectors for the next lookup */ - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); pcb_snprintf(buf, sizeof(buf), "%$m*", units_name, length); gui->log("Net %s length %s\n", netname, buf); @@ -623,7 +623,7 @@ } } - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); Undo(pcb_true); return 0; } @@ -641,16 +641,16 @@ * * After this, we don't add any changes to the undo system, but * ensure we get back to a point where we can Undo() our changes - * by resetting the connections with ResetConnections() before + * by resetting the connections with pcb_reset_conns() before * calling Undo() at the end of the procedure. */ - ResetConnections(pcb_true); + pcb_reset_conns(pcb_true); IncrementUndoSerialNumber(); length = XYtoNetLength(x, y, &found); if (!found) { - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); Undo(pcb_true); gui->log("No net under cursor.\n"); return 1; @@ -704,7 +704,7 @@ END_LOOP; got_net_name: - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); Undo(pcb_true); { @@ -795,16 +795,16 @@ * * After this, we don't add any changes to the undo system, but * ensure we get back to a point where we can Undo() our changes - * by resetting the connections with ResetConnections() before + * by resetting the connections with pcb_reset_conns() before * calling Undo() when we are finished. */ - ResetConnections(pcb_true); + pcb_reset_conns(pcb_true); IncrementUndoSerialNumber(); length = XYtoNetLength(x, y, &found); netname = net->Name + 2; - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); Undo(pcb_true); if (!found) { Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 4869) +++ trunk/src_plugins/toporouter/toporouter.c (revision 4870) @@ -2698,7 +2698,7 @@ void import_clusters(toporouter_t * r) { pcb_netlist_list_t nets; - ResetConnections(pcb_false); + pcb_reset_conns(pcb_false); nets = CollectSubnets(pcb_false); NETLIST_LOOP(&nets); {