Index: search.c =================================================================== --- search.c (revision 31800) +++ search.c (revision 31801) @@ -51,7 +51,7 @@ static double PosX, PosY; /* search position for subroutines */ static rnd_coord_t SearchRadius; -static rnd_rnd_box_t SearchBox; +static rnd_box_t SearchBox; static pcb_layer_t *SearchLayer; /* --------------------------------------------------------------------------- @@ -98,7 +98,7 @@ /* --------------------------------------------------------------------------- * searches a padstack */ -static rnd_r_dir_t padstack_callback(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t padstack_callback(const rnd_box_t *box, void *cl) { struct ans_info *i = (struct ans_info *) cl; pcb_pstk_t *ps = (pcb_pstk_t *) box; @@ -155,7 +155,7 @@ }; -static rnd_r_dir_t line_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t line_callback(const rnd_box_t * box, void *cl) { struct line_info *i = (struct line_info *) cl; pcb_line_t *l = (pcb_line_t *) box; @@ -187,7 +187,7 @@ return rnd_false; } -static rnd_r_dir_t rat_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t rat_callback(const rnd_box_t * box, void *cl) { pcb_line_t *line = (pcb_line_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -231,7 +231,7 @@ double least; }; -static rnd_r_dir_t arc_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t arc_callback(const rnd_box_t * box, void *cl) { struct arc_info *i = (struct arc_info *) cl; pcb_arc_t *a = (pcb_arc_t *) box; @@ -270,7 +270,7 @@ double least; }; -static rnd_r_dir_t gfx_callback(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t gfx_callback(const rnd_box_t *box, void *cl) { struct gfx_info *i = (struct gfx_info *)cl; pcb_gfx_t *g = (pcb_gfx_t *)box; @@ -299,7 +299,7 @@ return rnd_false; } -static rnd_r_dir_t text_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t text_callback(const rnd_box_t * box, void *cl) { pcb_text_t *text = (pcb_text_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -331,7 +331,7 @@ return rnd_false; } -static rnd_r_dir_t polygon_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t polygon_callback(const rnd_box_t * box, void *cl) { pcb_poly_t *polygon = (pcb_poly_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -367,7 +367,7 @@ return rnd_false; } -static rnd_r_dir_t linepoint_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t linepoint_callback(const rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct line_info *i = (struct line_info *) cl; @@ -395,9 +395,9 @@ return ret_val; } -static rnd_r_dir_t arcpoint_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t arcpoint_callback(const rnd_box_t * b, void *cl) { - rnd_rnd_box_t ab; + rnd_box_t ab; pcb_arc_t *arc = (pcb_arc_t *) b; struct arc_info *i = (struct arc_info *) cl; rnd_r_dir_t ret_val = RND_R_DIR_NOT_FOUND; @@ -479,7 +479,7 @@ rnd_point_t **Point; } ptcb_t; -static rnd_r_dir_t polypoint_callback(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t polypoint_callback(const rnd_box_t *box, void *cl) { pcb_poly_t *polygon = (pcb_poly_t *)box; ptcb_t *ctx = (ptcb_t *)cl; @@ -544,7 +544,7 @@ rnd_point_t **Point; } gfxptcb_t; -static rnd_r_dir_t gfxpoint_callback(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t gfxpoint_callback(const rnd_box_t *box, void *cl) { pcb_gfx_t *gfx = (pcb_gfx_t *)box; gfxptcb_t *ctx = (gfxptcb_t *)cl; @@ -595,7 +595,7 @@ } -static rnd_r_dir_t subc_callback(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t subc_callback(const rnd_box_t *box, void *cl) { pcb_subc_t *subc = (pcb_subc_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -924,7 +924,7 @@ { pcb_line_t line; rnd_coord_t x, y; - rnd_rnd_box_t box; + rnd_box_t box; /* check if any of arc endpoints is inside the rectangle */ box.X1 = X1; box.Y1 = Y1; @@ -974,7 +974,7 @@ /* --------------------------------------------------------------------------- * checks if an gfx crosses a rectangle (or gfx is within the rectangle) */ -rnd_bool pcb_is_gfx_in_rectangle(const rnd_rnd_box_t *b, const pcb_gfx_t *gfx) +rnd_bool pcb_is_gfx_in_rectangle(const rnd_box_t *b, const pcb_gfx_t *gfx) { pcb_line_t l; int n, m; @@ -1068,7 +1068,7 @@ return range < Radius; } -rnd_bool pcb_is_point_in_box(rnd_coord_t X, rnd_coord_t Y, rnd_rnd_box_t *box, rnd_coord_t Radius) +rnd_bool pcb_is_point_in_box(rnd_coord_t X, rnd_coord_t Y, rnd_box_t *box, rnd_coord_t Radius) { rnd_coord_t width, height, range; @@ -1109,13 +1109,13 @@ return range < Radius; } -rnd_bool pcb_arc_in_box(pcb_arc_t *arc, rnd_rnd_box_t *b) +rnd_bool pcb_arc_in_box(pcb_arc_t *arc, rnd_box_t *b) { - rnd_rnd_box_t ab = pcb_arc_mini_bbox(arc); + rnd_box_t ab = pcb_arc_mini_bbox(arc); return PCB_BOX_IN_BOX(&ab, b); } -rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, rnd_rnd_box_t *b) +rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, rnd_box_t *b) { int n; @@ -1308,7 +1308,7 @@ if (Type & PCB_OBJ_POLY && SearchPolygonByLocation(objst, req_flag, (pcb_layer_t **) Result1, (pcb_poly_t **) Result2, (pcb_poly_t **) Result3)) { if (HigherAvail) { - rnd_rnd_box_t *box = &(*(pcb_poly_t **) Result2)->BoundingBox; + rnd_box_t *box = &(*(pcb_poly_t **) Result2)->BoundingBox; double area = (double) (box->X2 - box->X1) * (double) (box->X2 - box->X1); if (HigherBound < area) return -1; @@ -1434,7 +1434,7 @@ if (!HigherAvail && Type & PCB_OBJ_SUBC && PCB->SubcOn && SearchSubcByLocation(objst, req_flag, (pcb_subc_t **) pr1, (pcb_subc_t **) pr2, (pcb_subc_t **) pr3, rnd_false)) { - rnd_rnd_box_t *box = &((pcb_subc_t *) r1)->BoundingBox; + rnd_box_t *box = &((pcb_subc_t *) r1)->BoundingBox; HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1); HigherAvail = PCB_OBJ_SUBC; } @@ -1740,7 +1740,7 @@ vtp0_t pcb_obj_list_vect; int pcb_search_screen_selector(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3) { - rnd_rnd_box_t box; + rnd_box_t box; rnd_coord_t radius; pcb_any_obj_t *obj; @@ -1852,7 +1852,7 @@ } -rnd_r_dir_t pcb_search_data_by_loc(pcb_data_t *data, pcb_objtype_t type, const rnd_rnd_box_t *query_box, rnd_r_dir_t (*cb_)(void *closure, pcb_any_obj_t *obj, void *box), void *closure) +rnd_r_dir_t pcb_search_data_by_loc(pcb_data_t *data, pcb_objtype_t type, const rnd_box_t *query_box, rnd_r_dir_t (*cb_)(void *closure, pcb_any_obj_t *obj, void *box), void *closure) { pcb_layer_t *ly; rnd_layer_id_t lid;