Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 5004) +++ trunk/doc-rnd/hacking/renames (revision 5005) @@ -782,3 +782,10 @@ ParseRoutingString1 -> pcb_route_string_parse1 ParseRouteString -> pcb_route_string_parse make_route_string -> pcb_route_string_make +r_create_tree -> pcb_r_create_tree +r_destroy_tree -> pcb_r_destroy_tree +r_delete_entry -> pcb_r_delete_entry +r_insert_entry -> pcb_r_insert_entry +r_search -> pcb_r_search +r_region_is_empty -> pcb_r_region_is_empty +__r_dump_tree -> pcb_r_dump_tree Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 5004) +++ trunk/src/action_helper.c (revision 5005) @@ -1088,11 +1088,11 @@ for (i = 0; i < MAX_ELEMENTNAMES; i++) { if (i == save_n) EraseElementName(e); - r_delete_entry(PCB->Data->name_tree[i], (pcb_box_t *) & (e->Name[i])); + pcb_r_delete_entry(PCB->Data->name_tree[i], (pcb_box_t *) & (e->Name[i])); memcpy(&(e->Name[i]), &(estr[i]), sizeof(pcb_text_t)); e->Name[i].Element = e; pcb_text_bbox(&PCB->Font, &(e->Name[i])); - r_insert_entry(PCB->Data->name_tree[i], (pcb_box_t *) & (e->Name[i]), 0); + pcb_r_insert_entry(PCB->Data->name_tree[i], (pcb_box_t *) & (e->Name[i]), 0); if (i == save_n) DrawElementName(e); } Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 5004) +++ trunk/src/board.c (revision 5005) @@ -197,8 +197,8 @@ { HoleCountStruct hcs = { 0, 0 }; - r_search(PCB->Data->pin_tree, within_area, NULL, hole_counting_callback, &hcs, NULL); - r_search(PCB->Data->via_tree, within_area, NULL, hole_counting_callback, &hcs, NULL); + pcb_r_search(PCB->Data->pin_tree, within_area, NULL, hole_counting_callback, &hcs, NULL); + pcb_r_search(PCB->Data->via_tree, within_area, NULL, hole_counting_callback, &hcs, NULL); if (plated != NULL) *plated = hcs.nplated; Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 5004) +++ trunk/src/buffer.c (revision 5005) @@ -227,10 +227,10 @@ /* rotate vias */ PCB_VIA_LOOP(Buffer->Data); { - r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); + pcb_r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); PCB_VIA_ROTATE90(via, Buffer->X, Buffer->Y, Number); pcb_pin_bbox(via); - r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); + pcb_r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } END_LOOP; @@ -244,30 +244,30 @@ /* all layer related objects */ PCB_LINE_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->line_tree, (pcb_box_t *) line); + pcb_r_delete_entry(layer->line_tree, (pcb_box_t *) line); pcb_line_rotate90(line, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); + pcb_r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); + pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); pcb_arc_rotate90(arc, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); + pcb_r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->text_tree, (pcb_box_t *) text); + pcb_r_delete_entry(layer->text_tree, (pcb_box_t *) text); pcb_text_rotate90(text, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); + pcb_r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); } ENDALL_LOOP; PCB_POLY_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); + pcb_r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); pcb_poly_rotate90(polygon, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); + pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); } ENDALL_LOOP; @@ -287,10 +287,10 @@ /* rotate vias */ PCB_VIA_LOOP(Buffer->Data); { - r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); + pcb_r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); pcb_rotate(&via->X, &via->Y, Buffer->X, Buffer->Y, cosa, sina); pcb_pin_bbox(via); - r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); + pcb_r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } END_LOOP; @@ -304,25 +304,25 @@ /* all layer related objects */ PCB_LINE_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->line_tree, (pcb_box_t *) line); + pcb_r_delete_entry(layer->line_tree, (pcb_box_t *) line); pcb_rotate(&line->Point1.X, &line->Point1.Y, Buffer->X, Buffer->Y, cosa, sina); pcb_rotate(&line->Point2.X, &line->Point2.Y, Buffer->X, Buffer->Y, cosa, sina); pcb_line_bbox(line); - r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); + pcb_r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); + pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); pcb_rotate(&arc->X, &arc->Y, Buffer->X, Buffer->Y, cosa, sina); arc->StartAngle = NormalizeAngle(arc->StartAngle + angle); - r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); + pcb_r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } ENDALL_LOOP; /* FIXME: rotate text */ PCB_POLY_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); + pcb_r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); PCB_POLY_POINT_LOOP(polygon); { pcb_rotate(&point->X, &point->Y, Buffer->X, Buffer->Y, cosa, sina); @@ -329,7 +329,7 @@ } END_LOOP; pcb_poly_bbox(polygon); - r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); + pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); } ENDALL_LOOP; @@ -476,38 +476,38 @@ Buffer->Y = PCB_SWAP_Y(Buffer->Y); PCB_VIA_LOOP(Buffer->Data); { - r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); + pcb_r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); via->X = PCB_SWAP_X(via->X); via->Y = PCB_SWAP_Y(via->Y); pcb_pin_bbox(via); - r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); + pcb_r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } END_LOOP; PCB_LINE_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->line_tree, (pcb_box_t *) line); + pcb_r_delete_entry(layer->line_tree, (pcb_box_t *) line); line->Point1.X = PCB_SWAP_X(line->Point1.X); line->Point1.Y = PCB_SWAP_Y(line->Point1.Y); line->Point2.X = PCB_SWAP_X(line->Point2.X); line->Point2.Y = PCB_SWAP_Y(line->Point2.Y); pcb_line_bbox(line); - r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); + pcb_r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); + pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); arc->X = PCB_SWAP_X(arc->X); arc->Y = PCB_SWAP_Y(arc->Y); arc->StartAngle = SWAP_ANGLE(arc->StartAngle); arc->Delta = SWAP_DELTA(arc->Delta); pcb_arc_bbox(arc); - r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); + pcb_r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } ENDALL_LOOP; PCB_POLY_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); + pcb_r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); PCB_POLY_POINT_LOOP(polygon); { point->X = PCB_SWAP_X(point->X); @@ -515,18 +515,18 @@ } END_LOOP; pcb_poly_bbox(polygon); - r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); + pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); /* hmmm, how to handle clip */ } ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Buffer->Data); { - r_delete_entry(layer->text_tree, (pcb_box_t *) text); + pcb_r_delete_entry(layer->text_tree, (pcb_box_t *) text); text->X = PCB_SWAP_X(text->X); text->Y = PCB_SWAP_Y(text->Y); PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, text); pcb_text_bbox(&PCB->Font, text); - r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); + pcb_r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); } ENDALL_LOOP; /* swap silkscreen layers */ Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 5004) +++ trunk/src/crosshair.c (revision 5005) @@ -833,8 +833,8 @@ /* Only find points of arcs and lines on currently visible layers. */ if (!layer->On) continue; - r_search(layer->line_tree, &SearchBox, NULL, onpoint_line_callback, &info, NULL); - r_search(layer->arc_tree, &SearchBox, NULL, onpoint_arc_callback, &info, NULL); + pcb_r_search(layer->line_tree, &SearchBox, NULL, onpoint_line_callback, &info, NULL); + pcb_r_search(layer->arc_tree, &SearchBox, NULL, onpoint_arc_callback, &info, NULL); } /* Undraw the old objects */ Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 5004) +++ trunk/src/data.c (revision 5005) @@ -226,28 +226,28 @@ END_LOOP; list_map0(&layer->Polygon, pcb_polygon_t, pcb_poly_free); if (layer->line_tree) - r_destroy_tree(&layer->line_tree); + pcb_r_destroy_tree(&layer->line_tree); if (layer->arc_tree) - r_destroy_tree(&layer->arc_tree); + pcb_r_destroy_tree(&layer->arc_tree); if (layer->text_tree) - r_destroy_tree(&layer->text_tree); + pcb_r_destroy_tree(&layer->text_tree); if (layer->polygon_tree) - r_destroy_tree(&layer->polygon_tree); + pcb_r_destroy_tree(&layer->polygon_tree); } if (data->element_tree) - r_destroy_tree(&data->element_tree); + pcb_r_destroy_tree(&data->element_tree); for (i = 0; i < MAX_ELEMENTNAMES; i++) if (data->name_tree[i]) - r_destroy_tree(&data->name_tree[i]); + pcb_r_destroy_tree(&data->name_tree[i]); if (data->via_tree) - r_destroy_tree(&data->via_tree); + pcb_r_destroy_tree(&data->via_tree); if (data->pin_tree) - r_destroy_tree(&data->pin_tree); + pcb_r_destroy_tree(&data->pin_tree); if (data->pad_tree) - r_destroy_tree(&data->pad_tree); + pcb_r_destroy_tree(&data->pad_tree); if (data->rat_tree) - r_destroy_tree(&data->rat_tree); + pcb_r_destroy_tree(&data->rat_tree); /* clear struct */ memset(data, 0, sizeof(pcb_data_t)); } Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 5004) +++ trunk/src/draw.c (revision 5005) @@ -135,8 +135,8 @@ if (!draw_plated && draw_unplated) plated = 0; - r_search(PCB->Data->pin_tree, drawn_area, NULL, draw_hole_callback, &plated, NULL); - r_search(PCB->Data->via_tree, drawn_area, NULL, draw_hole_callback, &plated, NULL); + pcb_r_search(PCB->Data->pin_tree, drawn_area, NULL, draw_hole_callback, &plated, NULL); + pcb_r_search(PCB->Data->via_tree, drawn_area, NULL, draw_hole_callback, &plated, NULL); } /* --------------------------------------------------------------------------- @@ -209,11 +209,11 @@ && gui->set_layer("invisible", SL(INVISIBLE, 0), 0)) { side = SWAP_IDENT ? COMPONENT_LAYER : SOLDER_LAYER; if (PCB->ElementOn) { - r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_callback, &side, NULL); - r_search(PCB->Data->name_tree[NAME_INDEX()], drawn_area, NULL, draw_element_name_callback, &side, NULL); + pcb_r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_callback, &side, NULL); + pcb_r_search(PCB->Data->name_tree[NAME_INDEX()], drawn_area, NULL, draw_element_name_callback, &side, NULL); pcb_draw_layer(&(PCB->Data->Layer[max_copper_layer + side]), drawn_area); } - r_search(PCB->Data->pad_tree, drawn_area, NULL, draw_pad_callback, &side, NULL); + pcb_r_search(PCB->Data->pad_tree, drawn_area, NULL, draw_pad_callback, &side, NULL); gui->end_layer(); } @@ -263,7 +263,7 @@ if (gui->gui) { /* Draw element Marks */ if (PCB->PinOn) - r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_mark_callback, NULL, NULL); + pcb_r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_mark_callback, NULL, NULL); /* Draw rat lines on top */ if (gui->set_layer("rats", SL(RATS, 0), 0)) { DrawRats(drawn_area); @@ -311,27 +311,27 @@ if (PCB->PinOn || !gui->gui) { /* draw element pins */ - r_search(PCB->Data->pin_tree, drawn_area, NULL, draw_pin_callback, NULL, NULL); + pcb_r_search(PCB->Data->pin_tree, drawn_area, NULL, draw_pin_callback, NULL, NULL); /* draw element pads */ if (group == component_group) { side = COMPONENT_LAYER; - r_search(PCB->Data->pad_tree, drawn_area, NULL, draw_pad_callback, &side, NULL); + pcb_r_search(PCB->Data->pad_tree, drawn_area, NULL, draw_pad_callback, &side, NULL); } if (group == solder_group) { side = SOLDER_LAYER; - r_search(PCB->Data->pad_tree, drawn_area, NULL, draw_pad_callback, &side, NULL); + pcb_r_search(PCB->Data->pad_tree, drawn_area, NULL, draw_pad_callback, &side, NULL); } } /* draw vias */ if (PCB->ViaOn || !gui->gui) { - r_search(PCB->Data->via_tree, drawn_area, NULL, draw_via_callback, NULL, NULL); - r_search(PCB->Data->via_tree, drawn_area, NULL, draw_hole_callback, NULL, NULL); + pcb_r_search(PCB->Data->via_tree, drawn_area, NULL, draw_via_callback, NULL, NULL); + pcb_r_search(PCB->Data->via_tree, drawn_area, NULL, draw_hole_callback, NULL, NULL); } if (PCB->PinOn || pcb_draw_doing_assy) - r_search(PCB->Data->pin_tree, drawn_area, NULL, draw_hole_callback, NULL, NULL); + pcb_r_search(PCB->Data->pin_tree, drawn_area, NULL, draw_hole_callback, NULL, NULL); } /* --------------------------------------------------------------------------- @@ -352,22 +352,22 @@ #endif pcb_draw_layer(LAYER_PTR(max_copper_layer + side), drawn_area); /* draw package */ - r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_callback, &side, NULL); - r_search(PCB->Data->name_tree[NAME_INDEX()], drawn_area, NULL, draw_element_name_callback, &side, NULL); + pcb_r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_callback, &side, NULL); + pcb_r_search(PCB->Data->name_tree[NAME_INDEX()], drawn_area, NULL, draw_element_name_callback, &side, NULL); #if 0 } gui->use_mask(HID_MASK_CLEAR); - r_search(PCB->Data->pin_tree, drawn_area, NULL, clear_pin_callback, NULL, NULL); - r_search(PCB->Data->via_tree, drawn_area, NULL, clear_pin_callback, NULL, NULL); - r_search(PCB->Data->pad_tree, drawn_area, NULL, clear_pad_callback, &side, NULL); + pcb_r_search(PCB->Data->pin_tree, drawn_area, NULL, clear_pin_callback, NULL, NULL); + pcb_r_search(PCB->Data->via_tree, drawn_area, NULL, clear_pin_callback, NULL, NULL); + pcb_r_search(PCB->Data->pad_tree, drawn_area, NULL, clear_pad_callback, &side, NULL); if (gui->poly_after) { gui->use_mask(HID_MASK_AFTER); pcb_draw_layer(LAYER_PTR(max_copper_layer + layer), drawn_area); /* draw package */ - r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_callback, &side, NULL); - r_search(PCB->Data->name_tree[NAME_INDEX()], drawn_area, NULL, draw_element_name_callback, &side, NULL); + pcb_r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_callback, &side, NULL); + pcb_r_search(PCB->Data->name_tree[NAME_INDEX()], drawn_area, NULL, draw_element_name_callback, &side, NULL); } gui->use_mask(HID_MASK_OFF); #endif @@ -402,9 +402,9 @@ gui->use_mask(HID_MASK_CLEAR); } - r_search(PCB->Data->pin_tree, screen, NULL, clear_pin_callback, NULL, NULL); - r_search(PCB->Data->via_tree, screen, NULL, clear_pin_callback, NULL, NULL); - r_search(PCB->Data->pad_tree, screen, NULL, clear_pad_callback, &side, NULL); + pcb_r_search(PCB->Data->pin_tree, screen, NULL, clear_pin_callback, NULL, NULL); + pcb_r_search(PCB->Data->via_tree, screen, NULL, clear_pin_callback, NULL, NULL); + pcb_r_search(PCB->Data->pad_tree, screen, NULL, clear_pad_callback, &side, NULL); if (thin) gui->set_color(Output.pmGC, "erase"); @@ -426,7 +426,7 @@ if (can_mask) gui->use_mask(HID_MASK_CLEAR); - r_search(PCB->Data->rat_tree, drawn_area, NULL, draw_rat_callback, NULL, NULL); + pcb_r_search(PCB->Data->rat_tree, drawn_area, NULL, draw_rat_callback, NULL, NULL); if (can_mask) gui->use_mask(HID_MASK_OFF); } @@ -439,19 +439,19 @@ info.layer = Layer; /* print the non-clearing polys */ - r_search(Layer->polygon_tree, screen, NULL, draw_poly_callback, &info, NULL); + pcb_r_search(Layer->polygon_tree, screen, NULL, draw_poly_callback, &info, NULL); if (conf_core.editor.check_planes) return; /* draw all visible lines this layer */ - r_search(Layer->line_tree, screen, NULL, draw_line_callback, Layer, NULL); + pcb_r_search(Layer->line_tree, screen, NULL, draw_line_callback, Layer, NULL); /* draw the layer arcs on screen */ - r_search(Layer->arc_tree, screen, NULL, draw_arc_callback, Layer, NULL); + pcb_r_search(Layer->arc_tree, screen, NULL, draw_arc_callback, Layer, NULL); /* draw the layer text on screen */ - r_search(Layer->text_tree, screen, NULL, draw_text_callback, Layer, NULL); + pcb_r_search(Layer->text_tree, screen, NULL, draw_text_callback, Layer, NULL); /* We should check for gui->gui here, but it's kinda cool seeing the auto-outline magically disappear when you first add something to Index: trunk/src/find_deadcode.c =================================================================== --- trunk/src/find_deadcode.c (revision 5004) +++ trunk/src/find_deadcode.c (revision 5005) @@ -69,11 +69,11 @@ info.line = *line; EXPAND_BOUNDS(&info.line); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (pcb_box_t *) & info.line, NULL, pv_touch_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, (pcb_box_t *) & info.line, NULL, pv_touch_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.line, NULL, pv_touch_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.line, NULL, pv_touch_callback, &info, NULL); else return pcb_true; @@ -103,11 +103,11 @@ /* find the first line that touches coordinates */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.line, NULL, LOT_Linecallback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.line, NULL, LOT_Linecallback, &info, NULL); else return (pcb_true); if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.line, NULL, LOT_Arccallback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.line, NULL, LOT_Arccallback, &info, NULL); else return (pcb_true); @@ -122,7 +122,7 @@ /* handle special 'pad' layers */ info.layer = layer - max_copper_layer; if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, &info.line.BoundingBox, NULL, LOT_Padcallback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, &info.line.BoundingBox, NULL, LOT_Padcallback, &info, NULL); else return pcb_true; } Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 5004) +++ trunk/src/find_lookup.c (revision 5005) @@ -41,7 +41,7 @@ box.Y1 = pt->Y - radius; box.Y2 = pt->Y + radius; - return r_search(rtree, &box, region_in_search, rectangle_in_region, closure, num_found); + return pcb_r_search(rtree, &box, region_in_search, rectangle_in_region, closure, num_found); } @@ -392,7 +392,7 @@ /* check pads */ if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVpad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVpad_callback, &info, NULL); else return pcb_true; @@ -403,17 +403,17 @@ info.layer = layer; /* add touching lines */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVline_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVline_callback, &info, NULL); else return pcb_true; /* add touching arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVarc_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVarc_callback, &info, NULL); else return pcb_true; /* check all polygons */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->polygon_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVpoly_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->polygon_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVpoly_callback, &info, NULL); else return pcb_true; } @@ -420,7 +420,7 @@ /* Check for rat-lines that may intersect the PV */ if (AndRats) { if (setjmp(info.env) == 0) - r_search(PCB->Data->rat_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVrat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVrat_callback, &info, NULL); else return pcb_true; } @@ -585,11 +585,11 @@ EXPAND_BOUNDS(&info.pv); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (pcb_box_t *) & info.pv, NULL, pv_pv_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, (pcb_box_t *) & info.pv, NULL, pv_pv_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.pv, NULL, pv_pv_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.pv, NULL, pv_pv_callback, &info, NULL); else return pcb_true; PVList.Location++; @@ -728,11 +728,11 @@ info.line = *(LINELIST_ENTRY(layer, LineList[layer].Location)); EXPAND_BOUNDS(&info.line); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (pcb_box_t *) & info.line, NULL, pv_line_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, (pcb_box_t *) & info.line, NULL, pv_line_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.line, NULL, pv_line_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.line, NULL, pv_line_callback, &info, NULL); else return pcb_true; LineList[layer].Location++; @@ -743,11 +743,11 @@ info.arc = *(ARCLIST_ENTRY(layer, ArcList[layer].Location)); EXPAND_BOUNDS(&info.arc); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (pcb_box_t *) & info.arc, NULL, pv_arc_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, (pcb_box_t *) & info.arc, NULL, pv_arc_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.arc, NULL, pv_arc_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.arc, NULL, pv_arc_callback, &info, NULL); else return pcb_true; ArcList[layer].Location++; @@ -759,11 +759,11 @@ info.polygon = *(POLYGONLIST_ENTRY(layer, PolygonList[layer].Location)); EXPAND_BOUNDS(&info.polygon); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (pcb_box_t *) & info.polygon, NULL, pv_poly_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, (pcb_box_t *) & info.polygon, NULL, pv_poly_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.polygon, NULL, pv_poly_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.polygon, NULL, pv_poly_callback, &info, NULL); else return pcb_true; PolygonList[layer].Location++; @@ -785,11 +785,11 @@ info.pad = *(PADLIST_ENTRY(layer, PadList[layer].Location)); EXPAND_BOUNDS(&info.pad); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (pcb_box_t *) & info.pad, NULL, pv_pad_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, (pcb_box_t *) & info.pad, NULL, pv_pad_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.pad, NULL, pv_pad_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.pad, NULL, pv_pad_callback, &info, NULL); else return pcb_true; PadList[layer].Location++; @@ -890,12 +890,12 @@ info.layer = layer; /* add arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, &info.arc.BoundingBox, NULL, LOCtoArcLine_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->line_tree, &info.arc.BoundingBox, NULL, LOCtoArcLine_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, &info.arc.BoundingBox, NULL, LOCtoArcArc_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->arc_tree, &info.arc.BoundingBox, NULL, LOCtoArcArc_callback, &info, NULL); else return pcb_true; @@ -909,7 +909,7 @@ else { info.layer = layer - max_copper_layer; if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, &info.arc.BoundingBox, NULL, LOCtoArcPad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, &info.arc.BoundingBox, NULL, LOCtoArcPad_callback, &info, NULL); else return pcb_true; } @@ -991,7 +991,7 @@ EXPAND_BOUNDS(&info.line) /* add the new rat lines */ if (setjmp(info.env) == 0) - r_search(PCB->Data->rat_tree, &info.line.BoundingBox, NULL, LOCtoLineRat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, &info.line.BoundingBox, NULL, LOCtoLineRat_callback, &info, NULL); else return pcb_true; @@ -1006,12 +1006,12 @@ info.layer = layer; /* add lines */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.line, NULL, LOCtoLineLine_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.line, NULL, LOCtoLineLine_callback, &info, NULL); else return pcb_true; /* add arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.line, NULL, LOCtoLineArc_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.line, NULL, LOCtoLineArc_callback, &info, NULL); else return pcb_true; /* now check all polygons */ @@ -1030,7 +1030,7 @@ /* handle special 'pad' layers */ info.layer = layer - max_copper_layer; if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, &info.line.BoundingBox, NULL, LOCtoLinePad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, &info.line.BoundingBox, NULL, LOCtoLinePad_callback, &info, NULL); else return pcb_true; } @@ -1268,7 +1268,7 @@ /* add the new rat lines */ info.layer = LayerGroup; if (setjmp(info.env) == 0) - r_search(PCB->Data->rat_tree, &info.pad.BoundingBox, NULL, LOCtoPadRat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, &info.pad.BoundingBox, NULL, LOCtoPadRat_callback, &info, NULL); else return pcb_true; @@ -1282,17 +1282,17 @@ info.layer = layer; /* add lines */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, &info.pad.BoundingBox, NULL, LOCtoPadLine_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->line_tree, &info.pad.BoundingBox, NULL, LOCtoPadLine_callback, &info, NULL); else return pcb_true; /* add arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, &info.pad.BoundingBox, NULL, LOCtoPadArc_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->arc_tree, &info.pad.BoundingBox, NULL, LOCtoPadArc_callback, &info, NULL); else return pcb_true; /* add polygons */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->polygon_tree, &info.pad.BoundingBox, NULL, LOCtoPadPoly_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->polygon_tree, &info.pad.BoundingBox, NULL, LOCtoPadPoly_callback, &info, NULL); else return pcb_true; } @@ -1300,7 +1300,7 @@ /* handle special 'pad' layers */ info.layer = layer - max_copper_layer; if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.pad, NULL, LOCtoPadPad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.pad, NULL, LOCtoPadPad_callback, &info, NULL); else return pcb_true; } @@ -1382,7 +1382,7 @@ info.layer = LayerGroup; /* check rats */ if (setjmp(info.env) == 0) - r_search(PCB->Data->rat_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyRat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyRat_callback, &info, NULL); else return pcb_true; /* loop over all layers of the group */ @@ -1407,12 +1407,12 @@ info.layer = layer; /* check all lines */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyLine_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyLine_callback, &info, NULL); else return pcb_true; /* check all arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyArc_callback, &info, NULL); + pcb_r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyArc_callback, &info, NULL); else return pcb_true; } @@ -1419,7 +1419,7 @@ else { info.layer = layer - max_copper_layer; if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyPad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyPad_callback, &info, NULL); else return pcb_true; } Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 5004) +++ trunk/src/obj_arc.c (revision 5005) @@ -148,12 +148,12 @@ new_sa = 0; } pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, a); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); AddObjectToChangeAnglesUndoList(PCB_TYPE_ARC, a, a, a); a->StartAngle = new_sa; a->Delta = new_da; pcb_arc_bbox(a); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, a); } @@ -161,12 +161,12 @@ void pcb_arc_set_radii(pcb_layer_t *Layer, pcb_arc_t *a, pcb_coord_t new_width, pcb_coord_t new_height) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, a); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); AddObjectToChangeRadiiUndoList(PCB_TYPE_ARC, a, a, a); a->Width = new_width; a->Height = new_height; pcb_arc_bbox(a); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, a); } @@ -205,8 +205,8 @@ { pcb_arc_bbox(Arc); if (!Layer->arc_tree) - Layer->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + Layer->arc_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); } @@ -236,7 +236,7 @@ pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; pcb_poly_restore_to_poly(ctx->buffer.src, PCB_TYPE_ARC, layer, arc); - r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); + pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); arclist_remove(arc); arclist_append(&lay->Arc, arc); @@ -244,8 +244,8 @@ PCB_FLAG_CLEAR(PCB_FLAG_FOUND, arc); if (!lay->arc_tree) - lay->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->arc_tree, (pcb_box_t *) arc, 0); + lay->arc_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(lay->arc_tree, (pcb_box_t *) arc, 0); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_TYPE_ARC, lay, arc); return (arc); } @@ -260,11 +260,11 @@ if (value <= MAX_LINESIZE && value >= MIN_LINESIZE && value != Arc->Thickness) { AddObjectToSizeUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); Arc->Thickness = value; pcb_arc_bbox(Arc); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -283,7 +283,7 @@ if (value != Arc->Clearance) { AddObjectToClearSizeUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); Arc->Clearance = value; if (Arc->Clearance == 0) { @@ -291,7 +291,7 @@ Arc->Clearance = PCB_MIL_TO_COORD(10); } pcb_arc_bbox(Arc); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -324,11 +324,11 @@ if (value != *dst) { AddObjectToChangeRadiiUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); *dst = value; pcb_arc_bbox(Arc); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -364,11 +364,11 @@ if (value != *dst) { AddObjectToChangeAnglesUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); *dst = value; pcb_arc_bbox(Arc); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -431,7 +431,7 @@ void *MoveArc(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); if (Layer->On) { EraseArc(Arc); pcb_arc_move(Arc, ctx->move.dx, ctx->move.dy); @@ -441,7 +441,7 @@ else { pcb_arc_move(Arc, ctx->move.dx, ctx->move.dy); } - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); return (Arc); } @@ -449,14 +449,14 @@ /* moves an arc between layers; lowlevel routines */ void *MoveArcToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_arc_t * arc, pcb_layer_t * Destination) { - r_delete_entry(Source->arc_tree, (pcb_box_t *) arc); + pcb_r_delete_entry(Source->arc_tree, (pcb_box_t *) arc); arclist_remove(arc); arclist_append(&Destination->Arc, arc); if (!Destination->arc_tree) - Destination->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->arc_tree, (pcb_box_t *) arc, 0); + Destination->arc_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Destination->arc_tree, (pcb_box_t *) arc, 0); return arc; } @@ -491,7 +491,7 @@ /* destroys an arc from a layer */ void *DestroyArc(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); pcb_arc_free(Arc); @@ -544,9 +544,9 @@ void *RotateArc(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); pcb_arc_rotate90(Arc, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); DrawArc(Layer, Arc); pcb_draw(); return (Arc); Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 5004) +++ trunk/src/obj_elem.c (revision 5005) @@ -402,7 +402,7 @@ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); pcb_text_rotate90(text, X, Y, Number); } END_LOOP; @@ -418,7 +418,7 @@ { /* pre-delete the pins from the pin-tree before their coordinates change */ if (Data) - r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); + pcb_r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); pcb_poly_restore_to_poly(Data, PCB_TYPE_PIN, Element, pin); pcb_rotate(&pin->X, &pin->Y, X, Y, cosa, sina); pcb_pin_bbox(pin); @@ -428,7 +428,7 @@ { /* pre-delete the pads before their coordinates change */ if (Data) - r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); + pcb_r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); pcb_poly_restore_to_poly(Data, PCB_TYPE_PAD, Element, pad); pcb_rotate(&pad->Point1.X, &pad->Point1.Y, X, Y, cosa, sina); pcb_rotate(&pad->Point2.X, &pad->Point2.Y, X, Y, cosa, sina); @@ -492,12 +492,12 @@ if (pcb && which == NAME_INDEX()) EraseElementName(Element); - r_delete_entry(data->name_tree[which], &Element->Name[which].BoundingBox); + pcb_r_delete_entry(data->name_tree[which], &Element->Name[which].BoundingBox); Element->Name[which].TextString = new_name; pcb_text_bbox(&PCB->Font, &Element->Name[which]); - r_insert_entry(data->name_tree[which], &Element->Name[which].BoundingBox, 0); + pcb_r_insert_entry(data->name_tree[which], &Element->Name[which].BoundingBox, 0); if (pcb && which == NAME_INDEX()) DrawElementName(Element); @@ -721,17 +721,17 @@ pcb_box_t *box, *vbox; if (Data && Data->element_tree) - r_delete_entry(Data->element_tree, (pcb_box_t *) Element); + pcb_r_delete_entry(Data->element_tree, (pcb_box_t *) Element); /* first update the text objects */ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); pcb_text_bbox(Font, text); if (Data && !Data->name_tree[n]) - Data->name_tree[n] = r_create_tree(NULL, 0, 0); + Data->name_tree[n] = pcb_r_create_tree(NULL, 0, 0); if (Data) - r_insert_entry(Data->name_tree[n], (pcb_box_t *) text, 0); + pcb_r_insert_entry(Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; @@ -768,12 +768,12 @@ PCB_PIN_LOOP(Element); { if (Data && Data->pin_tree) - r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); + pcb_r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); pcb_pin_bbox(pin); if (Data) { if (!Data->pin_tree) - Data->pin_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Data->pin_tree, (pcb_box_t *) pin, 0); + Data->pin_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Data->pin_tree, (pcb_box_t *) pin, 0); } PCB_MAKE_MIN(box->X1, pin->BoundingBox.X1); PCB_MAKE_MIN(box->Y1, pin->BoundingBox.Y1); @@ -788,12 +788,12 @@ PCB_PAD_LOOP(Element); { if (Data && Data->pad_tree) - r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); + pcb_r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); pcb_pad_bbox(pad); if (Data) { if (!Data->pad_tree) - Data->pad_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Data->pad_tree, (pcb_box_t *) pad, 0); + Data->pad_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Data->pad_tree, (pcb_box_t *) pad, 0); } PCB_MAKE_MIN(box->X1, pad->BoundingBox.X1); PCB_MAKE_MIN(box->Y1, pad->BoundingBox.Y1); @@ -845,9 +845,9 @@ pcb_close_box(box); pcb_close_box(vbox); if (Data && !Data->element_tree) - Data->element_tree = r_create_tree(NULL, 0, 0); + Data->element_tree = pcb_r_create_tree(NULL, 0, 0); if (Data) - r_insert_entry(Data->element_tree, box, 0); + pcb_r_insert_entry(Data->element_tree, box, 0); } static char *BumpName(char *Name) @@ -904,20 +904,20 @@ void r_delete_element(pcb_data_t * data, pcb_element_t * element) { - r_delete_entry(data->element_tree, (pcb_box_t *) element); + pcb_r_delete_entry(data->element_tree, (pcb_box_t *) element); PCB_PIN_LOOP(element); { - r_delete_entry(data->pin_tree, (pcb_box_t *) pin); + pcb_r_delete_entry(data->pin_tree, (pcb_box_t *) pin); } END_LOOP; PCB_PAD_LOOP(element); { - r_delete_entry(data->pad_tree, (pcb_box_t *) pad); + pcb_r_delete_entry(data->pad_tree, (pcb_box_t *) pad); } END_LOOP; PCB_ELEMENT_PCB_TEXT_LOOP(element); { - r_delete_entry(data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(data->name_tree[n], (pcb_box_t *) text); } END_LOOP; } @@ -994,7 +994,7 @@ void pcb_element_move(pcb_data_t *Data, pcb_element_t *Element, pcb_coord_t DX, pcb_coord_t DY) { if (Data) - r_delete_entry(Data->element_tree, (pcb_box_t *) Element); + pcb_r_delete_entry(Data->element_tree, (pcb_box_t *) Element); PCB_ELEMENT_PCB_LINE_LOOP(Element); { pcb_line_move(line, DX, DY); @@ -1003,12 +1003,12 @@ PCB_PIN_LOOP(Element); { if (Data) { - r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); + pcb_r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); pcb_poly_restore_to_poly(Data, PCB_TYPE_PIN, Element, pin); } pcb_pin_move(pin, DX, DY); if (Data) { - r_insert_entry(Data->pin_tree, (pcb_box_t *) pin, 0); + pcb_r_insert_entry(Data->pin_tree, (pcb_box_t *) pin, 0); pcb_poly_clear_from_poly(Data, PCB_TYPE_PIN, Element, pin); } } @@ -1016,12 +1016,12 @@ PCB_PAD_LOOP(Element); { if (Data) { - r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); + pcb_r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); pcb_poly_restore_to_poly(Data, PCB_TYPE_PAD, Element, pad); } pcb_pad_move(pad, DX, DY); if (Data) { - r_insert_entry(Data->pad_tree, (pcb_box_t *) pad, 0); + pcb_r_insert_entry(Data->pad_tree, (pcb_box_t *) pad, 0); pcb_poly_clear_from_poly(Data, PCB_TYPE_PAD, Element, pad); } } @@ -1034,10 +1034,10 @@ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); pcb_text_move(text, DX, DY); if (Data && Data->name_tree[n]) - r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); + pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; PCB_BOX_MOVE_LOWLEVEL(&Element->BoundingBox, DX, DY); @@ -1044,7 +1044,7 @@ PCB_BOX_MOVE_LOWLEVEL(&Element->VBox, DX, DY); PCB_MOVE(Element->MarkX, Element->MarkY, DX, DY); if (Data) - r_insert_entry(Data->element_tree, (pcb_box_t *) Element, 0); + pcb_r_insert_entry(Data->element_tree, (pcb_box_t *) Element, 0); } void *pcb_element_remove(pcb_element_t *Element) @@ -1069,7 +1069,7 @@ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); pcb_text_rotate90(text, X, Y, Number); } END_LOOP; @@ -1082,7 +1082,7 @@ { /* pre-delete the pins from the pin-tree before their coordinates change */ if (Data) - r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); + pcb_r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); pcb_poly_restore_to_poly(Data, PCB_TYPE_PIN, Element, pin); PCB_PIN_ROTATE90(pin, X, Y, Number); } @@ -1091,7 +1091,7 @@ { /* pre-delete the pads before their coordinates change */ if (Data) - r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); + pcb_r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); pcb_poly_restore_to_poly(Data, PCB_TYPE_PAD, Element, pad); PCB_PAD_ROTATE90(pad, X, Y, Number); } @@ -1283,7 +1283,7 @@ AddObjectToClearSizeUndoList(PCB_TYPE_PAD, Element, pad, pad); ErasePad(pad); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_PAD, Element, pad); - r_delete_entry(PCB->Data->pad_tree, &pad->BoundingBox); + pcb_r_delete_entry(PCB->Data->pad_tree, &pad->BoundingBox); pad->Clearance = value; if (PCB_FLAG_TEST(PCB_FLAG_HOLE, pad)) { AddObjectToSizeUndoList(PCB_TYPE_PAD, Element, pad, pad); @@ -1355,10 +1355,10 @@ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { AddObjectToSizeUndoList(PCB_TYPE_ELEMENT_NAME, Element, text, text); - r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); text->Scale = value; pcb_text_bbox(&PCB->Font, text); - r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); + pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; DrawElementName(Element); @@ -1535,10 +1535,10 @@ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (PCB->Data->name_tree[n]) - r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); pcb_text_move(text, ctx->move.dx, ctx->move.dy); if (PCB->Data->name_tree[n]) - r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); + pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; DrawElementName(Element); @@ -1548,10 +1548,10 @@ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (PCB->Data->name_tree[n]) - r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); pcb_text_move(text, ctx->move.dx, ctx->move.dy); if (PCB->Data->name_tree[n]) - r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); + pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; } @@ -1588,11 +1588,11 @@ void *DestroyElement(pcb_opctx_t *ctx, pcb_element_t *Element) { if (ctx->remove.destroy_target->element_tree) - r_delete_entry(ctx->remove.destroy_target->element_tree, (pcb_box_t *) Element); + pcb_r_delete_entry(ctx->remove.destroy_target->element_tree, (pcb_box_t *) Element); if (ctx->remove.destroy_target->pin_tree) { PCB_PIN_LOOP(Element); { - r_delete_entry(ctx->remove.destroy_target->pin_tree, (pcb_box_t *) pin); + pcb_r_delete_entry(ctx->remove.destroy_target->pin_tree, (pcb_box_t *) pin); } END_LOOP; } @@ -1599,7 +1599,7 @@ if (ctx->remove.destroy_target->pad_tree) { PCB_PAD_LOOP(Element); { - r_delete_entry(ctx->remove.destroy_target->pad_tree, (pcb_box_t *) pad); + pcb_r_delete_entry(ctx->remove.destroy_target->pad_tree, (pcb_box_t *) pad); } END_LOOP; } @@ -1606,7 +1606,7 @@ PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (ctx->remove.destroy_target->name_tree[n]) - r_delete_entry(ctx->remove.destroy_target->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(ctx->remove.destroy_target->name_tree[n], (pcb_box_t *) text); } END_LOOP; pcb_element_destroy(Element); @@ -1647,9 +1647,9 @@ EraseElementName(Element); PCB_ELEMENT_PCB_TEXT_LOOP(Element); { - r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); + pcb_r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); pcb_text_rotate90(text, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); - r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); + pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; DrawElementName(Element); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 5004) +++ trunk/src/obj_line.c (revision 5005) @@ -173,7 +173,7 @@ * verify that the layer is on the board first! */ if (setjmp(info.env) == 0) { - r_search(Layer->line_tree, &search, NULL, line_callback, &info, NULL); + pcb_r_search(Layer->line_tree, &search, NULL, line_callback, &info, NULL); return pcb_line_new(Layer, X1, Y1, X2, Y2, Thickness, Clearance, Flags); } @@ -217,8 +217,8 @@ { pcb_line_bbox(Line); if (!Layer->line_tree) - Layer->line_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); + Layer->line_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); } /* sets the bounding box of a line */ @@ -263,7 +263,7 @@ pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; pcb_poly_restore_to_poly(ctx->buffer.src, PCB_TYPE_LINE, layer, line); - r_delete_entry(layer->line_tree, (pcb_box_t *) line); + pcb_r_delete_entry(layer->line_tree, (pcb_box_t *) line); linelist_remove(line); linelist_append(&(lay->Line), line); @@ -271,8 +271,8 @@ PCB_FLAG_CLEAR(PCB_FLAG_FOUND, line); if (!lay->line_tree) - lay->line_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->line_tree, (pcb_box_t *) line, 0); + lay->line_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(lay->line_tree, (pcb_box_t *) line, 0); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_TYPE_LINE, lay, line); return (line); } @@ -287,11 +287,11 @@ if (value <= MAX_LINESIZE && value >= MIN_LINESIZE && value != Line->Thickness) { AddObjectToSizeUndoList(PCB_TYPE_LINE, Layer, Line, Line); EraseLine(Line); - r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); Line->Thickness = value; pcb_line_bbox(Line); - r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); + pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); return (Line); @@ -311,7 +311,7 @@ AddObjectToClearSizeUndoList(PCB_TYPE_LINE, Layer, Line, Line); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); EraseLine(Line); - r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); Line->Clearance = value; if (Line->Clearance == 0) { PCB_FLAG_CLEAR(PCB_FLAG_CLEARLINE, Line); @@ -318,7 +318,7 @@ Line->Clearance = PCB_MIL_TO_COORD(10); } pcb_line_bbox(Line); - r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); + pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); return (Line); @@ -396,9 +396,9 @@ if (Layer->On) EraseLine(Line); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); - r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); pcb_line_move(Line, ctx->move.dx, ctx->move.dy); - r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); + pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); if (Layer->On) { DrawLine(Layer, Line); @@ -414,10 +414,10 @@ if (Layer->On) EraseLine(Line); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); - r_delete_entry(Layer->line_tree, &Line->BoundingBox); + pcb_r_delete_entry(Layer->line_tree, &Line->BoundingBox); PCB_MOVE(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_line_bbox(Line); - r_insert_entry(Layer->line_tree, &Line->BoundingBox, 0); + pcb_r_insert_entry(Layer->line_tree, &Line->BoundingBox, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); if (Layer->On) { DrawLine(Layer, Line); @@ -429,10 +429,10 @@ if (PCB->RatOn) EraseRat((pcb_rat_t *) Line); - r_delete_entry(PCB->Data->rat_tree, &Line->BoundingBox); + pcb_r_delete_entry(PCB->Data->rat_tree, &Line->BoundingBox); PCB_MOVE(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_line_bbox(Line); - r_insert_entry(PCB->Data->rat_tree, &Line->BoundingBox, 0); + pcb_r_insert_entry(PCB->Data->rat_tree, &Line->BoundingBox, 0); if (PCB->RatOn) { DrawRat((pcb_rat_t *) Line); pcb_draw(); @@ -444,14 +444,14 @@ /* moves a line between layers; lowlevel routines */ void *MoveLineToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_line_t * line, pcb_layer_t * Destination) { - r_delete_entry(Source->line_tree, (pcb_box_t *) line); + pcb_r_delete_entry(Source->line_tree, (pcb_box_t *) line); linelist_remove(line); linelist_append(&(Destination->Line), line); if (!Destination->line_tree) - Destination->line_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->line_tree, (pcb_box_t *) line, 0); + Destination->line_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Destination->line_tree, (pcb_box_t *) line, 0); return line; } @@ -519,7 +519,7 @@ info.X = newone->Point1.X; info.Y = newone->Point1.Y; if (setjmp(info.env) == 0) - r_search(Layer->line_tree, &sb, NULL, moveline_callback, &info, NULL); + pcb_r_search(Layer->line_tree, &sb, NULL, moveline_callback, &info, NULL); } /* consider via at Point2 */ sb.X1 = newone->Point2.X - newone->Thickness / 2; @@ -531,7 +531,7 @@ info.X = newone->Point2.X; info.Y = newone->Point2.Y; if (setjmp(info.env) == 0) - r_search(Layer->line_tree, &sb, NULL, moveline_callback, &info, NULL); + pcb_r_search(Layer->line_tree, &sb, NULL, moveline_callback, &info, NULL); } pcb_draw(); return (newone); @@ -540,7 +540,7 @@ /* destroys a line from a layer */ void *DestroyLine(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { - r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); free(Line->Number); pcb_line_free(Line); @@ -586,7 +586,7 @@ info.line = Line; info.point = Point; if (setjmp(info.env) == 0) { - r_search(Layer->line_tree, (const pcb_box_t *) Point, NULL, remove_point, &info, NULL); + pcb_r_search(Layer->line_tree, (const pcb_box_t *) Point, NULL, remove_point, &info, NULL); return RemoveLine_op(ctx, Layer, Line); } pcb_move_obj(PCB_TYPE_LINE_POINT, Layer, info.line, info.point, other.X - Point->X, other.Y - Point->Y); @@ -650,19 +650,19 @@ EraseLine(Line); if (Layer) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); - r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); } else - r_delete_entry(PCB->Data->rat_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(PCB->Data->rat_tree, (pcb_box_t *) Line); pcb_point_rotate90(Point, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); pcb_line_bbox(Line); if (Layer) { - r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); + pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); } else { - r_insert_entry(PCB->Data->rat_tree, (pcb_box_t *) Line, 0); + pcb_r_insert_entry(PCB->Data->rat_tree, (pcb_box_t *) Line, 0); DrawRat((pcb_rat_t *) Line); } pcb_draw(); @@ -682,12 +682,12 @@ Y = Line->Point2.Y; AddObjectToMoveUndoList(PCB_TYPE_LINE_POINT, Layer, Line, &Line->Point2, ctx->insert.x - X, ctx->insert.y - Y); EraseLine(Line); - r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); Line->Point2.X = ctx->insert.x; Line->Point2.Y = ctx->insert.y; pcb_line_bbox(Line); - r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); + pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); /* we must create after playing with Line since creation may Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 5004) +++ trunk/src/obj_line_drcenf.c (revision 5005) @@ -349,26 +349,26 @@ last2 = length2; if (setjmp(info.env) == 0) { info.line = &line1; - r_search(PCB->Data->via_tree, &line1.BoundingBox, NULL, drcVia_callback, &info, NULL); - r_search(PCB->Data->pin_tree, &line1.BoundingBox, NULL, drcVia_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, &line1.BoundingBox, NULL, drcVia_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, &line1.BoundingBox, NULL, drcVia_callback, &info, NULL); if (info.solder || comp == group) - r_search(PCB->Data->pad_tree, &line1.BoundingBox, NULL, drcPad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, &line1.BoundingBox, NULL, drcPad_callback, &info, NULL); if (two_lines) { info.line = &line2; - r_search(PCB->Data->via_tree, &line2.BoundingBox, NULL, drcVia_callback, &info, NULL); - r_search(PCB->Data->pin_tree, &line2.BoundingBox, NULL, drcVia_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, &line2.BoundingBox, NULL, drcVia_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, &line2.BoundingBox, NULL, drcVia_callback, &info, NULL); if (info.solder || comp == group) - r_search(PCB->Data->pad_tree, &line2.BoundingBox, NULL, drcPad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, &line2.BoundingBox, NULL, drcPad_callback, &info, NULL); } GROUP_LOOP(PCB->Data, group); { info.line = &line1; - r_search(layer->line_tree, &line1.BoundingBox, NULL, drcLine_callback, &info, NULL); - r_search(layer->arc_tree, &line1.BoundingBox, NULL, drcArc_callback, &info, NULL); + pcb_r_search(layer->line_tree, &line1.BoundingBox, NULL, drcLine_callback, &info, NULL); + pcb_r_search(layer->arc_tree, &line1.BoundingBox, NULL, drcArc_callback, &info, NULL); if (two_lines) { info.line = &line2; - r_search(layer->line_tree, &line2.BoundingBox, NULL, drcLine_callback, &info, NULL); - r_search(layer->arc_tree, &line2.BoundingBox, NULL, drcArc_callback, &info, NULL); + pcb_r_search(layer->line_tree, &line2.BoundingBox, NULL, drcLine_callback, &info, NULL); + pcb_r_search(layer->arc_tree, &line2.BoundingBox, NULL, drcArc_callback, &info, NULL); } } END_LOOP; @@ -446,15 +446,15 @@ pcb_line_bbox(&line); if (setjmp(info.env) == 0) { info.line = &line; - r_search(PCB->Data->via_tree, &line.BoundingBox, NULL, drcVia_callback, &info, NULL); - r_search(PCB->Data->pin_tree, &line.BoundingBox, NULL, drcVia_callback, &info, NULL); + pcb_r_search(PCB->Data->via_tree, &line.BoundingBox, NULL, drcVia_callback, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, &line.BoundingBox, NULL, drcVia_callback, &info, NULL); if (info.solder || comp == group) - r_search(PCB->Data->pad_tree, &line.BoundingBox, NULL, drcPad_callback, &info, NULL); + pcb_r_search(PCB->Data->pad_tree, &line.BoundingBox, NULL, drcPad_callback, &info, NULL); GROUP_LOOP(PCB->Data, group); { info.line = &line; - r_search(layer->line_tree, &line.BoundingBox, NULL, drcLine_callback, &info, NULL); - r_search(layer->arc_tree, &line.BoundingBox, NULL, drcArc_callback, &info, NULL); + pcb_r_search(layer->line_tree, &line.BoundingBox, NULL, drcLine_callback, &info, NULL); + pcb_r_search(layer->arc_tree, &line.BoundingBox, NULL, drcArc_callback, &info, NULL); } END_LOOP; /* no intersector! */ Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 5004) +++ trunk/src/obj_pad.c (revision 5005) @@ -166,7 +166,7 @@ AddObjectToMaskSizeUndoList(PCB_TYPE_PAD, Element, Pad, Pad); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_PAD, Element, Pad); ErasePad(Pad); - r_delete_entry(PCB->Data->pad_tree, &Pad->BoundingBox); + pcb_r_delete_entry(PCB->Data->pad_tree, &Pad->BoundingBox); Pad->Mask += value - Pad->Thickness; Pad->Thickness = value; /* SetElementBB updates all associated rtrees */ @@ -197,7 +197,7 @@ AddObjectToClearSizeUndoList(PCB_TYPE_PAD, Element, Pad, Pad); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_PAD, Element, Pad); ErasePad(Pad); - r_delete_entry(PCB->Data->pad_tree, &Pad->BoundingBox); + pcb_r_delete_entry(PCB->Data->pad_tree, &Pad->BoundingBox); Pad->Clearance = value; /* SetElementBB updates all associated rtrees */ pcb_element_bbox(PCB->Data, Element, &PCB->Font); @@ -286,7 +286,7 @@ if (value != Pad->Mask) { AddObjectToMaskSizeUndoList(PCB_TYPE_PAD, Element, Pad, Pad); ErasePad(Pad); - r_delete_entry(PCB->Data->pad_tree, &Pad->BoundingBox); + pcb_r_delete_entry(PCB->Data->pad_tree, &Pad->BoundingBox); Pad->Mask = value; pcb_element_bbox(PCB->Data, Element, &PCB->Font); DrawPad(Pad); Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 5004) +++ trunk/src/obj_pinvia.c (revision 5005) @@ -199,8 +199,8 @@ { pcb_pin_bbox(Via); if (!Data->via_tree) - Data->via_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Data->via_tree, (pcb_box_t *) Via, 0); + Data->via_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Data->via_tree, (pcb_box_t *) Via, 0); } /* sets the bounding box of a pin or via */ @@ -243,7 +243,7 @@ { pcb_poly_restore_to_poly(ctx->buffer.src, PCB_TYPE_VIA, via, via); - r_delete_entry(ctx->buffer.src->via_tree, (pcb_box_t *) via); + pcb_r_delete_entry(ctx->buffer.src->via_tree, (pcb_box_t *) via); pinlist_remove(via); pinlist_append(&ctx->buffer.dst->Via, via); @@ -250,8 +250,8 @@ PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND, via); if (!ctx->buffer.dst->via_tree) - ctx->buffer.dst->via_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(ctx->buffer.dst->via_tree, (pcb_box_t *) via, 0); + ctx->buffer.dst->via_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(ctx->buffer.dst->via_tree, (pcb_box_t *) via, 0); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_TYPE_VIA, via, via); return via; } @@ -299,7 +299,7 @@ value >= MIN_PINORVIASIZE && value >= Via->DrillingHole + MIN_PINORVIACOPPER && value != Via->Thickness) { AddObjectToSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); EraseVia(Via); - r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); + pcb_r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_PIN, Via, Via); if (Via->Mask) { AddObjectToMaskSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); @@ -307,7 +307,7 @@ } Via->Thickness = value; pcb_pin_bbox(Via); - r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); + pcb_r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); DrawVia(Via); return (Via); @@ -385,10 +385,10 @@ pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); AddObjectToClearSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); EraseVia(Via); - r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); + pcb_r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); Via->Clearance = value; pcb_pin_bbox(Via); - r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); + pcb_r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); DrawVia(Via); Via->Element = NULL; @@ -408,7 +408,7 @@ AddObjectToSizeUndoList(PCB_TYPE_PIN, Element, Pin, Pin); AddObjectToMaskSizeUndoList(PCB_TYPE_PIN, Element, Pin, Pin); ErasePin(Pin); - r_delete_entry(PCB->Data->pin_tree, &Pin->BoundingBox); + pcb_r_delete_entry(PCB->Data->pin_tree, &Pin->BoundingBox); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_PIN, Element, Pin); Pin->Mask += value - Pin->Thickness; Pin->Thickness = value; @@ -440,7 +440,7 @@ pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_PIN, Element, Pin); AddObjectToClearSizeUndoList(PCB_TYPE_PIN, Element, Pin, Pin); ErasePin(Pin); - r_delete_entry(PCB->Data->pin_tree, &Pin->BoundingBox); + pcb_r_delete_entry(PCB->Data->pin_tree, &Pin->BoundingBox); Pin->Clearance = value; /* SetElementBB updates all associated rtrees */ pcb_element_bbox(PCB->Data, Element, &PCB->Font); @@ -633,7 +633,7 @@ EraseVia(Via); AddObjectToFlagUndoList(PCB_TYPE_VIA, Via, Via, Via); AddObjectToMaskSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); - r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); + pcb_r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); PCB_FLAG_TOGGLE(PCB_FLAG_HOLE, Via); @@ -652,7 +652,7 @@ } pcb_pin_bbox(Via); - r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); + pcb_r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); DrawVia(Via); pcb_draw(); @@ -670,7 +670,7 @@ if (value != Pin->Mask) { AddObjectToMaskSizeUndoList(PCB_TYPE_PIN, Element, Pin, Pin); ErasePin(Pin); - r_delete_entry(PCB->Data->pin_tree, &Pin->BoundingBox); + pcb_r_delete_entry(PCB->Data->pin_tree, &Pin->BoundingBox); Pin->Mask = value; pcb_element_bbox(PCB->Data, Element, &PCB->Font); DrawPin(Pin); @@ -689,10 +689,10 @@ if (value != Via->Mask) { AddObjectToMaskSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); EraseVia(Via); - r_delete_entry(PCB->Data->via_tree, &Via->BoundingBox); + pcb_r_delete_entry(PCB->Data->via_tree, &Via->BoundingBox); Via->Mask = value; pcb_pin_bbox(Via); - r_insert_entry(PCB->Data->via_tree, &Via->BoundingBox, 0); + pcb_r_insert_entry(PCB->Data->via_tree, &Via->BoundingBox, 0); DrawVia(Via); return (Via); } @@ -716,12 +716,12 @@ /* moves a via */ void *MoveVia(pcb_opctx_t *ctx, pcb_pin_t *Via) { - r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); + pcb_r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); pcb_via_move(Via, ctx->move.dx, ctx->move.dy); if (PCB->ViaOn) EraseVia(Via); - r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); + pcb_r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); if (PCB->ViaOn) { DrawVia(Via); @@ -733,7 +733,7 @@ /* destroys a via */ void *DestroyVia(pcb_opctx_t *ctx, pcb_pin_t *Via) { - r_delete_entry(ctx->remove.destroy_target->via_tree, (pcb_box_t *) Via); + pcb_r_delete_entry(ctx->remove.destroy_target->via_tree, (pcb_box_t *) Via); free(Via->Name); pcb_via_free(Via); Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 5004) +++ trunk/src/obj_poly.c (revision 5005) @@ -167,8 +167,8 @@ { pcb_poly_bbox(polygon); if (!Layer->polygon_tree) - Layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) polygon, 0); + Layer->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) polygon, 0); } /* creates a new polygon on a layer */ @@ -240,8 +240,8 @@ * skeleton polygon object, which won't have correct bounds. */ if (!layer->polygon_tree) - layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); + layer->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); PCB_FLAG_CLEAR(PCB_FLAG_FOUND | ctx->buffer.extraflg, polygon); return (polygon); @@ -253,7 +253,7 @@ { pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; - r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); + pcb_r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); polylist_remove(polygon); polylist_append(&lay->Polygon, polygon); @@ -261,8 +261,8 @@ PCB_FLAG_CLEAR(PCB_FLAG_FOUND, polygon); if (!lay->polygon_tree) - lay->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->polygon_tree, (pcb_box_t *) polygon, 0); + lay->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(lay->polygon_tree, (pcb_box_t *) polygon, 0); return (polygon); } @@ -315,7 +315,7 @@ * second, shift the points up to make room for the new point */ ErasePolygon(Polygon); - r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); save = *pcb_poly_point_new(Polygon, ctx->insert.x, ctx->insert.y); for (n = Polygon->PointN - 1; n > ctx->insert.idx; n--) Polygon->Points[n] = Polygon->Points[n - 1]; @@ -330,7 +330,7 @@ AddObjectToInsertPointUndoList(PCB_TYPE_POLYGON_POINT, Layer, Polygon, &Polygon->Points[ctx->insert.idx]); pcb_poly_bbox(Polygon); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (ctx->insert.forcible || !pcb_poly_remove_excess_points(Layer, Polygon)) { DrawPolygon(Layer, Polygon); @@ -356,9 +356,9 @@ if (Layer->On) { ErasePolygon(Polygon); } - r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); pcb_poly_move(Polygon, ctx->move.dx, ctx->move.dy); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (Layer->On) { DrawPolygon(Layer, Polygon); @@ -373,10 +373,10 @@ if (Layer->On) { ErasePolygon(Polygon); } - r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); PCB_MOVE(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_poly_bbox(Polygon); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); pcb_poly_remove_excess_points(Layer, Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (Layer->On) { @@ -389,14 +389,14 @@ /* moves a polygon between layers; lowlevel routines */ void *MovePolygonToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_polygon_t * polygon, pcb_layer_t * Destination) { - r_delete_entry(Source->polygon_tree, (pcb_box_t *) polygon); + pcb_r_delete_entry(Source->polygon_tree, (pcb_box_t *) polygon); polylist_remove(polygon); polylist_append(&Destination->Polygon, polygon); if (!Destination->polygon_tree) - Destination->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->polygon_tree, (pcb_box_t *) polygon, 0); + Destination->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Destination->polygon_tree, (pcb_box_t *) polygon, 0); return polygon; } @@ -442,9 +442,9 @@ d.dnum = GetLayerNumber(PCB->Data, ctx->move.dst_layer); d.polygon = Polygon; d.type = PCB_TYPE_PIN; - r_search(PCB->Data->pin_tree, &Polygon->BoundingBox, NULL, mptl_pin_callback, &d, NULL); + pcb_r_search(PCB->Data->pin_tree, &Polygon->BoundingBox, NULL, mptl_pin_callback, &d, NULL); d.type = PCB_TYPE_VIA; - r_search(PCB->Data->via_tree, &Polygon->BoundingBox, NULL, mptl_pin_callback, &d, NULL); + pcb_r_search(PCB->Data->via_tree, &Polygon->BoundingBox, NULL, mptl_pin_callback, &d, NULL); newone = (struct pcb_polygon_s *) MovePolygonToLayerLowLevel(ctx, Layer, Polygon, ctx->move.dst_layer); pcb_poly_init_clip(PCB->Data, ctx->move.dst_layer, newone); if (ctx->move.dst_layer->On) { @@ -458,7 +458,7 @@ /* destroys a polygon from a layer */ void *DestroyPolygon(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon) { - r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); pcb_poly_free_fields(Polygon); pcb_poly_free(Polygon); @@ -483,7 +483,7 @@ if (contour_points <= 3) return RemovePolygonContour(ctx, Layer, Polygon, contour); - r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -496,7 +496,7 @@ Polygon->HoleIndex[i]--; pcb_poly_bbox(Polygon); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); pcb_poly_init_clip(PCB->Data, Layer, Polygon); return (Polygon); } @@ -590,7 +590,7 @@ /* insert the polygon-point into the undo list */ AddObjectToRemovePointUndoList(PCB_TYPE_POLYGON_POINT, Layer, Polygon, point_idx); - r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -603,7 +603,7 @@ Polygon->HoleIndex[i]--; pcb_poly_bbox(Polygon); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); pcb_poly_remove_excess_points(Layer, Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); @@ -625,8 +625,8 @@ pcb_poly_copy(polygon, Polygon); pcb_poly_move(polygon, ctx->copy.DeltaX, ctx->copy.DeltaY); if (!Layer->polygon_tree) - Layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) polygon, 0); + Layer->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) polygon, 0); pcb_poly_init_clip(PCB->Data, Layer, polygon); DrawPolygon(Layer, polygon); AddObjectToCreateUndoList(PCB_TYPE_POLYGON, Layer, polygon, polygon); Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 5004) +++ trunk/src/obj_rat.c (revision 5005) @@ -90,8 +90,8 @@ Line->group2 = group2; pcb_line_bbox((pcb_line_t *) Line); if (!Data->rat_tree) - Data->rat_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Data->rat_tree, &Line->BoundingBox, 0); + Data->rat_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Data->rat_tree, &Line->BoundingBox, 0); return (Line); } @@ -134,7 +134,7 @@ /* moves a rat-line to paste buffer */ void *MoveRatToBuffer(pcb_opctx_t *ctx, pcb_rat_t * rat) { - r_delete_entry(ctx->buffer.src->rat_tree, (pcb_box_t *) rat); + pcb_r_delete_entry(ctx->buffer.src->rat_tree, (pcb_box_t *) rat); ratlist_remove(rat); ratlist_append(&ctx->buffer.dst->Rat, rat); @@ -142,8 +142,8 @@ PCB_FLAG_CLEAR(PCB_FLAG_FOUND, rat); if (!ctx->buffer.dst->rat_tree) - ctx->buffer.dst->rat_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(ctx->buffer.dst->rat_tree, (pcb_box_t *) rat, 0); + ctx->buffer.dst->rat_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(ctx->buffer.dst->rat_tree, (pcb_box_t *) rat, 0); return rat; } @@ -200,7 +200,7 @@ void *DestroyRat(pcb_opctx_t *ctx, pcb_rat_t *Rat) { if (ctx->remove.destroy_target->rat_tree) - r_delete_entry(ctx->remove.destroy_target->rat_tree, &Rat->BoundingBox); + pcb_r_delete_entry(ctx->remove.destroy_target->rat_tree, &Rat->BoundingBox); pcb_rat_free(Rat); return NULL; Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 5004) +++ trunk/src/obj_text.c (revision 5005) @@ -99,8 +99,8 @@ pcb_text_bbox(PCBFont, text); text->ID = CreateIDGet(); if (!Layer->text_tree) - Layer->text_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->text_tree, (pcb_box_t *) text, 0); + Layer->text_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->text_tree, (pcb_box_t *) text, 0); } /* creates the bounding box of a text object */ @@ -229,7 +229,7 @@ { pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; - r_delete_entry(layer->text_tree, (pcb_box_t *) text); + pcb_r_delete_entry(layer->text_tree, (pcb_box_t *) text); pcb_poly_restore_to_poly(ctx->buffer.src, PCB_TYPE_TEXT, layer, text); textlist_remove(text); @@ -236,8 +236,8 @@ textlist_append(&lay->Text, text); if (!lay->text_tree) - lay->text_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->text_tree, (pcb_box_t *) text, 0); + lay->text_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(lay->text_tree, (pcb_box_t *) text, 0); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_TYPE_TEXT, lay, text); return (text); } @@ -253,11 +253,11 @@ if (value <= MAX_TEXTSCALE && value >= MIN_TEXTSCALE && value != Text->Scale) { AddObjectToSizeUndoList(PCB_TYPE_TEXT, Layer, Text, Text); EraseText(Layer, Text); - r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); Text->Scale = value; pcb_text_bbox(&PCB->Font, Text); - r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); + pcb_r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); DrawText(Layer, Text); return (Text); @@ -274,13 +274,13 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Text)) return (NULL); EraseText(Layer, Text); - r_delete_entry(Layer->text_tree, (pcb_box_t *)Text); + pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *)Text); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); Text->TextString = ctx->chgname.new_name; /* calculate size of the bounding box */ pcb_text_bbox(&PCB->Font, Text); - r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); + pcb_r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); DrawText(Layer, Text); return (old); @@ -338,7 +338,7 @@ void *MoveText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); - r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); if (Layer->On) { EraseText(Layer, Text); pcb_text_move(Text, ctx->move.dx, ctx->move.dy); @@ -347,7 +347,7 @@ } else pcb_text_move(Text, ctx->move.dx, ctx->move.dy); - r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); + pcb_r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); return (Text); } @@ -356,7 +356,7 @@ void *MoveTextToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_text_t * text, pcb_layer_t * Destination) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Source, text); - r_delete_entry(Source->text_tree, (pcb_box_t *) text); + pcb_r_delete_entry(Source->text_tree, (pcb_box_t *) text); textlist_remove(text); textlist_append(&Destination->Text, text); @@ -369,8 +369,8 @@ /* re-calculate the bounding box (it could be mirrored now) */ pcb_text_bbox(&PCB->Font, text); if (!Destination->text_tree) - Destination->text_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->text_tree, (pcb_box_t *) text, 0); + Destination->text_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Destination->text_tree, (pcb_box_t *) text, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_TEXT, Destination, text); return text; @@ -400,7 +400,7 @@ void *DestroyText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { free(Text->TextString); - r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); pcb_text_free(Text); @@ -413,7 +413,7 @@ /* erase from screen */ if (Layer->On) { EraseText(Layer, Text); - r_delete_entry(Layer->text_tree, (pcb_box_t *)Text); + pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *)Text); if (!ctx->remove.bulk) pcb_draw(); } @@ -454,9 +454,9 @@ { EraseText(Layer, Text); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); - r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); pcb_text_rotate90(Text, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); - r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); + pcb_r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); DrawText(Layer, Text); pcb_draw(); Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 5004) +++ trunk/src/polygon.c (revision 5005) @@ -1025,23 +1025,23 @@ info.accumulate = NULL; info.batch_size = 0; if (info.solder || group == Group(Data, component_silk_layer)) { - r_search(Data->pad_tree, ®ion, NULL, pad_sub_callback, &info, &seen); + pcb_r_search(Data->pad_tree, ®ion, NULL, pad_sub_callback, &info, &seen); r += seen; } GROUP_LOOP(Data, group); { - r_search(layer->line_tree, ®ion, NULL, line_sub_callback, &info, &seen); + pcb_r_search(layer->line_tree, ®ion, NULL, line_sub_callback, &info, &seen); r += seen; subtract_accumulated(&info, polygon); - r_search(layer->arc_tree, ®ion, NULL, arc_sub_callback, &info, &seen); + pcb_r_search(layer->arc_tree, ®ion, NULL, arc_sub_callback, &info, &seen); r += seen; - r_search(layer->text_tree, ®ion, NULL, text_sub_callback, &info, &seen); + pcb_r_search(layer->text_tree, ®ion, NULL, text_sub_callback, &info, &seen); r += seen; } END_LOOP; - r_search(Data->via_tree, ®ion, NULL, pin_sub_callback, &info, &seen); + pcb_r_search(Data->via_tree, ®ion, NULL, pin_sub_callback, &info, &seen); r += seen; - r_search(Data->pin_tree, ®ion, NULL, pin_sub_callback, &info, &seen); + pcb_r_search(Data->pin_tree, ®ion, NULL, pin_sub_callback, &info, &seen); r += seen; subtract_accumulated(&info, polygon); } @@ -1346,8 +1346,8 @@ memset(&Crosshair.AttachedPolygon, 0, sizeof(pcb_polygon_t)); pcb_poly_bbox(polygon); if (!CURRENT->polygon_tree) - CURRENT->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(CURRENT->polygon_tree, (pcb_box_t *) polygon, 0); + CURRENT->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(CURRENT->polygon_tree, (pcb_box_t *) polygon, 0); pcb_poly_init_clip(PCB->Data, CURRENT, polygon); DrawPolygon(CURRENT, polygon); SetChangedFlag(pcb_true); @@ -1476,7 +1476,7 @@ LAYER_LOOP(Data, max_copper_layer); { info.layer = layer; - r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); + pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } END_LOOP; @@ -1485,7 +1485,7 @@ GROUP_LOOP(Data, GetLayerGroupNumberByNumber(GetLayerNumber(Data, ((pcb_layer_t *) ptr1)))); { info.layer = layer; - r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); + pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } END_LOOP; @@ -1503,7 +1503,7 @@ GROUP_LOOP(Data, GetLayerGroupNumberByNumber(GetLayerNumber(Data, ((pcb_layer_t *) ptr1)))); { info.layer = layer; - r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); + pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } END_LOOP; @@ -1515,7 +1515,7 @@ GROUP_LOOP(Data, group); { info.layer = layer; - r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); + pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } END_LOOP; @@ -1733,7 +1733,7 @@ newone->Clipped = p; p = p->f; /* go to next pline */ newone->Clipped->b = newone->Clipped->f = newone->Clipped; /* unlink from others */ - r_insert_entry(layer->polygon_tree, (pcb_box_t *) newone, 0); + pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) newone, 0); DrawPolygon(layer, newone); } else { @@ -1833,8 +1833,8 @@ pcb_poly_init_clip(Destination, Layer, Polygon); pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) - Layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + Layer->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); DrawPolygon(Layer, Polygon); /* add to undo list */ Index: trunk/src/polygon1.c =================================================================== --- trunk/src/polygon1.c (revision 5004) +++ trunk/src/polygon1.c (revision 5005) @@ -514,7 +514,7 @@ q->box.X2 = max(q->v->point[0], q->v->next->point[0]) + 1; q->box.Y1 = min(q->v->point[1], q->v->next->point[1]); q->box.Y2 = max(q->v->point[1], q->v->next->point[1]) + 1; - r_insert_entry(tree, (const pcb_box_t *) q, 1); + pcb_r_insert_entry(tree, (const pcb_box_t *) q, 1); q = (seg *) malloc(sizeof(struct seg)); if (!q) return 1; @@ -525,8 +525,8 @@ q->box.X2 = max(q->v->point[0], q->v->next->point[0]) + 1; q->box.Y1 = min(q->v->point[1], q->v->next->point[1]); q->box.Y2 = max(q->v->point[1], q->v->next->point[1]) + 1; - r_insert_entry(tree, (const pcb_box_t *) q, 1); - r_delete_entry(tree, (const pcb_box_t *) s); + pcb_r_insert_entry(tree, (const pcb_box_t *) q, 1); + pcb_r_delete_entry(tree, (const pcb_box_t *) s); return 0; } @@ -627,7 +627,7 @@ { struct seg *s; pcb_vnode_t *bv; - pcb_rtree_t *ans = r_create_tree(NULL, 0, 0); + pcb_rtree_t *ans = pcb_r_create_tree(NULL, 0, 0); bv = &pb->head; do { s = (seg *) malloc(sizeof(struct seg)); @@ -650,7 +650,7 @@ } s->v = bv; s->p = pb; - r_insert_entry(ans, (const pcb_box_t *) s, 1); + pcb_r_insert_entry(ans, (const pcb_box_t *) s, 1); } while ((bv = bv->next) != &pb->head); return (void *) ans; @@ -734,7 +734,7 @@ box.Y2 = (box.Y1 = av->point[1]) + 1; /* fill in the segment in info corresponding to this node */ - rres = r_search(looping_over->tree, &box, NULL, get_seg, &info, NULL); + rres = pcb_r_search(looping_over->tree, &box, NULL, get_seg, &info, NULL); assert(rres == R_DIR_CANCEL); /* If we're going to have another pass anyway, skip this */ @@ -748,7 +748,7 @@ info.tree = rtree_over->tree; if (info.tree) { int seen; - r_search(info.tree, &info.s->box, seg_in_region, seg_in_seg, &info, &seen); + pcb_r_search(info.tree, &info.s->box, seg_in_region, seg_in_seg, &info, &seen); if (UNLIKELY(seen)) assert(0); /* XXX: Memory allocation failure */ } @@ -803,7 +803,7 @@ sb.X2 = pa->xmax + 1; sb.Y2 = pa->ymax + 1; - r_search(b->contour_tree, &sb, NULL, contour_bounds_touch, &c_info, NULL); + pcb_r_search(b->contour_tree, &sb, NULL, contour_bounds_touch, &c_info, NULL); if (c_info.need_restart) need_restart = 1; } @@ -924,7 +924,7 @@ break; outer = (pcb_polyarea_t *) pcb_heap_remove_smallest(heap); - r_search(outer->contour_tree, (pcb_box_t *) poly, NULL, count_contours_i_am_inside, poly, &cnt); + pcb_r_search(outer->contour_tree, (pcb_box_t *) poly, NULL, count_contours_i_am_inside, poly, &cnt); switch (cnt) { case 0: /* Didn't find anything in this piece, Keep looking */ break; @@ -1083,8 +1083,8 @@ newp->f->b = newp->b->f = newp; } newp->contours = c; - newp->contour_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(newp->contour_tree, (pcb_box_t *) c, 0); + newp->contour_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(newp->contour_tree, (pcb_box_t *) c, 0); c->next = NULL; } /* InsCntr */ @@ -1098,7 +1098,7 @@ if (cntr->Flags.orient == PLF_DIR) { if (owner != NULL) - r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); + pcb_r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); InsCntr(e, cntr, contours); } /* put hole into temporary list */ @@ -1109,8 +1109,8 @@ parent_contour->next = cntr; if (owner != parent) { if (owner != NULL) - r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); - r_insert_entry(parent->contour_tree, (pcb_box_t *) cntr, 0); + pcb_r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); + pcb_r_insert_entry(parent->contour_tree, (pcb_box_t *) cntr, 0); } } else { @@ -1119,7 +1119,7 @@ /* We don't insert the holes into an r-tree, * they just form a linked list */ if (owner != NULL) - r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); + pcb_r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); } } } /* PutContour */ @@ -1136,7 +1136,7 @@ contour->next = NULL; if (remove_rtree_entry) - r_delete_entry(piece->contour_tree, (pcb_box_t *) contour); + pcb_r_delete_entry(piece->contour_tree, (pcb_box_t *) contour); } struct polyarea_info { @@ -1202,7 +1202,7 @@ /* make a polyarea info table */ /* make an rtree of polyarea info table */ all_pa_info = (struct polyarea_info *) malloc(sizeof(struct polyarea_info) * num_polyareas); - tree = r_create_tree(NULL, 0, 0); + tree = pcb_r_create_tree(NULL, 0, 0); i = 0; curc = dest; do { @@ -1211,7 +1211,7 @@ all_pa_info[i].BoundingBox.X2 = curc->contours->xmax; all_pa_info[i].BoundingBox.Y2 = curc->contours->ymax; all_pa_info[i].pa = curc; - r_insert_entry(tree, (const pcb_box_t *) &all_pa_info[i], 0); + pcb_r_insert_entry(tree, (const pcb_box_t *) &all_pa_info[i], 0); i++; } while ((curc = curc->f) != dest); @@ -1223,7 +1223,7 @@ container = NULL; /* build a heap of all of the polys that the hole is inside its bounding box */ heap = pcb_heap_create(); - r_search(tree, (pcb_box_t *) curh, NULL, heap_it, heap, NULL); + pcb_r_search(tree, (pcb_box_t *) curh, NULL, heap_it, heap, NULL); if (pcb_heap_is_empty(heap)) { #ifndef NDEBUG #ifdef DEBUG @@ -1282,7 +1282,7 @@ info.result = NULL; /* Rtree search, calling back a routine to longjmp back with data about any hole inside the added one */ /* Be sure not to bother jumping back to report the main contour! */ - r_search(pa_info->pa->contour_tree, (pcb_box_t *) curh, NULL, find_inside, &info, NULL); + pcb_r_search(pa_info->pa->contour_tree, (pcb_box_t *) curh, NULL, find_inside, &info, NULL); /* Nothing found? */ break; @@ -1306,11 +1306,11 @@ /* link at front of hole list */ curh->next = container->next; container->next = curh; - r_insert_entry(pa_info->pa->contour_tree, (pcb_box_t *) curh, 0); + pcb_r_insert_entry(pa_info->pa->contour_tree, (pcb_box_t *) curh, 0); } } - r_destroy_tree(&tree); + pcb_r_destroy_tree(&tree); free(all_pa_info); } /* InsertHoles */ @@ -1873,7 +1873,7 @@ * data about any hole inside the B polygon. * NB: Does not jump back to report the main contour! */ - r_search(a->contour_tree, &box, NULL, find_inside_m_pa, &info, NULL); + pcb_r_search(a->contour_tree, &box, NULL, find_inside_m_pa, &info, NULL); /* Nothing found? */ break; @@ -2310,7 +2310,7 @@ /* FIXME -- strict aliasing violation. */ if ((*c)->tree) { pcb_rtree_t *r = (*c)->tree; - r_destroy_tree(&r); + pcb_r_destroy_tree(&r); } free(*c), *c = NULL; } @@ -2384,7 +2384,7 @@ while ((cur = next) != &c->head); c->Flags.orient ^= 1; if (c->tree) { - r_search(c->tree, NULL, NULL, flip_cb, NULL, &r); + pcb_r_search(c->tree, NULL, NULL, flip_cb, NULL, &r); assert(r == c->Count); } } @@ -2460,7 +2460,7 @@ *dst = (pcb_polyarea_t *) calloc(1, sizeof(pcb_polyarea_t)); if (*dst == NULL) return pcb_false; - (*dst)->contour_tree = r_create_tree(NULL, 0, 0); + (*dst)->contour_tree = pcb_r_create_tree(NULL, 0, 0); return pcb_polyarea_copy1(*dst, src); } @@ -2475,7 +2475,7 @@ for (cur = src->contours; cur != NULL; cur = cur->next) { if (!pcb_poly_contour_copy(last, cur)) return pcb_false; - r_insert_entry(dst->contour_tree, (pcb_box_t *) * last, 0); + pcb_r_insert_entry(dst->contour_tree, (pcb_box_t *) * last, 0); last = &(*last)->next; } return pcb_true; @@ -2528,7 +2528,7 @@ p->contours->next = c; c->next = tmp; } - r_insert_entry(p->contour_tree, (pcb_box_t *) c, 0); + pcb_r_insert_entry(p->contour_tree, (pcb_box_t *) c, 0); return pcb_true; } @@ -2590,7 +2590,7 @@ ray.X2 = 0x7fffffff; ray.Y2 = p[1] + 1; if (setjmp(info.env) == 0) - r_search(c->tree, &ray, NULL, crossing, &info, NULL); + pcb_r_search(c->tree, &ray, NULL, crossing, &info, NULL); return info.f; } @@ -2781,7 +2781,7 @@ { p->f = p->b = p; p->contours = NULL; - p->contour_tree = r_create_tree(NULL, 0, 0); + p->contour_tree = pcb_r_create_tree(NULL, 0, 0); } pcb_polyarea_t *pcb_polyarea_create(void) @@ -2811,13 +2811,13 @@ return; for (cur = (*p)->f; cur != *p; cur = (*p)->f) { pcb_poly_contours_free(&cur->contours); - r_destroy_tree(&cur->contour_tree); + pcb_r_destroy_tree(&cur->contour_tree); cur->f->b = cur->b; cur->b->f = cur->f; free(cur); } pcb_poly_contours_free(&cur->contours); - r_destroy_tree(&cur->contour_tree); + pcb_r_destroy_tree(&cur->contour_tree); free(*p), *p = NULL; } Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 5004) +++ trunk/src/rotate.c (revision 5005) @@ -101,19 +101,19 @@ EraseLine(ptr->Line); if (ptr->Layer) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, ptr->Layer, ptr->Line); - r_delete_entry(ptr->Layer->line_tree, (pcb_box_t *) ptr->Line); + pcb_r_delete_entry(ptr->Layer->line_tree, (pcb_box_t *) ptr->Line); } else - r_delete_entry(PCB->Data->rat_tree, (pcb_box_t *) ptr->Line); + pcb_r_delete_entry(PCB->Data->rat_tree, (pcb_box_t *) ptr->Line); pcb_point_rotate90(ptr->MovedPoint, ctx.rotate.center_x, ctx.rotate.center_y, Steps); pcb_line_bbox(ptr->Line); if (ptr->Layer) { - r_insert_entry(ptr->Layer->line_tree, (pcb_box_t *) ptr->Line, 0); + pcb_r_insert_entry(ptr->Layer->line_tree, (pcb_box_t *) ptr->Line, 0); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, ptr->Layer, ptr->Line); DrawLine(ptr->Layer, ptr->Line); } else { - r_insert_entry(PCB->Data->rat_tree, (pcb_box_t *) ptr->Line, 0); + pcb_r_insert_entry(PCB->Data->rat_tree, (pcb_box_t *) ptr->Line, 0); DrawRat((pcb_rat_t *) ptr->Line); } Crosshair.AttachedObject.RubberbandN--; Index: trunk/src/rtree.c =================================================================== --- trunk/src/rtree.c (revision 5004) +++ trunk/src/rtree.c (revision 5005) @@ -193,7 +193,7 @@ #ifndef NDEBUG /* print out the tree */ -void __r_dump_tree(struct rtree_node *node, int depth) +void pcb_r_dump_tree(struct rtree_node *node, int depth) { int i, j; static int count; @@ -230,7 +230,7 @@ } for (i = 0; i < M_SIZE; i++) if (node->u.kids[i]) - __r_dump_tree(node->u.kids[i], depth + 1); + pcb_r_dump_tree(node->u.kids[i], depth + 1); if (depth == 0) printf("average box area is %g\n", area / count); } @@ -341,7 +341,7 @@ * it, so don't free the box list until you've called r_destroy_tree. * if you set 'manage' to pcb_true, r_destroy_tree will free your boxlist. */ -pcb_rtree_t *r_create_tree(const pcb_box_t * boxlist[], int N, int manage) +pcb_rtree_t *pcb_r_create_tree(const pcb_box_t * boxlist[], int N, int manage) { pcb_rtree_t *rtree; struct rtree_node *node; @@ -357,7 +357,7 @@ /* simple, just insert all of the boxes! */ for (i = 0; i < N; i++) { assert(boxlist[i]); - r_insert_entry(rtree, boxlist[i], manage); + pcb_r_insert_entry(rtree, boxlist[i], manage); } #ifdef SLOW_ASSERTS assert(__r_tree_is_good(rtree->root)); @@ -387,7 +387,7 @@ } /* free the memory associated with an rtree. */ -void r_destroy_tree(pcb_rtree_t ** rtree) +void pcb_r_destroy_tree(pcb_rtree_t ** rtree) { __r_destroy_tree((*rtree)->root); @@ -498,7 +498,7 @@ * Returns how the search ended. */ pcb_r_dir_t -r_search(pcb_rtree_t * rtree, const pcb_box_t * query, +pcb_r_search(pcb_rtree_t * rtree, const pcb_box_t * query, pcb_r_dir_t (*check_region) (const pcb_box_t * region, void *cl), pcb_r_dir_t (*found_rectangle) (const pcb_box_t * box, void *cl), void *cl, int *num_found) @@ -553,7 +553,7 @@ } /* return 0 if there are any rectangles in the given region. */ -int r_region_is_empty(pcb_rtree_t * rtree, const pcb_box_t * region) +int pcb_r_region_is_empty(pcb_rtree_t * rtree, const pcb_box_t * region) { jmp_buf env; int r; @@ -560,7 +560,7 @@ if (setjmp(env)) return 0; - r_search(rtree, region, NULL, __r_region_is_empty_rect_in_reg, &env, &r); + pcb_r_search(rtree, region, NULL, __r_region_is_empty_rect_in_reg, &env, &r); assert(r == 0); /* otherwise longjmp would have been called */ return 1; /* no rectangles found */ } @@ -885,7 +885,7 @@ } } -void r_insert_entry(pcb_rtree_t * rtree, const pcb_box_t * which, int man) +void pcb_r_insert_entry(pcb_rtree_t * rtree, const pcb_box_t * which, int man) { assert(which); assert(which->X1 <= which->X2); @@ -989,7 +989,7 @@ return pcb_true; } -pcb_bool r_delete_entry(pcb_rtree_t * rtree, const pcb_box_t * box) +pcb_bool pcb_r_delete_entry(pcb_rtree_t * rtree, const pcb_box_t * box) { pcb_bool r; Index: trunk/src/rtree.h =================================================================== --- trunk/src/rtree.h (revision 5004) +++ trunk/src/rtree.h (revision 5005) @@ -53,12 +53,12 @@ /* create an rtree from the list of boxes. if 'manage' is pcb_true, then * the tree will take ownership of 'boxlist' and free it when the tree * is destroyed. */ -pcb_rtree_t *r_create_tree(const pcb_box_t * boxlist[], int N, int manage); +pcb_rtree_t *pcb_r_create_tree(const pcb_box_t * boxlist[], int N, int manage); /* destroy an rtree */ -void r_destroy_tree(pcb_rtree_t ** rtree); +void pcb_r_destroy_tree(pcb_rtree_t ** rtree); -pcb_bool r_delete_entry(pcb_rtree_t * rtree, const pcb_box_t * which); -void r_insert_entry(pcb_rtree_t * rtree, const pcb_box_t * which, int manage); +pcb_bool pcb_r_delete_entry(pcb_rtree_t * rtree, const pcb_box_t * which); +void pcb_r_insert_entry(pcb_rtree_t * rtree, const pcb_box_t * which, int manage); /* generic search routine */ /* region_in_search should return pcb_true if "what you're looking for" is @@ -74,7 +74,7 @@ * abort the search if that is the desired behavior. */ -pcb_r_dir_t r_search(pcb_rtree_t * rtree, const pcb_box_t * starting_region, +pcb_r_dir_t pcb_r_search(pcb_rtree_t * rtree, const pcb_box_t * starting_region, pcb_r_dir_t (*region_in_search) (const pcb_box_t * region, void *cl), pcb_r_dir_t (*rectangle_in_region) (const pcb_box_t * box, void *cl), void *closure, int *num_found); @@ -81,8 +81,8 @@ /* -- special-purpose searches build upon r_search -- */ /* return 0 if there are any rectangles in the given region. */ -int r_region_is_empty(pcb_rtree_t * rtree, const pcb_box_t * region); +int pcb_r_region_is_empty(pcb_rtree_t * rtree, const pcb_box_t * region); -void __r_dump_tree(struct rtree_node *, int); +void pcb_r_dump_tree(struct rtree_node *, int); #endif Index: trunk/src/rubberband.c =================================================================== --- trunk/src/rubberband.c (revision 5004) +++ trunk/src/rubberband.c (revision 5005) @@ -196,7 +196,7 @@ /* check all visible lines of the group member */ info.layer = layer; if (info.layer->On) { - r_search(info.layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); + pcb_r_search(info.layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); } } END_LOOP; @@ -262,7 +262,7 @@ info.pad = Pad; info.type = PCB_TYPE_PAD; - r_search(PCB->Data->rat_tree, &Pad->BoundingBox, NULL, rat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, &Pad->BoundingBox, NULL, rat_callback, &info, NULL); } static void CheckPinForRat(pcb_pin_t *Pin) @@ -271,7 +271,7 @@ info.type = PCB_TYPE_PIN; info.pin = Pin; - r_search(PCB->Data->rat_tree, &Pin->BoundingBox, NULL, rat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, &Pin->BoundingBox, NULL, rat_callback, &info, NULL); } static void CheckLinePointForRat(pcb_layer_t *Layer, pcb_point_t *Point) @@ -281,7 +281,7 @@ info.point = Point; info.type = PCB_TYPE_LINE_POINT; - r_search(PCB->Data->rat_tree, (pcb_box_t *) Point, NULL, rat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, (pcb_box_t *) Point, NULL, rat_callback, &info, NULL); } /* --------------------------------------------------------------------------- @@ -313,7 +313,7 @@ for (n = 0; n < max_copper_layer; n++) { info.layer = LAYER_PTR(n); - r_search(info.layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); + pcb_r_search(info.layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); } } @@ -343,7 +343,7 @@ /* check all visible lines of the group member */ if (layer->On) { info.layer = layer; - r_search(layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); + pcb_r_search(layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); } } END_LOOP; Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 5004) +++ trunk/src/search.c (revision 5005) @@ -105,7 +105,7 @@ info.ptr3 = (void **) Dummy2; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(PCB->Data->via_tree, &SearchBox, NULL, pinorvia_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(PCB->Data->via_tree, &SearchBox, NULL, pinorvia_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; } @@ -126,7 +126,7 @@ info.ptr3 = (void **) Dummy; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(PCB->Data->pin_tree, &SearchBox, NULL, pinorvia_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(PCB->Data->pin_tree, &SearchBox, NULL, pinorvia_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; } @@ -166,7 +166,7 @@ info.ptr3 = (void **) Dummy; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; info.BackToo = (BackToo && PCB->InvisibleObjectsOn); - if (r_search(PCB->Data->pad_tree, &SearchBox, NULL, pad_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(PCB->Data->pad_tree, &SearchBox, NULL, pad_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; } @@ -208,7 +208,7 @@ info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; *Layer = SearchLayer; - if (r_search(SearchLayer->line_tree, &SearchBox, NULL, line_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(SearchLayer->line_tree, &SearchBox, NULL, line_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; @@ -243,7 +243,7 @@ info.ptr3 = (void **) Dummy2; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(PCB->Data->rat_tree, &SearchBox, NULL, rat_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(PCB->Data->rat_tree, &SearchBox, NULL, rat_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; } @@ -281,7 +281,7 @@ info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; *Layer = SearchLayer; - if (r_search(SearchLayer->arc_tree, &SearchBox, NULL, arc_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(SearchLayer->arc_tree, &SearchBox, NULL, arc_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; } @@ -313,7 +313,7 @@ info.ptr3 = (void **) Dummy; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(SearchLayer->text_tree, &SearchBox, NULL, text_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(SearchLayer->text_tree, &SearchBox, NULL, text_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; } @@ -346,7 +346,7 @@ info.ptr3 = (void **) Dummy; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(SearchLayer->polygon_tree, &SearchBox, NULL, polygon_callback, &info, NULL) != R_DIR_NOT_FOUND) + if (pcb_r_search(SearchLayer->polygon_tree, &SearchBox, NULL, polygon_callback, &info, NULL) != R_DIR_NOT_FOUND) return pcb_true; return pcb_false; } @@ -392,7 +392,7 @@ *Point = NULL; info.least = MAX_LINE_POINT_DISTANCE + SearchRadius; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(SearchLayer->line_tree, &SearchBox, NULL, linepoint_callback, &info, NULL)) + if (pcb_r_search(SearchLayer->line_tree, &SearchBox, NULL, linepoint_callback, &info, NULL)) return pcb_true; return pcb_false; } @@ -468,7 +468,7 @@ info.area = PCB_SQUARE(MAX_COORD); info.BackToo = (BackToo && PCB->InvisibleObjectsOn); info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(PCB->Data->name_tree[NAME_INDEX()], &SearchBox, NULL, name_callback, &info, NULL)) + if (pcb_r_search(PCB->Data->name_tree[NAME_INDEX()], &SearchBox, NULL, name_callback, &info, NULL)) return pcb_true; } return (pcb_false); @@ -513,7 +513,7 @@ info.area = PCB_SQUARE(MAX_COORD); info.BackToo = (BackToo && PCB->InvisibleObjectsOn); info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; - if (r_search(PCB->Data->element_tree, &SearchBox, NULL, element_callback, &info, NULL)) + if (pcb_r_search(PCB->Data->element_tree, &SearchBox, NULL, element_callback, &info, NULL)) return pcb_true; } return pcb_false; Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 5004) +++ trunk/src/undo.c (revision 5005) @@ -369,7 +369,7 @@ if (type == PCB_TYPE_ARC) { pcb_layer_t *Layer = (pcb_layer_t *) ptr1; pcb_arc_t *a = (pcb_arc_t *) ptr2; - r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); old_sa = a->StartAngle; old_da = a->Delta; if (andDraw) @@ -377,7 +377,7 @@ a->StartAngle = Entry->Data.AngleChange.angle[0]; a->Delta = Entry->Data.AngleChange.angle[1]; pcb_arc_bbox(a); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); Entry->Data.AngleChange.angle[0] = old_sa; Entry->Data.AngleChange.angle[1] = old_da; pcb_draw_obj(type, ptr1, a); @@ -400,7 +400,7 @@ if (type == PCB_TYPE_ARC) { pcb_layer_t *Layer = (pcb_layer_t *) ptr1; pcb_arc_t *a = (pcb_arc_t *) ptr2; - r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); old_w = a->Width; old_h = a->Height; if (andDraw) @@ -408,7 +408,7 @@ a->Width = Entry->Data.Move.DX; a->Height = Entry->Data.Move.DY; pcb_arc_bbox(a); - r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); Entry->Data.Move.DX = old_w; Entry->Data.Move.DY = old_h; pcb_draw_obj(type, ptr1, a); Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 5004) +++ trunk/src_plugins/autocrop/autocrop.c (revision 5005) @@ -65,11 +65,11 @@ { if (Data) { pcb_poly_restore_to_poly(Data, PCB_TYPE_VIA, Via, Via); - r_delete_entry(Data->via_tree, (pcb_box_t *) Via); + pcb_r_delete_entry(Data->via_tree, (pcb_box_t *) Via); } pcb_via_move(Via, dx, dy); if (Data) { - r_insert_entry(Data->via_tree, (pcb_box_t *) Via, 0); + pcb_r_insert_entry(Data->via_tree, (pcb_box_t *) Via, 0); pcb_poly_clear_from_poly(Data, PCB_TYPE_VIA, Via, Via); } return Via; @@ -79,11 +79,11 @@ { if (Data) { pcb_poly_restore_to_poly(Data, PCB_TYPE_LINE, Layer, Line); - r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); } pcb_line_move(Line, dx, dy); if (Data) { - r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); + pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); pcb_poly_clear_from_poly(Data, PCB_TYPE_LINE, Layer, Line); } return Line; @@ -93,11 +93,11 @@ { if (Data) { pcb_poly_restore_to_poly(Data, PCB_TYPE_ARC, Layer, Arc); - r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); } pcb_arc_move(Arc, dx, dy); if (Data) { - r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); pcb_poly_clear_from_poly(Data, PCB_TYPE_ARC, Layer, Arc); } return Arc; @@ -106,12 +106,12 @@ static void *Mypcb_poly_move(pcb_data_t * Data, pcb_layer_t * Layer, pcb_polygon_t * Polygon, pcb_coord_t dx, pcb_coord_t dy) { if (Data) { - r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); } /* move.c actually only moves points, note no Data/Layer args */ pcb_poly_move(Polygon, dx, dy); if (Data) { - r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); pcb_poly_init_clip(Data, Layer, Polygon); } return Polygon; @@ -120,10 +120,10 @@ static void *MyMoveTextLowLevel(pcb_layer_t * Layer, pcb_text_t * Text, pcb_coord_t dx, pcb_coord_t dy) { if (Layer) - r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); pcb_text_move(Text, dx, dy); if (Layer) - r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); + pcb_r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); return Text; } Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 5004) +++ trunk/src_plugins/autoplace/autoplace.c (revision 5005) @@ -279,7 +279,7 @@ ni.trap.Y2 = ni.trap.Y1; ni.trap.Y1 = bbox.Y1; /* do the search! */ - r_search(rtree, NULL, __r_find_neighbor_reg_in_sea, __r_find_neighbor_rect_in_reg, &ni, NULL); + pcb_r_search(rtree, NULL, __r_find_neighbor_reg_in_sea, __r_find_neighbor_rect_in_reg, &ni, NULL); return ni.neighbor; } @@ -480,8 +480,8 @@ (*boxpp)->element = element; } END_LOOP; - rt_s = r_create_tree((const pcb_box_t **) seboxes.Ptr, seboxes.PtrN, 1); - rt_c = r_create_tree((const pcb_box_t **) ceboxes.Ptr, ceboxes.PtrN, 1); + rt_s = pcb_r_create_tree((const pcb_box_t **) seboxes.Ptr, seboxes.PtrN, 1); + rt_c = pcb_r_create_tree((const pcb_box_t **) ceboxes.Ptr, ceboxes.PtrN, 1); FreePointerListMemory(&seboxes); FreePointerListMemory(&ceboxes); /* now, for each element, find its neighbor on all four sides */ @@ -513,8 +513,8 @@ } END_LOOP; /* free k-d tree memory */ - r_destroy_tree(&rt_s); - r_destroy_tree(&rt_c); + pcb_r_destroy_tree(&rt_s); + pcb_r_destroy_tree(&rt_c); } /* penalize total area used by this layout */ { Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 5004) +++ trunk/src_plugins/autoroute/autoroute.c (revision 5005) @@ -802,7 +802,7 @@ info.winner = NULL; info.query = pcb_point_box(X, Y); if (setjmp(info.env) == 0) - r_search(rd->layergrouptree[layergroup], &info.query, NULL, __found_one_on_lg, &info, NULL); + pcb_r_search(rd->layergrouptree[layergroup], &info.query, NULL, __found_one_on_lg, &info, NULL); return info.winner; } @@ -1128,7 +1128,7 @@ /* create r-trees from pointer lists */ for (i = 0; i < max_group; i++) { /* create the r-tree */ - rd->layergrouptree[i] = r_create_tree((const pcb_box_t **) layergroupboxes[i].Ptr, layergroupboxes[i].PtrN, 1); + rd->layergrouptree[i] = pcb_r_create_tree((const pcb_box_t **) layergroupboxes[i].Ptr, layergroupboxes[i].PtrN, 1); } if (AutoRouteParameters.use_vias) { @@ -1157,7 +1157,7 @@ { int i; for (i = 0; i < max_group; i++) - r_destroy_tree(&(*rd)->layergrouptree[i]); + pcb_r_destroy_tree(&(*rd)->layergrouptree[i]); if (AutoRouteParameters.use_vias) mtspace_destroy(&(*rd)->mtspace); /* free((*rd)->layergrouptree);*/ @@ -1517,7 +1517,7 @@ mtc.nearest_cost = pcb_cost_to_routebox(mtc.CostPoint, mtc.CostPointLayer, mtc.nearest); else mtc.nearest_cost = EXPENSIVE; - r_search(targets, NULL, __region_within_guess, __found_new_guess, &mtc, NULL); + pcb_r_search(targets, NULL, __region_within_guess, __found_new_guess, &mtc, NULL); assert(mtc.nearest != NULL && mtc.nearest_cost >= 0); assert(mtc.nearest->flags.target); /* this is a target, right? */ return mtc.nearest; @@ -2091,7 +2091,7 @@ } ans.keep = e->rb->style->Clearance; ans.parent = nonhomeless_parent(e->rb); - r_search(rtree, &ans.inflated, NULL, __Expand_this_rect, &ans, NULL); + pcb_r_search(rtree, &ans.inflated, NULL, __Expand_this_rect, &ans, NULL); /* because the overlaping boxes are found in random order, some blockers * may have limited edges prematurely, so we check if the blockers realy * are blocking, and make another try if not @@ -2113,7 +2113,7 @@ else ans.done |= _WEST; if (ans.done != _NORTH + _EAST + _SOUTH + _WEST) { - r_search(rtree, &ans.inflated, NULL, __Expand_this_rect, &ans, NULL); + pcb_r_search(rtree, &ans.inflated, NULL, __Expand_this_rect, &ans, NULL); } if ((noshrink & _NORTH) == 0) ans.inflated.Y1 += ans.bloat; @@ -2313,7 +2313,7 @@ if (!pcb_box_is_good(&b)) return; /* how did this happen ? */ nrb = CreateBridge(&b, rb, dir); - r_insert_entry(tree, &nrb->box, 1); + pcb_r_insert_entry(tree, &nrb->box, 1); vector_append(area_vec, nrb); nrb->flags.homeless = 0; /* not homeless any more */ /* mark this one as conflicted */ @@ -2368,7 +2368,7 @@ assert(pcb_box_intersect(&b, &blocker->sbox)); b = pcb_shrink_box(&b, 1); nrb = CreateBridge(&b, rb, dir); - r_insert_entry(tree, &nrb->box, 1); + pcb_r_insert_entry(tree, &nrb->box, 1); vector_append(area_vec, nrb); nrb->flags.homeless = 0; /* not homeless any more */ ne = CreateEdge(nrb, nrb->cost_point.X, nrb->cost_point.Y, nrb->cost, blocker, dir, NULL); @@ -2506,7 +2506,7 @@ bi.box.X1 = e->rb->sbox.X2; if (e->expand_dir == SW) bi.box.X2 = e->rb->sbox.X1; - r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); + pcb_r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); rb->n = tmp; break; case EAST: @@ -2518,7 +2518,7 @@ bi.box.Y1 = e->rb->sbox.Y2; if (e->expand_dir == NW) bi.box.Y2 = e->rb->sbox.Y1; - r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); + pcb_r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); rb->e = tmp; break; case SOUTH: @@ -2530,7 +2530,7 @@ bi.box.X1 = e->rb->sbox.X2; if (e->expand_dir == NW) bi.box.X2 = e->rb->sbox.X1; - r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); + pcb_r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); rb->s = tmp; break; case WEST: @@ -2542,7 +2542,7 @@ bi.box.Y1 = e->rb->sbox.Y2; if (e->expand_dir == NE) bi.box.Y2 = e->rb->sbox.Y1; - r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); + pcb_r_search(tree, &bi.box, NULL, __GatherBlockers, &bi, &tmp); rb->w = tmp; break; default: @@ -2751,7 +2751,7 @@ foib.intersect = NULL; if (setjmp(foib.env) == 0) - r_search(rtree, &r, NULL, foib_rect_in_reg, &foib, NULL); + pcb_r_search(rtree, &r, NULL, foib_rect_in_reg, &foib, NULL); return foib.intersect; } @@ -2818,7 +2818,7 @@ info.query = shrink_routebox(rb); if (setjmp(info.env) == 0) { - r_search(rtree, &info.query, NULL, ftherm_rect_in_reg, &info, NULL); + pcb_r_search(rtree, &info.query, NULL, ftherm_rect_in_reg, &info, NULL); return NULL; } return info.plane; @@ -2846,7 +2846,7 @@ MergeNets(rb, subnet, NET); MergeNets(rb, subnet, SUBNET); /* add it to the r-tree, this may be the whole route! */ - r_insert_entry(rd->layergrouptree[rb->group], &rb->box, 1); + pcb_r_insert_entry(rd->layergrouptree[rb->group], &rb->box, 1); rb->flags.homeless = 0; } @@ -2898,7 +2898,7 @@ MergeNets(rb, subnet, SUBNET); assert(__routepcb_box_is_good(rb)); /* and add it to the r-tree! */ - r_insert_entry(rd->layergrouptree[rb->group], &rb->box, 1); + pcb_r_insert_entry(rd->layergrouptree[rb->group], &rb->box, 1); rb->flags.homeless = 0; /* not homeless anymore */ rb->livedraw_obj.via = live_via; } @@ -2982,7 +2982,7 @@ MergeNets(rb, qsn, SUBNET); assert(__routepcb_box_is_good(rb)); /* and add it to the r-tree! */ - r_insert_entry(rd->layergrouptree[rb->group], &rb->box, 1); + pcb_r_insert_entry(rd->layergrouptree[rb->group], &rb->box, 1); if (conf_core.editor.live_routing) { pcb_layer_t *layer = LAYER_PTR(PCB->LayerGroups.Entries[rb->group][0]); @@ -3531,7 +3531,7 @@ { if (!AutoRouteParameters.with_conflicts) return; - r_search(tree, &rb->sbox, NULL, __conflict_source, rb, NULL); + pcb_r_search(tree, &rb->sbox, NULL, __conflict_source, rb, NULL); touch_conflicts(NULL, 1); } @@ -3636,7 +3636,7 @@ #endif } END_LOOP; - targets = r_create_tree((const pcb_box_t **) target_list, i, 0); + targets = pcb_r_create_tree((const pcb_box_t **) target_list, i, 0); assert(i <= num_targets); free(target_list); @@ -3791,10 +3791,10 @@ /* this via candidate is in an open area; add it to r-tree as * an expansion area */ assert(e->rb->type == EXPANSION_AREA && e->rb->flags.is_via); - /*assert (!r_search (rd->layergrouptree[e->rb->group], + /*assert (!pcb_r_search(rd->layergrouptree[e->rb->group], &e->rb->box, NULL, no_planes,0)); */ - r_insert_entry(rd->layergrouptree[e->rb->group], &e->rb->box, 1); + pcb_r_insert_entry(rd->layergrouptree[e->rb->group], &e->rb->box, 1); e->rb->flags.homeless = 0; /* not homeless any more */ /* add to vector of all expansion areas in r-tree */ vector_append(area_vec, e->rb); @@ -3931,7 +3931,7 @@ if (!pcb_box_is_good(&ans->inflated)) goto dontexpand; nrb = CreateExpansionArea(&ans->inflated, e->rb->group, e->rb, pcb_true, e); - r_insert_entry(rd->layergrouptree[nrb->group], &nrb->box, 1); + pcb_r_insert_entry(rd->layergrouptree[nrb->group], &nrb->box, 1); vector_append(area_vec, nrb); nrb->flags.homeless = 0; /* not homeless any more */ broken = BreakManyEdges(&s, targets, rd->layergrouptree[nrb->group], area_vec, ans, nrb, e); @@ -3951,7 +3951,7 @@ } touch_conflicts(NULL, 1); pcb_heap_destroy(&s.workheap); - r_destroy_tree(&targets); + pcb_r_destroy_tree(&targets); assert(vector_is_empty(edge_vec)); vector_destroy(&edge_vec); @@ -4004,7 +4004,7 @@ assert(!rb->flags.homeless); if (rb->conflicts_with && rb->parent.expansion_area->conflicts_with != rb->conflicts_with) vector_destroy(&rb->conflicts_with); - r_delete_entry(rd->layergrouptree[rb->group], &rb->box); + pcb_r_delete_entry(rd->layergrouptree[rb->group], &rb->box); } vector_destroy(&area_vec); /* clean up; remove all 'source', 'target', and 'nobloat' flags */ @@ -4069,7 +4069,7 @@ big.Y1 = 0; big.Y2 = MAX_COORD; for (i = 0; i < max_group; i++) { - if (r_search(rd->layergrouptree[i], &big, NULL, bad_boy, NULL, NULL)) + if (pcb_r_search(rd->layergrouptree[i], &big, NULL, bad_boy, NULL, NULL)) return pcb_false; } return pcb_true; @@ -4220,7 +4220,7 @@ #ifndef NDEBUG del = #endif - r_delete_entry(rd->layergrouptree[p->group], &p->box); + pcb_r_delete_entry(rd->layergrouptree[p->group], &p->box); #ifndef NDEBUG assert(del); #endif @@ -4410,13 +4410,13 @@ info.X = box->X1; info.Y = box->Y1; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, box, NULL, fpin_rect, &info, NULL); + pcb_r_search(PCB->Data->pin_tree, box, NULL, fpin_rect, &info, NULL); else { *pin = info.pin; return PCB_TYPE_PIN; } if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, box, NULL, fpin_rect, &info, NULL); + pcb_r_search(PCB->Data->via_tree, box, NULL, fpin_rect, &info, NULL); else { *pin = info.pin; return PCB_TYPE_VIA; @@ -4690,7 +4690,7 @@ int i; pcb_box_t big = { 0, 0, MAX_COORD, MAX_COORD }; for (i = 0; i < max_group; i++) { - r_search(rd->layergrouptree[i], &big, NULL, ripout_livedraw_obj_cb, NULL, NULL); + pcb_r_search(rd->layergrouptree[i], &big, NULL, ripout_livedraw_obj_cb, NULL, NULL); } } #ifdef ROUTE_DEBUG Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 5004) +++ trunk/src_plugins/autoroute/mtspace.c (revision 5005) @@ -100,9 +100,9 @@ /* create mtspace data structure */ mtspace = (mtspace_t *) malloc(sizeof(*mtspace)); - mtspace->ftree = r_create_tree(NULL, 0, 0); - mtspace->etree = r_create_tree(NULL, 0, 0); - mtspace->otree = r_create_tree(NULL, 0, 0); + mtspace->ftree = pcb_r_create_tree(NULL, 0, 0); + mtspace->etree = pcb_r_create_tree(NULL, 0, 0); + mtspace->otree = pcb_r_create_tree(NULL, 0, 0); /* done! */ return mtspace; } @@ -111,9 +111,9 @@ void mtspace_destroy(mtspace_t ** mtspacep) { assert(mtspacep); - r_destroy_tree(&(*mtspacep)->ftree); - r_destroy_tree(&(*mtspacep)->etree); - r_destroy_tree(&(*mtspacep)->otree); + pcb_r_destroy_tree(&(*mtspacep)->ftree); + pcb_r_destroy_tree(&(*mtspacep)->etree); + pcb_r_destroy_tree(&(*mtspacep)->otree); free(*mtspacep); *mtspacep = NULL; } @@ -134,7 +134,7 @@ /* the info box is pre-bloated, so just check equality */ if (b->X1 == info->box.X1 && b->X2 == info->box.X2 && b->Y1 == info->box.Y1 && b->Y2 == info->box.Y2 && box->clearance == info->clearance) { - r_delete_entry(info->tree, b); + pcb_r_delete_entry(info->tree, b); longjmp(info->env, 1); } return R_DIR_NOT_FOUND; @@ -156,7 +156,7 @@ void mtspace_add(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, pcb_coord_t clearance) { mtspacebox_t *filler = mtspace_create_box(box, clearance); - r_insert_entry(which_tree(mtspace, which), (const pcb_box_t *) filler, 1); + pcb_r_insert_entry(which_tree(mtspace, which), (const pcb_box_t *) filler, 1); } /* remove a space-filler from the empty space representation. */ @@ -170,7 +170,7 @@ cl.tree = which_tree(mtspace, which); small_search = pcb_box_center(box); if (setjmp(cl.env) == 0) { - r_search(cl.tree, &small_search, NULL, mts_remove_one, &cl, NULL); + pcb_r_search(cl.tree, &small_search, NULL, mts_remove_one, &cl, NULL); assert(0); /* didn't find it?? */ } } @@ -305,7 +305,7 @@ if (setjmp(qc->env) == 0) { assert(pcb_box_is_good(cbox)); qc->cbox = cbox; - r_search(tree, cbox, NULL, query_one, qc, &n); + pcb_r_search(tree, cbox, NULL, query_one, qc, &n); assert(n == 0); /* nothing intersected with this tree, put it in the result vector */ if (is_vec) Index: trunk/src_plugins/gl/hidgl.c =================================================================== --- trunk/src_plugins/gl/hidgl.c (revision 5004) +++ trunk/src_plugins/gl/hidgl.c (revision 5005) @@ -614,7 +614,7 @@ /* Drawing operations now set our reference bit in the stencil buffer */ - r_search(poly->Clipped->contour_tree, clip_box, NULL, do_hole, &info, NULL); + pcb_r_search(poly->Clipped->contour_tree, clip_box, NULL, do_hole, &info, NULL); hidgl_flush_triangles(&buffer); glPopAttrib(); /* Restore the colour and stencil buffer write-mask etc.. */ Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c (revision 5004) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c (revision 5005) @@ -67,33 +67,33 @@ s->layer = -1; if (obj_types & OM_LINE) { s->searching = OM_LINE; - r_search (CURRENT->line_tree, &spot, NULL, search_callback, s, NULL); + pcb_r_search(CURRENT->line_tree, &spot, NULL, search_callback, s, NULL); } if (obj_types & OM_TEXT) { s->searching = OM_TEXT; - r_search (CURRENT->text_tree, &spot, NULL, search_callback, s, NULL); + pcb_r_search(CURRENT->text_tree, &spot, NULL, search_callback, s, NULL); } if (obj_types & OM_ARC) { s->searching = OM_ARC; - r_search (CURRENT->arc_tree, &spot, NULL, search_callback, s, NULL); + pcb_r_search(CURRENT->arc_tree, &spot, NULL, search_callback, s, NULL); } if (obj_types & OM_VIA) { s->searching = OM_VIA; - r_search (PCB->Data->via_tree, &spot, NULL, search_callback, s, NULL); + pcb_r_search(PCB->Data->via_tree, &spot, NULL, search_callback, s, NULL); } if (obj_types & OM_PIN) { s->searching = OM_PIN; - r_search (PCB->Data->pin_tree, &spot, NULL, search_callback, s, NULL); + pcb_r_search(PCB->Data->pin_tree, &spot, NULL, search_callback, s, NULL); } if (obj_types & OM_POLYGON) { s->searching = OM_POLYGON; for (s->layer = 0; s->layer < MAX_LAYER + 2; s->layer++) - r_search (PCB->Data->Layer[s->layer].polygon_tree, &spot, NULL, search_callback, s, NULL); + pcb_r_search(PCB->Data->Layer[s->layer].polygon_tree, &spot, NULL, search_callback, s, NULL); s->layer = -1; } Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 5004) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 5005) @@ -2396,8 +2396,8 @@ { pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) - Layer->polygon_tree = r_create_tree (NULL, 0, 0); - r_insert_entry (Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + Layer->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); } } #line 2404 "parse_y.c" /* yacc.c:1646 */ Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 5004) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 5005) @@ -1174,8 +1174,8 @@ { pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) - Layer->polygon_tree = r_create_tree (NULL, 0, 0); - r_insert_entry (Layer->polygon_tree, (pcb_box_t *) Polygon, 0); + Layer->polygon_tree = pcb_r_create_tree(NULL, 0, 0); + pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); } } ; Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 5004) +++ trunk/src_plugins/jostle/jostle.c (revision 5005) @@ -528,7 +528,7 @@ pcb_fprintf(stderr, "search (%ms,%ms)->(%ms,%ms):\n", info.box.X1, info.box.Y1, info.box.X2, info.box.Y2); info.line = NULL; info.smallest = NULL; - r_search(info.layer->line_tree, &info.box, NULL, jostle_callback, &info, &found); + pcb_r_search(info.layer->line_tree, &info.box, NULL, jostle_callback, &info, &found); if (found) { expand = NULL; MakeBypassingLines(info.smallest, info.layer, info.line, info.side, &expand); Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 5004) +++ trunk/src_plugins/polystitch/polystitch.c (revision 5005) @@ -208,8 +208,8 @@ dup_endpoints(inner_poly); dup_endpoints(outer_poly); - r_delete_entry(poly_layer->polygon_tree, (pcb_box_t *) inner_poly); - r_delete_entry(poly_layer->polygon_tree, (pcb_box_t *) outer_poly); + pcb_r_delete_entry(poly_layer->polygon_tree, (pcb_box_t *) inner_poly); + pcb_r_delete_entry(poly_layer->polygon_tree, (pcb_box_t *) outer_poly); for (i = 0; i < inner_poly->PointN; i++) pcb_poly_point_new(outer_poly, inner_poly->Points[i].X, inner_poly->Points[i].Y); @@ -218,7 +218,7 @@ outer_poly->NoHolesValid = 0; pcb_poly_bbox(outer_poly); - r_insert_entry(poly_layer->polygon_tree, (pcb_box_t *) outer_poly, 0); + pcb_r_insert_entry(poly_layer->polygon_tree, (pcb_box_t *) outer_poly, 0); pcb_poly_remove_excess_points(poly_layer, outer_poly); pcb_poly_init_clip(PCB->Data, poly_layer, outer_poly); DrawPolygon(poly_layer, outer_poly); Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 5004) +++ trunk/src_plugins/puller/puller.c (revision 5005) @@ -352,8 +352,8 @@ spot.Y1 = y - 1; spot.X2 = x + 1; spot.Y2 = y + 1; - r_search(CURRENT->line_tree, &spot, NULL, line_callback, CURRENT, NULL); - r_search(CURRENT->arc_tree, &spot, NULL, arc_callback, CURRENT, NULL); + pcb_r_search(CURRENT->line_tree, &spot, NULL, line_callback, CURRENT, NULL); + pcb_r_search(CURRENT->arc_tree, &spot, NULL, arc_callback, CURRENT, NULL); if (the_line && the_arc && !multi) return 1; x = Px; @@ -726,8 +726,8 @@ b.X2 = x + 10; b.Y1 = y - 10; b.Y2 = y + 10; - r_search(CURRENT->line_tree, &b, NULL, find_pair_line_callback, &fpcs, NULL); - r_search(CURRENT->arc_tree, &b, NULL, find_pair_arc_callback, &fpcs, NULL); + pcb_r_search(CURRENT->line_tree, &b, NULL, find_pair_line_callback, &fpcs, NULL); + pcb_r_search(CURRENT->arc_tree, &b, NULL, find_pair_arc_callback, &fpcs, NULL); } static int check_point_in_pin(pcb_pin_t *pin, int x, int y, End * e) @@ -978,8 +978,8 @@ box.Y1 = pin->Y - pin->Thickness / 2; box.X2 = pin->X + pin->Thickness / 2; box.Y2 = pin->Y + pin->Thickness / 2; - r_search(CURRENT->line_tree, &box, NULL, find_pair_pinline_callback, pin, NULL); - r_search(CURRENT->arc_tree, &box, NULL, find_pair_pinarc_callback, pin, NULL); + pcb_r_search(CURRENT->line_tree, &box, NULL, find_pair_pinline_callback, pin, NULL); + pcb_r_search(CURRENT->arc_tree, &box, NULL, find_pair_pinarc_callback, pin, NULL); } ENDALL_LOOP; @@ -989,8 +989,8 @@ box.Y1 = via->Y - via->Thickness / 2; box.X2 = via->X + via->Thickness / 2; box.Y2 = via->Y + via->Thickness / 2; - r_search(CURRENT->line_tree, &box, NULL, find_pair_pinline_callback, via, NULL); - r_search(CURRENT->arc_tree, &box, NULL, find_pair_pinarc_callback, via, NULL); + pcb_r_search(CURRENT->line_tree, &box, NULL, find_pair_pinline_callback, via, NULL); + pcb_r_search(CURRENT->arc_tree, &box, NULL, find_pair_pinarc_callback, via, NULL); } END_LOOP; @@ -1000,8 +1000,8 @@ box.Y1 = MIN(pad->Point1.Y, pad->Point2.Y) - pad->Thickness / 2; box.X2 = MAX(pad->Point1.X, pad->Point2.X) + pad->Thickness / 2; box.Y2 = MAX(pad->Point1.Y, pad->Point2.Y) + pad->Thickness / 2; - r_search(CURRENT->line_tree, &box, NULL, find_pair_padline_callback, pad, NULL); - r_search(CURRENT->arc_tree, &box, NULL, find_pair_padarc_callback, pad, NULL); + pcb_r_search(CURRENT->line_tree, &box, NULL, find_pair_padline_callback, pad, NULL); + pcb_r_search(CURRENT->arc_tree, &box, NULL, find_pair_padarc_callback, pad, NULL); } ENDALL_LOOP; @@ -1927,13 +1927,13 @@ end_pinpad = start_extra->end.pin; fp = 0; - r_search(CURRENT->line_tree, &box, NULL, gp_line_cb, 0, NULL); - r_search(CURRENT->arc_tree, &box, NULL, gp_arc_cb, 0, NULL); - r_search(CURRENT->text_tree, &box, NULL, gp_text_cb, 0, NULL); - r_search(CURRENT->polygon_tree, &box, NULL, gp_poly_cb, 0, NULL); - r_search(PCB->Data->pin_tree, &box, NULL, gp_pin_cb, 0, NULL); - r_search(PCB->Data->via_tree, &box, NULL, gp_pin_cb, 0, NULL); - r_search(PCB->Data->pad_tree, &box, NULL, gp_pad_cb, 0, NULL); + pcb_r_search(CURRENT->line_tree, &box, NULL, gp_line_cb, 0, NULL); + pcb_r_search(CURRENT->arc_tree, &box, NULL, gp_arc_cb, 0, NULL); + pcb_r_search(CURRENT->text_tree, &box, NULL, gp_text_cb, 0, NULL); + pcb_r_search(CURRENT->polygon_tree, &box, NULL, gp_poly_cb, 0, NULL); + pcb_r_search(PCB->Data->pin_tree, &box, NULL, gp_pin_cb, 0, NULL); + pcb_r_search(PCB->Data->via_tree, &box, NULL, gp_pin_cb, 0, NULL); + pcb_r_search(PCB->Data->pad_tree, &box, NULL, gp_pad_cb, 0, NULL); /* radians, absolute angle of (at the moment) the start_line */ abs_angle = fa + start_angle; Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 5004) +++ trunk/src_plugins/report/report.c (revision 5005) @@ -138,7 +138,7 @@ pcb_pin_t *via; #ifndef NDEBUG if (gui->shift_is_pressed()) { - __r_dump_tree(PCB->Data->via_tree->root, 0); + pcb_r_dump_tree(PCB->Data->via_tree->root, 0); return 0; } #endif @@ -174,7 +174,7 @@ pcb_element_t *element; #ifndef NDEBUG if (gui->shift_is_pressed()) { - __r_dump_tree(PCB->Data->pin_tree->root, 0); + pcb_r_dump_tree(PCB->Data->pin_tree->root, 0); return 0; } #endif @@ -222,7 +222,7 @@ #ifndef NDEBUG if (gui->shift_is_pressed()) { pcb_layer_t *layer = (pcb_layer_t *) ptr1; - __r_dump_tree(layer->line_tree->root, 0); + pcb_r_dump_tree(layer->line_tree->root, 0); return 0; } #endif @@ -247,7 +247,7 @@ pcb_rat_t *line; #ifndef NDEBUG if (gui->shift_is_pressed()) { - __r_dump_tree(PCB->Data->rat_tree->root, 0); + pcb_r_dump_tree(PCB->Data->rat_tree->root, 0); return 0; } #endif @@ -269,7 +269,7 @@ #ifndef NDEBUG if (gui->shift_is_pressed()) { pcb_layer_t *layer = (pcb_layer_t *) ptr1; - __r_dump_tree(layer->arc_tree->root, 0); + pcb_r_dump_tree(layer->arc_tree->root, 0); return 0; } #endif @@ -301,7 +301,7 @@ #ifndef NDEBUG if (gui->shift_is_pressed()) { pcb_layer_t *layer = (pcb_layer_t *) ptr1; - __r_dump_tree(layer->polygon_tree->root, 0); + pcb_r_dump_tree(layer->polygon_tree->root, 0); return 0; } #endif @@ -328,7 +328,7 @@ pcb_element_t *element; #ifndef NDEBUG if (gui->shift_is_pressed()) { - __r_dump_tree(PCB->Data->pad_tree->root, 0); + pcb_r_dump_tree(PCB->Data->pad_tree->root, 0); return 0; } #endif @@ -374,7 +374,7 @@ pcb_element_t *element; #ifndef NDEBUG if (gui->shift_is_pressed()) { - __r_dump_tree(PCB->Data->element_tree->root, 0); + pcb_r_dump_tree(PCB->Data->element_tree->root, 0); return 0; } #endif @@ -406,7 +406,7 @@ #ifndef NDEBUG if (gui->shift_is_pressed()) { pcb_layer_t *layer = (pcb_layer_t *) ptr1; - __r_dump_tree(layer->text_tree->root, 0); + pcb_r_dump_tree(layer->text_tree->root, 0); return 0; } #endif @@ -416,7 +416,7 @@ pcb_text_t *text; #ifndef NDEBUG if (gui->shift_is_pressed()) { - __r_dump_tree(PCB->Data->name_tree[NAME_INDEX()]->root, 0); + pcb_r_dump_tree(PCB->Data->name_tree[NAME_INDEX()]->root, 0); return 0; } #endif Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 5004) +++ trunk/src_plugins/teardrops/teardrops.c (revision 5005) @@ -216,7 +216,7 @@ for (layer = 0; layer < max_copper_layer; layer++) { pcb_layer_t *l = &(PCB->Data->Layer[layer]); - r_search(l->line_tree, &spot, NULL, check_line_callback, l, NULL); + pcb_r_search(l->line_tree, &spot, NULL, check_line_callback, l, NULL); } } @@ -238,7 +238,7 @@ for (layer = 0; layer < max_copper_layer; layer++) { pcb_layer_t *l = &(PCB->Data->Layer[layer]); - r_search(l->line_tree, &spot, NULL, check_line_callback, l, NULL); + pcb_r_search(l->line_tree, &spot, NULL, check_line_callback, l, NULL); } } @@ -274,7 +274,7 @@ for (layer = 0; layer < max_copper_layer; layer++) { pcb_layer_t *l = &(PCB->Data->Layer[layer]); - r_search(l->line_tree, &(pad->BoundingBox), NULL, check_line_callback, l, NULL); + pcb_r_search(l->line_tree, &(pad->BoundingBox), NULL, check_line_callback, l, NULL); } }