Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 31800) +++ trunk/src/board.c (revision 31801) @@ -189,7 +189,7 @@ TODO("padstack: move this to obj_pstk.c after pinvia removal") #include "obj_pstk_inlines.h" -static rnd_r_dir_t hole_counting_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t hole_counting_callback(const rnd_box_t * b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); @@ -204,7 +204,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t slot_counting_callback(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t slot_counting_callback(const rnd_box_t *b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); @@ -219,7 +219,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const rnd_rnd_box_t *within_area) +void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const rnd_box_t *within_area) { HoleCountStruct hcs = { 0, 0 }; @@ -231,7 +231,7 @@ *unplated = hcs.nunplated; } -void pcb_board_count_slots(pcb_board_t *pcb, int *plated, int *unplated, const rnd_rnd_box_t *within_area) +void pcb_board_count_slots(pcb_board_t *pcb, int *plated, int *unplated, const rnd_box_t *within_area) { HoleCountStruct hcs = { 0, 0 }; @@ -388,7 +388,7 @@ int pcb_board_normalize(pcb_board_t *pcb) { - rnd_rnd_box_t b; + rnd_box_t b; int chg = 0; if (pcb_data_bbox(&b, pcb->Data, rnd_false) == NULL) Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 31800) +++ trunk/src/board.h (revision 31801) @@ -118,8 +118,8 @@ /* counts the number of plated and unplated holes or slots in the design within a given area of the board. To count for the whole board, pass NULL within_area. */ -void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const rnd_rnd_box_t *within_area); -void pcb_board_count_slots(pcb_board_t *pcb, int *plated, int *unplated, const rnd_rnd_box_t *within_area); +void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const rnd_box_t *within_area); +void pcb_board_count_slots(pcb_board_t *pcb, int *plated, int *unplated, const rnd_box_t *within_area); #define PCB_SWAP_X(x) (RND_SWAP_SIGN_X(x)) #define PCB_SWAP_Y(y) (PCB->hidlib.size_y +RND_SWAP_SIGN_Y(y)) Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 31800) +++ trunk/src/buffer.c (revision 31801) @@ -150,7 +150,7 @@ int pcb_set_buffer_bbox(pcb_buffer_t *Buffer) { - rnd_rnd_box_t tmp, *box; + rnd_box_t tmp, *box; int res = 0; box = pcb_data_bbox(&tmp, Buffer->Data, rnd_false); @@ -391,37 +391,37 @@ PCB_LINE_ALL_LOOP(Buffer->Data); { if (layer->line_tree != NULL) - rnd_r_delete_entry(layer->line_tree, (rnd_rnd_box_t *) line); + rnd_r_delete_entry(layer->line_tree, (rnd_box_t *) line); pcb_line_rotate90(line, Buffer->X, Buffer->Y, Number); if (layer->line_tree != NULL) - rnd_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *) line); + rnd_r_insert_entry(layer->line_tree, (rnd_box_t *) line); } PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { if (layer->arc_tree != NULL) - rnd_r_delete_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_delete_entry(layer->arc_tree, (rnd_box_t *) arc); pcb_arc_rotate90(arc, Buffer->X, Buffer->Y, Number); if (layer->arc_tree != NULL) - rnd_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_insert_entry(layer->arc_tree, (rnd_box_t *) arc); } PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Buffer->Data); { if (layer->text_tree != NULL) - rnd_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_delete_entry(layer->text_tree, (rnd_box_t *) text); pcb_text_rotate90(text, Buffer->X, Buffer->Y, Number); if (layer->text_tree != NULL) - rnd_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_insert_entry(layer->text_tree, (rnd_box_t *) text); } PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Buffer->Data); { if (layer->polygon_tree != NULL) - rnd_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_delete_entry(layer->polygon_tree, (rnd_box_t *) polygon); pcb_poly_rotate90(polygon, Buffer->X, Buffer->Y, Number); if (layer->polygon_tree != NULL) - rnd_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); } PCB_ENDALL_LOOP; Index: trunk/src/buffer.h =================================================================== --- trunk/src/buffer.h (revision 31800) +++ trunk/src/buffer.h (revision 31801) @@ -36,8 +36,8 @@ struct pcb_buffer_s { /* information about the paste buffer */ rnd_coord_t X, Y; /* offset */ - rnd_rnd_box_t BoundingBox; - rnd_rnd_box_t bbox_naked; + rnd_box_t BoundingBox; + rnd_box_t bbox_naked; pcb_data_t *Data; /* data; not all members of pcb_board_t */ int from_outside; /* data is coming from outside of the current board (lib, loaded board) */ char *source_path; /* when from the outside, this field may remember the full path of the original source file */ Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 31800) +++ trunk/src/crosshair.c (revision 31801) @@ -633,7 +633,7 @@ rnd_coord_t Y; }; -static rnd_r_dir_t onpoint_line_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t onpoint_line_callback(const rnd_box_t * box, void *cl) { struct onpoint_search_info *info = (struct onpoint_search_info *) cl; pcb_crosshair_t *crosshair = info->crosshair; @@ -659,7 +659,7 @@ #define close_enough(v1, v2) (coord_abs((v1)-(v2)) < 10) -static rnd_r_dir_t onpoint_arc_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t onpoint_arc_callback(const rnd_box_t * box, void *cl) { struct onpoint_search_info *info = (struct onpoint_search_info *) cl; pcb_crosshair_t *crosshair = info->crosshair; @@ -732,7 +732,7 @@ */ static void onpoint_work(pcb_crosshair_t * crosshair, rnd_coord_t X, rnd_coord_t Y) { - rnd_rnd_box_t SearchBox = rnd_point_box(X, Y); + rnd_box_t SearchBox = rnd_point_box(X, Y); struct onpoint_search_info info; int i; rnd_bool redraw = rnd_false; Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 31800) +++ trunk/src/crosshair.h (revision 31801) @@ -47,7 +47,7 @@ typedef struct { /* currently attached object */ rnd_coord_t X, Y; /* saved position when tool is move */ rnd_coord_t tx, ty; /* target position when tool is move */ - rnd_rnd_box_t BoundingBox; + rnd_box_t BoundingBox; long int Type; /* object type */ long int State; void *Ptr1, *Ptr2, *Ptr3; /* three pointers to data, see search.c */ Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 31800) +++ trunk/src/data.c (revision 31801) @@ -229,7 +229,7 @@ return rnd_true; } -rnd_rnd_box_t *pcb_data_bbox(rnd_rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) +rnd_box_t *pcb_data_bbox(rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) { /* preset identifiers with highest and lowest possible values */ out->X1 = out->Y1 = RND_MAX_COORD; @@ -281,7 +281,7 @@ return (pcb_data_is_empty(Data) ? NULL : out); } -rnd_rnd_box_t *pcb_data_bbox_naked(rnd_rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) +rnd_box_t *pcb_data_bbox_naked(rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) { /* preset identifiers with highest and lowest possible values */ out->X1 = out->Y1 = RND_MAX_COORD; @@ -522,9 +522,9 @@ } -int pcb_data_normalize_(pcb_data_t *data, rnd_rnd_box_t *data_bbox) +int pcb_data_normalize_(pcb_data_t *data, rnd_box_t *data_bbox) { - rnd_rnd_box_t tmp; + rnd_box_t tmp; rnd_coord_t dx = 0, dy = 0; if (data_bbox == NULL) { @@ -682,9 +682,9 @@ res |= tmp; \ } while(0); -rnd_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_rnd_box_t *starting_region, - rnd_r_dir_t (*region_in_search) (const rnd_rnd_box_t *region, void *cl), - rnd_r_dir_t (*rectangle_in_region) (const rnd_rnd_box_t *box, void *cl), +rnd_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_box_t *starting_region, + rnd_r_dir_t (*region_in_search) (const rnd_box_t *region, void *cl), + rnd_r_dir_t (*rectangle_in_region) (const rnd_box_t *box, void *cl), void *closure, int *num_found, rnd_bool vis_only) { rnd_layer_id_t lid; @@ -860,7 +860,7 @@ unsigned long pcb_data_clear_obj_flag(pcb_data_t *data, pcb_objtype_t tmask, unsigned long flag, int redraw, int undoable) { rnd_rtree_it_t it; - rnd_rnd_box_t *n; + rnd_box_t *n; int li; pcb_layer_t *l; unsigned long cnt = 0; @@ -933,7 +933,7 @@ void pcb_data_dynflag_clear(pcb_data_t *data, pcb_dynf_t dynf) { rnd_rtree_it_t it; - rnd_rnd_box_t *n; + rnd_box_t *n; int li; pcb_layer_t *l; Index: trunk/src/data.h =================================================================== --- trunk/src/data.h (revision 31800) +++ trunk/src/data.h (revision 31801) @@ -133,8 +133,8 @@ /* gets minimum and maximum coordinates * returns NULL if layout is empty */ -rnd_rnd_box_t *pcb_data_bbox(rnd_rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters); -rnd_rnd_box_t *pcb_data_bbox_naked(rnd_rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters); +rnd_box_t *pcb_data_bbox(rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters); +rnd_box_t *pcb_data_bbox_naked(rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters); /* Make sure all layers of data has their .parent field pointing to the data */ void pcb_data_set_layer_parents(pcb_data_t *data); @@ -153,7 +153,7 @@ void pcb_data_unbind_layers(pcb_data_t *data); /* Make sure there are no negative coords in data, knowing the bbox of the data */ -int pcb_data_normalize_(pcb_data_t *data, rnd_rnd_box_t *data_bbox); +int pcb_data_normalize_(pcb_data_t *data, rnd_box_t *data_bbox); /* Make sure there are no negative coords in data (calculates the bbox of the data) */ int pcb_data_normalize(pcb_data_t *data); @@ -184,9 +184,9 @@ /* rsearch on all trees matching types of data */ -rnd_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_rnd_box_t *starting_region, - rnd_r_dir_t (*region_in_search) (const rnd_rnd_box_t *region, void *cl), - rnd_r_dir_t (*rectangle_in_region) (const rnd_rnd_box_t *box, void *cl), +rnd_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_box_t *starting_region, + rnd_r_dir_t (*region_in_search) (const rnd_box_t *region, void *cl), + rnd_r_dir_t (*rectangle_in_region) (const rnd_box_t *box, void *cl), void *closure, int *num_found, rnd_bool vis_only); /* Either pcb->data or the subcircuit's data if PCB is a subc (footprint edit mode) */ Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 31800) +++ trunk/src/draw.c (revision 31801) @@ -57,7 +57,7 @@ pcb_output_t pcb_draw_out; /* global context used for drawing */ -rnd_rnd_box_t pcb_draw_invalidated = { RND_COORD_MAX, RND_COORD_MAX, -RND_COORD_MAX, -RND_COORD_MAX }; +rnd_box_t pcb_draw_invalidated = { RND_COORD_MAX, RND_COORD_MAX, -RND_COORD_MAX, -RND_COORD_MAX }; int pcb_draw_force_termlab = 0; rnd_bool pcb_draw_doing_assy = rnd_false; @@ -79,7 +79,7 @@ static void pcb_draw_mask(pcb_draw_info_t *info, int side); static void pcb_draw_silk_doc(pcb_draw_info_t *info, pcb_layer_type_t lyt_side, pcb_layer_type_t lyt_type, int setgrp, int invis); static void pcb_draw_boundary_mech(pcb_draw_info_t *info); -static void pcb_draw_rats(pcb_draw_info_t *info, const rnd_rnd_box_t *); +static void pcb_draw_rats(pcb_draw_info_t *info, const rnd_box_t *); static void pcb_draw_assembly(pcb_draw_info_t *info, pcb_layer_type_t lyt_side); @@ -294,7 +294,7 @@ rnd_render->set_drawing_mode(rnd_render, RND_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } -static void draw_rats(pcb_draw_info_t *info, const rnd_rnd_box_t *drawn_area) +static void draw_rats(pcb_draw_info_t *info, const rnd_box_t *drawn_area) { if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_RATS, 0, NULL)) { rnd_render->set_drawing_mode(rnd_render, RND_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); @@ -628,7 +628,7 @@ * Draws padstacks' names - Always draws for non-gui HIDs, * otherwise drawing depends on PCB->pstk_on */ -void pcb_draw_pstk_names(pcb_draw_info_t *info, rnd_layergrp_id_t group, const rnd_rnd_box_t *drawn_area) +void pcb_draw_pstk_names(pcb_draw_info_t *info, rnd_layergrp_id_t group, const rnd_box_t *drawn_area) { if (PCB->pstk_on || !rnd_render->gui) { size_t n; @@ -644,7 +644,7 @@ for(n = 0; n < delayed_objs.used; n++) { pcb_any_obj_t *o = delayed_objs.array[n]; - rnd_rnd_box_t *b = (rnd_rnd_box_t *)o; + rnd_box_t *b = (rnd_box_t *)o; switch(o->type) { case PCB_OBJ_ARC: pcb_arc_draw_term_callback(b, info); break; case PCB_OBJ_LINE: pcb_line_draw_term_callback(b, info); break; @@ -809,10 +809,10 @@ *info->noexport_name = '\0'; } -void pcb_draw_layer_noxform(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen) +void pcb_draw_layer_noxform(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_box_t *screen) { pcb_draw_info_t info; - rnd_rnd_box_t scr2; + rnd_box_t scr2; pcb_draw_info_setup(&info, pcb); info.drawn_area = screen; @@ -834,10 +834,10 @@ /* This version is about 1% slower and used rarely, thus it's all dupped from pcb_draw_layer() to keep the original speed there */ -void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, rnd_xform_t *xf) +void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_box_t *screen, pcb_data_t *data, rnd_xform_t *xf) { pcb_draw_info_t info; - rnd_rnd_box_t scr2; + rnd_box_t scr2; unsigned int lflg = 0; rnd_rtree_it_t it; pcb_any_obj_t *o; @@ -875,7 +875,7 @@ if (Layer->gfx_tree != NULL) for(o = rnd_rtree_first(&it, Layer->gfx_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_gfx_draw_under_callback((rnd_rnd_box_t *)o, &info); + pcb_gfx_draw_under_callback((rnd_box_t *)o, &info); } /* print the non-clearing polys */ @@ -883,12 +883,12 @@ if (lflg & PCB_LYT_COPPER) { for(o = rnd_rtree_first(&it, Layer->polygon_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_poly_draw_term_callback((rnd_rnd_box_t *)o, &info); + pcb_poly_draw_term_callback((rnd_box_t *)o, &info); } else { for(o = rnd_rtree_first(&it, Layer->polygon_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_poly_draw_callback((rnd_rnd_box_t *)o, &info); + pcb_poly_draw_callback((rnd_box_t *)o, &info); } } @@ -900,15 +900,15 @@ if (Layer->line_tree != NULL) for(o = rnd_rtree_first(&it, Layer->line_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_line_draw_term_callback((rnd_rnd_box_t *)o, &info); + pcb_line_draw_term_callback((rnd_box_t *)o, &info); if (Layer->arc_tree != NULL) for(o = rnd_rtree_first(&it, Layer->arc_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_arc_draw_term_callback((rnd_rnd_box_t *)o, &info); + pcb_arc_draw_term_callback((rnd_box_t *)o, &info); if (Layer->text_tree != NULL) for(o = rnd_rtree_first(&it, Layer->text_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_text_draw_term_callback((rnd_rnd_box_t *)o, &info); + pcb_text_draw_term_callback((rnd_box_t *)o, &info); if (Layer->gfx_tree != NULL) for(o = rnd_rtree_first(&it, Layer->gfx_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if ((pcb_obj_is_under(o, data)) && !(((pcb_gfx_t *)o)->render_under)) @@ -918,19 +918,19 @@ if (Layer->line_tree != NULL) for(o = rnd_rtree_first(&it, Layer->line_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_line_draw_callback((rnd_rnd_box_t *)o, &info); + pcb_line_draw_callback((rnd_box_t *)o, &info); if (Layer->arc_tree != NULL) for(o = rnd_rtree_first(&it, Layer->arc_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_arc_draw_callback((rnd_rnd_box_t *)o, &info); + pcb_arc_draw_callback((rnd_box_t *)o, &info); if (Layer->text_tree != NULL) for(o = rnd_rtree_first(&it, Layer->text_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_text_draw_callback((rnd_rnd_box_t *)o, &info); + pcb_text_draw_callback((rnd_box_t *)o, &info); if (Layer->gfx_tree != NULL) for(o = rnd_rtree_first(&it, Layer->gfx_tree, (rnd_rtree_box_t *)screen); o != NULL; o = rnd_rtree_next(&it)) if (pcb_obj_is_under(o, data)) - pcb_gfx_draw_above_callback((rnd_rnd_box_t *)o, &info); + pcb_gfx_draw_above_callback((rnd_box_t *)o, &info); } out:; @@ -1285,7 +1285,7 @@ void pcb_label_invalidate(rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const char *label) { rnd_coord_t ox = x, oy = y, margin = 0; - rnd_rnd_box_t b; + rnd_box_t b; PCB_TERM_LABEL_SETUP((const unsigned char *)label); dx = RND_ABS(dx); Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 31800) +++ trunk/src/draw.h (revision 31801) @@ -55,7 +55,7 @@ int exporting; /* 1 if doing an export, 0 if working to screen */ const char *export_name; /* name of the export plugin */ char noexport_name[64]; /* "noexport:" attribute name rendered for the current exporter */ - const rnd_rnd_box_t *drawn_area; + const rnd_box_t *drawn_area; rnd_xform_t *xform_caller; /* the extra transformation the caller requested (the one who has initiated the rendering, e.g. throuh pcb_draw_everything()) */ rnd_xform_t *xform_exporter; /* the extra transformation the exporter requested (e.g. because of cam) */ rnd_xform_t *xform; /* the final transformation applied on objects */ @@ -102,13 +102,13 @@ void pcb_draw_annotation_add(pcb_any_obj_t *obj); /* the minimum box that needs to be redrawn */ -extern rnd_rnd_box_t pcb_draw_invalidated; +extern rnd_box_t pcb_draw_invalidated; /* Adds the update rect to the invalidated region. This schedules the object - for redraw (by pcb_draw()). obj is anything that can be casted to rnd_rnd_box_t */ + for redraw (by pcb_draw()). obj is anything that can be casted to rnd_box_t */ #define pcb_draw_invalidate(obj) \ do { \ - rnd_rnd_box_t *box = (rnd_rnd_box_t *)obj; \ + rnd_box_t *box = (rnd_box_t *)obj; \ pcb_draw_invalidated.X1 = MIN(pcb_draw_invalidated.X1, box->X1); \ pcb_draw_invalidated.X2 = MAX(pcb_draw_invalidated.X2, box->X2); \ pcb_draw_invalidated.Y1 = MIN(pcb_draw_invalidated.Y1, box->Y1); \ @@ -130,19 +130,19 @@ void pcb_draw(void); void pcb_draw_obj(pcb_any_obj_t *obj); void pcb_draw_layer(pcb_draw_info_t *info, const pcb_layer_t *ly); -void pcb_draw_layer_noxform(pcb_board_t *pcb, const pcb_layer_t *ly, const rnd_rnd_box_t *screen); +void pcb_draw_layer_noxform(pcb_board_t *pcb, const pcb_layer_t *ly, const rnd_box_t *screen); /* Same as pcb_draw_layer(), but never draws an implicit outline and ignores objects that are not in the subtree of data - useful for drawing a subtree, e.g. a subc only */ -void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, rnd_xform_t *xform); +void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_box_t *screen, pcb_data_t *data, rnd_xform_t *xform); /* Composite draw all layer groups matching lyt/purpi/purpose */ -void pcb_draw_groups(rnd_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert); +void pcb_draw_groups(rnd_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert); void pcb_erase_obj(int, void *, void *); -void pcb_draw_pstk_names(pcb_draw_info_t *info, rnd_layergrp_id_t group, const rnd_rnd_box_t *drawn_area); +void pcb_draw_pstk_names(pcb_draw_info_t *info, rnd_layergrp_id_t group, const rnd_box_t *drawn_area); /*#define PCB_BBOX_DEBUG*/ Index: trunk/src/draw_composite.c =================================================================== --- trunk/src/draw_composite.c (revision 31800) +++ trunk/src/draw_composite.c (revision 31801) @@ -180,7 +180,7 @@ pcb_draw_pstks(ctx->info, ctx->gid, 0, *pstk_lyt_match); } -void pcb_draw_groups(rnd_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert) +void pcb_draw_groups(rnd_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert) { pcb_draw_info_t info; rnd_layergrp_id_t gid; Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 31800) +++ trunk/src/draw_ly_spec.c (revision 31801) @@ -328,7 +328,7 @@ /******** misc ********/ -static void pcb_draw_rats(pcb_draw_info_t *info, const rnd_rnd_box_t *drawn_area) +static void pcb_draw_rats(pcb_draw_info_t *info, const rnd_box_t *drawn_area) { rnd_render->set_drawing_mode(rnd_render, RND_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); rnd_render->set_drawing_mode(rnd_render, RND_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); Index: trunk/src/extobj_helper.h =================================================================== --- trunk/src/extobj_helper.h (revision 31800) +++ trunk/src/extobj_helper.h (revision 31801) @@ -78,7 +78,7 @@ { pcb_data_t *data = subc->parent.data; if (data->subc_tree != NULL) - rnd_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); pcb_undo_freeze_add(); } @@ -89,7 +89,7 @@ pcb_undo_unfreeze_add(); pcb_subc_bbox(subc); if ((data != NULL) && (data->subc_tree != NULL)) - rnd_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); return 0; } @@ -120,7 +120,7 @@ pcb_subc_bind_globals(pcb, subc); if (!dst->subc_tree) dst->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dst->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(dst->subc_tree, (rnd_box_t *)subc); } pcb_undo_add_obj_to_create(PCB_OBJ_SUBC, subc, subc, subc); Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 31800) +++ trunk/src/find.c (revision 31801) @@ -187,7 +187,7 @@ void pcb_find_on_layer(pcb_find_t *ctx, pcb_layer_t *l, pcb_any_obj_t *curr, rnd_rtree_box_t *sb, pcb_found_conn_type_t ctype) { rnd_rtree_it_t it; - rnd_rnd_box_t *n; + rnd_box_t *n; if (l->line_tree != NULL) { for(n = rnd_rtree_first(&it, l->line_tree, sb); n != NULL; n = rnd_rtree_next(&it)) @@ -260,7 +260,7 @@ { /* search unmkared connections: iterative approach */ rnd_rtree_it_t it; - rnd_rnd_box_t *n; + rnd_box_t *n; rnd_rtree_box_t *sb = (rnd_rtree_box_t *)&curr->bbox_naked; if (PCB->Data->padstack_tree != NULL) { Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 31800) +++ trunk/src/find_geo.c (revision 31801) @@ -53,7 +53,7 @@ /* This is required for fullpoly: whether an object bbox intersects a poly bbox can't be determined by a single contour check because there might be multiple contours. Returns 1 if obj bbox intersects any island's bbox */ -RND_INLINE int box_isc_poly_any_island_bbox(const pcb_find_t *ctx, const rnd_rnd_box_t *box, const pcb_poly_t *poly, int first_only) +RND_INLINE int box_isc_poly_any_island_bbox(const pcb_find_t *ctx, const rnd_box_t *box, const pcb_poly_t *poly, int first_only) { pcb_poly_it_t it; rnd_polyarea_t *pa; @@ -648,7 +648,7 @@ */ rnd_bool pcb_isc_arc_poly(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_poly_t *Polygon) { - rnd_rnd_box_t *Box = (rnd_rnd_box_t *) Arc; + rnd_box_t *Box = (rnd_box_t *) Arc; /* arcs with clearance never touch polys */ if (!ctx->ignore_clearance && PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, Polygon) && PCB_OBJ_HAS_CLEARANCE(Arc)) @@ -667,7 +667,7 @@ rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, rnd_polyarea_t *pa) { - rnd_rnd_box_t *Box = (rnd_rnd_box_t *) Arc; + rnd_box_t *Box = (rnd_box_t *) Arc; rnd_bool res = rnd_false; /* arcs with clearance never touch polys */ @@ -694,7 +694,7 @@ */ rnd_bool pcb_isc_line_poly(const pcb_find_t *ctx, pcb_line_t *Line, pcb_poly_t *Polygon) { - rnd_rnd_box_t *Box = (rnd_rnd_box_t *) Line; + rnd_box_t *Box = (rnd_box_t *) Line; rnd_polyarea_t *lp; /* lines with clearance never touch polygons */ Index: trunk/src/font.h =================================================================== --- trunk/src/font.h (revision 31800) +++ trunk/src/font.h (revision 31801) @@ -55,7 +55,7 @@ struct pcb_font_s { /* complete set of symbols */ rnd_coord_t MaxHeight, MaxWidth; /* maximum cell width and height */ - rnd_rnd_box_t DefaultSymbol; /* the default symbol is a filled box */ + rnd_box_t DefaultSymbol; /* the default symbol is a filled box */ pcb_symbol_t Symbol[PCB_MAX_FONTPOSITION + 1]; char *name; pcb_font_id_t id; Index: trunk/src/intersect.c =================================================================== --- trunk/src/intersect.c (revision 31800) +++ trunk/src/intersect.c (revision 31801) @@ -69,7 +69,7 @@ /* --------------------------------------------------------------------------- * Create a sorted list of unique y coords from a BoxList. */ -static LocationList createSortedYList(rnd_rnd_box_list_t *boxlist) +static LocationList createSortedYList(rnd_box_list_t *boxlist) { LocationList yCoords; rnd_coord_t last; @@ -164,7 +164,7 @@ * etc.). * Runs in O(N ln N) time. */ -double pcb_intersect_box_box(rnd_rnd_box_list_t *boxlist) +double pcb_intersect_box_box(rnd_box_list_t *boxlist) { rnd_cardinal_t i; double area = 0.0; @@ -179,9 +179,9 @@ * Compute the area of the union of the given rectangles. * O(N ln N) time. */ -double pcb_union_box_box(rnd_rnd_box_list_t *boxlist) +double pcb_union_box_box(rnd_box_list_t *boxlist) { - rnd_rnd_box_t **rectLeft, **rectRight; + rnd_box_t **rectLeft, **rectRight; rnd_cardinal_t i, j; LocationList yCoords; SegmentTree segtree; @@ -196,8 +196,8 @@ segtree = createSegmentTree(yCoords.p, yCoords.size); free(yCoords.p); /* create sorted list of left and right X coordinates of rectangles */ - rectLeft = (rnd_rnd_box_t **) calloc(boxlist->BoxN, sizeof(*rectLeft)); - rectRight = (rnd_rnd_box_t **) calloc(boxlist->BoxN, sizeof(*rectRight)); + rectLeft = (rnd_box_t **) calloc(boxlist->BoxN, sizeof(*rectLeft)); + rectRight = (rnd_box_t **) calloc(boxlist->BoxN, sizeof(*rectRight)); for (i = 0; i < boxlist->BoxN; i++) { assert(boxlist->Box[i].X1 <= boxlist->Box[i].X2); assert(boxlist->Box[i].Y1 <= boxlist->Box[i].Y2); @@ -213,7 +213,7 @@ /* i will step through rectLeft, j will through rectRight */ if (i == boxlist->BoxN || rectRight[j]->X2 < rectLeft[i]->X1) { /* right edge of rectangle */ - rnd_rnd_box_t *b = rectRight[j++]; + rnd_box_t *b = rectRight[j++]; /* check lastX */ if (b->X2 != lastX) { assert(lastX < b->X2); @@ -225,7 +225,7 @@ } else { /* left edge of rectangle */ - rnd_rnd_box_t *b = rectLeft[i++]; + rnd_box_t *b = rectLeft[i++]; /* check lastX */ if (b->X1 != lastX) { assert(lastX < b->X1); @@ -244,13 +244,13 @@ static int compareleft(const void *ptr1, const void *ptr2) { - rnd_rnd_box_t **b1 = (rnd_rnd_box_t **) ptr1, **b2 = (rnd_rnd_box_t **) ptr2; + rnd_box_t **b1 = (rnd_box_t **) ptr1, **b2 = (rnd_box_t **) ptr2; return (*b1)->X1 - (*b2)->X1; } static int compareright(const void *ptr1, const void *ptr2) { - rnd_rnd_box_t **b1 = (rnd_rnd_box_t **) ptr1, **b2 = (rnd_rnd_box_t **) ptr2; + rnd_box_t **b1 = (rnd_box_t **) ptr1, **b2 = (rnd_box_t **) ptr2; return (*b1)->X2 - (*b2)->X2; } Index: trunk/src/intersect.h =================================================================== --- trunk/src/intersect.h (revision 31800) +++ trunk/src/intersect.h (revision 31801) @@ -43,7 +43,7 @@ #include -double pcb_intersect_box_box(rnd_rnd_box_list_t *boxlist); /* will sort boxlist */ -double pcb_union_box_box(rnd_rnd_box_list_t *boxlist); +double pcb_intersect_box_box(rnd_box_list_t *boxlist); /* will sort boxlist */ +double pcb_union_box_box(rnd_box_list_t *boxlist); #endif Index: trunk/src/librnd/core/box.c =================================================================== --- trunk/src/librnd/core/box.c (revision 31800) +++ trunk/src/librnd/core/box.c (revision 31801) @@ -33,7 +33,7 @@ #include #include -void rnd_box_rotate90(rnd_rnd_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number) +void rnd_box_rotate90(rnd_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { rnd_coord_t x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2; @@ -45,7 +45,7 @@ Box->Y2 = MAX(y1, y2); } -void rnd_box_enlarge(rnd_rnd_box_t *box, double xfactor, double yfactor) +void rnd_box_enlarge(rnd_box_t *box, double xfactor, double yfactor) { double w = (double)(box->X2 - box->X1) * xfactor / 2.0; double h = (double)(box->Y2 - box->Y1) * yfactor / 2.0; Index: trunk/src/librnd/core/box.h =================================================================== --- trunk/src/librnd/core/box.h (revision 31800) +++ trunk/src/librnd/core/box.h (revision 31801) @@ -47,10 +47,10 @@ #include #include -struct rnd_rnd_box_list_s { +struct rnd_box_list_s { rnd_cardinal_t BoxN; /* the number of boxes contained */ rnd_cardinal_t BoxMax; /* max boxes from malloc */ - rnd_rnd_box_t *Box; + rnd_box_t *Box; }; #include @@ -127,27 +127,27 @@ /* note that boxes are closed on top and left and open on bottom and right. this means that top-left corner is in box, *but bottom-right corner is not*. */ -RND_INLINE rnd_bool rnd_point_in_box(const rnd_rnd_box_t * box, rnd_coord_t X, rnd_coord_t Y) +RND_INLINE rnd_bool rnd_point_in_box(const rnd_box_t * box, rnd_coord_t X, rnd_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X < box->X2) && (Y < box->Y2); } -RND_INLINE rnd_bool rnd_point_in_closed_box(const rnd_rnd_box_t * box, rnd_coord_t X, rnd_coord_t Y) +RND_INLINE rnd_bool rnd_point_in_closed_box(const rnd_box_t * box, rnd_coord_t X, rnd_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X <= box->X2) && (Y <= box->Y2); } -RND_INLINE rnd_bool rnd_box_is_good(const rnd_rnd_box_t * b) +RND_INLINE rnd_bool rnd_box_is_good(const rnd_box_t * b) { return (b->X1 < b->X2) && (b->Y1 < b->Y2); } -RND_INLINE rnd_bool rnd_box_intersect(const rnd_rnd_box_t * a, const rnd_rnd_box_t * b) +RND_INLINE rnd_bool rnd_box_intersect(const rnd_box_t * a, const rnd_box_t * b) { return (a->X1 < b->X2) && (b->X1 < a->X2) && (a->Y1 < b->Y2) && (b->Y1 < a->Y2); } -RND_INLINE rnd_cheap_point_t rnd_closest_cheap_point_in_box(const rnd_cheap_point_t * from, const rnd_rnd_box_t * box) +RND_INLINE rnd_cheap_point_t rnd_closest_cheap_point_in_box(const rnd_cheap_point_t * from, const rnd_box_t * box) { rnd_cheap_point_t r; assert(box->X1 < box->X2 && box->Y1 < box->Y2); @@ -157,14 +157,14 @@ return r; } -RND_INLINE rnd_bool rnd_box_in_box(const rnd_rnd_box_t * outer, const rnd_rnd_box_t * inner) +RND_INLINE rnd_bool rnd_box_in_box(const rnd_box_t * outer, const rnd_box_t * inner) { return (outer->X1 <= inner->X1) && (inner->X2 <= outer->X2) && (outer->Y1 <= inner->Y1) && (inner->Y2 <= outer->Y2); } -RND_INLINE rnd_rnd_box_t rnd_clip_box(const rnd_rnd_box_t * box, const rnd_rnd_box_t * clipbox) +RND_INLINE rnd_box_t rnd_clip_box(const rnd_box_t * box, const rnd_box_t * clipbox) { - rnd_rnd_box_t r; + rnd_box_t r; assert(rnd_box_intersect(box, clipbox)); r.X1 = MAX(box->X1, clipbox->X1); r.X2 = MIN(box->X2, clipbox->X2); @@ -174,9 +174,9 @@ return r; } -RND_INLINE rnd_rnd_box_t rnd_shrink_box(const rnd_rnd_box_t * box, rnd_coord_t amount) +RND_INLINE rnd_box_t rnd_shrink_box(const rnd_box_t * box, rnd_coord_t amount) { - rnd_rnd_box_t r = *box; + rnd_box_t r = *box; r.X1 += amount; r.Y1 += amount; r.X2 -= amount; @@ -184,15 +184,15 @@ return r; } -RND_INLINE rnd_rnd_box_t rnd_bloat_box(const rnd_rnd_box_t * box, rnd_coord_t amount) +RND_INLINE rnd_box_t rnd_bloat_box(const rnd_box_t * box, rnd_coord_t amount) { return rnd_shrink_box(box, -amount); } /* construct a minimum box that touches the input box at the center */ -RND_INLINE rnd_rnd_box_t rnd_box_center(const rnd_rnd_box_t * box) +RND_INLINE rnd_box_t rnd_box_center(const rnd_box_t * box) { - rnd_rnd_box_t r; + rnd_box_t r; r.X1 = box->X1 + (box->X2 - box->X1) / 2; r.X2 = r.X1 + 1; r.Y1 = box->Y1 + (box->Y2 - box->Y1) / 2; @@ -201,9 +201,9 @@ } /* construct a minimum box that touches the input box at the corner */ -RND_INLINE rnd_rnd_box_t rnd_box_corner(const rnd_rnd_box_t * box) +RND_INLINE rnd_box_t rnd_box_corner(const rnd_box_t * box) { - rnd_rnd_box_t r; + rnd_box_t r; r.X1 = box->X1; r.X2 = r.X1 + 1; r.Y1 = box->Y1; @@ -212,9 +212,9 @@ } /* construct a box that holds a single point */ -RND_INLINE rnd_rnd_box_t rnd_point_box(rnd_coord_t X, rnd_coord_t Y) +RND_INLINE rnd_box_t rnd_point_box(rnd_coord_t X, rnd_coord_t Y) { - rnd_rnd_box_t r; + rnd_box_t r; r.X1 = X; r.X2 = X + 1; r.Y1 = Y; @@ -223,7 +223,7 @@ } /* close a bounding box by pushing its upper right corner */ -RND_INLINE void rnd_close_box(rnd_rnd_box_t * r) +RND_INLINE void rnd_close_box(rnd_box_t * r) { r->X2++; r->Y2++; @@ -232,7 +232,7 @@ /* return the square of the minimum distance from a point to some point inside a box. The box is half-closed! That is, the top-left corner is considered in the box, but the bottom-right corner is not. */ -RND_INLINE double rnd_dist2_to_box(const rnd_cheap_point_t * p, const rnd_rnd_box_t * b) +RND_INLINE double rnd_dist2_to_box(const rnd_cheap_point_t * p, const rnd_box_t * b) { rnd_cheap_point_t r = rnd_closest_cheap_point_in_box(p, b); return rnd_distance(r.X, r.Y, p->X, p->Y); @@ -240,7 +240,7 @@ /* Modify dst to include src */ -RND_INLINE void rnd_box_bump_box(rnd_rnd_box_t *dst, const rnd_rnd_box_t *src) +RND_INLINE void rnd_box_bump_box(rnd_box_t *dst, const rnd_box_t *src) { if (src->X1 < dst->X1) dst->X1 = src->X1; if (src->Y1 < dst->Y1) dst->Y1 = src->Y1; @@ -249,7 +249,7 @@ } /* Modify dst to include src */ -RND_INLINE void rnd_box_bump_point(rnd_rnd_box_t *dst, rnd_coord_t x, rnd_coord_t y) +RND_INLINE void rnd_box_bump_point(rnd_box_t *dst, rnd_coord_t x, rnd_coord_t y) { if (x < dst->X1) dst->X1 = x; if (y < dst->Y1) dst->Y1 = y; @@ -258,9 +258,9 @@ } /* rotates a box in 90 degree steps */ -void rnd_box_rotate90(rnd_rnd_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void rnd_box_rotate90(rnd_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number); /* Enlarge a box by adding current width,height multiplied by xfactor,yfactor */ -void rnd_box_enlarge(rnd_rnd_box_t *box, double xfactor, double yfactor); +void rnd_box_enlarge(rnd_box_t *box, double xfactor, double yfactor); #endif Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 31800) +++ trunk/src/librnd/core/global_typedefs.h (revision 31801) @@ -29,7 +29,7 @@ #define RND_GLOBAL_TYPEDEFS_H #include -struct rnd_rnd_box_s { /* a bounding box */ +struct rnd_box_s { /* a bounding box */ rnd_coord_t X1, Y1; /* upper left */ rnd_coord_t X2, Y2; /* and lower right corner */ }; @@ -42,8 +42,8 @@ typedef struct rnd_unit_s rnd_unit_t; typedef struct rnd_point_s rnd_point_t; -typedef struct rnd_rnd_box_s rnd_rnd_box_t; -typedef struct rnd_rnd_box_list_s rnd_rnd_box_list_t; +typedef struct rnd_box_s rnd_box_t; +typedef struct rnd_box_list_s rnd_box_list_t; typedef struct rnd_polyarea_s rnd_polyarea_t; typedef struct rnd_rtree_s rnd_rtree_t; Index: trunk/src/librnd/core/gui_act.c =================================================================== --- trunk/src/librnd/core/gui_act.c (revision 31800) +++ trunk/src/librnd/core/gui_act.c (revision 31801) @@ -149,7 +149,7 @@ double dx, dy; rnd_coord_t view_width, view_height; const char *a1, *a2, *a3, *op; - rnd_rnd_box_t vbx; + rnd_box_t vbx; extra_units_x[0].scale = RND_ACT_HIDLIB->grid; extra_units_x[2].scale = RND_ACT_HIDLIB->size_x; @@ -192,7 +192,7 @@ if (rnd_strcasecmp(a3, "view") == 0) { if ((rnd_gui != NULL) && (rnd_gui->view_get != NULL)) { - rnd_rnd_box_t viewbox; + rnd_box_t viewbox; rnd_gui->view_get(rnd_gui, &viewbox); if (rnd_conf.editor.view.flip_x) dx = viewbox.X2 - dx; @@ -207,7 +207,7 @@ /* Allow leaving snapped pin/pad/padstack */ if (hidlib->tool_snapped_obj_bbox) { - rnd_rnd_box_t *bbx = hidlib->tool_snapped_obj_bbox; + rnd_box_t *bbx = hidlib->tool_snapped_obj_bbox; rnd_coord_t radius = ((bbx->X2 - bbx->X1) + (bbx->Y2 - bbx->Y1))/6; if (dx < 0) dx -= radius; Index: trunk/src/librnd/core/hid.h =================================================================== --- trunk/src/librnd/core/hid.h (revision 31800) +++ trunk/src/librnd/core/hid.h (revision 31801) @@ -277,11 +277,11 @@ /* Composite layer drawing: manipulate the sketch canvas and set positive or negative drawing mode. The canvas covers the screen box. */ - void (*set_drawing_mode)(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen); + void (*set_drawing_mode)(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen); /* Announce start/end of a render burst for a specific screen screen box; A GUI hid should set the coord_per_pix value here for proper optimization. */ - void (*render_burst)(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_rnd_box_t *screen); + void (*render_burst)(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_box_t *screen); /*** gc vs. rnd_hid_t *: rnd_core_gc_t contains ->hid, so these calls don't need to get it as first arg. ***/ @@ -531,7 +531,7 @@ void (*pan_mode)(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode); /* Load viewbox with the extents of visible pixels translated to board coords */ - void (*view_get)(rnd_hid_t *hid, rnd_rnd_box_t *viewbox); + void (*view_get)(rnd_hid_t *hid, rnd_box_t *viewbox); /*** misc GUI ***/ /* Open the command line */ @@ -563,7 +563,7 @@ typedef void (*rnd_hid_expose_cb_t)(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e); struct rnd_hid_expose_ctx_s { - rnd_rnd_box_t view; + rnd_box_t view; rnd_hid_expose_cb_t expose_cb; /* function that is called on expose to get things drawn */ void *draw_data; /* user data for the expose function */ }; Index: trunk/src/librnd/core/hid_dad.h =================================================================== --- trunk/src/librnd/core/hid_dad.h (revision 31800) +++ trunk/src/librnd/core/hid_dad.h (revision 31801) @@ -113,7 +113,7 @@ struct rnd_hid_preview_s { rnd_hid_attribute_t *attrib; - rnd_rnd_box_t initial_view; + rnd_box_t initial_view; unsigned initial_view_valid:1; int min_sizex_px, min_sizey_px; /* hint: widget minimum size in pixels */ @@ -126,7 +126,7 @@ /* optional callbacks HIDs may set after widget creation */ void *hid_wdata; - void (*hid_zoomto_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, const rnd_rnd_box_t *view); + void (*hid_zoomto_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, const rnd_box_t *view); void (*hid_free_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata); }; @@ -360,10 +360,10 @@ prv->min_sizex_px = min_sizex_px_; \ prv->min_sizey_px = min_sizey_px_; \ if ((initial_view_box) != NULL) { \ - prv->initial_view.X1 = ((rnd_rnd_box_t *)(initial_view_box))->X1; \ - prv->initial_view.Y1 = ((rnd_rnd_box_t *)(initial_view_box))->Y1; \ - prv->initial_view.X2 = ((rnd_rnd_box_t *)(initial_view_box))->X2; \ - prv->initial_view.Y2 = ((rnd_rnd_box_t *)(initial_view_box))->Y2; \ + prv->initial_view.X1 = ((rnd_box_t *)(initial_view_box))->X1; \ + prv->initial_view.Y1 = ((rnd_box_t *)(initial_view_box))->Y1; \ + prv->initial_view.X2 = ((rnd_box_t *)(initial_view_box))->X2; \ + prv->initial_view.Y2 = ((rnd_box_t *)(initial_view_box))->Y2; \ prv->initial_view_valid = 1; \ } \ RND_DAD_ALLOC(table, RND_HATT_PREVIEW); \ Index: trunk/src/librnd/core/hid_nogui.c =================================================================== --- trunk/src/librnd/core/hid_nogui.c (revision 31800) +++ trunk/src/librnd/core/hid_nogui.c (revision 31801) @@ -100,12 +100,12 @@ { } -static void nogui_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void nogui_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { CRASH("set_drawing_mode"); } -static void nogui_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_rnd_box_t *screen) +static void nogui_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_box_t *screen) { /* the HID may decide to ignore this hook */ } Index: trunk/src/librnd/core/hidlib.h =================================================================== --- trunk/src/librnd/core/hidlib.h (revision 31800) +++ trunk/src/librnd/core/hidlib.h (revision 31801) @@ -47,7 +47,7 @@ unsigned int tool_hit; /* optional: type of a hit object of RND_MOVE_TYPES; 0 if there was no RND_MOVE_TYPES object under the crosshair */ unsigned int tool_click:1; /* optional: true if clicked somewhere with the arrow tool */ rnd_mark_t tool_grabbed; /* point where a drag&drop operation started */ - rnd_rnd_box_t *tool_snapped_obj_bbox; + rnd_box_t *tool_snapped_obj_bbox; /* internal */ int *batch_ask_ovr; /* if not NULL, override local ask-overwrite state - useful when manu operations that need to write files are ran in batch, e.g. in a cam job */ Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 31800) +++ trunk/src/librnd/pcb_compat.h (revision 31801) @@ -84,8 +84,8 @@ #define pcb_attrib_compat_set_intconn rnd_attrib_compat_set_intconn #define base64_write_right rnd_base64_write_right #define base64_parse_grow rnd_base64_parse_grow -#define pcb_box_list_s rnd_rnd_box_list_s -#define pcb_box_list_t rnd_rnd_box_list_t +#define pcb_box_list_s rnd_box_list_s +#define pcb_box_list_t rnd_box_list_t #define PCB_BOX_ROTATE_CW RND_BOX_ROTATE_CW #define PCB_BOX_ROTATE_TO_NORTH RND_BOX_ROTATE_TO_NORTH #define PCB_BOX_ROTATE_FROM_NORTH RND_BOX_ROTATE_FROM_NORTH @@ -120,7 +120,7 @@ #define PCB_SW RND_SW #define PCB_NW RND_NW #define PCB_ANY_DIR RND_ANY_DIR -#define rnd_rnd_box_t rnd_rnd_box_t +#define rnd_box_t rnd_box_t #define pcb_direction_t rnd_direction_t #define pcb_cheap_point_s rnd_cheap_point_s #define pcb_cheap_point_t rnd_cheap_point_t @@ -457,8 +457,8 @@ #define pcb_fptr_t rnd_fptr_t #define pcb_cast_f2d rnd_cast_f2d #define pcb_cast_d2f rnd_cast_d2f -#define pcb_box_s rnd_rnd_box_s -#define pcb_box_t rnd_rnd_box_t +#define pcb_box_s rnd_box_s +#define pcb_box_t rnd_box_t #define pcb_hidlib_s rnd_hidlib_s #define pcb_angle_t rnd_angle_t #define pcb_unit_s rnd_unit_s @@ -465,10 +465,10 @@ #define pcb_unit_t rnd_unit_t #define pcb_point_s rnd_point_s #define pcb_point_t rnd_point_t -#define rnd_box_s rnd_rnd_box_s -#define rnd_box_t rnd_rnd_box_t -#define rnd_box_list_s rnd_rnd_box_list_s -#define rnd_box_list_t rnd_rnd_box_list_t +#define rnd_box_s rnd_box_s +#define rnd_box_t rnd_box_t +#define rnd_box_list_s rnd_box_list_s +#define rnd_box_list_t rnd_box_list_t #define pcb_polyarea_s rnd_polyarea_s #define pcb_polyarea_t rnd_polyarea_t #define pcb_rtree_s rnd_rtree_s Index: trunk/src/librnd/poly/polyarea.c =================================================================== --- trunk/src/librnd/poly/polyarea.c (revision 31800) +++ trunk/src/librnd/poly/polyarea.c (revision 31801) @@ -467,7 +467,7 @@ /* some structures for handling segment intersections using the rtrees */ typedef struct seg { - rnd_rnd_box_t box; + rnd_box_t box; rnd_vnode_t *v; rnd_pline_t *p; int intersected; @@ -520,7 +520,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; - rnd_r_insert_entry(tree, (const rnd_rnd_box_t *) q); + rnd_r_insert_entry(tree, (const rnd_box_t *) q); q = (seg *) malloc(sizeof(struct seg)); if (!q) return 1; @@ -531,8 +531,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; - rnd_r_insert_entry(tree, (const rnd_rnd_box_t *) q); - rnd_r_delete_entry(tree, (const rnd_rnd_box_t *) s); + rnd_r_insert_entry(tree, (const rnd_box_t *) q); + rnd_r_delete_entry(tree, (const rnd_box_t *) s); free(s); return 0; } @@ -542,7 +542,7 @@ * (C) 2006, harry eaton * This prunes the search for boxes that don't intersect the segment. */ -static rnd_r_dir_t seg_in_region(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t seg_in_region(const rnd_box_t * b, void *cl) { struct info *i = (struct info *) cl; double y1, y2; @@ -579,7 +579,7 @@ * problem. There are efficient algorithms for finding intersections with snap * rounding, but I don't have time to implement them right now. */ -static rnd_r_dir_t seg_in_seg(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t seg_in_seg(const rnd_box_t * b, void *cl) { struct info *i = (struct info *) cl; struct seg *s = (struct seg *) b; @@ -657,13 +657,13 @@ } s->v = bv; s->p = pb; - rnd_r_insert_entry(ans, (const rnd_rnd_box_t *) s); + rnd_r_insert_entry(ans, (const rnd_box_t *) s); } while ((bv = bv->next) != pb->head); return (void *) ans; } -static rnd_r_dir_t get_seg(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t get_seg(const rnd_box_t * b, void *cl) { struct info *i = (struct info *) cl; struct seg *s = (struct seg *) b; @@ -692,7 +692,7 @@ * */ -static rnd_r_dir_t contour_bounds_touch(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t contour_bounds_touch(const rnd_box_t * b, void *cl) { contour_info *c_info = (contour_info *) cl; rnd_pline_t *pa = c_info->pa; @@ -701,7 +701,7 @@ rnd_pline_t *looping_over; rnd_vnode_t *av; /* node iterators */ struct info info; - rnd_rnd_box_t box; + rnd_box_t box; jmp_buf restart; /* Have seg_in_seg return to our desired location if it touches */ @@ -788,7 +788,7 @@ } for (pa = a->contours; pa; pa = pa->next) { /* Loop over the contours of rnd_polyarea_t "a" */ - rnd_rnd_box_t sb; + rnd_box_t sb; jmp_buf out; int retval; @@ -894,7 +894,7 @@ /*****************************************************************/ /* Routines for making labels */ -static rnd_r_dir_t count_contours_i_am_inside(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t count_contours_i_am_inside(const rnd_box_t * b, void *cl) { rnd_pline_t *me = (rnd_pline_t *) cl; rnd_pline_t *check = (rnd_pline_t *) b; @@ -931,7 +931,7 @@ break; outer = (rnd_polyarea_t *) rnd_heap_remove_smallest(heap); - rnd_r_search(outer->contour_tree, (rnd_rnd_box_t *) poly, NULL, count_contours_i_am_inside, poly, &cnt); + rnd_r_search(outer->contour_tree, (rnd_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; @@ -1091,7 +1091,7 @@ } newp->contours = c; newp->contour_tree = rnd_r_create_tree(); - rnd_r_insert_entry(newp->contour_tree, (rnd_rnd_box_t *) c); + rnd_r_insert_entry(newp->contour_tree, (rnd_box_t *) c); c->next = NULL; } /* InsCntr */ @@ -1105,7 +1105,7 @@ if (cntr->Flags.orient == RND_PLF_DIR) { if (owner != NULL) - rnd_r_delete_entry(owner->contour_tree, (rnd_rnd_box_t *) cntr); + rnd_r_delete_entry(owner->contour_tree, (rnd_box_t *) cntr); InsCntr(e, cntr, contours); } /* put hole into temporary list */ @@ -1116,8 +1116,8 @@ parent_contour->next = cntr; if (owner != parent) { if (owner != NULL) - rnd_r_delete_entry(owner->contour_tree, (rnd_rnd_box_t *) cntr); - rnd_r_insert_entry(parent->contour_tree, (rnd_rnd_box_t *) cntr); + rnd_r_delete_entry(owner->contour_tree, (rnd_box_t *) cntr); + rnd_r_insert_entry(parent->contour_tree, (rnd_box_t *) cntr); } } else { @@ -1126,7 +1126,7 @@ /* We don't insert the holes into an r-tree, * they just form a linked list */ if (owner != NULL) - rnd_r_delete_entry(owner->contour_tree, (rnd_rnd_box_t *) cntr); + rnd_r_delete_entry(owner->contour_tree, (rnd_box_t *) cntr); } } } /* PutContour */ @@ -1143,15 +1143,15 @@ contour->next = NULL; if (remove_rtree_entry) - rnd_r_delete_entry(piece->contour_tree, (rnd_rnd_box_t *) contour); + rnd_r_delete_entry(piece->contour_tree, (rnd_box_t *) contour); } struct polyarea_info { - rnd_rnd_box_t BoundingBox; + rnd_box_t BoundingBox; rnd_polyarea_t *pa; }; -static rnd_r_dir_t heap_it(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t heap_it(const rnd_box_t * b, void *cl) { rnd_heap_t *heap = (rnd_heap_t *) cl; struct polyarea_info *pa_info = (struct polyarea_info *) b; @@ -1168,7 +1168,7 @@ rnd_pline_t *result; }; -static rnd_r_dir_t find_inside(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t find_inside(const rnd_box_t * b, void *cl) { struct find_inside_info *info = (struct find_inside_info *) cl; rnd_pline_t *check = (rnd_pline_t *) b; @@ -1218,7 +1218,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; - rnd_r_insert_entry(tree, (const rnd_rnd_box_t *) &all_pa_info[i]); + rnd_r_insert_entry(tree, (const rnd_box_t *) &all_pa_info[i]); i++; } while ((curc = curc->f) != dest); @@ -1230,7 +1230,7 @@ container = NULL; /* build a heap of all of the polys that the hole is inside its bounding box */ heap = rnd_heap_create(); - rnd_r_search(tree, (rnd_rnd_box_t *) curh, NULL, heap_it, heap, NULL); + rnd_r_search(tree, (rnd_box_t *) curh, NULL, heap_it, heap, NULL); if (rnd_heap_is_empty(heap)) { #ifndef NDEBUG #ifdef DEBUG @@ -1289,7 +1289,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! */ - rnd_r_search(pa_info->pa->contour_tree, (rnd_rnd_box_t *) curh, NULL, find_inside, &info, NULL); + rnd_r_search(pa_info->pa->contour_tree, (rnd_box_t *) curh, NULL, find_inside, &info, NULL); /* Nothing found? */ break; @@ -1313,7 +1313,7 @@ /* link at front of hole list */ curh->next = container->next; container->next = curh; - rnd_r_insert_entry(pa_info->pa->contour_tree, (rnd_rnd_box_t *) curh); + rnd_r_insert_entry(pa_info->pa->contour_tree, (rnd_box_t *) curh); } } @@ -1763,7 +1763,7 @@ rnd_pline_t *result; }; -static rnd_r_dir_t find_inside_m_pa(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t find_inside_m_pa(const rnd_box_t * b, void *cl) { struct find_inside_m_pa_info *info = (struct find_inside_m_pa_info *) cl; rnd_pline_t *check = (rnd_pline_t *) b; @@ -1787,7 +1787,7 @@ rnd_polyarea_t *b; rnd_polyarea_t *anext; rnd_pline_t *curc, *next, *prev; - rnd_rnd_box_t box; + rnd_box_t box; /* int inv_inside = 0; */ int del_inside = 0; int del_outside = 0; @@ -1810,10 +1810,10 @@ break; } - box = *((rnd_rnd_box_t *) bpa->contours); + box = *((rnd_box_t *) bpa->contours); b = bpa; while ((b = b->f) != bpa) { - rnd_rnd_box_t *b_box = (rnd_rnd_box_t *) b->contours; + rnd_box_t *b_box = (rnd_box_t *) b->contours; RND_MAKE_MIN(box.X1, b_box->X1); RND_MAKE_MIN(box.Y1, b_box->Y1); RND_MAKE_MAX(box.X2, b_box->X2); @@ -2375,7 +2375,7 @@ C->tree = (rnd_rtree_t *) rnd_poly_make_edge_tree(C); } /* poly_PreContour */ -static rnd_r_dir_t flip_cb(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t flip_cb(const rnd_box_t * b, void *cl) { struct seg *s = (struct seg *) b; s->v = s->v->prev; @@ -2510,7 +2510,7 @@ for (cur = src->contours; cur != NULL; cur = cur->next) { if (!rnd_poly_contour_copy(last, cur)) return rnd_false; - rnd_r_insert_entry(dst->contour_tree, (rnd_rnd_box_t *) * last); + rnd_r_insert_entry(dst->contour_tree, (rnd_box_t *) * last); last = &(*last)->next; } return rnd_true; @@ -2563,7 +2563,7 @@ p->contours->next = c; c->next = tmp; } - rnd_r_insert_entry(p->contour_tree, (rnd_rnd_box_t *) c); + rnd_r_insert_entry(p->contour_tree, (rnd_box_t *) c); return rnd_true; } @@ -2574,7 +2574,7 @@ } pip; -static rnd_r_dir_t crossing(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t crossing(const rnd_box_t * b, void *cl) { struct seg *s = (struct seg *) b; struct pip *p = (struct pip *) cl; @@ -2615,7 +2615,7 @@ int rnd_poly_contour_inside(const rnd_pline_t *c, rnd_vector_t p) { struct pip info; - rnd_rnd_box_t ray; + rnd_box_t ray; if (!cntrbox_pointin(c, p)) return rnd_false; @@ -3015,7 +3015,7 @@ return pcb_polyarea_contour_check_(a, &res); } -void rnd_polyarea_bbox(rnd_polyarea_t * p, rnd_rnd_box_t * b) +void rnd_polyarea_bbox(rnd_polyarea_t * p, rnd_box_t * b) { rnd_pline_t *n; /*int cnt;*/ @@ -3363,7 +3363,7 @@ rnd_coord_t cx, cy; } pline_isect_line_t; -static rnd_r_dir_t pline_isect_line_cb(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t pline_isect_line_cb(const rnd_box_t * b, void *cl) { pline_isect_line_t *ctx = (pline_isect_line_t *)cl; struct seg *s = (struct seg *)b; @@ -3381,7 +3381,7 @@ rnd_bool pcb_pline_isect_line(rnd_pline_t *pl, rnd_coord_t lx1, rnd_coord_t ly1, rnd_coord_t lx2, rnd_coord_t ly2, rnd_coord_t *cx, rnd_coord_t *cy) { pline_isect_line_t ctx; - rnd_rnd_box_t lbx; + rnd_box_t lbx; ctx.l1[0] = lx1; ctx.l1[1] = ly1; ctx.l2[0] = lx2; ctx.l2[1] = ly2; lbx.X1 = MIN(lx1, lx2); @@ -3410,7 +3410,7 @@ double r2; } pline_isect_circ_t; -static rnd_r_dir_t pline_isect_circ_cb(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t pline_isect_circ_cb(const rnd_box_t * b, void *cl) { pline_isect_circ_t *ctx = (pline_isect_circ_t *)cl; struct seg *s = (struct seg *)b; @@ -3442,7 +3442,7 @@ rnd_bool pcb_pline_isect_circ(rnd_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { pline_isect_circ_t ctx; - rnd_rnd_box_t cbx; + rnd_box_t cbx; ctx.cx = cx; ctx.cy = cy; ctx.r = r; ctx.r2 = (double)r * (double)r; cbx.X1 = cx - r; cbx.Y1 = cy - r; @@ -3464,7 +3464,7 @@ * (or intersecting). * (C) 2017 Tibor 'Igor2' Palinkas */ -static rnd_r_dir_t pline_embraces_circ_cb(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t pline_embraces_circ_cb(const rnd_box_t * b, void *cl) { int *cnt = (int *)cl; (*cnt)++; @@ -3473,7 +3473,7 @@ rnd_bool pcb_pline_embraces_circ(rnd_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { - rnd_rnd_box_t bx; + rnd_box_t bx; int cnt; bx.Y1 = cy; bx.Y2 = cy+1; @@ -3505,7 +3505,7 @@ */ rnd_bool pcb_pline_overlaps_circ(rnd_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { - rnd_rnd_box_t cbx, pbx; + rnd_box_t cbx, pbx; cbx.X1 = cx - r; cbx.Y1 = cy - r; cbx.X2 = cx + r; cbx.Y2 = cy + r; pbx.X1 = pl->xmin; pbx.Y1 = pl->ymin; @@ -3576,7 +3576,7 @@ } pl->tree = (rnd_rtree_t *)rnd_poly_make_edge_tree(pl); - rnd_r_insert_entry(pa->contour_tree, (rnd_rnd_box_t *)pl); + rnd_r_insert_entry(pa->contour_tree, (rnd_box_t *)pl); } } } Index: trunk/src/librnd/poly/polyarea.h =================================================================== --- trunk/src/librnd/poly/polyarea.h (revision 31800) +++ trunk/src/librnd/poly/polyarea.h (revision 31801) @@ -156,7 +156,7 @@ int rnd_polyarea_save(rnd_polyarea_t *PA, char *fname); /* calculate the bounding box of a rnd_polyarea_t and save result in b */ -void rnd_polyarea_bbox(rnd_polyarea_t *p, rnd_rnd_box_t *b); +void rnd_polyarea_bbox(rnd_polyarea_t *p, rnd_box_t *b); /* Move each point of pa1 by dx and dy */ void rnd_polyarea_move(rnd_polyarea_t *pa1, rnd_coord_t dx, rnd_coord_t dy); Index: trunk/src/librnd/poly/rtree.c =================================================================== --- trunk/src/librnd/poly/rtree.c (revision 31800) +++ trunk/src/librnd/poly/rtree.c (revision 31801) @@ -54,13 +54,13 @@ *tree = NULL; } -void rnd_r_insert_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which) +void rnd_r_insert_entry(rnd_rtree_t *rtree, const rnd_box_t *which) { assert(which != NULL); rnd_rtree_insert(rtree, (void *)which, (rnd_rtree_box_t *)which); /* assumes first field is the bounding box */ } -void rnd_r_insert_array(rnd_rtree_t *rtree, const rnd_rnd_box_t *boxlist[], rnd_cardinal_t len) +void rnd_r_insert_array(rnd_rtree_t *rtree, const rnd_box_t *boxlist[], rnd_cardinal_t len) { rnd_cardinal_t n; @@ -73,13 +73,13 @@ rnd_r_insert_entry(rtree, boxlist[n]); } -rnd_bool rnd_r_delete_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which) +rnd_bool rnd_r_delete_entry(rnd_rtree_t *rtree, const rnd_box_t *which) { assert(which != NULL); return rnd_rtree_delete(rtree, (void *)which, (rnd_rtree_box_t *)which) == 0; /* assumes first field is the bounding box */ } -rnd_bool rnd_r_delete_entry_free_data(rnd_rtree_t *rtree, rnd_rnd_box_t *box, void (*free_data)(void *d)) +rnd_bool rnd_r_delete_entry_free_data(rnd_rtree_t *rtree, rnd_box_t *box, void (*free_data)(void *d)) { void *obj = box; /* assumes first field is the bounding box */ assert(obj != NULL); @@ -90,8 +90,8 @@ } typedef struct { - rnd_r_dir_t (*region_in_search)(const rnd_rnd_box_t *region, void *closure); - rnd_r_dir_t (*rectangle_in_region)(const rnd_rnd_box_t *box, void *closure); + rnd_r_dir_t (*region_in_search)(const rnd_box_t *region, void *closure); + rnd_r_dir_t (*rectangle_in_region)(const rnd_box_t *box, void *closure); void *clo; } r_cb_t; @@ -98,19 +98,19 @@ static rnd_rtree_dir_t r_cb_node(void *ctx_, void *obj, const rnd_rtree_box_t *box) { r_cb_t *ctx = (r_cb_t *)ctx_; - return ctx->region_in_search((const rnd_rnd_box_t *)box, ctx->clo); + return ctx->region_in_search((const rnd_box_t *)box, ctx->clo); } static rnd_rtree_dir_t r_cb_obj(void *ctx_, void *obj, const rnd_rtree_box_t *box) { r_cb_t *ctx = (r_cb_t *)ctx_; - return ctx->rectangle_in_region((const rnd_rnd_box_t *)obj, ctx->clo); + return ctx->rectangle_in_region((const rnd_box_t *)obj, ctx->clo); } -rnd_r_dir_t rnd_r_search(rnd_rtree_t *rtree, const rnd_rnd_box_t *query, - rnd_r_dir_t (*region_in_search)(const rnd_rnd_box_t *region, void *closure), - rnd_r_dir_t (*rectangle_in_region)(const rnd_rnd_box_t *box, void *closure), +rnd_r_dir_t rnd_r_search(rnd_rtree_t *rtree, const rnd_box_t *query, + rnd_r_dir_t (*region_in_search)(const rnd_box_t *region, void *closure), + rnd_r_dir_t (*rectangle_in_region)(const rnd_box_t *box, void *closure), void *closure, int *num_found) { rnd_r_dir_t res; @@ -131,7 +131,7 @@ return res; } -int rnd_r_region_is_empty(rnd_rtree_t *rtree, const rnd_rnd_box_t *region) +int rnd_r_region_is_empty(rnd_rtree_t *rtree, const rnd_box_t *region) { return rnd_rtree_is_box_empty(rtree, (const rnd_rtree_box_t *)region); } @@ -155,16 +155,16 @@ free(o); } -rnd_rnd_box_t *rnd_r_first(rnd_rtree_t *tree, rnd_rtree_it_t *it) +rnd_box_t *rnd_r_first(rnd_rtree_t *tree, rnd_rtree_it_t *it) { if (tree == NULL) return NULL; - return (rnd_rnd_box_t *)rnd_rtree_all_first(it, tree); + return (rnd_box_t *)rnd_rtree_all_first(it, tree); } -rnd_rnd_box_t *rnd_r_next(rnd_rtree_it_t *it) +rnd_box_t *rnd_r_next(rnd_rtree_it_t *it) { - return (rnd_rnd_box_t *)rnd_rtree_all_next(it); + return (rnd_box_t *)rnd_rtree_all_next(it); } void rnd_r_end(rnd_rtree_it_t *it) Index: trunk/src/librnd/poly/rtree2_compat.h =================================================================== --- trunk/src/librnd/poly/rtree2_compat.h (revision 31800) +++ trunk/src/librnd/poly/rtree2_compat.h (revision 31801) @@ -54,11 +54,11 @@ void rnd_r_destroy_tree(rnd_rtree_t **tree); void rnd_r_free_tree_data(rnd_rtree_t *rtree, void (*free)(void *ptr)); -void rnd_r_insert_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which); -void rnd_r_insert_array(rnd_rtree_t *rtree, const rnd_rnd_box_t *boxlist[], rnd_cardinal_t len); +void rnd_r_insert_entry(rnd_rtree_t *rtree, const rnd_box_t *which); +void rnd_r_insert_array(rnd_rtree_t *rtree, const rnd_box_t *boxlist[], rnd_cardinal_t len); -rnd_bool rnd_r_delete_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which); -rnd_bool rnd_r_delete_entry_free_data(rnd_rtree_t *rtree, rnd_rnd_box_t *box, void (*free_data)(void *d)); +rnd_bool rnd_r_delete_entry(rnd_rtree_t *rtree, const rnd_box_t *which); +rnd_bool rnd_r_delete_entry_free_data(rnd_rtree_t *rtree, rnd_box_t *box, void (*free_data)(void *d)); /* generic search routine */ /* region_in_search should return rnd_true if "what you're looking for" is @@ -72,13 +72,13 @@ * Look at the implementation of r_region_is_empty for how to * abort the search if that is the desired behavior. */ -rnd_r_dir_t rnd_r_search(rnd_rtree_t *rtree, const rnd_rnd_box_t *query, - rnd_r_dir_t (*region_in_search)(const rnd_rnd_box_t *region, void *closure), - rnd_r_dir_t (*rectangle_in_region)(const rnd_rnd_box_t *box, void *closure), +rnd_r_dir_t rnd_r_search(rnd_rtree_t *rtree, const rnd_box_t *query, + rnd_r_dir_t (*region_in_search)(const rnd_box_t *region, void *closure), + rnd_r_dir_t (*rectangle_in_region)(const rnd_box_t *box, void *closure), void *closure, int *num_found); /* return 0 if there are any rectangles in the given region. */ -int rnd_r_region_is_empty(rnd_rtree_t *rtree, const rnd_rnd_box_t *region); +int rnd_r_region_is_empty(rnd_rtree_t *rtree, const rnd_box_t *region); void rnd_r_dump_tree(rnd_rtree_t *root, int unused); @@ -87,10 +87,10 @@ /* -- Iterate through an rtree; DO NOT modify the tree while iterating -- */ /* Get the first item, get fields of iterator set up; return can be casted to an object; returns NULL if rtree is empty */ -rnd_rnd_box_t *rnd_r_first(rnd_rtree_t *tree, rnd_rtree_it_t *it); +rnd_box_t *rnd_r_first(rnd_rtree_t *tree, rnd_rtree_it_t *it); /* Get the next item, return can be casted to an object; returns NULL if no more items */ -rnd_rnd_box_t *rnd_r_next(rnd_rtree_it_t *it); +rnd_box_t *rnd_r_next(rnd_rtree_it_t *it); /* Free fields of the iterator - not needed anymore, will be removed */ void rnd_r_end(rnd_rtree_it_t *it); Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 31800) +++ trunk/src/obj_arc.c (revision 31801) @@ -101,13 +101,13 @@ } /* computes the bounding box of an arc */ -static rnd_rnd_box_t pcb_arc_bbox_(const pcb_arc_t *Arc, int mini) +static rnd_box_t pcb_arc_bbox_(const pcb_arc_t *Arc, int mini) { double ca1, ca2, sa1, sa2; double minx, maxx, miny, maxy, delta; rnd_angle_t ang1, ang2; rnd_coord_t width; - rnd_rnd_box_t res; + rnd_box_t res; /* first put angles into standard form: * ang1 < ang2, both angles between 0 and 720 */ @@ -190,12 +190,12 @@ new_sa = 0; } pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); pcb_undo_add_obj_to_change_angles(PCB_OBJ_ARC, a, a, a); a->StartAngle = new_sa; a->Delta = new_da; pcb_arc_bbox(a); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); } @@ -203,12 +203,12 @@ void pcb_arc_set_radii(pcb_layer_t *Layer, pcb_arc_t *a, rnd_coord_t new_width, rnd_coord_t new_height) { pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); pcb_undo_add_obj_to_change_radii(PCB_OBJ_ARC, a, a, a); a->Width = new_width; a->Height = new_height; pcb_arc_bbox(a); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); } @@ -221,7 +221,7 @@ if ((prevent_dups) && (Layer->arc_tree != NULL)) { rnd_rtree_it_t it; pcb_any_obj_t *o; - rnd_rnd_box_t b; + rnd_box_t b; b.X1 = X1 - width; b.Y1 = Y1 - height; @@ -282,7 +282,7 @@ pcb_arc_bbox(Arc); if (!Layer->arc_tree) Layer->arc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); Arc->type = PCB_OBJ_ARC; PCB_SET_PARENT(Arc, layer, Layer); } @@ -292,7 +292,7 @@ void pcb_arc_free(pcb_arc_t *arc) { if ((arc->parent.layer != NULL) && (arc->parent.layer->arc_tree != NULL)) - rnd_r_delete_entry(arc->parent.layer->arc_tree, (rnd_rnd_box_t *)arc); + rnd_r_delete_entry(arc->parent.layer->arc_tree, (rnd_box_t *)arc); rnd_attribute_free(&arc->Attributes); pcb_arc_unreg(arc); pcb_obj_common_free((pcb_any_obj_t *)arc); @@ -352,7 +352,7 @@ + (double)arc->Thickness * (double)arc->Thickness * (double)M_PI); /* cap circles */ } -rnd_rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc) +rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc) { return pcb_arc_bbox_(arc, 1); } @@ -363,7 +363,7 @@ if (ly == NULL) return; if (ly->arc_tree != NULL) - rnd_r_delete_entry(ly->arc_tree, (rnd_rnd_box_t *)arc); + rnd_r_delete_entry(ly->arc_tree, (rnd_box_t *)arc); pcb_poly_restore_to_poly(ly->parent.data, PCB_OBJ_ARC, ly, arc); } @@ -373,7 +373,7 @@ if (ly == NULL) return; if (ly->arc_tree != NULL) - rnd_r_insert_entry(ly->arc_tree, (rnd_rnd_box_t *)arc); + rnd_r_insert_entry(ly->arc_tree, (rnd_box_t *)arc); pcb_poly_clear_from_poly(ly->parent.data, PCB_OBJ_ARC, ly, arc); } @@ -397,7 +397,7 @@ pcb_layer_t *layer = g->arc->parent.layer; if (layer->arc_tree != NULL) - rnd_r_delete_entry(layer->arc_tree, (rnd_rnd_box_t *)g->arc); + rnd_r_delete_entry(layer->arc_tree, (rnd_box_t *)g->arc); pcb_poly_restore_to_poly(layer->parent.data, PCB_OBJ_ARC, layer, g->arc); rnd_swap(rnd_coord_t, g->Thickness, g->arc->Thickness); @@ -411,7 +411,7 @@ pcb_arc_bbox(g->arc); if (layer->arc_tree != NULL) - rnd_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *)g->arc); + rnd_r_insert_entry(layer->arc_tree, (rnd_box_t *)g->arc); pcb_poly_clear_from_poly(layer->parent.data, PCB_OBJ_ARC, layer, g->arc); return 0; @@ -467,7 +467,7 @@ } pcb_poly_restore_to_poly(ctx->buffer.src, PCB_OBJ_ARC, srcly, arc); - rnd_r_delete_entry(srcly->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_delete_entry(srcly->arc_tree, (rnd_box_t *) arc); pcb_arc_unreg(arc); pcb_arc_reg(dstly, arc); @@ -476,7 +476,7 @@ if (!dstly->arc_tree) dstly->arc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dstly->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_insert_entry(dstly->arc_tree, (rnd_box_t *) arc); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_OBJ_ARC, dstly, arc); return arc; @@ -497,11 +497,11 @@ if (value <= PCB_MAX_THICKNESS && value >= PCB_MIN_THICKNESS && value != Arc->Thickness) { pcb_undo_add_obj_to_size(PCB_OBJ_ARC, Layer, Arc, Arc); pcb_arc_invalidate_erase(Arc); - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); Arc->Thickness = value; pcb_arc_bbox(Arc); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -524,11 +524,11 @@ if (value != Arc->Clearance) { pcb_undo_add_obj_to_clear_size(PCB_OBJ_ARC, Layer, Arc, Arc); pcb_arc_invalidate_erase(Arc); - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); Arc->Clearance = value; pcb_arc_bbox(Arc); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -561,11 +561,11 @@ if (value != *dst) { pcb_undo_add_obj_to_change_radii(PCB_OBJ_ARC, Layer, Arc, Arc); pcb_arc_invalidate_erase(Arc); - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); *dst = value; pcb_arc_bbox(Arc); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -600,11 +600,11 @@ if (value != *dst) { pcb_undo_add_obj_to_change_angles(PCB_OBJ_ARC, Layer, Arc, Arc); pcb_arc_invalidate_erase(Arc); - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); *dst = value; pcb_arc_bbox(Arc); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -683,10 +683,10 @@ void *pcb_arcop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arcop_move_noclip(ctx, Layer, Arc); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); return Arc; } @@ -694,11 +694,11 @@ void *pcb_arcop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { if (ctx->clip.restore) { - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); } if (ctx->clip.clear) { - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); } return Arc; @@ -707,7 +707,7 @@ /* moves an arc between layers; lowlevel routines */ void *pcb_arcop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_arc_t * arc, pcb_layer_t * Destination) { - rnd_r_delete_entry(Source->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_delete_entry(Source->arc_tree, (rnd_box_t *) arc); pcb_arc_unreg(arc); pcb_arc_reg(Destination, arc); @@ -714,7 +714,7 @@ if (!Destination->arc_tree) Destination->arc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Destination->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_insert_entry(Destination->arc_tree, (rnd_box_t *) arc); return arc; } @@ -747,7 +747,7 @@ /* destroys an arc from a layer */ void *pcb_arcop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_arc_free(Arc); return NULL; @@ -804,11 +804,11 @@ void pcb_arc_rotate(pcb_layer_t *layer, pcb_arc_t *arc, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, rnd_angle_t angle) { if (layer->arc_tree != NULL) - rnd_r_delete_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_delete_entry(layer->arc_tree, (rnd_box_t *) arc); rnd_rotate(&arc->X, &arc->Y, X, Y, cosa, sina); arc->StartAngle = rnd_normalize_angle(arc->StartAngle + angle); if (layer->arc_tree != NULL) - rnd_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_insert_entry(layer->arc_tree, (rnd_box_t *) arc); } void pcb_arc_mirror(pcb_arc_t *arc, rnd_coord_t y_offs, rnd_bool undoable) @@ -833,13 +833,13 @@ void pcb_arc_flip_side(pcb_layer_t *layer, pcb_arc_t *arc) { - rnd_r_delete_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_delete_entry(layer->arc_tree, (rnd_box_t *) arc); arc->X = PCB_SWAP_X(arc->X); arc->Y = PCB_SWAP_Y(arc->Y); arc->StartAngle = RND_SWAP_ANGLE(arc->StartAngle); arc->Delta = RND_SWAP_DELTA(arc->Delta); pcb_arc_bbox(arc); - rnd_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); + rnd_r_insert_entry(layer->arc_tree, (rnd_box_t *) arc); } void pcb_arc_scale(pcb_arc_t *arc, double sx, double sy, double sth) @@ -873,10 +873,10 @@ pcb_arc_invalidate_erase(Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); if (Layer->arc_tree != NULL) - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_arc_rotate90(Arc, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->arc_tree != NULL) - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -1138,7 +1138,7 @@ pcb_arc_draw_(info, arc, allow_term_gfx); } -rnd_r_dir_t pcb_arc_draw_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_arc_draw_callback(const rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *)b; pcb_draw_info_t *info = cl; @@ -1153,7 +1153,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_arc_draw_term_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_arc_draw_term_callback(const rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *)b; pcb_draw_info_t *info = cl; Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 31800) +++ trunk/src/obj_arc.h (revision 31801) @@ -67,7 +67,7 @@ void pcb_arc_mirror(pcb_arc_t *arc, rnd_coord_t y_offs, rnd_bool undoable); void pcb_arc_flip_side(pcb_layer_t *layer, pcb_arc_t *arc); void pcb_arc_scale(pcb_arc_t *arc, double sx, double sy, double sth); -rnd_rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc); +rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc); /*** hash and eq ***/ Index: trunk/src/obj_arc_draw.h =================================================================== --- trunk/src/obj_arc_draw.h (revision 31800) +++ trunk/src/obj_arc_draw.h (revision 31801) @@ -32,8 +32,8 @@ /* Include rtree.h for this */ #ifdef RND_RTREE_H -rnd_r_dir_t pcb_arc_draw_callback(const rnd_rnd_box_t * b, void *cl); -rnd_r_dir_t pcb_arc_draw_term_callback(const rnd_rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_arc_draw_callback(const rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_arc_draw_term_callback(const rnd_box_t * b, void *cl); #endif void pcb_arc_draw_(pcb_draw_info_t *info, pcb_arc_t *arc, int allow_term_gfx); Index: trunk/src/obj_arc_ui.c =================================================================== --- trunk/src/obj_arc_ui.c (revision 31800) +++ trunk/src/obj_arc_ui.c (revision 31801) @@ -133,7 +133,7 @@ } -int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_rnd_box_t *res) +int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_box_t *res) { pcb_arc_t *arc = Ptr2; int *end_pt = Ptr3; Index: trunk/src/obj_arc_ui.h =================================================================== --- trunk/src/obj_arc_ui.h (revision 31800) +++ trunk/src/obj_arc_ui.h (revision 31801) @@ -28,6 +28,6 @@ #include "crosshair.h" void pcb_arc_ui_move_or_copy(pcb_crosshair_t *ch); -int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_rnd_box_t *res); +int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_box_t *res); void pcb_arc_middle(const pcb_arc_t *arc, rnd_coord_t *x, rnd_coord_t *y); Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 31800) +++ trunk/src/obj_common.c (revision 31801) @@ -74,7 +74,7 @@ /* returns a pointer to an objects bounding box; * data is valid until the routine is called again */ -int pcb_obj_get_bbox_naked(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_rnd_box_t *res) +int pcb_obj_get_bbox_naked(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_box_t *res) { switch (Type) { case PCB_OBJ_LINE: @@ -91,13 +91,13 @@ case PCB_OBJ_POLY_POINT: case PCB_OBJ_LINE_POINT: case PCB_OBJ_GFX_POINT: - *res = *(rnd_rnd_box_t *)Ptr3; + *res = *(rnd_box_t *)Ptr3; return 0; case PCB_OBJ_ARC_POINT: return pcb_obj_ui_arc_point_bbox(Type, Ptr1, Ptr2, Ptr3, res); default: rnd_message(RND_MSG_ERROR, "Request for bounding box of unsupported type %d\n", Type); - *res = *(rnd_rnd_box_t *)Ptr2; + *res = *(rnd_box_t *)Ptr2; return -1; } } Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 31800) +++ trunk/src/obj_common.h (revision 31801) @@ -85,7 +85,7 @@ /* point and box type - they are so common everything depends on them */ struct rnd_point_s { /* a line/polygon point */ - rnd_coord_t X, Y, X2, Y2; /* so Point type can be cast as rnd_rnd_box_t */ + rnd_coord_t X, Y, X2, Y2; /* so Point type can be cast as rnd_box_t */ long int ID; }; @@ -169,7 +169,7 @@ pcb_flag_values_t pcb_obj_valid_flags(unsigned long int objtype); -int pcb_obj_get_bbox_naked(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_rnd_box_t *res); +int pcb_obj_get_bbox_naked(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_box_t *res); /* Host transformations: typically the transformations an object of a subc inherits from the subc */ @@ -214,13 +214,13 @@ /* Any object that ends up in common use as pcb_any_obj_t, MUST be defined using this as the first fieldsusing the following macros. */ #define PCB_ANY_OBJ_FIELDS \ - rnd_rnd_box_t BoundingBox; \ + rnd_box_t BoundingBox; \ long int ID; \ pcb_flag_t Flags; \ pcb_objtype_t type; \ pcb_parenttype_t parent_type; \ pcb_parent_t parent; \ - rnd_rnd_box_t bbox_naked; \ + rnd_box_t bbox_naked; \ rnd_attribute_list_t Attributes \ #define PCB_ANY_PRIMITIVE_FIELDS \ Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 31800) +++ trunk/src/obj_gfx.c (revision 31801) @@ -99,9 +99,9 @@ } /* computes the bounding box of a gfx */ -static rnd_rnd_box_t pcb_gfx_bbox_(const pcb_gfx_t *gfx) +static rnd_box_t pcb_gfx_bbox_(const pcb_gfx_t *gfx) { - rnd_rnd_box_t res = {+RND_COORD_MAX, +RND_COORD_MAX, -RND_COORD_MAX, -RND_COORD_MAX}; + rnd_box_t res = {+RND_COORD_MAX, +RND_COORD_MAX, -RND_COORD_MAX, -RND_COORD_MAX}; int n; for(n = 0; n < 4; n++) rnd_box_bump_point(&res, gfx->corner[n].X, gfx->corner[n].Y); @@ -196,7 +196,7 @@ pcb_gfx_bbox(gfx); if (!Layer->gfx_tree) Layer->gfx_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_insert_entry(Layer->gfx_tree, (rnd_box_t *)gfx); gfx->type = PCB_OBJ_GFX; PCB_SET_PARENT(gfx, layer, Layer); } @@ -206,7 +206,7 @@ void pcb_gfx_free(pcb_gfx_t *gfx) { if ((gfx->parent.layer != NULL) && (gfx->parent.layer->gfx_tree != NULL)) - rnd_r_delete_entry(gfx->parent.layer->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_delete_entry(gfx->parent.layer->gfx_tree, (rnd_box_t *)gfx); rnd_attribute_free(&gfx->Attributes); pcb_gfx_unreg(gfx); pcb_obj_common_free((pcb_any_obj_t *)gfx); @@ -250,7 +250,7 @@ if (ly == NULL) return; if (ly->gfx_tree != NULL) - rnd_r_delete_entry(ly->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_delete_entry(ly->gfx_tree, (rnd_box_t *)gfx); } void pcb_gfx_post(pcb_gfx_t *gfx) @@ -260,7 +260,7 @@ if (ly == NULL) return; if (ly->gfx_tree != NULL) - rnd_r_insert_entry(ly->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_insert_entry(ly->gfx_tree, (rnd_box_t *)gfx); } /***** operations *****/ @@ -279,7 +279,7 @@ pcb_layer_t *layer = g->gfx->parent.layer; if (layer->gfx_tree != NULL) - rnd_r_delete_entry(layer->gfx_tree, (rnd_rnd_box_t *)g->gfx); + rnd_r_delete_entry(layer->gfx_tree, (rnd_box_t *)g->gfx); rnd_swap(rnd_coord_t, g->cx, g->gfx->cx); rnd_swap(rnd_coord_t, g->cy, g->gfx->cy); @@ -293,7 +293,7 @@ pcb_gfx_update(g->gfx); pcb_gfx_bbox(g->gfx); if (layer->gfx_tree != NULL) - rnd_r_insert_entry(layer->gfx_tree, (rnd_rnd_box_t *)g->gfx); + rnd_r_insert_entry(layer->gfx_tree, (rnd_box_t *)g->gfx); return 0; } @@ -347,7 +347,7 @@ dstly = &ctx->buffer.dst->Layer[lid]; } - rnd_r_delete_entry(srcly->gfx_tree, (rnd_rnd_box_t *) gfx); + rnd_r_delete_entry(srcly->gfx_tree, (rnd_box_t *) gfx); pcb_gfx_unreg(gfx); pcb_gfx_reg(dstly, gfx); @@ -356,7 +356,7 @@ if (!dstly->gfx_tree) dstly->gfx_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dstly->gfx_tree, (rnd_rnd_box_t *) gfx); + rnd_r_insert_entry(dstly->gfx_tree, (rnd_box_t *) gfx); return gfx; } @@ -405,9 +405,9 @@ void *pcb_gfxop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_gfx_t *gfx) { - rnd_r_delete_entry(Layer->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_delete_entry(Layer->gfx_tree, (rnd_box_t *)gfx); pcb_gfxop_move_noclip(ctx, Layer, gfx); - rnd_r_insert_entry(Layer->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_insert_entry(Layer->gfx_tree, (rnd_box_t *)gfx); return gfx; } @@ -414,7 +414,7 @@ /* moves a gfx between layers; lowlevel routines */ void *pcb_gfxop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_gfx_t * gfx, pcb_layer_t * Destination) { - rnd_r_delete_entry(Source->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_delete_entry(Source->gfx_tree, (rnd_box_t *)gfx); pcb_gfx_unreg(gfx); pcb_gfx_reg(Destination, gfx); @@ -421,7 +421,7 @@ if (!Destination->gfx_tree) Destination->gfx_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Destination->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_insert_entry(Destination->gfx_tree, (rnd_box_t *)gfx); return gfx; } @@ -452,7 +452,7 @@ /* destroys a gfx from a layer */ void *pcb_gfxop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_gfx_t *gfx) { - rnd_r_delete_entry(Layer->gfx_tree, (rnd_rnd_box_t *) gfx); + rnd_r_delete_entry(Layer->gfx_tree, (rnd_box_t *) gfx); pcb_gfx_free(gfx); return NULL; @@ -493,7 +493,7 @@ void pcb_gfx_rotate(pcb_layer_t *layer, pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, rnd_angle_t angle) { if (layer->gfx_tree != NULL) - rnd_r_delete_entry(layer->gfx_tree, (rnd_rnd_box_t *) gfx); + rnd_r_delete_entry(layer->gfx_tree, (rnd_box_t *) gfx); gfx->rot = rnd_normalize_angle(gfx->rot + angle); TODO("rotate content") @@ -501,7 +501,7 @@ pcb_gfx_bbox(gfx); if (layer->gfx_tree != NULL) - rnd_r_insert_entry(layer->gfx_tree, (rnd_rnd_box_t *) gfx); + rnd_r_insert_entry(layer->gfx_tree, (rnd_box_t *) gfx); } void pcb_gfx_mirror(pcb_gfx_t *gfx, rnd_coord_t y_offs, rnd_bool undoable) @@ -524,13 +524,13 @@ void pcb_gfx_flip_side(pcb_layer_t *layer, pcb_gfx_t *gfx) { - rnd_r_delete_entry(layer->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_delete_entry(layer->gfx_tree, (rnd_box_t *)gfx); gfx->cx = PCB_SWAP_X(gfx->cx); gfx->cy = PCB_SWAP_Y(gfx->cy); gfx->rot = RND_SWAP_ANGLE(gfx->rot); pcb_gfx_update(gfx); pcb_gfx_bbox(gfx); - rnd_r_insert_entry(layer->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_insert_entry(layer->gfx_tree, (rnd_box_t *)gfx); } void pcb_gfx_chg_geo(pcb_gfx_t *gfx, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, rnd_angle_t rot, rnd_bool undoable) @@ -572,10 +572,10 @@ { pcb_gfx_invalidate_erase(gfx); if (Layer->gfx_tree != NULL) - rnd_r_delete_entry(Layer->gfx_tree, (rnd_rnd_box_t *) gfx); + rnd_r_delete_entry(Layer->gfx_tree, (rnd_box_t *) gfx); pcb_gfx_rotate90(gfx, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->gfx_tree != NULL) - rnd_r_insert_entry(Layer->gfx_tree, (rnd_rnd_box_t *) gfx); + rnd_r_insert_entry(Layer->gfx_tree, (rnd_box_t *) gfx); pcb_gfx_invalidate_draw(Layer, gfx); return gfx; } @@ -938,7 +938,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_gfx_draw_under_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_gfx_draw_under_callback(const rnd_box_t *b, void *cl) { pcb_gfx_t *gfx = (pcb_gfx_t *)b; if (!gfx->render_under) @@ -946,7 +946,7 @@ return pcb_gfx_draw_callback_(gfx, cl); } -rnd_r_dir_t pcb_gfx_draw_above_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_gfx_draw_above_callback(const rnd_box_t *b, void *cl) { pcb_gfx_t *gfx = (pcb_gfx_t *)b; if (gfx->render_under) Index: trunk/src/obj_gfx_draw.h =================================================================== --- trunk/src/obj_gfx_draw.h (revision 31800) +++ trunk/src/obj_gfx_draw.h (revision 31801) @@ -31,8 +31,8 @@ /* Include rtree.h for this */ #ifdef RND_RTREE_H -rnd_r_dir_t pcb_gfx_draw_under_callback(const rnd_rnd_box_t * b, void *cl); -rnd_r_dir_t pcb_gfx_draw_above_callback(const rnd_rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_gfx_draw_under_callback(const rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_gfx_draw_above_callback(const rnd_box_t * b, void *cl); #endif void pcb_gfx_draw_(pcb_draw_info_t *info, pcb_gfx_t *gfx, int allow_term_gfx); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 31800) +++ trunk/src/obj_line.c (revision 31801) @@ -110,7 +110,7 @@ void pcb_line_free(pcb_line_t *line) { if ((line->parent.layer != NULL) && (line->parent.layer->line_tree != NULL)) - rnd_r_delete_entry(line->parent.layer->line_tree, (rnd_rnd_box_t *)line); + rnd_r_delete_entry(line->parent.layer->line_tree, (rnd_box_t *)line); rnd_attribute_free(&line->Attributes); pcb_line_unreg(line); pcb_obj_common_free((pcb_any_obj_t *)line); @@ -134,7 +134,7 @@ pcb_layer_t *layer = g->line->parent.layer; if (layer->line_tree != NULL) - rnd_r_delete_entry(layer->line_tree, (rnd_rnd_box_t *)g->line); + rnd_r_delete_entry(layer->line_tree, (rnd_box_t *)g->line); pcb_poly_restore_to_poly(layer->parent.data, PCB_OBJ_LINE, layer, g->line); rnd_swap(rnd_point_t, g->Point1, g->line->Point1); @@ -144,7 +144,7 @@ pcb_line_bbox(g->line); if (layer->line_tree != NULL) - rnd_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *)g->line); + rnd_r_insert_entry(layer->line_tree, (rnd_box_t *)g->line); pcb_poly_clear_from_poly(layer->parent.data, PCB_OBJ_LINE, layer, g->line); return 0; @@ -239,7 +239,7 @@ } -static rnd_r_dir_t line_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t line_callback(const rnd_box_t * b, void *cl) { int res; pcb_line_t *line = (pcb_line_t *) b; @@ -260,7 +260,7 @@ pcb_line_t *pcb_line_new_merge(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags) { struct line_info info = {0}; - rnd_rnd_box_t search; + rnd_box_t search; search.X1 = MIN(X1, X2); search.X2 = MAX(X1, X2); @@ -350,12 +350,12 @@ pcb_line_bbox(Line); if (!Layer->line_tree) Layer->line_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); Line->parent.layer = Layer; Line->parent_type = PCB_PARENT_LAYER; } -static void pcb_line_bbox_(const pcb_line_t *Line, rnd_rnd_box_t *dst, int mini) +static void pcb_line_bbox_(const pcb_line_t *Line, rnd_box_t *dst, int mini) { rnd_coord_t width = mini ? (Line->Thickness + 1) / 2 : (Line->Thickness + Line->Clearance + 1) / 2; @@ -465,7 +465,7 @@ if (ly == NULL) return; if (ly->line_tree != NULL) - rnd_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)line); + rnd_r_delete_entry(ly->line_tree, (rnd_box_t *)line); pcb_poly_restore_to_poly(ly->parent.data, PCB_OBJ_LINE, ly, line); } @@ -475,7 +475,7 @@ if (ly == NULL) return; if (ly->line_tree != NULL) - rnd_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)line); + rnd_r_insert_entry(ly->line_tree, (rnd_box_t *)line); pcb_poly_clear_from_poly(ly->parent.data, PCB_OBJ_LINE, ly, line); } @@ -516,7 +516,7 @@ } pcb_poly_restore_to_poly(ctx->buffer.src, PCB_OBJ_LINE, srcly, line); - rnd_r_delete_entry(srcly->line_tree, (rnd_rnd_box_t *)line); + rnd_r_delete_entry(srcly->line_tree, (rnd_box_t *)line); pcb_line_unreg(line); pcb_line_reg(dstly, line); @@ -525,7 +525,7 @@ if (!dstly->line_tree) dstly->line_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dstly->line_tree, (rnd_rnd_box_t *)line); + rnd_r_insert_entry(dstly->line_tree, (rnd_box_t *)line); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_OBJ_LINE, dstly, line); return line; @@ -541,11 +541,11 @@ if (value <= PCB_MAX_THICKNESS && value >= PCB_MIN_THICKNESS && value != Line->Thickness) { pcb_undo_add_obj_to_size(PCB_OBJ_LINE, Layer, Line, Line); pcb_line_invalidate_erase(Line); - rnd_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); pcb_poly_restore_to_poly(ctx->chgsize.pcb->Data, PCB_OBJ_LINE, Layer, Line); Line->Thickness = value; pcb_line_bbox(Line); - rnd_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); pcb_poly_clear_from_poly(ctx->chgsize.pcb->Data, PCB_OBJ_LINE, Layer, Line); pcb_line_invalidate_draw(Layer, Line); return Line; @@ -569,10 +569,10 @@ pcb_undo_add_obj_to_clear_size(PCB_OBJ_LINE, Layer, Line, Line); pcb_poly_restore_to_poly(ctx->chgsize.pcb->Data, PCB_OBJ_LINE, Layer, Line); pcb_line_invalidate_erase(Line); - rnd_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); Line->Clearance = value; pcb_line_bbox(Line); - rnd_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); pcb_poly_clear_from_poly(ctx->chgsize.pcb->Data, PCB_OBJ_LINE, Layer, Line); pcb_line_invalidate_draw(Layer, Line); return Line; @@ -649,12 +649,12 @@ void *pcb_lineop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { if (Layer->line_tree != NULL) - rnd_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); if (ctx->move.pcb != NULL) pcb_poly_restore_to_poly(ctx->move.pcb->Data, PCB_OBJ_LINE, Layer, Line); pcb_lineop_move_noclip(ctx, Layer, Line); if (Layer->line_tree != NULL) - rnd_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); if (ctx->move.pcb != NULL) pcb_poly_clear_from_poly(ctx->move.pcb->Data, PCB_OBJ_LINE, Layer, Line); return Line; @@ -663,12 +663,12 @@ void *pcb_lineop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { if (ctx->clip.restore) { - rnd_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); if (ctx->clip.pcb != NULL) pcb_poly_restore_to_poly(ctx->clip.pcb->Data, PCB_OBJ_LINE, Layer, Line); } if (ctx->clip.clear) { - rnd_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); if (ctx->clip.pcb != NULL) pcb_poly_clear_from_poly(ctx->clip.pcb->Data, PCB_OBJ_LINE, Layer, Line); } @@ -753,7 +753,7 @@ /* moves a line between layers; lowlevel routines */ void *pcb_lineop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_line_t * line, pcb_layer_t * Destination) { - rnd_r_delete_entry(Source->line_tree, (rnd_rnd_box_t *) line); + rnd_r_delete_entry(Source->line_tree, (rnd_box_t *) line); pcb_line_unreg(line); pcb_line_reg(Destination, line); @@ -760,7 +760,7 @@ if (!Destination->line_tree) Destination->line_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Destination->line_tree, (rnd_rnd_box_t *) line); + rnd_r_insert_entry(Destination->line_tree, (rnd_box_t *) line); return line; } @@ -773,7 +773,7 @@ jmp_buf env; }; -static rnd_r_dir_t moveline_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t moveline_callback(const rnd_box_t * b, void *cl) { struct via_info *i = (struct via_info *) cl; pcb_pstk_t *ps; @@ -789,7 +789,7 @@ void *pcb_lineop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * Layer, pcb_line_t * Line) { struct via_info info; - rnd_rnd_box_t sb; + rnd_box_t sb; pcb_line_t *newone; void *ptr1, *ptr2, *ptr3; @@ -850,7 +850,7 @@ /* destroys a line from a layer */ void *pcb_lineop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { - rnd_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); pcb_line_free(Line); return NULL; @@ -862,7 +862,7 @@ pcb_line_t *line; rnd_point_t *point; }; -static rnd_r_dir_t remove_point(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t remove_point(const rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct rlp_info *info = (struct rlp_info *) cl; @@ -895,7 +895,7 @@ info.line = Line; info.point = Point; if (setjmp(info.env) == 0) { - rnd_r_search(Layer->line_tree, (const rnd_rnd_box_t *) Point, NULL, remove_point, &info, NULL); + rnd_r_search(Layer->line_tree, (const rnd_box_t *) Point, NULL, remove_point, &info, NULL); return pcb_lineop_remove(ctx, Layer, Line); } pcb_move_obj(PCB_OBJ_LINE_POINT, Layer, info.line, info.point, other.X - Point->X, other.Y - Point->Y); @@ -954,12 +954,12 @@ void pcb_line_rotate(pcb_layer_t *layer, pcb_line_t *line, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina) { if (layer->line_tree != NULL) - rnd_r_delete_entry(layer->line_tree, (rnd_rnd_box_t *) line); + rnd_r_delete_entry(layer->line_tree, (rnd_box_t *) line); rnd_rotate(&line->Point1.X, &line->Point1.Y, X, Y, cosa, sina); rnd_rotate(&line->Point2.X, &line->Point2.Y, X, Y, cosa, sina); pcb_line_bbox(line); if (layer->line_tree != NULL) - rnd_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *) line); + rnd_r_insert_entry(layer->line_tree, (rnd_box_t *) line); } void pcb_line_mirror(pcb_line_t *line, rnd_coord_t y_offs, rnd_bool undoable) @@ -1008,13 +1008,13 @@ void pcb_line_flip_side(pcb_layer_t *layer, pcb_line_t *line) { - rnd_r_delete_entry(layer->line_tree, (rnd_rnd_box_t *) line); + rnd_r_delete_entry(layer->line_tree, (rnd_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); - rnd_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *) line); + rnd_r_insert_entry(layer->line_tree, (rnd_box_t *) line); } static void rotate_line1(pcb_layer_t *Layer, pcb_line_t *Line) @@ -1024,10 +1024,10 @@ if (!Layer->is_bound) pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_LINE, Layer, Line); if (Layer->line_tree != NULL) - rnd_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); } else - rnd_r_delete_entry(PCB->Data->rat_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(PCB->Data->rat_tree, (rnd_box_t *) Line); } static void rotate_line2(pcb_layer_t *Layer, pcb_line_t *Line) @@ -1035,13 +1035,13 @@ pcb_line_bbox(Line); if (Layer) { if (Layer->line_tree != NULL) - rnd_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); if (!Layer->is_bound) pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_LINE, Layer, Line); pcb_line_invalidate_draw(Layer, Line); } else { - rnd_r_insert_entry(PCB->Data->rat_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(PCB->Data->rat_tree, (rnd_box_t *) Line); pcb_rat_invalidate_draw((pcb_rat_t *) Line); } } @@ -1086,12 +1086,12 @@ Y = Line->Point2.Y; pcb_undo_add_obj_to_move(PCB_OBJ_LINE_POINT, Layer, Line, &Line->Point2, ctx->insert.x - X, ctx->insert.y - Y); pcb_line_invalidate_erase(Line); - rnd_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_LINE, Layer, Line); Line->Point2.X = ctx->insert.x; Line->Point2.Y = ctx->insert.y; pcb_line_bbox(Line); - rnd_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); + rnd_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_LINE, Layer, Line); pcb_line_invalidate_draw(Layer, Line); /* we must create after playing with Line since creation may @@ -1261,7 +1261,7 @@ pcb_line_draw_(info, line, allow_term_gfx); } -rnd_r_dir_t pcb_line_draw_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_line_draw_callback(const rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *)b; pcb_draw_info_t *info = cl; @@ -1276,7 +1276,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_line_draw_term_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_line_draw_term_callback(const rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *)b; pcb_draw_info_t *info = cl; Index: trunk/src/obj_line_draw.h =================================================================== --- trunk/src/obj_line_draw.h (revision 31800) +++ trunk/src/obj_line_draw.h (revision 31801) @@ -32,8 +32,8 @@ /* Include rtree.h for this */ #ifdef RND_RTREE_H -rnd_r_dir_t pcb_line_draw_callback(const rnd_rnd_box_t * b, void *cl); -rnd_r_dir_t pcb_line_draw_term_callback(const rnd_rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_line_draw_callback(const rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_line_draw_term_callback(const rnd_box_t * b, void *cl); #endif void pcb_line_draw_(pcb_draw_info_t *info, pcb_line_t *line, int allow_term_gfx); Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 31800) +++ trunk/src/obj_line_drcenf.c (revision 31801) @@ -195,7 +195,7 @@ jmp_buf env; }; -static rnd_r_dir_t drcPstk_callback(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t drcPstk_callback(const rnd_box_t *b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; struct drc_info *i = (struct drc_info *)cl; @@ -205,7 +205,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t drcLine_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t drcLine_callback(const rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct drc_info *i = (struct drc_info *) cl; @@ -215,7 +215,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t drcArc_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t drcArc_callback(const rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *) b; struct drc_info *i = (struct drc_info *) cl; Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 31800) +++ trunk/src/obj_poly.c (revision 31801) @@ -110,7 +110,7 @@ void pcb_poly_free(pcb_poly_t *poly) { if ((poly->parent.layer != NULL) && (poly->parent.layer->polygon_tree != NULL)) - rnd_r_delete_entry(poly->parent.layer->polygon_tree, (rnd_rnd_box_t *)poly); + rnd_r_delete_entry(poly->parent.layer->polygon_tree, (rnd_box_t *)poly); rnd_attribute_free(&poly->Attributes); pcb_poly_unreg(poly); pcb_obj_common_free((pcb_any_obj_t *)poly); @@ -193,7 +193,7 @@ void pcb_poly_rotate(pcb_layer_t *layer, pcb_poly_t *polygon, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina) { if (layer->polygon_tree != NULL) - rnd_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_delete_entry(layer->polygon_tree, (rnd_box_t *) polygon); PCB_POLY_POINT_LOOP(polygon); { rnd_rotate(&point->X, &point->Y, X, Y, cosa, sina); @@ -203,7 +203,7 @@ pcb_poly_init_clip(layer->parent.data, layer, polygon); pcb_poly_bbox(polygon); if (layer->polygon_tree != NULL) - rnd_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); } int pcb_poly_is_valid(pcb_poly_t *p) @@ -293,7 +293,7 @@ pcb_layer_t *layer = g->poly->parent.layer; if (layer->polygon_tree != NULL) - rnd_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *)g->poly); + rnd_r_delete_entry(layer->polygon_tree, (rnd_box_t *)g->poly); PCB_POLY_POINT_LOOP(g->poly); { point->X = PCB_SWAP_X(point->X); @@ -304,7 +304,7 @@ pcb_poly_init_clip(layer->parent.data, layer, g->poly); pcb_poly_bbox(g->poly); if (layer->polygon_tree != NULL) - rnd_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *)g->poly); + rnd_r_insert_entry(layer->polygon_tree, (rnd_box_t *)g->poly); return 0; } @@ -339,7 +339,7 @@ void pcb_poly_flip_side(pcb_layer_t *layer, pcb_poly_t *polygon) { - rnd_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_delete_entry(layer->polygon_tree, (rnd_box_t *) polygon); PCB_POLY_POINT_LOOP(polygon); { point->X = PCB_SWAP_X(point->X); @@ -349,7 +349,7 @@ if (layer->parent_type == PCB_PARENT_DATA) pcb_poly_init_clip(layer->parent.data, layer, polygon); pcb_poly_bbox(polygon); - rnd_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); /* hmmm, how to handle clip */ } @@ -482,7 +482,7 @@ pcb_poly_bbox(polygon); if (!Layer->polygon_tree) Layer->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) polygon); PCB_SET_PARENT(polygon, layer, Layer); pcb_poly_clear_from_poly(Layer->parent.data, PCB_OBJ_POLY, Layer, polygon); } @@ -640,7 +640,7 @@ */ if (!layer->polygon_tree) layer->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); PCB_FLAG_CLEAR(PCB_FLAG_FOUND | ctx->buffer.extraflg, polygon); return polygon; @@ -664,7 +664,7 @@ pcb_poly_pprestore(polygon); - rnd_r_delete_entry(srcly->polygon_tree, (rnd_rnd_box_t *)polygon); + rnd_r_delete_entry(srcly->polygon_tree, (rnd_box_t *)polygon); pcb_poly_unreg(polygon); pcb_poly_reg(dstly, polygon); @@ -673,7 +673,7 @@ if (!dstly->polygon_tree) dstly->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dstly->polygon_tree, (rnd_rnd_box_t *)polygon); + rnd_r_insert_entry(dstly->polygon_tree, (rnd_box_t *)polygon); pcb_poly_ppclear(polygon); return polygon; @@ -700,10 +700,10 @@ pcb_undo_add_obj_to_clear_size(PCB_OBJ_POLY, Layer, poly, poly); pcb_poly_restore_to_poly(ctx->chgsize.pcb->Data, PCB_OBJ_POLY, Layer, poly); pcb_poly_invalidate_erase(poly); - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *)poly); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *)poly); poly->Clearance = value; pcb_poly_bbox(poly); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *)poly); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *)poly); pcb_poly_clear_from_poly(ctx->chgsize.pcb->Data, PCB_OBJ_POLY, Layer, poly); pcb_poly_invalidate_draw(Layer, poly); return poly; @@ -738,13 +738,13 @@ pcb_poly_restore_to_poly(g->data, PCB_OBJ_POLY, layer, g->poly); pcb_poly_invalidate_erase(g->poly); if (layer->polygon_tree != NULL) - rnd_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *)g->poly); + rnd_r_delete_entry(layer->polygon_tree, (rnd_box_t *)g->poly); tmp = g->poly->enforce_clearance; g->poly->enforce_clearance = g->enfc; g->enfc = tmp; pcb_poly_bbox(g->poly); if (layer->polygon_tree != NULL) - rnd_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *)g->poly); + rnd_r_insert_entry(layer->polygon_tree, (rnd_box_t *)g->poly); pcb_poly_clear_from_poly(g->data, PCB_OBJ_POLY, layer, g->poly); if (layer->polygon_tree != NULL) pcb_poly_invalidate_draw(layer, g->poly); @@ -830,7 +830,7 @@ * second, shift the points up to make room for the new point */ pcb_poly_invalidate_erase(Polygon); - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_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]; @@ -845,7 +845,7 @@ pcb_undo_add_obj_to_insert_point(PCB_OBJ_POLY_POINT, Layer, Polygon, &Polygon->Points[ctx->insert.idx]); pcb_poly_bbox(Polygon); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (ctx->insert.forcible || !pcb_poly_remove_excess_points(Layer, Polygon)) pcb_poly_invalidate_draw(Layer, Polygon); @@ -902,10 +902,10 @@ void *pcb_polyop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_pprestore(Polygon); pcb_polyop_move_noclip(ctx, Layer, Polygon); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_ppclear(Polygon); return Polygon; } @@ -913,11 +913,11 @@ void *pcb_polyop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { if (ctx->clip.restore) { - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_pprestore(Polygon); } if (ctx->clip.clear) { - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_ppclear(Polygon); } return Polygon; @@ -929,10 +929,10 @@ if (Layer->meta.real.vis) { pcb_poly_invalidate_erase(Polygon); } - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); RND_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_poly_bbox(Polygon); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_remove_excess_points(Layer, Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (Layer->meta.real.vis) @@ -944,7 +944,7 @@ /* moves a polygon between layers; lowlevel routines */ void *pcb_polyop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_poly_t * polygon, pcb_layer_t * Destination) { - rnd_r_delete_entry(Source->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_delete_entry(Source->polygon_tree, (rnd_box_t *) polygon); pcb_poly_pprestore(polygon); pcb_poly_unreg(polygon); @@ -952,7 +952,7 @@ if (!Destination->polygon_tree) Destination->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Destination->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_insert_entry(Destination->polygon_tree, (rnd_box_t *) polygon); pcb_poly_ppclear(polygon); return polygon; @@ -984,7 +984,7 @@ /* destroys a polygon from a layer */ void *pcb_polyop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_free_fields(Polygon); pcb_poly_free(Polygon); @@ -1010,7 +1010,7 @@ if (contour_points <= 3) return pcb_polyop_remove_counter(ctx, Layer, Polygon, contour); - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -1023,7 +1023,7 @@ Polygon->HoleIndex[i]--; pcb_poly_bbox(Polygon); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); pcb_poly_ppclear(Polygon); return Polygon; @@ -1119,7 +1119,7 @@ /* insert the polygon-point into the undo list */ pcb_undo_add_obj_to_remove_point(PCB_OBJ_POLY_POINT, Layer, Polygon, point_idx); - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -1132,7 +1132,7 @@ Polygon->HoleIndex[i]--; pcb_poly_bbox(Polygon); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_remove_excess_points(Layer, Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); @@ -1156,7 +1156,7 @@ pcb_poly_copy_meta(polygon, Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) polygon); pcb_poly_init_clip(PCB->Data, Layer, polygon); pcb_poly_invalidate_draw(Layer, polygon); pcb_undo_add_obj_to_create(PCB_OBJ_POLY, Layer, polygon, polygon); @@ -1170,10 +1170,10 @@ if (Layer->meta.real.vis) pcb_poly_invalidate_erase(Polygon); if (Layer->polygon_tree != NULL) - rnd_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_rotate90(Polygon, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->polygon_tree != NULL) - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (Layer->meta.real.vis) pcb_poly_invalidate_draw(Layer, Polygon); @@ -1229,7 +1229,7 @@ pcb_poly_pprestore(poly); if (ly->polygon_tree != NULL) - rnd_r_delete_entry(ly->polygon_tree, (rnd_rnd_box_t *)poly); + rnd_r_delete_entry(ly->polygon_tree, (rnd_box_t *)poly); } void pcb_poly_post(pcb_poly_t *poly) @@ -1239,7 +1239,7 @@ return; if (ly->polygon_tree != NULL) - rnd_r_insert_entry(ly->polygon_tree, (rnd_rnd_box_t *)poly); + rnd_r_insert_entry(ly->polygon_tree, (rnd_box_t *)poly); pcb_poly_ppclear(poly); } @@ -1497,7 +1497,7 @@ pcb_poly_draw_(info, polygon, allow_term_gfx); } -rnd_r_dir_t pcb_poly_draw_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_poly_draw_callback(const rnd_box_t * b, void *cl) { pcb_draw_info_t *i = cl; pcb_poly_t *polygon = (pcb_poly_t *) b; @@ -1516,7 +1516,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_poly_draw_term_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_poly_draw_term_callback(const rnd_box_t * b, void *cl) { pcb_draw_info_t *i = cl; pcb_poly_t *polygon = (pcb_poly_t *) b; Index: trunk/src/obj_poly_draw.h =================================================================== --- trunk/src/obj_poly_draw.h (revision 31800) +++ trunk/src/obj_poly_draw.h (revision 31801) @@ -32,8 +32,8 @@ /* Include rtree.h for these */ #ifdef RND_RTREE_H -rnd_r_dir_t pcb_poly_draw_callback(const rnd_rnd_box_t * b, void *cl); -rnd_r_dir_t pcb_poly_draw_term_callback(const rnd_rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_poly_draw_callback(const rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_poly_draw_term_callback(const rnd_box_t * b, void *cl); #endif void pcb_poly_invalidate_erase(pcb_poly_t *Polygon); Index: trunk/src/obj_poly_draw_helper.c =================================================================== --- trunk/src/obj_poly_draw_helper.c (revision 31800) +++ trunk/src/obj_poly_draw_helper.c (revision 31801) @@ -145,7 +145,7 @@ rnd_poly_contours_free(&local_pl); } -static void fill_clipped_contour(rnd_hid_gc_t gc, rnd_pline_t * pl, const rnd_rnd_box_t * clip_box) +static void fill_clipped_contour(rnd_hid_gc_t gc, rnd_pline_t * pl, const rnd_box_t * clip_box) { rnd_pline_t *pl_copy; rnd_polyarea_t *clip_poly; @@ -182,7 +182,7 @@ * lets compute the complete no-holes polygon. */ #define BOUNDS_INSIDE_CLIP_THRESHOLD 0.5 -static int should_compute_no_holes(pcb_poly_t * poly, const rnd_rnd_box_t * clip_box) +static int should_compute_no_holes(pcb_poly_t * poly, const rnd_box_t * clip_box) { rnd_coord_t x1, x2, y1, y2; double poly_bounding_area; @@ -214,7 +214,7 @@ #undef BOUNDS_INSIDE_CLIP_THRESHOLD -static void pcb_dhlp_fill_pcb_polygon(rnd_hid_gc_t gc, pcb_poly_t * poly, const rnd_rnd_box_t * clip_box) +static void pcb_dhlp_fill_pcb_polygon(rnd_hid_gc_t gc, pcb_poly_t * poly, const rnd_box_t * clip_box) { if (!poly->NoHolesValid) { /* If enough of the polygon is on-screen, compute the entire @@ -254,7 +254,7 @@ return 0; } -static void pcb_dhlp_thindraw_pcb_polygon(rnd_hid_gc_t gc, pcb_poly_t * poly, const rnd_rnd_box_t * clip_box) +static void pcb_dhlp_thindraw_pcb_polygon(rnd_hid_gc_t gc, pcb_poly_t * poly, const rnd_box_t * clip_box) { thindraw_contour(gc, poly->Clipped->contours); pcb_poly_holes(poly, clip_box, thindraw_hole_cb, gc); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 31800) +++ trunk/src/obj_pstk.c (revision 31801) @@ -106,7 +106,7 @@ void pcb_pstk_free(pcb_pstk_t *ps) { if ((ps->parent.data != NULL) && (ps->parent.data->padstack_tree != NULL)) - rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); rnd_attribute_free(&ps->Attributes); pcb_pstk_unreg(ps); free(ps->thermals.shape); @@ -152,11 +152,11 @@ pcb_pstk_bbox(ps); if (!data->padstack_tree) data->padstack_tree = rnd_r_create_tree(); - rnd_r_insert_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(data->padstack_tree, (rnd_box_t *)ps); PCB_SET_PARENT(ps, data, data); } -static void pcb_pstk_bbox_(rnd_rnd_box_t *dst, pcb_pstk_t *ps, rnd_bool copper_only) +static void pcb_pstk_bbox_(rnd_box_t *dst, pcb_pstk_t *ps, rnd_bool copper_only) { int n, sn; pcb_line_t line; @@ -217,7 +217,7 @@ pcb_pstk_bbox_(&ps->bbox_naked, ps, rnd_true); } -void pcb_pstk_copper_bbox(rnd_rnd_box_t *dst, pcb_pstk_t *ps) +void pcb_pstk_copper_bbox(rnd_box_t *dst, pcb_pstk_t *ps) { pcb_pstk_bbox_(dst, ps, rnd_true); } @@ -529,7 +529,7 @@ } } -rnd_r_dir_t pcb_pstk_draw_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_pstk_draw_callback(const rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_pstk_t *ps = (pcb_pstk_t *)b; @@ -578,7 +578,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_pstk_draw_mark_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_pstk_draw_mark_callback(const rnd_box_t *b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; pcb_pstk_proto_t *proto; @@ -609,7 +609,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_pstk_draw_label_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_pstk_draw_label_callback(const rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_pstk_t *ps = (pcb_pstk_t *)b; @@ -626,7 +626,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_pstk_draw_hole_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_pstk_draw_hole_callback(const rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_pstk_t *ps = (pcb_pstk_t *)b; @@ -683,7 +683,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_pstk_draw_slot_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_pstk_draw_slot_callback(const rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_pstk_t *ps = (pcb_pstk_t *)b; @@ -788,7 +788,7 @@ } static rnd_xform_t dummy_xform; -void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, rnd_bool mark, rnd_bool label, const rnd_rnd_box_t *drawn_area) +void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, rnd_bool mark, rnd_bool label, const rnd_box_t *drawn_area) { pcb_draw_info_t info; int n, draw_hole = 0; @@ -815,7 +815,7 @@ if (info.objcb.pstk.shape_mask == PCB_LYT_MECH) draw_hole = 1; else - pcb_pstk_draw_callback((rnd_rnd_box_t *)ps, &info); + pcb_pstk_draw_callback((rnd_box_t *)ps, &info); } } @@ -833,7 +833,7 @@ if (info.objcb.pstk.shape_mask == PCB_LYT_MECH) draw_hole = 2; else - pcb_pstk_draw_callback((rnd_rnd_box_t *)ps, &info); + pcb_pstk_draw_callback((rnd_box_t *)ps, &info); } } @@ -840,14 +840,14 @@ if (draw_hole) { info.objcb.pstk.shape_mask = PCB_LYT_MECH; info.objcb.pstk.is_current = (draw_hole > 1); - pcb_pstk_draw_hole_callback((rnd_rnd_box_t *)ps, &info); + pcb_pstk_draw_hole_callback((rnd_box_t *)ps, &info); } if (mark) - pcb_pstk_draw_mark_callback((rnd_rnd_box_t *)ps, &info); + pcb_pstk_draw_mark_callback((rnd_box_t *)ps, &info); if (label) - pcb_pstk_draw_label_callback((rnd_rnd_box_t *)ps, &info); + pcb_pstk_draw_label_callback((rnd_box_t *)ps, &info); } @@ -863,7 +863,7 @@ } -static int pcb_pstk_near_box_(pcb_pstk_t *ps, rnd_rnd_box_t *box, pcb_pstk_shape_t *shape) +static int pcb_pstk_near_box_(pcb_pstk_t *ps, rnd_box_t *box, pcb_pstk_shape_t *shape) { pcb_any_line_t pad; rnd_vector_t v; @@ -974,7 +974,7 @@ #define HOLE_TOUCHES_BOX(ps, dia, b) \ PCB_CIRCLE_TOUCHES_BOX((ps)->x, (ps)->y, dia/2, (b)) -int pcb_pstk_near_box(pcb_pstk_t *ps, rnd_rnd_box_t *box, pcb_layer_t *layer) +int pcb_pstk_near_box(pcb_pstk_t *ps, rnd_box_t *box, pcb_layer_t *layer) { pcb_pstk_shape_t *shp; pcb_pstk_tshape_t *tshp = pcb_pstk_get_tshape(ps); @@ -1202,13 +1202,13 @@ pcb_poly_restore_to_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_erase(ps); if (ps->parent.data->padstack_tree != NULL) - rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); ps->y = PCB_SWAP_Y(ps->y) + g->y_offs; pcb_pstk_bbox(ps); if (ps->parent.data->padstack_tree != NULL) - rnd_r_insert_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); pcb_poly_clear_from_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_draw(ps); } @@ -1417,7 +1417,7 @@ pcb_poly_restore_to_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_erase(ps); if (ps->parent.data->padstack_tree != NULL) - rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); swap(ps->proto, u->proto, rnd_cardinal_t); swap(ps->Clearance, u->clearance, rnd_coord_t); @@ -1431,7 +1431,7 @@ pcb_pstk_bbox(ps); if (ps->parent.data->padstack_tree != NULL) - rnd_r_insert_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); pcb_poly_clear_from_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_draw(ps); @@ -1572,7 +1572,7 @@ { pcb_data_t *data = pstk->parent.data; if (data->padstack_tree != NULL) - rnd_r_delete_entry(data->padstack_tree, (rnd_rnd_box_t *)pstk); + rnd_r_delete_entry(data->padstack_tree, (rnd_box_t *)pstk); pcb_poly_restore_to_poly(data, PCB_OBJ_PSTK, NULL, pstk); } @@ -1580,7 +1580,7 @@ { pcb_data_t *data = pstk->parent.data; if (data->padstack_tree != NULL) - rnd_r_insert_entry(data->padstack_tree, (rnd_rnd_box_t *)pstk); + rnd_r_insert_entry(data->padstack_tree, (rnd_box_t *)pstk); pcb_poly_clear_from_poly(data, PCB_OBJ_PSTK, NULL, pstk); } Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 31800) +++ trunk/src/obj_pstk.h (revision 31801) @@ -94,7 +94,7 @@ pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, rnd_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror); void pcb_pstk_add(pcb_data_t *data, pcb_pstk_t *ps); void pcb_pstk_bbox(pcb_pstk_t *ps); -void pcb_pstk_copper_bbox(rnd_rnd_box_t *dst, pcb_pstk_t *ps); +void pcb_pstk_copper_bbox(rnd_box_t *dst, pcb_pstk_t *ps); void pcb_pstk_reg(pcb_data_t *data, pcb_pstk_t *pstk); void pcb_pstk_unreg(pcb_pstk_t *pstk); @@ -157,7 +157,7 @@ void pcb_pstk_shape_free_poly(pcb_pstk_poly_t *poly); /* geometry for select.c and search.c; if layer is NULL, consider all shapes */ -int pcb_pstk_near_box(pcb_pstk_t *ps, rnd_rnd_box_t *box, pcb_layer_t *layer); +int pcb_pstk_near_box(pcb_pstk_t *ps, rnd_box_t *box, pcb_layer_t *layer); int pcb_is_point_in_pstk(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, pcb_pstk_t *ps, pcb_layer_t *layer); /* Check if padstack has the proper clearance against polygon; returns 0 if everything's fine */ Index: trunk/src/obj_pstk_draw.h =================================================================== --- trunk/src/obj_pstk_draw.h (revision 31800) +++ trunk/src/obj_pstk_draw.h (revision 31801) @@ -35,14 +35,14 @@ #include "board.h" #include "draw.h" -rnd_r_dir_t pcb_pstk_draw_callback(const rnd_rnd_box_t *b, void *cl); -rnd_r_dir_t pcb_pstk_draw_hole_callback(const rnd_rnd_box_t *b, void *cl); -rnd_r_dir_t pcb_pstk_draw_slot_callback(const rnd_rnd_box_t *b, void *cl); -rnd_r_dir_t pcb_pstk_clear_callback(const rnd_rnd_box_t *b, void *cl); +rnd_r_dir_t pcb_pstk_draw_callback(const rnd_box_t *b, void *cl); +rnd_r_dir_t pcb_pstk_draw_hole_callback(const rnd_box_t *b, void *cl); +rnd_r_dir_t pcb_pstk_draw_slot_callback(const rnd_box_t *b, void *cl); +rnd_r_dir_t pcb_pstk_clear_callback(const rnd_box_t *b, void *cl); #endif -rnd_r_dir_t pcb_pstk_draw_mark_callback(const rnd_rnd_box_t *b, void *cl); -rnd_r_dir_t pcb_pstk_draw_label_callback(const rnd_rnd_box_t *b, void *cl); +rnd_r_dir_t pcb_pstk_draw_mark_callback(const rnd_box_t *b, void *cl); +rnd_r_dir_t pcb_pstk_draw_label_callback(const rnd_box_t *b, void *cl); void pcb_pstk_draw_label(pcb_draw_info_t *info, pcb_pstk_t *ps); void pcb_pstk_invalidate_erase(pcb_pstk_t *ps); void pcb_pstk_invalidate_draw(pcb_pstk_t *ps); @@ -51,7 +51,7 @@ /* Draw a padstack for perview; if layers is NULL, draw all layers, else draw the layers where it is not zero (layers are defined in pcb_proto_layers[]) */ -void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, rnd_bool mark, rnd_bool label, const rnd_rnd_box_t *drawn_area); +void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, rnd_bool mark, rnd_bool label, const rnd_box_t *drawn_area); #endif Index: trunk/src/obj_pstk_op.c =================================================================== --- trunk/src/obj_pstk_op.c (revision 31800) +++ trunk/src/obj_pstk_op.c (revision 31801) @@ -52,7 +52,7 @@ npid = pcb_pstk_proto_insert_dup(ctx->buffer.dst, proto, 1, 0); pcb_poly_restore_to_poly(ctx->buffer.src, PCB_OBJ_PSTK, NULL, ps); - rnd_r_delete_entry(ctx->buffer.src->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(ctx->buffer.src->padstack_tree, (rnd_box_t *)ps); pcb_pstk_unreg(ps); ps->proto = npid; @@ -64,7 +64,7 @@ if (!ctx->buffer.dst->padstack_tree) ctx->buffer.dst->padstack_tree = rnd_r_create_tree(); - rnd_r_insert_entry(ctx->buffer.dst->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(ctx->buffer.dst->padstack_tree, (rnd_box_t *)ps); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_OBJ_PSTK, NULL, ps); return ps; @@ -106,10 +106,10 @@ pcb_data_t *data = ps->parent.data; assert(ps->parent_type = PCB_PARENT_DATA); - rnd_r_delete_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(data->padstack_tree, (rnd_box_t *)ps); pcb_poly_restore_to_poly(data, PCB_OBJ_PSTK, NULL, ps); pcb_pstkop_move_noclip(ctx, ps); - rnd_r_insert_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(data->padstack_tree, (rnd_box_t *)ps); pcb_poly_clear_from_poly(data, PCB_OBJ_PSTK, NULL, ps); pcb_subc_part_changed(ps); return ps; @@ -122,12 +122,12 @@ if (ctx->clip.restore) { if (data->padstack_tree != NULL) - rnd_r_delete_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(data->padstack_tree, (rnd_box_t *)ps); pcb_poly_restore_to_poly(data, PCB_OBJ_PSTK, NULL, ps); } if (ctx->clip.clear) { if (data->padstack_tree != NULL) - rnd_r_insert_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(data->padstack_tree, (rnd_box_t *)ps); pcb_poly_clear_from_poly(data, PCB_OBJ_PSTK, NULL, ps); } @@ -144,7 +144,7 @@ void *pcb_pstkop_destroy(pcb_opctx_t *ctx, pcb_pstk_t *ps) { - rnd_r_delete_entry(ctx->remove.destroy_target->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(ctx->remove.destroy_target->padstack_tree, (rnd_box_t *)ps); pcb_pstk_free(ps); return NULL; } @@ -200,7 +200,7 @@ pcb_poly_restore_to_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_erase(ps); if (ps->parent.data->padstack_tree != NULL) - rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); rnd_rotate(&nx, &ny, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.cosa, ctx->rotate.sina); if ((nx != ps->x) || (ny != ps->y)) @@ -208,7 +208,7 @@ pcb_pstk_bbox(ps); if (ps->parent.data->padstack_tree != NULL) - rnd_r_insert_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); pcb_poly_clear_from_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_draw(ps); Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 31800) +++ trunk/src/obj_pstk_proto.c (revision 31801) @@ -457,7 +457,7 @@ if (remove_src) { if (src->parent.data->padstack_tree != NULL) - rnd_r_delete_entry(src->parent.data->padstack_tree, (rnd_rnd_box_t *)src); + rnd_r_delete_entry(src->parent.data->padstack_tree, (rnd_box_t *)src); pcb_pstk_free(src); } @@ -483,7 +483,7 @@ int ret; vtp0_t objs; rnd_coord_t ox, oy; - rnd_rnd_box_t bb; + rnd_box_t bb; pcb_data_bbox(&bb, PCB_PASTEBUFFER->Data, 0); Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 31800) +++ trunk/src/obj_rat.c (revision 31801) @@ -83,7 +83,7 @@ void pcb_rat_free(pcb_rat_t *rat) { if ((rat->parent.data != NULL) && (rat->parent.data->rat_tree != NULL)) - rnd_r_delete_entry(rat->parent.data->rat_tree, (rnd_rnd_box_t *)rat); + rnd_r_delete_entry(rat->parent.data->rat_tree, (rnd_box_t *)rat); pcb_rat_unreg(rat); free(rat->anchor[0]); free(rat->anchor[1]); @@ -214,7 +214,7 @@ static pcb_any_obj_t *find_obj_on_layer(rnd_coord_t x, rnd_coord_t y, pcb_layer_t *l) { rnd_rtree_it_t it; - rnd_rnd_box_t *n; + rnd_box_t *n; rnd_rtree_box_t sb; sb.x1 = x; sb.x2 = x+1; @@ -273,7 +273,7 @@ int i; rnd_rtree_box_t sb; rnd_rtree_it_t it; - rnd_rnd_box_t *n; + rnd_box_t *n; pcb_layergrp_t *g = pcb_get_layergrp(PCB, gid); if (g == NULL) @@ -367,7 +367,7 @@ /* moves a rat-line between board and buffer */ void *pcb_ratop_move_buffer(pcb_opctx_t *ctx, pcb_rat_t * rat) { - rnd_r_delete_entry(ctx->buffer.src->rat_tree, (rnd_rnd_box_t *) rat); + rnd_r_delete_entry(ctx->buffer.src->rat_tree, (rnd_box_t *) rat); pcb_rat_unreg(rat); pcb_rat_reg(ctx->buffer.dst, rat); @@ -376,7 +376,7 @@ if (!ctx->buffer.dst->rat_tree) ctx->buffer.dst->rat_tree = rnd_r_create_tree(); - rnd_r_insert_entry(ctx->buffer.dst->rat_tree, (rnd_rnd_box_t *) rat); + rnd_r_insert_entry(ctx->buffer.dst->rat_tree, (rnd_box_t *) rat); return rat; } @@ -442,7 +442,7 @@ } /*** draw ***/ -rnd_r_dir_t pcb_rat_draw_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_rat_draw_callback(const rnd_box_t * b, void *cl) { pcb_rat_t *rat = (pcb_rat_t *) b; pcb_draw_info_t *info = cl; @@ -481,7 +481,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_VIA, Rat)) { rnd_coord_t w = Rat->Thickness; - rnd_rnd_box_t b; + rnd_box_t b; b.X1 = Rat->Point1.X - w * 2 - w / 2; b.X2 = Rat->Point1.X + w * 2 + w / 2; @@ -502,7 +502,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_VIA, Rat)) { rnd_coord_t w = Rat->Thickness; - rnd_rnd_box_t b; + rnd_box_t b; b.X1 = Rat->Point1.X - w * 2 - w / 2; b.X2 = Rat->Point1.X + w * 2 + w / 2; Index: trunk/src/obj_rat_draw.h =================================================================== --- trunk/src/obj_rat_draw.h (revision 31800) +++ trunk/src/obj_rat_draw.h (revision 31801) @@ -30,7 +30,7 @@ /* Include rtree.h for these */ #ifdef RND_RTREE_H -rnd_r_dir_t pcb_rat_draw_callback(const rnd_rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_rat_draw_callback(const rnd_box_t * b, void *cl); #endif void pcb_rat_invalidate_erase(pcb_rat_t *Rat); Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 31800) +++ trunk/src/obj_subc.c (revision 31801) @@ -81,7 +81,7 @@ } /* Modify dst to include src, if src is not a floater */ -static void pcb_box_bump_box_noflt(rnd_rnd_box_t *dst, rnd_rnd_box_t *src) +static void pcb_box_bump_box_noflt(rnd_box_t *dst, rnd_box_t *src) { if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, ((pcb_any_obj_t *)(src)))) rnd_box_bump_box(dst, src); @@ -135,7 +135,7 @@ { pcb_extobj_del_pre(sc); if ((sc->parent.data != NULL) && (sc->parent.data->subc_tree != NULL)) - rnd_r_delete_entry(sc->parent.data->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_delete_entry(sc->parent.data->subc_tree, (rnd_box_t *)sc); rnd_attribute_free(&sc->Attributes); if (sc->parent_type != PCB_PARENT_INVALID) pcb_subc_unreg(sc); @@ -1047,7 +1047,7 @@ if (pcb != NULL) { if (!dst->subc_tree) dst->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dst->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_insert_entry(dst->subc_tree, (rnd_box_t *)sc); } return sc; @@ -1104,7 +1104,7 @@ EraseSubc(sc); if (pcb_data_get_top(Data) != NULL) { if (Data->subc_tree != NULL) - rnd_r_delete_entry(Data->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_delete_entry(Data->subc_tree, (rnd_box_t *)sc); else Data->subc_tree = rnd_r_create_tree(); } @@ -1186,7 +1186,7 @@ rnd_close_box(&sc->BoundingBox); rnd_close_box(&sc->bbox_naked); if (pcb_data_get_top(Data) != NULL) - rnd_r_insert_entry(Data->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_insert_entry(Data->subc_tree, (rnd_box_t *)sc); sc->part_changed_bbox_dirty = 0; /* we've just recalculated the bbox */ pcb_subc_part_changed_inhibit_dec(sc); @@ -1335,7 +1335,7 @@ linelist_foreach(&sl->Line, &it, line) { if (src_has_real_layer) { pcb_poly_restore_to_poly(src_data, PCB_OBJ_LINE, sl, line); - rnd_r_delete_entry(sl->line_tree, (rnd_rnd_box_t *)line); + rnd_r_delete_entry(sl->line_tree, (rnd_box_t *)line); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, line); @@ -1344,7 +1344,7 @@ pcb_line_reg(dl, line); } if ((dl != NULL) && (dl->line_tree != NULL)) { - rnd_r_insert_entry(dl->line_tree, (rnd_rnd_box_t *)line); + rnd_r_insert_entry(dl->line_tree, (rnd_box_t *)line); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1354,7 +1354,7 @@ arclist_foreach(&sl->Arc, &it, arc) { if (src_has_real_layer) { pcb_poly_restore_to_poly(src_data, PCB_OBJ_ARC, sl, arc); - rnd_r_delete_entry(sl->arc_tree, (rnd_rnd_box_t *)arc); + rnd_r_delete_entry(sl->arc_tree, (rnd_box_t *)arc); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, arc); @@ -1363,7 +1363,7 @@ pcb_arc_reg(dl, arc); } if ((dl != NULL) && (dl->arc_tree != NULL)) { - rnd_r_insert_entry(dl->arc_tree, (rnd_rnd_box_t *)arc); + rnd_r_insert_entry(dl->arc_tree, (rnd_box_t *)arc); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1373,7 +1373,7 @@ textlist_foreach(&sl->Text, &it, text) { if (src_has_real_layer) { pcb_poly_restore_to_poly(src_data, PCB_OBJ_LINE, sl, text); - rnd_r_delete_entry(sl->text_tree, (rnd_rnd_box_t *)text); + rnd_r_delete_entry(sl->text_tree, (rnd_box_t *)text); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, text); @@ -1382,7 +1382,7 @@ pcb_text_reg(dl, text); } if ((dl != NULL) && (dl->text_tree != NULL)) { - rnd_r_insert_entry(dl->text_tree, (rnd_rnd_box_t *)text); + rnd_r_insert_entry(dl->text_tree, (rnd_box_t *)text); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1392,7 +1392,7 @@ polylist_foreach(&sl->Polygon, &it, poly) { pcb_poly_pprestore(poly); if (src_has_real_layer) { - rnd_r_delete_entry(sl->polygon_tree, (rnd_rnd_box_t *)poly); + rnd_r_delete_entry(sl->polygon_tree, (rnd_box_t *)poly); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, poly); @@ -1401,7 +1401,7 @@ pcb_poly_reg(dl, poly); } if ((dl != NULL) && (dl->polygon_tree != NULL)) { - rnd_r_insert_entry(dl->polygon_tree, (rnd_rnd_box_t *)poly); + rnd_r_insert_entry(dl->polygon_tree, (rnd_box_t *)poly); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1410,7 +1410,7 @@ gfxlist_foreach(&sl->Gfx, &it, gfx) { if (src_has_real_layer) { - rnd_r_delete_entry(sl->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_delete_entry(sl->gfx_tree, (rnd_box_t *)gfx); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, gfx); @@ -1419,7 +1419,7 @@ pcb_gfx_reg(dl, gfx); } if ((dl != NULL) && (dl->gfx_tree != NULL)) { - rnd_r_insert_entry(dl->gfx_tree, (rnd_rnd_box_t *)gfx); + rnd_r_insert_entry(dl->gfx_tree, (rnd_box_t *)gfx); chg++; } } @@ -1450,10 +1450,10 @@ assert(proto != NULL); /* the prototype must be accessible at the source else we can't add it in the dest */ pcb_poly_restore_to_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); if (sc->data->padstack_tree != NULL) - rnd_r_delete_entry(sc->data->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_delete_entry(sc->data->padstack_tree, (rnd_box_t *)ps); PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, ps); if ((dst != NULL) && (dst->padstack_tree != NULL)) - rnd_r_insert_entry(dst->padstack_tree, (rnd_rnd_box_t *)ps); + rnd_r_insert_entry(dst->padstack_tree, (rnd_box_t *)ps); if ((move_obj) && (dst != NULL)) { pcb_pstk_unreg(ps); pcb_pstk_reg(dst, ps); @@ -1502,7 +1502,7 @@ clip.clip.pcb = ctx->buffer.pcb; pcb_subc_op(ctx->buffer.pcb->Data, sc, &ClipFunctions, &clip, PCB_SUBCOP_UNDO_SUBC); } - rnd_r_delete_entry(ctx->buffer.pcb->Data->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_delete_entry(ctx->buffer.pcb->Data->subc_tree, (rnd_box_t *)sc); } pcb_subc_unreg(sc); @@ -1511,7 +1511,7 @@ if (dst_is_pcb) { if (ctx->buffer.dst->subc_tree == NULL) ctx->buffer.dst->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(ctx->buffer.dst->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_insert_entry(ctx->buffer.dst->subc_tree, (rnd_box_t *)sc); } if (dst_is_pcb) @@ -1796,7 +1796,7 @@ void *pcb_subcop_destroy(pcb_opctx_t *ctx, pcb_subc_t *sc) { if (ctx->remove.pcb->Data->subc_tree != NULL) - rnd_r_delete_entry(ctx->remove.pcb->Data->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_delete_entry(ctx->remove.pcb->Data->subc_tree, (rnd_box_t *)sc); EraseSubc(sc); pcb_subc_free(sc); @@ -1873,7 +1873,7 @@ pcb_data_t *data = g->subc->parent.data; if ((data != NULL) && (data->subc_tree != NULL)) - rnd_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)g->subc); + rnd_r_delete_entry(data->subc_tree, (rnd_box_t *)g->subc); pcb_undo_freeze_add(); pcb_data_mirror(g->subc->data, g->y_offs, g->smirror ? PCB_TXM_SIDE : PCB_TXM_COORD, g->smirror, 0); @@ -1881,7 +1881,7 @@ pcb_subc_bbox(g->subc); if ((data != NULL) && (data->subc_tree != NULL)) - rnd_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)g->subc); + rnd_r_insert_entry(data->subc_tree, (rnd_box_t *)g->subc); return 0; } @@ -1919,13 +1919,13 @@ void pcb_subc_scale(pcb_data_t *data, pcb_subc_t *subc, double sx, double sy, double sth, int recurse) { if ((data != NULL) && (data->subc_tree != NULL)) - rnd_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); pcb_data_scale(subc->data, sx, sy, sth, recurse); pcb_subc_bbox(subc); if ((data != NULL) && (data->subc_tree != NULL)) - rnd_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); } @@ -1947,7 +1947,7 @@ /* mirror object geometry and stackup */ if ((data != NULL) && (data->subc_tree != NULL)) - rnd_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); pcb_undo_freeze_add(); pcb_data_mirror(subc->data, yoff, PCB_TXM_SIDE, 1, 0); @@ -1963,7 +1963,7 @@ pcb_subc_bbox(subc); if ((data != NULL) && (data->subc_tree != NULL)) - rnd_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); pcb_undo_add_subc_to_otherside(PCB_OBJ_SUBC, subc, subc, subc, yoff); @@ -1993,11 +1993,11 @@ #include "draw.h" -rnd_r_dir_t pcb_draw_subc_mark(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t pcb_draw_subc_mark(const rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_subc_t *subc = (pcb_subc_t *) b; - rnd_rnd_box_t *bb = &subc->BoundingBox; + rnd_box_t *bb = &subc->BoundingBox; int selected, locked; int freq = conf_core.appearance.subc.dash_freq; const rnd_color_t *nnclr; @@ -2033,7 +2033,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t draw_subc_mark_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t draw_subc_mark_callback(const rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_subc_t *subc = (pcb_subc_t *) b; @@ -2047,11 +2047,11 @@ return pcb_draw_subc_mark(b, cl); } -rnd_r_dir_t draw_subc_label_callback(const rnd_rnd_box_t *b, void *cl) +rnd_r_dir_t draw_subc_label_callback(const rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_subc_t *subc = (pcb_subc_t *) b; - rnd_rnd_box_t *bb = &subc->BoundingBox; + rnd_box_t *bb = &subc->BoundingBox; rnd_coord_t x0, y0, dx, dy; pcb_font_t *font = &PCB->fontkit.dflt; @@ -2111,7 +2111,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -void pcb_subc_draw_preview(const pcb_subc_t *sc, const rnd_rnd_box_t *drawn_area) +void pcb_subc_draw_preview(const pcb_subc_t *sc, const rnd_box_t *drawn_area) { int n; pcb_draw_info_t info; @@ -2141,9 +2141,9 @@ if (sc->data->padstack_tree != NULL) for(o = rnd_rtree_first(&it, sc->data->padstack_tree, (rnd_rtree_box_t *)drawn_area); o != NULL; o = rnd_rtree_next(&it)) { if (pcb_obj_is_under(o, sc->data)) { - pcb_pstk_draw_callback((rnd_rnd_box_t *)o, &info); + pcb_pstk_draw_callback((rnd_box_t *)o, &info); if (PCB->hole_on) - pcb_pstk_draw_hole_callback((rnd_rnd_box_t *)o, &info); + pcb_pstk_draw_hole_callback((rnd_box_t *)o, &info); } } @@ -2158,8 +2158,8 @@ if (sc->data->padstack_tree != NULL) for(o = rnd_rtree_first(&it, sc->data->padstack_tree, (rnd_rtree_box_t *)drawn_area); o != NULL; o = rnd_rtree_next(&it)) { if (pcb_obj_is_under(o, sc->data)) { - pcb_pstk_draw_mark_callback((rnd_rnd_box_t *)o, &info); - pcb_pstk_draw_label_callback((rnd_rnd_box_t *)o, &info); + pcb_pstk_draw_mark_callback((rnd_box_t *)o, &info); + pcb_pstk_draw_label_callback((rnd_box_t *)o, &info); } } } Index: trunk/src/obj_subc.h =================================================================== --- trunk/src/obj_subc.h (revision 31800) +++ trunk/src/obj_subc.h (revision 31801) @@ -97,7 +97,7 @@ rnd_bool pcb_selected_subc_change_side(void); /* Draw a subcircuit for a preview (silk, copper and outline only) */ -void pcb_subc_draw_preview(const pcb_subc_t *sc, const rnd_rnd_box_t *drawn_area); +void pcb_subc_draw_preview(const pcb_subc_t *sc, const rnd_box_t *drawn_area); void pcb_xordraw_subc(pcb_subc_t *sc, rnd_coord_t DX, rnd_coord_t DY, int use_curr_side); @@ -119,9 +119,9 @@ pcb_layer_t *pcb_subc_get_layer(pcb_subc_t *sc, pcb_layer_type_t lyt, pcb_layer_combining_t comb, rnd_bool_t alloc, const char *name, rnd_bool req_name_match); #include -rnd_r_dir_t pcb_draw_subc_mark(const rnd_rnd_box_t *b, void *cl); /* low level version, does not do extobj */ -rnd_r_dir_t draw_subc_mark_callback(const rnd_rnd_box_t *b, void *cl); -rnd_r_dir_t draw_subc_label_callback(const rnd_rnd_box_t *b, void *cl); +rnd_r_dir_t pcb_draw_subc_mark(const rnd_box_t *b, void *cl); /* low level version, does not do extobj */ +rnd_r_dir_t draw_subc_mark_callback(const rnd_box_t *b, void *cl); +rnd_r_dir_t draw_subc_label_callback(const rnd_box_t *b, void *cl); void DrawSubc(pcb_subc_t *sc); void EraseSubc(pcb_subc_t *sc); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 31800) +++ trunk/src/obj_text.c (revision 31801) @@ -105,7 +105,7 @@ void pcb_text_free(pcb_text_t *text) { if ((text->parent.layer != NULL) && (text->parent.layer->text_tree != NULL)) - rnd_r_delete_entry(text->parent.layer->text_tree, (rnd_rnd_box_t *)text); + rnd_r_delete_entry(text->parent.layer->text_tree, (rnd_box_t *)text); rnd_attribute_free(&text->Attributes); pcb_text_unreg(text); free(text->TextString); @@ -134,7 +134,7 @@ pcb_board_t *pcb = pcb_data_get_top(layer->parent.data); if (layer->text_tree != NULL) - rnd_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *)g->text); + rnd_r_delete_entry(layer->text_tree, (rnd_box_t *)g->text); pcb_poly_restore_to_poly(layer->parent.data, PCB_OBJ_TEXT, layer, g->text); rnd_swap(int, g->Scale, g->text->Scale); @@ -148,7 +148,7 @@ pcb_text_bbox(pcb_font(pcb, g->text->fid, 1), g->text); if (layer->text_tree != NULL) - rnd_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *)g->text); + rnd_r_insert_entry(layer->text_tree, (rnd_box_t *)g->text); pcb_poly_clear_from_poly(layer->parent.data, PCB_OBJ_TEXT, layer, g->text); return 0; @@ -311,7 +311,7 @@ pcb_text_bbox(PCBFont, text); if (!Layer->text_tree) Layer->text_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) text); } static int pcb_text_render_str_cb(void *ctx, gds_t *s, const char **input) @@ -499,7 +499,7 @@ space = symbol[*s].Delta; } else { - rnd_rnd_box_t *ds = &FontPtr->DefaultSymbol; + rnd_box_t *ds = &FontPtr->DefaultSymbol; rnd_coord_t w = ds->X2 - ds->X1; minx = MIN(minx, ds->X1 + tx); @@ -619,7 +619,7 @@ dstly = &ctx->buffer.dst->Layer[lid]; } - rnd_r_delete_entry(srcly->text_tree, (rnd_rnd_box_t *) text); + rnd_r_delete_entry(srcly->text_tree, (rnd_box_t *) text); pcb_poly_restore_to_poly(ctx->buffer.src, PCB_OBJ_TEXT, srcly, text); pcb_text_unreg(text); @@ -627,7 +627,7 @@ if (!dstly->text_tree) dstly->text_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dstly->text_tree, (rnd_rnd_box_t *) text); + rnd_r_insert_entry(dstly->text_tree, (rnd_box_t *) text); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_OBJ_TEXT, dstly, text); return text; @@ -644,7 +644,7 @@ if (value <= PCB_MAX_TEXTSCALE && value >= PCB_MIN_TEXTSCALE && value != Text->Scale) { pcb_undo_add_obj_to_size(PCB_OBJ_TEXT, Layer, Text, Text); pcb_text_invalidate_erase(Layer, Text); - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); Text->Scale = value; if (Text->scale_x > 0) @@ -652,7 +652,7 @@ if (Text->scale_y > 0) Text->scale_y = (double)value / 100.0; pcb_text_bbox(pcb_font(PCB, Text->fid, 1), Text); - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -670,11 +670,11 @@ if (value != Text->thickness) { pcb_undo_add_obj_to_2nd_size(PCB_OBJ_TEXT, Layer, Text, Text); pcb_text_invalidate_erase(Layer, Text); - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); Text->thickness = value; pcb_text_bbox(pcb_font(PCB, Text->fid, 1), Text); - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -692,11 +692,11 @@ if (value != Text->rot) { pcb_undo_add_obj_to_rot(PCB_OBJ_TEXT, Layer, Text, Text); pcb_text_invalidate_erase(Layer, Text); - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); Text->rot = value; pcb_text_bbox(pcb_font(PCB, Text->fid, 1), Text); - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -713,13 +713,13 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Text)) return NULL; pcb_text_invalidate_erase(Layer, Text); - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *)Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *)Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); Text->TextString = ctx->chgname.new_name; /* calculate size of the bounding box */ pcb_text_bbox(pcb_font(PCB, Text->fid, 1), Text); - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return old; @@ -791,10 +791,10 @@ void *pcb_textop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_textop_move_noclip(ctx, Layer, Text); - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); return Text; } @@ -802,11 +802,11 @@ void *pcb_textop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { if (ctx->clip.restore) { - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); } if (ctx->clip.clear) { - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); } return Text; @@ -817,7 +817,7 @@ void *pcb_textop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_text_t * text, pcb_layer_t * Destination) { pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Source, text); - rnd_r_delete_entry(Source->text_tree, (rnd_rnd_box_t *) text); + rnd_r_delete_entry(Source->text_tree, (rnd_box_t *) text); pcb_text_unreg(text); pcb_text_reg(Destination, text); @@ -831,7 +831,7 @@ pcb_text_bbox(pcb_font(PCB, text->fid, 1), text); if (!Destination->text_tree) Destination->text_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Destination->text_tree, (rnd_rnd_box_t *) text); + rnd_r_insert_entry(Destination->text_tree, (rnd_box_t *) text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Destination, text); return text; @@ -868,7 +868,7 @@ /* erase from screen */ if (Layer->meta.real.vis) { pcb_text_invalidate_erase(Layer, Text); - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *)Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *)Text); } pcb_undo_move_obj_to_remove(PCB_OBJ_TEXT, Layer, Text, Text); return NULL; @@ -925,10 +925,10 @@ pcb_text_invalidate_erase(Layer, Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); if (Layer->text_tree != NULL) - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_text_rotate90(Text, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->text_tree != NULL) - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -939,7 +939,7 @@ pcb_text_invalidate_erase(Layer, Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); if (Layer->text_tree != NULL) - rnd_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); if (Text->rot < 0.0) Text->rot += 360.0; @@ -952,7 +952,7 @@ pcb_text_bbox(NULL, Text); if (Layer->text_tree != NULL) - rnd_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); + rnd_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -961,13 +961,13 @@ void pcb_text_flip_side(pcb_layer_t *layer, pcb_text_t *text, rnd_coord_t y_offs, rnd_bool undoable) { if (layer->text_tree != NULL) - rnd_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_delete_entry(layer->text_tree, (rnd_box_t *) text); text->X = PCB_SWAP_X(text->X); text->Y = PCB_SWAP_Y(text->Y) + y_offs; PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, text); pcb_text_bbox(pcb_font(PCB, text->fid, 1), text); if (layer->text_tree != NULL) - rnd_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_insert_entry(layer->text_tree, (rnd_box_t *) text); } void pcb_text_mirror_coords(pcb_text_t *text, rnd_coord_t y_offs, rnd_bool undoable) @@ -1025,10 +1025,10 @@ assert(text->parent_type = PCB_PARENT_LAYER); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, layer, text); - rnd_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_delete_entry(layer->text_tree, (rnd_box_t *) text); text->fid = fid; pcb_text_bbox(pcb_font(PCB, text->fid, 1), text); - rnd_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_insert_entry(layer->text_tree, (rnd_box_t *) text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, layer, text); } @@ -1038,7 +1038,7 @@ if (ly == NULL) return; if (ly->text_tree != NULL) - rnd_r_delete_entry(ly->text_tree, (rnd_rnd_box_t *)text); + rnd_r_delete_entry(ly->text_tree, (rnd_box_t *)text); pcb_poly_restore_to_poly(ly->parent.data, PCB_OBJ_TEXT, ly, text); } @@ -1048,7 +1048,7 @@ if (ly == NULL) return; if (ly->text_tree != NULL) - rnd_r_insert_entry(ly->text_tree, (rnd_rnd_box_t *)text); + rnd_r_insert_entry(ly->text_tree, (rnd_box_t *)text); pcb_poly_clear_from_poly(ly->parent.data, PCB_OBJ_TEXT, ly, text); } @@ -1062,9 +1062,9 @@ return; pcb_poly_restore_to_poly(data, PCB_OBJ_TEXT, layer, text); - rnd_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_delete_entry(layer->text_tree, (rnd_box_t *) text); pcb_text_bbox(pcb_font(pcb, text->fid, 1), text); - rnd_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); + rnd_r_insert_entry(layer->text_tree, (rnd_box_t *) text); pcb_poly_clear_from_poly(data, PCB_OBJ_TEXT, layer, text); } @@ -1077,7 +1077,7 @@ pcb_poly_restore_to_poly(data, PCB_OBJ_TEXT, Text->parent.layer, Text); if (flagbits & PCB_FLAG_ONSOLDER) { /* bbox will also change, need to do rtree administration */ *save = Text->parent.layer; - rnd_r_delete_entry(Text->parent.layer->text_tree, (rnd_rnd_box_t *)Text); + rnd_r_delete_entry(Text->parent.layer->text_tree, (rnd_box_t *)Text); } } @@ -1091,7 +1091,7 @@ pcb_text_bbox(pcb_font(PCB, Text->fid, 1), Text); if (orig_layer != NULL) - rnd_r_insert_entry(orig_layer->text_tree, (rnd_rnd_box_t *)Text); + rnd_r_insert_entry(orig_layer->text_tree, (rnd_box_t *)Text); if ((newflagbits & PCB_FLAG_CLEARLINE) || (orig_layer != NULL)) pcb_poly_clear_from_poly(data, PCB_OBJ_TEXT, Text->parent.layer, Text); @@ -1225,7 +1225,7 @@ rnd_coord_t pcb_text_width(pcb_font_t *font, double scx, const unsigned char *string) { rnd_coord_t w = 0; - const rnd_rnd_box_t *defaultsymbol; + const rnd_box_t *defaultsymbol; if (string == NULL) return 0; defaultsymbol = &font->DefaultSymbol; @@ -1584,7 +1584,7 @@ pcb_text_draw_(info, text, min_silk_line, allow_term_gfx, PCB_TXT_TINY_CHEAP); } -rnd_r_dir_t pcb_text_draw_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_text_draw_callback(const rnd_box_t * b, void *cl) { pcb_text_t *text = (pcb_text_t *) b; pcb_draw_info_t *info = cl; @@ -1599,7 +1599,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -rnd_r_dir_t pcb_text_draw_term_callback(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t pcb_text_draw_term_callback(const rnd_box_t * b, void *cl) { pcb_text_t *text = (pcb_text_t *) b; pcb_draw_info_t *info = cl; @@ -1662,9 +1662,9 @@ int chg = pcb_text_font_chg_data(subc->data, fid); if (chg) { need_redraw = 1; - rnd_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); pcb_subc_bbox(subc); - rnd_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); } } PCB_END_LOOP; Index: trunk/src/obj_text_draw.h =================================================================== --- trunk/src/obj_text_draw.h (revision 31800) +++ trunk/src/obj_text_draw.h (revision 31801) @@ -33,8 +33,8 @@ /* Include rtree.h for these */ #ifdef RND_RTREE_H -rnd_r_dir_t pcb_text_draw_callback(const rnd_rnd_box_t * b, void *cl); -rnd_r_dir_t pcb_text_draw_term_callback(const rnd_rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_text_draw_callback(const rnd_box_t * b, void *cl); +rnd_r_dir_t pcb_text_draw_term_callback(const rnd_box_t * b, void *cl); #endif typedef enum pcb_text_tiny_e { /* How to draw text that is too tiny to be readable */ Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 31800) +++ trunk/src/object_act.c (revision 31801) @@ -505,7 +505,7 @@ static void plc_place(placer_t *plc, rnd_coord_t *ox, rnd_coord_t *oy) { rnd_coord_t px = plc->lx, py = plc->ly; - rnd_rnd_box_t bbx; + rnd_box_t bbx; switch(plc->plc_method) { case PLC_FIT: Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 31800) +++ trunk/src/plug_io.c (revision 31801) @@ -751,7 +751,7 @@ if (res == 0) { rnd_file_loaded_set_at("design", "main", file, PCB->is_footprint ? "footprint" : "board"); if (PCB->is_footprint) { - rnd_rnd_box_t b; + rnd_box_t b; /* a footprint has no board size set, need to invent one */ pcb_data_bbox(&b, PCB->Data, 0); if ((b.X2 < b.X1) || (b.Y2 < b.Y1)) { Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 31800) +++ trunk/src/polygon.c (revision 31801) @@ -343,7 +343,7 @@ return Subtract(np1, p, fnp); } -rnd_polyarea_t *pcb_poly_from_box_bloated(rnd_rnd_box_t * box, rnd_coord_t bloat) +rnd_polyarea_t *pcb_poly_from_box_bloated(rnd_box_t * box, rnd_coord_t bloat) { return rnd_poly_from_rect(box->X1 - bloat, box->X2 + bloat, box->Y1 - bloat, box->Y2 + bloat); } @@ -439,7 +439,7 @@ if (by_bbox) { /* old method: clear by bounding box */ - const rnd_rnd_box_t *b = &text->BoundingBox; + const rnd_box_t *b = &text->BoundingBox; rnd_coord_t clr = RND_MAX(conf_core.design.bloat, p->enforce_clearance); rnd_polyarea_t *np; if (!(np = rnd_poly_from_round_rect(b->X1 + conf_core.design.bloat, b->X2 - conf_core.design.bloat, b->Y1 + conf_core.design.bloat, b->Y2 - conf_core.design.bloat, clr))) @@ -456,7 +456,7 @@ } struct cpInfo { - const rnd_rnd_box_t *other; + const rnd_box_t *other; pcb_data_t *data; pcb_layer_t *layer; pcb_poly_t *polygon; @@ -488,7 +488,7 @@ return RND_R_DIR_FOUND_CONTINUE; \ } while(0) -static rnd_r_dir_t padstack_sub_callback(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t padstack_sub_callback(const rnd_box_t *b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; struct cpInfo *info = (struct cpInfo *)cl; @@ -524,7 +524,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t arc_sub_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t arc_sub_callback(const rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -681,7 +681,7 @@ return 0; } -static rnd_r_dir_t poly_sub_callback(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t poly_sub_callback(const rnd_box_t *b, void *cl) { pcb_poly_t *subpoly = (pcb_poly_t *)b; struct cpInfo *info = (struct cpInfo *) cl; @@ -707,7 +707,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t line_sub_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t line_sub_callback(const rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -738,7 +738,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t text_sub_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t text_sub_callback(const rnd_box_t * b, void *cl) { pcb_text_t *text = (pcb_text_t *) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -758,11 +758,11 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_cardinal_t clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *polygon, const rnd_rnd_box_t *here, rnd_coord_t expand, int noop) +static rnd_cardinal_t clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *polygon, const rnd_box_t *here, rnd_coord_t expand, int noop) { rnd_cardinal_t r = 0; int seen; - rnd_rnd_box_t region; + rnd_box_t region; struct cpInfo info; rnd_layergrp_id_t group; unsigned int gflg; @@ -870,7 +870,7 @@ if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *)ps, 2 * UNSUBTRACT_BLOAT * 400000, 0); + clearPoly(PCB->Data, l, p, (const rnd_box_t *)ps, 2 * UNSUBTRACT_BLOAT * 400000, 0); return 1; } @@ -890,7 +890,7 @@ return 0; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *) arc, 2 * UNSUBTRACT_BLOAT, 0); + clearPoly(PCB->Data, l, p, (const rnd_box_t *) arc, 2 * UNSUBTRACT_BLOAT, 0); return 1; } @@ -908,7 +908,7 @@ return 0; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *) line, 2 * UNSUBTRACT_BLOAT, 0); + clearPoly(PCB->Data, l, p, (const rnd_box_t *) line, 2 * UNSUBTRACT_BLOAT, 0); return 1; } @@ -926,7 +926,7 @@ return -1; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *) text, 2 * UNSUBTRACT_BLOAT, 0); + clearPoly(PCB->Data, l, p, (const rnd_box_t *) text, 2 * UNSUBTRACT_BLOAT, 0); return 1; } @@ -1283,7 +1283,7 @@ * the search. */ int -pcb_poly_holes(pcb_poly_t * polygon, const rnd_rnd_box_t * range, int (*callback) (rnd_pline_t * contour, void *user_data), void *user_data) +pcb_poly_holes(pcb_poly_t * polygon, const rnd_box_t * range, int (*callback) (rnd_pline_t * contour, void *user_data), void *user_data) { rnd_polyarea_t *pa = polygon->Clipped; rnd_pline_t *pl; @@ -1383,7 +1383,7 @@ } -static rnd_r_dir_t plow_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t plow_callback(const rnd_box_t * b, void *cl) { struct plow_info *plow = (struct plow_info *) cl; pcb_poly_t *polygon = (pcb_poly_t *) b; @@ -1405,7 +1405,7 @@ rnd_r_dir_t (*call_back) (pcb_data_t *data, pcb_layer_t *lay, pcb_poly_t *poly, int type, void *ptr1, void *ptr2, void *user_data), void *user_data) { - rnd_rnd_box_t sb = ((pcb_any_obj_t *) ptr2)->BoundingBox; + rnd_box_t sb = ((pcb_any_obj_t *) ptr2)->BoundingBox; int r = 0, seen; struct plow_info info; @@ -1550,7 +1550,7 @@ return pcb_poly_isects_poly(s, p, rnd_true); } -void pcb_poly_no_holes_dicer(pcb_poly_t *p, const rnd_rnd_box_t *clip, void (*emit)(rnd_pline_t *, void *), void *user_data) +void pcb_poly_no_holes_dicer(pcb_poly_t *p, const rnd_box_t *clip, void (*emit)(rnd_pline_t *, void *), void *user_data) { rnd_polyarea_t *main_contour; @@ -1613,7 +1613,7 @@ newone->Clipped = p; p = p->f; /* go to next pline */ newone->Clipped->b = newone->Clipped->f = newone->Clipped; /* unlink from others */ - rnd_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) newone); + rnd_r_insert_entry(layer->polygon_tree, (rnd_box_t *) newone); pcb_poly_invalidate_draw(layer, newone); } else { @@ -1714,7 +1714,7 @@ pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); pcb_poly_invalidate_draw(Layer, Polygon); /* add to undo list */ Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 31800) +++ trunk/src/polygon.h (revision 31801) @@ -57,7 +57,7 @@ void pcb_polygon_copy_attached_to_layer(void); void pcb_polygon_close_hole(void); void pcb_polygon_hole_create_from_attached(void); -int pcb_poly_holes(pcb_poly_t * ptr, const rnd_rnd_box_t * range, int (*callback) (rnd_pline_t *, void *user_data), void *user_data); +int pcb_poly_holes(pcb_poly_t * ptr, const rnd_box_t * range, int (*callback) (rnd_pline_t *, void *user_data), void *user_data); int pcb_poly_plows(pcb_data_t *Data, int type, void *ptr1, void *ptr2, rnd_r_dir_t (*cb)(pcb_data_t *data, pcb_layer_t *lay, pcb_poly_t *poly, int type, void *ptr1, void *ptr2, void *user_data), void *user_data); @@ -67,7 +67,7 @@ rnd_polyarea_t *pcb_poly_from_poly(pcb_poly_t *); rnd_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t * l, rnd_coord_t thick); rnd_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t * l, rnd_coord_t thick); -rnd_polyarea_t *pcb_poly_from_box_bloated(rnd_rnd_box_t * box, rnd_coord_t radius); +rnd_polyarea_t *pcb_poly_from_box_bloated(rnd_box_t * box, rnd_coord_t radius); rnd_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, rnd_coord_t *clr_override, pcb_poly_t *in_poly); /* clearance shape for when clearpolypoly is set */ int pcb_poly_init_clip(pcb_data_t * d, pcb_layer_t * l, pcb_poly_t * p); @@ -97,7 +97,7 @@ rnd_bool pcb_pline_embraces_circ(rnd_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r); /* circle is within the polyline; caller must make sure they do not cross! */ rnd_bool pcb_pline_overlaps_circ(rnd_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r); /* circle is within or is crossing the polyline */ rnd_bool pcb_poly_morph(pcb_layer_t *, pcb_poly_t *); -void pcb_poly_no_holes_dicer(pcb_poly_t * p, const rnd_rnd_box_t * clip, void (*emit) (rnd_pline_t *, void *), void *user_data); +void pcb_poly_no_holes_dicer(pcb_poly_t * p, const rnd_box_t * clip, void (*emit) (rnd_pline_t *, void *), void *user_data); void pcb_poly_to_polygons_on_layer(pcb_data_t *, pcb_layer_t *, rnd_polyarea_t *, pcb_flag_t); rnd_bool pcb_pline_is_rectangle(rnd_pline_t *pl); Index: trunk/src/route.c =================================================================== --- trunk/src/route.c (revision 31800) +++ trunk/src/route.c (revision 31801) @@ -467,7 +467,7 @@ /* Move the existing line point/s */ exto = pcb_extobj_float_pre((pcb_any_obj_t *)apply_to_line); pcb_line_invalidate_erase(apply_to_line); - rnd_r_delete_entry(apply_to_line_layer->line_tree, (rnd_rnd_box_t *) apply_to_line); + rnd_r_delete_entry(apply_to_line_layer->line_tree, (rnd_box_t *) apply_to_line); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_LINE, apply_to_line_layer, apply_to_line); apply_to_line->Point1.X = p_obj->point1.X; apply_to_line->Point1.Y = p_obj->point1.Y; @@ -474,7 +474,7 @@ apply_to_line->Point2.X = p_obj->point2.X; apply_to_line->Point2.Y = p_obj->point2.Y; pcb_line_bbox(apply_to_line); - rnd_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *) apply_to_line); + rnd_r_insert_entry(layer->line_tree, (rnd_box_t *) apply_to_line); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_LINE, layer, apply_to_line); pcb_line_invalidate_draw(layer, apply_to_line); apply_to_line_layer = layer; @@ -599,7 +599,7 @@ exto = pcb_extobj_float_pre((pcb_any_obj_t *)apply_to_arc); pcb_arc_invalidate_erase(apply_to_arc); - rnd_r_delete_entry(apply_to_arc_layer->arc_tree, (rnd_rnd_box_t *) apply_to_arc); + rnd_r_delete_entry(apply_to_arc_layer->arc_tree, (rnd_box_t *) apply_to_arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, apply_to_arc_layer, apply_to_arc); apply_to_arc->X = p_obj->point1.X; @@ -610,7 +610,7 @@ apply_to_arc->Delta = p_obj->delta_angle; apply_to_arc->Thickness = p_route->thickness; pcb_arc_bbox(apply_to_arc); - rnd_r_insert_entry(apply_to_arc_layer->arc_tree, (rnd_rnd_box_t *) apply_to_arc); + rnd_r_insert_entry(apply_to_arc_layer->arc_tree, (rnd_box_t *) apply_to_arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, apply_to_arc_layer, apply_to_arc); pcb_arc_invalidate_draw(layer, apply_to_arc); apply_to_arc_layer = layer; Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 31800) +++ trunk/src/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; Index: trunk/src/search.h =================================================================== --- trunk/src/search.h (revision 31800) +++ trunk/src/search.h (revision 31801) @@ -35,8 +35,8 @@ #include "layer.h" int pcb_lines_intersect(rnd_coord_t ax1, rnd_coord_t ay1, rnd_coord_t ax2, rnd_coord_t ay2, rnd_coord_t bx1, rnd_coord_t by1, rnd_coord_t bx2, rnd_coord_t by2); -rnd_bool pcb_arc_in_box(pcb_arc_t *arc, rnd_rnd_box_t *b); -rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, rnd_rnd_box_t *b); +rnd_bool pcb_arc_in_box(pcb_arc_t *arc, rnd_box_t *b); +rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, rnd_box_t *b); #define PCB_SLOP 5 @@ -179,9 +179,9 @@ rnd_bool pcb_is_line_in_rectangle(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_line_t *Line); rnd_bool pcb_is_line_in_quadrangle(rnd_point_t p[4], pcb_line_t *Line); rnd_bool pcb_is_arc_in_rectangle(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_arc_t *Arc); -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); rnd_bool pcb_is_point_in_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_any_line_t *Pad); -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); /* Return the distance^2 between a line-center and a point */ double pcb_point_line_dist2(rnd_coord_t X, rnd_coord_t Y, pcb_line_t *Line); Index: trunk/src/search_r.h =================================================================== --- trunk/src/search_r.h (revision 31800) +++ trunk/src/search_r.h (revision 31801) @@ -32,6 +32,6 @@ #include /* Search data for given object types within a box using the usual rtree conventions for the callback */ -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); #endif Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 31800) +++ trunk/src/select.c (revision 31801) @@ -164,7 +164,7 @@ return changed; } -static void fix_box_dir(rnd_rnd_box_t *Box, int force_pos) +static void fix_box_dir(rnd_box_t *Box, int force_pos) { #define swap(a,b) \ do { \ @@ -216,7 +216,7 @@ * length of the list. Returns NULL on no match. */ TODO("cleanup: should be rewritten with generic ops and rtree") -static long int *ListBlock_(pcb_board_t *pcb, rnd_rnd_box_t *Box, rnd_bool Flag, int *len, void *(cb)(void *ctx, pcb_any_obj_t *obj), void *ctx) +static long int *ListBlock_(pcb_board_t *pcb, rnd_box_t *Box, rnd_bool Flag, int *len, void *(cb)(void *ctx, pcb_any_obj_t *obj), void *ctx) { int changed = 0; int used = 0, alloced = 0; @@ -403,7 +403,7 @@ #undef append -static int pcb_obj_near_box(pcb_any_obj_t *obj, rnd_rnd_box_t *box) +static int pcb_obj_near_box(pcb_any_obj_t *obj, rnd_box_t *box) { switch(obj->type) { case PCB_OBJ_RAT: @@ -420,12 +420,12 @@ typedef struct { pcb_board_t *pcb; - rnd_rnd_box_t box; + rnd_box_t box; rnd_bool flag; rnd_bool invert; } select_ctx_t; -static rnd_r_dir_t pcb_select_block_cb(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t pcb_select_block_cb(const rnd_box_t *box, void *cl) { select_ctx_t *ctx = cl; pcb_any_obj_t *obj = (pcb_any_obj_t *)box; @@ -455,7 +455,7 @@ * Flag determines if the block is to be selected or unselected * returns rnd_true if the state of any object has changed */ -rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert) +rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert) { select_ctx_t ctx; @@ -474,12 +474,12 @@ /* ---------------------------------------------------------------------- * List all visible objects within the passed box */ -long int *pcb_list_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, int *len) +long int *pcb_list_block(pcb_board_t *pcb, rnd_box_t *Box, int *len) { return ListBlock_(pcb, Box, 1, len, NULL, NULL); } -int pcb_list_block_cb(pcb_board_t *pcb, rnd_rnd_box_t *Box, void *(cb)(void *ctx, pcb_any_obj_t *obj), void *ctx) +int pcb_list_block_cb(pcb_board_t *pcb, rnd_box_t *Box, void *(cb)(void *ctx, pcb_any_obj_t *obj), void *ctx) { int len = 0; ListBlock_(pcb, Box, -1, &len, cb, ctx); Index: trunk/src/select.h =================================================================== --- trunk/src/select.h (revision 31800) +++ trunk/src/select.h (revision 31801) @@ -37,14 +37,14 @@ PCB_OBJ_PSTK | PCB_OBJ_RAT | PCB_OBJ_ARC | PCB_OBJ_GFX) rnd_bool pcb_select_object(pcb_board_t *pcb); -rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert); +rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert); /* List visible objects on screen within a box; return a list of IDs */ -long int *pcb_list_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, int *len); +long int *pcb_list_block(pcb_board_t *pcb, rnd_box_t *Box, int *len); /* List visible objects on screen within a box; return number of objects, call a callback on each object found */ -int pcb_list_block_cb(pcb_board_t *pcb, rnd_rnd_box_t *Box, void *(cb)(void *ctx, pcb_any_obj_t *obj), void *ctx); +int pcb_list_block_cb(pcb_board_t *pcb, rnd_box_t *Box, void *(cb)(void *ctx, pcb_any_obj_t *obj), void *ctx); rnd_bool pcb_select_connection(pcb_board_t *pcb, rnd_bool); Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 31800) +++ trunk/src/select_act.c (revision 31801) @@ -96,7 +96,7 @@ /* all objects in block */ case F_Block: { - rnd_rnd_box_t box; + rnd_box_t box; box.X1 = MIN(pcb_crosshair.AttachedBox.Point1.X, pcb_crosshair.AttachedBox.Point2.X); box.Y1 = MIN(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); @@ -116,7 +116,7 @@ /* select all visible(?) objects */ case F_All: { - rnd_rnd_box_t box; + rnd_box_t box; box.X1 = -RND_MAX_COORD; box.Y1 = -RND_MAX_COORD; @@ -131,7 +131,7 @@ case F_Invert: { - rnd_rnd_box_t box; + rnd_box_t box; box.X1 = -RND_MAX_COORD; box.Y1 = -RND_MAX_COORD; @@ -197,7 +197,7 @@ /* all objects in block */ case F_Block: { - rnd_rnd_box_t box; + rnd_box_t box; box.X1 = MIN(pcb_crosshair.AttachedBox.Point1.X, pcb_crosshair.AttachedBox.Point2.X); box.Y1 = MIN(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); @@ -216,7 +216,7 @@ /* unselect all visible objects */ case F_All: { - rnd_rnd_box_t box; + rnd_box_t box; box.X1 = -RND_MAX_COORD; box.Y1 = -RND_MAX_COORD; Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 31800) +++ trunk/src/undo_old.c (revision 31801) @@ -238,7 +238,7 @@ pcb_layer_t *Layer = (pcb_layer_t *) ptr1; pcb_arc_t *a = (pcb_arc_t *) ptr2; pcb_poly_restore_to_poly(PCB->Data, a->type, ptr1, ptr2); - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); old_sa = a->StartAngle; old_da = a->Delta; if (pcb_undo_and_draw) @@ -246,7 +246,7 @@ a->StartAngle = Entry->Data.AngleChange.angle[0]; a->Delta = Entry->Data.AngleChange.angle[1]; pcb_arc_bbox(a); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); pcb_poly_clear_from_poly(PCB->Data, a->type, ptr1, ptr2); Entry->Data.AngleChange.angle[0] = old_sa; Entry->Data.AngleChange.angle[1] = old_da; @@ -270,7 +270,7 @@ if (type == PCB_OBJ_ARC) { pcb_layer_t *Layer = (pcb_layer_t *) ptr1; pcb_arc_t *a = (pcb_arc_t *) ptr2; - rnd_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); old_w = a->Width; old_h = a->Height; if (pcb_undo_and_draw) @@ -278,7 +278,7 @@ a->Width = Entry->Data.Move.DX; a->Height = Entry->Data.Move.DY; pcb_arc_bbox(a); - rnd_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); + rnd_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); Entry->Data.Move.DX = old_w; Entry->Data.Move.DY = old_h; pcb_draw_obj((pcb_any_obj_t *)a); Index: trunk/src/view.c =================================================================== --- trunk/src/view.c (revision 31800) +++ trunk/src/view.c (revision 31801) @@ -166,7 +166,7 @@ void pcb_view_set_bbox_by_objs(pcb_data_t *data, pcb_view_t *v) { int g; - rnd_rnd_box_t b; + rnd_box_t b; pcb_any_obj_t *obj; pcb_idpath_t *idp; Index: trunk/src/view.h =================================================================== --- trunk/src/view.h (revision 31800) +++ trunk/src/view.h (revision 31801) @@ -58,7 +58,7 @@ unsigned have_bbox:1; unsigned have_xy:1; - rnd_rnd_box_t bbox; /* bounding box of all error objects (in both groups) */ + rnd_box_t bbox; /* bounding box of all error objects (in both groups) */ rnd_coord_t x, y; /* optional: a coord to mark on the preview */ pcb_idpath_list_t objs[2]; /* optional: two groups of objects to highlight on preview */ Index: trunk/src_plugins/acompnet/acompnet.c =================================================================== --- trunk/src_plugins/acompnet/acompnet.c (revision 31800) +++ trunk/src_plugins/acompnet/acompnet.c (revision 31801) @@ -47,7 +47,7 @@ rnd_coord_t r; } overlap_t; -static rnd_r_dir_t overlap(const rnd_rnd_box_t *box, void *closure) +static rnd_r_dir_t overlap(const rnd_box_t *box, void *closure) { pcb_any_obj_t *obj = (pcb_any_obj_t *)box; overlap_t *ovl = (overlap_t *)closure; @@ -75,7 +75,7 @@ TODO("move this to search.[ch]") /* Search for object(s) on a specific layer */ -static rnd_r_dir_t pcb_search_on_layer(pcb_layer_t *layer, const rnd_rnd_box_t *bbox, rnd_r_dir_t (*cb)(const rnd_rnd_box_t *box, void *closure), void *closure) +static rnd_r_dir_t pcb_search_on_layer(pcb_layer_t *layer, const rnd_box_t *bbox, rnd_r_dir_t (*cb)(const rnd_box_t *box, void *closure), void *closure) { rnd_r_dir_t res, fin = 0; @@ -105,7 +105,7 @@ static void acompnet_mesh_addpt(pcb_meshgraph_t *gr, pcb_layer_t *layer, double x, double y, int score, double sep) { overlap_t ovl; - rnd_rnd_box_t bbox; + rnd_box_t bbox; x = rnd_round(x); y = rnd_round(y); @@ -181,7 +181,7 @@ acompnet_mesh(&gr, PCB_CURRLAYER(PCB)); { /* temporary hack for testing: fixed, off-mesh start/end */ - rnd_rnd_box_t bbox; + rnd_box_t bbox; bbox.X1 = RND_MM_TO_COORD(6.35); bbox.X2 = bbox.X1+1; bbox.Y1 = RND_MM_TO_COORD(21.5); bbox.Y2 = bbox.Y1+1; is = pcb_msgr_add_node(&gr, &bbox, 0); Index: trunk/src_plugins/acompnet/meshgraph.c =================================================================== --- trunk/src_plugins/acompnet/meshgraph.c (revision 31800) +++ trunk/src_plugins/acompnet/meshgraph.c (revision 31801) @@ -45,7 +45,7 @@ gr->next_id = 1; } -long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_rnd_box_t *bbox, int score) +long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_box_t *bbox, int score) { pcb_meshnode_t *nd = malloc(sizeof(pcb_meshnode_t)); nd->bbox = *bbox; @@ -103,7 +103,7 @@ htip_set(&open, startid, curr); for(;;) { rnd_rtree_box_t sb; - rnd_rnd_box_t *b; + rnd_box_t *b; rnd_rtree_it_t it; double tentative_g, best; Index: trunk/src_plugins/acompnet/meshgraph.h =================================================================== --- trunk/src_plugins/acompnet/meshgraph.h (revision 31800) +++ trunk/src_plugins/acompnet/meshgraph.h (revision 31801) @@ -5,7 +5,7 @@ #include typedef struct { - rnd_rnd_box_t bbox; + rnd_box_t bbox; long int id; long int came_from; double gscore, fscore; @@ -20,7 +20,7 @@ } pcb_meshgraph_t; void pcb_msgr_init(pcb_meshgraph_t *gr); -long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_rnd_box_t *bbox, int score); +long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_box_t *bbox, int score); int pcb_msgr_astar(pcb_meshgraph_t *gr, long int startid, long int endid); #endif Index: trunk/src_plugins/asm/asm.c =================================================================== --- trunk/src_plugins/asm/asm.c (revision 31800) +++ trunk/src_plugins/asm/asm.c (revision 31801) @@ -335,7 +335,7 @@ void *r1, *r2, *r3; pcb_subc_t *sc; pcb_objtype_t type; - rnd_rnd_box_t view; + rnd_box_t view; type = pcb_search_obj_by_id_(PCB->Data, &r1, &r2, &r3, p->id, PCB_OBJ_SUBC); if (type != PCB_OBJ_SUBC) @@ -354,7 +354,7 @@ { long n; int isgrp = 0, ispart = 0; - rnd_rnd_box_t box; + rnd_box_t box; /* unselect all */ box.X1 = -RND_MAX_COORD; Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 31800) +++ trunk/src_plugins/autocrop/autocrop.c (revision 31801) @@ -42,7 +42,7 @@ static const char pcb_acts_autocrop[] = "autocrop()"; static fgw_error_t pcb_act_autocrop(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_rnd_box_t box; + rnd_box_t box; rnd_coord_t dx, dy, w, h; if (pcb_data_is_empty(PCB->Data)) Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 31800) +++ trunk/src_plugins/autoplace/autoplace.c (revision 31801) @@ -129,26 +129,26 @@ #define STEP_POINT 100 /* get next slot for a box, allocates memory if necessary */ -static rnd_rnd_box_t *pcb_box_new(rnd_rnd_box_list_t *Boxes) +static rnd_box_t *pcb_box_new(rnd_box_list_t *Boxes) { - rnd_rnd_box_t *box = Boxes->Box; + rnd_box_t *box = Boxes->Box; /* realloc new memory if necessary and clear it */ if (Boxes->BoxN >= Boxes->BoxMax) { Boxes->BoxMax = STEP_POINT + (2 * Boxes->BoxMax); - box = (rnd_rnd_box_t *) realloc(box, Boxes->BoxMax * sizeof(rnd_rnd_box_t)); + box = (rnd_box_t *) realloc(box, Boxes->BoxMax * sizeof(rnd_box_t)); Boxes->Box = box; - memset(box + Boxes->BoxN, 0, (Boxes->BoxMax - Boxes->BoxN) * sizeof(rnd_rnd_box_t)); + memset(box + Boxes->BoxN, 0, (Boxes->BoxMax - Boxes->BoxN) * sizeof(rnd_box_t)); } return (box + Boxes->BoxN++); } /* frees memory used by a box list */ -static void pcb_box_free(rnd_rnd_box_list_t *Boxlist) +static void pcb_box_free(rnd_box_list_t *Boxlist) { if (Boxlist) { free(Boxlist->Box); - memset(Boxlist, 0, sizeof(rnd_rnd_box_list_t)); + memset(Boxlist, 0, sizeof(rnd_box_list_t)); } } @@ -200,7 +200,7 @@ #if 0 /* only for debugging box lists */ /* makes a line on the solder layer surrounding all boxes in blist */ -static void showboxes(rnd_rnd_box_list_t *blist) +static void showboxes(rnd_box_list_t *blist) { rnd_cardinal_t i; pcb_layer_t *SLayer = &(PCB->Data->Layer[pcb_solder_silk_layer]); @@ -220,8 +220,8 @@ */ /*------ r_find_neighbor ------*/ struct r_neighbor_info { - const rnd_rnd_box_t *neighbor; - rnd_rnd_box_t trap; + const rnd_box_t *neighbor; + rnd_box_t trap; rnd_direction_t search_dir; }; #define ROTATEBOX(box) { rnd_coord_t t;\ @@ -230,10 +230,10 @@ t = (box).X1; (box).X1 = (box).X2; (box).X2 = t;\ } /* helper methods for __r_find_neighbor */ -static rnd_r_dir_t __r_find_neighbor_reg_in_sea(const rnd_rnd_box_t * region, void *cl) +static rnd_r_dir_t __r_find_neighbor_reg_in_sea(const rnd_box_t * region, void *cl) { struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; - rnd_rnd_box_t query = *region; + rnd_box_t query = *region; RND_BOX_ROTATE_TO_NORTH(query, ni->search_dir); /* ______________ __ trap.y1 __ * \ / |__| query rect. @@ -246,10 +246,10 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t __r_find_neighbor_rect_in_reg(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t __r_find_neighbor_rect_in_reg(const rnd_box_t * box, void *cl) { struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; - rnd_rnd_box_t query = *box; + rnd_box_t query = *box; int r; RND_BOX_ROTATE_TO_NORTH(query, ni->search_dir); /* ______________ __ trap.y1 __ @@ -270,10 +270,10 @@ /* main r_find_neighbor routine. Returns NULL if no neighbor in the * requested direction. */ -static const rnd_rnd_box_t *r_find_neighbor(rnd_rtree_t * rtree, const rnd_rnd_box_t * box, rnd_direction_t search_direction) +static const rnd_box_t *r_find_neighbor(rnd_rtree_t * rtree, const rnd_box_t * box, rnd_direction_t search_direction) { struct r_neighbor_info ni; - rnd_rnd_box_t bbox; + rnd_box_t bbox; ni.neighbor = NULL; ni.trap = *box; @@ -320,9 +320,9 @@ rnd_coord_t minx, maxx, miny, maxy; rnd_bool allpads, allsameside; rnd_cardinal_t thegroup; - rnd_rnd_box_list_t bounds = { 0, 0, NULL }; /* save bounding rectangles here */ - rnd_rnd_box_list_t solderside = { 0, 0, NULL }; /* solder side component bounds */ - rnd_rnd_box_list_t componentside = { 0, 0, NULL }; /* component side bounds */ + rnd_box_list_t bounds = { 0, 0, NULL }; /* save bounding rectangles here */ + rnd_box_list_t solderside = { 0, 0, NULL }; /* solder side component bounds */ + rnd_box_list_t componentside = { 0, 0, NULL }; /* component side bounds */ { @@ -380,8 +380,8 @@ /* two lists for solder side / component side. */ PCB_SUBC_LOOP(PCB->Data); { - rnd_rnd_box_list_t *thisside, *otherside; - rnd_rnd_box_t *box, *lastbox = NULL; + rnd_box_list_t *thisside, *otherside; + rnd_box_t *box, *lastbox = NULL; rnd_coord_t clearance; pcb_any_obj_t *o; pcb_data_it_t it; @@ -414,7 +414,7 @@ /* add a box for each thru-hole pin to the "opposite side": * surface mount components can't sit on top of pins */ if ((!CostParameter.fast) && (o->type == PCB_OBJ_PSTK)) { - rnd_rnd_box_t box2; + rnd_box_t box2; box2.X1 = o->BoundingBox.X1 - clearance; box2.Y1 = o->BoundingBox.Y1 - clearance; box2.X2 = o->BoundingBox.X2 + clearance; @@ -451,12 +451,12 @@ /* create r tree */ vtp0_t seboxes, ceboxes; struct ebox { - rnd_rnd_box_t box; + rnd_box_t box; TODO("subc: when elements are removed, turn this into pcb_subc_t * and remove the fields below") pcb_any_obj_t *comp; const char *refdes; int rot90; - rnd_rnd_box_t *vbox; + rnd_box_t *vbox; }; rnd_direction_t dir[4] = { RND_NORTH, RND_EAST, RND_SOUTH, RND_WEST }; struct ebox **boxpp, *boxp; @@ -489,9 +489,9 @@ PCB_END_LOOP; rt_s = rnd_r_create_tree(); - rnd_r_insert_array(rt_s, (const rnd_rnd_box_t **) seboxes.array, vtp0_len(&seboxes)); + rnd_r_insert_array(rt_s, (const rnd_box_t **) seboxes.array, vtp0_len(&seboxes)); rt_c = rnd_r_create_tree(); - rnd_r_insert_array(rt_c, (const rnd_rnd_box_t **) ceboxes.array, vtp0_len(&ceboxes)); + rnd_r_insert_array(rt_c, (const rnd_box_t **) ceboxes.array, vtp0_len(&ceboxes)); vtp0_uninit(&seboxes); vtp0_uninit(&ceboxes); /* now, for each subcircuit, find its neighbor on all four sides */ @@ -655,7 +655,7 @@ void doPerturb(vtp0_t *selected, PerturbationType *pt, rnd_bool undo) { - rnd_rnd_box_t *bb; + rnd_box_t *bb; rnd_coord_t bbcx, bbcy; pcb_subc_t *subc = (pcb_subc_t *)pt->comp; /* compute center of element bounding box */ Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 31800) +++ trunk/src_plugins/autoroute/autoroute.c (revision 31801) @@ -225,7 +225,7 @@ typedef enum etype { TERM, VIA, VIA_SHADOW, LINE, OTHER, EXPANSION_AREA, PLANE, THERMAL } etype; struct routebox_s { - rnd_rnd_box_t box, sbox; + rnd_box_t box, sbox; struct { rnd_coord_t x1, y1, x2, y2; } line; /* exact coords of the line we are going to draw if type is line; reverse engineering these from the bounding box using halfthick and other hacks lead to rounding errors, a few LSB flicker in coords, e.g. breaking rubber band */ @@ -382,13 +382,13 @@ } routeone_state_t; -static routebox_t *CreateExpansionArea(const rnd_rnd_box_t * area, rnd_cardinal_t group, +static routebox_t *CreateExpansionArea(const rnd_box_t * area, rnd_cardinal_t group, routebox_t * parent, rnd_bool relax_edge_requirements, edge_t * edge); static rnd_heap_cost_t edge_cost(const edge_t * e, const rnd_heap_cost_t too_big); static void best_path_candidate(routeone_state_t *s, edge_t * e, routebox_t * best_target); -static rnd_rnd_box_t edge_to_box(const routebox_t * rb, rnd_direction_t expand_dir); +static rnd_box_t edge_to_box(const routebox_t * rb, rnd_direction_t expand_dir); static void add_or_destroy_edge(routeone_state_t *s, edge_t * e); @@ -457,7 +457,7 @@ return 1; } -int no_planes(const rnd_rnd_box_t * b, void *cl) +int no_planes(const rnd_box_t * b, void *cl) { routebox_t *rb = (routebox_t *) b; if (rb->type == PLANE) @@ -544,7 +544,7 @@ static void init_const_box(routebox_t * rb, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t clearance) { - rnd_rnd_box_t *bp = (rnd_rnd_box_t *) & rb->box; /* note discarding const! */ + rnd_box_t *bp = (rnd_box_t *) & rb->box; /* note discarding const! */ assert(!rb->flags.inited); assert(X1 <= X2 && Y1 <= Y2); bp->X1 = X1 - clearance; @@ -551,7 +551,7 @@ bp->Y1 = Y1 - clearance; bp->X2 = X2 + clearance; bp->Y2 = Y2 + clearance; - bp = (rnd_rnd_box_t *) & rb->sbox; + bp = (rnd_box_t *) & rb->sbox; bp->X1 = X1; bp->Y1 = Y1; bp->X2 = X2; @@ -559,12 +559,12 @@ rb->flags.inited = 1; } -static inline rnd_rnd_box_t shrink_routebox(const routebox_t * rb) +static inline rnd_box_t shrink_routebox(const routebox_t * rb) { return rb->sbox; } -static inline rnd_heap_cost_t box_area(const rnd_rnd_box_t b) +static inline rnd_heap_cost_t box_area(const rnd_box_t b) { rnd_heap_cost_t ans = b.X2 - b.X1; return ans * (b.Y2 - b.Y1); @@ -577,7 +577,7 @@ static inline rnd_bool point_in_shrunk_box(const routebox_t * box, rnd_coord_t X, rnd_coord_t Y) { - rnd_rnd_box_t b = shrink_routebox(box); + rnd_box_t b = shrink_routebox(box); return rnd_point_in_box(&b, X, Y); } @@ -783,16 +783,16 @@ } struct rb_info { - rnd_rnd_box_t query; + rnd_box_t query; routebox_t *winner; jmp_buf env; }; -static rnd_r_dir_t __found_one_on_lg(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t __found_one_on_lg(const rnd_box_t * box, void *cl) { struct rb_info *inf = (struct rb_info *) cl; routebox_t *rb = (routebox_t *) box; - rnd_rnd_box_t sb; + rnd_box_t sb; if (rb->flags.nonstraight) return RND_R_DIR_NOT_FOUND; @@ -1105,7 +1105,7 @@ static routedata_t *CreateRouteData() { vtp0_t layergroupboxes[PCB_MAX_LAYERGRP]; - rnd_rnd_box_t bbox; + rnd_box_t bbox; routedata_t *rd; int group, i; @@ -1196,7 +1196,7 @@ for (i = 0; i < pcb_max_group(PCB); i++) { /* create the r-tree */ rd->layergrouptree[i] = rnd_r_create_tree(); - rnd_r_insert_array(rd->layergrouptree[i], (const rnd_rnd_box_t **) layergroupboxes[i].array, vtp0_len(&layergroupboxes[i])); + rnd_r_insert_array(rd->layergrouptree[i], (const rnd_box_t **) layergroupboxes[i].array, vtp0_len(&layergroupboxes[i])); } if (AutoRouteParameters.use_vias) { @@ -1298,7 +1298,7 @@ /* return the minimum *cost* from a point to a box on any layer. * It's safe to return a smaller than minimum cost */ -static rnd_heap_cost_t pcb_cost_to_layerless_box(const rnd_cheap_point_t * p, rnd_cardinal_t point_layer, const rnd_rnd_box_t * b) +static rnd_heap_cost_t pcb_cost_to_layerless_box(const rnd_cheap_point_t * p, rnd_cardinal_t point_layer, const rnd_box_t * b) { rnd_cheap_point_t p2 = rnd_closest_cheap_point_in_box(p, b); register rnd_heap_cost_t c1, c2; @@ -1351,9 +1351,9 @@ } -static rnd_rnd_box_t bloat_routebox(routebox_t * rb) +static rnd_box_t bloat_routebox(routebox_t * rb) { - rnd_rnd_box_t r; + rnd_box_t r; rnd_coord_t clearance; assert(__routepcb_box_is_good(rb)); @@ -1373,7 +1373,7 @@ typedef short pcb_dimension_t; /* makes a line on the solder layer silk surrounding the box */ -static void showbox(rnd_rnd_box_t b, pcb_dimension_t thickness, int group) +static void showbox(rnd_box_t b, pcb_dimension_t thickness, int group) { pcb_line_t *line; pcb_layer_t *csl, *SLayer = pcb_get_layer(PCB->Data, group); @@ -1419,7 +1419,7 @@ #if defined(ROUTE_DEBUG) static void showedge(edge_t * e) { - rnd_rnd_box_t *b = (rnd_rnd_box_t *) e->rb; + rnd_box_t *b = (rnd_box_t *) e->rb; if (ddraw == NULL) return; @@ -1536,7 +1536,7 @@ routebox_t *nearest; rnd_heap_cost_t nearest_cost; }; -static rnd_r_dir_t __region_within_guess(const rnd_rnd_box_t * region, void *cl) +static rnd_r_dir_t __region_within_guess(const rnd_box_t * region, void *cl) { struct minpcb_cost_target_closure *mtc = (struct minpcb_cost_target_closure *) cl; rnd_heap_cost_t pcb_cost_to_region; @@ -1550,7 +1550,7 @@ return (pcb_cost_to_region < mtc->nearest_cost) ? RND_R_DIR_FOUND_CONTINUE : RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t __found_new_guess(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t __found_new_guess(const rnd_box_t * box, void *cl) { struct minpcb_cost_target_closure *mtc = (struct minpcb_cost_target_closure *) cl; routebox_t *guess = (routebox_t *) box; @@ -1632,7 +1632,7 @@ static edge_t *CreateEdge2(routebox_t * rb, rnd_direction_t expand_dir, edge_t * previous_edge, rnd_rtree_t * targets, routebox_t * guess) { - rnd_rnd_box_t thisbox; + rnd_box_t thisbox; rnd_cheap_point_t thiscost, prevcost; rnd_heap_cost_t d; @@ -1653,7 +1653,7 @@ } /* create via edge, using previous edge to fill in defaults. */ -static edge_t *CreateViaEdge(const rnd_rnd_box_t * area, rnd_cardinal_t group, +static edge_t *CreateViaEdge(const rnd_box_t * area, rnd_cardinal_t group, routebox_t * parent, edge_t * previous_edge, conflict_t to_site_conflict, conflict_t through_site_conflict, rnd_rtree_t * targets) { @@ -1719,7 +1719,7 @@ * it will become available if the conflict is elliminated. * That is why we ignore the interior_edge argument. */ -static edge_t *CreateEdgeWithConflicts(const rnd_rnd_box_t * interior_edge, +static edge_t *CreateEdgeWithConflicts(const rnd_box_t * interior_edge, routebox_t * container, edge_t * previous_edge, rnd_heap_cost_t cost_penalty_to_box, rnd_rtree_t * targets) { @@ -1779,9 +1779,9 @@ /* given an edge of a box, return a box containing exactly the points on that * edge. Note that the return box is treated as closed; that is, the bottom and * right "edges" consist of points (just barely) not in the (half-open) box. */ -static rnd_rnd_box_t edge_to_box(const routebox_t * rb, rnd_direction_t expand_dir) +static rnd_box_t edge_to_box(const routebox_t * rb, rnd_direction_t expand_dir) { - rnd_rnd_box_t b = shrink_routebox(rb); + rnd_box_t b = shrink_routebox(rb); /* narrow box down to just the appropriate edge */ switch (expand_dir) { case RND_NORTH: @@ -1804,13 +1804,13 @@ } struct broken_boxes { - rnd_rnd_box_t left, center, right; + rnd_box_t left, center, right; rnd_bool is_valid_left, is_valid_center, is_valid_right; }; -static struct broken_boxes break_box_edge(const rnd_rnd_box_t * original, rnd_direction_t which_edge, routebox_t * breaker) +static struct broken_boxes break_box_edge(const rnd_box_t * original, rnd_direction_t which_edge, routebox_t * breaker) { - rnd_rnd_box_t origbox, breakbox; + rnd_box_t origbox, breakbox; struct broken_boxes result; assert(original && breaker); @@ -1845,7 +1845,7 @@ } #ifndef NDEBUG -static int share_edge(const rnd_rnd_box_t * child, const rnd_rnd_box_t * parent) +static int share_edge(const rnd_box_t * child, const rnd_box_t * parent) { return (child->X1 == parent->X2 || child->X2 == parent->X1 || @@ -1853,7 +1853,7 @@ ((parent->X1 <= child->X1 && child->X2 <= parent->X2) || (parent->Y1 <= child->Y1 && child->Y2 <= parent->Y2)); } -static int edge_intersect(const rnd_rnd_box_t * child, const rnd_rnd_box_t * parent) +static int edge_intersect(const rnd_box_t * child, const rnd_box_t * parent) { return (child->X1 <= parent->X2) && (child->X2 >= parent->X1) && (child->Y1 <= parent->Y2) && (child->Y2 >= parent->Y1); } @@ -1863,7 +1863,7 @@ * immediately preceding expansion area, for backtracing. 'lastarea' is * the last expansion area created, we string these together in a loop * so we can remove them all easily at the end. */ -static routebox_t *CreateExpansionArea(const rnd_rnd_box_t * area, rnd_cardinal_t group, +static routebox_t *CreateExpansionArea(const rnd_box_t * area, rnd_cardinal_t group, routebox_t * parent, rnd_bool relax_edge_requirements, edge_t * src_edge) { routebox_t *rb = (routebox_t *) malloc(sizeof(*rb)); @@ -1876,7 +1876,7 @@ #ifndef NDEBUG { /* work around rounding errors: grow both boxes by 2 nm */ - rnd_rnd_box_t b1 = rb->sbox, b2 = parent->sbox; + rnd_box_t b1 = rb->sbox, b2 = parent->sbox; b1.X1--;b1.Y1--;b1.X2++;b1.Y2++; b2.X1--;b2.Y1--;b2.X2++;b2.Y2++; assert(relax_edge_requirements ? rnd_box_intersect(&b1, &b2) @@ -1911,7 +1911,7 @@ routebox_t *parent; routebox_t *n, *e, *s, *w; rnd_coord_t keep, bloat; - rnd_rnd_box_t inflated, orig; + rnd_box_t inflated, orig; int done; }; @@ -1921,11 +1921,11 @@ * like it wouldn't be seen. We do this while keep the inflated * box as large as possible. */ -static rnd_r_dir_t __Expand_this_rect(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t __Expand_this_rect(const rnd_box_t * box, void *cl) { struct E_result *res = (struct E_result *) cl; routebox_t *rb = (routebox_t *) box; - rnd_rnd_box_t rbox; + rnd_box_t rbox; rnd_coord_t dn, de, ds, dw, bloat; /* we don't see conflicts already encountered */ @@ -2061,7 +2061,7 @@ * looks past the clearance to see these targets even though they * weren't actually touched in the expansion. */ -struct E_result *Expand(rnd_rtree_t * rtree, edge_t * e, const rnd_rnd_box_t * box) +struct E_result *Expand(rnd_rtree_t * rtree, edge_t * e, const rnd_box_t * box) { static struct E_result ans; int noshrink; /* bit field of which edges to not shrink */ @@ -2203,9 +2203,9 @@ * It returns 1 for any fixed blocker that is not part * of this net and zero otherwise. */ -static int blocker_to_heap(rnd_heap_t * heap, routebox_t * rb, rnd_rnd_box_t * box, rnd_direction_t dir) +static int blocker_to_heap(rnd_heap_t * heap, routebox_t * rb, rnd_box_t * box, rnd_direction_t dir) { - rnd_rnd_box_t b = rb->sbox; + rnd_box_t b = rb->sbox; if (rb->style->Clearance > AutoRouteParameters.style->Clearance) b = rnd_bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); b = rnd_clip_box(&b, box); @@ -2240,7 +2240,7 @@ * (more commonly) create a supper-thin box to provide a * home for an expansion edge. */ -static routebox_t *CreateBridge(const rnd_rnd_box_t * area, routebox_t * parent, rnd_direction_t dir) +static routebox_t *CreateBridge(const rnd_box_t * area, routebox_t * parent, rnd_direction_t dir) { routebox_t *rb = (routebox_t *) malloc(sizeof(*rb)); memset((void *) rb, 0, sizeof(*rb)); @@ -2268,12 +2268,12 @@ * starting box, direction and blocker if any. */ void -moveable_edge(vector_t * result, const rnd_rnd_box_t * box, rnd_direction_t dir, +moveable_edge(vector_t * result, const rnd_box_t * box, rnd_direction_t dir, routebox_t * rb, routebox_t * blocker, edge_t * e, rnd_rtree_t * targets, routeone_state_t *s, rnd_rtree_t * tree, vector_t * area_vec) { - rnd_rnd_box_t b; + rnd_box_t b; assert(rnd_box_is_good(box)); b = *box; /* for the cardinal directions, move the box to overlap the @@ -2451,16 +2451,16 @@ struct break_info { rnd_heap_t *heap; routebox_t *parent; - rnd_rnd_box_t box; + rnd_box_t box; rnd_direction_t dir; rnd_bool ignore_source; }; -static rnd_r_dir_t __GatherBlockers(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t __GatherBlockers(const rnd_box_t * box, void *cl) { routebox_t *rb = (routebox_t *) box; struct break_info *bi = (struct break_info *) cl; - rnd_rnd_box_t b; + rnd_box_t b; if (bi->parent == rb || rb->flags.touched || bi->parent->parent.expansion_area == rb) return RND_R_DIR_NOT_FOUND; @@ -2480,9 +2480,9 @@ * i.e. if dir is SOUTH, then this means fixing up an EAST leftover * edge, which would be the southern most edge for that example. */ -static inline rnd_rnd_box_t previous_edge(rnd_coord_t last, rnd_direction_t i, const rnd_rnd_box_t * b) +static inline rnd_box_t previous_edge(rnd_coord_t last, rnd_direction_t i, const rnd_box_t * b) { - rnd_rnd_box_t db = *b; + rnd_box_t db = *b; switch (i) { case RND_EAST: db.X1 = last; @@ -2535,7 +2535,7 @@ * we still need to break portions of all 4 edges */ if (e->expand_dir == RND_NE || e->expand_dir == RND_SE || e->expand_dir == RND_SW || e->expand_dir == RND_NW) { - rnd_rnd_box_t *fb = (rnd_rnd_box_t *) & fake.sbox; + rnd_box_t *fb = (rnd_box_t *) & fake.sbox; memset(&fake, 0, sizeof(fake)); *fb = e->rb->sbox; fake.flags.fixed = 1; /* this stops expansion there */ @@ -2544,7 +2544,7 @@ #ifndef NDEBUG /* the routbox_is_good checker wants a lot more! */ fake.flags.inited = 1; - fb = (rnd_rnd_box_t *) & fake.box; + fb = (rnd_box_t *) & fake.box; *fb = e->rb->sbox; fake.same_net.next = fake.same_net.prev = &fake; fake.same_subnet.next = fake.same_subnet.prev = &fake; @@ -2639,7 +2639,7 @@ * heap loop because it is special; it can be part of a corner */ routebox_t *blk = (routebox_t *) rnd_heap_remove_smallest(heap[dir]); - rnd_rnd_box_t b = rb->sbox; + rnd_box_t b = rb->sbox; struct broken_boxes broke = break_box_edge(&b, dir, blk); if (broke.is_valid_left) { /* if last > 0, then the previous edge had a segment @@ -2647,7 +2647,7 @@ */ if (last > 0) { /* make a corner expansion */ - rnd_rnd_box_t db = b; + rnd_box_t db = b; switch (dir) { case RND_EAST: /* possible NE expansion */ @@ -2689,7 +2689,7 @@ * in the direction of the previous edge, * which it belongs to. */ - rnd_rnd_box_t db = previous_edge(last, dir, &rb->sbox); + rnd_box_t db = previous_edge(last, dir, &rb->sbox); moveable_edge(edges, &db, (rnd_direction_t) (dir - 1), rb, NULL, e, targets, s, NULL, NULL); } if (broke.is_valid_center && !blk->flags.source) @@ -2743,7 +2743,7 @@ if (last > 0) { /* expand the leftover from the prior direction */ - rnd_rnd_box_t db = previous_edge(last, dir, &rb->sbox); + rnd_box_t db = previous_edge(last, dir, &rb->sbox); moveable_edge(edges, &db, (rnd_direction_t) (dir - 1), rb, NULL, e, targets, s, NULL, NULL); } last = -1; @@ -2751,7 +2751,7 @@ } /* for loop */ /* finally, check for the NW corner now that we've come full circle */ if (first > 0 && last > 0) { - rnd_rnd_box_t db = rb->sbox; + rnd_box_t db = rb->sbox; db.X2 = first; db.Y2 = last; moveable_edge(edges, &db, RND_NW, rb, NULL, e, targets, s, NULL, NULL); @@ -2758,12 +2758,12 @@ } else { if (first > 0) { - rnd_rnd_box_t db = rb->sbox; + rnd_box_t db = rb->sbox; db.X2 = first; moveable_edge(edges, &db, RND_NORTH, rb, NULL, e, targets, s, NULL, NULL); } else if (last > 0) { - rnd_rnd_box_t db = rb->sbox; + rnd_box_t db = rb->sbox; db.Y2 = last; moveable_edge(edges, &db, RND_WEST, rb, NULL, e, targets, s, NULL, NULL); } @@ -2789,15 +2789,15 @@ /* ------------ */ struct foib_info { - const rnd_rnd_box_t *box; + const rnd_box_t *box; routebox_t *intersect; jmp_buf env; }; -static rnd_r_dir_t foib_rect_in_reg(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t foib_rect_in_reg(const rnd_box_t * box, void *cl) { struct foib_info *foib = (struct foib_info *) cl; - rnd_rnd_box_t rbox; + rnd_box_t rbox; routebox_t *rb = (routebox_t *) box; if (rb->flags.touched) return RND_R_DIR_NOT_FOUND; @@ -2815,7 +2815,7 @@ static routebox_t *FindOneInBox(rnd_rtree_t * rtree, routebox_t * rb) { struct foib_info foib; - rnd_rnd_box_t r; + rnd_box_t r; r = rb->sbox; foib.box = &r; @@ -2828,14 +2828,14 @@ struct therm_info { routebox_t *plane; - rnd_rnd_box_t query; + rnd_box_t query; jmp_buf env; }; -static rnd_r_dir_t ftherm_rect_in_reg(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t ftherm_rect_in_reg(const rnd_box_t * box, void *cl) { routebox_t *rbox = (routebox_t *) box; struct therm_info *ti = (struct therm_info *) cl; - rnd_rnd_box_t sq, sb; + rnd_box_t sq, sb; if (rbox->type != TERM) return RND_R_DIR_NOT_FOUND; @@ -3066,7 +3066,7 @@ static rnd_bool RD_DrawManhattanLine(routedata_t * rd, - const rnd_rnd_box_t * box1, const rnd_rnd_box_t * box2, + const rnd_box_t * box1, const rnd_box_t * box2, rnd_cheap_point_t start, rnd_cheap_point_t end, rnd_coord_t halfthick, rnd_cardinal_t group, routebox_t * subnet, rnd_bool is_bad, rnd_bool last_was_x) { @@ -3123,7 +3123,7 @@ /* for smoothing, don't pack traces to min clearance gratuitously */ #if 0 -static void add_clearance(rnd_cheap_point_t * nextpoint, const rnd_rnd_box_t * b) +static void add_clearance(rnd_cheap_point_t * nextpoint, const rnd_box_t * b) { if (nextpoint->X == b->X1) { if (nextpoint->X + AutoRouteParameters.style->Clearance < (b->X1 + b->X2) / 2) @@ -3171,7 +3171,7 @@ rnd_coord_t radius = HALF_THICK(AutoRouteParameters.style->Diameter); rnd_cheap_point_t lastpoint, nextpoint; routebox_t *lastpath; - rnd_rnd_box_t b; + rnd_box_t b; assert(subnet->style == AutoRouteParameters.style); /*XXX: because we round up odd thicknesses, there's the possibility that @@ -3327,7 +3327,7 @@ routebox_t * rb, conflict_t conflict, rnd_rtree_t * targets, rnd_bool in_plane) { routebox_t *target; - rnd_rnd_box_t b; + rnd_box_t b; rnd_heap_cost_t cost; assert(__routepcb_box_is_good(rb)); /* find the cheapest target */ @@ -3408,7 +3408,7 @@ { rnd_coord_t radius, clearance; vetting_t *work; - rnd_rnd_box_t region = shrink_routebox(within); + rnd_box_t region = shrink_routebox(within); rnd_shrink_box(®ion, shrink); radius = HALF_THICK(AutoRouteParameters.style->Diameter); @@ -3452,8 +3452,8 @@ i == LO_CONFLICT ? vss->lo_conflict_space_vec : i == HI_CONFLICT ? vss->hi_conflict_space_vec : NULL); assert(v); while (!vector_is_empty(v)) { - rnd_rnd_box_t cliparea; - rnd_rnd_box_t *area = (rnd_rnd_box_t *) vector_remove_last(v); + rnd_box_t cliparea; + rnd_box_t *area = (rnd_box_t *) vector_remove_last(v); if (!(i == NO_CONFLICT || AutoRouteParameters.with_conflicts)) { free(area); continue; @@ -3569,7 +3569,7 @@ #endif -static rnd_r_dir_t __conflict_source(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t __conflict_source(const rnd_box_t * box, void *cl) { routebox_t *rb = (routebox_t *) box; if (rb->flags.touched || rb->flags.fixed) @@ -3603,7 +3603,7 @@ routeone_status_t result; routebox_t *p; int seen, i; - const rnd_rnd_box_t **target_list; + const rnd_box_t **target_list; int num_targets; rnd_rtree_t *targets; /* vector of source edges for filtering */ @@ -3681,7 +3681,7 @@ assert(!from->flags.target); assert(num_targets > 0); /* create list of target pointers and from that a r-tree of targets */ - target_list = (const rnd_rnd_box_t **) malloc(num_targets * sizeof(*target_list)); + target_list = (const rnd_box_t **) malloc(num_targets * sizeof(*target_list)); i = 0; LIST_LOOP(from, same_net, p); if (p->flags.target) { @@ -3692,7 +3692,7 @@ } PCB_END_LOOP; targets = rnd_r_create_tree(); - rnd_r_insert_array(targets, (const rnd_rnd_box_t **)target_list, i); + rnd_r_insert_array(targets, (const rnd_box_t **)target_list, i); assert(i <= num_targets); free(target_list); @@ -3707,7 +3707,7 @@ if (p->flags.source && is_layer_group_active[p->group]) { rnd_cheap_point_t cp; edge_t *e; - rnd_rnd_box_t b = shrink_routebox(p); + rnd_box_t b = shrink_routebox(p); #if defined(ROUTE_DEBUG) && defined(DEBUG_SHOW_SOURCES) showroutebox(p); @@ -3790,7 +3790,7 @@ if (e->rb->type == PLANE) { routebox_t *pin = FindThermable(targets, e->rb); if (pin) { - rnd_rnd_box_t b = shrink_routebox(pin); + rnd_box_t b = shrink_routebox(pin); edge_t *ne; routebox_t *nrb; assert(pin->flags.target); @@ -3833,7 +3833,7 @@ /* we have hit a plane */ edge_t *ne; routebox_t *nrb; - rnd_rnd_box_t b = shrink_routebox(e->rb); + rnd_box_t b = shrink_routebox(e->rb); /* limit via region to that inside the plane */ rnd_clip_box(&b, &intersecting->sbox); nrb = CreateExpansionArea(&b, e->rb->group, e->rb, rnd_true, e); @@ -3862,7 +3862,7 @@ goto dontexpand; else if (0) { /* XXX: disabling this causes no via collisions. */ - rnd_rnd_box_t a = bloat_routebox(intersecting), b; + rnd_box_t a = bloat_routebox(intersecting), b; edge_t *ne; int i, j; /* something intersects this via candidate. split via candidate @@ -3935,7 +3935,7 @@ if (1) { routebox_t *nrb; struct E_result *ans; - rnd_rnd_box_t b; + rnd_box_t b; vector_t *broken; if (e->flags.is_interior) { assert(AutoRouteParameters.with_conflicts); /* no interior edges unless @@ -4108,7 +4108,7 @@ } #ifndef NDEBUG -rnd_r_dir_t bad_boy(const rnd_rnd_box_t * b, void *cl) +rnd_r_dir_t bad_boy(const rnd_box_t * b, void *cl) { routebox_t *box = (routebox_t *) b; if (box->type == EXPANSION_AREA) @@ -4119,7 +4119,7 @@ rnd_bool no_expansion_boxes(routedata_t * rd) { int i; - rnd_rnd_box_t big; + rnd_box_t big; big.X1 = 0; big.X2 = RND_MAX_COORD; big.Y1 = 0; @@ -4148,7 +4148,7 @@ } } -static rnd_r_dir_t ripout_livedraw_obj_cb(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t ripout_livedraw_obj_cb(const rnd_box_t * b, void *cl) { routebox_t *box = (routebox_t *) b; ripout_livedraw_obj(box); @@ -4207,7 +4207,7 @@ LIST_LOOP(rd->first_net, different_net, net); { double area; - rnd_rnd_box_t bb = shrink_routebox(net); + rnd_box_t bb = shrink_routebox(net); LIST_LOOP(net, same_net, p); { RND_MAKE_MIN(bb.X1, p->sbox.X1); @@ -4323,7 +4323,7 @@ LIST_LOOP(net, same_net, p); { #ifdef NET_HEAP - rnd_rnd_box_t b = shrink_routebox(p); + rnd_box_t b = shrink_routebox(p); /* using a heap allows us to start from smaller objects and * end at bigger ones. also prefer to start at planes, then pads */ rnd_heap_insert(net_heap, (float) (b.X2 - b.X1) * @@ -4448,7 +4448,7 @@ jmp_buf env; }; -static rnd_r_dir_t fpstk_rect(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t fpstk_rect(const rnd_box_t * b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; struct fpin_info *info = (struct fpin_info *) cl; @@ -4459,7 +4459,7 @@ return RND_R_DIR_NOT_FOUND; } -static int FindPin(const rnd_rnd_box_t *box, pcb_pstk_t **ps_out) +static int FindPin(const rnd_box_t *box, pcb_pstk_t **ps_out) { struct fpin_info info; @@ -4505,7 +4505,7 @@ if (p->type == LINE) { rnd_coord_t halfwidth = HALF_THICK(p->style->Thick); double th = halfwidth * 2 + 1; - rnd_rnd_box_t b; + rnd_box_t b; assert(p->parent.line == NULL); /* orthogonal; thickness is 2*halfwidth */ /* flip coordinates, if bl_to_ur */ @@ -4535,7 +4535,7 @@ else if (p->type == VIA || p->type == VIA_SHADOW) { routebox_t *pp = (p->type == VIA_SHADOW) ? p->parent.via_shadow : p; rnd_coord_t radius = HALF_THICK(pp->style->Diameter); - rnd_rnd_box_t b = shrink_routebox(p); + rnd_box_t b = shrink_routebox(p); total_via_count++; assert(pp->type == VIA); if (pp->parent.via == NULL) { @@ -4745,7 +4745,7 @@ rnd_hid_progress(0, 0, NULL); if (conf_core.editor.live_routing) { int i; - rnd_rnd_box_t big = { 0, 0, RND_MAX_COORD, RND_MAX_COORD }; + rnd_box_t big = { 0, 0, RND_MAX_COORD, RND_MAX_COORD }; for (i = 0; i < pcb_max_group(PCB); i++) { rnd_r_search(rd->layergrouptree[i], &big, NULL, ripout_livedraw_obj_cb, NULL, NULL); } Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 31800) +++ trunk/src_plugins/autoroute/mtspace.c (revision 31801) @@ -57,7 +57,7 @@ /* mtspace data structures are built on r-trees. */ typedef struct mtspacebox { - const rnd_rnd_box_t box; + const rnd_box_t box; rnd_coord_t clearance; /* the smallest clearance around this box */ } mtspacebox_t; @@ -86,13 +86,13 @@ #define SPECIAL 823157 -mtspacebox_t *mtspace_create_box(const rnd_rnd_box_t * box, rnd_coord_t clearance) +mtspacebox_t *mtspace_create_box(const rnd_box_t * box, rnd_coord_t clearance) { mtspacebox_t *mtsb; assert(rnd_box_is_good(box)); mtsb = (mtspacebox_t *) malloc(sizeof(*mtsb)); /* the box was sent to us pre-bloated by the clearance amount */ - *((rnd_rnd_box_t *) & mtsb->box) = *box; + *((rnd_box_t *) & mtsb->box) = *box; mtsb->clearance = clearance; assert(rnd_box_is_good(&mtsb->box)); return mtsb; @@ -128,12 +128,12 @@ struct mts_info { rnd_coord_t clearance; - rnd_rnd_box_t box; + rnd_box_t box; rnd_rtree_t *tree; jmp_buf env; }; -static rnd_r_dir_t mts_remove_one(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t mts_remove_one(const rnd_box_t * b, void *cl) { struct mts_info *info = (struct mts_info *) cl; mtspacebox_t *box = (mtspacebox_t *) b; @@ -142,7 +142,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) { - rnd_r_delete_entry_free_data(info->tree, (rnd_rnd_box_t *)b, free); + rnd_r_delete_entry_free_data(info->tree, (rnd_box_t *)b, free); longjmp(info->env, 1); } return RND_R_DIR_NOT_FOUND; @@ -161,17 +161,17 @@ } /* add a space-filler to the empty space representation. */ -void mtspace_add(mtspace_t * mtspace, const rnd_rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) +void mtspace_add(mtspace_t * mtspace, const rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) { mtspacebox_t *filler = mtspace_create_box(box, clearance); - rnd_r_insert_entry(which_tree(mtspace, which), (const rnd_rnd_box_t *) filler); + rnd_r_insert_entry(which_tree(mtspace, which), (const rnd_box_t *) filler); } /* remove a space-filler from the empty space representation. */ -void mtspace_remove(mtspace_t * mtspace, const rnd_rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) +void mtspace_remove(mtspace_t * mtspace, const rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) { struct mts_info cl; - rnd_rnd_box_t small_search; + rnd_box_t small_search; cl.clearance = clearance; cl.box = *box; @@ -184,7 +184,7 @@ } struct query_closure { - rnd_rnd_box_t *cbox; + rnd_box_t *cbox; heap_or_vector checking; heap_or_vector touching; rnd_cheap_point_t *desired; @@ -193,7 +193,7 @@ rnd_bool touch_is_vec; }; -static inline void heap_append(rnd_heap_t * heap, rnd_cheap_point_t * desired, rnd_rnd_box_t * newone) +static inline void heap_append(rnd_heap_t * heap, rnd_cheap_point_t * desired, rnd_box_t * newone) { rnd_cheap_point_t p = *desired; assert(desired); @@ -201,7 +201,7 @@ rnd_heap_insert(heap, RND_ABS(p.X - desired->X) + (p.Y - desired->Y), newone); } -static inline void append(struct query_closure *qc, rnd_rnd_box_t * newone) +static inline void append(struct query_closure *qc, rnd_box_t * newone) { if (qc->desired) heap_append(qc->checking.h, qc->desired, newone); @@ -213,7 +213,7 @@ * First check if it does intersect, then break it into * overlaping regions that don't intersect this box. */ -static rnd_r_dir_t query_one(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t query_one(const rnd_box_t * box, void *cl) { struct query_closure *qc = (struct query_closure *) cl; mtspacebox_t *mtsb = (mtspacebox_t *) box; @@ -222,7 +222,7 @@ #ifndef NDEBUG { /* work around rounding errors: grow both boxes by 2 nm */ - rnd_rnd_box_t b1 = *qc->cbox, b2 = mtsb->box; + rnd_box_t b1 = *qc->cbox, b2 = mtsb->box; b1.X1--;b1.Y1--;b1.X2++;b1.Y2++; b2.X1--;b2.Y1--;b2.X2++;b2.Y2++; assert(rnd_box_intersect(&b1, &b2)); @@ -244,7 +244,7 @@ rnd_coord_t Y1 = qc->cbox->Y1; rnd_coord_t Y2 = mtsb->box.Y1 + shrink; if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { - rnd_rnd_box_t *newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_rnd_box_t)); + rnd_box_t *newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); newone->X1 = qc->cbox->X1; newone->X2 = qc->cbox->X2; newone->Y1 = Y1; @@ -257,7 +257,7 @@ rnd_coord_t Y1 = mtsb->box.Y2 - shrink; rnd_coord_t Y2 = qc->cbox->Y2; if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { - rnd_rnd_box_t *newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_rnd_box_t)); + rnd_box_t *newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); newone->X1 = qc->cbox->X1; newone->X2 = qc->cbox->X2; newone->Y2 = qc->cbox->Y2; @@ -270,8 +270,8 @@ rnd_coord_t X1 = qc->cbox->X1; rnd_coord_t X2 = mtsb->box.X1 + shrink; if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { - rnd_rnd_box_t *newone; - newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_rnd_box_t)); + rnd_box_t *newone; + newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); newone->Y1 = qc->cbox->Y1; newone->Y2 = qc->cbox->Y2; newone->X1 = qc->cbox->X1; @@ -284,7 +284,7 @@ rnd_coord_t X1 = mtsb->box.X2 - shrink; rnd_coord_t X2 = qc->cbox->X2; if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { - rnd_rnd_box_t *newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_rnd_box_t)); + rnd_box_t *newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); newone->Y1 = qc->cbox->Y1; newone->Y2 = qc->cbox->Y2; newone->X2 = qc->cbox->X2; @@ -315,11 +315,11 @@ */ static void qloop(struct query_closure *qc, rnd_rtree_t * tree, heap_or_vector res, rnd_bool is_vec) { - rnd_rnd_box_t *cbox; + rnd_box_t *cbox; int n; while (!(qc->desired ? rnd_heap_is_empty(qc->checking.h) : vector_is_empty(qc->checking.v))) { - cbox = qc->desired ? (rnd_rnd_box_t *) rnd_heap_remove_smallest(qc->checking.h) : (rnd_rnd_box_t *) vector_remove_last(qc->checking.v); + cbox = qc->desired ? (rnd_box_t *) rnd_heap_remove_smallest(qc->checking.h) : (rnd_box_t *) vector_remove_last(qc->checking.v); if (setjmp(qc->env) == 0) { assert(rnd_box_is_good(cbox)); qc->cbox = cbox; @@ -387,7 +387,7 @@ * to search harder for such regions if the computation becomes * necessary. */ -vetting_t *mtspace_query_rect(mtspace_t * mtspace, const rnd_rnd_box_t * region, +vetting_t *mtspace_query_rect(mtspace_t * mtspace, const rnd_box_t * region, rnd_coord_t radius, rnd_coord_t clearance, vetting_t * work, vector_t * free_space_vec, @@ -402,7 +402,7 @@ assert(hi_conflict_space_vec); /* search out to anything that might matter */ if (region) { - rnd_rnd_box_t *cbox; + rnd_box_t *cbox; assert(work == NULL); assert(rnd_box_is_good(region)); assert(vector_is_empty(free_space_vec)); @@ -411,7 +411,7 @@ work = (vetting_t *) malloc(sizeof(vetting_t)); work->clearance = clearance; work->radius = radius; - cbox = (rnd_rnd_box_t *) malloc(sizeof(rnd_rnd_box_t)); + cbox = (rnd_box_t *) malloc(sizeof(rnd_box_t)); *cbox = rnd_bloat_box(region, clearance + radius); if (desired) { work->untested.h = rnd_heap_create(); Index: trunk/src_plugins/autoroute/mtspace.h =================================================================== --- trunk/src_plugins/autoroute/mtspace.h (revision 31800) +++ trunk/src_plugins/autoroute/mtspace.h (revision 31801) @@ -60,15 +60,15 @@ * should *not* be bloated; it should be "true". The feature will fill * *at least* a radius of clearance around it; */ -void mtspace_add(mtspace_t * mtspace, const rnd_rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance); +void mtspace_add(mtspace_t * mtspace, const rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance); /* remove a space-filler from the empty space representation. The given box * should *not* be bloated; it should be "true". The feature will fill * *at least* a radius of clearance around it; */ -void mtspace_remove(mtspace_t * mtspace, const rnd_rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance); +void mtspace_remove(mtspace_t * mtspace, const rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance); -vetting_t *mtspace_query_rect(mtspace_t * mtspace, const rnd_rnd_box_t * region, +vetting_t *mtspace_query_rect(mtspace_t * mtspace, const rnd_box_t * region, rnd_coord_t radius, rnd_coord_t clearance, vetting_t * work, vector_t * free_space_vec, Index: trunk/src_plugins/ddraft/centgeo.c =================================================================== --- trunk/src_plugins/ddraft/centgeo.c (revision 31800) +++ trunk/src_plugins/ddraft/centgeo.c (revision 31801) @@ -40,7 +40,7 @@ /* Note about all intersection code: same basic algo as in find_geo.c - see comment for the algo description there */ -int pcb_intersect_cline_cline(pcb_line_t *Line1, pcb_line_t *Line2, rnd_rnd_box_t *ip, double offs[2]) +int pcb_intersect_cline_cline(pcb_line_t *Line1, pcb_line_t *Line2, rnd_box_t *ip, double offs[2]) { double s, r; double line1_dx, line1_dy, line2_dx, line2_dy, point1_dx, point1_dy; @@ -170,7 +170,7 @@ return found; \ } while(0) -static int intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_rnd_box_t *ip, double offs[2], int oline) +static int intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_box_t *ip, double offs[2], int oline) { double dx, dy, dx1, dy1, l, d, r, r2, Radius; rnd_coord_t ex, ey, ix, iy; @@ -260,12 +260,12 @@ return found; } -int pcb_intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_rnd_box_t *ip, double offs[2]) +int pcb_intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_box_t *ip, double offs[2]) { return intersect_cline_carc(Line, Arc, ip, offs, 1); } -int pcb_intersect_carc_cline(pcb_arc_t *Arc, pcb_line_t *Line, rnd_rnd_box_t *ip, double offs[2]) +int pcb_intersect_carc_cline(pcb_arc_t *Arc, pcb_line_t *Line, rnd_box_t *ip, double offs[2]) { return intersect_cline_carc(Line, Arc, ip, offs, 0); } @@ -344,7 +344,7 @@ return (sa + d - 360) >= alpha; } -int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, rnd_rnd_box_t *ip, double offs[2]) +int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, rnd_box_t *ip, double offs[2]) { double x, y, dx, dy, r1, r2, a, d, l, dl; rnd_coord_t pdx, pdy; Index: trunk/src_plugins/ddraft/centgeo.h =================================================================== --- trunk/src_plugins/ddraft/centgeo.h (revision 31800) +++ trunk/src_plugins/ddraft/centgeo.h (revision 31801) @@ -10,7 +10,7 @@ 0 = no intersection 1 = one intersection (X1;Y1 of ip is loaded) 2 = overlapping segments (overlap endpoitns are stored in X1;Y1 and X2;Y2 of ip) */ -int pcb_intersect_cline_cline(pcb_line_t *Line1, pcb_line_t *Line2, rnd_rnd_box_t *ip, double offs[2]); +int pcb_intersect_cline_cline(pcb_line_t *Line1, pcb_line_t *Line2, rnd_box_t *ip, double offs[2]); /* Calculate the intersection point(s) of a lines and an arc and store them in ip and/or offs if they are not NULL. Returns: @@ -17,8 +17,8 @@ 0 = no intersection 1 = one intersection (X1;Y1 of ip is loaded) 2 = two intersections (stored in X1;Y1 and X2;Y2 of ip) */ -int pcb_intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_rnd_box_t *ip, double offs_line[2]); -int pcb_intersect_carc_cline(pcb_arc_t *Arc, pcb_line_t *Line, rnd_rnd_box_t *ip, double offs_arc[2]); +int pcb_intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_box_t *ip, double offs_line[2]); +int pcb_intersect_carc_cline(pcb_arc_t *Arc, pcb_line_t *Line, rnd_box_t *ip, double offs_arc[2]); /* Calculate the intersection point(s) of two arcs and store them in ip and/or offs (on Line1) if they are not NULL. Returns: @@ -25,7 +25,7 @@ 0 = no intersection 1 = one intersection (X1;Y1 of ip is loaded) 2 = two intersections or overlapping segments (overlap endpoints are stored in X1;Y1 and X2;Y2 of ip) */ -int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, rnd_rnd_box_t *ip, double offs[2]); +int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, rnd_box_t *ip, double offs[2]); /* Calculate the point on an object corresponding to a [0..1] offset and store Index: trunk/src_plugins/ddraft/cli_line.c =================================================================== --- trunk/src_plugins/ddraft/cli_line.c (revision 31800) +++ trunk/src_plugins/ddraft/cli_line.c (revision 31801) @@ -1,4 +1,4 @@ -static int line_parse(char *line, int argc, cli_node_t *argv, rnd_rnd_box_t *box, int verbose, int annot) +static int line_parse(char *line, int argc, cli_node_t *argv, rnd_box_t *box, int verbose, int annot) { int n = 0; @@ -39,7 +39,7 @@ static int line_exec(char *line, int argc, cli_node_t *argv) { int res; - rnd_rnd_box_t box; + rnd_box_t box; rnd_trace("line e: '%s'\n", line); @@ -58,7 +58,7 @@ static int line_edit(char *line, int cursor, int argc, cli_node_t *argv) { int res; - rnd_rnd_box_t box; + rnd_box_t box; pcb_ddraft_attached_reset(); Index: trunk/src_plugins/dialogs/dlg_fontsel.c =================================================================== --- trunk/src_plugins/dialogs/dlg_fontsel.c (revision 31800) +++ trunk/src_plugins/dialogs/dlg_fontsel.c (revision 31801) @@ -145,7 +145,7 @@ static void pcb_dlg_fontsel(pcb_board_t *pcb, int modal, int global, pcb_text_t *txt_obj) { - rnd_rnd_box_t vbox = {0, 0, RND_MM_TO_COORD(55), RND_MM_TO_COORD(55)}; + rnd_box_t vbox = {0, 0, RND_MM_TO_COORD(55), RND_MM_TO_COORD(55)}; rnd_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; fontsel_ctx_t *c, *ctx = NULL; Index: trunk/src_plugins/dialogs/dlg_lib_pstk.c =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 31800) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 31801) @@ -54,7 +54,7 @@ long subc_id; rnd_cardinal_t proto_id; rnd_cardinal_t *stat; /* temporary usage stat */ - rnd_rnd_box_t drawbox; + rnd_box_t drawbox; rnd_bool modal; } pstk_lib_ctx_t; @@ -210,7 +210,7 @@ ps->BoundingBox.Y1 -= RND_MM_TO_COORD(0.5); ps->BoundingBox.X2 += RND_MM_TO_COORD(0.5); ps->BoundingBox.Y2 += RND_MM_TO_COORD(0.5); - memcpy(&ctx->drawbox, &ps->BoundingBox, sizeof(rnd_rnd_box_t)); + memcpy(&ctx->drawbox, &ps->BoundingBox, sizeof(rnd_box_t)); rnd_dad_preview_zoomto(&ctx->dlg[ctx->wprev], &ctx->drawbox); } @@ -413,7 +413,7 @@ rnd_hid_attribute_t *attr; rnd_hid_row_t *r; long pid; - rnd_rnd_box_t box; + rnd_box_t box; int changed = 0; pcb_pstk_t *ps; Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 31800) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 31801) @@ -137,7 +137,7 @@ static void library_update_preview(library_ctx_t *ctx, pcb_subc_t *sc, pcb_fplibrary_t *l) { - rnd_rnd_box_t bbox; + rnd_box_t bbox; rnd_hid_attr_val_t hv; gds_t tmp; Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 31800) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 31801) @@ -37,7 +37,7 @@ typedef struct { RND_DAD_DECL_NOINIT(dlg) pcb_board_t *pcb; - rnd_rnd_box_t bb_prv; + rnd_box_t bb_prv; int wnetlist, wprev, wtermlist; int wsel, wunsel, wfind, wunfind, wrats, wnorats, wallrats, wnoallrats, wripup, waddrats, wrename, wmerge, wattr, wnlcalc, wnlon, wnloff; void *last_selected_row; Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 31800) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 31801) @@ -71,7 +71,7 @@ } else { char tmp[128]; - rnd_rnd_box_t bbox; + rnd_box_t bbox; sprintf(tmp, "Subcircuit #%ld not found.", ctx->subc_id); bbox.X1 = bbox.Y1 = 0; bbox.X2 = bbox.Y2 = RND_MM_TO_COORD(10); @@ -111,7 +111,7 @@ pinout_ctx_t *ctx = prv->user_ctx; void *r1, *r2, *r3; pcb_objtype_t type; - rnd_rnd_box_t b; + rnd_box_t b; rnd_hid_attr_val_t val; val.str = "n/a"; Index: trunk/src_plugins/dialogs/dlg_pref_layer.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 31800) +++ trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 31801) @@ -50,7 +50,7 @@ void pcb_dlg_pref_layer_create(pref_ctx_t *ctx) { - rnd_rnd_box_t vbox = {0, 0, RND_MM_TO_COORD(150), RND_MM_TO_COORD(150)}; + rnd_box_t vbox = {0, 0, RND_MM_TO_COORD(150), RND_MM_TO_COORD(150)}; RND_DAD_COMPFLAG(ctx->dlg, RND_HATF_EXPFILL); RND_DAD_BEGIN_VBOX(ctx->dlg); Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 31800) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 31801) @@ -245,10 +245,10 @@ hatch_box(x1, y1, x2, y2, thick_hatch, -step_back); } -static rnd_rnd_box_t btn_addgrp, btn_delgrp, btn_addlayer, btn_dellayer, btn_addoutline; -static rnd_rnd_box_t layer_crd[PCB_MAX_LAYER]; -static rnd_rnd_box_t group_crd[PCB_MAX_LAYERGRP]; -static rnd_rnd_box_t outline_crd; +static rnd_box_t btn_addgrp, btn_delgrp, btn_addlayer, btn_dellayer, btn_addoutline; +static rnd_box_t layer_crd[PCB_MAX_LAYER]; +static rnd_box_t group_crd[PCB_MAX_LAYERGRP]; +static rnd_box_t outline_crd; static char layer_valid[PCB_MAX_LAYER]; static char group_valid[PCB_MAX_LAYERGRP]; static char outline_valid; @@ -317,7 +317,7 @@ return -1; } -static rnd_coord_t create_button(rnd_hid_gc_t gc, int x, int y, const char *label, rnd_rnd_box_t *box) +static rnd_coord_t create_button(rnd_hid_gc_t gc, int x, int y, const char *label, rnd_box_t *box) { pcb_text_t *t; t = dtext_bg(gc, x, y, 200, 0, label, &COLOR_BG, &COLOR_ANNOT); @@ -330,7 +330,7 @@ return RND_COORD_TO_MM(box->X2); } -static int is_button(int x, int y, const rnd_rnd_box_t *box) +static int is_button(int x, int y, const rnd_box_t *box) { return (x >= box->X1) && (x <= box->X2) && (y >= box->Y1) && (y <= box->Y2); } Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 31800) +++ trunk/src_plugins/export_dxf/dxf.c (revision 31801) @@ -443,7 +443,7 @@ free(gc); } -static void dxf_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void dxf_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { if (direct) return; Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 31800) +++ trunk/src_plugins/export_excellon/excellon.c (revision 31801) @@ -337,7 +337,7 @@ free(gc); } -static void excellon_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void excellon_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) { switch(op) { case RND_HID_COMP_RESET: Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 31800) +++ trunk/src_plugins/export_gerber/gerber.c (revision 31801) @@ -294,7 +294,7 @@ } } -static rnd_rnd_box_t region; +static rnd_box_t region; static void append_file_suffix(gds_t *dst, rnd_layergrp_id_t gid, rnd_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, int drill, int *merge_same) { @@ -631,7 +631,7 @@ free(gc); } -static void gerber_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void gerber_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) { gerber_drawing_mode = op; if ((f != NULL) && (gerber_debug)) Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 31800) +++ trunk/src_plugins/export_openems/export_openems.c (revision 31801) @@ -708,7 +708,7 @@ free(gc); } -static void openems_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void openems_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { switch(op) { case RND_HID_COMP_RESET: Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 31800) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 31801) @@ -429,7 +429,7 @@ free(gc); } -static void openscad_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void openscad_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { switch(op) { case RND_HID_COMP_RESET: Index: trunk/src_plugins/export_openscad/scad_draw.c =================================================================== --- trunk/src_plugins/export_openscad/scad_draw.c (revision 31800) +++ trunk/src_plugins/export_openscad/scad_draw.c (revision 31801) @@ -118,7 +118,7 @@ static void scad_draw_drills(void) { rnd_rtree_it_t it; - rnd_rnd_box_t *obj; + rnd_box_t *obj; fprintf(f, "module pcb_drill() {\n"); Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 31800) +++ trunk/src_plugins/export_png/png.c (revision 31801) @@ -443,7 +443,7 @@ } static const char *filename; -static rnd_rnd_box_t *bounds; +static rnd_box_t *bounds; static int in_mono, as_shown; static void parse_bloat(const char *str) @@ -526,7 +526,7 @@ void png_hid_export_to_file(FILE *the_file, rnd_hid_attr_val_t *options, rnd_xform_t *xform) { static int saved_layer_stack[PCB_MAX_LAYER]; - rnd_rnd_box_t tmp, region; + rnd_box_t tmp, region; rnd_hid_expose_ctx_t ctx; f = the_file; @@ -600,7 +600,7 @@ { int save_ons[PCB_MAX_LAYER]; int i; - rnd_rnd_box_t tmp, *bbox; + rnd_box_t tmp, *bbox; int w, h; int xmax, ymax, dpi; rnd_xform_t xform; @@ -873,7 +873,7 @@ } static rnd_composite_op_t drawing_mode; -static void png_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void png_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { static gdImagePtr dst_im; drawing_mode = op; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 31800) +++ trunk/src_plugins/export_ps/eps.c (revision 31801) @@ -159,7 +159,7 @@ } static const char *filename; -static rnd_rnd_box_t *bounds; +static rnd_box_t *bounds; static int in_mono, as_shown; static rnd_hid_attr_val_t *options_; @@ -217,7 +217,7 @@ { int i; static int saved_layer_stack[PCB_MAX_LAYER]; - rnd_rnd_box_t tmp, region; + rnd_box_t tmp, region; rnd_hid_expose_ctx_t ctx; options_ = options; @@ -443,7 +443,7 @@ free(gc); } -static void eps_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void eps_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { if (direct) return; Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 31800) +++ trunk/src_plugins/export_ps/ps.c (revision 31801) @@ -963,7 +963,7 @@ free(gc); } -static void ps_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void ps_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { global.drawing_mode = op; } Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 31800) +++ trunk/src_plugins/export_stat/stat.c (revision 31801) @@ -334,7 +334,7 @@ PCB_END_LOOP; if (pcb_has_explicit_outline(PCB)) { - rnd_rnd_box_t bb; + rnd_box_t bb; pcb_data_bbox_naked(&bb, PCB->Data, rnd_true); width = bb.X2 - bb.X1; height = bb.Y2 - bb.Y1; Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 31800) +++ trunk/src_plugins/export_svg/svg.c (revision 31801) @@ -496,7 +496,7 @@ free(gc); } -static void svg_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void svg_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { drawing_mode = op; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 31800) +++ trunk/src_plugins/export_xy/xy.c (revision 31801) @@ -210,7 +210,7 @@ static void calc_pad_bbox_(subst_ctx_t *ctx, rnd_coord_t *pw, rnd_coord_t *ph, rnd_coord_t *pcx, rnd_coord_t *pcy) { - rnd_rnd_box_t box; + rnd_box_t box; box.X1 = box.Y1 = RND_MAX_COORD; box.X2 = box.Y2 = -RND_MAX_COORD; Index: trunk/src_plugins/exto_std/cord.c =================================================================== --- trunk/src_plugins/exto_std/cord.c (revision 31800) +++ trunk/src_plugins/exto_std/cord.c (revision 31801) @@ -174,7 +174,7 @@ { pcb_exto_draw_mark(info, subc); if (subc->extobj_data == cord_footprint) - pcb_draw_subc_mark((const rnd_rnd_box_t *)subc, info); + pcb_draw_subc_mark((const rnd_box_t *)subc, info); } static void pcb_cord_float_pre(pcb_subc_t *subc, pcb_any_obj_t *floater) Index: trunk/src_plugins/exto_std/dimension.c =================================================================== --- trunk/src_plugins/exto_std/dimension.c (revision 31800) +++ trunk/src_plugins/exto_std/dimension.c (revision 31801) @@ -195,7 +195,7 @@ } else { /* modify the floater if it exists */ if (ly->line_tree != NULL) - rnd_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)flt); + rnd_r_delete_entry(ly->line_tree, (rnd_box_t *)flt); flt->Point1.X = x1 + arrx * dim->dx; flt->Point1.Y = y1 + arrx * dim->dy; flt->Point2.X = x2 - arrx * dim->dx; flt->Point2.Y = y2 - arrx * dim->dy; @@ -202,7 +202,7 @@ pcb_line_bbox(flt); if (ly->line_tree != NULL) - rnd_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)flt); + rnd_r_insert_entry(ly->line_tree, (rnd_box_t *)flt); } /* guide lines */ Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 31800) +++ trunk/src_plugins/hid_batch/batch.c (revision 31801) @@ -306,7 +306,7 @@ } -static void batch_view_get(rnd_hid_t *hid, rnd_rnd_box_t *viewbox) +static void batch_view_get(rnd_hid_t *hid, rnd_box_t *viewbox) { rnd_hidlib_t *hidlib = hid->hid_data; viewbox->X1 = 0; Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 31800) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 31801) @@ -374,7 +374,7 @@ priv->out_clip = priv->sketch_clip; } -static void ghid_gdk_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void ghid_gdk_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { render_priv_t *priv = ghidgui->port.render_priv; @@ -428,7 +428,7 @@ curr_drawing_mode = op; } -static void ghid_gdk_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_rnd_box_t *screen) +static void ghid_gdk_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_box_t *screen) { rnd_gui->coord_per_pix = ghidgui->port.view.coord_per_px; } @@ -806,7 +806,7 @@ /* Decide if a polygon is an axis aligned rectangle; if so, return non-zero and save the corners in b */ -static int poly_is_aligned_rect(rnd_rnd_box_t *b, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static int poly_is_aligned_rect(rnd_box_t *b, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { int n, xi1 = 0, yi1 = 0, xi2 = 0, yi2 = 0, xs1 = 0, ys1 = 0, xs2 = 0, ys2 = 0; if (n_coords != 4) @@ -850,7 +850,7 @@ /* Intentional code duplication for performance */ static void ghid_gdk_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { - rnd_rnd_box_t b; + rnd_box_t b; static GdkPoint *points = 0; static int npoints = 0; int i, len, sup = 0; @@ -910,7 +910,7 @@ /* Intentional code duplication for performance */ static void ghid_gdk_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { - rnd_rnd_box_t b; + rnd_box_t b; static GdkPoint *points = 0; static int npoints = 0; int i, len, sup = 0; Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 31800) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 31801) @@ -62,7 +62,7 @@ rnd_coord_t width; } rnd_hid_gc_s; -void ghid_gl_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_rnd_box_t *screen) +void ghid_gl_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_box_t *screen) { rnd_gui->coord_per_pix = ghidgui->port.view.coord_per_px; } @@ -188,7 +188,7 @@ grid_local_radius = pcb_conf_hid_gtk.plugins.hid_gtk.local_grid.radius; } -static void ghid_gl_draw_grid(rnd_hidlib_t *hidlib, rnd_rnd_box_t *drawn_area) +static void ghid_gl_draw_grid(rnd_hidlib_t *hidlib, rnd_box_t *drawn_area) { render_priv_t *priv = ghidgui->port.render_priv; Index: trunk/src_plugins/hid_lesstif/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 31800) +++ trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 31801) @@ -94,7 +94,7 @@ pcb_ltf_preview_redraw(pd); } -static void ltf_preview_zoomto(rnd_hid_attribute_t *attr, void *hid_ctx, const rnd_rnd_box_t *view) +static void ltf_preview_zoomto(rnd_hid_attribute_t *attr, void *hid_ctx, const rnd_box_t *view) { rnd_hid_preview_t *prv = attr->wdata; pcb_ltf_preview_t *pd = prv->hid_wdata; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 31800) +++ trunk/src_plugins/hid_lesstif/main.c (revision 31801) @@ -2193,12 +2193,12 @@ free(gc); } -static void lesstif_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_rnd_box_t *screen) +static void lesstif_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_box_t *screen) { rnd_gui->coord_per_pix = view_zoom; } -static void lesstif_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void lesstif_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) { lesstif_drawing_mode = op; @@ -2915,7 +2915,7 @@ } -static void ltf_view_get(rnd_hid_t *hid, rnd_rnd_box_t *viewbox) +static void ltf_view_get(rnd_hid_t *hid, rnd_box_t *viewbox) { viewbox->X1 = view_left_x; viewbox->Y1 = view_top_y; Index: trunk/src_plugins/hid_lesstif/wt_preview.c =================================================================== --- trunk/src_plugins/hid_lesstif/wt_preview.c (revision 31800) +++ trunk/src_plugins/hid_lesstif/wt_preview.c (revision 31801) @@ -169,7 +169,7 @@ pcb_ltf_preview_redraw(pd); } -void pcb_ltf_preview_invalidate(const rnd_rnd_box_t *screen) +void pcb_ltf_preview_invalidate(const rnd_box_t *screen) { pcb_ltf_preview_t *prv; @@ -176,7 +176,7 @@ for(prv = gdl_first(<f_previews); prv != NULL; prv = prv->link.next) { if (!prv->redraw_with_board) continue; if (screen != NULL) { - rnd_rnd_box_t pb; + rnd_box_t pb; pb.X1 = prv->x1; pb.Y1 = prv->y1; pb.X2 = prv->x2; Index: trunk/src_plugins/hid_lesstif/wt_preview.h =================================================================== --- trunk/src_plugins/hid_lesstif/wt_preview.h (revision 31800) +++ trunk/src_plugins/hid_lesstif/wt_preview.h (revision 31801) @@ -43,7 +43,7 @@ /* invalidate (redraw) all preview widgets whose current view overlaps with the screen box; if screen is NULL, redraw all */ -void pcb_ltf_preview_invalidate(const rnd_rnd_box_t *screen); +void pcb_ltf_preview_invalidate(const rnd_box_t *screen); void pcb_ltf_preview_add(pcb_ltf_preview_t *prv); Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 31800) +++ trunk/src_plugins/hid_remote/remote.c (revision 31801) @@ -192,7 +192,7 @@ } static const char *drawing_mode_names[] = { "reset", "positive", "negative", "flush"}; -static void remote_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void remote_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) { if ((op >= 0) && (op < sizeof(drawing_mode_names) / sizeof(drawing_mode_names[0]))) proto_send_set_drawing_mode(drawing_mode_names[op], direct); Index: trunk/src_plugins/import_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/import_ipcd356/ipcd356.c (revision 31800) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 31801) @@ -425,7 +425,7 @@ pcb_subc_bbox(sc); if (PCB->Data->subc_tree == NULL) PCB->Data->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(PCB->Data->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_insert_entry(PCB->Data->subc_tree, (rnd_box_t *)sc); pcb_subc_rebind(PCB, sc); } htsp_uninit(&subcs); Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 31800) +++ trunk/src_plugins/io_autotrax/read.c (revision 31801) @@ -1065,7 +1065,7 @@ pcb_subc_bbox(new_module); if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_rnd_box_t *)new_module); + rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)new_module); pcb_subc_rebind(st->pcb, new_module); return 0; @@ -1075,7 +1075,7 @@ int io_autotrax_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest) { int readres = 0; - rnd_rnd_box_t board_size, *box; + rnd_box_t board_size, *box; read_state_t st; FILE *FP; pcb_subc_t *subc = NULL; Index: trunk/src_plugins/io_autotrax/write.c =================================================================== --- trunk/src_plugins/io_autotrax/write.c (revision 31800) +++ trunk/src_plugins/io_autotrax/write.c (revision 31801) @@ -505,7 +505,7 @@ static int wrax_subc(wctx_t *ctx, pcb_subc_t *subc) { int res, on_bottom = 0, silk_layer; - rnd_rnd_box_t *box = &subc->BoundingBox; + rnd_box_t *box = &subc->BoundingBox; rnd_coord_t xPos, yPos, yPos2, yPos3; TODO("do not hardcode things like this, especially when actual data is available") Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 31800) +++ trunk/src_plugins/io_dsn/read.c (revision 31801) @@ -53,7 +53,7 @@ gsxl_dom_t dom; pcb_board_t *pcb; const rnd_unit_t *unit; - rnd_rnd_box_t bbox; /* board's bbox from the boundary subtrees, in the file's coordinate system */ + rnd_box_t bbox; /* board's bbox from the boundary subtrees, in the file's coordinate system */ htsp_t name2layer; htsp_t protos; /* padstack prototypes - allocated for the hash, copied on placement */ htsp_t subcs; /* subc images - allocated for the hash, copied on placement */ @@ -189,7 +189,7 @@ rnd_attribute_put(attr, STRE(kv), STRE(kv->children)); } -static int dsn_parse_rect(dsn_read_t *ctx, rnd_rnd_box_t *dst, gsxl_node_t *src, int no_y_flip) +static int dsn_parse_rect(dsn_read_t *ctx, rnd_box_t *dst, gsxl_node_t *src, int no_y_flip) { rnd_coord_t x, y; @@ -294,7 +294,7 @@ boundary_line(oly, lx, ly, x, y, aper); } else if (rnd_strcasecmp(bnd->str, "rect") == 0) { - rnd_rnd_box_t box; + rnd_box_t box; b = gsxl_children(bnd); if ((b->next == NULL) || (b->next->next == NULL)) { @@ -538,7 +538,7 @@ int dsn_parse_pstk_shape_rect(dsn_read_t *ctx, gsxl_node_t *nd, pcb_pstk_shape_t *shp) { - rnd_rnd_box_t box; + rnd_box_t box; gsxl_node_t *args = nd->children->next; if (dsn_parse_rect(ctx, &box, args, 1) != 0) @@ -1186,7 +1186,7 @@ static int dsn_parse_wire_rect(dsn_read_t *ctx, gsxl_node_t *wrr, pcb_subc_t *subc, pcb_layer_t *force_ly) { - rnd_rnd_box_t box; + rnd_box_t box; gsxl_node_t *net = wrr->children; pcb_layer_t *ly; Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 31800) +++ trunk/src_plugins/io_eagle/read.c (revision 31801) @@ -1182,7 +1182,7 @@ TODO("subc: revise this: are we loading an instance here? do we need to place it? do not even bump if not!") if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)subc); pcb_subc_rebind(st->pcb, subc); TODO("revise rotation and flip") Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 31800) +++ trunk/src_plugins/io_hyp/parser.c (revision 31801) @@ -478,7 +478,7 @@ pcb_subc_bbox(subc); if (hyp_dest->subc_tree == NULL) hyp_dest->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(hyp_dest->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(hyp_dest->subc_tree, (rnd_box_t *)subc); pcb_subc_rebind(hyp_dest->parent.board, subc); } Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 31800) +++ trunk/src_plugins/io_kicad/read.c (revision 31801) @@ -1003,7 +1003,7 @@ if (st->pcb != NULL) { if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)subc); pcb_subc_rebind(st->pcb, subc); } else @@ -2457,7 +2457,7 @@ if (st->pcb != NULL) { if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)subc); pcb_subc_rebind(st->pcb, subc); } else Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 31800) +++ trunk/src_plugins/io_kicad/write.c (revision 31801) @@ -586,7 +586,7 @@ if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { int i; pcb_line_t line; - rnd_rnd_box_t bx; + rnd_box_t bx; pcb_pstk_shape_t *shape = &tshp->shape[n]; on_bottom = tshp->shape[n].layer_mask & PCB_LYT_BOTTOM; Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 31800) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 31801) @@ -473,7 +473,7 @@ if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { int i; pcb_line_t line; - rnd_rnd_box_t bx; + rnd_box_t bx; pcb_pstk_shape_t *shape = &tshp->shape[n]; if (found) Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 31800) +++ trunk/src_plugins/io_lihata/read.c (revision 31801) @@ -1541,7 +1541,7 @@ if (dt->subc_tree == NULL) dt->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dt->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(dt->subc_tree, (rnd_box_t *)subc); pcb_subc_rebind(pcb, subc); @@ -1581,7 +1581,7 @@ if (!dt->subc_tree) dt->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dt->subc_tree, (rnd_rnd_box_t *)sc); + rnd_r_insert_entry(dt->subc_tree, (rnd_box_t *)sc); if (subc_out != NULL) *subc_out = sc; @@ -2544,7 +2544,7 @@ announce the clipping (it's slow, we may need a progress bar) */ { rnd_rtree_it_t it; - rnd_rnd_box_t *b; + rnd_box_t *b; int l; for(l = 0; l < pcb->Data->LayerN; l++) { pcb_layer_t *layer = pcb->Data->Layer + l; Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 31800) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 31801) @@ -1122,7 +1122,7 @@ if (dt->subc_tree == NULL) dt->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(dt->subc_tree, (rnd_rnd_box_t *)subc); + rnd_r_insert_entry(dt->subc_tree, (rnd_box_t *)subc); pcb_subc_rebind(ctx->pcb, subc); } @@ -1259,7 +1259,7 @@ /* 'autocrop' the board for now (required by y mirror and unknown extents) */ { - rnd_rnd_box_t bb; + rnd_box_t bb; pcb_data_normalize(ctx->pcb->Data); pcb_data_bbox(&bb, ctx->pcb->Data, 0); ctx->pcb->hidlib.size_x = bb.X2; Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 31800) +++ trunk/src_plugins/io_pcb/file.c (revision 31801) @@ -793,7 +793,7 @@ void PostLoadElementPCB() { pcb_board_t *pcb_save = PCB; - rnd_rnd_box_t dbb; + rnd_box_t dbb; pcb_subc_t *sc; if (!yyPCB) @@ -1094,7 +1094,7 @@ pcb_subc_bbox(yysubc); if (Data->subc_tree == NULL) Data->subc_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Data->subc_tree, (rnd_rnd_box_t *)yysubc); + rnd_r_insert_entry(Data->subc_tree, (rnd_box_t *)yysubc); } static pcb_layer_t *subc_silk_layer(pcb_subc_t *subc) Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 31800) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 31801) @@ -2455,7 +2455,7 @@ pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); } } #line 2462 "parse_y.c" /* yacc.c:1652 */ Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 31800) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 31801) @@ -796,7 +796,7 @@ pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = rnd_r_create_tree(); - rnd_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); + rnd_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); } } ; Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 31800) +++ trunk/src_plugins/io_tedax/tboard.c (revision 31801) @@ -306,7 +306,7 @@ struct tdx_text_s { char *layer; - rnd_rnd_box_t bbox; + rnd_box_t bbox; double rot; char *val; tdx_text_t *next; Index: trunk/src_plugins/io_tedax/tetest.c =================================================================== --- trunk/src_plugins/io_tedax/tetest.c (revision 31800) +++ trunk/src_plugins/io_tedax/tetest.c (revision 31801) @@ -124,7 +124,7 @@ int tedax_etest_fsave(pcb_board_t *pcb, const char *etestid, FILE *f) { - rnd_rnd_box_t *b; + rnd_box_t *b; rnd_rtree_it_t it; fprintf(f, "begin etest v1 "); Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 31800) +++ trunk/src_plugins/jostle/jostle.c (revision 31801) @@ -121,11 +121,11 @@ * pcb_polyarea_ts linked by ->f/b are outlines.\n * n->contours->next would be the start of the inner holes (irrelevant * for bounding box). */ -static rnd_rnd_box_t pcb_polyarea_t_boundingBox(rnd_polyarea_t * a) +static rnd_box_t pcb_polyarea_t_boundingBox(rnd_polyarea_t * a) { rnd_polyarea_t *n; rnd_pline_t *pa; - rnd_rnd_box_t box; + rnd_box_t box; int first = 1; n = a; @@ -329,7 +329,7 @@ } struct info { - rnd_rnd_box_t box; + rnd_box_t box; rnd_polyarea_t *brush; pcb_layer_t *layer; rnd_polyarea_t *smallest; /* after cutting brush with line, the smallest chunk, which we will go around on 'side'. */ @@ -339,7 +339,7 @@ }; /* Process lines that intersect our 'brush'. */ -static rnd_r_dir_t jostle_callback(const rnd_rnd_box_t * targ, void *private) +static rnd_r_dir_t jostle_callback(const rnd_box_t * targ, void *private) { pcb_line_t *line = (pcb_line_t *) targ; struct info *info = private; Index: trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 31800) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 31801) @@ -72,7 +72,7 @@ return rnd_false; } -void ghid_preview_zoomto(rnd_hid_attribute_t *attrib, void *hid_ctx, const rnd_rnd_box_t *view) +void ghid_preview_zoomto(rnd_hid_attribute_t *attrib, void *hid_ctx, const rnd_box_t *view) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 31800) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 31801) @@ -311,7 +311,7 @@ void pcb_gtk_previews_invalidate_lr(rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { - rnd_rnd_box_t screen; + rnd_box_t screen; screen.X1 = left; screen.X2 = right; screen.Y1 = top; screen.Y2 = bottom; pcb_gtk_preview_invalidate(ghidgui, &screen); Index: trunk/src_plugins/lib_gtk_common/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 31800) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 31801) @@ -474,7 +474,7 @@ gctx->port.view.panning = mode; } -static void ghid_view_get(rnd_hid_t *hid, rnd_rnd_box_t *viewbox) +static void ghid_view_get(rnd_hid_t *hid, rnd_box_t *viewbox) { pcb_gtk_t *gctx = hid->hid_data; viewbox->X1 = gctx->port.view.x0; Index: trunk/src_plugins/lib_gtk_common/wt_preview.c =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 31800) +++ trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 31801) @@ -70,7 +70,7 @@ perview_update_offs(preview); } -void pcb_gtk_preview_zoomto(pcb_gtk_preview_t *preview, const rnd_rnd_box_t *data_view) +void pcb_gtk_preview_zoomto(pcb_gtk_preview_t *preview, const rnd_box_t *data_view) { int orig = preview->view.inhibit_pan_common; preview->view.inhibit_pan_common = 1; /* avoid pan logic for the main window */ @@ -125,9 +125,9 @@ static void preview_set_view(pcb_gtk_preview_t *preview) { - rnd_rnd_box_t view; + rnd_box_t view; - memcpy(&view, preview->obj, sizeof(rnd_rnd_box_t)); /* assumes the object's first field is rnd_rnd_box_t */ + memcpy(&view, preview->obj, sizeof(rnd_box_t)); /* assumes the object's first field is rnd_box_t */ pcb_gtk_preview_zoomto(preview, &view); } @@ -295,7 +295,7 @@ preview->view.canvas_height = ev->height; if (need_rezoom) { - rnd_rnd_box_t b; + rnd_box_t b; b.X1 = b.Y1 = 0; b.X2 = preview->view.width; b.Y2 = preview->view.height; @@ -583,7 +583,7 @@ #undef SIDE_Y } -void pcb_gtk_preview_invalidate(pcb_gtk_t *ctx, const rnd_rnd_box_t *screen) +void pcb_gtk_preview_invalidate(pcb_gtk_t *ctx, const rnd_box_t *screen) { pcb_gtk_preview_t *prv; @@ -590,7 +590,7 @@ for(prv = gdl_first(&ctx->previews); prv != NULL; prv = prv->link.next) { if (!prv->redraw_with_board || prv->redrawing) continue; if (screen != NULL) { - rnd_rnd_box_t pb; + rnd_box_t pb; pb.X1 = prv->view.x0; pb.Y1 = prv->view.y0; pb.X2 = prv->view.x0 + prv->view.width; Index: trunk/src_plugins/lib_gtk_common/wt_preview.h =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.h (revision 31800) +++ trunk/src_plugins/lib_gtk_common/wt_preview.h (revision 31801) @@ -98,11 +98,11 @@ GtkWidget *pcb_gtk_preview_new(pcb_gtk_t *ctx, pcb_gtk_init_drawing_widget_t init_widget, pcb_gtk_preview_expose_t expose, rnd_hid_expose_t dialog_draw, pcb_gtk_preview_config_t config, void *draw_data); -void pcb_gtk_preview_zoomto(pcb_gtk_preview_t *preview, const rnd_rnd_box_t *data_view); +void pcb_gtk_preview_zoomto(pcb_gtk_preview_t *preview, const rnd_box_t *data_view); /* invalidate (redraw) all preview widgets whose current view overlaps with the screen box; if screen is NULL, redraw all */ -void pcb_gtk_preview_invalidate(pcb_gtk_t *ctx, const rnd_rnd_box_t *screen); +void pcb_gtk_preview_invalidate(pcb_gtk_t *ctx, const rnd_box_t *screen); void pcb_gtk_preview_del(pcb_gtk_t *ctx, pcb_gtk_preview_t *prv); Index: trunk/src_plugins/lib_hid_common/act_dad.c =================================================================== --- trunk/src_plugins/lib_hid_common/act_dad.c (revision 31800) +++ trunk/src_plugins/lib_hid_common/act_dad.c (revision 31801) @@ -391,7 +391,7 @@ else if (rnd_strcasecmp(cmd, "preview") == 0) { char *prefix, *suctx = ""; int sx, sy; - rnd_rnd_box_t vb; + rnd_box_t vb; dad_prv_t *uctx; /* dad(dlgname, preview, cb_act_prefix, minsize_x, minsize_y, ctx) */ Index: trunk/src_plugins/lib_hid_gl/hidgl.c =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.c (revision 31800) +++ trunk/src_plugins/lib_hid_gl/hidgl.c (revision 31801) @@ -57,7 +57,7 @@ static int grid_point_capacity = 0; -static inline void mode_reset(rnd_bool direct, const rnd_rnd_box_t *screen) +static inline void mode_reset(rnd_bool direct, const rnd_box_t *screen) { drawgl_flush(); drawgl_reset(); @@ -67,7 +67,7 @@ comp_stencil_bit = 0; } -static inline void mode_positive(rnd_bool direct, const rnd_rnd_box_t *screen) +static inline void mode_positive(rnd_bool direct, const rnd_box_t *screen) { if (comp_stencil_bit == 0) comp_stencil_bit = stencilgl_allocate_clear_stencil_bit(); @@ -79,7 +79,7 @@ stencilgl_mode_write_set(comp_stencil_bit); } -static inline void mode_positive_xor(rnd_bool direct, const rnd_rnd_box_t *screen) +static inline void mode_positive_xor(rnd_bool direct, const rnd_box_t *screen) { drawgl_flush(); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); @@ -88,7 +88,7 @@ glLogicOp(GL_XOR); } -static inline void mode_negative(rnd_bool direct, const rnd_rnd_box_t *screen) +static inline void mode_negative(rnd_bool direct, const rnd_box_t *screen) { glEnable(GL_STENCIL_TEST); glDisable(GL_COLOR_LOGIC_OP); @@ -110,7 +110,7 @@ drawgl_set_marker(); } -static inline void mode_flush(rnd_bool direct, rnd_bool xor_mode, const rnd_rnd_box_t *screen) +static inline void mode_flush(rnd_bool direct, rnd_bool xor_mode, const rnd_box_t *screen) { drawgl_flush(); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); @@ -140,7 +140,7 @@ return composite_op; } -void hidgl_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +void hidgl_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { rnd_bool xor_mode = (composite_op == RND_HID_COMP_POSITIVE_XOR ? rnd_true : rnd_false); @@ -225,7 +225,7 @@ } -void hidgl_draw_grid(rnd_hidlib_t *hidlib, rnd_rnd_box_t *drawn_area) +void hidgl_draw_grid(rnd_hidlib_t *hidlib, rnd_box_t *drawn_area) { rnd_coord_t x1, y1, x2, y2, n, i; double x, y; Index: trunk/src_plugins/lib_hid_gl/hidgl.h =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.h (revision 31800) +++ trunk/src_plugins/lib_hid_gl/hidgl.h (revision 31801) @@ -30,7 +30,7 @@ /*extern float global_depth;*/ void hidgl_draw_local_grid(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy, int radius); -void hidgl_draw_grid(rnd_hidlib_t *hidlib, rnd_rnd_box_t *drawn_area); +void hidgl_draw_grid(rnd_hidlib_t *hidlib, rnd_box_t *drawn_area); void hidgl_set_depth(float depth); void hidgl_draw_line(int cap, rnd_coord_t width, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, double scale); void hidgl_draw_arc(rnd_coord_t width, rnd_coord_t vx, rnd_coord_t vy, rnd_coord_t vrx, rnd_coord_t vry, rnd_angle_t start_angle, rnd_angle_t delta_angle, double scale); @@ -39,10 +39,10 @@ void hidgl_fill_circle(rnd_coord_t vx, rnd_coord_t vy, rnd_coord_t vr, double scale); void hidgl_fill_polygon(int n_coords, rnd_coord_t *x, rnd_coord_t *y); void hidgl_fill_polygon_offs(int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); -void hidgl_fill_pcb_polygon(rnd_polyarea_t *poly, const rnd_rnd_box_t *clip_box, double scale, int fullpoly); +void hidgl_fill_pcb_polygon(rnd_polyarea_t *poly, const rnd_box_t *clip_box, double scale, int fullpoly); void hidgl_fill_rect(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); void hidgl_init(void); -void hidgl_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen); +void hidgl_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen); rnd_composite_op_t hidgl_get_drawing_mode(); #endif /* PCB_HID_COMMON_HIDGL_H */ Index: trunk/src_plugins/lib_hid_pcbui/act.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/act.c (revision 31800) +++ trunk/src_plugins/lib_hid_pcbui/act.c (revision 31801) @@ -60,7 +60,7 @@ RND_ACT_CONVARG(1, FGW_STR, Zoom, vp = argv[1].val.str); if (rnd_strcasecmp(vp, "selected") == 0) { - rnd_rnd_box_t sb; + rnd_box_t sb; if (pcb_get_selection_bbox(&sb, PCB->Data) > 0) rnd_gui->zoom_win(rnd_gui, sb.X1, sb.Y1, sb.X2, sb.Y2, 1); else @@ -69,7 +69,7 @@ } if (rnd_strcasecmp(vp, "found") == 0) { - rnd_rnd_box_t sb; + rnd_box_t sb; if (pcb_get_found_bbox(&sb, PCB->Data) > 0) rnd_gui->zoom_win(rnd_gui, sb.X1, sb.Y1, sb.X2, sb.Y2, 1); else @@ -89,7 +89,7 @@ rnd_layergrp_id_t active_group = pcb_layer_get_group(PCB, pcb_layer_stack[0]); rnd_layergrp_id_t comp_group = -1, solder_group = -1; rnd_bool comp_on = rnd_false, solder_on = rnd_false; - rnd_rnd_box_t vb; + rnd_box_t vb; rnd_coord_t x, y; double xcent, ycent, xoffs, yoffs; Index: trunk/src_plugins/lib_hid_pcbui/util.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/util.c (revision 31800) +++ trunk/src_plugins/lib_hid_pcbui/util.c (revision 31801) @@ -30,7 +30,7 @@ #include "data_it.h" #include "flag.h" -static rnd_cardinal_t pcb_get_bbox_by_flag(rnd_rnd_box_t *dst, const pcb_data_t *data, pcb_flag_values_t flg) +static rnd_cardinal_t pcb_get_bbox_by_flag(rnd_box_t *dst, const pcb_data_t *data, pcb_flag_values_t flg) { pcb_any_obj_t *o; pcb_data_it_t it; @@ -48,12 +48,12 @@ return cnt; } -rnd_cardinal_t pcb_get_selection_bbox(rnd_rnd_box_t *dst, const pcb_data_t *data) +rnd_cardinal_t pcb_get_selection_bbox(rnd_box_t *dst, const pcb_data_t *data) { return pcb_get_bbox_by_flag(dst, data, PCB_FLAG_SELECTED); } -rnd_cardinal_t pcb_get_found_bbox(rnd_rnd_box_t *dst, const pcb_data_t *data) +rnd_cardinal_t pcb_get_found_bbox(rnd_box_t *dst, const pcb_data_t *data) { return pcb_get_bbox_by_flag(dst, data, PCB_FLAG_FOUND); } Index: trunk/src_plugins/lib_hid_pcbui/util.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/util.h (revision 31800) +++ trunk/src_plugins/lib_hid_pcbui/util.h (revision 31801) @@ -2,6 +2,6 @@ /* calculate the bounding box of all selections/founds in data, return the number of selected objects. When returns 0, the dst box is infinitely large. */ -rnd_cardinal_t pcb_get_selection_bbox(rnd_rnd_box_t *dst, const pcb_data_t *data); -rnd_cardinal_t pcb_get_found_bbox(rnd_rnd_box_t *dst, const pcb_data_t *data); +rnd_cardinal_t pcb_get_selection_bbox(rnd_box_t *dst, const pcb_data_t *data); +rnd_cardinal_t pcb_get_found_bbox(rnd_box_t *dst, const pcb_data_t *data); Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 31800) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 31801) @@ -148,7 +148,7 @@ static void add_track_seg(pcb_cpoly_edgetree_t *dst, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_cpoly_edge_t *e = &dst->edges[dst->used++]; - rnd_rnd_box_t *b = &e->bbox; + rnd_box_t *b = &e->bbox; if (x1 <= x2) { b->X1 = x1; @@ -173,7 +173,7 @@ e->y2 = y2; rnd_box_bump_box(&dst->bbox, b); - rnd_r_insert_entry(dst->edge_tree, (rnd_rnd_box_t *)e); + rnd_r_insert_entry(dst->edge_tree, (rnd_box_t *)e); } static void add_track(pcb_cpoly_edgetree_t *dst, rnd_pline_t *track) @@ -244,7 +244,7 @@ rnd_coord_t coord[1]; } intersect_t; -static rnd_r_dir_t pcb_cploy_hatch_edge_hor(const rnd_rnd_box_t *region, void *cl) +static rnd_r_dir_t pcb_cploy_hatch_edge_hor(const rnd_box_t *region, void *cl) { intersect_t *is = (intersect_t *)cl; pcb_cpoly_edge_t *e = (pcb_cpoly_edge_t *)region; @@ -263,7 +263,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t pcb_cploy_hatch_edge_ver(const rnd_rnd_box_t *region, void *cl) +static rnd_r_dir_t pcb_cploy_hatch_edge_ver(const rnd_box_t *region, void *cl) { intersect_t *is = (intersect_t *)cl; pcb_cpoly_edge_t *e = (pcb_cpoly_edge_t *)region; @@ -294,7 +294,7 @@ void pcb_cpoly_hatch(const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t offs, rnd_coord_t period, void *ctx, void (*cb)(void *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2)) { pcb_cpoly_edgetree_t *etr; - rnd_rnd_box_t scan; + rnd_box_t scan; int n; intersect_t *is; Index: trunk/src_plugins/lib_polyhelp/polyhelp.h =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 31800) +++ trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 31801) @@ -44,13 +44,13 @@ /*** Generate an rtree of all edges if a polygon */ typedef struct { - rnd_rnd_box_t bbox; + rnd_box_t bbox; rnd_coord_t x1, y1, x2, y2; } pcb_cpoly_edge_t; typedef struct { rnd_rtree_t *edge_tree; - rnd_rnd_box_t bbox; + rnd_box_t bbox; rnd_cardinal_t used, alloced; pcb_cpoly_edge_t edges[1]; } pcb_cpoly_edgetree_t; Index: trunk/src_plugins/lib_polyhelp/topoly.c =================================================================== --- trunk/src_plugins/lib_polyhelp/topoly.c (revision 31800) +++ trunk/src_plugins/lib_polyhelp/topoly.c (revision 31801) @@ -58,7 +58,7 @@ pcb_dynf_t mark; } next_conn_t; -static rnd_r_dir_t next_conn_found_arc(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t next_conn_found_arc(const rnd_box_t *box, void *cl) { rnd_coord_t ex, ey; next_conn_t *ctx = cl; @@ -82,7 +82,7 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t next_conn_found_line(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t next_conn_found_line(const rnd_box_t *box, void *cl) { next_conn_t *ctx = cl; pcb_any_obj_t *obj = (pcb_any_obj_t *)box; @@ -139,7 +139,7 @@ ctx.mark = df; for(n = 0; n < 2; n++) { - rnd_rnd_box_t region; + rnd_box_t region; int len; region.X1 = cx[n]-1; Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 31800) +++ trunk/src_plugins/loghid/hid-logger.c (revision 31801) @@ -85,7 +85,7 @@ delegatee_->destroy_gc(gc); } -static void log_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void log_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) { if (screen != NULL) rnd_fprintf(out_, "set_drawing_mode(%d,%d,[%mm;%mm,%mm;%mm])\n", op, direct, screen->X1, screen->Y1, screen->X2, screen->Y2); @@ -94,7 +94,7 @@ delegatee_->set_drawing_mode(hid, op, direct, screen); } -static void log_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_rnd_box_t *screen) +static void log_render_burst(rnd_hid_t *hid, rnd_burst_op_t op, const rnd_box_t *screen) { rnd_fprintf(out_, "render_burst(%d,[%mm;%mm,%mm;%mm])\n", op, screen->X1, screen->Y1, screen->X2, screen->Y2); delegatee_->render_burst(hid, op, screen); Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 31800) +++ trunk/src_plugins/millpath/toolpath.c (revision 31801) @@ -238,7 +238,7 @@ pcb_line_t *line; pcb_arc_t *arc; rnd_rtree_it_t it; - rnd_rnd_box_t otlbb; + rnd_box_t otlbb; rnd_layer_id_t lid; otlbb.X1 = otlbb.Y1 = RND_MAX_COORD; @@ -254,11 +254,11 @@ continue; for(line = (pcb_line_t *)rnd_r_first(l->line_tree, &it); line != NULL; line = (pcb_line_t *)rnd_r_next(&it)) - rnd_box_bump_box(&otlbb, (rnd_rnd_box_t *)line); + rnd_box_bump_box(&otlbb, (rnd_box_t *)line); rnd_r_end(&it); for(arc = (pcb_arc_t *)rnd_r_first(l->arc_tree, &it); arc != NULL; arc = (pcb_arc_t *)rnd_r_next(&it)) - rnd_box_bump_box(&otlbb, (rnd_rnd_box_t *)arc); + rnd_box_bump_box(&otlbb, (rnd_box_t *)arc); rnd_r_end(&it); } result->fill = pcb_poly_new_from_rectangle(result->res_ply, otlbb.X1, otlbb.Y1, otlbb.X2, otlbb.Y2, 0, pcb_flag_make(PCB_FLAG_FULLPOLY)); @@ -351,7 +351,7 @@ { pline_ctx_t *ctx = ctx_; pcb_line_t *l = (pcb_line_t *)ctx->cut, lo, vl; - rnd_rnd_box_t ip; + rnd_box_t ip; double offs[2], ox, oy, vx, vy, len, r; assert(ctx->cut->type == PCB_OBJ_LINE); /* need to handle arc later */ Index: trunk/src_plugins/order/order.c =================================================================== --- trunk/src_plugins/order/order.c (revision 31800) +++ trunk/src_plugins/order/order.c (revision 31801) @@ -169,7 +169,7 @@ void pcb_order_autoload_field(order_ctx_t *octx, pcb_order_field_t *f) { - rnd_rnd_box_t bb; + rnd_box_t bb; long l; rnd_layergrp_id_t gid; Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 31800) +++ trunk/src_plugins/propedit/propdlg.c (revision 31801) @@ -610,7 +610,7 @@ const char *hdr[] = {"property", "common", "min", "max", "avg", NULL}; const char *hdr_val[] = {"use", "values"}; rnd_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; - static rnd_rnd_box_t prvbb = {0, 0, RND_MM_TO_COORD(10), RND_MM_TO_COORD(10)}; + static rnd_box_t prvbb = {0, 0, RND_MM_TO_COORD(10), RND_MM_TO_COORD(10)}; int n; rnd_hid_attr_val_t hv; Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 31800) +++ trunk/src_plugins/puller/puller.c (revision 31801) @@ -248,7 +248,7 @@ /* */ /*****************************************************************************/ -static rnd_r_dir_t line_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t line_callback(const rnd_box_t * b, void *cl) { /* pcb_layer_t *layer = (pcb_layer_t *)cl; */ pcb_line_t *l = (pcb_line_t *) b; @@ -274,7 +274,7 @@ return RND_R_DIR_FOUND_CONTINUE; } -static rnd_r_dir_t arc_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t arc_callback(const rnd_box_t * b, void *cl) { /* pcb_layer_t *layer = (pcb_layer_t *) cl; */ pcb_arc_t *a = (pcb_arc_t *) b; @@ -310,7 +310,7 @@ static int find_pair(int Px, int Py) { - rnd_rnd_box_t spot; + rnd_box_t spot; #if TRACE1 rnd_printf("\nPuller find_pair at %#mD\n", pcb_crosshair.X, pcb_crosshair.Y); @@ -609,7 +609,7 @@ #define NEAR(a,b) ((a) <= (b) + 2 && (a) >= (b) - 2) -static rnd_r_dir_t find_pair_line_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t find_pair_line_callback(const rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; #if TRACE1 @@ -644,7 +644,7 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t find_pair_arc_callback(const rnd_rnd_box_t * b, void *cl) +static rnd_r_dir_t find_pair_arc_callback(const rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *) b; Extra *e = ARC2EXTRA(arc); @@ -672,7 +672,7 @@ static void find_pairs_1(void *me, Extra ** e, int x, int y) { FindPairCallbackStruct fpcs; - rnd_rnd_box_t b; + rnd_box_t b; if (*e) return; @@ -726,7 +726,7 @@ return 0; } -static rnd_r_dir_t find_pair_pstkline_callback(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t find_pair_pstkline_callback(const rnd_box_t *b, void *cl) { pcb_line_t *line = (pcb_line_t *)b; pcb_pstk_t *pin = (pcb_pstk_t *)cl; @@ -758,7 +758,7 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t find_pair_pstkarc_callback(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t find_pair_pstkarc_callback(const rnd_box_t *b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *)b; pcb_pstk_t *pin = (pcb_pstk_t *)cl; @@ -801,7 +801,7 @@ static void find_pairs_pstk(pcb_data_t *data) { PCB_PADSTACK_LOOP(PCB->Data); { - rnd_rnd_box_t box; + rnd_box_t box; box = padstack->BoundingBox; rnd_r_search(PCB_CURRLAYER(PCB)->line_tree, &box, NULL, find_pair_pstkline_callback, padstack, NULL); rnd_r_search(PCB_CURRLAYER(PCB)->arc_tree, &box, NULL, find_pair_pstkarc_callback, padstack, NULL); @@ -1065,7 +1065,7 @@ memcpy(&e->end, &etmp, sizeof(End)); } -static void expand_box(rnd_rnd_box_t *b, int x, int y, int t) +static void expand_box(rnd_box_t *b, int x, int y, int t) { b->X1 = MIN(b->X1, x - t); b->X2 = MAX(b->X2, x + t); @@ -1334,7 +1334,7 @@ return gp_point_force(x, y, t, e, esa, eda, 0, func); } -static rnd_r_dir_t gp_line_cb(const rnd_rnd_box_t * b, void *cb) +static rnd_r_dir_t gp_line_cb(const rnd_box_t * b, void *cb) { const pcb_line_t *l = (pcb_line_t *) b; Extra *e = LINE2EXTRA(l); @@ -1353,7 +1353,7 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t gp_arc_cb(const rnd_rnd_box_t * b, void *cb) +static rnd_r_dir_t gp_arc_cb(const rnd_box_t * b, void *cb) { const pcb_arc_t *a = (pcb_arc_t *) b; Extra *e = ARC2EXTRA(a); @@ -1375,7 +1375,7 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t gp_text_cb(const rnd_rnd_box_t * b, void *cb) +static rnd_r_dir_t gp_text_cb(const rnd_box_t * b, void *cb) { const pcb_text_t *t = (pcb_text_t *) b; /* FIXME: drop in the actual text-line endpoints later. */ @@ -1386,7 +1386,7 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t gp_poly_cb(const rnd_rnd_box_t * b, void *cb) +static rnd_r_dir_t gp_poly_cb(const rnd_box_t * b, void *cb) { int i; const pcb_poly_t *p = (pcb_poly_t *) b; @@ -1395,7 +1395,7 @@ return RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t gp_pstk_cb(const rnd_rnd_box_t *b, void *cb) +static rnd_r_dir_t gp_pstk_cb(const rnd_box_t *b, void *cb) { pcb_pstk_t *ps = (pcb_pstk_t *)b; /* have to drop const because we may update the cache in ps */ pcb_layer_t *layer = PCB_CURRLAYER(PCB); @@ -1574,7 +1574,7 @@ static void maybe_pull_1(pcb_line_t *line) { - rnd_rnd_box_t box; + rnd_box_t box; /* Line half-thicknesses, including line space */ int ex, ey; pcb_line_t *new_line; Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 31800) +++ trunk/src_plugins/query/query_access.c (revision 31801) @@ -302,7 +302,7 @@ } \ \ if ((fh1 == query_fields_bbox) || (fh1 == query_fields_bbox_naked)) { \ - rnd_rnd_box_t *bx = (fh1 == query_fields_bbox) ? &(obj)->BoundingBox : &(obj)->bbox_naked; \ + rnd_box_t *bx = (fh1 == query_fields_bbox) ? &(obj)->BoundingBox : &(obj)->bbox_naked; \ query_fields_keys_t fh2; \ \ if (!PCB_OBJ_IS_CLASS(obj->type, PCB_OBJ_CLASS_OBJ)) \ Index: trunk/src_plugins/report/drill.c =================================================================== --- trunk/src_plugins/report/drill.c (revision 31800) +++ trunk/src_plugins/report/drill.c (revision 31801) @@ -76,7 +76,7 @@ pcb_drill_t *Drill = NULL; rnd_bool DrillFound = rnd_false; rnd_rtree_it_t it; - rnd_rnd_box_t *pb; + rnd_box_t *pb; AllDrills = (pcb_drill_info_t *)calloc(1, sizeof(pcb_drill_info_t)); Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 31800) +++ trunk/src_plugins/report/report.c (revision 31801) @@ -242,7 +242,7 @@ static void report_arc(gds_t *dst, pcb_arc_t *arc) { - rnd_rnd_box_t box; + rnd_box_t box; #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) rnd_r_dump_tree(arc->parent.layer->arc_tree, 0); @@ -647,21 +647,21 @@ #undef MINDIST2 rnd_message(RND_MSG_INFO, "The two arms of the net are:\n"); - rnd_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_delete_entry(ly->line_tree, (rnd_box_t *)l); ox = l->Point1.X; oy = l->Point1.Y; l->Point1.X = x; l->Point1.Y = y; - rnd_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_insert_entry(ly->line_tree, (rnd_box_t *)l); report_net_length_(res, argc, argv, x, y); - rnd_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_delete_entry(ly->line_tree, (rnd_box_t *)l); l->Point1.X = ox; l->Point1.Y = oy; - rnd_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_insert_entry(ly->line_tree, (rnd_box_t *)l); - rnd_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_delete_entry(ly->line_tree, (rnd_box_t *)l); ox = l->Point2.X; oy = l->Point2.Y; l->Point2.X = x; l->Point2.Y = y; - rnd_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_insert_entry(ly->line_tree, (rnd_box_t *)l); report_net_length_(res, argc, argv, x, y); - rnd_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_delete_entry(ly->line_tree, (rnd_box_t *)l); l->Point2.X = ox; l->Point2.Y = oy; - rnd_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); + rnd_r_insert_entry(ly->line_tree, (rnd_box_t *)l); PCB_FLAG_SET(PCB_FLAG_SELECTED, l); Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 31800) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 31801) @@ -118,7 +118,7 @@ rnd_coord_t radius; rnd_coord_t X, Y; pcb_line_t *line; - rnd_rnd_box_t box; + rnd_box_t box; pcb_layer_t *layer; rubber_ctx_t *rbnd; int delta_index; @@ -138,10 +138,10 @@ static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, rnd_point_t *, rnd_bool); -static rnd_r_dir_t rubber_callback(const rnd_rnd_box_t *b, void *cl); -static rnd_r_dir_t rubber_callback_arc(const rnd_rnd_box_t *b, void *cl); +static rnd_r_dir_t rubber_callback(const rnd_box_t *b, void *cl); +static rnd_r_dir_t rubber_callback_arc(const rnd_box_t *b, void *cl); -static rnd_r_dir_t rubber_callback(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t rubber_callback(const rnd_box_t *b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; pcb_rb_line_t *have_line = NULL; @@ -281,7 +281,7 @@ return touches1 || touches2 ? RND_R_DIR_FOUND_CONTINUE : RND_R_DIR_NOT_FOUND; } -static rnd_r_dir_t rubber_callback_arc(const rnd_rnd_box_t *b, void *cl) +static rnd_r_dir_t rubber_callback_arc(const rnd_box_t *b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *) b; struct rubber_info *i = (struct rubber_info *)cl; @@ -361,7 +361,7 @@ int delta_index; }; -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_rat_t *rat = (pcb_rat_t *) box; struct rinfo *i = (struct rinfo *)cl; @@ -406,7 +406,7 @@ info.rbnd = rbnd; info.delta_index = 0; - rnd_r_search(PCB->Data->rat_tree, (rnd_rnd_box_t *) Point, NULL, rat_callback, &info, NULL); + rnd_r_search(PCB->Data->rat_tree, (rnd_box_t *) Point, NULL, rat_callback, &info, NULL); } /* checks all visible lines which belong to the same group as the passed line. @@ -1265,10 +1265,10 @@ pcb_line_invalidate_erase(ptr->Line); if (ptr->Layer) { pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_LINE, ptr->Layer, ptr->Line); - rnd_r_delete_entry(ptr->Layer->line_tree, (rnd_rnd_box_t *) ptr->Line); + rnd_r_delete_entry(ptr->Layer->line_tree, (rnd_box_t *) ptr->Line); } else - rnd_r_delete_entry(PCB->Data->rat_tree, (rnd_rnd_box_t *) ptr->Line); + rnd_r_delete_entry(PCB->Data->rat_tree, (rnd_box_t *) ptr->Line); if (dindex1 >= 0) pcb_point_rotate90(&ptr->Line->Point1, cx, cy, steps); @@ -1278,12 +1278,12 @@ pcb_line_bbox(ptr->Line); if (ptr->Layer) { - rnd_r_insert_entry(ptr->Layer->line_tree, (rnd_rnd_box_t *) ptr->Line); + rnd_r_insert_entry(ptr->Layer->line_tree, (rnd_box_t *) ptr->Line); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_LINE, ptr->Layer, ptr->Line); pcb_line_invalidate_draw(ptr->Layer, ptr->Line); } else { - rnd_r_insert_entry(PCB->Data->rat_tree, (rnd_rnd_box_t *) ptr->Line); + rnd_r_insert_entry(PCB->Data->rat_tree, (rnd_box_t *) ptr->Line); pcb_rat_invalidate_draw((pcb_rat_t *) ptr->Line); } Index: trunk/src_plugins/shape/shape.c =================================================================== --- trunk/src_plugins/shape/shape.c (revision 31800) +++ trunk/src_plugins/shape/shape.c (revision 31801) @@ -252,7 +252,7 @@ if (data != PCB->Data) { pcb_buffer_clear(PCB, PCB_PASTEBUFFER); pcb_copy_obj_to_buffer(PCB, data, PCB->Data, PCB_OBJ_POLY, PCB_CURRLAYER(PCB), p, p); - rnd_r_delete_entry(PCB_CURRLAYER(PCB)->polygon_tree, (rnd_rnd_box_t *)p); + rnd_r_delete_entry(PCB_CURRLAYER(PCB)->polygon_tree, (rnd_box_t *)p); pcb_poly_free_fields(p); pcb_poly_free(p); rnd_tool_select_by_name(&PCB->hidlib, "buffer"); @@ -301,7 +301,7 @@ if (data != PCB->Data) { pcb_buffer_clear(PCB, PCB_PASTEBUFFER); pcb_copy_obj_to_buffer(PCB, data, PCB->Data, PCB_OBJ_LINE, PCB_CURRLAYER(PCB), l, l); - rnd_r_delete_entry(PCB_CURRLAYER(PCB)->line_tree, (rnd_rnd_box_t *)l); + rnd_r_delete_entry(PCB_CURRLAYER(PCB)->line_tree, (rnd_box_t *)l); pcb_line_free(l); rnd_tool_select_by_name(&PCB->hidlib, "buffer"); } Index: trunk/src_plugins/sketch_route/sketch_route.c =================================================================== --- trunk/src_plugins/sketch_route/sketch_route.c (revision 31800) +++ trunk/src_plugins/sketch_route/sketch_route.c (revision 31801) @@ -653,7 +653,7 @@ sketch_t *sk; }; -static rnd_r_dir_t r_search_cb(const rnd_rnd_box_t *box, void *cl) +static rnd_r_dir_t r_search_cb(const rnd_box_t *box, void *cl) { pcb_any_obj_t *obj = (pcb_any_obj_t *) box; struct search_info *i = (struct search_info *) cl; @@ -690,7 +690,7 @@ static void sketch_create_for_layer(sketch_t *sk, pcb_layer_t *layer) { - rnd_rnd_box_t bbox; + rnd_box_t bbox; struct search_info info; char name[256]; Index: trunk/src_plugins/sketch_route/spoke.c =================================================================== --- trunk/src_plugins/sketch_route/spoke.c (revision 31800) +++ trunk/src_plugins/sketch_route/spoke.c (revision 31801) @@ -27,7 +27,7 @@ static void spoke_pos(spoke_t *sp, rnd_coord_t spacing, rnd_coord_t *x, rnd_coord_t *y) { - rnd_rnd_box_t *obj_bbox = &((pointdata_t *) sp->p->data)->obj->bbox_naked; + rnd_box_t *obj_bbox = &((pointdata_t *) sp->p->data)->obj->bbox_naked; rnd_coord_t half_obj_w, half_obj_h; half_obj_w = (obj_bbox->X2 - obj_bbox->X1 + 1) / 2; Index: trunk/src_plugins/sketch_route/spoke.h =================================================================== --- trunk/src_plugins/sketch_route/spoke.h (revision 31800) +++ trunk/src_plugins/sketch_route/spoke.h (revision 31801) @@ -18,7 +18,7 @@ struct spoke_s { spoke_dir_t dir; - rnd_rnd_box_t bbox; + rnd_box_t bbox; vtp0_t slots; point_t *p; }; Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 31800) +++ trunk/src_plugins/teardrops/teardrops.c (revision 31801) @@ -39,7 +39,7 @@ static int new_arcs = 0; -static rnd_r_dir_t check_line_callback(const rnd_rnd_box_t * box, void *cl) +static rnd_r_dir_t check_line_callback(const rnd_box_t * box, void *cl) { pcb_layer_t *lay = &PCB->Data->Layer[layer]; pcb_line_t *l = (pcb_line_t *) box; @@ -181,7 +181,7 @@ for (layer = 0; layer < pcb_max_layer(PCB); layer++) { pcb_layer_t *l = &(PCB->Data->Layer[layer]); pcb_pstk_shape_t *shp, tmpshp; - rnd_rnd_box_t spot; + rnd_box_t spot; int n; double mindist; @@ -250,7 +250,7 @@ static fgw_error_t pcb_act_teardrops(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_rnd_box_t *b; + rnd_box_t *b; rnd_rtree_it_t it; new_arcs = 0; Index: trunk/src_plugins/tool_std/tool_arrow.c =================================================================== --- trunk/src_plugins/tool_std/tool_arrow.c (revision 31800) +++ trunk/src_plugins/tool_std/tool_arrow.c (revision 31801) @@ -83,7 +83,7 @@ rnd_tool_select_by_name(hl, "buffer"); } else if (hl->tool_hit && !rnd_gui->shift_is_pressed(rnd_gui)) { - rnd_rnd_box_t box; + rnd_box_t box; hl->tool_grabbed.status = rnd_true; rnd_tool_save(hl); @@ -109,7 +109,7 @@ pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, rnd_true); } else { - rnd_rnd_box_t box; + rnd_box_t box; hl->tool_hit = 0; pcb_crosshair_note.Moving = rnd_false; @@ -189,11 +189,11 @@ void pcb_tool_arrow_release_mode(rnd_hidlib_t *hl) { - rnd_rnd_box_t box; + rnd_box_t box; pcb_board_t *pcb = (pcb_board_t *)hl; if (hl->tool_click) { - rnd_rnd_box_t box; + rnd_box_t box; box.X1 = -RND_MAX_COORD; box.Y1 = -RND_MAX_COORD;