Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 30969) +++ trunk/src/board.c (revision 30970) @@ -189,7 +189,7 @@ TODO("padstack: move this to obj_pstk.c after pinvia removal") #include "obj_pstk_inlines.h" -static pcb_r_dir_t hole_counting_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t hole_counting_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t slot_counting_callback(const rnd_box_t *b, void *cl) +static pcb_r_dir_t slot_counting_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const rnd_box_t *within_area) +void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const rnd_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_box_t *within_area) +void pcb_board_count_slots(pcb_board_t *pcb, int *plated, int *unplated, const rnd_rnd_box_t *within_area) { HoleCountStruct hcs = { 0, 0 }; @@ -388,7 +388,7 @@ int pcb_board_normalize(pcb_board_t *pcb) { - rnd_box_t b; + rnd_rnd_box_t b; int chg = 0; if (pcb_data_bbox(&b, pcb->Data, pcb_false) == NULL) Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 30969) +++ trunk/src/board.h (revision 30970) @@ -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_box_t *within_area); -void pcb_board_count_slots(pcb_board_t *pcb, int *plated, int *unplated, const rnd_box_t *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); #define PCB_SWAP_X(x) (PCB_SWAP_SIGN_X(x)) #define PCB_SWAP_Y(y) (PCB->hidlib.size_y +PCB_SWAP_SIGN_Y(y)) Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 30969) +++ trunk/src/buffer.c (revision 30970) @@ -149,7 +149,7 @@ int pcb_set_buffer_bbox(pcb_buffer_t *Buffer) { - rnd_box_t tmp, *box; + rnd_rnd_box_t tmp, *box; int res = 0; box = pcb_data_bbox(&tmp, Buffer->Data, pcb_false); @@ -345,37 +345,37 @@ PCB_LINE_ALL_LOOP(Buffer->Data); { if (layer->line_tree != NULL) - pcb_r_delete_entry(layer->line_tree, (rnd_box_t *) line); + pcb_r_delete_entry(layer->line_tree, (rnd_rnd_box_t *) line); pcb_line_rotate90(line, Buffer->X, Buffer->Y, Number); if (layer->line_tree != NULL) - pcb_r_insert_entry(layer->line_tree, (rnd_box_t *) line); + pcb_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *) line); } PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { if (layer->arc_tree != NULL) - pcb_r_delete_entry(layer->arc_tree, (rnd_box_t *) arc); + pcb_r_delete_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); pcb_arc_rotate90(arc, Buffer->X, Buffer->Y, Number); if (layer->arc_tree != NULL) - pcb_r_insert_entry(layer->arc_tree, (rnd_box_t *) arc); + pcb_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); } PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Buffer->Data); { if (layer->text_tree != NULL) - pcb_r_delete_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *) text); pcb_text_rotate90(text, Buffer->X, Buffer->Y, Number); if (layer->text_tree != NULL) - pcb_r_insert_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); } PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Buffer->Data); { if (layer->polygon_tree != NULL) - pcb_r_delete_entry(layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); pcb_poly_rotate90(polygon, Buffer->X, Buffer->Y, Number); if (layer->polygon_tree != NULL) - pcb_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); } PCB_ENDALL_LOOP; @@ -387,7 +387,7 @@ pcb_undo_unfreeze_serial(); } -void pcb_buffer_rotate(pcb_buffer_t *Buffer, pcb_angle_t angle) +void pcb_buffer_rotate(pcb_buffer_t *Buffer, rnd_angle_t angle) { double cosa, sina; Index: trunk/src/buffer.h =================================================================== --- trunk/src/buffer.h (revision 30969) +++ trunk/src/buffer.h (revision 30970) @@ -36,8 +36,8 @@ struct pcb_buffer_s { /* information about the paste buffer */ rnd_coord_t X, Y; /* offset */ - rnd_box_t BoundingBox; - rnd_box_t bbox_naked; + rnd_rnd_box_t BoundingBox; + rnd_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 */ @@ -57,7 +57,7 @@ /* rotates the contents of the pastebuffer by Number * 90 degrees or free angle*/ void pcb_buffer_rotate90(pcb_buffer_t *Buffer, unsigned int Number); -void pcb_buffer_rotate(pcb_buffer_t *Buffer, pcb_angle_t angle); +void pcb_buffer_rotate(pcb_buffer_t *Buffer, rnd_angle_t angle); /* flip elements/subcircuits/tracks from one side to the other; also swap the layer stackup of padstacks */ Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 30969) +++ trunk/src/change.c (revision 30970) @@ -500,7 +500,7 @@ * changes the angle of all selected and visible object types * returns pcb_true if anything has changed */ -rnd_bool pcb_chg_selected_angle(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt) +rnd_bool pcb_chg_selected_angle(int types, int is_start, rnd_angle_t Difference, rnd_bool fixIt) { rnd_bool change = pcb_false; pcb_opctx_t ctx; @@ -522,7 +522,7 @@ * changes the radius of all selected and visible object types * returns pcb_true if anything has changed */ -rnd_bool pcb_chg_selected_radius(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt) +rnd_bool pcb_chg_selected_radius(int types, int is_start, rnd_angle_t Difference, rnd_bool fixIt) { rnd_bool change = pcb_false; pcb_opctx_t ctx; @@ -612,7 +612,7 @@ * changes the angles of the passed object (e.g. arc start/ctx->chgsize.value) * Returns pcb_true if anything is changed */ -rnd_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, pcb_angle_t a, rnd_bool fixIt) +rnd_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, rnd_angle_t a, rnd_bool fixIt) { rnd_bool change; pcb_opctx_t ctx; Index: trunk/src/change.h =================================================================== --- trunk/src/change.h (revision 30969) +++ trunk/src/change.h (revision 30970) @@ -98,9 +98,9 @@ void *pcb_chg_obj_name_query(pcb_any_obj_t *obj); rnd_bool pcb_chg_obj_radius(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_x, rnd_coord_t r, rnd_bool absolute); -rnd_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, pcb_angle_t a, rnd_bool absolute); -rnd_bool pcb_chg_selected_angle(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt); -rnd_bool pcb_chg_selected_radius(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt); +rnd_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, rnd_angle_t a, rnd_bool absolute); +rnd_bool pcb_chg_selected_angle(int types, int is_start, rnd_angle_t Difference, rnd_bool fixIt); +rnd_bool pcb_chg_selected_radius(int types, int is_start, rnd_angle_t Difference, rnd_bool fixIt); /* Change flag flg of an object in a way dictated by 'how' */ void pcb_flag_change(pcb_board_t *pcb, pcb_change_flag_t how, pcb_flag_values_t flg, int Type, void *Ptr1, void *Ptr2, void *Ptr3); Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 30969) +++ trunk/src/crosshair.c (revision 30970) @@ -137,7 +137,7 @@ { pcb_arc_t arc; rnd_coord_t wx, wy; - pcb_angle_t sa, dir; + rnd_angle_t sa, dir; wx = pcb_crosshair.X - pcb_crosshair.AttachedBox.Point1.X; wy = pcb_crosshair.Y - pcb_crosshair.AttachedBox.Point1.Y; @@ -240,7 +240,7 @@ void pcb_xordraw_insert_pt_obj(void) { pcb_line_t *line = (pcb_line_t *) pcb_crosshair.AttachedObject.Ptr2; - pcb_point_t *point = (pcb_point_t *) pcb_crosshair.AttachedObject.Ptr3; + rnd_point_t *point = (rnd_point_t *) pcb_crosshair.AttachedObject.Ptr3; if (pcb_crosshair.AttachedObject.Type != PCB_OBJ_VOID) { pcb_render->draw_line(pcb_crosshair.GC, point->X, point->Y, line->Point1.X, line->Point1.Y); @@ -357,10 +357,10 @@ case PCB_OBJ_LINE_POINT: { pcb_line_t *line; - pcb_point_t *point,*point1,point2; + rnd_point_t *point,*point1,point2; line = (pcb_line_t *) pcb_crosshair.AttachedObject.Ptr2; - point = (pcb_point_t *) pcb_crosshair.AttachedObject.Ptr3; + point = (rnd_point_t *) pcb_crosshair.AttachedObject.Ptr3; point1 = (point == &line->Point1 ? &line->Point2 : &line->Point1); point2 = *point; point2.X += dx; @@ -445,11 +445,11 @@ case PCB_OBJ_POLY_POINT: { pcb_poly_t *polygon; - pcb_point_t *point; + rnd_point_t *point; rnd_cardinal_t point_idx, prev, next; polygon = (pcb_poly_t *) pcb_crosshair.AttachedObject.Ptr2; - point = (pcb_point_t *) pcb_crosshair.AttachedObject.Ptr3; + point = (rnd_point_t *) pcb_crosshair.AttachedObject.Ptr3; point_idx = pcb_poly_point_idx(polygon, point); /* get previous and following point */ @@ -572,7 +572,7 @@ rnd_coord_t Y; }; -static pcb_r_dir_t onpoint_line_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t onpoint_line_callback(const rnd_rnd_box_t * box, void *cl) { struct onpoint_search_info *info = (struct onpoint_search_info *) cl; pcb_crosshair_t *crosshair = info->crosshair; @@ -598,7 +598,7 @@ #define close_enough(v1, v2) (coord_abs((v1)-(v2)) < 10) -static pcb_r_dir_t onpoint_arc_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t onpoint_arc_callback(const rnd_rnd_box_t * box, void *cl) { struct onpoint_search_info *info = (struct onpoint_search_info *) cl; pcb_crosshair_t *crosshair = info->crosshair; @@ -671,7 +671,7 @@ */ static void onpoint_work(pcb_crosshair_t * crosshair, rnd_coord_t X, rnd_coord_t Y) { - rnd_box_t SearchBox = rnd_point_box(X, Y); + rnd_rnd_box_t SearchBox = rnd_point_box(X, Y); struct onpoint_search_info info; int i; rnd_bool redraw = pcb_false; @@ -935,7 +935,7 @@ check_snap_object(&snap_data, ex, ey, pcb_true, (pcb_any_obj_t *)ptr2); } else if (ans != PCB_OBJ_VOID) { - pcb_point_t *pnt = (pcb_point_t *) ptr3; + rnd_point_t *pnt = (rnd_point_t *) ptr3; check_snap_object(&snap_data, pnt->X, pnt->Y, pcb_true, (pcb_any_obj_t *)ptr2); } @@ -973,7 +973,7 @@ ans = pcb_search_grid_slop(pcb_crosshair.X, pcb_crosshair.Y, PCB_OBJ_POLY_POINT, &ptr1, &ptr2, &ptr3); if (ans != PCB_OBJ_VOID) { - pcb_point_t *pnt = (pcb_point_t *) ptr3; + rnd_point_t *pnt = (rnd_point_t *) ptr3; check_snap_object(&snap_data, pnt->X, pnt->Y, pcb_true, NULL); } Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 30969) +++ trunk/src/crosshair.h (revision 30970) @@ -39,7 +39,7 @@ #include "route.h" typedef struct { /* currently marked block */ - pcb_point_t Point1, Point2; /* start- and end-position */ + rnd_point_t Point1, Point2; /* start- and end-position */ long int State; rnd_bool otherway; } pcb_attached_box_t; @@ -47,11 +47,11 @@ 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_box_t BoundingBox; + rnd_rnd_box_t BoundingBox; long int Type; /* object type */ long int State; void *Ptr1, *Ptr2, *Ptr3; /* three pointers to data, see search.c */ - pcb_angle_t start_angle, delta_angle; + rnd_angle_t start_angle, delta_angle; rnd_coord_t radius; } pcb_attached_object_t; Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 30969) +++ trunk/src/data.c (revision 30970) @@ -229,7 +229,7 @@ return pcb_true; } -rnd_box_t *pcb_data_bbox(rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) +rnd_rnd_box_t *pcb_data_bbox(rnd_rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) { /* preset identifiers with highest and lowest possible values */ out->X1 = out->Y1 = PCB_MAX_COORD; @@ -281,7 +281,7 @@ return (pcb_data_is_empty(Data) ? NULL : out); } -rnd_box_t *pcb_data_bbox_naked(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) { /* preset identifiers with highest and lowest possible values */ out->X1 = out->Y1 = PCB_MAX_COORD; @@ -522,9 +522,9 @@ } -int pcb_data_normalize_(pcb_data_t *data, rnd_box_t *data_bbox) +int pcb_data_normalize_(pcb_data_t *data, rnd_rnd_box_t *data_bbox) { - rnd_box_t tmp; + rnd_rnd_box_t tmp; rnd_coord_t dx = 0, dy = 0; if (data_bbox == NULL) { @@ -682,9 +682,9 @@ res |= tmp; \ } while(0); -pcb_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_box_t *starting_region, - pcb_r_dir_t (*region_in_search) (const rnd_box_t *region, void *cl), - pcb_r_dir_t (*rectangle_in_region) (const rnd_box_t *box, void *cl), +pcb_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_rnd_box_t *starting_region, + pcb_r_dir_t (*region_in_search) (const rnd_rnd_box_t *region, void *cl), + pcb_r_dir_t (*rectangle_in_region) (const rnd_rnd_box_t *box, void *cl), void *closure, int *num_found, rnd_bool vis_only) { pcb_layer_id_t lid; @@ -859,8 +859,8 @@ unsigned long pcb_data_clear_obj_flag(pcb_data_t *data, pcb_objtype_t tmask, unsigned long flag, int redraw, int undoable) { - pcb_rtree_it_t it; - rnd_box_t *n; + rnd_rtree_it_t it; + rnd_rnd_box_t *n; int li; pcb_layer_t *l; unsigned long cnt = 0; @@ -932,8 +932,8 @@ void pcb_data_dynflag_clear(pcb_data_t *data, pcb_dynf_t dynf) { - pcb_rtree_it_t it; - rnd_box_t *n; + rnd_rtree_it_t it; + rnd_rnd_box_t *n; int li; pcb_layer_t *l; Index: trunk/src/data.h =================================================================== --- trunk/src/data.h (revision 30969) +++ trunk/src/data.h (revision 30970) @@ -55,7 +55,7 @@ padstacklist_t padstack; pcb_subclist_t subc; /**/ - pcb_rtree_t *padstack_tree, *subc_tree, *rat_tree; + rnd_rtree_t *padstack_tree, *subc_tree, *rat_tree; pcb_layer_t Layer[PCB_MAX_LAYER]; /* layer TODO: make this dynamic */ pcb_plug_io_t *loader; ratlist_t Rat; @@ -133,8 +133,8 @@ /* gets minimum and maximum coordinates * returns NULL if layout is empty */ -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); +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); /* 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_box_t *data_bbox); +int pcb_data_normalize_(pcb_data_t *data, rnd_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 */ -pcb_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_box_t *starting_region, - pcb_r_dir_t (*region_in_search) (const rnd_box_t *region, void *cl), - pcb_r_dir_t (*rectangle_in_region) (const rnd_box_t *box, void *cl), +pcb_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const rnd_rnd_box_t *starting_region, + pcb_r_dir_t (*region_in_search) (const rnd_rnd_box_t *region, void *cl), + pcb_r_dir_t (*rectangle_in_region) (const rnd_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 30969) +++ trunk/src/draw.c (revision 30970) @@ -57,7 +57,7 @@ pcb_output_t pcb_draw_out; /* global context used for drawing */ -rnd_box_t pcb_draw_invalidated = { RND_COORD_MAX, RND_COORD_MAX, -RND_COORD_MAX, -RND_COORD_MAX }; +rnd_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 = pcb_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_box_t *); +static void pcb_draw_rats(pcb_draw_info_t *info, const rnd_rnd_box_t *); static void pcb_draw_assembly(pcb_draw_info_t *info, pcb_layer_type_t lyt_side); @@ -294,7 +294,7 @@ pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } -static void draw_rats(pcb_draw_info_t *info, const rnd_box_t *drawn_area) +static void draw_rats(pcb_draw_info_t *info, const rnd_rnd_box_t *drawn_area) { if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_RATS, 0, NULL)) { pcb_render->set_drawing_mode(pcb_render, PCB_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, pcb_layergrp_id_t group, const rnd_box_t *drawn_area) +void pcb_draw_pstk_names(pcb_draw_info_t *info, pcb_layergrp_id_t group, const rnd_rnd_box_t *drawn_area) { if (PCB->pstk_on || !pcb_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_box_t *b = (rnd_box_t *)o; + rnd_rnd_box_t *b = (rnd_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; @@ -799,10 +799,10 @@ *info->noexport_name = '\0'; } -void pcb_draw_layer_noxform(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_box_t *screen) +void pcb_draw_layer_noxform(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen) { pcb_draw_info_t info; - rnd_box_t scr2; + rnd_rnd_box_t scr2; pcb_draw_info_setup(&info, pcb); info.drawn_area = screen; @@ -824,12 +824,12 @@ /* 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_box_t *screen, pcb_data_t *data, pcb_xform_t *xf) +void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, pcb_xform_t *xf) { pcb_draw_info_t info; - rnd_box_t scr2; + rnd_rnd_box_t scr2; unsigned int lflg = 0; - pcb_rtree_it_t it; + rnd_rtree_it_t it; pcb_any_obj_t *o; pcb_xform_t tmp; @@ -857,14 +857,14 @@ /* print the non-clearing polys */ if (Layer->polygon_tree != NULL) { if (lflg & PCB_LYT_COPPER) { - for(o = pcb_rtree_first(&it, Layer->polygon_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_poly_draw_term_callback((rnd_rnd_box_t *)o, &info); } else { - for(o = pcb_rtree_first(&it, Layer->polygon_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_poly_draw_callback((rnd_rnd_box_t *)o, &info); } } @@ -874,39 +874,39 @@ /* draw all visible layer objects (with terminal gfx on copper) */ if (lflg & PCB_LYT_COPPER) { if (Layer->line_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->line_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_line_draw_term_callback((rnd_rnd_box_t *)o, &info); if (Layer->arc_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->arc_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_arc_draw_term_callback((rnd_rnd_box_t *)o, &info); if (Layer->text_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->text_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_text_draw_term_callback((rnd_rnd_box_t *)o, &info); if (Layer->gfx_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->gfx_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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(&info, (pcb_gfx_t *)o, 0); } else { if (Layer->line_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->line_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_line_draw_callback((rnd_rnd_box_t *)o, &info); if (Layer->arc_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->arc_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_arc_draw_callback((rnd_rnd_box_t *)o, &info); if (Layer->text_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->text_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_box_t *)o, &info); + pcb_text_draw_callback((rnd_rnd_box_t *)o, &info); if (Layer->gfx_tree != NULL) - for(o = pcb_rtree_first(&it, Layer->gfx_tree, (pcb_rtree_box_t *)screen); o != NULL; o = pcb_rtree_next(&it)) + 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_callback((rnd_box_t *)o, &info); + pcb_gfx_draw_callback((rnd_rnd_box_t *)o, &info); } out:; @@ -1258,7 +1258,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_box_t b; + rnd_rnd_box_t b; PCB_TERM_LABEL_SETUP((const unsigned char *)label); dx = PCB_ABS(dx); Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 30969) +++ trunk/src/draw.h (revision 30970) @@ -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_box_t *drawn_area; + const rnd_rnd_box_t *drawn_area; pcb_xform_t *xform_caller; /* the extra transformation the caller requested (the one who has initiated the rendering, e.g. throuh pcb_draw_everything()) */ pcb_xform_t *xform_exporter; /* the extra transformation the exporter requested (e.g. because of cam) */ pcb_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_box_t pcb_draw_invalidated; +extern rnd_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_box_t */ + for redraw (by pcb_draw()). obj is anything that can be casted to rnd_rnd_box_t */ #define pcb_draw_invalidate(obj) \ do { \ - rnd_box_t *box = (rnd_box_t *)obj; \ + rnd_rnd_box_t *box = (rnd_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_box_t *screen); +void pcb_draw_layer_noxform(pcb_board_t *pcb, const pcb_layer_t *ly, const rnd_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_box_t *screen, pcb_data_t *data, pcb_xform_t *xform); +void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, pcb_xform_t *xform); /* Composite draw all layer groups matching lyt/purpi/purpose */ -void pcb_draw_groups(pcb_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_draw_groups(pcb_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_erase_obj(int, void *, void *); -void pcb_draw_pstk_names(pcb_draw_info_t *info, pcb_layergrp_id_t group, const rnd_box_t *drawn_area); +void pcb_draw_pstk_names(pcb_draw_info_t *info, pcb_layergrp_id_t group, const rnd_rnd_box_t *drawn_area); /*#define PCB_BBOX_DEBUG*/ Index: trunk/src/draw_composite.c =================================================================== --- trunk/src/draw_composite.c (revision 30969) +++ trunk/src/draw_composite.c (revision 30970) @@ -180,7 +180,7 @@ pcb_draw_pstks(ctx->info, ctx->gid, 0, *pstk_lyt_match); } -void pcb_draw_groups(pcb_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_draw_groups(pcb_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) { pcb_draw_info_t info; pcb_layergrp_id_t gid; Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 30969) +++ trunk/src/draw_ly_spec.c (revision 30970) @@ -328,7 +328,7 @@ /******** misc ********/ -static void pcb_draw_rats(pcb_draw_info_t *info, const rnd_box_t *drawn_area) +static void pcb_draw_rats(pcb_draw_info_t *info, const rnd_rnd_box_t *drawn_area) { pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); Index: trunk/src/draw_wireframe.h =================================================================== --- trunk/src/draw_wireframe.h (revision 30969) +++ trunk/src/draw_wireframe.h (revision 30970) @@ -79,7 +79,7 @@ /* draw caps */ if (!square) { - pcb_angle_t angle = atan2(dx, dy) * 57.295779; + rnd_angle_t angle = atan2(dx, dy) * 57.295779; pcb_render->draw_arc(gc, x1, y1, thick / 2, thick / 2, angle - 180, 180); pcb_render->draw_arc(gc, x2, y2, thick / 2, thick / 2, angle, 180); } Index: trunk/src/extobj_helper.h =================================================================== --- trunk/src/extobj_helper.h (revision 30969) +++ trunk/src/extobj_helper.h (revision 30970) @@ -78,7 +78,7 @@ { pcb_data_t *data = subc->parent.data; if (data->subc_tree != NULL) - pcb_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_delete_entry(data->subc_tree, (rnd_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)) - pcb_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); return 0; } @@ -120,7 +120,7 @@ pcb_subc_bind_globals(pcb, subc); if (!dst->subc_tree) dst->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dst->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(dst->subc_tree, (rnd_rnd_box_t *)subc); } pcb_undo_add_obj_to_create(PCB_OBJ_SUBC, subc, subc, subc); @@ -176,7 +176,7 @@ pcb_hid_dad_spin_t *spin; \ double d; \ rnd_coord_t currval = 0; \ - const pcb_unit_t *unit_out = NULL; \ + const rnd_unit_t *unit_out = NULL; \ int wid; \ char *sval = rnd_attribute_get(&subc->Attributes, attr_name); \ if (sval != NULL) \ Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 30969) +++ trunk/src/find.c (revision 30970) @@ -180,37 +180,37 @@ } \ } while(0) -void pcb_find_on_layer(pcb_find_t *ctx, pcb_layer_t *l, pcb_any_obj_t *curr, pcb_rtree_box_t *sb, pcb_found_conn_type_t ctype) +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) { - pcb_rtree_it_t it; - rnd_box_t *n; + rnd_rtree_it_t it; + rnd_rnd_box_t *n; if (l->line_tree != NULL) { - for(n = pcb_rtree_first(&it, l->line_tree, sb); n != NULL; n = pcb_rtree_next(&it)) + for(n = rnd_rtree_first(&it, l->line_tree, sb); n != NULL; n = rnd_rtree_next(&it)) PCB_FIND_CHECK(ctx, curr, n, ctype, return); pcb_r_end(&it); } if (l->arc_tree != NULL) { - for(n = pcb_rtree_first(&it, l->arc_tree, sb); n != NULL; n = pcb_rtree_next(&it)) + for(n = rnd_rtree_first(&it, l->arc_tree, sb); n != NULL; n = rnd_rtree_next(&it)) PCB_FIND_CHECK(ctx, curr, n, ctype, return); pcb_r_end(&it); } if (l->polygon_tree != NULL) { - for(n = pcb_rtree_first(&it, l->polygon_tree, sb); n != NULL; n = pcb_rtree_next(&it)) + for(n = rnd_rtree_first(&it, l->polygon_tree, sb); n != NULL; n = rnd_rtree_next(&it)) PCB_FIND_CHECK(ctx, curr, n, ctype, return); pcb_r_end(&it); } if (l->text_tree != NULL) { - for(n = pcb_rtree_first(&it, l->text_tree, sb); n != NULL; n = pcb_rtree_next(&it)) + for(n = rnd_rtree_first(&it, l->text_tree, sb); n != NULL; n = rnd_rtree_next(&it)) PCB_FIND_CHECK(ctx, curr, n, ctype, return); pcb_r_end(&it); } } -void pcb_find_on_layergrp(pcb_find_t *ctx, pcb_layergrp_t *g, pcb_any_obj_t *curr, pcb_rtree_box_t *sb, pcb_found_conn_type_t ctype) +void pcb_find_on_layergrp(pcb_find_t *ctx, pcb_layergrp_t *g, pcb_any_obj_t *curr, rnd_rtree_box_t *sb, pcb_found_conn_type_t ctype) { int n; if (g == NULL) @@ -221,7 +221,7 @@ static void pcb_find_rat(pcb_find_t *ctx, pcb_rat_t *rat) { - pcb_rtree_box_t sb; + rnd_rtree_box_t sb; sb.x1 = rat->Point1.X; sb.x2 = rat->Point1.X+1; sb.y1 = rat->Point1.Y; sb.y2 = rat->Point1.Y+1; @@ -255,12 +255,12 @@ ctype = curr->type == PCB_OBJ_RAT ? PCB_FCT_RAT : PCB_FCT_COPPER; { /* search unmkared connections: iterative approach */ - pcb_rtree_it_t it; - rnd_box_t *n; - pcb_rtree_box_t *sb = (pcb_rtree_box_t *)&curr->bbox_naked; + rnd_rtree_it_t it; + rnd_rnd_box_t *n; + rnd_rtree_box_t *sb = (rnd_rtree_box_t *)&curr->bbox_naked; if (PCB->Data->padstack_tree != NULL) { - for(n = pcb_rtree_first(&it, PCB->Data->padstack_tree, sb); n != NULL; n = pcb_rtree_next(&it)) + for(n = rnd_rtree_first(&it, PCB->Data->padstack_tree, sb); n != NULL; n = rnd_rtree_next(&it)) PCB_FIND_CHECK(ctx, curr, n, ctype, return ctx->nfound); pcb_r_end(&it); } @@ -267,7 +267,7 @@ if ((ctx->consider_rats || ctx->only_mark_rats) && (PCB->Data->rat_tree != NULL)) { if (PCB->Data->padstack_tree != NULL) { - for(n = pcb_rtree_first(&it, PCB->Data->rat_tree, sb); n != NULL; n = pcb_rtree_next(&it)) + for(n = rnd_rtree_first(&it, PCB->Data->rat_tree, sb); n != NULL; n = rnd_rtree_next(&it)) PCB_FIND_CHECK_RAT(ctx, curr, n, PCB_FCT_RAT, return ctx->nfound); pcb_r_end(&it); } Index: trunk/src/find.h =================================================================== --- trunk/src/find.h (revision 30969) +++ trunk/src/find.h (revision 30970) @@ -102,7 +102,7 @@ rnd_bool pcb_isc_line_line(const pcb_find_t *ctx, pcb_line_t *Line1, pcb_line_t *Line2); rnd_bool pcb_isc_line_arc(const pcb_find_t *ctx, pcb_line_t *Line, pcb_arc_t *Arc); rnd_bool pcb_isc_arc_poly(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_poly_t *Polygon); -rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_polyarea_t *pa); +rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, rnd_polyarea_t *pa); rnd_bool pcb_isc_line_poly(const pcb_find_t *ctx, pcb_line_t *Line, pcb_poly_t *Polygon); rnd_bool pcb_isc_poly_poly(const pcb_find_t *ctx, pcb_poly_t *P1, pcb_poly_t *P2); pcb_bool_t pcb_isc_pstk_line(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_line_t *line); Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 30969) +++ trunk/src/find_geo.c (revision 30970) @@ -53,10 +53,10 @@ /* 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_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_rnd_box_t *box, const pcb_poly_t *poly, int first_only) { pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; /* first, iterate over all islands of a polygon */ for(pa = pcb_poly_island_first(poly, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { @@ -75,10 +75,10 @@ can't be determined by a single contour check because there might be multiple contours. Returns 1 if obj's poly intersects any island's. Frees objpoly at the end. */ -RND_INLINE int box_isc_poly_any_island_free(pcb_polyarea_t *objpoly, const pcb_poly_t *poly, int first_only) +RND_INLINE int box_isc_poly_any_island_free(rnd_polyarea_t *objpoly, const pcb_poly_t *poly, int first_only) { pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; int ans; /* first, iterate over all islands of a polygon */ @@ -94,7 +94,7 @@ } /* reduce arc start angle and delta to 0..360 */ -static void normalize_angles(pcb_angle_t * sa, pcb_angle_t * d) +static void normalize_angles(rnd_angle_t * sa, rnd_angle_t * d) { if (*d < 0) { *sa += *d; @@ -108,7 +108,7 @@ static int radius_crosses_arc(double x, double y, pcb_arc_t *arc) { double alpha = atan2(y - arc->Y, -x + arc->X) * PCB_RAD_TO_DEG; - pcb_angle_t sa = arc->StartAngle, d = arc->Delta; + rnd_angle_t sa = arc->StartAngle, d = arc->Delta; normalize_angles(&sa, &d); if (alpha < 0) @@ -181,8 +181,8 @@ if (dl < 0.5) { if ((Arc1->Width - t >= Arc2->Width - t2 && Arc1->Width - t <= Arc2->Width + t2) || (Arc1->Width + t >= Arc2->Width - t2 && Arc1->Width + t <= Arc2->Width + t2)) { - pcb_angle_t sa1 = Arc1->StartAngle, d1 = Arc1->Delta; - pcb_angle_t sa2 = Arc2->StartAngle, d2 = Arc2->Delta; + rnd_angle_t sa1 = Arc1->StartAngle, d1 = Arc1->Delta; + rnd_angle_t sa2 = Arc2->StartAngle, d2 = Arc2->Delta; /* NB the endpoints have already been checked, so we just compare the angles */ @@ -262,7 +262,7 @@ /* --------------------------------------------------------------------------- * Tests if point is same as line end point or center point */ -static rnd_bool pcb_isc_ratp_line(const pcb_find_t *ctx, pcb_point_t *Point, pcb_line_t *Line) +static rnd_bool pcb_isc_ratp_line(const pcb_find_t *ctx, rnd_point_t *Point, pcb_line_t *Line) { rnd_coord_t cx, cy; @@ -295,7 +295,7 @@ /* --------------------------------------------------------------------------- * Tests if point is same as arc end point or center point */ -static rnd_bool pcb_isc_ratp_arc(const pcb_find_t *ctx, pcb_point_t *Point, pcb_arc_t *arc) +static rnd_bool pcb_isc_ratp_arc(const pcb_find_t *ctx, rnd_point_t *Point, pcb_arc_t *arc) { rnd_coord_t cx, cy; @@ -332,11 +332,11 @@ /* --------------------------------------------------------------------------- * Tests if rat line point is connected to a polygon */ -static rnd_bool pcb_isc_ratp_poly(const pcb_find_t *ctx, pcb_point_t *Point, pcb_poly_t *polygon, int donut) +static rnd_bool pcb_isc_ratp_poly(const pcb_find_t *ctx, rnd_point_t *Point, pcb_poly_t *polygon, int donut) { rnd_coord_t cx, cy; pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; /* clipped out of existence... */ if (polygon->Clipped == NULL) @@ -411,7 +411,7 @@ return pcb_false; } -static void form_slanted_rectangle(pcb_point_t p[4], pcb_line_t *l) +static void form_slanted_rectangle(rnd_point_t p[4], pcb_line_t *l) /* writes vertices of a squared line */ { double dwx = 0, dwy = 0; @@ -496,7 +496,7 @@ double s, r; double line1_dx, line1_dy, line2_dx, line2_dy, point1_dx, point1_dy; if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, Line1)) { /* pretty reckless recursion */ - pcb_point_t p[4]; + rnd_point_t p[4]; form_slanted_rectangle(p, Line1); return pcb_is_line_in_quadrangle(p, Line2); } @@ -503,7 +503,7 @@ /* here come only round Line1 because pcb_is_line_in_quadrangle() calls pcb_isc_line_line() with first argument rounded */ if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, Line2)) { - pcb_point_t p[4]; + rnd_point_t p[4]; form_slanted_rectangle(p, Line2); return pcb_is_line_in_quadrangle(p, Line1); } @@ -648,7 +648,7 @@ */ rnd_bool pcb_isc_arc_poly(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_poly_t *Polygon) { - rnd_box_t *Box = (rnd_box_t *) Arc; + rnd_rnd_box_t *Box = (rnd_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)) @@ -656,7 +656,7 @@ if (!Polygon->Clipped) return pcb_false; if (box_isc_poly_any_island_bbox(ctx, Box, Polygon, !PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, Polygon))) { - pcb_polyarea_t *ap; + rnd_polyarea_t *ap; if (!(ap = pcb_poly_from_pcb_arc(Arc, Arc->Thickness + Bloat))) return pcb_false; /* error */ @@ -665,15 +665,15 @@ return pcb_false; } -rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_polyarea_t *pa) +rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, rnd_polyarea_t *pa) { - rnd_box_t *Box = (rnd_box_t *) Arc; + rnd_rnd_box_t *Box = (rnd_rnd_box_t *) Arc; rnd_bool res = pcb_false; /* arcs with clearance never touch polys */ if ((Box->X1 <= pa->contours->xmax + Bloat) && (Box->X2 >= pa->contours->xmin - Bloat) && (Box->Y1 <= pa->contours->ymax + Bloat) && (Box->Y2 >= pa->contours->ymin - Bloat)) { - pcb_polyarea_t *arcp; + rnd_polyarea_t *arcp; if (!(arcp = pcb_poly_from_pcb_arc(Arc, Arc->Thickness + Bloat))) return pcb_false; /* error */ @@ -694,8 +694,8 @@ */ rnd_bool pcb_isc_line_poly(const pcb_find_t *ctx, pcb_line_t *Line, pcb_poly_t *Polygon) { - rnd_box_t *Box = (rnd_box_t *) Line; - pcb_polyarea_t *lp; + rnd_rnd_box_t *Box = (rnd_rnd_box_t *) Line; + rnd_polyarea_t *lp; /* lines with clearance never touch polygons */ if (!ctx->ignore_clearance && PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, Polygon) && PCB_OBJ_HAS_CLEARANCE(Line)) @@ -731,7 +731,7 @@ int pcp_cnt = 0; rnd_coord_t pcp_gap; pcb_poly_it_t it1, it2; - pcb_polyarea_t *pa1, *pa2; + rnd_polyarea_t *pa1, *pa2; if (!P1->Clipped || !P2->Clipped) return pcb_false; @@ -1018,12 +1018,12 @@ } -RND_INLINE pcb_polyarea_t *pcb_pstk_shp_poly2area(pcb_pstk_t *ps, pcb_pstk_shape_t *shape) +RND_INLINE rnd_polyarea_t *pcb_pstk_shp_poly2area(pcb_pstk_t *ps, pcb_pstk_shape_t *shape) { int n; pcb_pline_t *pl; pcb_vector_t v; - pcb_polyarea_t *shp = pcb_polyarea_create(); + rnd_polyarea_t *shp = pcb_polyarea_create(); v[0] = shape->data.poly.x[0] + ps->x; v[1] = shape->data.poly.y[0] + ps->y; pl = pcb_poly_contour_new(v); @@ -1052,7 +1052,7 @@ { /* convert the shape poly to a new poly so that it can be intersected */ rnd_bool res; - pcb_polyarea_t *shp = pcb_pstk_shp_poly2area(ps, shape); + rnd_polyarea_t *shp = pcb_pstk_shp_poly2area(ps, shape); res = pcb_polyarea_touching(shp, poly->Clipped); pcb_polyarea_free(&shp); return res; @@ -1147,8 +1147,8 @@ case PCB_PSSH_POLY: { rnd_bool res; - pcb_polyarea_t *shp1 = pcb_pstk_shp_poly2area(ps1, shape1); - pcb_polyarea_t *shp2 = pcb_pstk_shp_poly2area(ps2, shape2); + rnd_polyarea_t *shp1 = pcb_pstk_shp_poly2area(ps1, shape1); + rnd_polyarea_t *shp2 = pcb_pstk_shp_poly2area(ps2, shape2); res = pcb_polyarea_touching(shp1, shp2); pcb_polyarea_free(&shp1); pcb_polyarea_free(&shp2); Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 30969) +++ trunk/src/font.c (revision 30970) @@ -236,13 +236,13 @@ pcb_poly_t *p = calloc(sizeof(pcb_poly_t), 1); if (num_points > 0) { p->PointN = p->PointMax = num_points; - p->Points = malloc(sizeof(pcb_point_t) * num_points); + p->Points = malloc(sizeof(rnd_point_t) * num_points); } polylist_insert(&Symbol->polys, p); return p; } -pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, pcb_angle_t start, pcb_angle_t delta, rnd_coord_t thickness) +pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, rnd_angle_t start, rnd_angle_t delta, rnd_coord_t thickness) { pcb_arc_t *a = calloc(sizeof(pcb_arc_t), 1); a->X = cx; @@ -428,7 +428,7 @@ memset(&dst->Symbol[i].polys, 0, sizeof(polylist_t)); for(p_src = polylist_first(&src->Symbol[i].polys); p_src != NULL; p_src = polylist_next(p_src)) { pcb_poly_t *p_dst = pcb_font_new_poly_in_sym(&dst->Symbol[i], p_src->PointN); - memcpy(p_dst->Points, p_src->Points, p_src->PointN * sizeof(pcb_point_t)); + memcpy(p_dst->Points, p_src->Points, p_src->PointN * sizeof(rnd_point_t)); } memset(&dst->Symbol[i].arcs, 0, sizeof(arclist_t)); Index: trunk/src/font.h =================================================================== --- trunk/src/font.h (revision 30969) +++ trunk/src/font.h (revision 30970) @@ -55,7 +55,7 @@ struct pcb_font_s { /* complete set of symbols */ rnd_coord_t MaxHeight, MaxWidth; /* maximum cell width and height */ - rnd_box_t DefaultSymbol; /* the default symbol is a filled box */ + rnd_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; @@ -76,7 +76,7 @@ void pcb_font_set_info(pcb_font_t *Ptr); pcb_line_t *pcb_font_new_line_in_sym(pcb_symbol_t *Symbol, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness); -pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, pcb_angle_t start, pcb_angle_t delta, rnd_coord_t thickness); +pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, rnd_angle_t start, rnd_angle_t delta, rnd_coord_t thickness); pcb_poly_t *pcb_font_new_poly_in_sym(pcb_symbol_t *Symbol, int num_points); void pcb_font_free(pcb_font_t *f); Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 30969) +++ trunk/src/insert.c (revision 30970) @@ -80,9 +80,9 @@ return ptr; } -pcb_point_t *pcb_adjust_insert_point(void) +rnd_point_t *pcb_adjust_insert_point(void) { - static pcb_point_t InsertedPoint; + static rnd_point_t InsertedPoint; double m; rnd_coord_t x, y, m1, m2; pcb_line_t *line = (pcb_line_t *) pcb_crosshair.AttachedObject.Ptr2; Index: trunk/src/insert.h =================================================================== --- trunk/src/insert.h (revision 30969) +++ trunk/src/insert.h (revision 30970) @@ -38,6 +38,6 @@ void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, rnd_cardinal_t * Ptr3, rnd_coord_t DX, rnd_coord_t DY, rnd_bool Force, rnd_bool insert_last); /* adjusts the insert point to make 45 degree lines as necessary */ -pcb_point_t *pcb_adjust_insert_point(void); +rnd_point_t *pcb_adjust_insert_point(void); #endif Index: trunk/src/intersect.c =================================================================== --- trunk/src/intersect.c (revision 30969) +++ trunk/src/intersect.c (revision 30970) @@ -69,7 +69,7 @@ /* --------------------------------------------------------------------------- * Create a sorted list of unique y coords from a BoxList. */ -static LocationList createSortedYList(rnd_box_list_t *boxlist) +static LocationList createSortedYList(rnd_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_box_list_t *boxlist) +double pcb_intersect_box_box(rnd_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_box_list_t *boxlist) +double pcb_union_box_box(rnd_rnd_box_list_t *boxlist) { - rnd_box_t **rectLeft, **rectRight; + rnd_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_box_t **) calloc(boxlist->BoxN, sizeof(*rectLeft)); - rectRight = (rnd_box_t **) calloc(boxlist->BoxN, sizeof(*rectRight)); + rectLeft = (rnd_rnd_box_t **) calloc(boxlist->BoxN, sizeof(*rectLeft)); + rectRight = (rnd_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_box_t *b = rectRight[j++]; + rnd_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_box_t *b = rectLeft[i++]; + rnd_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_box_t **b1 = (rnd_box_t **) ptr1, **b2 = (rnd_box_t **) ptr2; + rnd_rnd_box_t **b1 = (rnd_rnd_box_t **) ptr1, **b2 = (rnd_rnd_box_t **) ptr2; return (*b1)->X1 - (*b2)->X1; } static int compareright(const void *ptr1, const void *ptr2) { - rnd_box_t **b1 = (rnd_box_t **) ptr1, **b2 = (rnd_box_t **) ptr2; + rnd_rnd_box_t **b1 = (rnd_rnd_box_t **) ptr1, **b2 = (rnd_rnd_box_t **) ptr2; return (*b1)->X2 - (*b2)->X2; } Index: trunk/src/intersect.h =================================================================== --- trunk/src/intersect.h (revision 30969) +++ trunk/src/intersect.h (revision 30970) @@ -43,7 +43,7 @@ #include -double pcb_intersect_box_box(rnd_box_list_t *boxlist); /* will sort boxlist */ -double pcb_union_box_box(rnd_box_list_t *boxlist); +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); #endif Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 30969) +++ trunk/src/layer.h (revision 30970) @@ -132,7 +132,7 @@ pcb_layer_combining_t comb; /* how to combine this layer with other layers in the group */ /* for bound layers these point to the board layer's*/ - pcb_rtree_t *line_tree, *text_tree, *polygon_tree, *arc_tree, *gfx_tree; + rnd_rtree_t *line_tree, *text_tree, *polygon_tree, *arc_tree, *gfx_tree; union { struct { /* A real board layer */ Index: trunk/src/librnd/core/box.c =================================================================== --- trunk/src/librnd/core/box.c (revision 30969) +++ trunk/src/librnd/core/box.c (revision 30970) @@ -33,7 +33,7 @@ #include #include -void rnd_box_rotate90(rnd_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number) +void rnd_box_rotate90(rnd_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_box_t *box, double xfactor, double yfactor) +void rnd_box_enlarge(rnd_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 30969) +++ trunk/src/librnd/core/box.h (revision 30970) @@ -47,10 +47,10 @@ #include #include -struct rnd_box_list_s { +struct rnd_rnd_box_list_s { rnd_cardinal_t BoxN; /* the number of boxes contained */ rnd_cardinal_t BoxMax; /* max boxes from malloc */ - rnd_box_t *Box; + rnd_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_box_t * box, rnd_coord_t X, rnd_coord_t Y) +RND_INLINE rnd_bool rnd_point_in_box(const rnd_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_box_t * box, rnd_coord_t X, rnd_coord_t Y) +RND_INLINE rnd_bool rnd_point_in_closed_box(const rnd_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_box_t * b) +RND_INLINE rnd_bool rnd_box_is_good(const rnd_rnd_box_t * b) { return (b->X1 < b->X2) && (b->Y1 < b->Y2); } -RND_INLINE rnd_bool rnd_box_intersect(const rnd_box_t * a, const rnd_box_t * b) +RND_INLINE rnd_bool rnd_box_intersect(const rnd_rnd_box_t * a, const rnd_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_box_t * box) +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_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_box_t * outer, const rnd_box_t * inner) +RND_INLINE rnd_bool rnd_box_in_box(const rnd_rnd_box_t * outer, const rnd_rnd_box_t * inner) { return (outer->X1 <= inner->X1) && (inner->X2 <= outer->X2) && (outer->Y1 <= inner->Y1) && (inner->Y2 <= outer->Y2); } -RND_INLINE rnd_box_t rnd_clip_box(const rnd_box_t * box, const rnd_box_t * clipbox) +RND_INLINE rnd_rnd_box_t rnd_clip_box(const rnd_rnd_box_t * box, const rnd_rnd_box_t * clipbox) { - rnd_box_t r; + rnd_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_box_t rnd_shrink_box(const rnd_box_t * box, rnd_coord_t amount) +RND_INLINE rnd_rnd_box_t rnd_shrink_box(const rnd_rnd_box_t * box, rnd_coord_t amount) { - rnd_box_t r = *box; + rnd_rnd_box_t r = *box; r.X1 += amount; r.Y1 += amount; r.X2 -= amount; @@ -184,15 +184,15 @@ return r; } -RND_INLINE rnd_box_t rnd_bloat_box(const rnd_box_t * box, rnd_coord_t amount) +RND_INLINE rnd_rnd_box_t rnd_bloat_box(const rnd_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_box_t rnd_box_center(const rnd_box_t * box) +RND_INLINE rnd_rnd_box_t rnd_box_center(const rnd_rnd_box_t * box) { - rnd_box_t r; + rnd_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_box_t rnd_box_corner(const rnd_box_t * box) +RND_INLINE rnd_rnd_box_t rnd_box_corner(const rnd_rnd_box_t * box) { - rnd_box_t r; + rnd_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_box_t rnd_point_box(rnd_coord_t X, rnd_coord_t Y) +RND_INLINE rnd_rnd_box_t rnd_point_box(rnd_coord_t X, rnd_coord_t Y) { - rnd_box_t r; + rnd_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_box_t * r) +RND_INLINE void rnd_close_box(rnd_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_box_t * b) +RND_INLINE double rnd_dist2_to_box(const rnd_cheap_point_t * p, const rnd_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_box_t *dst, const rnd_box_t *src) +RND_INLINE void rnd_box_bump_box(rnd_rnd_box_t *dst, const rnd_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_box_t *dst, rnd_coord_t x, rnd_coord_t y) +RND_INLINE void rnd_box_bump_point(rnd_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_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void rnd_box_rotate90(rnd_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_box_t *box, double xfactor, double yfactor); +void rnd_box_enlarge(rnd_rnd_box_t *box, double xfactor, double yfactor); #endif Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 30969) +++ trunk/src/librnd/core/conf.c (revision 30970) @@ -512,7 +512,7 @@ long l; int base = 10; double d; - const pcb_unit_t *u; + const rnd_unit_t *u; switch(type) { case RND_CFN_STRING: Index: trunk/src/librnd/core/conf.h =================================================================== --- trunk/src/librnd/core/conf.h (revision 30969) +++ trunk/src/librnd/core/conf.h (revision 30970) @@ -59,7 +59,7 @@ typedef long RND_CFT_INTEGER; typedef double RND_CFT_REAL; typedef rnd_coord_t RND_CFT_COORD; -typedef pcb_unit_t * RND_CFT_UNIT; +typedef rnd_unit_t * RND_CFT_UNIT; typedef rnd_color_t RND_CFT_COLOR; typedef rnd_conflist_t RND_CFT_LIST; typedef rnd_conflist_t RND_CFT_HLIST; @@ -83,7 +83,7 @@ long *integer; double *real; rnd_coord_t *coord; - const pcb_unit_t **unit; + const rnd_unit_t **unit; rnd_color_t *color; rnd_conflist_t *list; void *any; Index: trunk/src/librnd/core/conf_act.c =================================================================== --- trunk/src/librnd/core/conf_act.c (revision 30969) +++ trunk/src/librnd/core/conf_act.c (revision 30970) @@ -336,7 +336,7 @@ /* DOC: setunits.html */ static fgw_error_t pcb_act_SetUnits(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - const pcb_unit_t *new_unit; + const rnd_unit_t *new_unit; const char *name; RND_PCB_ACT_CONVARG(1, FGW_STR, setunits, name = argv[1].val.str); Index: trunk/src/librnd/core/event.c =================================================================== --- trunk/src/librnd/core/event.c (revision 30969) +++ trunk/src/librnd/core/event.c (revision 30970) @@ -233,7 +233,7 @@ case 'a': a->type = RND_EVARG_ANGLE; fa->type = FGW_DOUBLE; - fa->val.nat_double = a->d.a = va_arg(ap, pcb_angle_t); + fa->val.nat_double = a->d.a = va_arg(ap, rnd_angle_t); break; default: a->type = RND_EVARG_INT; Index: trunk/src/librnd/core/event.h =================================================================== --- trunk/src/librnd/core/event.h (revision 30969) +++ trunk/src/librnd/core/event.h (revision 30970) @@ -95,7 +95,7 @@ const char *s; void *p; rnd_coord_t c; - pcb_angle_t a; + rnd_angle_t a; } d; }; Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 30969) +++ trunk/src/librnd/core/global_typedefs.h (revision 30970) @@ -29,27 +29,27 @@ #define RND_GLOBAL_TYPEDEFS_H #include -struct pcb_box_s { /* a bounding box */ +struct rnd_rnd_box_s { /* a bounding box */ rnd_coord_t X1, Y1; /* upper left */ rnd_coord_t X2, Y2; /* and lower right corner */ }; -typedef struct pcb_hidlib_s rnd_hidlib_t; +typedef struct rnd_hidlib_s rnd_hidlib_t; /* typedef ... rnd_coord_t; pcb base unit, typedef'd in config.h */ -typedef double pcb_angle_t; /* degrees */ -typedef struct pcb_unit_s pcb_unit_t; +typedef double rnd_angle_t; /* degrees */ +typedef struct rnd_unit_s rnd_unit_t; -typedef struct pcb_point_s pcb_point_t; -typedef struct pcb_box_s rnd_box_t; -typedef struct rnd_box_list_s rnd_box_list_t; -typedef struct pcb_polyarea_s pcb_polyarea_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_polyarea_s rnd_polyarea_t; -typedef struct pcb_rtree_s pcb_rtree_t; -typedef struct pcb_rtree_it_s pcb_rtree_it_t; +typedef struct rnd_rtree_s rnd_rtree_t; +typedef struct rnd_rtree_it_s rnd_rtree_it_t; -typedef struct pcb_hid_cfg_s pcb_hid_cfg_t; +typedef struct rnd_hid_cfg_s rnd_hid_cfg_t; typedef unsigned int rnd_cardinal_t; typedef struct rnd_color_s rnd_color_t; Index: trunk/src/librnd/core/grid.h =================================================================== --- trunk/src/librnd/core/grid.h (revision 30969) +++ trunk/src/librnd/core/grid.h (revision 30970) @@ -44,7 +44,7 @@ char *name; rnd_coord_t size; rnd_coord_t ox, oy; - const pcb_unit_t *unit; /* force switching to unit if not NULL */ + const rnd_unit_t *unit; /* force switching to unit if not NULL */ } pcb_grid_t; /* Returns the nearest grid-point to the given coord x */ Index: trunk/src/librnd/core/gui_act.c =================================================================== --- trunk/src/librnd/core/gui_act.c (revision 30969) +++ trunk/src/librnd/core/gui_act.c (revision 30970) @@ -149,7 +149,7 @@ double dx, dy; rnd_coord_t view_width, view_height; const char *a1, *a2, *a3, *op; - rnd_box_t vbx; + rnd_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 ((pcb_gui != NULL) && (pcb_gui->view_get != NULL)) { - rnd_box_t viewbox; + rnd_rnd_box_t viewbox; pcb_gui->view_get(pcb_gui, &viewbox); if (pcbhl_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_box_t *bbx = hidlib->tool_snapped_obj_bbox; + rnd_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 30969) +++ trunk/src/librnd/core/hid.h (revision 30970) @@ -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)(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen); + void (*set_drawing_mode)(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_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)(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_box_t *screen); + void (*render_burst)(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen); /*** gc vs. pcb_hid_t *: pcb_core_gc_t contains ->hid, so these calls don't need to get it as first arg. ***/ @@ -306,7 +306,7 @@ given width, whereas "fill" means to fill to a zero-width outline. */ void (*draw_line)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); - void (*draw_arc)(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle); + void (*draw_arc)(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle); void (*draw_rect)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); void (*fill_circle)(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); void (*fill_polygon)(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y); @@ -458,7 +458,7 @@ /* At the moment HIDs load the menu file. Some plugin code, like the toolbar code needs to traverse the menu tree too. This call exposes the HID-internal menu struct */ - pcb_hid_cfg_t *(*get_menu_cfg)(pcb_hid_t *hid); + rnd_hid_cfg_t *(*get_menu_cfg)(pcb_hid_t *hid); /* Update the state of all checkboxed menus whose lihata node cookie matches cookie (or all checkboxed menus globally if cookie @@ -466,7 +466,7 @@ void (*update_menu_checkbox)(pcb_hid_t *hid, const char *cookie); /* Pointer to the hid's configuration - useful for plugins and core wanting to install menus at anchors */ - pcb_hid_cfg_t *hid_cfg; + rnd_hid_cfg_t *hid_cfg; /* Optional: print usage string (if accepts command line arguments) @@ -530,7 +530,7 @@ void (*pan_mode)(pcb_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)(pcb_hid_t *hid, rnd_box_t *viewbox); + void (*view_get)(pcb_hid_t *hid, rnd_rnd_box_t *viewbox); /*** misc GUI ***/ /* Open the command line */ @@ -562,7 +562,7 @@ typedef void (*pcb_hid_expose_cb_t)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); struct pcb_hid_expose_ctx_s { - rnd_box_t view; + rnd_rnd_box_t view; pcb_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_attrib.c =================================================================== --- trunk/src/librnd/core/hid_attrib.c (revision 30969) +++ trunk/src/librnd/core/hid_attrib.c (revision 30970) @@ -138,7 +138,7 @@ if (strcmp((*argv)[0] + arg_ofs, ha->opts[i].name) == 0) { pcb_export_opt_t *a = ha->opts + i; char *ep; - const pcb_unit_t *unit; + const rnd_unit_t *unit; switch (ha->opts[i].type) { case PCB_HATT_LABEL: break; Index: trunk/src/librnd/core/hid_cfg.c =================================================================== --- trunk/src/librnd/core/hid_cfg.c (revision 30969) +++ trunk/src/librnd/core/hid_cfg.c (revision 30970) @@ -129,10 +129,10 @@ return n->data.text.value; } -pcb_hid_cfg_t *pcb_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback) +rnd_hid_cfg_t *pcb_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback) { lht_doc_t *doc; - pcb_hid_cfg_t *hr; + rnd_hid_cfg_t *hr; if (embedded_fallback == NULL) embedded_fallback = pcb_hidlib_default_embedded_menu; @@ -172,7 +172,7 @@ if (doc == NULL) return NULL; - hr = calloc(sizeof(pcb_hid_cfg_t), 1); /* make sure the cache is cleared */ + hr = calloc(sizeof(rnd_hid_cfg_t), 1); /* make sure the cache is cleared */ hr->doc = doc; return hr; @@ -180,7 +180,7 @@ /************* "parsing" **************/ -lht_node_t *pcb_hid_cfg_get_menu_at(pcb_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx) +lht_node_t *pcb_hid_cfg_get_menu_at(rnd_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx) { lht_err_t err; lht_node_t *curr; @@ -254,7 +254,7 @@ return curr; } -lht_node_t *pcb_hid_cfg_get_menu(pcb_hid_cfg_t *hr, const char *menu_path) +lht_node_t *pcb_hid_cfg_get_menu(rnd_hid_cfg_t *hr, const char *menu_path) { return pcb_hid_cfg_get_menu_at(hr, NULL, menu_path, NULL, NULL); } @@ -398,7 +398,7 @@ } } -void pcb_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx) +void pcb_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx) { vtp0_t anchors; Index: trunk/src/librnd/core/hid_cfg.h =================================================================== --- trunk/src/librnd/core/hid_cfg.h (revision 30969) +++ trunk/src/librnd/core/hid_cfg.h (revision 30970) @@ -34,7 +34,7 @@ #include #include -struct pcb_hid_cfg_s { +struct rnd_hid_cfg_s { lht_doc_t *doc; }; @@ -41,7 +41,7 @@ /* Search and load the menu res for hidname; if not found, parse embedded_fallback instead (if it is NULL, use the application default instead; for explicit empty embedded: use ""). Returns NULL on error */ -pcb_hid_cfg_t *pcb_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback); +rnd_hid_cfg_t *pcb_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback); /* Generic, low level lihata loader */ lht_doc_t *pcb_hid_cfg_load_lht(rnd_hidlib_t *hidlib, const char *filename); @@ -50,8 +50,8 @@ /* Generic, low level lihata text value fetch */ const char *pcb_hid_cfg_text_value(lht_doc_t *doc, const char *path); -lht_node_t *pcb_hid_cfg_get_menu(pcb_hid_cfg_t *hr, const char *menu_path); -lht_node_t *pcb_hid_cfg_get_menu_at(pcb_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx); +lht_node_t *pcb_hid_cfg_get_menu(rnd_hid_cfg_t *hr, const char *menu_path); +lht_node_t *pcb_hid_cfg_get_menu_at(rnd_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx); /* Create a new hash node under parent (optional) and create a flat subtree of text nodes from name,value varargs (NULL terminated). This is a shorthand @@ -76,7 +76,7 @@ /* search all instances of an @anchor menu in the currently active GUI and call cb on the lihata node; path has 128 extra bytes available at the end */ -void pcb_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx); +void pcb_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx); /* remove all adjacent anchor menus with matching cookie below anode, the anchor node */ Index: trunk/src/librnd/core/hid_cfg_input.c =================================================================== --- trunk/src/librnd/core/hid_cfg_input.c (revision 30969) +++ trunk/src/librnd/core/hid_cfg_input.c (revision 30970) @@ -120,7 +120,7 @@ /************************** MOUSE ***************************/ -int hid_cfg_mouse_init(pcb_hid_cfg_t *hr, pcb_hid_cfg_mouse_t *mouse) +int hid_cfg_mouse_init(rnd_hid_cfg_t *hr, pcb_hid_cfg_mouse_t *mouse) { lht_node_t *btn, *m; Index: trunk/src/librnd/core/hid_cfg_input.h =================================================================== --- trunk/src/librnd/core/hid_cfg_input.h (revision 30969) +++ trunk/src/librnd/core/hid_cfg_input.h (revision 30970) @@ -38,7 +38,7 @@ htip_t *mouse_mask; } pcb_hid_cfg_mouse_t; -int hid_cfg_mouse_init(pcb_hid_cfg_t *hr, pcb_hid_cfg_mouse_t *mouse); +int hid_cfg_mouse_init(rnd_hid_cfg_t *hr, pcb_hid_cfg_mouse_t *mouse); void hid_cfg_mouse_action(rnd_hidlib_t *hl, pcb_hid_cfg_mouse_t *mouse, pcb_hid_cfg_mod_t button_and_mask, rnd_bool cmd_entry_active); Index: trunk/src/librnd/core/hid_dad.h =================================================================== --- trunk/src/librnd/core/hid_dad.h (revision 30969) +++ trunk/src/librnd/core/hid_dad.h (revision 30970) @@ -113,7 +113,7 @@ struct pcb_hid_preview_s { pcb_hid_attribute_t *attrib; - rnd_box_t initial_view; + rnd_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)(pcb_hid_attribute_t *attrib, void *hid_wdata, const rnd_box_t *view); + void (*hid_zoomto_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, const rnd_rnd_box_t *view); void (*hid_free_cb)(pcb_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_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.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_valid = 1; \ } \ PCB_DAD_ALLOC(table, PCB_HATT_PREVIEW); \ @@ -688,7 +688,7 @@ int __n__, __v__ = pcb_get_n_units(0); \ if (val_ != NULL) { \ for(__n__ = 0; __n__ < __v__; __n__++) { \ - if (&pcb_units[__n__] == (pcb_unit_t *)(val_)) { \ + if (&pcb_units[__n__] == (rnd_unit_t *)(val_)) { \ table[table ## _len - 1].field.lng = __n__; \ break; \ } \ Index: trunk/src/librnd/core/hid_dad_spin.c =================================================================== --- trunk/src/librnd/core/hid_dad_spin.c (revision 30969) +++ trunk/src/librnd/core/hid_dad_spin.c (revision 30970) @@ -110,7 +110,7 @@ static char *gen_str_coord(pcb_hid_dad_spin_t *spin, rnd_coord_t c, char *buf, int buflen) { - const pcb_unit_t *unit; + const rnd_unit_t *unit; if (spin->unit != NULL) unit = spin->unit; else @@ -133,7 +133,7 @@ { pcb_hid_attr_val_t hv; spin_unit_t *su = (spin_unit_t *)caller_data; - const pcb_unit_t *unit; + const rnd_unit_t *unit; int unum = su->dlg[su->wunit].val.lng; int can_glob = su->wglob > 0; int is_globbing = &su->dlg[su->wglob] == attr; @@ -167,7 +167,7 @@ { pcb_hid_dad_buttons_t clbtn[] = {{"Cancel", -1}, {"ok", 0}, {NULL, 0}}; spin_unit_t ctx; - const pcb_unit_t *def_unit; + const rnd_unit_t *def_unit; int dlgfail; memset(&ctx, 0, sizeof(ctx)); @@ -254,7 +254,7 @@ static double get_step(pcb_hid_dad_spin_t *spin, pcb_hid_attribute_t *end, pcb_hid_attribute_t *str) { double v, step; - const pcb_unit_t *unit; + const rnd_unit_t *unit; if (spin->step > 0) return spin->step; @@ -371,7 +371,7 @@ long l; double d; rnd_bool succ, absolute; - const pcb_unit_t *unit; + const rnd_unit_t *unit; if (spin->set_writeback_lock) return; @@ -422,7 +422,7 @@ int changed = 0; double d; rnd_bool succ, absolute; - const pcb_unit_t *unit; + const rnd_unit_t *unit; if (spin->set_writeback_lock) return; Index: trunk/src/librnd/core/hid_dad_spin.h =================================================================== --- trunk/src/librnd/core/hid_dad_spin.h (revision 30969) +++ trunk/src/librnd/core/hid_dad_spin.h (revision 30970) @@ -39,7 +39,7 @@ unsigned vmax_valid:1; unsigned no_unit_chg:1; int wall, wstr, wup, wdown, wunit, wwarn; - const pcb_unit_t *unit; /* for PCB_DAD_SPIN_COORD and PCB_DAD_SPIN_FREQ only: current unit */ + const rnd_unit_t *unit; /* for PCB_DAD_SPIN_COORD and PCB_DAD_SPIN_FREQ only: current unit */ pcb_family_t unit_family; pcb_hid_attribute_t **attrs; void **hid_ctx; Index: trunk/src/librnd/core/hid_dad_unit.c =================================================================== --- trunk/src/librnd/core/hid_dad_unit.c (revision 30969) +++ trunk/src/librnd/core/hid_dad_unit.c (revision 30970) @@ -39,7 +39,7 @@ pcb_hid_attribute_t *enu = attr; pcb_hid_attribute_t *end = attr - unit->wenum + unit->cmp.wend; const char **vals = enu->wdata; - const pcb_unit_t *u = get_unit_by_suffix(vals[enu->val.lng]); + const rnd_unit_t *u = get_unit_by_suffix(vals[enu->val.lng]); int unit_id = u == NULL ? -1 : u - pcb_units; end->val.lng = unit_id; @@ -66,7 +66,7 @@ void pcb_dad_unit_set_val_ptr(pcb_hid_attribute_t *end, void *val_) { - const pcb_unit_t *val = val_; + const rnd_unit_t *val = val_; int __n__, __v__ = pcb_get_n_units(1); if (val != NULL) { for(__n__ = 0; __n__ < __v__; __n__++) { Index: trunk/src/librnd/core/hid_nogui.c =================================================================== --- trunk/src/librnd/core/hid_nogui.c (revision 30969) +++ trunk/src/librnd/core/hid_nogui.c (revision 30970) @@ -100,12 +100,12 @@ { } -static void nogui_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void nogui_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { CRASH("set_drawing_mode"); } -static void nogui_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_box_t *screen) +static void nogui_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { /* the HID may decide to ignore this hook */ } @@ -139,7 +139,7 @@ CRASH("draw_line"); } -static void nogui_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t end_angle) +static void nogui_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t end_angle) { CRASH("draw_arc"); } Index: trunk/src/librnd/core/hidlib.h =================================================================== --- trunk/src/librnd/core/hidlib.h (revision 30969) +++ trunk/src/librnd/core/hidlib.h (revision 30970) @@ -35,7 +35,7 @@ unsigned user_placed:1; /* if 1, the user has explicitly placed the mark - do not move it */ } pcb_mark_t; -struct pcb_hidlib_s { +struct rnd_hidlib_s { rnd_coord_t grid; /* grid resolution */ rnd_coord_t grid_ox, grid_oy; /* grid offset */ rnd_coord_t size_x, size_y; /* drawing area extents (or board dimensions) */ @@ -47,7 +47,7 @@ unsigned int tool_hit; /* optional: type of a hit object of PCB_MOVE_TYPES; 0 if there was no PCB_MOVE_TYPES object under the crosshair */ unsigned int tool_click:1; /* optional: true if clicked somewhere with the arrow tool */ pcb_mark_t tool_grabbed; /* point where a drag&drop operation started */ - rnd_box_t *tool_snapped_obj_bbox; + rnd_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/core/hidlib_conf.c =================================================================== --- trunk/src/librnd/core/hidlib_conf.c (revision 30969) +++ trunk/src/librnd/core/hidlib_conf.c (revision 30970) @@ -64,7 +64,7 @@ } } -void pcb_hidlib_set_unit(rnd_hidlib_t *hidlib, const pcb_unit_t *new_unit) +void pcb_hidlib_set_unit(rnd_hidlib_t *hidlib, const rnd_unit_t *new_unit) { if (new_unit != NULL && new_unit->allow != PCB_UNIT_NO_PRINT) rnd_conf_set(RND_CFR_DESIGN, "editor/grid_unit", -1, new_unit->suffix, RND_POL_OVERWRITE); Index: trunk/src/librnd/core/hidlib_conf.h =================================================================== --- trunk/src/librnd/core/hidlib_conf.h (revision 30969) +++ trunk/src/librnd/core/hidlib_conf.h (revision 30970) @@ -113,7 +113,7 @@ /* sets cursor grid with respect to grid spacing, offset and unit values */ void pcb_hidlib_set_grid(rnd_hidlib_t *hidlib, rnd_coord_t Grid, rnd_bool align, rnd_coord_t ox, rnd_coord_t oy); -void pcb_hidlib_set_unit(rnd_hidlib_t *hidlib, const pcb_unit_t *new_unit); +void pcb_hidlib_set_unit(rnd_hidlib_t *hidlib, const rnd_unit_t *new_unit); #endif Index: trunk/src/librnd/core/misc_util.c =================================================================== --- trunk/src/librnd/core/misc_util.c (revision 30969) +++ trunk/src/librnd/core/misc_util.c (revision 30970) @@ -65,7 +65,7 @@ return pcb_get_value_ex(val, units, absolute, NULL, "cmil", success); } -rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const pcb_unit_t **unit_out) +rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const rnd_unit_t **unit_out) { int ul, ulo = 0; const char *start; @@ -87,7 +87,7 @@ ul += ulo; if ((ul > 0) && (val[ul] != '\0')) { const char *unit = val+ul; - const pcb_unit_t *u; + const rnd_unit_t *u; while(isspace(*unit)) unit++; if (*unit == '\0') @@ -155,7 +155,7 @@ if (units && *units) { int i, unit_ok = 0; - const pcb_unit_t *unit = get_unit_struct(units); + const rnd_unit_t *unit = get_unit_struct(units); if (unit != NULL) { value = pcb_unit_to_coord(unit, value); scaled = 1; @@ -179,7 +179,7 @@ /* Apply default unit */ if (!scaled && default_unit && *default_unit) { int i; - const pcb_unit_t *unit = get_unit_struct(default_unit); + const rnd_unit_t *unit = get_unit_struct(default_unit); if (extra_units) for (i = 0; *extra_units[i].suffix; ++i) if (strcmp(extra_units[i].suffix, default_unit) == 0) { Index: trunk/src/librnd/core/misc_util.h =================================================================== --- trunk/src/librnd/core/misc_util.h (revision 30969) +++ trunk/src/librnd/core/misc_util.h (revision 30970) @@ -54,7 +54,7 @@ /* Convert a string of value+unit to coords and unit struct. Absolute is the same as above; if unit_strict is non-zero, require full unit name. Returns whether the conversion is succesful. */ -rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const pcb_unit_t **unit_out); +rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const rnd_unit_t **unit_out); char *pcb_concat(const char *first, ...); /* end with NULL */ int pcb_mem_any_set(unsigned char *ptr, int bytes); Index: trunk/src/librnd/core/pcb-printf.c =================================================================== --- trunk/src/librnd/core/pcb-printf.c (revision 30969) +++ trunk/src/librnd/core/pcb-printf.c (revision 30970) @@ -275,7 +275,7 @@ enum pcb_allow_e up; /* persistent, calculated once */ - const pcb_unit_t *base_unit, *down_unit, *up_unit; + const rnd_unit_t *base_unit, *down_unit, *up_unit; } human_coord_t; /* Conversion preference table */ @@ -285,7 +285,7 @@ }; #define NUM_HUMAN_COORD (sizeof(human_coord) / sizeof(human_coord[0])) -static inline int try_human_coord(rnd_coord_t coord, const pcb_unit_t *unit, double down_limit, double up_limit, int score_factor, double *value, unsigned int *best, const char **suffix) +static inline int try_human_coord(rnd_coord_t coord, const rnd_unit_t *unit, double down_limit, double up_limit, int score_factor, double *value, unsigned int *best, const char **suffix) { double v, frac, save; long int digs, zeros; @@ -699,7 +699,7 @@ if (gds_append_len(&spec, ".06f", 4) != 0) goto err; if (suffix == PCB_UNIT_SUFFIX) if (gds_append_len(&spec, " deg", 4) != 0) goto err; - tmplen = sprintf(tmp, spec.array, (double) va_arg(args, pcb_angle_t)); + tmplen = sprintf(tmp, spec.array, (double) va_arg(args, rnd_angle_t)); if (gds_append_len(string, tmp, tmplen) != 0) goto err; break; case 'A': @@ -708,7 +708,7 @@ if (gds_append_len(&spec, ".0f", 3) != 0) goto err; /* if (suffix == PCB_UNIT_SUFFIX) if (gds_append_len(&spec, " deg", 4) != 0) goto err;*/ - tmplen = sprintf(tmp, spec.array, 10*((double) va_arg(args, pcb_angle_t))); /* kicad legacy needs decidegrees */ + tmplen = sprintf(tmp, spec.array, 10*((double) va_arg(args, rnd_angle_t))); /* kicad legacy needs decidegrees */ if (gds_append_len(string, tmp, tmplen) != 0) goto err; break; case 'f': Index: trunk/src/librnd/core/pixmap.h =================================================================== --- trunk/src/librnd/core/pixmap.h (revision 30969) +++ trunk/src/librnd/core/pixmap.h (revision 30970) @@ -54,7 +54,7 @@ void *hid_data; /* HID's version of the pixmap */ /* transformation info */ - pcb_angle_t tr_rot; /* rotation angle (0 if not transformed) */ + rnd_angle_t tr_rot; /* rotation angle (0 if not transformed) */ double tr_xscale; double tr_yscale; unsigned tr_xmirror:1; /* whether the pixmap is mirrored along the x axis (vertical mirror) */ Index: trunk/src/librnd/core/unit.c =================================================================== --- trunk/src/librnd/core/unit.c (revision 30969) +++ trunk/src/librnd/core/unit.c (revision 30970) @@ -40,7 +40,7 @@ /* Should be kept in order of smallest scale_factor to largest -- the code uses this ordering for finding the best scale to use for a group of units */ -pcb_unit_t pcb_units[] = { +rnd_unit_t pcb_units[] = { {"km", 'k', 0.000001, PCB_UNIT_METRIC, PCB_UNIT_ALLOW_KM, 5}, {"m", 'f', 0.001, PCB_UNIT_METRIC, PCB_UNIT_ALLOW_M, 5}, {"cm", 'e', 0.1, PCB_UNIT_METRIC, PCB_UNIT_ALLOW_CM, 5}, @@ -73,7 +73,7 @@ pcb_units[i].index = i; } -const pcb_unit_t *get_unit_struct_(const char *suffix, int strict) +const rnd_unit_t *get_unit_struct_(const char *suffix, int strict) { int i; int s_len = 0; @@ -110,13 +110,13 @@ return NULL; } -const pcb_unit_t *get_unit_struct(const char *suffix) +const rnd_unit_t *get_unit_struct(const char *suffix) { return get_unit_struct_(suffix, 0); } -const pcb_unit_t *get_unit_struct_by_allow(enum pcb_allow_e allow) +const rnd_unit_t *get_unit_struct_by_allow(enum pcb_allow_e allow) { int i; for (i = 0; i < N_UNITS; ++i) @@ -126,7 +126,7 @@ return NULL; } -const pcb_unit_t *get_unit_by_idx(int idx) +const rnd_unit_t *get_unit_by_idx(int idx) { if ((idx < 0) || (idx >= N_UNITS)) return NULL; @@ -133,7 +133,7 @@ return pcb_units + idx; } -const pcb_unit_t *get_unit_by_suffix(const char *suffix) +const rnd_unit_t *get_unit_by_suffix(const char *suffix) { int i; for (i = 0; i < N_UNITS; ++i) @@ -152,7 +152,7 @@ return num_base; } -double pcb_coord_to_unit(const pcb_unit_t *unit, rnd_coord_t x) +double pcb_coord_to_unit(const rnd_unit_t *unit, rnd_coord_t x) { double base; if (unit == NULL) @@ -165,7 +165,7 @@ return x * unit->scale_factor * base; } -rnd_coord_t pcb_unit_to_coord(const pcb_unit_t *unit, double x) +rnd_coord_t pcb_unit_to_coord(const rnd_unit_t *unit, double x) { double base, res; @@ -194,12 +194,12 @@ return res; } -double pcb_unit_to_factor(const pcb_unit_t *unit) +double pcb_unit_to_factor(const rnd_unit_t *unit) { return 1.0 / pcb_coord_to_unit(unit, 1); } -pcb_angle_t pcb_normalize_angle(pcb_angle_t a) +rnd_angle_t pcb_normalize_angle(rnd_angle_t a) { while (a < 0) a += 360.0; Index: trunk/src/librnd/core/unit.h =================================================================== --- trunk/src/librnd/core/unit.h (revision 30969) +++ trunk/src/librnd/core/unit.h (revision 30970) @@ -83,7 +83,7 @@ enum pcb_suffix_e { PCB_UNIT_NO_SUFFIX, PCB_UNIT_SUFFIX, PCB_UNIT_FILE_MODE }; -struct pcb_unit_s { +struct rnd_unit_s { const char *suffix; char printf_code; /* 0 means the unit is an alias and should not be used in printf */ double scale_factor; @@ -95,15 +95,15 @@ int index; /* Index into Unit[] list */ }; -extern pcb_unit_t pcb_units[]; +extern rnd_unit_t pcb_units[]; /* Look up a given suffix in the units array. Pluralized units are supported. The _ version allows strict (full name match) lookup if strict iz non-zero. */ -const pcb_unit_t *get_unit_struct(const char *suffix); -const pcb_unit_t *get_unit_struct_(const char *suffix, int strict); +const rnd_unit_t *get_unit_struct(const char *suffix); +const rnd_unit_t *get_unit_struct_(const char *suffix, int strict); /* Return the furst unit that matches allow */ -const pcb_unit_t *get_unit_struct_by_allow(enum pcb_allow_e allow); +const rnd_unit_t *get_unit_struct_by_allow(enum pcb_allow_e allow); /* Return the list of units and number of units (use only when listing units); Normally returns basic units only (aliases_too==0); if aliases_too is @@ -111,22 +111,22 @@ int pcb_get_n_units(int aliases_too); /* Return the idxth unit or NULL (bounds check) */ -const pcb_unit_t *get_unit_by_idx(int idx); +const rnd_unit_t *get_unit_by_idx(int idx); /* Return the unit with (case sensitive) matching suffix */ -const pcb_unit_t *get_unit_by_suffix(const char *suffix); +const rnd_unit_t *get_unit_by_suffix(const char *suffix); /* Convert x to the given unit */ -double pcb_coord_to_unit(const pcb_unit_t *unit, rnd_coord_t x); +double pcb_coord_to_unit(const rnd_unit_t *unit, rnd_coord_t x); /* Return how many PCB-internal-Coord-unit a unit translates to */ -double pcb_unit_to_factor(const pcb_unit_t *unit); +double pcb_unit_to_factor(const rnd_unit_t *unit); /* Convert a given unit to pcb coords; clamp at the end of the ranges */ -rnd_coord_t pcb_unit_to_coord(const pcb_unit_t *unit, double x); +rnd_coord_t pcb_unit_to_coord(const rnd_unit_t *unit, double x); /* Bring an angle into [0, 360) range */ -pcb_angle_t pcb_normalize_angle(pcb_angle_t a); +rnd_angle_t pcb_normalize_angle(rnd_angle_t a); /* Initialize non-static unit data: assigns each unit its index for Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30969) +++ trunk/src/librnd/pcb_compat.h (revision 30970) @@ -78,8 +78,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_box_list_s -#define pcb_box_list_t rnd_box_list_t +#define pcb_box_list_s rnd_rnd_box_list_s +#define pcb_box_list_t rnd_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 @@ -114,7 +114,7 @@ #define PCB_SW RND_SW #define PCB_NW RND_NW #define PCB_ANY_DIR RND_ANY_DIR -#define pcb_box_t rnd_box_t +#define rnd_rnd_box_t rnd_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 @@ -451,3 +451,42 @@ #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_hidlib_s rnd_hidlib_s +#define pcb_angle_t rnd_angle_t +#define pcb_unit_s rnd_unit_s +#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 pcb_polyarea_s rnd_polyarea_s +#define pcb_polyarea_t rnd_polyarea_t +#define pcb_rtree_s rnd_rtree_s +#define pcb_rtree_t rnd_rtree_t +#define pcb_rtree_it_s rnd_rtree_it_s +#define pcb_rtree_it_t rnd_rtree_it_t +#define pcb_hid_cfg_s rnd_hid_cfg_s +#define pcb_hid_cfg_t rnd_hid_cfg_t +#define pcb_rtree_cardinal_t rnd_rtree_cardinal_t +#define pcb_rtree_coord_t rnd_rtree_coord_t +#define pcb_rtree_next rnd_rtree_next +#define pcb_rtree_first rnd_rtree_first +#define pcb_rtree_box_t rnd_rtree_box_t +#define pcb_rtree_all_next rnd_rtree_all_next +#define pcb_rtree_all_first rnd_rtree_all_first +#define pcb_rtree_dump_text rnd_rtree_dump_text +#define pcb_rtree_is_box_empty rnd_rtree_is_box_empty +#define pcb_rtree_search_any rnd_rtree_search_any +#define pcb_rtree_init rnd_rtree_init +#define pcb_rtree_uninit rnd_rtree_uninit +#define pcb_rtree_insert rnd_rtree_insert +#define pcb_rtree_delete rnd_rtree_delete +#define pcb_rtree_dir_t rnd_rtree_dir_t +#define PCB_RTREE_H RND_RTREE_H +#define pcb_RTREE_DIR_STOP rnd_RTREE_DIR_STOP +#define pcb_RTREE_DIR_FOUND rnd_RTREE_DIR_FOUND +#define pcb_rtree_search_obj rnd_rtree_search_obj Index: trunk/src/librnd/poly/offset.c =================================================================== --- trunk/src/librnd/poly/offset.c (revision 30969) +++ trunk/src/librnd/poly/offset.c (revision 30970) @@ -323,8 +323,8 @@ /* case #1: a point in dst is too close to a line in src */ v = dst->head; do { - pcb_rtree_it_t it; - pcb_rtree_box_t pb; + rnd_rtree_it_t it; + rnd_rtree_box_t pb; void *seg; int inside = 0; @@ -335,7 +335,7 @@ if (!negoffs) inside = pcb_poly_contour_inside(src, v->point); - for(seg = pcb_rtree_first(&it, src->tree, &pb); seg != NULL; seg = pcb_rtree_next(&it)) { + for(seg = rnd_rtree_first(&it, src->tree, &pb); seg != NULL; seg = rnd_rtree_next(&it)) { rnd_coord_t x1, y1, x2, y2; double dist, tune, prjx, prjy, dx, dy, ax, ay, dotp, prevx, prevy, prevl; Index: trunk/src/librnd/poly/polyarea.c =================================================================== --- trunk/src/librnd/poly/polyarea.c (revision 30969) +++ trunk/src/librnd/poly/polyarea.c (revision 30970) @@ -156,9 +156,9 @@ while ((v = v->next) != s); } -static void poly_dump(pcb_polyarea_t * p) +static void poly_dump(rnd_polyarea_t * p) { - pcb_polyarea_t *f = p; + rnd_polyarea_t *f = p; pcb_pline_t *pl; do { @@ -467,7 +467,7 @@ /* some structures for handling segment intersections using the rtrees */ typedef struct seg { - rnd_box_t box; + rnd_rnd_box_t box; pcb_vnode_t *v; pcb_pline_t *p; int intersected; @@ -483,7 +483,7 @@ typedef struct info { double m, b; - pcb_rtree_t *tree; + rnd_rtree_t *tree; pcb_vnode_t *v; struct seg *s; jmp_buf *env, sego, *touch; @@ -506,7 +506,7 @@ * This replaces the segment in the tree with the two new segments after * a vertex has been added */ -static int adjust_tree(pcb_rtree_t * tree, struct seg *s) +static int adjust_tree(rnd_rtree_t * tree, struct seg *s) { struct seg *q; @@ -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; - pcb_r_insert_entry(tree, (const rnd_box_t *) q); + pcb_r_insert_entry(tree, (const rnd_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; - pcb_r_insert_entry(tree, (const rnd_box_t *) q); - pcb_r_delete_entry(tree, (const rnd_box_t *) s); + pcb_r_insert_entry(tree, (const rnd_rnd_box_t *) q); + pcb_r_delete_entry(tree, (const rnd_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 pcb_r_dir_t seg_in_region(const rnd_box_t * b, void *cl) +static pcb_r_dir_t seg_in_region(const rnd_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 pcb_r_dir_t seg_in_seg(const rnd_box_t * b, void *cl) +static pcb_r_dir_t seg_in_seg(const rnd_rnd_box_t * b, void *cl) { struct info *i = (struct info *) cl; struct seg *s = (struct seg *) b; @@ -634,7 +634,7 @@ { struct seg *s; pcb_vnode_t *bv; - pcb_rtree_t *ans = pcb_r_create_tree(); + rnd_rtree_t *ans = pcb_r_create_tree(); bv = pb->head; do { s = (seg *) malloc(sizeof(struct seg)); @@ -657,13 +657,13 @@ } s->v = bv; s->p = pb; - pcb_r_insert_entry(ans, (const rnd_box_t *) s); + pcb_r_insert_entry(ans, (const rnd_rnd_box_t *) s); } while ((bv = bv->next) != pb->head); return (void *) ans; } -static pcb_r_dir_t get_seg(const rnd_box_t * b, void *cl) +static pcb_r_dir_t get_seg(const rnd_rnd_box_t * b, void *cl) { struct info *i = (struct info *) cl; struct seg *s = (struct seg *) b; @@ -692,7 +692,7 @@ * */ -static pcb_r_dir_t contour_bounds_touch(const rnd_box_t * b, void *cl) +static pcb_r_dir_t contour_bounds_touch(const rnd_rnd_box_t * b, void *cl) { contour_info *c_info = (contour_info *) cl; pcb_pline_t *pa = c_info->pa; @@ -701,7 +701,7 @@ pcb_pline_t *looping_over; pcb_vnode_t *av; /* node iterators */ struct info info; - rnd_box_t box; + rnd_rnd_box_t box; jmp_buf restart; /* Have seg_in_seg return to our desired location if it touches */ @@ -768,9 +768,9 @@ return PCB_R_DIR_NOT_FOUND; } -static int intersect_impl(jmp_buf * jb, pcb_polyarea_t * b, pcb_polyarea_t * a, int add) +static int intersect_impl(jmp_buf * jb, rnd_polyarea_t * b, rnd_polyarea_t * a, int add) { - pcb_polyarea_t *t; + rnd_polyarea_t *t; pcb_pline_t *pa; contour_info c_info; int need_restart = 0; @@ -787,8 +787,8 @@ a = t; } - for (pa = a->contours; pa; pa = pa->next) { /* Loop over the contours of pcb_polyarea_t "a" */ - rnd_box_t sb; + for (pa = a->contours; pa; pa = pa->next) { /* Loop over the contours of rnd_polyarea_t "a" */ + rnd_rnd_box_t sb; jmp_buf out; int retval; @@ -840,7 +840,7 @@ return need_restart; } -static int intersect(jmp_buf * jb, pcb_polyarea_t * b, pcb_polyarea_t * a, int add) +static int intersect(jmp_buf * jb, rnd_polyarea_t * b, rnd_polyarea_t * a, int add) { int call_count = 1; while (intersect_impl(jb, b, a, add)) @@ -848,9 +848,9 @@ return 0; } -static void M_pcb_polyarea_t_intersect(jmp_buf * e, pcb_polyarea_t * afst, pcb_polyarea_t * bfst, int add) +static void M_pcb_polyarea_t_intersect(jmp_buf * e, rnd_polyarea_t * afst, rnd_polyarea_t * bfst, int add) { - pcb_polyarea_t *a = afst, *b = bfst; + rnd_polyarea_t *a = afst, *b = bfst; pcb_pline_t *curcA, *curcB; pcb_cvc_list_t *the_list = NULL; @@ -894,7 +894,7 @@ /*****************************************************************/ /* Routines for making labels */ -static pcb_r_dir_t count_contours_i_am_inside(const rnd_box_t * b, void *cl) +static pcb_r_dir_t count_contours_i_am_inside(const rnd_rnd_box_t * b, void *cl) { pcb_pline_t *me = (pcb_pline_t *) cl; pcb_pline_t *check = (pcb_pline_t *) b; @@ -906,9 +906,9 @@ /* cntr_in_M_pcb_polyarea_t returns poly is inside outfst ? pcb_true : pcb_false */ -static int cntr_in_M_pcb_polyarea_t(pcb_pline_t * poly, pcb_polyarea_t * outfst, rnd_bool test) +static int cntr_in_M_pcb_polyarea_t(pcb_pline_t * poly, rnd_polyarea_t * outfst, rnd_bool test) { - pcb_polyarea_t *outer = outfst; + rnd_polyarea_t *outer = outfst; pcb_heap_t *heap; assert(poly != NULL); @@ -929,9 +929,9 @@ if (pcb_heap_is_empty(heap)) break; - outer = (pcb_polyarea_t *) pcb_heap_remove_smallest(heap); + outer = (rnd_polyarea_t *) pcb_heap_remove_smallest(heap); - pcb_r_search(outer->contour_tree, (rnd_box_t *) poly, NULL, count_contours_i_am_inside, poly, &cnt); + pcb_r_search(outer->contour_tree, (rnd_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; @@ -1024,7 +1024,7 @@ return pcb_false; } /* label_contour */ -static rnd_bool cntr_label_pcb_polyarea_t(pcb_pline_t * poly, pcb_polyarea_t * ppl, rnd_bool test) +static rnd_bool cntr_label_pcb_polyarea_t(pcb_pline_t * poly, rnd_polyarea_t * ppl, rnd_bool test) { assert(ppl != NULL && ppl->contours != NULL); if (poly->Flags.status == ISECTED) { @@ -1043,7 +1043,7 @@ return pcb_false; } /* cntr_label_pcb_polyarea_t */ -static rnd_bool M_pcb_polyarea_t_label_separated(pcb_pline_t * afst, pcb_polyarea_t * b, rnd_bool touch) +static rnd_bool M_pcb_polyarea_t_label_separated(pcb_pline_t * afst, rnd_polyarea_t * b, rnd_bool touch) { pcb_pline_t *curc = afst; @@ -1054,9 +1054,9 @@ return pcb_false; } -static rnd_bool M_pcb_polyarea_t_label(pcb_polyarea_t * afst, pcb_polyarea_t * b, rnd_bool touch) +static rnd_bool M_pcb_polyarea_t_label(rnd_polyarea_t * afst, rnd_polyarea_t * b, rnd_bool touch) { - pcb_polyarea_t *a = afst; + rnd_polyarea_t *a = afst; pcb_pline_t *curc; assert(a != NULL); @@ -1074,17 +1074,17 @@ /****************************************************************/ /* routines for temporary storing resulting contours */ -static void InsCntr(jmp_buf * e, pcb_pline_t * c, pcb_polyarea_t ** dst) +static void InsCntr(jmp_buf * e, pcb_pline_t * c, rnd_polyarea_t ** dst) { - pcb_polyarea_t *newp; + rnd_polyarea_t *newp; if (*dst == NULL) { - MemGet(*dst, pcb_polyarea_t); + MemGet(*dst, rnd_polyarea_t); (*dst)->f = (*dst)->b = *dst; newp = *dst; } else { - MemGet(newp, pcb_polyarea_t); + MemGet(newp, rnd_polyarea_t); newp->f = *dst; newp->b = (*dst)->b; newp->f->b = newp->b->f = newp; @@ -1091,13 +1091,13 @@ } newp->contours = c; newp->contour_tree = pcb_r_create_tree(); - pcb_r_insert_entry(newp->contour_tree, (rnd_box_t *) c); + pcb_r_insert_entry(newp->contour_tree, (rnd_rnd_box_t *) c); c->next = NULL; } /* InsCntr */ static void -PutContour(jmp_buf * e, pcb_pline_t * cntr, pcb_polyarea_t ** contours, pcb_pline_t ** holes, - pcb_polyarea_t * owner, pcb_polyarea_t * parent, pcb_pline_t * parent_contour) +PutContour(jmp_buf * e, pcb_pline_t * cntr, rnd_polyarea_t ** contours, pcb_pline_t ** holes, + rnd_polyarea_t * owner, rnd_polyarea_t * parent, pcb_pline_t * parent_contour) { assert(cntr != NULL); assert(cntr->Count > 2); @@ -1105,7 +1105,7 @@ if (cntr->Flags.orient == PCB_PLF_DIR) { if (owner != NULL) - pcb_r_delete_entry(owner->contour_tree, (rnd_box_t *) cntr); + pcb_r_delete_entry(owner->contour_tree, (rnd_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) - pcb_r_delete_entry(owner->contour_tree, (rnd_box_t *) cntr); - pcb_r_insert_entry(parent->contour_tree, (rnd_box_t *) cntr); + pcb_r_delete_entry(owner->contour_tree, (rnd_rnd_box_t *) cntr); + pcb_r_insert_entry(parent->contour_tree, (rnd_rnd_box_t *) cntr); } } else { @@ -1126,12 +1126,12 @@ /* We don't insert the holes into an r-tree, * they just form a linked list */ if (owner != NULL) - pcb_r_delete_entry(owner->contour_tree, (rnd_box_t *) cntr); + pcb_r_delete_entry(owner->contour_tree, (rnd_rnd_box_t *) cntr); } } } /* PutContour */ -static inline void remove_contour(pcb_polyarea_t * piece, pcb_pline_t * prev_contour, pcb_pline_t * contour, int remove_rtree_entry) +static inline void remove_contour(rnd_polyarea_t * piece, pcb_pline_t * prev_contour, pcb_pline_t * contour, int remove_rtree_entry) { if (piece->contours == contour) piece->contours = contour->next; @@ -1143,15 +1143,15 @@ contour->next = NULL; if (remove_rtree_entry) - pcb_r_delete_entry(piece->contour_tree, (rnd_box_t *) contour); + pcb_r_delete_entry(piece->contour_tree, (rnd_rnd_box_t *) contour); } struct polyarea_info { - rnd_box_t BoundingBox; - pcb_polyarea_t *pa; + rnd_rnd_box_t BoundingBox; + rnd_polyarea_t *pa; }; -static pcb_r_dir_t heap_it(const rnd_box_t * b, void *cl) +static pcb_r_dir_t heap_it(const rnd_rnd_box_t * b, void *cl) { pcb_heap_t *heap = (pcb_heap_t *) cl; struct polyarea_info *pa_info = (struct polyarea_info *) b; @@ -1168,7 +1168,7 @@ pcb_pline_t *result; }; -static pcb_r_dir_t find_inside(const rnd_box_t * b, void *cl) +static pcb_r_dir_t find_inside(const rnd_rnd_box_t * b, void *cl) { struct find_inside_info *info = (struct find_inside_info *) cl; pcb_pline_t *check = (pcb_pline_t *) b; @@ -1184,12 +1184,12 @@ return PCB_R_DIR_NOT_FOUND; } -void pcb_poly_insert_holes(jmp_buf * e, pcb_polyarea_t * dest, pcb_pline_t ** src) +void pcb_poly_insert_holes(jmp_buf * e, rnd_polyarea_t * dest, pcb_pline_t ** src) { - pcb_polyarea_t *curc; + rnd_polyarea_t *curc; pcb_pline_t *curh, *container; pcb_heap_t *heap; - pcb_rtree_t *tree; + rnd_rtree_t *tree; int i; int num_polyareas = 0; struct polyarea_info *all_pa_info, *pa_info; @@ -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; - pcb_r_insert_entry(tree, (const rnd_box_t *) &all_pa_info[i]); + pcb_r_insert_entry(tree, (const rnd_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 = pcb_heap_create(); - pcb_r_search(tree, (rnd_box_t *) curh, NULL, heap_it, heap, NULL); + pcb_r_search(tree, (rnd_rnd_box_t *) curh, NULL, heap_it, heap, NULL); if (pcb_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! */ - pcb_r_search(pa_info->pa->contour_tree, (rnd_box_t *) curh, NULL, find_inside, &info, NULL); + pcb_r_search(pa_info->pa->contour_tree, (rnd_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; - pcb_r_insert_entry(pa_info->pa->contour_tree, (rnd_box_t *) curh); + pcb_r_insert_entry(pa_info->pa->contour_tree, (rnd_rnd_box_t *) curh); } } @@ -1499,7 +1499,7 @@ return pcb_err_ok; } /* Gather */ -static void Collect1(jmp_buf * e, pcb_vnode_t * cur, DIRECTION dir, pcb_polyarea_t ** contours, pcb_pline_t ** holes, J_Rule j_rule) +static void Collect1(jmp_buf * e, pcb_vnode_t * cur, DIRECTION dir, rnd_polyarea_t ** contours, pcb_pline_t ** holes, J_Rule j_rule) { pcb_pline_t *p = NULL; /* start making contour */ int errc = pcb_err_ok; @@ -1526,7 +1526,7 @@ } } -static void Collect(jmp_buf * e, pcb_pline_t * a, pcb_polyarea_t ** contours, pcb_pline_t ** holes, S_Rule s_rule, J_Rule j_rule) +static void Collect(jmp_buf * e, pcb_pline_t * a, rnd_polyarea_t ** contours, pcb_pline_t ** holes, S_Rule s_rule, J_Rule j_rule) { pcb_vnode_t *cur, *other; DIRECTION dir; @@ -1544,8 +1544,8 @@ static int -cntr_Collect(jmp_buf * e, pcb_pline_t ** A, pcb_polyarea_t ** contours, pcb_pline_t ** holes, - int action, pcb_polyarea_t * owner, pcb_polyarea_t * parent, pcb_pline_t * parent_contour) +cntr_Collect(jmp_buf * e, pcb_pline_t ** A, rnd_polyarea_t ** contours, pcb_pline_t ** holes, + int action, rnd_polyarea_t * owner, rnd_polyarea_t * parent, pcb_pline_t * parent_contour) { pcb_pline_t *tmprev; @@ -1604,9 +1604,9 @@ return pcb_false; } /* cntr_Collect */ -static void M_B_AREA_Collect(jmp_buf * e, pcb_polyarea_t * bfst, pcb_polyarea_t ** contours, pcb_pline_t ** holes, int action) +static void M_B_AREA_Collect(jmp_buf * e, rnd_polyarea_t * bfst, rnd_polyarea_t ** contours, pcb_pline_t ** holes, int action) { - pcb_polyarea_t *b = bfst; + rnd_polyarea_t *b = bfst; pcb_pline_t **cur, **next, *tmp; assert(b != NULL); @@ -1654,7 +1654,7 @@ } -static inline int contour_is_first(pcb_polyarea_t * a, pcb_pline_t * cur) +static inline int contour_is_first(rnd_polyarea_t * a, pcb_pline_t * cur) { return (a->contours == cur); } @@ -1666,7 +1666,7 @@ } -static inline void remove_polyarea(pcb_polyarea_t ** list, pcb_polyarea_t * piece) +static inline void remove_polyarea(rnd_polyarea_t ** list, rnd_polyarea_t * piece) { /* If this item was the start of the list, advance that pointer */ if (*list == piece) @@ -1681,10 +1681,10 @@ piece->f = piece->b = piece; } -static void M_pcb_polyarea_separate_isected(jmp_buf * e, pcb_polyarea_t ** pieces, pcb_pline_t ** holes, pcb_pline_t ** isected) +static void M_pcb_polyarea_separate_isected(jmp_buf * e, rnd_polyarea_t ** pieces, pcb_pline_t ** holes, pcb_pline_t ** isected) { - pcb_polyarea_t *a = *pieces; - pcb_polyarea_t *anext; + rnd_polyarea_t *a = *pieces; + rnd_polyarea_t *anext; pcb_pline_t *curc, *next, *prev; int finished; @@ -1759,11 +1759,11 @@ struct find_inside_m_pa_info { jmp_buf jb; - pcb_polyarea_t *want_inside; + rnd_polyarea_t *want_inside; pcb_pline_t *result; }; -static pcb_r_dir_t find_inside_m_pa(const rnd_box_t * b, void *cl) +static pcb_r_dir_t find_inside_m_pa(const rnd_rnd_box_t * b, void *cl) { struct find_inside_m_pa_info *info = (struct find_inside_m_pa_info *) cl; pcb_pline_t *check = (pcb_pline_t *) b; @@ -1781,13 +1781,13 @@ } -static void M_pcb_polyarea_t_update_primary(jmp_buf * e, pcb_polyarea_t ** pieces, pcb_pline_t ** holes, int action, pcb_polyarea_t * bpa) +static void M_pcb_polyarea_t_update_primary(jmp_buf * e, rnd_polyarea_t ** pieces, pcb_pline_t ** holes, int action, rnd_polyarea_t * bpa) { - pcb_polyarea_t *a = *pieces; - pcb_polyarea_t *b; - pcb_polyarea_t *anext; + rnd_polyarea_t *a = *pieces; + rnd_polyarea_t *b; + rnd_polyarea_t *anext; pcb_pline_t *curc, *next, *prev; - rnd_box_t box; + rnd_rnd_box_t box; /* int inv_inside = 0; */ int del_inside = 0; int del_outside = 0; @@ -1810,10 +1810,10 @@ break; } - box = *((rnd_box_t *) bpa->contours); + box = *((rnd_rnd_box_t *) bpa->contours); b = bpa; while ((b = b->f) != bpa) { - rnd_box_t *b_box = (rnd_box_t *) b->contours; + rnd_rnd_box_t *b_box = (rnd_rnd_box_t *) b->contours; PCB_MAKE_MIN(box.X1, b_box->X1); PCB_MAKE_MIN(box.Y1, b_box->Y1); PCB_MAKE_MAX(box.X2, b_box->X2); @@ -1978,7 +1978,7 @@ } static void -M_pcb_polyarea_t_Collect_separated(jmp_buf * e, pcb_pline_t * afst, pcb_polyarea_t ** contours, pcb_pline_t ** holes, int action, rnd_bool maybe) +M_pcb_polyarea_t_Collect_separated(jmp_buf * e, pcb_pline_t * afst, rnd_polyarea_t ** contours, pcb_pline_t ** holes, int action, rnd_bool maybe) { pcb_pline_t **cur, **next; @@ -1990,10 +1990,10 @@ } } -static void M_pcb_polyarea_t_Collect(jmp_buf * e, pcb_polyarea_t * afst, pcb_polyarea_t ** contours, pcb_pline_t ** holes, int action, rnd_bool maybe) +static void M_pcb_polyarea_t_Collect(jmp_buf * e, rnd_polyarea_t * afst, rnd_polyarea_t ** contours, pcb_pline_t ** holes, int action, rnd_bool maybe) { - pcb_polyarea_t *a = afst; - pcb_polyarea_t *parent = NULL; /* Quiet compiler warning */ + rnd_polyarea_t *a = afst; + rnd_polyarea_t *parent = NULL; /* Quiet compiler warning */ pcb_pline_t **cur, **next, *parent_contour; assert(a != NULL); @@ -2031,7 +2031,7 @@ } /* determine if two polygons touch or overlap */ -rnd_bool pcb_polyarea_touching(pcb_polyarea_t * a, pcb_polyarea_t * b) +rnd_bool pcb_polyarea_touching(rnd_polyarea_t * a, rnd_polyarea_t * b) { jmp_buf e; int code; @@ -2056,9 +2056,9 @@ } /* the main clipping routines */ -int pcb_polyarea_boolean(const pcb_polyarea_t * a_org, const pcb_polyarea_t * b_org, pcb_polyarea_t ** res, int action) +int pcb_polyarea_boolean(const rnd_polyarea_t * a_org, const rnd_polyarea_t * b_org, rnd_polyarea_t ** res, int action) { - pcb_polyarea_t *a = NULL, *b = NULL; + rnd_polyarea_t *a = NULL, *b = NULL; if (!pcb_polyarea_m_copy0(&a, a_org) || !pcb_polyarea_m_copy0(&b, b_org)) return pcb_err_no_memory; @@ -2067,9 +2067,9 @@ } /* poly_Boolean */ /* just like poly_Boolean but frees the input polys */ -int pcb_polyarea_boolean_free(pcb_polyarea_t * ai, pcb_polyarea_t * bi, pcb_polyarea_t ** res, int action) +int pcb_polyarea_boolean_free(rnd_polyarea_t * ai, rnd_polyarea_t * bi, rnd_polyarea_t ** res, int action) { - pcb_polyarea_t *a = ai, *b = bi; + rnd_polyarea_t *a = ai, *b = bi; pcb_pline_t *a_isected = NULL; pcb_pline_t *p, *holes = NULL; jmp_buf e; @@ -2147,9 +2147,9 @@ return code; } /* poly_Boolean_free */ -static void clear_marks(pcb_polyarea_t * p) +static void clear_marks(rnd_polyarea_t * p) { - pcb_polyarea_t *n = p; + rnd_polyarea_t *n = p; pcb_pline_t *c; pcb_vnode_t *v; @@ -2168,9 +2168,9 @@ /* compute the intersection and subtraction (divides "a" into two pieces) * and frees the input polys. This assumes that bi is a single simple polygon. */ -int pcb_polyarea_and_subtract_free(pcb_polyarea_t * ai, pcb_polyarea_t * bi, pcb_polyarea_t ** aandb, pcb_polyarea_t ** aminusb) +int pcb_polyarea_and_subtract_free(rnd_polyarea_t * ai, rnd_polyarea_t * bi, rnd_polyarea_t ** aandb, rnd_polyarea_t ** aminusb) { - pcb_polyarea_t *a = ai, *b = bi; + rnd_polyarea_t *a = ai, *b = bi; pcb_pline_t *p, *holes = NULL; jmp_buf e; int code; @@ -2321,7 +2321,7 @@ } /* FIXME -- strict aliasing violation. */ if ((*c)->tree) { - pcb_rtree_t *r = (*c)->tree; + rnd_rtree_t *r = (*c)->tree; pcb_r_free_tree_data(r, free); pcb_r_destroy_tree(&r); } @@ -2372,10 +2372,10 @@ C->area = PCB_ABS(area); if (C->Count > 2) C->Flags.orient = ((area < 0) ? PCB_PLF_INV : PCB_PLF_DIR); - C->tree = (pcb_rtree_t *) pcb_poly_make_edge_tree(C); + C->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(C); } /* poly_PreContour */ -static pcb_r_dir_t flip_cb(const rnd_box_t * b, void *cl) +static pcb_r_dir_t flip_cb(const rnd_rnd_box_t * b, void *cl) { struct seg *s = (struct seg *) b; s->v = s->v->prev; @@ -2481,7 +2481,7 @@ /* newnode->Flags = cur->Flags; */ pcb_poly_vertex_include((*dst)->head->prev, newnode); } - (*dst)->tree = (pcb_rtree_t *) pcb_poly_make_edge_tree(*dst); + (*dst)->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(*dst); return pcb_true; } @@ -2488,11 +2488,11 @@ /**********************************************************************/ /* polygon routines */ -rnd_bool pcb_polyarea_copy0(pcb_polyarea_t ** dst, const pcb_polyarea_t * src) +rnd_bool pcb_polyarea_copy0(rnd_polyarea_t ** dst, const rnd_polyarea_t * src) { *dst = NULL; if (src != NULL) - *dst = (pcb_polyarea_t *) calloc(1, sizeof(pcb_polyarea_t)); + *dst = (rnd_polyarea_t *) calloc(1, sizeof(rnd_polyarea_t)); if (*dst == NULL) return pcb_false; (*dst)->contour_tree = pcb_r_create_tree(); @@ -2500,7 +2500,7 @@ return pcb_polyarea_copy1(*dst, src); } -rnd_bool pcb_polyarea_copy1(pcb_polyarea_t * dst, const pcb_polyarea_t * src) +rnd_bool pcb_polyarea_copy1(rnd_polyarea_t * dst, const rnd_polyarea_t * src) { pcb_pline_t *cur, **last = &dst->contours; @@ -2510,13 +2510,13 @@ for (cur = src->contours; cur != NULL; cur = cur->next) { if (!pcb_poly_contour_copy(last, cur)) return pcb_false; - pcb_r_insert_entry(dst->contour_tree, (rnd_box_t *) * last); + pcb_r_insert_entry(dst->contour_tree, (rnd_rnd_box_t *) * last); last = &(*last)->next; } return pcb_true; } -void pcb_polyarea_m_include(pcb_polyarea_t ** list, pcb_polyarea_t * a) +void pcb_polyarea_m_include(rnd_polyarea_t ** list, rnd_polyarea_t * a) { if (*list == NULL) a->f = a->b = a, *list = a; @@ -2527,10 +2527,10 @@ } } -rnd_bool pcb_polyarea_m_copy0(pcb_polyarea_t ** dst, const pcb_polyarea_t * srcfst) +rnd_bool pcb_polyarea_m_copy0(rnd_polyarea_t ** dst, const rnd_polyarea_t * srcfst) { - const pcb_polyarea_t *src = srcfst; - pcb_polyarea_t *di; + const rnd_polyarea_t *src = srcfst; + rnd_polyarea_t *di; *dst = NULL; if (src == NULL) @@ -2544,7 +2544,7 @@ return pcb_true; } -rnd_bool pcb_polyarea_contour_include(pcb_polyarea_t * p, pcb_pline_t * c) +rnd_bool pcb_polyarea_contour_include(rnd_polyarea_t * p, pcb_pline_t * c) { pcb_pline_t *tmp; @@ -2563,7 +2563,7 @@ p->contours->next = c; c->next = tmp; } - pcb_r_insert_entry(p->contour_tree, (rnd_box_t *) c); + pcb_r_insert_entry(p->contour_tree, (rnd_rnd_box_t *) c); return pcb_true; } @@ -2574,7 +2574,7 @@ } pip; -static pcb_r_dir_t crossing(const rnd_box_t * b, void *cl) +static pcb_r_dir_t crossing(const rnd_rnd_box_t * b, void *cl) { struct seg *s = (struct seg *) b; struct pip *p = (struct pip *) cl; @@ -2615,7 +2615,7 @@ int pcb_poly_contour_inside(const pcb_pline_t *c, pcb_vector_t p) { struct pip info; - rnd_box_t ray; + rnd_rnd_box_t ray; if (!cntrbox_pointin(c, p)) return pcb_false; @@ -2629,7 +2629,7 @@ return info.f; } -rnd_bool pcb_polyarea_contour_inside(pcb_polyarea_t * p, pcb_vector_t v0) +rnd_bool pcb_polyarea_contour_inside(rnd_polyarea_t * p, pcb_vector_t v0) { pcb_pline_t *cur; @@ -2645,9 +2645,9 @@ return pcb_false; } -rnd_bool poly_M_CheckInside(pcb_polyarea_t * p, pcb_vector_t v0) +rnd_bool poly_M_CheckInside(rnd_polyarea_t * p, pcb_vector_t v0) { - pcb_polyarea_t *cur; + rnd_polyarea_t *cur; if ((p == NULL) || (v0 == NULL)) return pcb_false; @@ -2818,7 +2818,7 @@ return 0; } -void pcb_polyarea_init(pcb_polyarea_t * p) +void pcb_polyarea_init(rnd_polyarea_t * p) { p->f = p->b = p; p->contours = NULL; @@ -2825,11 +2825,11 @@ p->contour_tree = pcb_r_create_tree(); } -pcb_polyarea_t *pcb_polyarea_create(void) +rnd_polyarea_t *pcb_polyarea_create(void) { - pcb_polyarea_t *res; + rnd_polyarea_t *res; - if ((res = (pcb_polyarea_t *) malloc(sizeof(pcb_polyarea_t))) != NULL) + if ((res = (rnd_polyarea_t *) malloc(sizeof(rnd_polyarea_t))) != NULL) pcb_polyarea_init(res); return res; } @@ -2844,9 +2844,9 @@ } } -void pcb_polyarea_free(pcb_polyarea_t ** p) +void pcb_polyarea_free(rnd_polyarea_t ** p) { - pcb_polyarea_t *cur; + rnd_polyarea_t *cur; if (*p == NULL) return; @@ -3015,7 +3015,7 @@ return pcb_polyarea_contour_check_(a, &res); } -void pcb_polyarea_bbox(pcb_polyarea_t * p, rnd_box_t * b) +void pcb_polyarea_bbox(rnd_polyarea_t * p, rnd_rnd_box_t * b) { pcb_pline_t *n; /*int cnt;*/ @@ -3093,7 +3093,7 @@ #endif -rnd_bool pcb_poly_valid(pcb_polyarea_t * p) +rnd_bool pcb_poly_valid(rnd_polyarea_t * p) { pcb_pline_t *c; pa_chk_res_t chk; @@ -3363,7 +3363,7 @@ rnd_coord_t cx, cy; } pline_isect_line_t; -static pcb_r_dir_t pline_isect_line_cb(const rnd_box_t * b, void *cl) +static pcb_r_dir_t pline_isect_line_cb(const rnd_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(pcb_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_box_t lbx; + rnd_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); @@ -3390,7 +3390,7 @@ lbx.Y2 = MAX(ly1, ly2); if (pl->tree == NULL) - pl->tree = (pcb_rtree_t *) pcb_poly_make_edge_tree(pl); + pl->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(pl); if (pcb_r_search(pl->tree, &lbx, NULL, pline_isect_line_cb, &ctx, NULL) == PCB_R_DIR_CANCEL) { if (cx != NULL) *cx = ctx.cx; @@ -3410,7 +3410,7 @@ double r2; } pline_isect_circ_t; -static pcb_r_dir_t pline_isect_circ_cb(const rnd_box_t * b, void *cl) +static pcb_r_dir_t pline_isect_circ_cb(const rnd_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(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { pline_isect_circ_t ctx; - rnd_box_t cbx; + rnd_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; @@ -3449,7 +3449,7 @@ cbx.X2 = cx + r; cbx.Y2 = cy + r; if (pl->tree == NULL) - pl->tree = (pcb_rtree_t *) pcb_poly_make_edge_tree(pl); + pl->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(pl); return pcb_r_search(pl->tree, &cbx, NULL, pline_isect_circ_cb, &ctx, NULL) == PCB_R_DIR_CANCEL; } @@ -3464,7 +3464,7 @@ * (or intersecting). * (C) 2017 Tibor 'Igor2' Palinkas */ -static pcb_r_dir_t pline_embraces_circ_cb(const rnd_box_t * b, void *cl) +static pcb_r_dir_t pline_embraces_circ_cb(const rnd_rnd_box_t * b, void *cl) { int *cnt = (int *)cl; (*cnt)++; @@ -3473,12 +3473,12 @@ rnd_bool pcb_pline_embraces_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { - rnd_box_t bx; + rnd_rnd_box_t bx; int cnt; bx.Y1 = cy; bx.Y2 = cy+1; if (pl->tree == NULL) - pl->tree = (pcb_rtree_t *) pcb_poly_make_edge_tree(pl); + pl->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(pl); /* ray to the right */ bx.X1 = cx + r; @@ -3505,7 +3505,7 @@ */ rnd_bool pcb_pline_overlaps_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { - rnd_box_t cbx, pbx; + rnd_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; @@ -3516,7 +3516,7 @@ return pcb_false; if (pl->tree == NULL) - pl->tree = (pcb_rtree_t *) pcb_poly_make_edge_tree(pl); + pl->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(pl); if (pcb_pline_isect_circ(pl, cx, cy, r)) return pcb_true; @@ -3539,10 +3539,10 @@ * pcb_polyarea_move() * (C) 2017 Tibor 'Igor2' Palinkas */ -void pcb_polyarea_move(pcb_polyarea_t *pa1, rnd_coord_t dx, rnd_coord_t dy) +void pcb_polyarea_move(rnd_polyarea_t *pa1, rnd_coord_t dx, rnd_coord_t dy) { int cnt; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; for (pa = pa1, cnt = 0; pa != NULL; pa = pa->f) { pcb_pline_t *pl; @@ -3574,9 +3574,9 @@ pcb_r_free_tree_data(pl->tree, free); pcb_r_destroy_tree(&pl->tree); } - pl->tree = (pcb_rtree_t *)pcb_poly_make_edge_tree(pl); + pl->tree = (rnd_rtree_t *)pcb_poly_make_edge_tree(pl); - pcb_r_insert_entry(pa->contour_tree, (rnd_box_t *)pl); + pcb_r_insert_entry(pa->contour_tree, (rnd_rnd_box_t *)pl); } } } Index: trunk/src/librnd/poly/polyarea.h =================================================================== --- trunk/src/librnd/poly/polyarea.h (revision 30969) +++ trunk/src/librnd/poly/polyarea.h (revision 30970) @@ -72,7 +72,7 @@ pcb_vnode_t *head; unsigned int Count; double area; - pcb_rtree_t *tree; + rnd_rtree_t *tree; rnd_bool is_round; rnd_coord_t cx, cy; rnd_coord_t radius; @@ -103,26 +103,26 @@ /**********************************************************************/ -struct pcb_polyarea_s { - pcb_polyarea_t *f, *b; +struct rnd_polyarea_s { + rnd_polyarea_t *f, *b; pcb_pline_t *contours; - pcb_rtree_t *contour_tree; + rnd_rtree_t *contour_tree; }; -rnd_bool pcb_polyarea_m_copy0(pcb_polyarea_t **dst, const pcb_polyarea_t *srcfst); -void pcb_polyarea_m_include(pcb_polyarea_t **list, pcb_polyarea_t *a); +rnd_bool pcb_polyarea_m_copy0(rnd_polyarea_t **dst, const rnd_polyarea_t *srcfst); +void pcb_polyarea_m_include(rnd_polyarea_t **list, rnd_polyarea_t *a); -rnd_bool pcb_polyarea_copy0(pcb_polyarea_t **dst, const pcb_polyarea_t *src); -rnd_bool pcb_polyarea_copy1(pcb_polyarea_t *dst, const pcb_polyarea_t *src); +rnd_bool pcb_polyarea_copy0(rnd_polyarea_t **dst, const rnd_polyarea_t *src); +rnd_bool pcb_polyarea_copy1(rnd_polyarea_t *dst, const rnd_polyarea_t *src); -rnd_bool pcb_polyarea_contour_include(pcb_polyarea_t *p, pcb_pline_t *c); -rnd_bool pcb_polyarea_contour_exclude(pcb_polyarea_t *p, pcb_pline_t *c); +rnd_bool pcb_polyarea_contour_include(rnd_polyarea_t *p, pcb_pline_t *c); +rnd_bool pcb_polyarea_contour_exclude(rnd_polyarea_t *p, pcb_pline_t *c); rnd_bool pcb_polyarea_contour_check(pcb_pline_t *a); -rnd_bool pcb_polyarea_contour_inside(pcb_polyarea_t *c, pcb_vector_t v0); -rnd_bool pcb_polyarea_touching(pcb_polyarea_t *p1, pcb_polyarea_t *p2); +rnd_bool pcb_polyarea_contour_inside(rnd_polyarea_t *c, pcb_vector_t v0); +rnd_bool pcb_polyarea_touching(rnd_polyarea_t *p1, rnd_polyarea_t *p2); /*** tools for clipping ***/ @@ -130,12 +130,12 @@ int pcb_poly_contour_inside(const pcb_pline_t *c, pcb_vector_t v); int pcb_poly_contour_in_contour(pcb_pline_t *poly, pcb_pline_t *inner); -pcb_polyarea_t *pcb_polyarea_create(void); +rnd_polyarea_t *pcb_polyarea_create(void); -void pcb_polyarea_free(pcb_polyarea_t **p); -void pcb_polyarea_init(pcb_polyarea_t *p); +void pcb_polyarea_free(rnd_polyarea_t **p); +void pcb_polyarea_init(rnd_polyarea_t *p); void pcb_poly_contours_free(pcb_pline_t **pl); -rnd_bool pcb_poly_valid(pcb_polyarea_t *p); +rnd_bool pcb_poly_valid(rnd_polyarea_t *p); enum pcb_poly_bool_op_e { PCB_PBO_UNITE, @@ -150,16 +150,16 @@ int pcb_vect_inters2(pcb_vector_t A, pcb_vector_t B, pcb_vector_t C, pcb_vector_t D, pcb_vector_t S1, pcb_vector_t S2); -int pcb_polyarea_boolean(const pcb_polyarea_t *a, const pcb_polyarea_t *b, pcb_polyarea_t **res, int action); -int pcb_polyarea_boolean_free(pcb_polyarea_t *a, pcb_polyarea_t *b, pcb_polyarea_t **res, int action); -int pcb_polyarea_and_subtract_free(pcb_polyarea_t *a, pcb_polyarea_t *b, pcb_polyarea_t **aandb, pcb_polyarea_t **aminusb); -int pcb_polyarea_save(pcb_polyarea_t *PA, char *fname); +int pcb_polyarea_boolean(const rnd_polyarea_t *a, const rnd_polyarea_t *b, rnd_polyarea_t **res, int action); +int pcb_polyarea_boolean_free(rnd_polyarea_t *a, rnd_polyarea_t *b, rnd_polyarea_t **res, int action); +int pcb_polyarea_and_subtract_free(rnd_polyarea_t *a, rnd_polyarea_t *b, rnd_polyarea_t **aandb, rnd_polyarea_t **aminusb); +int pcb_polyarea_save(rnd_polyarea_t *PA, char *fname); -/* calculate the bounding box of a pcb_polyarea_t and save result in b */ -void pcb_polyarea_bbox(pcb_polyarea_t *p, rnd_box_t *b); +/* calculate the bounding box of a rnd_polyarea_t and save result in b */ +void pcb_polyarea_bbox(rnd_polyarea_t *p, rnd_rnd_box_t *b); /* Move each point of pa1 by dx and dy */ -void pcb_polyarea_move(pcb_polyarea_t *pa1, rnd_coord_t dx, rnd_coord_t dy); +void pcb_polyarea_move(rnd_polyarea_t *pa1, rnd_coord_t dx, rnd_coord_t dy); /*** Tools for building polygons for common object shapes ***/ @@ -170,7 +170,7 @@ double rnd_round(double x); /* from math_helper.h */ /* Calculate an endpoint of an arc and return the result in *x;*y */ -RND_INLINE void pcb_arc_get_endpt(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, int which, rnd_coord_t *x, rnd_coord_t *y) +RND_INLINE void pcb_arc_get_endpt(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t astart, rnd_angle_t adelta, int which, rnd_coord_t *x, rnd_coord_t *y) { if (which == 0) { *x = rnd_round((double)cx - (double)width * cos(astart * (M_PI/180.0))); @@ -199,7 +199,7 @@ /* Convert a struct seg *obj extracted from a pline->tree into coords */ void pcb_polyarea_get_tree_seg(void *obj, rnd_coord_t *x1, rnd_coord_t *y1, rnd_coord_t *x2, rnd_coord_t *y2); -/* create a (pcb_rtree_t *) of each seg derived from src */ +/* create a (rnd_rtree_t *) of each seg derived from src */ void *pcb_poly_make_edge_tree(pcb_pline_t *src); Index: trunk/src/librnd/poly/polygon1_gen.c =================================================================== --- trunk/src/librnd/poly/polygon1_gen.c (revision 30969) +++ trunk/src/librnd/poly/polygon1_gen.c (revision 30970) @@ -59,9 +59,9 @@ } } -pcb_polyarea_t *pcb_poly_from_contour(pcb_pline_t * contour) +rnd_polyarea_t *pcb_poly_from_contour(pcb_pline_t * contour) { - pcb_polyarea_t *p; + rnd_polyarea_t *p; pcb_poly_contour_pre(contour, pcb_true); assert(contour->Flags.orient == PCB_PLF_DIR); if (!(p = pcb_polyarea_create())) @@ -71,9 +71,9 @@ return p; } -pcb_polyarea_t *pcb_poly_from_contour_autoinv(pcb_pline_t *contour) +rnd_polyarea_t *pcb_poly_from_contour_autoinv(pcb_pline_t *contour) { - pcb_polyarea_t *p; + rnd_polyarea_t *p; pcb_poly_contour_pre(contour, pcb_true); if (contour->Flags.orient != PCB_PLF_DIR) pcb_poly_contour_inv(contour); @@ -86,10 +86,10 @@ #define ARC_ANGLE 5 -static pcb_polyarea_t *ArcPolyNoIntersect(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, rnd_coord_t thick, int end_caps) +static rnd_polyarea_t *ArcPolyNoIntersect(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t astart, rnd_angle_t adelta, rnd_coord_t thick, int end_caps) { pcb_pline_t *contour = NULL; - pcb_polyarea_t *np = NULL; + rnd_polyarea_t *np = NULL; pcb_vector_t v, v2; int i, segs; double ang, da, rx, ry; @@ -172,7 +172,7 @@ return np; } -pcb_polyarea_t *pcb_poly_from_rect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2) +rnd_polyarea_t *pcb_poly_from_rect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2) { pcb_pline_t *contour = NULL; pcb_vector_t v; @@ -197,7 +197,7 @@ return pcb_poly_from_contour(contour); } -pcb_polyarea_t *pcb_poly_from_octagon(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, int style) +rnd_polyarea_t *pcb_poly_from_octagon(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, int style) { pcb_pline_t *contour = NULL; pcb_vector_t v; @@ -298,7 +298,7 @@ /* create a circle approximation from lines */ -pcb_polyarea_t *pcb_poly_from_circle(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius) +rnd_polyarea_t *pcb_poly_from_circle(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius) { pcb_pline_t *contour; pcb_vector_t v; @@ -318,7 +318,7 @@ } /* make a rounded-corner rectangle with radius t beyond x1,x2,y1,y2 rectangle */ -pcb_polyarea_t *RoundRect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2, rnd_coord_t t) +rnd_polyarea_t *RoundRect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2, rnd_coord_t t) { pcb_pline_t *contour = NULL; pcb_vector_t v; @@ -346,10 +346,10 @@ } -pcb_polyarea_t *pcb_poly_from_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, rnd_bool square) +rnd_polyarea_t *pcb_poly_from_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, rnd_bool square) { pcb_pline_t *contour = NULL; - pcb_polyarea_t *np = NULL; + rnd_polyarea_t *np = NULL; pcb_vector_t v; double d, dx, dy; long half; @@ -402,7 +402,7 @@ } #define MIN_CLEARANCE_BEFORE_BISECT 10. -pcb_polyarea_t *pcb_poly_from_arc(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, rnd_coord_t thick) +rnd_polyarea_t *pcb_poly_from_arc(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t astart, rnd_angle_t adelta, rnd_coord_t thick) { double delta; rnd_coord_t half; @@ -415,7 +415,7 @@ is so small that there's no inner arc of the clearance */ if ((width - half <= 0) || (height - half <= 0)) { rnd_coord_t lx1, ly1; - pcb_polyarea_t *tmp_arc, *tmp1, *tmp2, *res, *ends; + rnd_polyarea_t *tmp_arc, *tmp1, *tmp2, *res, *ends; tmp_arc = ArcPolyNoIntersect(cx, cy, width, height, astart, adelta, thick, 0); @@ -433,7 +433,7 @@ /* If the arc segment would self-intersect, we need to construct it as the union of two non-intersecting segments */ if (2 * M_PI * width * (1. - (double) delta / 360.) - thick < MIN_CLEARANCE_BEFORE_BISECT) { - pcb_polyarea_t *tmp1, *tmp2, *res; + rnd_polyarea_t *tmp1, *tmp2, *res; int half_delta = adelta / 2; tmp1 = ArcPolyNoIntersect(cx, cy, width, height, astart, half_delta, thick, 1); @@ -470,45 +470,45 @@ ym[0] = ym[1] = ym[2] = ym[3] = factor; } -/* NB: This function will free the passed pcb_polyarea_t. - It must only be passed a single pcb_polyarea_t (pa->f == pa->b == pa) */ -static void r_NoHolesPolygonDicer(pcb_polyarea_t * pa, void (*emit) (pcb_pline_t *, void *), void *user_data) +/* NB: This function will free the passed rnd_polyarea_t. + It must only be passed a single rnd_polyarea_t (pa->f == pa->b == pa) */ +static void r_NoHolesPolygonDicer(rnd_polyarea_t * pa, void (*emit) (pcb_pline_t *, void *), void *user_data) { pcb_pline_t *p = pa->contours; if (!pa->contours->next) { /* no holes */ pa->contours = NULL; /* The callback now owns the contour */ - /* Don't bother removing it from the pcb_polyarea_t's rtree - since we're going to free the pcb_polyarea_t below anyway */ + /* Don't bother removing it from the rnd_polyarea_t's rtree + since we're going to free the rnd_polyarea_t below anyway */ emit(p, user_data); pcb_polyarea_free(&pa); return; } else { - pcb_polyarea_t *poly2, *left, *right; + rnd_polyarea_t *poly2, *left, *right; /* make a rectangle of the left region slicing through the middle of the first hole */ poly2 = pcb_poly_from_rect(p->xmin, (p->next->xmin + p->next->xmax) / 2, p->ymin, p->ymax); pcb_polyarea_and_subtract_free(pa, poly2, &left, &right); if (left) { - pcb_polyarea_t *cur, *next; + rnd_polyarea_t *cur, *next; cur = left; do { next = cur->f; cur->f = cur->b = cur; /* Detach this polygon piece */ r_NoHolesPolygonDicer(cur, emit, user_data); - /* NB: The pcb_polyarea_t was freed by its use in the recursive dicer */ + /* NB: The rnd_polyarea_t was freed by its use in the recursive dicer */ } while ((cur = next) != left); } if (right) { - pcb_polyarea_t *cur, *next; + rnd_polyarea_t *cur, *next; cur = right; do { next = cur->f; cur->f = cur->b = cur; /* Detach this polygon piece */ r_NoHolesPolygonDicer(cur, emit, user_data); - /* NB: The pcb_polyarea_t was freed by its use in the recursive dicer */ + /* NB: The rnd_polyarea_t was freed by its use in the recursive dicer */ } while ((cur = next) != right); } @@ -515,13 +515,13 @@ } } -void pcb_polyarea_no_holes_dicer(pcb_polyarea_t *main_contour, rnd_coord_t clipX1, rnd_coord_t clipY1, rnd_coord_t clipX2, rnd_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data) +void pcb_polyarea_no_holes_dicer(rnd_polyarea_t *main_contour, rnd_coord_t clipX1, rnd_coord_t clipY1, rnd_coord_t clipX2, rnd_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data) { - pcb_polyarea_t *cur, *next; + rnd_polyarea_t *cur, *next; /* clip to the bounding box */ if ((clipX1 != clipX2) || (clipY1 != clipY2)) { - pcb_polyarea_t *cbox = pcb_poly_from_rect(clipX1, clipX2, clipY1, clipY2); + rnd_polyarea_t *cbox = pcb_poly_from_rect(clipX1, clipX2, clipY1, clipY2); pcb_polyarea_boolean_free(main_contour, cbox, &main_contour, PCB_PBO_ISECT); } if (main_contour == NULL) @@ -533,7 +533,7 @@ next = cur->f; cur->f = cur->b = cur; /* Detach this polygon piece */ r_NoHolesPolygonDicer(cur, emit, user_data); - /* NB: The pcb_polyarea_t was freed by its use in the recursive dicer */ + /* NB: The rnd_polyarea_t was freed by its use in the recursive dicer */ } while ((cur = next) != main_contour); } Index: trunk/src/librnd/poly/polygon1_gen.h =================================================================== --- trunk/src/librnd/poly/polygon1_gen.h (revision 30969) +++ trunk/src/librnd/poly/polygon1_gen.h (revision 30970) @@ -6,25 +6,25 @@ void pcb_poly_square_pin_factors(int style, double *xm, double *ym); -pcb_polyarea_t *pcb_poly_from_contour(pcb_pline_t *pl); -pcb_polyarea_t *pcb_poly_from_contour_autoinv(pcb_pline_t *pl); +rnd_polyarea_t *pcb_poly_from_contour(pcb_pline_t *pl); +rnd_polyarea_t *pcb_poly_from_contour_autoinv(pcb_pline_t *pl); -pcb_polyarea_t *pcb_poly_from_circle(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius); -pcb_polyarea_t *pcb_poly_from_octagon(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, int style); -pcb_polyarea_t *pcb_poly_from_rect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2); -pcb_polyarea_t *RoundRect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2, rnd_coord_t t); +rnd_polyarea_t *pcb_poly_from_circle(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius); +rnd_polyarea_t *pcb_poly_from_octagon(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, int style); +rnd_polyarea_t *pcb_poly_from_rect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2); +rnd_polyarea_t *RoundRect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2, rnd_coord_t t); /* generate a polygon of a round or square cap line of a given thickness */ -pcb_polyarea_t *pcb_poly_from_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, rnd_bool square); +rnd_polyarea_t *pcb_poly_from_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, rnd_bool square); /* generate a polygon of a round cap arc of a given thickness */ -pcb_polyarea_t *pcb_poly_from_arc(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, rnd_coord_t thick); +rnd_polyarea_t *pcb_poly_from_arc(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t astart, rnd_angle_t adelta, rnd_coord_t thick); /* Slice up a polyarea-with-holes into a set of polygon islands with no holes, within the clip area. If the clip area is all-zero, do not clip. Free's main_contour. */ -void pcb_polyarea_no_holes_dicer(pcb_polyarea_t *main_contour, rnd_coord_t clipX1, rnd_coord_t clipY1, rnd_coord_t clipX2, rnd_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data); +void pcb_polyarea_no_holes_dicer(rnd_polyarea_t *main_contour, rnd_coord_t clipX1, rnd_coord_t clipY1, rnd_coord_t clipX2, rnd_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data); /* Add vertices in a fractional-circle starting from v centered at X, Y and going counter-clockwise. Does not include the first point. Last argument is: Index: trunk/src/librnd/poly/rtree.c =================================================================== --- trunk/src/librnd/poly/rtree.c (revision 30969) +++ trunk/src/librnd/poly/rtree.c (revision 30970) @@ -40,27 +40,27 @@ #include /* Temporary compatibility layer for the transition */ -pcb_rtree_t *pcb_r_create_tree(void) +rnd_rtree_t *pcb_r_create_tree(void) { - pcb_rtree_t *root = malloc(sizeof(pcb_rtree_t)); - pcb_rtree_init(root); + rnd_rtree_t *root = malloc(sizeof(rnd_rtree_t)); + rnd_rtree_init(root); return root; } -void pcb_r_destroy_tree(pcb_rtree_t **tree) +void pcb_r_destroy_tree(rnd_rtree_t **tree) { - pcb_rtree_uninit(*tree); + rnd_rtree_uninit(*tree); free(*tree); *tree = NULL; } -void pcb_r_insert_entry(pcb_rtree_t *rtree, const rnd_box_t *which) +void pcb_r_insert_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which) { assert(which != NULL); - pcb_rtree_insert(rtree, (void *)which, (pcb_rtree_box_t *)which); /* assumes first field is the bounding box */ + rnd_rtree_insert(rtree, (void *)which, (rnd_rtree_box_t *)which); /* assumes first field is the bounding box */ } -void pcb_r_insert_array(pcb_rtree_t *rtree, const rnd_box_t *boxlist[], rnd_cardinal_t len) +void pcb_r_insert_array(rnd_rtree_t *rtree, const rnd_rnd_box_t *boxlist[], rnd_cardinal_t len) { rnd_cardinal_t n; @@ -73,17 +73,17 @@ pcb_r_insert_entry(rtree, boxlist[n]); } -rnd_bool pcb_r_delete_entry(pcb_rtree_t *rtree, const rnd_box_t *which) +rnd_bool pcb_r_delete_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which) { assert(which != NULL); - return pcb_rtree_delete(rtree, (void *)which, (pcb_rtree_box_t *)which) == 0; /* assumes first field is the bounding box */ + return rnd_rtree_delete(rtree, (void *)which, (rnd_rtree_box_t *)which) == 0; /* assumes first field is the bounding box */ } -rnd_bool pcb_r_delete_entry_free_data(pcb_rtree_t *rtree, rnd_box_t *box, void (*free_data)(void *d)) +rnd_bool pcb_r_delete_entry_free_data(rnd_rtree_t *rtree, rnd_rnd_box_t *box, void (*free_data)(void *d)) { void *obj = box; /* assumes first field is the bounding box */ assert(obj != NULL); - if (pcb_rtree_delete(rtree, obj, (pcb_rtree_box_t *)box) != 0) + if (rnd_rtree_delete(rtree, obj, (rnd_rtree_box_t *)box) != 0) return pcb_false; free_data(obj); return pcb_true; @@ -90,37 +90,37 @@ } typedef struct { - pcb_r_dir_t (*region_in_search)(const rnd_box_t *region, void *closure); - pcb_r_dir_t (*rectangle_in_region)(const rnd_box_t *box, void *closure); + pcb_r_dir_t (*region_in_search)(const rnd_rnd_box_t *region, void *closure); + pcb_r_dir_t (*rectangle_in_region)(const rnd_rnd_box_t *box, void *closure); void *clo; } r_cb_t; -static pcb_rtree_dir_t r_cb_node(void *ctx_, void *obj, const pcb_rtree_box_t *box) +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_box_t *)box, ctx->clo); + return ctx->region_in_search((const rnd_rnd_box_t *)box, ctx->clo); } -static pcb_rtree_dir_t r_cb_obj(void *ctx_, void *obj, const pcb_rtree_box_t *box) +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_box_t *)obj, ctx->clo); + return ctx->rectangle_in_region((const rnd_rnd_box_t *)obj, ctx->clo); } -pcb_r_dir_t pcb_r_search(pcb_rtree_t *rtree, const rnd_box_t *query, - pcb_r_dir_t (*region_in_search)(const rnd_box_t *region, void *closure), - pcb_r_dir_t (*rectangle_in_region)(const rnd_box_t *box, void *closure), +pcb_r_dir_t pcb_r_search(rnd_rtree_t *rtree, const rnd_rnd_box_t *query, + pcb_r_dir_t (*region_in_search)(const rnd_rnd_box_t *region, void *closure), + pcb_r_dir_t (*rectangle_in_region)(const rnd_rnd_box_t *box, void *closure), void *closure, int *num_found) { pcb_r_dir_t res; - pcb_rtree_cardinal_t out_cnt; + rnd_rtree_cardinal_t out_cnt; r_cb_t ctx; ctx.region_in_search = region_in_search; ctx.rectangle_in_region = rectangle_in_region; ctx.clo = closure; - res = pcb_rtree_search_any(rtree, (const pcb_rtree_box_t *)query, + res = rnd_rtree_search_any(rtree, (const rnd_rtree_box_t *)query, (ctx.region_in_search != NULL) ? r_cb_node : NULL, (ctx.rectangle_in_region != NULL) ? r_cb_obj : NULL, &ctx, &out_cnt); @@ -131,9 +131,9 @@ return res; } -int pcb_r_region_is_empty(pcb_rtree_t *rtree, const rnd_box_t *region) +int pcb_r_region_is_empty(rnd_rtree_t *rtree, const rnd_rnd_box_t *region) { - return pcb_rtree_is_box_empty(rtree, (const pcb_rtree_box_t *)region); + return rnd_rtree_is_box_empty(rtree, (const rnd_rtree_box_t *)region); } static void r_print_obj(FILE *f, void *obj) @@ -141,32 +141,32 @@ fprintf(f, "\n", obj); } -void pcb_r_dump_tree(pcb_rtree_t *root, int unused) +void pcb_r_dump_tree(rnd_rtree_t *root, int unused) { - pcb_rtree_dump_text(stdout, root, r_print_obj); + rnd_rtree_dump_text(stdout, root, r_print_obj); } -void pcb_r_free_tree_data(pcb_rtree_t *rtree, void (*free)(void *ptr)) +void pcb_r_free_tree_data(rnd_rtree_t *rtree, void (*free)(void *ptr)) { - pcb_rtree_it_t it; + rnd_rtree_it_t it; void *o; - for(o = pcb_rtree_all_first(&it, rtree); o != NULL; o = pcb_rtree_all_next(&it)) + for(o = rnd_rtree_all_first(&it, rtree); o != NULL; o = rnd_rtree_all_next(&it)) free(o); } -rnd_box_t *pcb_r_first(pcb_rtree_t *tree, pcb_rtree_it_t *it) +rnd_rnd_box_t *pcb_r_first(rnd_rtree_t *tree, rnd_rtree_it_t *it) { if (tree == NULL) return NULL; - return (rnd_box_t *)pcb_rtree_all_first(it, tree); + return (rnd_rnd_box_t *)rnd_rtree_all_first(it, tree); } -rnd_box_t *pcb_r_next(pcb_rtree_it_t *it) +rnd_rnd_box_t *pcb_r_next(rnd_rtree_it_t *it) { - return (rnd_box_t *)pcb_rtree_all_next(it); + return (rnd_rnd_box_t *)rnd_rtree_all_next(it); } -void pcb_r_end(pcb_rtree_it_t *it) +void pcb_r_end(rnd_rtree_it_t *it) { } Index: trunk/src/librnd/poly/rtree.h =================================================================== --- trunk/src/librnd/poly/rtree.h (revision 30969) +++ trunk/src/librnd/poly/rtree.h (revision 30970) @@ -24,23 +24,23 @@ * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") */ -#ifndef PCB_RTREE_H -#define PCB_RTREE_H +#ifndef RND_RTREE_H +#define RND_RTREE_H #include -typedef long int pcb_rtree_cardinal_t; -typedef rnd_coord_t pcb_rtree_coord_t; +typedef long int rnd_rtree_cardinal_t; +typedef rnd_coord_t rnd_rtree_coord_t; /* Instantiate an rtree */ -#define RTR(n) pcb_rtree_ ## n -#define RTRU(n) pcb_RTREE_ ## n -#define pcb_rtree_privfunc static -#define pcb_rtree_size 6 -#define pcb_rtree_stack_max 1024 +#define RTR(n) rnd_rtree_ ## n +#define RTRU(n) rnd_RTREE_ ## n +#define rnd_rtree_privfunc static +#define rnd_rtree_size 6 +#define rnd_rtree_stack_max 1024 #define RTREE_NO_TREE_TYPEDEFS #include -#endif /* PCB_RTREE_H */ +#endif /* RND_RTREE_H */ Index: trunk/src/librnd/poly/rtree2_compat.h =================================================================== --- trunk/src/librnd/poly/rtree2_compat.h (revision 30969) +++ trunk/src/librnd/poly/rtree2_compat.h (revision 30970) @@ -50,15 +50,15 @@ PCB_R_DIR_CANCEL = 2 /* cancel the search and return immediately */ } pcb_r_dir_t; -pcb_rtree_t *pcb_r_create_tree(void); -void pcb_r_destroy_tree(pcb_rtree_t **tree); -void pcb_r_free_tree_data(pcb_rtree_t *rtree, void (*free)(void *ptr)); +rnd_rtree_t *pcb_r_create_tree(void); +void pcb_r_destroy_tree(rnd_rtree_t **tree); +void pcb_r_free_tree_data(rnd_rtree_t *rtree, void (*free)(void *ptr)); -void pcb_r_insert_entry(pcb_rtree_t *rtree, const rnd_box_t *which); -void pcb_r_insert_array(pcb_rtree_t *rtree, const rnd_box_t *boxlist[], rnd_cardinal_t len); +void pcb_r_insert_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which); +void pcb_r_insert_array(rnd_rtree_t *rtree, const rnd_rnd_box_t *boxlist[], rnd_cardinal_t len); -rnd_bool pcb_r_delete_entry(pcb_rtree_t *rtree, const rnd_box_t *which); -rnd_bool pcb_r_delete_entry_free_data(pcb_rtree_t *rtree, rnd_box_t *box, void (*free_data)(void *d)); +rnd_bool pcb_r_delete_entry(rnd_rtree_t *rtree, const rnd_rnd_box_t *which); +rnd_bool pcb_r_delete_entry_free_data(rnd_rtree_t *rtree, rnd_rnd_box_t *box, void (*free_data)(void *d)); /* generic search routine */ /* region_in_search should return pcb_true if "what you're looking for" is @@ -72,15 +72,15 @@ * Look at the implementation of r_region_is_empty for how to * abort the search if that is the desired behavior. */ -pcb_r_dir_t pcb_r_search(pcb_rtree_t *rtree, const rnd_box_t *query, - pcb_r_dir_t (*region_in_search)(const rnd_box_t *region, void *closure), - pcb_r_dir_t (*rectangle_in_region)(const rnd_box_t *box, void *closure), +pcb_r_dir_t pcb_r_search(rnd_rtree_t *rtree, const rnd_rnd_box_t *query, + pcb_r_dir_t (*region_in_search)(const rnd_rnd_box_t *region, void *closure), + pcb_r_dir_t (*rectangle_in_region)(const rnd_rnd_box_t *box, void *closure), void *closure, int *num_found); /* return 0 if there are any rectangles in the given region. */ -int pcb_r_region_is_empty(pcb_rtree_t *rtree, const rnd_box_t *region); +int pcb_r_region_is_empty(rnd_rtree_t *rtree, const rnd_rnd_box_t *region); -void pcb_r_dump_tree(pcb_rtree_t *root, int unused); +void pcb_r_dump_tree(rnd_rtree_t *root, int unused); #define PCB_RTREE_EMPTY(rt) (((rt) == NULL) || ((rt)->size == 0)) @@ -87,12 +87,12 @@ /* -- 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_box_t *pcb_r_first(pcb_rtree_t *tree, pcb_rtree_it_t *it); +rnd_rnd_box_t *pcb_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_box_t *pcb_r_next(pcb_rtree_it_t *it); +rnd_rnd_box_t *pcb_r_next(rnd_rtree_it_t *it); /* Free fields of the iterator - not needed anymore, will be removed */ -void pcb_r_end(pcb_rtree_it_t *it); +void pcb_r_end(rnd_rtree_it_t *it); #endif Index: trunk/src/librnd/poly/self_isc.c =================================================================== --- trunk/src/librnd/poly/self_isc.c (revision 30969) +++ trunk/src/librnd/poly/self_isc.c (revision 30970) @@ -292,7 +292,7 @@ vtp0_uninit(&hubs); } -rnd_cardinal_t pcb_polyarea_split_selfint(pcb_polyarea_t *pa) +rnd_cardinal_t pcb_polyarea_split_selfint(rnd_polyarea_t *pa) { pcb_pline_t *pl, *next, *pln, *prev = NULL; rnd_cardinal_t cnt = 0; Index: trunk/src/librnd/poly/self_isc.h =================================================================== --- trunk/src/librnd/poly/self_isc.h (revision 30969) +++ trunk/src/librnd/poly/self_isc.h (revision 30970) @@ -37,7 +37,7 @@ void pcb_pline_split_selfint(const pcb_pline_t *pl, vtp0_t *out); -rnd_cardinal_t pcb_polyarea_split_selfint(pcb_polyarea_t *pa); +rnd_cardinal_t pcb_polyarea_split_selfint(rnd_polyarea_t *pa); Index: trunk/src/netlist_geo.c =================================================================== --- trunk/src/netlist_geo.c (revision 30969) +++ trunk/src/netlist_geo.c (revision 30970) @@ -137,7 +137,7 @@ { pcb_subnet_dist_t best; pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; best.dist2 = HUGE_VAL; best.o1 = (pcb_any_obj_t *)o1; @@ -216,7 +216,7 @@ { pcb_subnet_dist_t best; pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; if (acc & PCB_RATACC_ONLY_MANHATTAN) return sdist_invalid; Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 30969) +++ trunk/src/obj_arc.c (revision 30970) @@ -100,13 +100,13 @@ } /* computes the bounding box of an arc */ -static rnd_box_t pcb_arc_bbox_(const pcb_arc_t *Arc, int mini) +static rnd_rnd_box_t pcb_arc_bbox_(const pcb_arc_t *Arc, int mini) { double ca1, ca2, sa1, sa2; double minx, maxx, miny, maxy, delta; - pcb_angle_t ang1, ang2; + rnd_angle_t ang1, ang2; rnd_coord_t width; - rnd_box_t res; + rnd_rnd_box_t res; /* first put angles into standard form: * ang1 < ang2, both angles between 0 and 720 */ @@ -182,7 +182,7 @@ } -void pcb_arc_set_angles(pcb_layer_t *Layer, pcb_arc_t *a, pcb_angle_t new_sa, pcb_angle_t new_da) +void pcb_arc_set_angles(pcb_layer_t *Layer, pcb_arc_t *a, rnd_angle_t new_sa, rnd_angle_t new_da) { if (new_da >= 360) { new_da = 360; @@ -189,12 +189,12 @@ new_sa = 0; } pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (rnd_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); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); } @@ -202,25 +202,25 @@ 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); - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (rnd_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); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); } /* creates a new arc on a layer */ -pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t width, rnd_coord_t height, pcb_angle_t sa, pcb_angle_t dir, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags, rnd_bool prevent_dups) +pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t width, rnd_coord_t height, rnd_angle_t sa, rnd_angle_t dir, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags, rnd_bool prevent_dups) { pcb_arc_t *Arc; if ((prevent_dups) && (Layer->arc_tree != NULL)) { - pcb_rtree_it_t it; + rnd_rtree_it_t it; pcb_any_obj_t *o; - rnd_box_t b; + rnd_rnd_box_t b; b.X1 = X1 - width; b.Y1 = Y1 - height; @@ -227,7 +227,7 @@ b.X2 = X1 + width; b.Y2 = Y1 + height; - for(o = pcb_rtree_first(&it, Layer->arc_tree, (pcb_rtree_box_t *)&b); o != NULL; o = pcb_rtree_next(&it)) { + for(o = rnd_rtree_first(&it, Layer->arc_tree, (rnd_rtree_box_t *)&b); o != NULL; o = rnd_rtree_next(&it)) { pcb_arc_t *arc = (pcb_arc_t *)o; TODO(": this does not catch all cases; there are more ways two arcs can be the same because of the angles") if (arc->X == X1 && arc->Y == Y1 && arc->Width == width && pcb_normalize_angle(arc->StartAngle) == pcb_normalize_angle(sa) && arc->Delta == dir) @@ -281,7 +281,7 @@ pcb_arc_bbox(Arc); if (!Layer->arc_tree) Layer->arc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); Arc->type = PCB_OBJ_ARC; PCB_SET_PARENT(Arc, layer, Layer); } @@ -291,7 +291,7 @@ void pcb_arc_free(pcb_arc_t *arc) { if ((arc->parent.layer != NULL) && (arc->parent.layer->arc_tree != NULL)) - pcb_r_delete_entry(arc->parent.layer->arc_tree, (rnd_box_t *)arc); + pcb_r_delete_entry(arc->parent.layer->arc_tree, (rnd_rnd_box_t *)arc); rnd_attribute_free(&arc->Attributes); pcb_arc_unreg(arc); pcb_obj_common_free((pcb_any_obj_t *)arc); @@ -351,7 +351,7 @@ + (double)arc->Thickness * (double)arc->Thickness * (double)M_PI); /* cap circles */ } -rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc) +rnd_rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc) { return pcb_arc_bbox_(arc, 1); } @@ -362,7 +362,7 @@ if (ly == NULL) return; if (ly->arc_tree != NULL) - pcb_r_delete_entry(ly->arc_tree, (rnd_box_t *)arc); + pcb_r_delete_entry(ly->arc_tree, (rnd_rnd_box_t *)arc); pcb_poly_restore_to_poly(ly->parent.data, PCB_OBJ_ARC, ly, arc); } @@ -372,7 +372,7 @@ if (ly == NULL) return; if (ly->arc_tree != NULL) - pcb_r_insert_entry(ly->arc_tree, (rnd_box_t *)arc); + pcb_r_insert_entry(ly->arc_tree, (rnd_rnd_box_t *)arc); pcb_poly_clear_from_poly(ly->parent.data, PCB_OBJ_ARC, ly, arc); } @@ -386,7 +386,7 @@ rnd_coord_t Thickness, Clearance; rnd_coord_t Width, Height; rnd_coord_t X, Y; - pcb_angle_t StartAngle, Delta; + rnd_angle_t StartAngle, Delta; } undo_arc_geo_t; @@ -396,7 +396,7 @@ pcb_layer_t *layer = g->arc->parent.layer; if (layer->arc_tree != NULL) - pcb_r_delete_entry(layer->arc_tree, (rnd_box_t *)g->arc); + pcb_r_delete_entry(layer->arc_tree, (rnd_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); @@ -405,12 +405,12 @@ rnd_swap(rnd_coord_t, g->Height, g->arc->Height); rnd_swap(rnd_coord_t, g->X, g->arc->X); rnd_swap(rnd_coord_t, g->Y, g->arc->Y); - rnd_swap(pcb_angle_t, g->StartAngle, g->arc->StartAngle); - rnd_swap(pcb_angle_t, g->Delta, g->arc->Delta); + rnd_swap(rnd_angle_t, g->StartAngle, g->arc->StartAngle); + rnd_swap(rnd_angle_t, g->Delta, g->arc->Delta); pcb_arc_bbox(g->arc); if (layer->arc_tree != NULL) - pcb_r_insert_entry(layer->arc_tree, (rnd_box_t *)g->arc); + pcb_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *)g->arc); pcb_poly_clear_from_poly(layer->parent.data, PCB_OBJ_ARC, layer, g->arc); return 0; @@ -466,7 +466,7 @@ } pcb_poly_restore_to_poly(ctx->buffer.src, PCB_OBJ_ARC, srcly, arc); - pcb_r_delete_entry(srcly->arc_tree, (rnd_box_t *) arc); + pcb_r_delete_entry(srcly->arc_tree, (rnd_rnd_box_t *) arc); pcb_arc_unreg(arc); pcb_arc_reg(dstly, arc); @@ -475,7 +475,7 @@ if (!dstly->arc_tree) dstly->arc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dstly->arc_tree, (rnd_box_t *) arc); + pcb_r_insert_entry(dstly->arc_tree, (rnd_rnd_box_t *) arc); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_OBJ_ARC, dstly, arc); return arc; @@ -491,11 +491,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); - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); Arc->Thickness = value; pcb_arc_bbox(Arc); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -518,11 +518,11 @@ if (value != Arc->Clearance) { pcb_undo_add_obj_to_clear_size(PCB_OBJ_ARC, Layer, Arc, Arc); pcb_arc_invalidate_erase(Arc); - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); Arc->Clearance = value; pcb_arc_bbox(Arc); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -555,11 +555,11 @@ if (value != *dst) { pcb_undo_add_obj_to_change_radii(PCB_OBJ_ARC, Layer, Arc, Arc); pcb_arc_invalidate_erase(Arc); - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); *dst = value; pcb_arc_bbox(Arc); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -570,7 +570,7 @@ /* changes the angle of an arc (is_primary 0=start or 1=end) */ void *pcb_arcop_change_angle(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_angle_t value, *dst; + rnd_angle_t value, *dst; void *a0, *a1; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc)) @@ -594,11 +594,11 @@ if (value != *dst) { pcb_undo_add_obj_to_change_angles(PCB_OBJ_ARC, Layer, Arc, Arc); pcb_arc_invalidate_erase(Arc); - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); *dst = value; pcb_arc_bbox(Arc); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -677,10 +677,10 @@ void *pcb_arcop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arcop_move_noclip(ctx, Layer, Arc); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); return Arc; } @@ -688,11 +688,11 @@ void *pcb_arcop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { if (ctx->clip.restore) { - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); } if (ctx->clip.clear) { - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); } return Arc; @@ -701,7 +701,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) { - pcb_r_delete_entry(Source->arc_tree, (rnd_box_t *) arc); + pcb_r_delete_entry(Source->arc_tree, (rnd_rnd_box_t *) arc); pcb_arc_unreg(arc); pcb_arc_reg(Destination, arc); @@ -708,7 +708,7 @@ if (!Destination->arc_tree) Destination->arc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Destination->arc_tree, (rnd_box_t *) arc); + pcb_r_insert_entry(Destination->arc_tree, (rnd_rnd_box_t *) arc); return arc; } @@ -741,7 +741,7 @@ /* destroys an arc from a layer */ void *pcb_arcop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_arc_free(Arc); return NULL; @@ -795,14 +795,14 @@ pcb_arc_bbox(Arc); } -void pcb_arc_rotate(pcb_layer_t *layer, pcb_arc_t *arc, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle) +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) - pcb_r_delete_entry(layer->arc_tree, (rnd_box_t *) arc); + pcb_r_delete_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); pcb_rotate(&arc->X, &arc->Y, X, Y, cosa, sina); arc->StartAngle = pcb_normalize_angle(arc->StartAngle + angle); if (layer->arc_tree != NULL) - pcb_r_insert_entry(layer->arc_tree, (rnd_box_t *) arc); + pcb_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); } void pcb_arc_mirror(pcb_arc_t *arc, rnd_coord_t y_offs, rnd_bool undoable) @@ -827,13 +827,13 @@ void pcb_arc_flip_side(pcb_layer_t *layer, pcb_arc_t *arc) { - pcb_r_delete_entry(layer->arc_tree, (rnd_box_t *) arc); + pcb_r_delete_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); arc->X = PCB_SWAP_X(arc->X); arc->Y = PCB_SWAP_Y(arc->Y); arc->StartAngle = PCB_SWAP_ANGLE(arc->StartAngle); arc->Delta = PCB_SWAP_DELTA(arc->Delta); pcb_arc_bbox(arc); - pcb_r_insert_entry(layer->arc_tree, (rnd_box_t *) arc); + pcb_r_insert_entry(layer->arc_tree, (rnd_rnd_box_t *) arc); } void pcb_arc_scale(pcb_arc_t *arc, double sx, double sy, double sth) @@ -867,10 +867,10 @@ pcb_arc_invalidate_erase(Arc); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); if (Layer->arc_tree != NULL) - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_delete_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_arc_rotate90(Arc, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->arc_tree != NULL) - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) Arc); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -888,9 +888,9 @@ void *pcb_arc_insert_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *arc) { - pcb_angle_t end_ang = arc->StartAngle + arc->Delta; + rnd_angle_t end_ang = arc->StartAngle + arc->Delta; rnd_coord_t x = pcb_crosshair.X, y = pcb_crosshair.Y; - pcb_angle_t angle = atan2(-(y - arc->Y), (x - arc->X)) * 180.0 / M_PI + 180.0; + rnd_angle_t angle = atan2(-(y - arc->Y), (x - arc->X)) * 180.0 / M_PI + 180.0; pcb_arc_t *new_arc; if (end_ang > 360.0) @@ -1132,7 +1132,7 @@ pcb_arc_draw_(info, arc, allow_term_gfx); } -pcb_r_dir_t pcb_arc_draw_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_arc_draw_callback(const rnd_rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *)b; pcb_draw_info_t *info = cl; @@ -1147,7 +1147,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_arc_draw_term_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_arc_draw_term_callback(const rnd_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 30969) +++ trunk/src/obj_arc.h (revision 30970) @@ -39,7 +39,7 @@ rnd_coord_t Thickness, Clearance; rnd_coord_t Width, Height; /* length of axis */ rnd_coord_t X, Y; /* center coordinates */ - pcb_angle_t StartAngle, Delta; /* the two limiting angles in degrees */ + rnd_angle_t StartAngle, Delta; /* the two limiting angles in degrees */ gdl_elem_t link; /* an arc is in a list: either on a layer or in an element or in a font */ }; @@ -48,7 +48,7 @@ pcb_arc_t *pcb_arc_alloc_id(pcb_layer_t *layer, long int id); void pcb_arc_free(pcb_arc_t *data); -pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, rnd_coord_t center_x, rnd_coord_t center_y, rnd_coord_t width_r, rnd_coord_t height_r, pcb_angle_t start_angle, pcb_angle_t delta_angle, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags, rnd_bool prevent_dups); +pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, rnd_coord_t center_x, rnd_coord_t center_y, rnd_coord_t width_r, rnd_coord_t height_r, rnd_angle_t start_angle, rnd_angle_t delta_angle, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags, rnd_bool prevent_dups); pcb_arc_t *pcb_arc_dup(pcb_layer_t *dst, pcb_arc_t *src); pcb_arc_t *pcb_arc_dup_at(pcb_layer_t *dst, pcb_arc_t *src, rnd_coord_t dx, rnd_coord_t dy); void *pcb_arc_destroy(pcb_layer_t *Layer, pcb_arc_t *Arc); @@ -63,11 +63,11 @@ /*** Utility ***/ void pcb_arc_bbox(pcb_arc_t *Arc); void pcb_arc_rotate90(pcb_arc_t *Arc, rnd_coord_t X, rnd_coord_t Y, unsigned Number); -void pcb_arc_rotate(pcb_layer_t *layer, pcb_arc_t *arc, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle); +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); 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_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc); +rnd_rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc); /*** hash and eq ***/ @@ -89,7 +89,7 @@ void pcb_arc_approx(const pcb_arc_t *arc, double res, int reverse, void *uctx, int (*cb)(void *uctx, rnd_coord_t x, rnd_coord_t y)); -void pcb_arc_set_angles(pcb_layer_t *Layer, pcb_arc_t *a, pcb_angle_t new_sa, pcb_angle_t new_da); +void pcb_arc_set_angles(pcb_layer_t *Layer, pcb_arc_t *a, rnd_angle_t new_sa, rnd_angle_t new_da); void pcb_arc_set_radii(pcb_layer_t *Layer, pcb_arc_t *a, rnd_coord_t new_width, rnd_coord_t new_height); rnd_coord_t pcb_arc_length(const pcb_arc_t *arc); Index: trunk/src/obj_arc_draw.h =================================================================== --- trunk/src/obj_arc_draw.h (revision 30969) +++ trunk/src/obj_arc_draw.h (revision 30970) @@ -31,9 +31,9 @@ #include "draw.h" /* Include rtree.h for this */ -#ifdef PCB_RTREE_H -pcb_r_dir_t pcb_arc_draw_callback(const rnd_box_t * b, void *cl); -pcb_r_dir_t pcb_arc_draw_term_callback(const rnd_box_t * b, void *cl); +#ifdef RND_RTREE_H +pcb_r_dir_t pcb_arc_draw_callback(const rnd_rnd_box_t * b, void *cl); +pcb_r_dir_t pcb_arc_draw_term_callback(const rnd_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 30969) +++ trunk/src/obj_arc_ui.c (revision 30970) @@ -46,7 +46,7 @@ { int *end_pt = ch->AttachedObject.Ptr3; pcb_arc_t *arc = (pcb_arc_t *) pcb_crosshair.AttachedObject.Ptr2; - pcb_angle_t start = arc->StartAngle, delta = arc->Delta; + rnd_angle_t start = arc->StartAngle, delta = arc->Delta; if (end_pt == pcb_arc_start_ptr) { double end2, new_delta, new_start = atan2(-(ch->Y - arc->Y), (ch->X - arc->X)) * 180.0 / M_PI + 180.0; @@ -133,7 +133,7 @@ } -int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_box_t *res) +int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_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 30969) +++ trunk/src/obj_arc_ui.h (revision 30970) @@ -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_box_t *res); +int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_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 30969) +++ trunk/src/obj_common.c (revision 30970) @@ -72,7 +72,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_box_t *res) +int pcb_obj_get_bbox_naked(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_rnd_box_t *res) { switch (Type) { case PCB_OBJ_LINE: @@ -88,13 +88,13 @@ return 0; case PCB_OBJ_POLY_POINT: case PCB_OBJ_LINE_POINT: - *res = *(rnd_box_t *)Ptr3; + *res = *(rnd_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_box_t *)Ptr2; + *res = *(rnd_rnd_box_t *)Ptr2; return -1; } } @@ -423,7 +423,7 @@ } -void pcb_set_point_bounding_box(pcb_point_t *Pnt) +void pcb_set_point_bounding_box(rnd_point_t *Pnt) { Pnt->X2 = Pnt->X + 1; Pnt->Y2 = Pnt->Y + 1; Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 30969) +++ trunk/src/obj_common.h (revision 30970) @@ -83,8 +83,8 @@ /* point and box type - they are so common everything depends on them */ -struct pcb_point_s { /* a line/polygon point */ - rnd_coord_t X, Y, X2, Y2; /* so Point type can be cast as rnd_box_t */ +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 */ long int ID; }; @@ -168,7 +168,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_box_t *res); +int pcb_obj_get_bbox_naked(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_rnd_box_t *res); /* Host transformations: typically the transformations an object of a subc inherits from the subc */ @@ -213,13 +213,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_box_t BoundingBox; \ + rnd_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_box_t bbox_naked; \ + rnd_rnd_box_t bbox_naked; \ rnd_attribute_list_t Attributes \ #define PCB_ANY_PRIMITIVE_FIELDS \ @@ -237,7 +237,7 @@ #define PCB_ANYLINEFIELDS \ PCB_ANY_PRIMITIVE_FIELDS; \ rnd_coord_t Thickness, Clearance; \ - pcb_point_t Point1, Point2 + rnd_point_t Point1, Point2 /* All on-pcb objects (elements, lines, pads, vias, rats, etc) are based on this. */ @@ -276,7 +276,7 @@ void pcb_obj_change_id(pcb_any_obj_t *o, long int new_id); /* sets the bounding box of a point */ -void pcb_set_point_bounding_box(pcb_point_t *Pnt); +void pcb_set_point_bounding_box(rnd_point_t *Pnt); void pcb_obj_common_free(pcb_any_obj_t *o); Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 30969) +++ trunk/src/obj_gfx.c (revision 30970) @@ -98,9 +98,9 @@ } /* computes the bounding box of a gfx */ -static rnd_box_t pcb_gfx_bbox_(const pcb_gfx_t *gfx) +static rnd_rnd_box_t pcb_gfx_bbox_(const pcb_gfx_t *gfx) { - rnd_box_t res = {0}; + rnd_rnd_box_t res = {0}; int n; for(n = 0; n < 4; n++) rnd_box_bump_point(&res, gfx->cox[n], gfx->coy[n]); @@ -135,7 +135,7 @@ } /* creates a new gfx on a layer */ -pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_angle_t rot, pcb_flag_t Flags) +pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, rnd_angle_t rot, pcb_flag_t Flags) { pcb_gfx_t *gfx; @@ -185,7 +185,7 @@ pcb_gfx_bbox(gfx); if (!Layer->gfx_tree) Layer->gfx_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->gfx_tree, (rnd_box_t *)gfx); + pcb_r_insert_entry(Layer->gfx_tree, (rnd_rnd_box_t *)gfx); gfx->type = PCB_OBJ_GFX; PCB_SET_PARENT(gfx, layer, Layer); } @@ -195,7 +195,7 @@ void pcb_gfx_free(pcb_gfx_t *gfx) { if ((gfx->parent.layer != NULL) && (gfx->parent.layer->gfx_tree != NULL)) - pcb_r_delete_entry(gfx->parent.layer->gfx_tree, (rnd_box_t *)gfx); + pcb_r_delete_entry(gfx->parent.layer->gfx_tree, (rnd_rnd_box_t *)gfx); rnd_attribute_free(&gfx->Attributes); pcb_gfx_unreg(gfx); pcb_obj_common_free((pcb_any_obj_t *)gfx); @@ -239,7 +239,7 @@ if (ly == NULL) return; if (ly->gfx_tree != NULL) - pcb_r_delete_entry(ly->gfx_tree, (rnd_box_t *)gfx); + pcb_r_delete_entry(ly->gfx_tree, (rnd_rnd_box_t *)gfx); } void pcb_gfx_post(pcb_gfx_t *gfx) @@ -249,7 +249,7 @@ if (ly == NULL) return; if (ly->gfx_tree != NULL) - pcb_r_insert_entry(ly->gfx_tree, (rnd_box_t *)gfx); + pcb_r_insert_entry(ly->gfx_tree, (rnd_rnd_box_t *)gfx); } /***** operations *****/ @@ -259,7 +259,7 @@ typedef struct { pcb_gfx_t *gfx; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ rnd_coord_t cx, cy, sx, sy; - pcb_angle_t rot; + rnd_angle_t rot; } undo_gfx_geo_t; static int undo_gfx_geo_swap(void *udata) @@ -268,13 +268,13 @@ pcb_layer_t *layer = g->gfx->parent.layer; if (layer->gfx_tree != NULL) - pcb_r_delete_entry(layer->gfx_tree, (rnd_box_t *)g->gfx); + pcb_r_delete_entry(layer->gfx_tree, (rnd_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); rnd_swap(rnd_coord_t, g->sx, g->gfx->sx); rnd_swap(rnd_coord_t, g->sy, g->gfx->sy); - rnd_swap(pcb_angle_t, g->rot, g->gfx->rot); + rnd_swap(rnd_angle_t, g->rot, g->gfx->rot); if (g->rot != g->gfx->rot) g->gfx->pxm_xformed = pcb_pixmap_alloc_insert_transformed(&pcb_pixmaps, g->gfx->pxm_neutral, g->gfx->rot, g->gfx->xmirror, g->gfx->ymirror); @@ -282,7 +282,7 @@ pcb_gfx_update(g->gfx); pcb_gfx_bbox(g->gfx); if (layer->gfx_tree != NULL) - pcb_r_insert_entry(layer->gfx_tree, (rnd_box_t *)g->gfx); + pcb_r_insert_entry(layer->gfx_tree, (rnd_rnd_box_t *)g->gfx); return 0; } @@ -335,7 +335,7 @@ dstly = &ctx->buffer.dst->Layer[lid]; } - pcb_r_delete_entry(srcly->gfx_tree, (rnd_box_t *) gfx); + pcb_r_delete_entry(srcly->gfx_tree, (rnd_rnd_box_t *) gfx); pcb_gfx_unreg(gfx); pcb_gfx_reg(dstly, gfx); @@ -344,7 +344,7 @@ if (!dstly->gfx_tree) dstly->gfx_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dstly->gfx_tree, (rnd_box_t *) gfx); + pcb_r_insert_entry(dstly->gfx_tree, (rnd_rnd_box_t *) gfx); return gfx; } @@ -392,9 +392,9 @@ void *pcb_gfxop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_gfx_t *gfx) { - pcb_r_delete_entry(Layer->gfx_tree, (rnd_box_t *)gfx); + pcb_r_delete_entry(Layer->gfx_tree, (rnd_rnd_box_t *)gfx); pcb_gfxop_move_noclip(ctx, Layer, gfx); - pcb_r_insert_entry(Layer->gfx_tree, (rnd_box_t *)gfx); + pcb_r_insert_entry(Layer->gfx_tree, (rnd_rnd_box_t *)gfx); return gfx; } @@ -401,7 +401,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) { - pcb_r_delete_entry(Source->gfx_tree, (rnd_box_t *)gfx); + pcb_r_delete_entry(Source->gfx_tree, (rnd_rnd_box_t *)gfx); pcb_gfx_unreg(gfx); pcb_gfx_reg(Destination, gfx); @@ -408,7 +408,7 @@ if (!Destination->gfx_tree) Destination->gfx_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Destination->gfx_tree, (rnd_box_t *)gfx); + pcb_r_insert_entry(Destination->gfx_tree, (rnd_rnd_box_t *)gfx); return gfx; } @@ -439,7 +439,7 @@ /* destroys a gfx from a layer */ void *pcb_gfxop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_gfx_t *gfx) { - pcb_r_delete_entry(Layer->gfx_tree, (rnd_box_t *) gfx); + pcb_r_delete_entry(Layer->gfx_tree, (rnd_rnd_box_t *) gfx); pcb_gfx_free(gfx); return NULL; @@ -477,10 +477,10 @@ pcb_gfx_bbox(gfx); } -void pcb_gfx_rotate(pcb_layer_t *layer, pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle) +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) - pcb_r_delete_entry(layer->gfx_tree, (rnd_box_t *) gfx); + pcb_r_delete_entry(layer->gfx_tree, (rnd_rnd_box_t *) gfx); gfx->rot = pcb_normalize_angle(gfx->rot + angle); TODO("rotate content") @@ -488,7 +488,7 @@ pcb_gfx_bbox(gfx); if (layer->gfx_tree != NULL) - pcb_r_insert_entry(layer->gfx_tree, (rnd_box_t *) gfx); + pcb_r_insert_entry(layer->gfx_tree, (rnd_rnd_box_t *) gfx); } void pcb_gfx_mirror(pcb_gfx_t *gfx, rnd_coord_t y_offs, rnd_bool undoable) @@ -511,16 +511,16 @@ void pcb_gfx_flip_side(pcb_layer_t *layer, pcb_gfx_t *gfx) { - pcb_r_delete_entry(layer->gfx_tree, (rnd_box_t *)gfx); + pcb_r_delete_entry(layer->gfx_tree, (rnd_rnd_box_t *)gfx); gfx->cx = PCB_SWAP_X(gfx->cx); gfx->cy = PCB_SWAP_Y(gfx->cy); gfx->rot = PCB_SWAP_ANGLE(gfx->rot); pcb_gfx_update(gfx); pcb_gfx_bbox(gfx); - pcb_r_insert_entry(layer->gfx_tree, (rnd_box_t *)gfx); + pcb_r_insert_entry(layer->gfx_tree, (rnd_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, pcb_angle_t rot, rnd_bool undoable) +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) { undo_gfx_geo_t gtmp, *g = >mp; @@ -559,10 +559,10 @@ { pcb_gfx_invalidate_erase(gfx); if (Layer->gfx_tree != NULL) - pcb_r_delete_entry(Layer->gfx_tree, (rnd_box_t *) gfx); + pcb_r_delete_entry(Layer->gfx_tree, (rnd_rnd_box_t *) gfx); pcb_gfx_rotate90(gfx, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->gfx_tree != NULL) - pcb_r_insert_entry(Layer->gfx_tree, (rnd_box_t *) gfx); + pcb_r_insert_entry(Layer->gfx_tree, (rnd_rnd_box_t *) gfx); pcb_gfx_invalidate_draw(Layer, gfx); return gfx; } @@ -668,7 +668,7 @@ pcb_gfx_draw_(info, gfx, allow_term_gfx); } -pcb_r_dir_t pcb_gfx_draw_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t pcb_gfx_draw_callback(const rnd_rnd_box_t *b, void *cl) { pcb_gfx_t *gfx = (pcb_gfx_t *)b; pcb_draw_info_t *info = cl; Index: trunk/src/obj_gfx.h =================================================================== --- trunk/src/obj_gfx.h (revision 30969) +++ trunk/src/obj_gfx.h (revision 30970) @@ -38,7 +38,7 @@ PCB_ANY_PRIMITIVE_FIELDS; rnd_coord_t cx, cy; /* center coordinates */ rnd_coord_t sx, sy; /* size x and y on board (net box size before rotation) */ - pcb_angle_t rot; + rnd_angle_t rot; unsigned int xmirror:1, ymirror:1; pcb_pixmap_t *pxm_neutral; /* graphics is a pixmap, if not NULL - in neutral scale/rot */ @@ -54,7 +54,7 @@ pcb_gfx_t *pcb_gfx_alloc_id(pcb_layer_t *layer, long int id); void pcb_gfx_free(pcb_gfx_t *data); -pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_angle_t rot, pcb_flag_t Flags); +pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, rnd_angle_t rot, pcb_flag_t Flags); pcb_gfx_t *pcb_gfx_dup(pcb_layer_t *dst, pcb_gfx_t *src); pcb_gfx_t *pcb_gfx_dup_at(pcb_layer_t *dst, pcb_gfx_t *src, rnd_coord_t dx, rnd_coord_t dy); void *pcb_gfx_destroy(pcb_layer_t *Layer, pcb_gfx_t *gfx); @@ -70,11 +70,11 @@ void pcb_gfx_update(pcb_gfx_t *gfx); /* update corner cache: call this after any geometry change */ void pcb_gfx_bbox(pcb_gfx_t *gfx); void pcb_gfx_rotate90(pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, unsigned Number); -void pcb_gfx_rotate(pcb_layer_t *layer, pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle); +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); void pcb_gfx_mirror(pcb_gfx_t *gfx, rnd_coord_t y_offs, rnd_bool undoable); void pcb_gfx_flip_side(pcb_layer_t *layer, pcb_gfx_t *gfx); void pcb_gfx_scale(pcb_gfx_t *gfx, double sx, double sy, double sth); -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, pcb_angle_t rot, rnd_bool undoable); +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); /* assings pxm to gfx and free pxm (if needed) */ void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, pcb_pixmap_t *pxm, rnd_bool undoable); Index: trunk/src/obj_gfx_draw.h =================================================================== --- trunk/src/obj_gfx_draw.h (revision 30969) +++ trunk/src/obj_gfx_draw.h (revision 30970) @@ -30,8 +30,8 @@ #include "draw.h" /* Include rtree.h for this */ -#ifdef PCB_RTREE_H -pcb_r_dir_t pcb_gfx_draw_callback(const rnd_box_t * b, void *cl); +#ifdef RND_RTREE_H +pcb_r_dir_t pcb_gfx_draw_callback(const rnd_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_hash.h =================================================================== --- trunk/src/obj_hash.h (revision 30969) +++ trunk/src/obj_hash.h (revision 30970) @@ -71,7 +71,7 @@ } -RND_INLINE unsigned pcb_hash_angle(const pcb_host_trans_t *tr, pcb_angle_t ang) +RND_INLINE unsigned pcb_hash_angle(const pcb_host_trans_t *tr, rnd_angle_t ang) { long l; ang = fmod(ang + tr->rot, 360.0); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 30969) +++ trunk/src/obj_line.c (revision 30970) @@ -110,7 +110,7 @@ void pcb_line_free(pcb_line_t *line) { if ((line->parent.layer != NULL) && (line->parent.layer->line_tree != NULL)) - pcb_r_delete_entry(line->parent.layer->line_tree, (rnd_box_t *)line); + pcb_r_delete_entry(line->parent.layer->line_tree, (rnd_rnd_box_t *)line); rnd_attribute_free(&line->Attributes); pcb_line_unreg(line); pcb_obj_common_free((pcb_any_obj_t *)line); @@ -125,7 +125,7 @@ typedef struct { pcb_line_t *line; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ rnd_coord_t Thickness, Clearance; - pcb_point_t Point1, Point2; + rnd_point_t Point1, Point2; } undo_line_geo_t; static int undo_line_geo_swap(void *udata) @@ -134,17 +134,17 @@ pcb_layer_t *layer = g->line->parent.layer; if (layer->line_tree != NULL) - pcb_r_delete_entry(layer->line_tree, (rnd_box_t *)g->line); + pcb_r_delete_entry(layer->line_tree, (rnd_rnd_box_t *)g->line); pcb_poly_restore_to_poly(layer->parent.data, PCB_OBJ_LINE, layer, g->line); - rnd_swap(pcb_point_t, g->Point1, g->line->Point1); - rnd_swap(pcb_point_t, g->Point2, g->line->Point2); + rnd_swap(rnd_point_t, g->Point1, g->line->Point1); + rnd_swap(rnd_point_t, g->Point2, g->line->Point2); rnd_swap(rnd_coord_t, g->Thickness, g->line->Thickness); rnd_swap(rnd_coord_t, g->Clearance, g->line->Clearance); pcb_line_bbox(g->line); if (layer->line_tree != NULL) - pcb_r_insert_entry(layer->line_tree, (rnd_box_t *)g->line); + pcb_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *)g->line); pcb_poly_clear_from_poly(layer->parent.data, PCB_OBJ_LINE, layer, g->line); return 0; @@ -173,7 +173,7 @@ jmp_buf env; }; -static pcb_r_dir_t line_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t line_callback(const rnd_rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct line_info *i = (struct line_info *) cl; @@ -249,7 +249,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; - rnd_box_t search; + rnd_rnd_box_t search; search.X1 = MIN(X1, X2); search.X2 = MAX(X1, X2); @@ -339,12 +339,12 @@ pcb_line_bbox(Line); if (!Layer->line_tree) Layer->line_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(Layer->line_tree, (rnd_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_box_t *dst, int mini) +static void pcb_line_bbox_(const pcb_line_t *Line, rnd_rnd_box_t *dst, int mini) { rnd_coord_t width = mini ? (Line->Thickness + 1) / 2 : (Line->Thickness + Line->Clearance + 1) / 2; @@ -454,7 +454,7 @@ if (ly == NULL) return; if (ly->line_tree != NULL) - pcb_r_delete_entry(ly->line_tree, (rnd_box_t *)line); + pcb_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)line); pcb_poly_restore_to_poly(ly->parent.data, PCB_OBJ_LINE, ly, line); } @@ -464,7 +464,7 @@ if (ly == NULL) return; if (ly->line_tree != NULL) - pcb_r_insert_entry(ly->line_tree, (rnd_box_t *)line); + pcb_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)line); pcb_poly_clear_from_poly(ly->parent.data, PCB_OBJ_LINE, ly, line); } @@ -505,7 +505,7 @@ } pcb_poly_restore_to_poly(ctx->buffer.src, PCB_OBJ_LINE, srcly, line); - pcb_r_delete_entry(srcly->line_tree, (rnd_box_t *)line); + pcb_r_delete_entry(srcly->line_tree, (rnd_rnd_box_t *)line); pcb_line_unreg(line); pcb_line_reg(dstly, line); @@ -514,7 +514,7 @@ if (!dstly->line_tree) dstly->line_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dstly->line_tree, (rnd_box_t *)line); + pcb_r_insert_entry(dstly->line_tree, (rnd_rnd_box_t *)line); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_OBJ_LINE, dstly, line); return line; @@ -530,11 +530,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); - pcb_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (rnd_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); - pcb_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(Layer->line_tree, (rnd_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; @@ -558,10 +558,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); - pcb_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); Line->Clearance = value; pcb_line_bbox(Line); - pcb_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(Layer->line_tree, (rnd_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; @@ -638,12 +638,12 @@ void *pcb_lineop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { if (Layer->line_tree != NULL) - pcb_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (rnd_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) - pcb_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(Layer->line_tree, (rnd_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; @@ -652,12 +652,12 @@ void *pcb_lineop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { if (ctx->clip.restore) { - pcb_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (rnd_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) { - pcb_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); if (ctx->clip.pcb != NULL) pcb_poly_clear_from_poly(ctx->clip.pcb->Data, PCB_OBJ_LINE, Layer, Line); } @@ -665,7 +665,7 @@ } /* moves one end of a line */ -void *pcb_lineop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) +void *pcb_lineop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point) { if (Layer) { if (Layer->meta.real.vis) @@ -695,7 +695,7 @@ } /* moves one end of a line */ -void *pcb_lineop_move_point_with_route(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) +void *pcb_lineop_move_point_with_route(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point) { if ((conf_core.editor.move_linepoint_uses_route == 0) || !Layer) { pcb_undo_add_obj_to_move(PCB_OBJ_LINE_POINT, Layer, Line, Point, ctx->move.dx, ctx->move.dy); @@ -705,8 +705,8 @@ /* Move with Route Code */ pcb_route_t route; int mod1, is_first = (&Line->Point1 == Point); - pcb_point_t point1 = Line->Point1; - pcb_point_t point2 = Line->Point2; + rnd_point_t point1 = Line->Point1; + rnd_point_t point2 = Line->Point2; if (is_first) { point1.X += ctx->move.dx; @@ -742,7 +742,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) { - pcb_r_delete_entry(Source->line_tree, (rnd_box_t *) line); + pcb_r_delete_entry(Source->line_tree, (rnd_rnd_box_t *) line); pcb_line_unreg(line); pcb_line_reg(Destination, line); @@ -749,7 +749,7 @@ if (!Destination->line_tree) Destination->line_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Destination->line_tree, (rnd_box_t *) line); + pcb_r_insert_entry(Destination->line_tree, (rnd_rnd_box_t *) line); return line; } @@ -762,7 +762,7 @@ jmp_buf env; }; -static pcb_r_dir_t moveline_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t moveline_callback(const rnd_rnd_box_t * b, void *cl) { struct via_info *i = (struct via_info *) cl; pcb_pstk_t *ps; @@ -778,7 +778,7 @@ void *pcb_lineop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * Layer, pcb_line_t * Line) { struct via_info info; - rnd_box_t sb; + rnd_rnd_box_t sb; pcb_line_t *newone; void *ptr1, *ptr2, *ptr3; @@ -834,7 +834,7 @@ /* destroys a line from a layer */ void *pcb_lineop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { - pcb_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); pcb_line_free(Line); return NULL; @@ -844,9 +844,9 @@ struct rlp_info { jmp_buf env; pcb_line_t *line; - pcb_point_t *point; + rnd_point_t *point; }; -static pcb_r_dir_t remove_point(const rnd_box_t * b, void *cl) +static pcb_r_dir_t remove_point(const rnd_rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct rlp_info *info = (struct rlp_info *) cl; @@ -868,9 +868,9 @@ } /* removes a line point, or a line if the selected point is the end */ -void *pcb_lineop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) +void *pcb_lineop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point) { - pcb_point_t other; + rnd_point_t other; struct rlp_info info; if (&Line->Point1 == Point) other = Line->Point2; @@ -879,7 +879,7 @@ info.line = Line; info.point = Point; if (setjmp(info.env) == 0) { - pcb_r_search(Layer->line_tree, (const rnd_box_t *) Point, NULL, remove_point, &info, NULL); + pcb_r_search(Layer->line_tree, (const rnd_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); @@ -938,12 +938,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) - pcb_r_delete_entry(layer->line_tree, (rnd_box_t *) line); + pcb_r_delete_entry(layer->line_tree, (rnd_rnd_box_t *) line); pcb_rotate(&line->Point1.X, &line->Point1.Y, X, Y, cosa, sina); pcb_rotate(&line->Point2.X, &line->Point2.Y, X, Y, cosa, sina); pcb_line_bbox(line); if (layer->line_tree != NULL) - pcb_r_insert_entry(layer->line_tree, (rnd_box_t *) line); + pcb_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *) line); } void pcb_line_mirror(pcb_line_t *line, rnd_coord_t y_offs, rnd_bool undoable) @@ -992,13 +992,13 @@ void pcb_line_flip_side(pcb_layer_t *layer, pcb_line_t *line) { - pcb_r_delete_entry(layer->line_tree, (rnd_box_t *) line); + pcb_r_delete_entry(layer->line_tree, (rnd_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); - pcb_r_insert_entry(layer->line_tree, (rnd_box_t *) line); + pcb_r_insert_entry(layer->line_tree, (rnd_rnd_box_t *) line); } static void rotate_line1(pcb_layer_t *Layer, pcb_line_t *Line) @@ -1008,10 +1008,10 @@ if (!Layer->is_bound) pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_LINE, Layer, Line); if (Layer->line_tree != NULL) - pcb_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (rnd_rnd_box_t *) Line); } else - pcb_r_delete_entry(PCB->Data->rat_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(PCB->Data->rat_tree, (rnd_rnd_box_t *) Line); } static void rotate_line2(pcb_layer_t *Layer, pcb_line_t *Line) @@ -1019,19 +1019,19 @@ pcb_line_bbox(Line); if (Layer) { if (Layer->line_tree != NULL) - pcb_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(Layer->line_tree, (rnd_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 { - pcb_r_insert_entry(PCB->Data->rat_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(PCB->Data->rat_tree, (rnd_rnd_box_t *) Line); pcb_rat_invalidate_draw((pcb_rat_t *) Line); } } /* rotates a line's point */ -void *pcb_lineop_rotate90_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) +void *pcb_lineop_rotate90_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point) { rotate_line1(Layer, Line); @@ -1070,12 +1070,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); - pcb_r_delete_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_delete_entry(Layer->line_tree, (rnd_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); - pcb_r_insert_entry(Layer->line_tree, (rnd_box_t *) Line); + pcb_r_insert_entry(Layer->line_tree, (rnd_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 @@ -1248,7 +1248,7 @@ pcb_line_draw_(info, line, allow_term_gfx); } -pcb_r_dir_t pcb_line_draw_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_line_draw_callback(const rnd_rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *)b; pcb_draw_info_t *info = cl; @@ -1263,7 +1263,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_line_draw_term_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_line_draw_term_callback(const rnd_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.h =================================================================== --- trunk/src/obj_line.h (revision 30969) +++ trunk/src/obj_line.h (revision 30970) @@ -41,7 +41,7 @@ /* crosshair: */ typedef struct { /* current marked line */ - pcb_point_t Point1, Point2; /* start- and end-position */ + rnd_point_t Point1, Point2; /* start- and end-position */ long int State; rnd_bool draw; } pcb_attached_line_t; @@ -114,7 +114,7 @@ the fields of 'end' needed to find the closest point to the original target that still won't hit any object. Returns the straigh-line distance between start and the new end. */ -double pcb_drc_lines(pcb_board_t *pcb, const pcb_point_t *start, pcb_point_t *end, pcb_point_t *mid_out, rnd_bool way, rnd_bool optimize); +double pcb_drc_lines(pcb_board_t *pcb, const rnd_point_t *start, rnd_point_t *end, rnd_point_t *mid_out, rnd_bool way, rnd_bool optimize); /* Rather than mode the line bounding box, we set it so the point bounding Index: trunk/src/obj_line_draw.h =================================================================== --- trunk/src/obj_line_draw.h (revision 30969) +++ trunk/src/obj_line_draw.h (revision 30970) @@ -31,9 +31,9 @@ #include "draw.h" /* Include rtree.h for this */ -#ifdef PCB_RTREE_H -pcb_r_dir_t pcb_line_draw_callback(const rnd_box_t * b, void *cl); -pcb_r_dir_t pcb_line_draw_term_callback(const rnd_box_t * b, void *cl); +#ifdef RND_RTREE_H +pcb_r_dir_t pcb_line_draw_callback(const rnd_rnd_box_t * b, void *cl); +pcb_r_dir_t pcb_line_draw_term_callback(const rnd_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 30969) +++ trunk/src/obj_line_drcenf.c (revision 30970) @@ -195,7 +195,7 @@ jmp_buf env; }; -static pcb_r_dir_t drcPstk_callback(const rnd_box_t *b, void *cl) +static pcb_r_dir_t drcPstk_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t drcLine_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t drcLine_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t drcArc_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t drcArc_callback(const rnd_rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *) b; struct drc_info *i = (struct drc_info *) cl; @@ -225,7 +225,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -double pcb_drc_lines(pcb_board_t *pcb, const pcb_point_t *start, pcb_point_t *end, pcb_point_t *mid_out, rnd_bool way, rnd_bool optimize) +double pcb_drc_lines(pcb_board_t *pcb, const rnd_point_t *start, rnd_point_t *end, rnd_point_t *mid_out, rnd_bool way, rnd_bool optimize) { double f, s, f2, s2, len, best; rnd_coord_t dx, dy, temp, last, length; @@ -234,7 +234,7 @@ pcb_layergrp_id_t group, comp; struct drc_info info; rnd_bool two_lines, x_is_long, blocker; - pcb_point_t ans; + rnd_point_t ans; f = 1.0; s = 0.5; @@ -398,13 +398,13 @@ return best; } -static void drc_line(pcb_point_t *end) +static void drc_line(rnd_point_t *end) { struct drc_info info; pcb_layergrp_id_t group, comp; pcb_line_t line; pcb_attached_line_t aline; - static pcb_point_t last_good; /* internal state of last good endpoint - we can do this cheat, because... */ + static rnd_point_t last_good; /* internal state of last good endpoint - we can do this cheat, because... */ /* ... we hardwire the assumption on how a line is drawn: it starts out as a 0 long segment, which is valid: */ if ((pcb_crosshair.AttachedLine.Point1.X == pcb_crosshair.X) && (pcb_crosshair.AttachedLine.Point1.Y == pcb_crosshair.Y)) { @@ -460,7 +460,7 @@ void pcb_line_enforce_drc(pcb_board_t *pcb) { - pcb_point_t r45, rs, start; + rnd_point_t r45, rs, start; rnd_bool shift; double r1, r2; Index: trunk/src/obj_line_op.h =================================================================== --- trunk/src/obj_line_op.h (revision 30969) +++ trunk/src/obj_line_op.h (revision 30970) @@ -42,14 +42,14 @@ void *pcb_lineop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); void *pcb_lineop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); void *pcb_lineop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); -void *pcb_lineop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); -void *pcb_lineop_move_point_with_route(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); +void *pcb_lineop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point); +void *pcb_lineop_move_point_with_route(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point); void *pcb_lineop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_line_t * line, pcb_layer_t * Destination); void *pcb_lineop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * Layer, pcb_line_t * Line); void *pcb_lineop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); -void *pcb_lineop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); +void *pcb_lineop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point); void *pcb_lineop_remove(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); -void *pcb_lineop_rotate90_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); +void *pcb_lineop_rotate90_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *Point); void *pcb_lineop_rotate90(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); void *pcb_lineop_rotate(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); void *pcb_lineop_change_flag(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); Index: trunk/src/obj_pinvia_therm.c =================================================================== --- trunk/src/obj_pinvia_therm.c (revision 30969) +++ trunk/src/obj_pinvia_therm.c (revision 30970) @@ -41,7 +41,7 @@ #include #include "obj_pinvia_therm.h" -static pcb_polyarea_t *pcb_pa_diag_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t l, rnd_coord_t w, rnd_bool rt) +static rnd_polyarea_t *pcb_pa_diag_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t l, rnd_coord_t w, rnd_bool rt) { pcb_pline_t *c; pcb_vector_t v; @@ -76,15 +76,15 @@ return pcb_poly_from_contour(c); } -/* ThermPoly returns a pcb_polyarea_t having all of the clearance that when +/* ThermPoly returns a rnd_polyarea_t having all of the clearance that when * subtracted from the plane create the desired thermal fingers. * Usually this is 4 disjoint regions. * */ -pcb_polyarea_t *ThermPoly_(pcb_board_t *pcb, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, rnd_cardinal_t style) +rnd_polyarea_t *ThermPoly_(pcb_board_t *pcb, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, rnd_cardinal_t style) { pcb_arc_t a; - pcb_polyarea_t *pa, *arc; + rnd_polyarea_t *pa, *arc; /* must be circular */ switch (style) { @@ -91,7 +91,7 @@ case 1: case 2: { - pcb_polyarea_t *m; + rnd_polyarea_t *m; rnd_coord_t t = (thickness + clearance) / 2; rnd_coord_t w = 0.5 * pcb->ThermScale * clearance; pa = pcb_poly_from_circle(cx, cy, t); Index: trunk/src/obj_pinvia_therm.h =================================================================== --- trunk/src/obj_pinvia_therm.h (revision 30969) +++ trunk/src/obj_pinvia_therm.h (revision 30970) @@ -34,6 +34,6 @@ #include #include "config.h" -pcb_polyarea_t *ThermPoly_(pcb_board_t *p, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, rnd_cardinal_t style); +rnd_polyarea_t *ThermPoly_(pcb_board_t *p, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, rnd_cardinal_t style); #endif Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 30969) +++ trunk/src/obj_poly.c (revision 30970) @@ -109,7 +109,7 @@ void pcb_poly_free(pcb_poly_t *poly) { if ((poly->parent.layer != NULL) && (poly->parent.layer->polygon_tree != NULL)) - pcb_r_delete_entry(poly->parent.layer->polygon_tree, (rnd_box_t *)poly); + pcb_r_delete_entry(poly->parent.layer->polygon_tree, (rnd_rnd_box_t *)poly); rnd_attribute_free(&poly->Attributes); pcb_poly_unreg(poly); pcb_obj_common_free((pcb_any_obj_t *)poly); @@ -117,16 +117,16 @@ } /* gets the next slot for a point in a polygon struct, allocates memory if necessary */ -pcb_point_t *pcb_poly_point_alloc(pcb_poly_t *Polygon) +rnd_point_t *pcb_poly_point_alloc(pcb_poly_t *Polygon) { - pcb_point_t *points = Polygon->Points; + rnd_point_t *points = Polygon->Points; /* realloc new memory if necessary and clear it */ if (Polygon->PointN >= Polygon->PointMax) { Polygon->PointMax += STEP_POLYGONPOINT; - points = (pcb_point_t *) realloc(points, Polygon->PointMax * sizeof(pcb_point_t)); + points = (rnd_point_t *) realloc(points, Polygon->PointMax * sizeof(rnd_point_t)); Polygon->Points = points; - memset(points + Polygon->PointN, 0, STEP_POLYGONPOINT * sizeof(pcb_point_t)); + memset(points + Polygon->PointN, 0, STEP_POLYGONPOINT * sizeof(rnd_point_t)); } return (points + Polygon->PointN++); } @@ -192,7 +192,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) - pcb_r_delete_entry(layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); PCB_POLY_POINT_LOOP(polygon); { pcb_rotate(&point->X, &point->Y, X, Y, cosa, sina); @@ -202,13 +202,13 @@ pcb_poly_init_clip(layer->parent.data, layer, polygon); pcb_poly_bbox(polygon); if (layer->polygon_tree != NULL) - pcb_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); } int pcb_poly_is_valid(pcb_poly_t *p) { pcb_pline_t *contour = NULL; - pcb_polyarea_t *np1 = NULL, *np = NULL; + rnd_polyarea_t *np1 = NULL, *np = NULL; rnd_cardinal_t n; pcb_vector_t v; int res = 1; @@ -292,7 +292,7 @@ pcb_layer_t *layer = g->poly->parent.layer; if (layer->polygon_tree != NULL) - pcb_r_delete_entry(layer->polygon_tree, (rnd_box_t *)g->poly); + pcb_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *)g->poly); PCB_POLY_POINT_LOOP(g->poly); { point->X = PCB_SWAP_X(point->X); @@ -303,7 +303,7 @@ pcb_poly_init_clip(layer->parent.data, layer, g->poly); pcb_poly_bbox(g->poly); if (layer->polygon_tree != NULL) - pcb_r_insert_entry(layer->polygon_tree, (rnd_box_t *)g->poly); + pcb_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *)g->poly); return 0; } @@ -338,7 +338,7 @@ void pcb_poly_flip_side(pcb_layer_t *layer, pcb_poly_t *polygon) { - pcb_r_delete_entry(layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_delete_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); PCB_POLY_POINT_LOOP(polygon); { point->X = PCB_SWAP_X(point->X); @@ -348,7 +348,7 @@ if (layer->parent_type == PCB_PARENT_DATA) pcb_poly_init_clip(layer->parent.data, layer, polygon); pcb_poly_bbox(polygon); - pcb_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); /* hmmm, how to handle clip */ } @@ -481,7 +481,7 @@ pcb_poly_bbox(polygon); if (!Layer->polygon_tree) Layer->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) polygon); PCB_SET_PARENT(polygon, layer, Layer); pcb_poly_clear_from_poly(Layer->parent.data, PCB_OBJ_POLY, Layer, polygon); } @@ -538,9 +538,9 @@ } /* creates a new point in a polygon */ -pcb_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y) +rnd_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y) { - pcb_point_t *point = pcb_poly_point_alloc(Polygon); + rnd_point_t *point = pcb_poly_point_alloc(Polygon); /* copy values */ point->X = X; @@ -577,7 +577,7 @@ return Dest; } -static double poly_area(pcb_point_t *points, rnd_cardinal_t n_points) +static double poly_area(rnd_point_t *points, rnd_cardinal_t n_points) { double area = 0; int n; @@ -639,7 +639,7 @@ */ if (!layer->polygon_tree) layer->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) polygon); PCB_FLAG_CLEAR(PCB_FLAG_FOUND | ctx->buffer.extraflg, polygon); return polygon; @@ -663,7 +663,7 @@ pcb_poly_pprestore(polygon); - pcb_r_delete_entry(srcly->polygon_tree, (rnd_box_t *)polygon); + pcb_r_delete_entry(srcly->polygon_tree, (rnd_rnd_box_t *)polygon); pcb_poly_unreg(polygon); pcb_poly_reg(dstly, polygon); @@ -672,7 +672,7 @@ if (!dstly->polygon_tree) dstly->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dstly->polygon_tree, (rnd_box_t *)polygon); + pcb_r_insert_entry(dstly->polygon_tree, (rnd_rnd_box_t *)polygon); pcb_poly_ppclear(polygon); return polygon; @@ -694,10 +694,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); - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *)poly); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *)poly); poly->Clearance = value; pcb_poly_bbox(poly); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *)poly); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_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; @@ -732,7 +732,7 @@ /* inserts a point into a polygon */ void *pcb_polyop_insert_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { - pcb_point_t save; + rnd_point_t save; rnd_cardinal_t n; pcb_line_t line; @@ -752,7 +752,7 @@ * second, shift the points up to make room for the new point */ pcb_poly_invalidate_erase(Polygon); - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_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]; @@ -767,7 +767,7 @@ pcb_undo_add_obj_to_insert_point(PCB_OBJ_POLY_POINT, Layer, Polygon, &Polygon->Points[ctx->insert.idx]); pcb_poly_bbox(Polygon); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_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); @@ -824,10 +824,10 @@ void *pcb_polyop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_pprestore(Polygon); pcb_polyop_move_noclip(ctx, Layer, Polygon); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_ppclear(Polygon); return Polygon; } @@ -835,26 +835,26 @@ void *pcb_polyop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { if (ctx->clip.restore) { - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_pprestore(Polygon); } if (ctx->clip.clear) { - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_ppclear(Polygon); } return Polygon; } /* moves a polygon-point */ -void *pcb_polyop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point) +void *pcb_polyop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_point_t *Point) { pcb_poly_pprestore(Polygon); if (Layer->meta.real.vis) { pcb_poly_invalidate_erase(Polygon); } - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); RND_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_poly_bbox(Polygon); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_remove_excess_points(Layer, Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (Layer->meta.real.vis) @@ -866,7 +866,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) { - pcb_r_delete_entry(Source->polygon_tree, (rnd_box_t *) polygon); + pcb_r_delete_entry(Source->polygon_tree, (rnd_rnd_box_t *) polygon); pcb_poly_pprestore(polygon); pcb_poly_unreg(polygon); @@ -874,7 +874,7 @@ if (!Destination->polygon_tree) Destination->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Destination->polygon_tree, (rnd_box_t *) polygon); + pcb_r_insert_entry(Destination->polygon_tree, (rnd_rnd_box_t *) polygon); pcb_poly_ppclear(polygon); return polygon; @@ -906,7 +906,7 @@ /* destroys a polygon from a layer */ void *pcb_polyop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_free_fields(Polygon); pcb_poly_free(Polygon); @@ -915,7 +915,7 @@ } /* removes a polygon-point from a polygon and destroys the data */ -void *pcb_polyop_destroy_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point) +void *pcb_polyop_destroy_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_point_t *Point) { rnd_cardinal_t point_idx; rnd_cardinal_t i; @@ -932,7 +932,7 @@ if (contour_points <= 3) return pcb_polyop_remove_counter(ctx, Layer, Polygon, contour); - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -945,7 +945,7 @@ Polygon->HoleIndex[i]--; pcb_poly_bbox(Polygon); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); pcb_poly_ppclear(Polygon); return Polygon; @@ -1018,7 +1018,7 @@ } /* removes a polygon-point from a polygon */ -void *pcb_polyop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point) +void *pcb_polyop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_point_t *Point) { rnd_cardinal_t point_idx; rnd_cardinal_t i; @@ -1041,7 +1041,7 @@ /* insert the polygon-point into the undo list */ pcb_undo_add_obj_to_remove_point(PCB_OBJ_POLY_POINT, Layer, Polygon, point_idx); - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -1054,7 +1054,7 @@ Polygon->HoleIndex[i]--; pcb_poly_bbox(Polygon); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_remove_excess_points(Layer, Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); @@ -1078,7 +1078,7 @@ pcb_poly_copy_meta(polygon, Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_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); @@ -1092,10 +1092,10 @@ if (Layer->meta.real.vis) pcb_poly_invalidate_erase(Polygon); if (Layer->polygon_tree != NULL) - pcb_r_delete_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_delete_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_rotate90(Polygon, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->polygon_tree != NULL) - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); if (Layer->meta.real.vis) pcb_poly_invalidate_draw(Layer, Polygon); @@ -1151,7 +1151,7 @@ pcb_poly_pprestore(poly); if (ly->polygon_tree != NULL) - pcb_r_delete_entry(ly->polygon_tree, (rnd_box_t *)poly); + pcb_r_delete_entry(ly->polygon_tree, (rnd_rnd_box_t *)poly); } void pcb_poly_post(pcb_poly_t *poly) @@ -1161,7 +1161,7 @@ return; if (ly->polygon_tree != NULL) - pcb_r_insert_entry(ly->polygon_tree, (rnd_box_t *)poly); + pcb_r_insert_entry(ly->polygon_tree, (rnd_rnd_box_t *)poly); pcb_poly_ppclear(poly); } @@ -1169,7 +1169,7 @@ /*** iteration helpers ***/ void pcb_poly_map_contours(pcb_poly_t *p, void *ctx, pcb_poly_map_cb_t *cb) { - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; pcb_pline_t *pl; pa = p->Clipped; @@ -1294,7 +1294,7 @@ { pcb_poly_t *np = pcb_poly_alloc(polygon->parent.layer); pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; rnd_coord_t offs = info->xform->bloat / 2; pcb_poly_copy(np, polygon, 0, 0); @@ -1419,7 +1419,7 @@ pcb_poly_draw_(info, polygon, allow_term_gfx); } -pcb_r_dir_t pcb_poly_draw_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_poly_draw_callback(const rnd_rnd_box_t * b, void *cl) { pcb_draw_info_t *i = cl; pcb_poly_t *polygon = (pcb_poly_t *) b; @@ -1438,7 +1438,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_poly_draw_term_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_poly_draw_term_callback(const rnd_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.h =================================================================== --- trunk/src/obj_poly.h (revision 30969) +++ trunk/src/obj_poly.h (revision 30970) @@ -41,10 +41,10 @@ rnd_coord_t Clearance; rnd_cardinal_t PointN; /* number of points in polygon */ rnd_cardinal_t PointMax; /* max number from malloc() */ - pcb_polyarea_t *Clipped; /* the clipped region of this polygon */ + rnd_polyarea_t *Clipped; /* the clipped region of this polygon */ pcb_pline_t *NoHoles; /* the polygon broken into hole-less regions */ int NoHolesValid; /* Is the NoHoles polygon up to date? */ - pcb_point_t *Points; /* data */ + rnd_point_t *Points; /* data */ rnd_cardinal_t *HoleIndex; /* Index of hole data within the Points array */ rnd_cardinal_t HoleIndexN; /* number of holes in polygon */ rnd_cardinal_t HoleIndexMax; /* max number from malloc() */ @@ -57,7 +57,7 @@ pcb_poly_t *pcb_poly_alloc(pcb_layer_t * layer); pcb_poly_t *pcb_poly_alloc_id(pcb_layer_t *layer, long int id); void pcb_poly_free(pcb_poly_t * data); -pcb_point_t *pcb_poly_point_alloc(pcb_poly_t *Polygon); +rnd_point_t *pcb_poly_point_alloc(pcb_poly_t *Polygon); rnd_cardinal_t *pcb_poly_holeidx_new(pcb_poly_t *Polygon); void pcb_poly_free_fields(pcb_poly_t * polygon); @@ -70,7 +70,7 @@ pcb_poly_t *pcb_poly_new(pcb_layer_t *Layer, rnd_coord_t Clearance, pcb_flag_t Flags); pcb_poly_t *pcb_poly_dup(pcb_layer_t *dst, pcb_poly_t *src); pcb_poly_t *pcb_poly_dup_at(pcb_layer_t *dst, pcb_poly_t *src, rnd_coord_t dx, rnd_coord_t dy); -pcb_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y); +rnd_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y); pcb_poly_t *pcb_poly_hole_new(pcb_poly_t * Polygon); void *pcb_poly_remove(pcb_layer_t *Layer, pcb_poly_t *Polygon); @@ -123,7 +123,7 @@ typedef struct pcb_poly_it_s { const pcb_poly_t *p; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; pcb_pline_t *cntr; pcb_vnode_t *v; } pcb_poly_it_t; @@ -132,7 +132,7 @@ invisible islands are returned */ /* Set the iterator to the first island of the polygon; returns NULL if no contour available */ -RND_INLINE pcb_polyarea_t *pcb_poly_island_first(const pcb_poly_t *p, pcb_poly_it_t *it) +RND_INLINE rnd_polyarea_t *pcb_poly_island_first(const pcb_poly_t *p, pcb_poly_it_t *it) { it->p = p; it->pa = p->Clipped; @@ -142,7 +142,7 @@ } /* Set the iterator to the next island of the polygon; returns NULL if no more */ -RND_INLINE pcb_polyarea_t *pcb_poly_island_next(pcb_poly_it_t *it) +RND_INLINE rnd_polyarea_t *pcb_poly_island_next(pcb_poly_it_t *it) { if (it->pa->f == it->p->Clipped) return NULL; @@ -213,7 +213,7 @@ } /* Set the iterator to a polyarea*/ -RND_INLINE pcb_polyarea_t *pcb_poly_iterate_polyarea(pcb_polyarea_t *pa, pcb_poly_it_t *it) +RND_INLINE rnd_polyarea_t *pcb_poly_iterate_polyarea(rnd_polyarea_t *pa, pcb_poly_it_t *it) { it->p = NULL; it->pa = pa; @@ -224,7 +224,7 @@ /* construct the full poly clearance cutout for the pa in the iterator and add it to dst - implemented in polygon.c */ -void pcb_poly_pa_clearance_construct(pcb_polyarea_t **dst, pcb_poly_it_t *it, rnd_coord_t clearance); +void pcb_poly_pa_clearance_construct(rnd_polyarea_t **dst, pcb_poly_it_t *it, rnd_coord_t clearance); #define pcb_poly_ppclear_at(poly, layer) \ @@ -269,7 +269,7 @@ #define PCB_POLY_POINT_LOOP(polygon) do { \ rnd_cardinal_t n; \ - pcb_point_t *point; \ + rnd_point_t *point; \ for (n = (polygon)->PointN-1; n != -1; n--) \ { \ point = &(polygon)->Points[n] Index: trunk/src/obj_poly_draw.h =================================================================== --- trunk/src/obj_poly_draw.h (revision 30969) +++ trunk/src/obj_poly_draw.h (revision 30970) @@ -31,9 +31,9 @@ #include "draw.h" /* Include rtree.h for these */ -#ifdef PCB_RTREE_H -pcb_r_dir_t pcb_poly_draw_callback(const rnd_box_t * b, void *cl); -pcb_r_dir_t pcb_poly_draw_term_callback(const rnd_box_t * b, void *cl); +#ifdef RND_RTREE_H +pcb_r_dir_t pcb_poly_draw_callback(const rnd_rnd_box_t * b, void *cl); +pcb_r_dir_t pcb_poly_draw_term_callback(const rnd_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 30969) +++ trunk/src/obj_poly_draw_helper.c (revision 30970) @@ -145,13 +145,13 @@ pcb_poly_contours_free(&local_pl); } -static void fill_clipped_contour(pcb_hid_gc_t gc, pcb_pline_t * pl, const rnd_box_t * clip_box) +static void fill_clipped_contour(pcb_hid_gc_t gc, pcb_pline_t * pl, const rnd_rnd_box_t * clip_box) { pcb_pline_t *pl_copy; - pcb_polyarea_t *clip_poly; - pcb_polyarea_t *piece_poly; - pcb_polyarea_t *clipped_pieces; - pcb_polyarea_t *draw_piece; + rnd_polyarea_t *clip_poly; + rnd_polyarea_t *piece_poly; + rnd_polyarea_t *clipped_pieces; + rnd_polyarea_t *draw_piece; int x; /* Optimization: the polygon has no holes; if it is smaller the clip_box, @@ -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_box_t * clip_box) +static int should_compute_no_holes(pcb_poly_t * poly, const rnd_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(pcb_hid_gc_t gc, pcb_poly_t * poly, const rnd_box_t * clip_box) +static void pcb_dhlp_fill_pcb_polygon(pcb_hid_gc_t gc, pcb_poly_t * poly, const rnd_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(pcb_hid_gc_t gc, pcb_poly_t * poly, const rnd_box_t * clip_box) +static void pcb_dhlp_thindraw_pcb_polygon(pcb_hid_gc_t gc, pcb_poly_t * poly, const rnd_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_poly_op.h =================================================================== --- trunk/src/obj_poly_op.h (revision 30969) +++ trunk/src/obj_poly_op.h (revision 30970) @@ -38,14 +38,14 @@ void *pcb_polyop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); void *pcb_polyop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); void *pcb_polyop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); -void *pcb_polyop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point); +void *pcb_polyop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_point_t *Point); void *pcb_polyop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_poly_t * polygon, pcb_layer_t * Destination); void *pcb_polyop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * Layer, pcb_poly_t * Polygon); void *pcb_polyop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); -void *pcb_polyop_destroy_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point); +void *pcb_polyop_destroy_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_point_t *Point); void *pcb_polyop_remove(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); void *pcb_polyop_remove_counter(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_cardinal_t contour); -void *pcb_polyop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point); +void *pcb_polyop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_point_t *Point); void *pcb_polyop_copy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); void *pcb_polyop_rotate90(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); void *pcb_polyop_rotate(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 30969) +++ trunk/src/obj_pstk.c (revision 30970) @@ -106,7 +106,7 @@ void pcb_pstk_free(pcb_pstk_t *ps) { if ((ps->parent.data != NULL) && (ps->parent.data->padstack_tree != NULL)) - pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_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 = pcb_r_create_tree(); - pcb_r_insert_entry(data->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); PCB_SET_PARENT(ps, data, data); } -static void pcb_pstk_bbox_(rnd_box_t *dst, pcb_pstk_t *ps, rnd_bool copper_only) +static void pcb_pstk_bbox_(rnd_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, pcb_true); } -void pcb_pstk_copper_bbox(rnd_box_t *dst, pcb_pstk_t *ps) +void pcb_pstk_copper_bbox(rnd_rnd_box_t *dst, pcb_pstk_t *ps) { pcb_pstk_bbox_(dst, ps, pcb_true); } @@ -529,7 +529,7 @@ } } -pcb_r_dir_t pcb_pstk_draw_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t pcb_pstk_draw_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_pstk_draw_mark_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t pcb_pstk_draw_mark_callback(const rnd_rnd_box_t *b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; pcb_pstk_proto_t *proto; @@ -609,7 +609,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_pstk_draw_label_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t pcb_pstk_draw_label_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_pstk_draw_hole_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t pcb_pstk_draw_hole_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_pstk_draw_slot_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t pcb_pstk_draw_slot_callback(const rnd_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 pcb_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_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_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_box_t *)ps, &info); + pcb_pstk_draw_callback((rnd_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_box_t *)ps, &info); + pcb_pstk_draw_callback((rnd_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_box_t *)ps, &info); + pcb_pstk_draw_hole_callback((rnd_rnd_box_t *)ps, &info); } if (mark) - pcb_pstk_draw_mark_callback((rnd_box_t *)ps, &info); + pcb_pstk_draw_mark_callback((rnd_rnd_box_t *)ps, &info); if (label) - pcb_pstk_draw_label_callback((rnd_box_t *)ps, &info); + pcb_pstk_draw_label_callback((rnd_rnd_box_t *)ps, &info); } @@ -863,7 +863,7 @@ } -static int pcb_pstk_near_box_(pcb_pstk_t *ps, rnd_box_t *box, pcb_pstk_shape_t *shape) +static int pcb_pstk_near_box_(pcb_pstk_t *ps, rnd_rnd_box_t *box, pcb_pstk_shape_t *shape) { pcb_any_line_t pad; pcb_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_box_t *box, pcb_layer_t *layer) +int pcb_pstk_near_box(pcb_pstk_t *ps, rnd_rnd_box_t *box, pcb_layer_t *layer) { pcb_pstk_shape_t *shp; pcb_pstk_tshape_t *tshp = pcb_pstk_get_tshape(ps); @@ -1200,13 +1200,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) - pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_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) - pcb_r_insert_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); pcb_poly_clear_from_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_draw(ps); } @@ -1415,7 +1415,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) - pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); swap(ps->proto, u->proto, rnd_cardinal_t); swap(ps->Clearance, u->clearance, rnd_coord_t); @@ -1429,7 +1429,7 @@ pcb_pstk_bbox(ps); if (ps->parent.data->padstack_tree != NULL) - pcb_r_insert_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); pcb_poly_clear_from_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); pcb_pstk_invalidate_draw(ps); @@ -1566,7 +1566,7 @@ { pcb_data_t *data = pstk->parent.data; if (data->padstack_tree != NULL) - pcb_r_delete_entry(data->padstack_tree, (rnd_box_t *)pstk); + pcb_r_delete_entry(data->padstack_tree, (rnd_rnd_box_t *)pstk); pcb_poly_restore_to_poly(data, PCB_OBJ_PSTK, NULL, pstk); } @@ -1574,7 +1574,7 @@ { pcb_data_t *data = pstk->parent.data; if (data->padstack_tree != NULL) - pcb_r_insert_entry(data->padstack_tree, (rnd_box_t *)pstk); + pcb_r_insert_entry(data->padstack_tree, (rnd_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 30969) +++ trunk/src/obj_pstk.h (revision 30970) @@ -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_box_t *dst, pcb_pstk_t *ps); +void pcb_pstk_copper_bbox(rnd_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_box_t *box, pcb_layer_t *layer); +int pcb_pstk_near_box(pcb_pstk_t *ps, rnd_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 30969) +++ trunk/src/obj_pstk_draw.h (revision 30970) @@ -30,19 +30,19 @@ #define PCB_OBJ_PSTK_DRAW_H /* Include rtree.h for these */ -#ifdef PCB_RTREE_H +#ifdef RND_RTREE_H #include "board.h" #include "draw.h" -pcb_r_dir_t pcb_pstk_draw_callback(const rnd_box_t *b, void *cl); -pcb_r_dir_t pcb_pstk_draw_hole_callback(const rnd_box_t *b, void *cl); -pcb_r_dir_t pcb_pstk_draw_slot_callback(const rnd_box_t *b, void *cl); -pcb_r_dir_t pcb_pstk_clear_callback(const rnd_box_t *b, void *cl); +pcb_r_dir_t pcb_pstk_draw_callback(const rnd_rnd_box_t *b, void *cl); +pcb_r_dir_t pcb_pstk_draw_hole_callback(const rnd_rnd_box_t *b, void *cl); +pcb_r_dir_t pcb_pstk_draw_slot_callback(const rnd_rnd_box_t *b, void *cl); +pcb_r_dir_t pcb_pstk_clear_callback(const rnd_rnd_box_t *b, void *cl); #endif -pcb_r_dir_t pcb_pstk_draw_mark_callback(const rnd_box_t *b, void *cl); -pcb_r_dir_t pcb_pstk_draw_label_callback(const rnd_box_t *b, void *cl); +pcb_r_dir_t pcb_pstk_draw_mark_callback(const rnd_rnd_box_t *b, void *cl); +pcb_r_dir_t pcb_pstk_draw_label_callback(const rnd_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_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_rnd_box_t *drawn_area); #endif Index: trunk/src/obj_pstk_op.c =================================================================== --- trunk/src/obj_pstk_op.c (revision 30969) +++ trunk/src/obj_pstk_op.c (revision 30970) @@ -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); - pcb_r_delete_entry(ctx->buffer.src->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(ctx->buffer.src->padstack_tree, (rnd_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 = pcb_r_create_tree(); - pcb_r_insert_entry(ctx->buffer.dst->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(ctx->buffer.dst->padstack_tree, (rnd_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); - pcb_r_delete_entry(data->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); pcb_poly_restore_to_poly(data, PCB_OBJ_PSTK, NULL, ps); pcb_pstkop_move_noclip(ctx, ps); - pcb_r_insert_entry(data->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(data->padstack_tree, (rnd_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) - pcb_r_delete_entry(data->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(data->padstack_tree, (rnd_rnd_box_t *)ps); pcb_poly_restore_to_poly(data, PCB_OBJ_PSTK, NULL, ps); } if (ctx->clip.clear) { if (data->padstack_tree != NULL) - pcb_r_insert_entry(data->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(data->padstack_tree, (rnd_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) { - pcb_r_delete_entry(ctx->remove.destroy_target->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(ctx->remove.destroy_target->padstack_tree, (rnd_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) - pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_rnd_box_t *)ps); pcb_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) - pcb_r_insert_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(ps->parent.data->padstack_tree, (rnd_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 30969) +++ trunk/src/obj_pstk_proto.c (revision 30970) @@ -456,7 +456,7 @@ if (remove_src) { if (src->parent.data->padstack_tree != NULL) - pcb_r_delete_entry(src->parent.data->padstack_tree, (rnd_box_t *)src); + pcb_r_delete_entry(src->parent.data->padstack_tree, (rnd_rnd_box_t *)src); pcb_pstk_free(src); } @@ -482,7 +482,7 @@ int ret; vtp0_t objs; rnd_coord_t ox, oy; - rnd_box_t bb; + rnd_rnd_box_t bb; pcb_data_bbox(&bb, PCB_PASTEBUFFER->Data, 0); Index: trunk/src/obj_pstk_shape.h =================================================================== --- trunk/src/obj_pstk_shape.h (revision 30969) +++ trunk/src/obj_pstk_shape.h (revision 30970) @@ -35,7 +35,7 @@ unsigned int len; /* number of points in polygon */ rnd_coord_t *x; /* ordered list of points, X coord */ rnd_coord_t *y; /* ordered list of points, Y coord */ - pcb_polyarea_t *pa; /* cache for the poly code */ + rnd_polyarea_t *pa; /* cache for the poly code */ char inverted; /* 1 if x;y has the opposite direction as pa */ } pcb_pstk_poly_t; Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 30969) +++ trunk/src/obj_rat.c (revision 30970) @@ -83,7 +83,7 @@ void pcb_rat_free(pcb_rat_t *rat) { if ((rat->parent.data != NULL) && (rat->parent.data->rat_tree != NULL)) - pcb_r_delete_entry(rat->parent.data->rat_tree, (rnd_box_t *)rat); + pcb_r_delete_entry(rat->parent.data->rat_tree, (rnd_rnd_box_t *)rat); pcb_rat_unreg(rat); free(rat->anchor[0]); free(rat->anchor[1]); @@ -213,15 +213,15 @@ on a point on a layer */ static pcb_any_obj_t *find_obj_on_layer(rnd_coord_t x, rnd_coord_t y, pcb_layer_t *l) { - pcb_rtree_it_t it; - rnd_box_t *n; - pcb_rtree_box_t sb; + rnd_rtree_it_t it; + rnd_rnd_box_t *n; + rnd_rtree_box_t sb; sb.x1 = x; sb.x2 = x+1; sb.y1 = y; sb.y2 = y+1; if (l->line_tree != NULL) { - for(n = pcb_rtree_first(&it, l->line_tree, &sb); n != NULL; n = pcb_rtree_next(&it)) { + for(n = rnd_rtree_first(&it, l->line_tree, &sb); n != NULL; n = rnd_rtree_next(&it)) { if (rat_meets_line((pcb_line_t *)n, x, y, -1)) { pcb_r_end(&it); return (pcb_any_obj_t *)n; @@ -231,7 +231,7 @@ } if (l->arc_tree != NULL) { - for(n = pcb_rtree_first(&it, l->arc_tree, &sb); n != NULL; n = pcb_rtree_next(&it)) { + for(n = rnd_rtree_first(&it, l->arc_tree, &sb); n != NULL; n = rnd_rtree_next(&it)) { if (rat_meets_arc((pcb_arc_t *)n, x, y, -1)) { pcb_r_end(&it); return (pcb_any_obj_t *)n; @@ -241,7 +241,7 @@ } if (l->polygon_tree != NULL) { - for(n = pcb_rtree_first(&it, l->polygon_tree, &sb); n != NULL; n = pcb_rtree_next(&it)) { + for(n = rnd_rtree_first(&it, l->polygon_tree, &sb); n != NULL; n = rnd_rtree_next(&it)) { if (rat_meets_poly((pcb_poly_t *)n, x, y, -1)) { pcb_r_end(&it); return (pcb_any_obj_t *)n; @@ -253,7 +253,7 @@ TODO("find through text"); #if 0 if (l->text_tree != NULL) { - for(n = pcb_rtree_first(&it, l->text_tree, &sb); n != NULL; n = pcb_rtree_next(&it)) { + for(n = rnd_rtree_first(&it, l->text_tree, &sb); n != NULL; n = rnd_rtree_next(&it)) { if (rat_meets_text((pcb_text_t *)n, x, y, -1)) { pcb_r_end(&it); return (pcb_any_obj_t *)n; @@ -271,9 +271,9 @@ static pcb_any_obj_t *find_obj_on_grp(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) { int i; - pcb_rtree_box_t sb; - pcb_rtree_it_t it; - rnd_box_t *n; + rnd_rtree_box_t sb; + rnd_rtree_it_t it; + rnd_rnd_box_t *n; pcb_layergrp_t *g = pcb_get_layergrp(PCB, gid); if (g == NULL) @@ -283,7 +283,7 @@ sb.y1 = y; sb.y2 = y+1; if (PCB->Data->padstack_tree != NULL) { - for(n = pcb_rtree_first(&it, data->padstack_tree, &sb); n != NULL; n = pcb_rtree_next(&it)) { + for(n = rnd_rtree_first(&it, data->padstack_tree, &sb); n != NULL; n = rnd_rtree_next(&it)) { if (rat_meets_pstk(data, (pcb_pstk_t *)n, x, y, gid)) { pcb_r_end(&it); return (pcb_any_obj_t *)n; @@ -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) { - pcb_r_delete_entry(ctx->buffer.src->rat_tree, (rnd_box_t *) rat); + pcb_r_delete_entry(ctx->buffer.src->rat_tree, (rnd_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 = pcb_r_create_tree(); - pcb_r_insert_entry(ctx->buffer.dst->rat_tree, (rnd_box_t *) rat); + pcb_r_insert_entry(ctx->buffer.dst->rat_tree, (rnd_rnd_box_t *) rat); return rat; } @@ -442,7 +442,7 @@ } /*** draw ***/ -pcb_r_dir_t pcb_rat_draw_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_rat_draw_callback(const rnd_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_box_t b; + rnd_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_box_t b; + rnd_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 30969) +++ trunk/src/obj_rat_draw.h (revision 30970) @@ -29,8 +29,8 @@ /*** Standard draw on rats ***/ /* Include rtree.h for these */ -#ifdef PCB_RTREE_H -pcb_r_dir_t pcb_rat_draw_callback(const rnd_box_t * b, void *cl); +#ifdef RND_RTREE_H +pcb_r_dir_t pcb_rat_draw_callback(const rnd_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 30969) +++ trunk/src/obj_subc.c (revision 30970) @@ -81,7 +81,7 @@ } /* Modify dst to include src, if src is not a floater */ -static void pcb_box_bump_box_noflt(rnd_box_t *dst, rnd_box_t *src) +static void pcb_box_bump_box_noflt(rnd_rnd_box_t *dst, rnd_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)) - pcb_r_delete_entry(sc->parent.data->subc_tree, (rnd_box_t *)sc); + pcb_r_delete_entry(sc->parent.data->subc_tree, (rnd_rnd_box_t *)sc); rnd_attribute_free(&sc->Attributes); if (sc->parent_type != PCB_PARENT_INVALID) pcb_subc_unreg(sc); @@ -1019,7 +1019,7 @@ if (pcb != NULL) { if (!dst->subc_tree) dst->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dst->subc_tree, (rnd_box_t *)sc); + pcb_r_insert_entry(dst->subc_tree, (rnd_rnd_box_t *)sc); } return sc; @@ -1076,7 +1076,7 @@ EraseSubc(sc); if (pcb_data_get_top(Data) != NULL) { if (Data->subc_tree != NULL) - pcb_r_delete_entry(Data->subc_tree, (rnd_box_t *)sc); + pcb_r_delete_entry(Data->subc_tree, (rnd_rnd_box_t *)sc); else Data->subc_tree = pcb_r_create_tree(); } @@ -1158,7 +1158,7 @@ rnd_close_box(&sc->BoundingBox); rnd_close_box(&sc->bbox_naked); if (pcb_data_get_top(Data) != NULL) - pcb_r_insert_entry(Data->subc_tree, (rnd_box_t *)sc); + pcb_r_insert_entry(Data->subc_tree, (rnd_rnd_box_t *)sc); sc->part_changed_bbox_dirty = 0; /* we've just recalculated the bbox */ pcb_subc_part_changed_inhibit_dec(sc); @@ -1307,7 +1307,7 @@ linelist_foreach(&sl->Line, &it, line) { if (src_has_real_layer) { pcb_poly_restore_to_poly(src_data, PCB_OBJ_LINE, sl, line); - pcb_r_delete_entry(sl->line_tree, (rnd_box_t *)line); + pcb_r_delete_entry(sl->line_tree, (rnd_rnd_box_t *)line); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, line); @@ -1316,7 +1316,7 @@ pcb_line_reg(dl, line); } if ((dl != NULL) && (dl->line_tree != NULL)) { - pcb_r_insert_entry(dl->line_tree, (rnd_box_t *)line); + pcb_r_insert_entry(dl->line_tree, (rnd_rnd_box_t *)line); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1326,7 +1326,7 @@ arclist_foreach(&sl->Arc, &it, arc) { if (src_has_real_layer) { pcb_poly_restore_to_poly(src_data, PCB_OBJ_ARC, sl, arc); - pcb_r_delete_entry(sl->arc_tree, (rnd_box_t *)arc); + pcb_r_delete_entry(sl->arc_tree, (rnd_rnd_box_t *)arc); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, arc); @@ -1335,7 +1335,7 @@ pcb_arc_reg(dl, arc); } if ((dl != NULL) && (dl->arc_tree != NULL)) { - pcb_r_insert_entry(dl->arc_tree, (rnd_box_t *)arc); + pcb_r_insert_entry(dl->arc_tree, (rnd_rnd_box_t *)arc); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1345,7 +1345,7 @@ textlist_foreach(&sl->Text, &it, text) { if (src_has_real_layer) { pcb_poly_restore_to_poly(src_data, PCB_OBJ_LINE, sl, text); - pcb_r_delete_entry(sl->text_tree, (rnd_box_t *)text); + pcb_r_delete_entry(sl->text_tree, (rnd_rnd_box_t *)text); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, text); @@ -1354,7 +1354,7 @@ pcb_text_reg(dl, text); } if ((dl != NULL) && (dl->text_tree != NULL)) { - pcb_r_insert_entry(dl->text_tree, (rnd_box_t *)text); + pcb_r_insert_entry(dl->text_tree, (rnd_rnd_box_t *)text); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1364,7 +1364,7 @@ polylist_foreach(&sl->Polygon, &it, poly) { pcb_poly_pprestore(poly); if (src_has_real_layer) { - pcb_r_delete_entry(sl->polygon_tree, (rnd_box_t *)poly); + pcb_r_delete_entry(sl->polygon_tree, (rnd_rnd_box_t *)poly); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, poly); @@ -1373,7 +1373,7 @@ pcb_poly_reg(dl, poly); } if ((dl != NULL) && (dl->polygon_tree != NULL)) { - pcb_r_insert_entry(dl->polygon_tree, (rnd_box_t *)poly); + pcb_r_insert_entry(dl->polygon_tree, (rnd_rnd_box_t *)poly); chg++; } if (dst_is_pcb && (dl != NULL)) @@ -1382,7 +1382,7 @@ gfxlist_foreach(&sl->Gfx, &it, gfx) { if (src_has_real_layer) { - pcb_r_delete_entry(sl->gfx_tree, (rnd_box_t *)gfx); + pcb_r_delete_entry(sl->gfx_tree, (rnd_rnd_box_t *)gfx); chg++; } PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, gfx); @@ -1391,7 +1391,7 @@ pcb_gfx_reg(dl, gfx); } if ((dl != NULL) && (dl->gfx_tree != NULL)) { - pcb_r_insert_entry(dl->gfx_tree, (rnd_box_t *)gfx); + pcb_r_insert_entry(dl->gfx_tree, (rnd_rnd_box_t *)gfx); chg++; } } @@ -1422,10 +1422,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) - pcb_r_delete_entry(sc->data->padstack_tree, (rnd_box_t *)ps); + pcb_r_delete_entry(sc->data->padstack_tree, (rnd_rnd_box_t *)ps); PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND | PCB_FLAG_SELECTED, ps); if ((dst != NULL) && (dst->padstack_tree != NULL)) - pcb_r_insert_entry(dst->padstack_tree, (rnd_box_t *)ps); + pcb_r_insert_entry(dst->padstack_tree, (rnd_rnd_box_t *)ps); if ((move_obj) && (dst != NULL)) { pcb_pstk_unreg(ps); pcb_pstk_reg(dst, ps); @@ -1474,7 +1474,7 @@ clip.clip.pcb = ctx->buffer.pcb; pcb_subc_op(ctx->buffer.pcb->Data, sc, &ClipFunctions, &clip, PCB_SUBCOP_UNDO_SUBC); } - pcb_r_delete_entry(ctx->buffer.pcb->Data->subc_tree, (rnd_box_t *)sc); + pcb_r_delete_entry(ctx->buffer.pcb->Data->subc_tree, (rnd_rnd_box_t *)sc); } pcb_subc_unreg(sc); @@ -1483,7 +1483,7 @@ if (dst_is_pcb) { if (ctx->buffer.dst->subc_tree == NULL) ctx->buffer.dst->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(ctx->buffer.dst->subc_tree, (rnd_box_t *)sc); + pcb_r_insert_entry(ctx->buffer.dst->subc_tree, (rnd_rnd_box_t *)sc); } if (dst_is_pcb) @@ -1768,7 +1768,7 @@ void *pcb_subcop_destroy(pcb_opctx_t *ctx, pcb_subc_t *sc) { if (ctx->remove.pcb->Data->subc_tree != NULL) - pcb_r_delete_entry(ctx->remove.pcb->Data->subc_tree, (rnd_box_t *)sc); + pcb_r_delete_entry(ctx->remove.pcb->Data->subc_tree, (rnd_rnd_box_t *)sc); EraseSubc(sc); pcb_subc_free(sc); @@ -1845,7 +1845,7 @@ pcb_data_t *data = g->subc->parent.data; if ((data != NULL) && (data->subc_tree != NULL)) - pcb_r_delete_entry(data->subc_tree, (rnd_box_t *)g->subc); + pcb_r_delete_entry(data->subc_tree, (rnd_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); @@ -1853,7 +1853,7 @@ pcb_subc_bbox(g->subc); if ((data != NULL) && (data->subc_tree != NULL)) - pcb_r_insert_entry(data->subc_tree, (rnd_box_t *)g->subc); + pcb_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)g->subc); return 0; } @@ -1891,13 +1891,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)) - pcb_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)subc); pcb_data_scale(subc->data, sx, sy, sth, recurse); pcb_subc_bbox(subc); if ((data != NULL) && (data->subc_tree != NULL)) - pcb_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); } @@ -1919,7 +1919,7 @@ /* mirror object geometry and stackup */ if ((data != NULL) && (data->subc_tree != NULL)) - pcb_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)subc); pcb_undo_freeze_add(); pcb_data_mirror(subc->data, yoff, PCB_TXM_SIDE, 1, 0); @@ -1935,7 +1935,7 @@ pcb_subc_bbox(subc); if ((data != NULL) && (data->subc_tree != NULL)) - pcb_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); pcb_undo_add_subc_to_otherside(PCB_OBJ_SUBC, subc, subc, subc, yoff); @@ -1965,11 +1965,11 @@ #include "draw.h" -pcb_r_dir_t pcb_draw_subc_mark(const rnd_box_t *b, void *cl) +pcb_r_dir_t pcb_draw_subc_mark(const rnd_rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_subc_t *subc = (pcb_subc_t *) b; - rnd_box_t *bb = &subc->BoundingBox; + rnd_rnd_box_t *bb = &subc->BoundingBox; int selected, locked; int freq = conf_core.appearance.subc.dash_freq; const rnd_color_t *nnclr; @@ -2005,7 +2005,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t draw_subc_mark_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t draw_subc_mark_callback(const rnd_rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_subc_t *subc = (pcb_subc_t *) b; @@ -2019,11 +2019,11 @@ return pcb_draw_subc_mark(b, cl); } -pcb_r_dir_t draw_subc_label_callback(const rnd_box_t *b, void *cl) +pcb_r_dir_t draw_subc_label_callback(const rnd_rnd_box_t *b, void *cl) { pcb_draw_info_t *info = cl; pcb_subc_t *subc = (pcb_subc_t *) b; - rnd_box_t *bb = &subc->BoundingBox; + rnd_rnd_box_t *bb = &subc->BoundingBox; rnd_coord_t x0, y0, dx, dy; pcb_font_t *font = &PCB->fontkit.dflt; @@ -2083,11 +2083,11 @@ return PCB_R_DIR_FOUND_CONTINUE; } -void pcb_subc_draw_preview(const pcb_subc_t *sc, const rnd_box_t *drawn_area) +void pcb_subc_draw_preview(const pcb_subc_t *sc, const rnd_rnd_box_t *drawn_area) { int n; pcb_draw_info_t info; - pcb_rtree_it_t it; + rnd_rtree_it_t it; pcb_any_obj_t *o; pcb_xform_t xf = {0}; pcb_draw_setup_default_gui_xform(&xf); @@ -2111,11 +2111,11 @@ info.objcb.pstk.holetype = PCB_PHOLE_UNPLATED | PCB_PHOLE_PLATED; if (sc->data->padstack_tree != NULL) - for(o = pcb_rtree_first(&it, sc->data->padstack_tree, (pcb_rtree_box_t *)drawn_area); o != NULL; o = pcb_rtree_next(&it)) { + 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_box_t *)o, &info); + pcb_pstk_draw_callback((rnd_rnd_box_t *)o, &info); if (PCB->hole_on) - pcb_pstk_draw_hole_callback((rnd_box_t *)o, &info); + pcb_pstk_draw_hole_callback((rnd_rnd_box_t *)o, &info); } } @@ -2128,10 +2128,10 @@ /* padstack mark goes on top */ if (sc->data->padstack_tree != NULL) - for(o = pcb_rtree_first(&it, sc->data->padstack_tree, (pcb_rtree_box_t *)drawn_area); o != NULL; o = pcb_rtree_next(&it)) { + 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_box_t *)o, &info); - pcb_pstk_draw_label_callback((rnd_box_t *)o, &info); + pcb_pstk_draw_mark_callback((rnd_rnd_box_t *)o, &info); + pcb_pstk_draw_label_callback((rnd_rnd_box_t *)o, &info); } } } Index: trunk/src/obj_subc.h =================================================================== --- trunk/src/obj_subc.h (revision 30969) +++ trunk/src/obj_subc.h (revision 30970) @@ -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_box_t *drawn_area); +void pcb_subc_draw_preview(const pcb_subc_t *sc, const rnd_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, pcb_bool_t alloc, const char *name, rnd_bool req_name_match); #include -pcb_r_dir_t pcb_draw_subc_mark(const rnd_box_t *b, void *cl); /* low level version, does not do extobj */ -pcb_r_dir_t draw_subc_mark_callback(const rnd_box_t *b, void *cl); -pcb_r_dir_t draw_subc_label_callback(const rnd_box_t *b, void *cl); +pcb_r_dir_t pcb_draw_subc_mark(const rnd_rnd_box_t *b, void *cl); /* low level version, does not do extobj */ +pcb_r_dir_t draw_subc_mark_callback(const rnd_rnd_box_t *b, void *cl); +pcb_r_dir_t draw_subc_label_callback(const rnd_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 30969) +++ trunk/src/obj_text.c (revision 30970) @@ -105,7 +105,7 @@ void pcb_text_free(pcb_text_t *text) { if ((text->parent.layer != NULL) && (text->parent.layer->text_tree != NULL)) - pcb_r_delete_entry(text->parent.layer->text_tree, (rnd_box_t *)text); + pcb_r_delete_entry(text->parent.layer->text_tree, (rnd_rnd_box_t *)text); rnd_attribute_free(&text->Attributes); pcb_text_unreg(text); free(text->TextString); @@ -133,7 +133,7 @@ pcb_board_t *pcb = pcb_data_get_top(layer->parent.data); if (layer->text_tree != NULL) - pcb_r_delete_entry(layer->text_tree, (rnd_box_t *)g->text); + pcb_r_delete_entry(layer->text_tree, (rnd_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); @@ -145,7 +145,7 @@ pcb_text_bbox(pcb_font(pcb, g->text->fid, 1), g->text); if (layer->text_tree != NULL) - pcb_r_insert_entry(layer->text_tree, (rnd_box_t *)g->text); + pcb_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *)g->text); pcb_poly_clear_from_poly(layer->parent.data, PCB_OBJ_TEXT, layer, g->text); return 0; @@ -222,7 +222,7 @@ pcb_text_bbox(PCBFont, text); if (!Layer->text_tree) Layer->text_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) text); } static int pcb_text_render_str_cb(void *ctx, gds_t *s, const char **input) @@ -372,7 +372,7 @@ for(poly = polylist_first(&symbol[*s].polys); poly != NULL; poly = polylist_next(poly)) { int n; - pcb_point_t *pnt; + rnd_point_t *pnt; for(n = 0, pnt = poly->Points; n < poly->PointN; n++,pnt++) { maxx = MAX(maxx, pnt->X + tx); maxy = MAX(maxy, pnt->Y); @@ -382,7 +382,7 @@ space = symbol[*s].Delta; } else { - rnd_box_t *ds = &FontPtr->DefaultSymbol; + rnd_rnd_box_t *ds = &FontPtr->DefaultSymbol; rnd_coord_t w = ds->X2 - ds->X1; minx = MIN(minx, ds->X1 + tx); @@ -498,7 +498,7 @@ dstly = &ctx->buffer.dst->Layer[lid]; } - pcb_r_delete_entry(srcly->text_tree, (rnd_box_t *) text); + pcb_r_delete_entry(srcly->text_tree, (rnd_rnd_box_t *) text); pcb_poly_restore_to_poly(ctx->buffer.src, PCB_OBJ_TEXT, srcly, text); pcb_text_unreg(text); @@ -506,7 +506,7 @@ if (!dstly->text_tree) dstly->text_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dstly->text_tree, (rnd_box_t *) text); + pcb_r_insert_entry(dstly->text_tree, (rnd_rnd_box_t *) text); pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_OBJ_TEXT, dstly, text); return text; @@ -523,11 +523,11 @@ 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); - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); Text->Scale = value; pcb_text_bbox(pcb_font(PCB, Text->fid, 1), Text); - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -545,11 +545,11 @@ if (value != Text->thickness) { pcb_undo_add_obj_to_2nd_size(PCB_OBJ_TEXT, Layer, Text, Text); pcb_text_invalidate_erase(Layer, Text); - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_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); - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -567,11 +567,11 @@ if (value != Text->rot) { pcb_undo_add_obj_to_rot(PCB_OBJ_TEXT, Layer, Text, Text); pcb_text_invalidate_erase(Layer, Text); - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_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); - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -588,13 +588,13 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Text)) return NULL; pcb_text_invalidate_erase(Layer, Text); - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *)Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_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); - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return old; @@ -666,10 +666,10 @@ void *pcb_textop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_textop_move_noclip(ctx, Layer, Text); - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); return Text; } @@ -677,11 +677,11 @@ void *pcb_textop_clip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { if (ctx->clip.restore) { - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); } if (ctx->clip.clear) { - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); } return Text; @@ -692,7 +692,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); - pcb_r_delete_entry(Source->text_tree, (rnd_box_t *) text); + pcb_r_delete_entry(Source->text_tree, (rnd_rnd_box_t *) text); pcb_text_unreg(text); pcb_text_reg(Destination, text); @@ -706,7 +706,7 @@ pcb_text_bbox(pcb_font(PCB, text->fid, 1), text); if (!Destination->text_tree) Destination->text_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Destination->text_tree, (rnd_box_t *) text); + pcb_r_insert_entry(Destination->text_tree, (rnd_rnd_box_t *) text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Destination, text); return text; @@ -743,7 +743,7 @@ /* erase from screen */ if (Layer->meta.real.vis) { pcb_text_invalidate_erase(Layer, Text); - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *)Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *)Text); } pcb_undo_move_obj_to_remove(PCB_OBJ_TEXT, Layer, Text, Text); return NULL; @@ -800,10 +800,10 @@ pcb_text_invalidate_erase(Layer, Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); if (Layer->text_tree != NULL) - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_text_rotate90(Text, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); if (Layer->text_tree != NULL) - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -814,7 +814,7 @@ pcb_text_invalidate_erase(Layer, Text); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); if (Layer->text_tree != NULL) - pcb_r_delete_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_delete_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); if (Text->rot < 0.0) Text->rot += 360.0; @@ -827,7 +827,7 @@ pcb_text_bbox(NULL, Text); if (Layer->text_tree != NULL) - pcb_r_insert_entry(Layer->text_tree, (rnd_box_t *) Text); + pcb_r_insert_entry(Layer->text_tree, (rnd_rnd_box_t *) Text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); pcb_text_invalidate_draw(Layer, Text); return Text; @@ -836,13 +836,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) - pcb_r_delete_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_delete_entry(layer->text_tree, (rnd_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) - pcb_r_insert_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); } void pcb_text_mirror_coords(pcb_text_t *text, rnd_coord_t y_offs, rnd_bool undoable) @@ -895,10 +895,10 @@ assert(text->parent_type = PCB_PARENT_LAYER); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, layer, text); - pcb_r_delete_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *) text); text->fid = fid; pcb_text_bbox(pcb_font(PCB, text->fid, 1), text); - pcb_r_insert_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, layer, text); } @@ -908,7 +908,7 @@ if (ly == NULL) return; if (ly->text_tree != NULL) - pcb_r_delete_entry(ly->text_tree, (rnd_box_t *)text); + pcb_r_delete_entry(ly->text_tree, (rnd_rnd_box_t *)text); pcb_poly_restore_to_poly(ly->parent.data, PCB_OBJ_TEXT, ly, text); } @@ -918,7 +918,7 @@ if (ly == NULL) return; if (ly->text_tree != NULL) - pcb_r_insert_entry(ly->text_tree, (rnd_box_t *)text); + pcb_r_insert_entry(ly->text_tree, (rnd_rnd_box_t *)text); pcb_poly_clear_from_poly(ly->parent.data, PCB_OBJ_TEXT, ly, text); } @@ -932,9 +932,9 @@ return; pcb_poly_restore_to_poly(data, PCB_OBJ_TEXT, layer, text); - pcb_r_delete_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_delete_entry(layer->text_tree, (rnd_rnd_box_t *) text); pcb_text_bbox(pcb_font(pcb, text->fid, 1), text); - pcb_r_insert_entry(layer->text_tree, (rnd_box_t *) text); + pcb_r_insert_entry(layer->text_tree, (rnd_rnd_box_t *) text); pcb_poly_clear_from_poly(data, PCB_OBJ_TEXT, layer, text); } @@ -947,7 +947,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; - pcb_r_delete_entry(Text->parent.layer->text_tree, (rnd_box_t *)Text); + pcb_r_delete_entry(Text->parent.layer->text_tree, (rnd_rnd_box_t *)Text); } } @@ -961,7 +961,7 @@ pcb_text_bbox(pcb_font(PCB, Text->fid, 1), Text); if (orig_layer != NULL) - pcb_r_insert_entry(orig_layer->text_tree, (rnd_box_t *)Text); + pcb_r_insert_entry(orig_layer->text_tree, (rnd_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); @@ -1012,7 +1012,7 @@ { rnd_coord_t x[MAX_SIMPLE_POLY_POINTS], y[MAX_SIMPLE_POLY_POINTS]; int max, n; - pcb_point_t *p; + rnd_point_t *p; max = poly->PointN; if (max > MAX_SIMPLE_POLY_POINTS) { @@ -1047,7 +1047,7 @@ if (cb != NULL) { pcb_poly_t po; - pcb_point_t pt[MAX_SIMPLE_POLY_POINTS]; + rnd_point_t pt[MAX_SIMPLE_POLY_POINTS]; memset(&po, 0, sizeof(po)); po.type = PCB_OBJ_POLY; @@ -1077,7 +1077,7 @@ rnd_coord_t pcb_text_width(pcb_font_t *font, int scale, const unsigned char *string) { rnd_coord_t w = 0; - const rnd_box_t *defaultsymbol; + const rnd_rnd_box_t *defaultsymbol; if (string == NULL) return 0; defaultsymbol = &font->DefaultSymbol; @@ -1287,7 +1287,7 @@ else { if (cb != NULL) { pcb_poly_t po; - pcb_point_t pt[4], *p; + rnd_point_t pt[4], *p; memset(&po, 0, sizeof(po)); po.type = PCB_OBJ_POLY; @@ -1433,7 +1433,7 @@ pcb_text_draw_(info, text, min_silk_line, allow_term_gfx, PCB_TXT_TINY_CHEAP); } -pcb_r_dir_t pcb_text_draw_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_text_draw_callback(const rnd_rnd_box_t * b, void *cl) { pcb_text_t *text = (pcb_text_t *) b; pcb_draw_info_t *info = cl; @@ -1448,7 +1448,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -pcb_r_dir_t pcb_text_draw_term_callback(const rnd_box_t * b, void *cl) +pcb_r_dir_t pcb_text_draw_term_callback(const rnd_rnd_box_t * b, void *cl) { pcb_text_t *text = (pcb_text_t *) b; pcb_draw_info_t *info = cl; @@ -1511,9 +1511,9 @@ int chg = pcb_text_font_chg_data(subc->data, fid); if (chg) { need_redraw = 1; - pcb_r_delete_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_delete_entry(data->subc_tree, (rnd_rnd_box_t *)subc); pcb_subc_bbox(subc); - pcb_r_insert_entry(data->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(data->subc_tree, (rnd_rnd_box_t *)subc); } } PCB_END_LOOP; Index: trunk/src/obj_text_draw.h =================================================================== --- trunk/src/obj_text_draw.h (revision 30969) +++ trunk/src/obj_text_draw.h (revision 30970) @@ -32,9 +32,9 @@ #include "draw.h" /* Include rtree.h for these */ -#ifdef PCB_RTREE_H -pcb_r_dir_t pcb_text_draw_callback(const rnd_box_t * b, void *cl); -pcb_r_dir_t pcb_text_draw_term_callback(const rnd_box_t * b, void *cl); +#ifdef RND_RTREE_H +pcb_r_dir_t pcb_text_draw_callback(const rnd_rnd_box_t * b, void *cl); +pcb_r_dir_t pcb_text_draw_term_callback(const rnd_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 30969) +++ trunk/src/object_act.c (revision 30970) @@ -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_box_t bbx; + rnd_rnd_box_t bbx; switch(plc->plc_method) { case PLC_FIT: Index: trunk/src/operation.c =================================================================== --- trunk/src/operation.c (revision 30969) +++ trunk/src/operation.c (revision 30970) @@ -70,7 +70,7 @@ case PCB_OBJ_LINE_POINT: if (F->LinePoint) - res = F->LinePoint(ctx, (pcb_layer_t *)Ptr1, (pcb_line_t *)Ptr2, (pcb_point_t *)Ptr3); + res = F->LinePoint(ctx, (pcb_layer_t *)Ptr1, (pcb_line_t *)Ptr2, (rnd_point_t *)Ptr3); break; case PCB_OBJ_ARC_POINT: @@ -90,7 +90,7 @@ case PCB_OBJ_POLY_POINT: if (F->Point) - res = F->Point(ctx, (pcb_layer_t *)Ptr1, (pcb_poly_t *)Ptr2, (pcb_point_t *)Ptr3); + res = F->Point(ctx, (pcb_layer_t *)Ptr1, (pcb_poly_t *)Ptr2, (rnd_point_t *)Ptr3); break; case PCB_OBJ_SUBC: Index: trunk/src/operation.h =================================================================== --- trunk/src/operation.h (revision 30969) +++ trunk/src/operation.h (revision 30970) @@ -58,7 +58,7 @@ pcb_board_t *pcb; int is_primary; /* whether the primary parameter should be changed */ rnd_bool is_absolute; - pcb_angle_t value; /* same as above, but for angles */ + rnd_angle_t value; /* same as above, but for angles */ } pcb_opctx_chgangle_t; typedef struct { @@ -147,8 +147,8 @@ void *(*Text)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_text_t *); void *(*Polygon)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_poly_t *); /*5*/ - void *(*LinePoint)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_line_t *, pcb_point_t *); - void *(*Point)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_poly_t *, pcb_point_t *); + void *(*LinePoint)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_line_t *, rnd_point_t *); + void *(*Point)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_poly_t *, rnd_point_t *); void *(*Arc)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_arc_t *); void *(*Gfx)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_gfx_t *); void *(*Rat)(pcb_opctx_t *ctx, pcb_rat_t *); Index: trunk/src/pixmap_pcb.c =================================================================== --- trunk/src/pixmap_pcb.c (revision 30969) +++ trunk/src/pixmap_pcb.c (revision 30970) @@ -67,7 +67,7 @@ return pm; } -pcb_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *ipm, pcb_angle_t rot, int xmirror, int ymirror) +pcb_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *ipm, rnd_angle_t rot, int xmirror, int ymirror) { pcb_pixmap_t *pm; pcb_xform_mx_t mx = PCB_XFORM_MX_IDENT; Index: trunk/src/pixmap_pcb.h =================================================================== --- trunk/src/pixmap_pcb.h (revision 30969) +++ trunk/src/pixmap_pcb.h (revision 30970) @@ -48,7 +48,7 @@ pcb_pixmap_t *pcb_pixmap_insert_neutral_or_free(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *pm); /* Allocate and render a transformed version of pm (or return the one from cache if already cached */ -pcb_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *pm, pcb_angle_t rot, int xmirror, int ymirror); +pcb_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *pm, rnd_angle_t rot, int xmirror, int ymirror); /*** global state ***/ Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 30969) +++ trunk/src/plug_io.c (revision 30970) @@ -579,7 +579,7 @@ if (unit_suffix && *unit_suffix) { lht_node_t *nat = rnd_conf_lht_get_at(RND_CFR_DESIGN, "editor/grid_unit", 0); if (nat == NULL) { - const pcb_unit_t *new_unit = get_unit_struct(unit_suffix); + const rnd_unit_t *new_unit = get_unit_struct(unit_suffix); if (new_unit) rnd_conf_set(settings_dest, "editor/grid_unit", -1, unit_suffix, RND_POL_OVERWRITE); } @@ -731,7 +731,7 @@ if (res == 0) { rnd_file_loaded_set_at("design", "main", file, PCB->is_footprint ? "footprint" : "board"); if (PCB->is_footprint) { - rnd_box_t b; + rnd_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 30969) +++ trunk/src/polygon.c (revision 30970) @@ -66,7 +66,7 @@ #define min(x, y) ((x) < (y) ? (x) : (y)) #define max(x, y) ((x) > (y) ? (x) : (y)) -static int Unsubtract(pcb_polyarea_t * np1, pcb_poly_t * p); +static int Unsubtract(rnd_polyarea_t * np1, pcb_poly_t * p); static const char *polygon_cookie = "core polygon"; @@ -101,11 +101,11 @@ rnd_event_unbind_allcookie(polygon_cookie); } -rnd_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, pcb_point_t *point) +rnd_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, rnd_point_t *point) { assert(point >= polygon->Points); assert(point <= polygon->Points + polygon->PointN); - return ((char *) point - (char *) polygon->Points) / sizeof(pcb_point_t); + return ((char *) point - (char *) polygon->Points) / sizeof(rnd_point_t); } /* Find contour number: 0 for outer, 1 for first hole etc.. */ @@ -177,11 +177,11 @@ poly->NoHolesValid = 1; } -static pcb_polyarea_t *biggest(pcb_polyarea_t * p) +static rnd_polyarea_t *biggest(rnd_polyarea_t * p) { - pcb_polyarea_t *n, *top = NULL; + rnd_polyarea_t *n, *top = NULL; pcb_pline_t *pl; - pcb_rtree_t *tree; + rnd_rtree_t *tree; double big = -1; if (!p) return NULL; @@ -222,10 +222,10 @@ return p; } -pcb_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, rnd_bool *need_full) +rnd_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, rnd_bool *need_full) { pcb_pline_t *contour = NULL; - pcb_polyarea_t *np1 = NULL, *np = NULL; + rnd_polyarea_t *np1 = NULL, *np = NULL; rnd_cardinal_t n; pcb_vector_t v; int hole = 0; @@ -282,7 +282,7 @@ return biggest(np1); } -pcb_polyarea_t *pcb_poly_from_poly(pcb_poly_t * p) +rnd_polyarea_t *pcb_poly_from_poly(pcb_poly_t * p) { rnd_bool tmp; return pcb_poly_to_polyarea(p, &tmp); @@ -289,12 +289,12 @@ } -pcb_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t *L, rnd_coord_t thick) +rnd_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t *L, rnd_coord_t thick) { return pcb_poly_from_line(L->Point1.X, L->Point1.Y, L->Point2.X, L->Point2.Y, thick, PCB_FLAG_TEST(PCB_FLAG_SQUARE, L)); } -pcb_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t *a, rnd_coord_t thick) +rnd_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t *a, rnd_coord_t thick) { return pcb_poly_from_arc(a->X, a->Y, a->Width, a->Height, a->StartAngle, a->Delta, thick); } @@ -301,9 +301,9 @@ /* clear np1 from the polygon - should be inline with -O3 */ -static int Subtract(pcb_polyarea_t * np1, pcb_poly_t * p, rnd_bool fnp) +static int Subtract(rnd_polyarea_t * np1, pcb_poly_t * p, rnd_bool fnp) { - pcb_polyarea_t *merged = NULL, *np = np1; + rnd_polyarea_t *merged = NULL, *np = np1; int x; assert(np); assert(p); @@ -338,12 +338,12 @@ return 1; } -int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_poly_t *p, rnd_bool fnp) +int pcb_poly_subtract(rnd_polyarea_t *np1, pcb_poly_t *p, rnd_bool fnp) { return Subtract(np1, p, fnp); } -pcb_polyarea_t *pcb_poly_from_box_bloated(rnd_box_t * box, rnd_coord_t bloat) +rnd_polyarea_t *pcb_poly_from_box_bloated(rnd_rnd_box_t * box, rnd_coord_t bloat) { return pcb_poly_from_rect(box->X1 - bloat, box->X2 + bloat, box->Y1 - bloat, box->Y2 + bloat); } @@ -351,7 +351,7 @@ /* remove the padstack clearance from the polygon */ static int SubtractPadstack(pcb_data_t *d, pcb_pstk_t *ps, pcb_layer_t *l, pcb_poly_t *p) { - pcb_polyarea_t *np; + rnd_polyarea_t *np; pcb_layer_id_t i; /* ps->Clearance == 0 doesn't mean no clearance because of the per shape clearances */ @@ -366,7 +366,7 @@ } /* return the clearance polygon for a line */ -static pcb_polyarea_t *line_clearance_poly(rnd_cardinal_t layernum, pcb_board_t *pcb, pcb_line_t *line) +static rnd_polyarea_t *line_clearance_poly(rnd_cardinal_t layernum, pcb_board_t *pcb, pcb_line_t *line) { if (line->thermal & PCB_THERMAL_ON) return pcb_thermal_area_line(pcb, line, layernum); @@ -375,7 +375,7 @@ static int SubtractLine(pcb_line_t * line, pcb_poly_t * p) { - pcb_polyarea_t *np; + rnd_polyarea_t *np; if (!PCB_NONPOLY_HAS_CLEARANCE(line)) return 0; @@ -386,7 +386,7 @@ static int SubtractArc(pcb_arc_t * arc, pcb_poly_t * p) { - pcb_polyarea_t *np; + rnd_polyarea_t *np; if (!PCB_NONPOLY_HAS_CLEARANCE(arc)) return 0; @@ -406,7 +406,7 @@ pcb_line_t *line = (pcb_line_t *)obj; pcb_poly_t *poly = (pcb_poly_t *)obj; pcb_arc_t *arc = (pcb_arc_t *)obj; - pcb_polyarea_t *np = NULL; + rnd_polyarea_t *np = NULL; rnd_bool need_full; switch(obj->type) { @@ -436,8 +436,8 @@ if (by_bbox) { /* old method: clear by bounding box */ - const rnd_box_t *b = &text->BoundingBox; - pcb_polyarea_t *np; + const rnd_rnd_box_t *b = &text->BoundingBox; + rnd_polyarea_t *np; if (!(np = RoundRect(b->X1 + conf_core.design.bloat, b->X2 - conf_core.design.bloat, b->Y1 + conf_core.design.bloat, b->Y2 - conf_core.design.bloat, conf_core.design.bloat))) return -1; return Subtract(np, p, pcb_true); @@ -451,12 +451,12 @@ } struct cpInfo { - const rnd_box_t *other; + const rnd_rnd_box_t *other; pcb_data_t *data; pcb_layer_t *layer; pcb_poly_t *polygon; rnd_bool solder; - pcb_polyarea_t *accumulate; + rnd_polyarea_t *accumulate; int batch_size; jmp_buf env; }; @@ -483,13 +483,13 @@ return PCB_R_DIR_FOUND_CONTINUE; \ } while(0) -static pcb_r_dir_t padstack_sub_callback(const rnd_box_t *b, void *cl) +static pcb_r_dir_t padstack_sub_callback(const rnd_rnd_box_t *b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; struct cpInfo *info = (struct cpInfo *)cl; pcb_poly_t *polygon; - pcb_polyarea_t *np; - pcb_polyarea_t *merged; + rnd_polyarea_t *np; + rnd_polyarea_t *merged; pcb_layer_id_t i; /* don't subtract the object that was put back! */ @@ -519,7 +519,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t arc_sub_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t arc_sub_callback(const rnd_rnd_box_t * b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -541,7 +541,7 @@ } /* quick create a polygon area from a line, knowing the coords and width */ -static pcb_polyarea_t *poly_sub_callback_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t width) +static rnd_polyarea_t *poly_sub_callback_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t width) { static pcb_line_t lin; static int inited = 0; @@ -570,9 +570,9 @@ *dst = tmp; \ } while(0) -void pcb_poly_pa_clearance_construct(pcb_polyarea_t **dst, pcb_poly_it_t *it, rnd_coord_t clearance) +void pcb_poly_pa_clearance_construct(rnd_polyarea_t **dst, pcb_poly_it_t *it, rnd_coord_t clearance) { - pcb_polyarea_t *tmp, *lin; + rnd_polyarea_t *tmp, *lin; rnd_coord_t x, y, px, py, x0, y0; pcb_pline_t *pl; int go; @@ -614,9 +614,9 @@ /* Construct a poly area that represents the enlarged subpoly - so it can be subtracted from the parent poly to form the clearance for subpoly. If clr_override is not NULL, use that clearance value instead of the subpoly's */ -pcb_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, rnd_coord_t *clr_override) +rnd_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, rnd_coord_t *clr_override) { - pcb_polyarea_t *ret = NULL, *pa; + rnd_polyarea_t *ret = NULL, *pa; pcb_poly_it_t it; rnd_coord_t clr; @@ -633,7 +633,7 @@ } /* return the clearance polygon for a line */ -static pcb_polyarea_t *poly_clearance_poly(rnd_cardinal_t layernum, pcb_board_t *pcb, pcb_poly_t *subpoly) +static rnd_polyarea_t *poly_clearance_poly(rnd_cardinal_t layernum, pcb_board_t *pcb, pcb_poly_t *subpoly) { if (subpoly->thermal & PCB_THERMAL_ON) return pcb_thermal_area_poly(pcb, subpoly, layernum); @@ -643,7 +643,7 @@ static int SubtractPolyPoly(pcb_poly_t *subpoly, pcb_poly_t *frompoly) { - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; if (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLYPOLY, frompoly)) /* two clearing polys won't interact */ return 0; /* but it's not an error, that'd kill other clearances in the same poly */ @@ -660,7 +660,7 @@ static int UnsubtractPolyPoly(pcb_poly_t *subpoly, pcb_poly_t *frompoly) { - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; if (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLYPOLY, frompoly)) /* two clearing polys won't interact */ return 0; /* but it's not an error, that'd kill other clearances in the same poly */ @@ -675,7 +675,7 @@ return 0; } -static pcb_r_dir_t poly_sub_callback(const rnd_box_t *b, void *cl) +static pcb_r_dir_t poly_sub_callback(const rnd_rnd_box_t *b, void *cl) { pcb_poly_t *subpoly = (pcb_poly_t *)b; struct cpInfo *info = (struct cpInfo *) cl; @@ -701,13 +701,13 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t line_sub_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t line_sub_callback(const rnd_rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct cpInfo *info = (struct cpInfo *) cl; pcb_poly_t *polygon; - pcb_polyarea_t *np; - pcb_polyarea_t *merged; + rnd_polyarea_t *np; + rnd_polyarea_t *merged; /* don't subtract the object that was put back! */ if (b == info->other) @@ -732,7 +732,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t text_sub_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t text_sub_callback(const rnd_rnd_box_t * b, void *cl) { pcb_text_t *text = (pcb_text_t *) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -752,11 +752,11 @@ return PCB_R_DIR_FOUND_CONTINUE; } -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) +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) { rnd_cardinal_t r = 0; int seen; - rnd_box_t region; + rnd_rnd_box_t region; struct cpInfo info; pcb_layergrp_id_t group; unsigned int gflg; @@ -816,10 +816,10 @@ return r; } -static int Unsubtract(pcb_polyarea_t * np1, pcb_poly_t * p) +static int Unsubtract(rnd_polyarea_t * np1, pcb_poly_t * p) { - pcb_polyarea_t *merged = NULL, *np = np1; - pcb_polyarea_t *orig_poly, *clipped_np; + rnd_polyarea_t *merged = NULL, *np = np1; + rnd_polyarea_t *orig_poly, *clipped_np; int x; rnd_bool need_full; assert(np); @@ -854,7 +854,7 @@ static int UnsubtractPadstack(pcb_data_t *data, pcb_pstk_t *ps, pcb_layer_t *l, pcb_poly_t *p) { - pcb_polyarea_t *np; + rnd_polyarea_t *np; /* overlap a bit to prevent gaps from rounding errors */ np = pcb_poly_from_box_bloated(&ps->BoundingBox, UNSUBTRACT_BLOAT * 400000); @@ -864,7 +864,7 @@ if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_box_t *)ps, 2 * UNSUBTRACT_BLOAT * 400000, 0); + clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *)ps, 2 * UNSUBTRACT_BLOAT * 400000, 0); return 1; } @@ -872,7 +872,7 @@ static int UnsubtractArc(pcb_arc_t * arc, pcb_layer_t * l, pcb_poly_t * p) { - pcb_polyarea_t *np; + rnd_polyarea_t *np; if (!PCB_NONPOLY_HAS_CLEARANCE(arc)) return 0; @@ -884,13 +884,13 @@ return 0; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_box_t *) arc, 2 * UNSUBTRACT_BLOAT, 0); + clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *) arc, 2 * UNSUBTRACT_BLOAT, 0); return 1; } static int UnsubtractLine(pcb_line_t * line, pcb_layer_t * l, pcb_poly_t * p) { - pcb_polyarea_t *np; + rnd_polyarea_t *np; if (!PCB_NONPOLY_HAS_CLEARANCE(line)) return 0; @@ -902,13 +902,13 @@ return 0; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_box_t *) line, 2 * UNSUBTRACT_BLOAT, 0); + clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *) line, 2 * UNSUBTRACT_BLOAT, 0); return 1; } static int UnsubtractText(pcb_text_t * text, pcb_layer_t * l, pcb_poly_t * p) { - pcb_polyarea_t *np; + rnd_polyarea_t *np; if (!PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, text)) return 0; @@ -920,7 +920,7 @@ return -1; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const rnd_box_t *) text, 2 * UNSUBTRACT_BLOAT, 0); + clearPoly(PCB->Data, l, p, (const rnd_rnd_box_t *) text, 2 * UNSUBTRACT_BLOAT, 0); return 1; } @@ -1016,7 +1016,7 @@ */ rnd_bool pcb_poly_remove_excess_points(pcb_layer_t *Layer, pcb_poly_t *Polygon) { - pcb_point_t *p; + rnd_point_t *p; rnd_cardinal_t n, prev, next; pcb_line_t line; rnd_bool changed = pcb_false; @@ -1048,7 +1048,7 @@ rnd_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y) { double mindistance = (double) PCB_MAX_COORD * PCB_MAX_COORD; - pcb_point_t *ptr1, *ptr2; + rnd_point_t *ptr1, *ptr2; rnd_cardinal_t n, result = 0; /* we calculate the distance to each segment and choose the @@ -1106,7 +1106,7 @@ /* back-up one point */ default: { - pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; + rnd_point_t *points = pcb_crosshair.AttachedPolygon.Points; rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN - 2; pcb_crosshair.AttachedPolygon.PointN--; @@ -1123,7 +1123,7 @@ void pcb_polygon_go_to_next_point(void) { if ((pcb_crosshair.AttachedPolygon.PointN > 0) && (pcb_crosshair.AttachedPolygon.PointN < pcb_crosshair.AttachedPolygon_pts)) { - pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; + rnd_point_t *points = pcb_crosshair.AttachedPolygon.Points; rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; pcb_crosshair.AttachedPolygon.PointN++; @@ -1244,7 +1244,7 @@ */ void pcb_polygon_hole_create_from_attached(void) { - pcb_polyarea_t *original, *new_hole, *result; + rnd_polyarea_t *original, *new_hole, *result; pcb_flag_t Flags; /* Create pcb_polyarea_ts from the original polygon @@ -1277,9 +1277,9 @@ * the search. */ int -pcb_poly_holes(pcb_poly_t * polygon, const rnd_box_t * range, int (*callback) (pcb_pline_t * contour, void *user_data), void *user_data) +pcb_poly_holes(pcb_poly_t * polygon, const rnd_rnd_box_t * range, int (*callback) (pcb_pline_t * contour, void *user_data), void *user_data) { - pcb_polyarea_t *pa = polygon->Clipped; + rnd_polyarea_t *pa = polygon->Clipped; pcb_pline_t *pl; /* If this hole is so big the polygon doesn't exist, then it's not * really a hole. @@ -1377,7 +1377,7 @@ } -static pcb_r_dir_t plow_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t plow_callback(const rnd_rnd_box_t * b, void *cl) { struct plow_info *plow = (struct plow_info *) cl; pcb_poly_t *polygon = (pcb_poly_t *) b; @@ -1399,7 +1399,7 @@ pcb_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_box_t sb = ((pcb_any_obj_t *) ptr2)->BoundingBox; + rnd_rnd_box_t sb = ((pcb_any_obj_t *) ptr2)->BoundingBox; int r = 0, seen; struct plow_info info; @@ -1489,9 +1489,9 @@ pcb_poly_plows(dt, type, ptr1, ptr2, subtract_plow, NULL); } -rnd_bool pcb_poly_isects_poly(pcb_polyarea_t * a, pcb_poly_t *p, rnd_bool fr) +rnd_bool pcb_poly_isects_poly(rnd_polyarea_t * a, pcb_poly_t *p, rnd_bool fr) { - pcb_polyarea_t *x; + rnd_polyarea_t *x; rnd_bool ans; ans = pcb_polyarea_touching(a, p->Clipped); /* argument may be register, so we must copy it */ @@ -1504,7 +1504,7 @@ rnd_bool pcb_poly_is_point_in_p(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t r, pcb_poly_t *p) { - pcb_polyarea_t *c; + rnd_polyarea_t *c; pcb_vector_t v; v[0] = X; v[1] = Y; @@ -1538,15 +1538,15 @@ rnd_bool pcb_poly_is_rect_in_p(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_poly_t *p) { - pcb_polyarea_t *s; + rnd_polyarea_t *s; if (!(s = pcb_poly_from_rect(min(X1, X2), max(X1, X2), min(Y1, Y2), max(Y1, Y2)))) return pcb_false; return pcb_poly_isects_poly(s, p, pcb_true); } -void pcb_poly_no_holes_dicer(pcb_poly_t *p, const rnd_box_t *clip, void (*emit)(pcb_pline_t *, void *), void *user_data) +void pcb_poly_no_holes_dicer(pcb_poly_t *p, const rnd_rnd_box_t *clip, void (*emit)(pcb_pline_t *, void *), void *user_data) { - pcb_polyarea_t *main_contour; + rnd_polyarea_t *main_contour; main_contour = pcb_polyarea_create(); /* copy the main poly only */ @@ -1561,7 +1561,7 @@ /* make a polygon split into multiple parts into multiple polygons */ rnd_bool pcb_poly_morph(pcb_layer_t *layer, pcb_poly_t *poly) { - pcb_polyarea_t *p, *start; + rnd_polyarea_t *p, *start; rnd_bool many = pcb_false; pcb_flag_t flags; @@ -1607,11 +1607,11 @@ newone->Clipped = p; p = p->f; /* go to next pline */ newone->Clipped->b = newone->Clipped->f = newone->Clipped; /* unlink from others */ - pcb_r_insert_entry(layer->polygon_tree, (rnd_box_t *) newone); + pcb_r_insert_entry(layer->polygon_tree, (rnd_rnd_box_t *) newone); pcb_poly_invalidate_draw(layer, newone); } else { - pcb_polyarea_t *t = p; + rnd_polyarea_t *t = p; p = p->f; pcb_poly_contour_del(&t->contours); @@ -1637,11 +1637,11 @@ } } -void debug_polyarea(pcb_polyarea_t * p) +void debug_polyarea(rnd_polyarea_t * p) { pcb_pline_t *pl; - fprintf(stderr, "pcb_polyarea_t %p\n", (void *)p); + fprintf(stderr, "rnd_polyarea_t %p\n", (void *)p); for (pl = p->contours; pl; pl = pl->next) debug_pline(pl); } @@ -1649,7 +1649,7 @@ void debug_polygon(pcb_poly_t * p) { rnd_cardinal_t i; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; fprintf(stderr, "POLYGON %p %d pts\n", (void *)p, p->PointN); for (i = 0; i < p->PointN; i++) pcb_fprintf(stderr, "\t%d: %#mD\n", i, p->Points[i].X, p->Points[i].Y); @@ -1669,13 +1669,13 @@ } } -/* Convert a pcb_polyarea_t (and all linked pcb_polyarea_t) to +/* Convert a rnd_polyarea_t (and all linked rnd_polyarea_t) to * raw PCB polygons on the given layer. */ -void pcb_poly_to_polygons_on_layer(pcb_data_t * Destination, pcb_layer_t * Layer, pcb_polyarea_t * Input, pcb_flag_t Flags) +void pcb_poly_to_polygons_on_layer(pcb_data_t * Destination, pcb_layer_t * Layer, rnd_polyarea_t * Input, pcb_flag_t Flags) { pcb_poly_t *Polygon; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; pcb_pline_t *pline; pcb_vnode_t *node; rnd_bool outer; @@ -1708,7 +1708,7 @@ pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); pcb_poly_invalidate_draw(Layer, Polygon); /* add to undo list */ Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 30969) +++ trunk/src/polygon.h (revision 30970) @@ -45,7 +45,7 @@ void pcb_polygon_init(void); void pcb_polygon_uninit(void); -rnd_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, pcb_point_t *point); +rnd_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, rnd_point_t *point); rnd_cardinal_t pcb_poly_contour_point(pcb_poly_t *polygon, rnd_cardinal_t point); rnd_cardinal_t pcb_poly_contour_prev_point(pcb_poly_t *polygon, rnd_cardinal_t point); rnd_cardinal_t pcb_poly_contour_next_point(pcb_poly_t *polygon, rnd_cardinal_t point); @@ -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_box_t * range, int (*callback) (pcb_pline_t *, void *user_data), void *user_data); +int pcb_poly_holes(pcb_poly_t * ptr, const rnd_rnd_box_t * range, int (*callback) (pcb_pline_t *, void *user_data), void *user_data); int pcb_poly_plows(pcb_data_t *Data, int type, void *ptr1, void *ptr2, pcb_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); @@ -64,11 +64,11 @@ void pcb_poly_compute_no_holes(pcb_poly_t * poly); /* helpers: create complex shaped polygons */ -pcb_polyarea_t *pcb_poly_from_poly(pcb_poly_t *); -pcb_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t * l, rnd_coord_t thick); -pcb_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t * l, rnd_coord_t thick); -pcb_polyarea_t *pcb_poly_from_box_bloated(rnd_box_t * box, rnd_coord_t radius); -pcb_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, rnd_coord_t *clr_override); /* clearance shape for when clearpolypoly is set */ +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_clearance_construct(pcb_poly_t *subpoly, rnd_coord_t *clr_override); /* clearance shape for when clearpolypoly is set */ int pcb_poly_init_clip(pcb_data_t * d, pcb_layer_t * l, pcb_poly_t * p); int pcb_poly_init_clip_force(pcb_data_t *Data, pcb_layer_t *layer, pcb_poly_t *p); /* bypasses clip inhibit */ @@ -76,7 +76,7 @@ void pcb_poly_clear_from_poly(pcb_data_t *, int, void *, void *); /* Convert a polygon to an unclipped polyarea */ -pcb_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, rnd_bool *need_full); +rnd_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, rnd_bool *need_full); /* Same as pcb_poly_init_clip() but also call cb before each operation, giving the caller a chance to draw a progress bar */ @@ -91,20 +91,20 @@ rnd_bool pcb_poly_is_point_in_p_ignore_holes(rnd_coord_t, rnd_coord_t, pcb_poly_t *); pcb_bool_t pcb_is_point_in_convex_quad(pcb_vector_t p, pcb_vector_t *q); rnd_bool pcb_poly_is_rect_in_p(rnd_coord_t, rnd_coord_t, rnd_coord_t, rnd_coord_t, pcb_poly_t *); -rnd_bool pcb_poly_isects_poly(pcb_polyarea_t *, pcb_poly_t *, rnd_bool); +rnd_bool pcb_poly_isects_poly(rnd_polyarea_t *, pcb_poly_t *, rnd_bool); rnd_bool pcb_pline_isect_line(pcb_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); rnd_bool pcb_pline_isect_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r); /* cirlce contour crosses polyline contour */ rnd_bool pcb_pline_embraces_circ(pcb_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(pcb_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_box_t * clip, void (*emit) (pcb_pline_t *, void *), void *user_data); -void pcb_poly_to_polygons_on_layer(pcb_data_t *, pcb_layer_t *, pcb_polyarea_t *, pcb_flag_t); +void pcb_poly_no_holes_dicer(pcb_poly_t * p, const rnd_rnd_box_t * clip, void (*emit) (pcb_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(pcb_pline_t *pl); /* clear np1 from the polygon; also free np1 if fnp is true. Returns 1 on success. */ -int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_poly_t *p, rnd_bool fnp); +int pcb_poly_subtract(rnd_polyarea_t *np1, pcb_poly_t *p, rnd_bool fnp); /* Subtract or unsubtract obj from poly; Layer is used for looking up thermals */ int pcb_poly_sub_obj(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *Polygon, int type, void *obj); Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 30969) +++ trunk/src/rotate.c (revision 30970) @@ -89,7 +89,7 @@ /* --------------------------------------------------------------------------- * rotates a point in 90 degree steps */ -void pcb_point_rotate90(pcb_point_t *Point, rnd_coord_t X, rnd_coord_t Y, unsigned Number) +void pcb_point_rotate90(rnd_point_t *Point, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { PCB_COORD_ROTATE90(Point->X, Point->Y, X, Y, Number); } @@ -121,7 +121,7 @@ return obj; } -pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle) +pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, rnd_angle_t angle) { int changed = 0; pcb_opctx_t ctx; @@ -168,7 +168,7 @@ } } -void pcb_screen_obj_rotate(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle) +void pcb_screen_obj_rotate(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, rnd_angle_t angle) { int type; void *ptr1, *ptr2, *ptr3; Index: trunk/src/rotate.h =================================================================== --- trunk/src/rotate.h (revision 30969) +++ trunk/src/rotate.h (revision 30970) @@ -39,10 +39,10 @@ pcb_any_obj_t *pcb_obj_rotate90(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, unsigned Steps); /* rotates obj by angle around X;Y. pcb is the current board if obj is on buffer */ -pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle); +pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, rnd_angle_t angle); void pcb_screen_obj_rotate90(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, unsigned steps); -void pcb_screen_obj_rotate(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle); -void pcb_point_rotate90(pcb_point_t *Point, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void pcb_screen_obj_rotate(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, rnd_angle_t angle); +void pcb_point_rotate90(rnd_point_t *Point, rnd_coord_t X, rnd_coord_t Y, unsigned Number); #endif Index: trunk/src/route.c =================================================================== --- trunk/src/route.c (revision 30969) +++ trunk/src/route.c (revision 30970) @@ -107,7 +107,7 @@ return &p_route->objects[p_route->size - 1]; } -void pcb_route_add_line(pcb_route_t *p_route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer) +void pcb_route_add_line(pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer) { pcb_route_object_t *p_object = pcb_route_alloc_object(p_route); if (p_object == NULL) @@ -120,7 +120,7 @@ p_route->end_point = *point2; } -void pcb_route_add_arc(pcb_route_t *p_route, pcb_point_t *center, pcb_angle_t start_angle, pcb_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer) +void pcb_route_add_arc(pcb_route_t *p_route, rnd_point_t *center, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer) { pcb_route_object_t *p_object = pcb_route_alloc_object(p_route); if (p_object == NULL) @@ -138,7 +138,7 @@ } -void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) +void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { pcb_route_reset(route); route->start_point = *point1; @@ -156,7 +156,7 @@ * Calculate an arc fitted to a corner. *---------------------------------------------------------*/ -void pcb_route_calculate_corner_arc(const pcb_point_t *point1, const pcb_point_t *point2, const pcb_point_t *point3, double radius, pcb_route_object_t *p_out_obj, pcb_point_t *p_endpoint1, pcb_point_t *p_endpoint2) +void pcb_route_calculate_corner_arc(const rnd_point_t *point1, const rnd_point_t *point2, const rnd_point_t *point3, double radius, pcb_route_object_t *p_out_obj, rnd_point_t *p_endpoint1, rnd_point_t *p_endpoint2) { const double r_min = 10.0; @@ -223,7 +223,7 @@ } } -void pcb_route_calculate_45(pcb_point_t *start_point, pcb_point_t *target_point) +void pcb_route_calculate_45(rnd_point_t *start_point, rnd_point_t *target_point) { rnd_coord_t dx, dy, min; @@ -291,7 +291,7 @@ } } -void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) +void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { /* Restart the route */ pcb_route_reset(route); @@ -305,13 +305,13 @@ route->flags = flags; } -void pcb_route_calculate_to(pcb_route_t *route, pcb_point_t *point, int mod1, int mod2) +void pcb_route_calculate_to(pcb_route_t *route, rnd_point_t *point, int mod1, int mod2) { TODO("If an external route calculator has been selected then use it instead of this default one.") TODO("Add DRC Checking") - pcb_point_t *point1 = &route->end_point; - pcb_point_t *point2 = point; + rnd_point_t *point1 = &route->end_point; + rnd_point_t *point2 = point; pcb_layer_id_t layer_id = route->end_layer; /* Set radius to 0 for standard 45/90 operation */ @@ -329,7 +329,7 @@ * This line segment might not end under the crosshair. */ else if (conf_core.editor.line_refraction == 0) { - pcb_point_t target = *point2; + rnd_point_t target = *point2; pcb_route_calculate_45(point1, &target); pcb_route_add_line(route, point1, &target, layer_id); route->end_point = target; @@ -337,7 +337,7 @@ else { /* Refraction is non-zero so add multiple lines (horizontal, vertical and/or 45 degrees). */ rnd_coord_t dx, dy; - pcb_point_t target; + rnd_point_t target; rnd_bool way = (conf_core.editor.line_refraction == 1 ? pcb_false : pcb_true); /* swap the 'way' if mod1 is set (typically the shift key) */ @@ -370,8 +370,8 @@ if (radius > 0.0) { pcb_route_object_t arc; - pcb_point_t target1; - pcb_point_t target2; + rnd_point_t target1; + rnd_point_t target2; pcb_route_calculate_corner_arc(point1, &target, point2, radius, &arc, &target1, &target2); @@ -398,7 +398,7 @@ } TODO("Pass in other required information such as object flags") -void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2) +void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2) { /* Set radius to 0 for standard 45/90 operation */ /* const rnd_coord_t radius = thickness * conf_core.editor.route_radius; - TODO: remove this if not needed */ @@ -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); - pcb_r_delete_entry(apply_to_line_layer->line_tree, (rnd_box_t *) apply_to_line); + pcb_r_delete_entry(apply_to_line_layer->line_tree, (rnd_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); - pcb_r_insert_entry(layer->line_tree, (rnd_box_t *) apply_to_line); + pcb_r_insert_entry(layer->line_tree, (rnd_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); - pcb_r_delete_entry(apply_to_arc_layer->arc_tree, (rnd_box_t *) apply_to_arc); + pcb_r_delete_entry(apply_to_arc_layer->arc_tree, (rnd_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); - pcb_r_insert_entry(apply_to_arc_layer->arc_tree, (rnd_box_t *) apply_to_arc); + pcb_r_insert_entry(apply_to_arc_layer->arc_tree, (rnd_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; @@ -698,7 +698,7 @@ /*----------------------------------------------------------- * Draws the outline of an arc *---------------------------------------------------------*/ -void pcb_route_draw_arc(pcb_hid_gc_t GC, rnd_coord_t x, rnd_coord_t y, pcb_angle_t start_angle, pcb_angle_t delta, rnd_coord_t radius, rnd_coord_t thickness) +void pcb_route_draw_arc(pcb_hid_gc_t GC, rnd_coord_t x, rnd_coord_t y, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, rnd_coord_t thickness) { double x1, y1, x2, y2, wid = thickness / 2; Index: trunk/src/route.h =================================================================== --- trunk/src/route.h (revision 30969) +++ trunk/src/route.h (revision 30970) @@ -37,17 +37,17 @@ typedef struct { pcb_objtype_t type; - pcb_point_t point1; /* Line: Start Point, Arc: Center Point */ - pcb_point_t point2; /* Line: End Point */ + rnd_point_t point1; /* Line: Start Point, Arc: Center Point */ + rnd_point_t point2; /* Line: End Point */ rnd_coord_t radius; /* Arc */ - pcb_angle_t start_angle; /* Arc */ - pcb_angle_t delta_angle; /* Arc */ + rnd_angle_t start_angle; /* Arc */ + rnd_angle_t delta_angle; /* Arc */ pcb_layer_id_t layer; } pcb_route_object_t; typedef struct { - pcb_point_t start_point; - pcb_point_t end_point; + rnd_point_t start_point; + rnd_point_t end_point; rnd_coord_t thickness; rnd_coord_t clearance; pcb_layer_id_t start_layer; /* The ID of the layer that the route started on */ @@ -66,14 +66,14 @@ void pcb_route_reset(pcb_route_t *p_route); void pcb_route_reserve(pcb_route_t *p_route, int size); void pcb_route_resize(pcb_route_t *p_route, int size); -void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); +void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); -void pcb_route_add_line(pcb_route_t *p_route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer); -void pcb_route_add_arc(pcb_route_t *p_route, pcb_point_t *center, pcb_angle_t start_angle, pcb_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer); +void pcb_route_add_line(pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer); +void pcb_route_add_arc(pcb_route_t *p_route, rnd_point_t *center, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer); -void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2); -void pcb_route_calculate_to(pcb_route_t *route, pcb_point_t *point, int mod1, int mod2); -void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *p_route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); +void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2); +void pcb_route_calculate_to(pcb_route_t *route, rnd_point_t *point, int mod1, int mod2); +void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); int pcb_route_apply(const pcb_route_t *p_route); int pcb_route_apply_to_line(const pcb_route_t *p_route, pcb_layer_t *Layer, pcb_line_t *apply_to_line); Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 30969) +++ trunk/src/search.c (revision 30970) @@ -48,7 +48,7 @@ static double PosX, PosY; /* search position for subroutines */ static rnd_coord_t SearchRadius; -static rnd_box_t SearchBox; +static rnd_rnd_box_t SearchBox; static pcb_layer_t *SearchLayer; /* --------------------------------------------------------------------------- @@ -62,9 +62,9 @@ static rnd_bool SearchRatLineByLocation(unsigned long, unsigned long, pcb_rat_t **, pcb_rat_t **, pcb_rat_t **); static rnd_bool SearchTextByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_text_t **, pcb_text_t **); static rnd_bool SearchPolygonByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_poly_t **, pcb_poly_t **); -static rnd_bool SearchLinePointByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_line_t **, pcb_point_t **); +static rnd_bool SearchLinePointByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_line_t **, rnd_point_t **); static rnd_bool SearchArcPointByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_arc_t **, int **); -static rnd_bool SearchPointByLocation(unsigned long, unsigned long, unsigned long, pcb_layer_t **, pcb_poly_t **, pcb_point_t **); +static rnd_bool SearchPointByLocation(unsigned long, unsigned long, unsigned long, pcb_layer_t **, pcb_poly_t **, rnd_point_t **); static rnd_bool SearchSubcByLocation(unsigned long, unsigned long, pcb_subc_t **, pcb_subc_t **, pcb_subc_t **, rnd_bool); /* Return not-found for subc parts and locked items unless objst says otherwise @@ -95,7 +95,7 @@ /* --------------------------------------------------------------------------- * searches a padstack */ -static pcb_r_dir_t padstack_callback(const rnd_box_t *box, void *cl) +static pcb_r_dir_t padstack_callback(const rnd_rnd_box_t *box, void *cl) { struct ans_info *i = (struct ans_info *) cl; pcb_pstk_t *ps = (pcb_pstk_t *) box; @@ -146,13 +146,13 @@ struct line_info { pcb_line_t **Line; - pcb_point_t **Point; + rnd_point_t **Point; double least; unsigned long objst, req_flag; }; -static pcb_r_dir_t line_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t line_callback(const rnd_rnd_box_t * box, void *cl) { struct line_info *i = (struct line_info *) cl; pcb_line_t *l = (pcb_line_t *) box; @@ -162,7 +162,7 @@ if (!pcb_is_point_in_line(PosX, PosY, SearchRadius, (pcb_any_line_t *)l)) return PCB_R_DIR_NOT_FOUND; *i->Line = l; - *i->Point = (pcb_point_t *) l; + *i->Point = (rnd_point_t *) l; return PCB_R_DIR_CANCEL; /* found what we were looking for */ } @@ -173,7 +173,7 @@ struct line_info info; info.Line = Line; - info.Point = (pcb_point_t **) Dummy; + info.Point = (rnd_point_t **) Dummy; info.objst = objst; info.req_flag = req_flag; @@ -184,7 +184,7 @@ return pcb_false; } -static pcb_r_dir_t rat_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t rat_callback(const rnd_rnd_box_t * box, void *cl) { pcb_line_t *line = (pcb_line_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -228,7 +228,7 @@ double least; }; -static pcb_r_dir_t arc_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t arc_callback(const rnd_rnd_box_t * box, void *cl) { struct arc_info *i = (struct arc_info *) cl; pcb_arc_t *a = (pcb_arc_t *) box; @@ -267,7 +267,7 @@ double least; }; -static pcb_r_dir_t gfx_callback(const rnd_box_t *box, void *cl) +static pcb_r_dir_t gfx_callback(const rnd_rnd_box_t *box, void *cl) { struct gfx_info *i = (struct gfx_info *)cl; pcb_gfx_t *g = (pcb_gfx_t *)box; @@ -296,7 +296,7 @@ return pcb_false; } -static pcb_r_dir_t text_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t text_callback(const rnd_rnd_box_t * box, void *cl) { pcb_text_t *text = (pcb_text_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -328,7 +328,7 @@ return pcb_false; } -static pcb_r_dir_t polygon_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t polygon_callback(const rnd_rnd_box_t * box, void *cl) { pcb_poly_t *polygon = (pcb_poly_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -364,7 +364,7 @@ return pcb_false; } -static pcb_r_dir_t linepoint_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t linepoint_callback(const rnd_rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; struct line_info *i = (struct line_info *) cl; @@ -392,9 +392,9 @@ return ret_val; } -static pcb_r_dir_t arcpoint_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t arcpoint_callback(const rnd_rnd_box_t * b, void *cl) { - rnd_box_t ab; + rnd_rnd_box_t ab; pcb_arc_t *arc = (pcb_arc_t *) b; struct arc_info *i = (struct arc_info *) cl; pcb_r_dir_t ret_val = PCB_R_DIR_NOT_FOUND; @@ -427,7 +427,7 @@ /* --------------------------------------------------------------------------- * searches a line-point on all the search layer */ -static rnd_bool SearchLinePointByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_line_t ** Line, pcb_point_t ** Point) +static rnd_bool SearchLinePointByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_line_t ** Line, rnd_point_t ** Point) { struct line_info info; *Layer = SearchLayer; @@ -473,10 +473,10 @@ /* result */ pcb_poly_t **Polygon; - pcb_point_t **Point; + rnd_point_t **Point; } ptcb_t; -static pcb_r_dir_t polypoint_callback(const rnd_box_t *box, void *cl) +static pcb_r_dir_t polypoint_callback(const rnd_rnd_box_t *box, void *cl) { pcb_poly_t *polygon = (pcb_poly_t *)box; ptcb_t *ctx = (ptcb_t *)cl; @@ -509,7 +509,7 @@ return PCB_R_DIR_NOT_FOUND; } -static rnd_bool SearchPointByLocation(unsigned long Type, unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_poly_t ** Polygon, pcb_point_t ** Point) +static rnd_bool SearchPointByLocation(unsigned long Type, unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_poly_t ** Polygon, rnd_point_t ** Point) { ptcb_t ctx; @@ -528,7 +528,7 @@ } -static pcb_r_dir_t subc_callback(const rnd_box_t *box, void *cl) +static pcb_r_dir_t subc_callback(const rnd_rnd_box_t *box, void *cl) { pcb_subc_t *subc = (pcb_subc_t *) box; struct ans_info *i = (struct ans_info *) cl; @@ -586,7 +586,7 @@ /* find the first floater on any layer */ static rnd_bool SearchSubcFloaterByLocation(unsigned long objst, unsigned long req_flag, pcb_subc_t **out_subc, pcb_text_t **out_txt, void **dummy, rnd_bool other_side) { - pcb_rtree_it_t it; + rnd_rtree_it_t it; void *obj; int n; pcb_layer_type_t my_side_lyt; @@ -607,7 +607,7 @@ if (!(lyt & my_side_lyt)) continue; - for(obj = pcb_rtree_first(&it, ly->text_tree, (pcb_rtree_box_t *)&SearchBox); obj != NULL; obj = pcb_rtree_next(&it)) { + for(obj = rnd_rtree_first(&it, ly->text_tree, (rnd_rtree_box_t *)&SearchBox); obj != NULL; obj = rnd_rtree_next(&it)) { pcb_text_t *txt = (pcb_text_t *)obj; pcb_subc_t *subc; @@ -776,7 +776,7 @@ } /*checks if a point (of null radius) is in a slanted rectangle */ -static int IsPointInQuadrangle(pcb_point_t p[4], pcb_point_t *l) +static int IsPointInQuadrangle(rnd_point_t p[4], rnd_point_t *l) { rnd_coord_t dx, dy, x, y; double prod0, prod1; @@ -807,7 +807,7 @@ * copied from pcb_is_line_in_rectangle() * Note: actually this quadrangle is a slanted rectangle */ -rnd_bool pcb_is_line_in_quadrangle(pcb_point_t p[4], pcb_line_t *Line) +rnd_bool pcb_is_line_in_quadrangle(rnd_point_t p[4], pcb_line_t *Line) { pcb_line_t line; @@ -857,7 +857,7 @@ { pcb_line_t line; rnd_coord_t x, y; - rnd_box_t box; + rnd_rnd_box_t box; /* check if any of arc endpoints is inside the rectangle */ box.X1 = X1; box.Y1 = Y1; @@ -907,7 +907,7 @@ /* --------------------------------------------------------------------------- * checks if an gfx crosses a rectangle (or gfx is within the rectangle) */ -rnd_bool pcb_is_gfx_in_rectangle(const rnd_box_t *b, const pcb_gfx_t *gfx) +rnd_bool pcb_is_gfx_in_rectangle(const rnd_rnd_box_t *b, const pcb_gfx_t *gfx) { pcb_line_t l; int n, m; @@ -1001,7 +1001,7 @@ return range < 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_bool pcb_is_point_in_box(rnd_coord_t X, rnd_coord_t Y, rnd_rnd_box_t *box, rnd_coord_t Radius) { rnd_coord_t width, height, range; @@ -1042,13 +1042,13 @@ return range < Radius; } -rnd_bool pcb_arc_in_box(pcb_arc_t *arc, rnd_box_t *b) +rnd_bool pcb_arc_in_box(pcb_arc_t *arc, rnd_rnd_box_t *b) { - rnd_box_t ab = pcb_arc_mini_bbox(arc); + rnd_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_box_t *b) +rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, rnd_rnd_box_t *b) { int n; @@ -1068,8 +1068,8 @@ /* Calculate angle of point from arc center */ double p_dist = rnd_distance(X, Y, Arc->X, Arc->Y); double p_cos = (X - Arc->X) / p_dist; - pcb_angle_t p_ang = acos(p_cos) * PCB_RAD_TO_DEG; - pcb_angle_t ang1, ang2; + rnd_angle_t p_ang = acos(p_cos) * PCB_RAD_TO_DEG; + rnd_angle_t ang1, ang2; #define angle_in_range(r1, r2, ang) (((ang) >= (r1)) && ((ang) <= (r2))) @@ -1169,15 +1169,15 @@ } -pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, rnd_coord_t x, rnd_coord_t y, pcb_angle_t *ang, rnd_bool no_subc_part, rnd_bool no_term) +pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, rnd_coord_t x, rnd_coord_t y, rnd_angle_t *ang, rnd_bool no_subc_part, rnd_bool no_term) { - pcb_rtree_it_t it; - pcb_rtree_box_t pt; + rnd_rtree_it_t it; + rnd_rtree_box_t pt; pcb_line_t *l; /* TODO: set pt coords to x and y */ - for(l = pcb_rtree_first(&it, layer->line_tree, &pt); l != NULL; l = pcb_rtree_next(&it)) { + for(l = rnd_rtree_first(&it, layer->line_tree, &pt); l != NULL; l = rnd_rtree_next(&it)) { /* check if line needs to be ignored and "continue;" if so: l->term is non-NULL if it's a terminal, pcb_lobj_parent_subc(pcb_parenttype_t pt, pcb_parent_t *p) returns non-NULL if it's in a subc @@ -1208,12 +1208,12 @@ if (SearchLayer->meta.real.vis) { if ((HigherAvail & (PCB_OBJ_PSTK)) == 0 && Type & PCB_OBJ_POLY_POINT && - SearchPointByLocation(Type, objst, req_flag, (pcb_layer_t **) Result1, (pcb_poly_t **) Result2, (pcb_point_t **) Result3)) + SearchPointByLocation(Type, objst, req_flag, (pcb_layer_t **) Result1, (pcb_poly_t **) Result2, (rnd_point_t **) Result3)) return PCB_OBJ_POLY_POINT; if ((HigherAvail & (PCB_OBJ_PSTK)) == 0 && Type & PCB_OBJ_LINE_POINT && - SearchLinePointByLocation(objst, req_flag, (pcb_layer_t **) Result1, (pcb_line_t **) Result2, (pcb_point_t **) Result3)) + SearchLinePointByLocation(objst, req_flag, (pcb_layer_t **) Result1, (pcb_line_t **) Result2, (rnd_point_t **) Result3)) return PCB_OBJ_LINE_POINT; if ((HigherAvail & (PCB_OBJ_PSTK)) == 0 && @@ -1236,7 +1236,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_box_t *box = &(*(pcb_poly_t **) Result2)->BoundingBox; + rnd_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; @@ -1362,7 +1362,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, pcb_false)) { - rnd_box_t *box = &((pcb_subc_t *) r1)->BoundingBox; + rnd_rnd_box_t *box = &((pcb_subc_t *) r1)->BoundingBox; HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1); HigherAvail = PCB_OBJ_SUBC; } @@ -1723,29 +1723,29 @@ } -pcb_r_dir_t pcb_search_data_by_loc(pcb_data_t *data, pcb_objtype_t type, const rnd_box_t *query_box, pcb_r_dir_t (*cb_)(void *closure, pcb_any_obj_t *obj, void *box), void *closure) +pcb_r_dir_t pcb_search_data_by_loc(pcb_data_t *data, pcb_objtype_t type, const rnd_rnd_box_t *query_box, pcb_r_dir_t (*cb_)(void *closure, pcb_any_obj_t *obj, void *box), void *closure) { pcb_layer_t *ly; pcb_layer_id_t lid; pcb_r_dir_t res; - const pcb_rtree_box_t *query = (const pcb_rtree_box_t *)query_box; - pcb_rtree_dir_t (*cb)(void *, void *, const pcb_rtree_box_t *) = (pcb_rtree_dir_t(*)(void *, void *, const pcb_rtree_box_t *))cb_; + const rnd_rtree_box_t *query = (const rnd_rtree_box_t *)query_box; + rnd_rtree_dir_t (*cb)(void *, void *, const rnd_rtree_box_t *) = (rnd_rtree_dir_t(*)(void *, void *, const rnd_rtree_box_t *))cb_; if ((type & PCB_OBJ_PSTK) && (data->padstack_tree != NULL)) { - res = pcb_rtree_search_any(data->padstack_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(data->padstack_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } if ((type & PCB_OBJ_SUBC) && (data->subc_tree != NULL)) { - res = pcb_rtree_search_any(data->subc_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(data->subc_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } if ((type & PCB_OBJ_RAT) && (data->rat_tree != NULL)) { - res = pcb_rtree_search_any(data->rat_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(data->rat_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } @@ -1752,28 +1752,28 @@ for(lid = 0, ly = data->Layer; lid < data->LayerN; lid++,ly++) { if ((type & PCB_OBJ_ARC) && (ly->arc_tree != NULL)) { - res = pcb_rtree_search_any(ly->arc_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(ly->arc_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } if ((type & PCB_OBJ_LINE) && (ly->line_tree != NULL)) { - res = pcb_rtree_search_any(ly->line_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(ly->line_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } if ((type & PCB_OBJ_POLY) && (ly->polygon_tree != NULL)) { - res = pcb_rtree_search_any(ly->polygon_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(ly->polygon_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } if ((type & PCB_OBJ_TEXT) && (ly->text_tree != NULL)) { - res = pcb_rtree_search_any(ly->text_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(ly->text_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } if ((type & PCB_OBJ_GFX) && (ly->gfx_tree != NULL)) { - res = pcb_rtree_search_any(ly->gfx_tree, query, NULL, cb, closure, NULL); - if (res & pcb_RTREE_DIR_STOP) + res = rnd_rtree_search_any(ly->gfx_tree, query, NULL, cb, closure, NULL); + if (res & rnd_RTREE_DIR_STOP) return res; } Index: trunk/src/search.h =================================================================== --- trunk/src/search.h (revision 30969) +++ trunk/src/search.h (revision 30970) @@ -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_box_t *b); -rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, rnd_box_t *b); +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); #define PCB_SLOP 5 @@ -177,11 +177,11 @@ rnd_bool pcb_is_point_on_arc(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_arc_t *Arc); rnd_bool pcb_is_point_in_gfx(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_gfx_t *gfx); 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(pcb_point_t p[4], 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_box_t *b, const pcb_gfx_t *gfx); +rnd_bool pcb_is_gfx_in_rectangle(const rnd_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_box_t *box, rnd_coord_t 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); /* 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); @@ -191,7 +191,7 @@ angle (also accept 180 degree rotation) if no_subc_part is true, ignore lines that are part of subcircuits; if no_term is true, ignore lines that are terminals */ -pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, rnd_coord_t x, rnd_coord_t y, pcb_angle_t *ang, rnd_bool no_subc_part, rnd_bool no_term); +pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, rnd_coord_t x, rnd_coord_t y, rnd_angle_t *ang, rnd_bool no_subc_part, rnd_bool no_term); int pcb_search_screen(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3); int pcb_search_grid_slop(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3); Index: trunk/src/search_r.h =================================================================== --- trunk/src/search_r.h (revision 30969) +++ trunk/src/search_r.h (revision 30970) @@ -32,6 +32,6 @@ #include /* Search data for given object types within a box using the usual rtree conventions for the callback */ -pcb_r_dir_t pcb_search_data_by_loc(pcb_data_t *data, pcb_objtype_t type, const rnd_box_t *query_box, pcb_r_dir_t (*cb_)(void *closure, pcb_any_obj_t *obj, void *box), void *closure); +pcb_r_dir_t pcb_search_data_by_loc(pcb_data_t *data, pcb_objtype_t type, const rnd_rnd_box_t *query_box, pcb_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 30969) +++ trunk/src/select.c (revision 30970) @@ -164,7 +164,7 @@ return changed; } -static void fix_box_dir(rnd_box_t *Box, int force_pos) +static void fix_box_dir(rnd_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_box_t *Box, rnd_bool Flag, int *len) +static long int *ListBlock_(pcb_board_t *pcb, rnd_rnd_box_t *Box, rnd_bool Flag, int *len) { int changed = 0; int used = 0, alloced = 0; @@ -393,7 +393,7 @@ #undef append -static int pcb_obj_near_box(pcb_any_obj_t *obj, rnd_box_t *box) +static int pcb_obj_near_box(pcb_any_obj_t *obj, rnd_rnd_box_t *box) { switch(obj->type) { case PCB_OBJ_RAT: @@ -410,12 +410,12 @@ typedef struct { pcb_board_t *pcb; - rnd_box_t box; + rnd_rnd_box_t box; rnd_bool flag; rnd_bool invert; } select_ctx_t; -static pcb_r_dir_t pcb_select_block_cb(const rnd_box_t *box, void *cl) +static pcb_r_dir_t pcb_select_block_cb(const rnd_rnd_box_t *box, void *cl) { select_ctx_t *ctx = cl; pcb_any_obj_t *obj = (pcb_any_obj_t *)box; @@ -445,7 +445,7 @@ * Flag determines if the block is to be selected or unselected * returns pcb_true if the state of any object has changed */ -rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert) +rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert) { select_ctx_t ctx; @@ -464,7 +464,7 @@ /* ---------------------------------------------------------------------- * List all visible objects within the passed box */ -long int *pcb_list_block(pcb_board_t *pcb, rnd_box_t *Box, int *len) +long int *pcb_list_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, int *len) { return ListBlock_(pcb, Box, 1, len); } Index: trunk/src/select.h =================================================================== --- trunk/src/select.h (revision 30969) +++ trunk/src/select.h (revision 30970) @@ -37,8 +37,8 @@ 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_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert); -long int *pcb_list_block(pcb_board_t *pcb, rnd_box_t *Box, int *len); +rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert); +long int *pcb_list_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, int *len); rnd_bool pcb_select_connection(pcb_board_t *pcb, rnd_bool); Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 30969) +++ trunk/src/select_act.c (revision 30970) @@ -96,7 +96,7 @@ /* all objects in block */ case F_Block: { - rnd_box_t box; + rnd_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_box_t box; + rnd_rnd_box_t box; box.X1 = -PCB_MAX_COORD; box.Y1 = -PCB_MAX_COORD; @@ -131,7 +131,7 @@ case F_Invert: { - rnd_box_t box; + rnd_rnd_box_t box; box.X1 = -PCB_MAX_COORD; box.Y1 = -PCB_MAX_COORD; @@ -197,7 +197,7 @@ /* all objects in block */ case F_Block: { - rnd_box_t box; + rnd_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_box_t box; + rnd_rnd_box_t box; box.X1 = -PCB_MAX_COORD; box.Y1 = -PCB_MAX_COORD; Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 30969) +++ trunk/src/thermal.c (revision 30970) @@ -104,7 +104,7 @@ /* generate a round-cap line polygon */ -static pcb_polyarea_t *pa_line_at(double x1, double y1, double x2, double y2, rnd_coord_t clr, rnd_bool square) +static rnd_polyarea_t *pa_line_at(double x1, double y1, double x2, double y2, rnd_coord_t clr, rnd_bool square) { pcb_line_t ltmp; @@ -118,7 +118,7 @@ } /* generate a round-cap arc polygon knowing the center and endpoints */ -static pcb_polyarea_t *pa_arc_at(double cx, double cy, double r, double e1x, double e1y, double e2x, double e2y, rnd_coord_t clr, double max_span_angle) +static rnd_polyarea_t *pa_arc_at(double cx, double cy, double r, double e1x, double e1y, double e2x, double e2y, rnd_coord_t clr, double max_span_angle) { double sa, ea, da; pcb_arc_t atmp; @@ -150,9 +150,9 @@ return pcb_poly_from_pcb_arc(&atmp, clr); } -pcb_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, pcb_layer_id_t lid) { - pcb_polyarea_t *pa, *pb, *pc; + rnd_polyarea_t *pa, *pb, *pc; double dx, dy, len, vx, vy, nx, ny, clr, clrth, x1, y1, x2, y2, mx, my; rnd_coord_t th; @@ -397,9 +397,9 @@ } /* combine a base poly-area into the result area (pres) */ -static void polytherm_base(pcb_polyarea_t **pres, const pcb_polyarea_t *src) +static void polytherm_base(rnd_polyarea_t **pres, const rnd_polyarea_t *src) { - pcb_polyarea_t *p; + rnd_polyarea_t *p; if (*pres != NULL) { pcb_polyarea_boolean(src, *pres, &p, PCB_PBO_UNITE); @@ -440,9 +440,9 @@ /* combine a round clearance line set into pres; "it" is an iterator already initialized to a polyarea contour */ -static void polytherm_round(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_bool is_diag) +static void polytherm_round(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_bool is_diag) { - pcb_polyarea_t *ptmp, *p; + rnd_polyarea_t *ptmp, *p; double fact = 0.5, fact_ortho=0.75; rnd_coord_t cx, cy; double px, py, x, y, dx, dy, vx, vy, nx, ny, mx, my, len; @@ -530,9 +530,9 @@ } } -static void polytherm_sharp(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_bool is_diag) +static void polytherm_sharp(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_bool is_diag) { - pcb_polyarea_t *ptmp, *p; + rnd_polyarea_t *ptmp, *p; rnd_coord_t cx, cy, x2c, y2c; double px, py, x, y, dx, dy, vx, vy, nx, ny, mx, my, len, x2, y2, vx2, vy2, len2, dx2, dy2; int n, go, first = 1; @@ -620,7 +620,7 @@ } /* generate round thermal around a polyarea specified by the iterator */ -static void pcb_thermal_area_pa_round(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) +static void pcb_thermal_area_pa_round(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) { pcb_pline_t *pl; @@ -634,7 +634,7 @@ } /* generate sharp thermal around a polyarea specified by the iterator */ -static void pcb_thermal_area_pa_sharp(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) +static void pcb_thermal_area_pa_sharp(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) { pcb_pline_t *pl; @@ -649,9 +649,9 @@ polytherm_base(pres, it->pa); } -pcb_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid) { - pcb_polyarea_t *pa, *pres = NULL; + rnd_polyarea_t *pa, *pres = NULL; rnd_coord_t clr = poly->Clearance/2; pcb_poly_it_t it; @@ -675,10 +675,10 @@ } /* Generate a clearance around a padstack shape, with no thermal */ -static pcb_polyarea_t *pcb_thermal_area_pstk_nothermal(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid, pcb_pstk_shape_t *shp, rnd_coord_t clearance) +static rnd_polyarea_t *pcb_thermal_area_pstk_nothermal(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid, pcb_pstk_shape_t *shp, rnd_coord_t clearance) { pcb_poly_it_t it; - pcb_polyarea_t *pres = NULL; + rnd_polyarea_t *pres = NULL; pcb_pstk_shape_t tmpshp; retry:; @@ -705,11 +705,11 @@ return NULL; } -pcb_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid) { unsigned char thr; pcb_pstk_shape_t *shp, tmpshp; - pcb_polyarea_t *pres = NULL; + rnd_polyarea_t *pres = NULL; pcb_layer_t *layer; rnd_coord_t clearance = ps->Clearance; @@ -831,7 +831,7 @@ return NULL; } -pcb_polyarea_t *pcb_thermal_area(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_layer_id_t lid) { switch(obj->type) { Index: trunk/src/thermal.h =================================================================== --- trunk/src/thermal.h (revision 30969) +++ trunk/src/thermal.h (revision 30970) @@ -54,10 +54,10 @@ const char *pcb_thermal_bits2str(pcb_thermal_t *bits); -pcb_polyarea_t *pcb_thermal_area(pcb_board_t *p, pcb_any_obj_t *obj, pcb_layer_id_t lid); -pcb_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, pcb_layer_id_t lid); -pcb_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid); -pcb_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area(pcb_board_t *p, pcb_any_obj_t *obj, pcb_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, pcb_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid); unsigned char pcb_themal_style_old2new(rnd_cardinal_t t); rnd_cardinal_t pcb_themal_style_new2old(unsigned char t); Index: trunk/src/tool_logic.c =================================================================== --- trunk/src/tool_logic.c (revision 30969) +++ trunk/src/tool_logic.c (revision 30970) @@ -120,8 +120,8 @@ case PCB_OBJ_LINE_POINT: case PCB_OBJ_POLY_POINT: - *x = ((pcb_point_t *) ptr3)->X; - *y = ((pcb_point_t *) ptr3)->Y; + *x = ((rnd_point_t *) ptr3)->X; + *y = ((rnd_point_t *) ptr3)->Y; break; case PCB_OBJ_ARC: pcb_arc_get_end((pcb_arc_t *) ptr2, 0, x, y); Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 30969) +++ trunk/src/undo_old.c (revision 30970) @@ -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); - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (rnd_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); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_insert_entry(Layer->arc_tree, (rnd_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; - pcb_r_delete_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_delete_entry(Layer->arc_tree, (rnd_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); - pcb_r_insert_entry(Layer->arc_tree, (rnd_box_t *) a); + pcb_r_insert_entry(Layer->arc_tree, (rnd_rnd_box_t *) a); Entry->Data.Move.DX = old_w; Entry->Data.Move.DY = old_h; pcb_draw_obj((pcb_any_obj_t *)a); @@ -671,7 +671,7 @@ { pcb_layer_t *layer; pcb_poly_t *polygon; - pcb_point_t *pnt; + rnd_point_t *pnt; int type; rnd_cardinal_t point_idx; rnd_cardinal_t hole; @@ -923,7 +923,7 @@ /* --------------------------------------------------------------------------- * adds an object to the list of rotated objects */ -void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t CenterX, rnd_coord_t CenterY, pcb_angle_t angle) +void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t CenterX, rnd_coord_t CenterY, rnd_angle_t angle) { UndoListTypePtr undo; Index: trunk/src/undo_old.h =================================================================== --- trunk/src/undo_old.h (revision 30969) +++ trunk/src/undo_old.h (revision 30970) @@ -42,7 +42,7 @@ void pcb_undo_add_obj_to_change_name(int, void *, void *, void *, char *); void pcb_undo_add_obj_to_change_pinnum(int, void *, void *, void *, char *); void pcb_undo_add_obj_to_rotate90(int, void *, void *, void *, rnd_coord_t, rnd_coord_t, unsigned int); -void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t CenterX, rnd_coord_t CenterY, pcb_angle_t angle); +void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t CenterX, rnd_coord_t CenterY, rnd_angle_t angle); void pcb_undo_add_obj_to_create(int, void *, void *, void *); void pcb_undo_add_subc_to_otherside(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t yoff); void pcb_undo_add_obj_to_move_to_layer(int, void *, void *, void *); Index: trunk/src/undo_old_str.h =================================================================== --- trunk/src/undo_old_str.h (revision 30969) +++ trunk/src/undo_old_str.h (revision 30970) @@ -35,7 +35,7 @@ } ClearPolyType, *ClearPolyTypePtr; typedef struct { - pcb_angle_t angle[2]; + rnd_angle_t angle[2]; } AngleChangeType; typedef struct { /* information about netlist lib changes */ @@ -61,6 +61,6 @@ NetlistChangeType NetlistChange; long int CopyID; AngleChangeType AngleChange; - pcb_angle_t Angle; + rnd_angle_t Angle; } Data; } UndoListType, *UndoListTypePtr; Index: trunk/src/view.c =================================================================== --- trunk/src/view.c (revision 30969) +++ trunk/src/view.c (revision 30970) @@ -166,7 +166,7 @@ void pcb_view_set_bbox_by_objs(pcb_data_t *data, pcb_view_t *v) { int g; - rnd_box_t b; + rnd_rnd_box_t b; pcb_any_obj_t *obj; pcb_idpath_t *idp; Index: trunk/src/view.h =================================================================== --- trunk/src/view.h (revision 30969) +++ trunk/src/view.h (revision 30970) @@ -58,7 +58,7 @@ unsigned have_bbox:1; unsigned have_xy:1; - rnd_box_t bbox; /* bounding box of all error objects (in both groups) */ + rnd_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 30969) +++ trunk/src_plugins/acompnet/acompnet.c (revision 30970) @@ -47,7 +47,7 @@ rnd_coord_t r; } overlap_t; -static pcb_r_dir_t overlap(const rnd_box_t *box, void *closure) +static pcb_r_dir_t overlap(const rnd_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 pcb_r_dir_t pcb_search_on_layer(pcb_layer_t *layer, const rnd_box_t *bbox, pcb_r_dir_t (*cb)(const rnd_box_t *box, void *closure), void *closure) +static pcb_r_dir_t pcb_search_on_layer(pcb_layer_t *layer, const rnd_rnd_box_t *bbox, pcb_r_dir_t (*cb)(const rnd_rnd_box_t *box, void *closure), void *closure) { pcb_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_box_t bbox; + rnd_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_box_t bbox; + rnd_rnd_box_t bbox; bbox.X1 = PCB_MM_TO_COORD(6.35); bbox.X2 = bbox.X1+1; bbox.Y1 = PCB_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 30969) +++ trunk/src_plugins/acompnet/meshgraph.c (revision 30970) @@ -40,12 +40,12 @@ void pcb_msgr_init(pcb_meshgraph_t *gr) { - pcb_rtree_init(&gr->ntree); + rnd_rtree_init(&gr->ntree); htip_init(&gr->id2node, longhash, longkeyeq); gr->next_id = 1; } -long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_box_t *bbox, int score) +long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_rnd_box_t *bbox, int score) { pcb_meshnode_t *nd = malloc(sizeof(pcb_meshnode_t)); nd->bbox = *bbox; @@ -55,7 +55,7 @@ nd->fscore = INF_SCORE; nd->iscore = score; - pcb_rtree_insert(&gr->ntree, nd, (pcb_rtree_box_t *)nd); + rnd_rtree_insert(&gr->ntree, nd, (rnd_rtree_box_t *)nd); htip_set(&gr->id2node, nd->id, nd); gr->next_id++; return nd->id; @@ -63,7 +63,7 @@ static double msgr_connect(pcb_meshnode_t *curr, pcb_meshnode_t *next) { - pcb_point_t np, cp; + rnd_point_t np, cp; pcb_route_t route; pcb_route_init(&route); @@ -102,9 +102,9 @@ htip_set(&open, startid, curr); for(;;) { - pcb_rtree_box_t sb; - rnd_box_t *b; - pcb_rtree_it_t it; + rnd_rtree_box_t sb; + rnd_rnd_box_t *b; + rnd_rtree_it_t it; double tentative_g, best; TODO("should use a faster way for picking lowest fscore") @@ -136,7 +136,7 @@ sb.x2 = curr->bbox.X2 + SEARCHR; sb.y1 = curr->bbox.Y1 - SEARCHR; sb.y2 = curr->bbox.Y2 + SEARCHR; - for(b = pcb_rtree_first(&it, &gr->ntree, &sb); b != NULL; b = pcb_rtree_next(&it)) { + for(b = rnd_rtree_first(&it, &gr->ntree, &sb); b != NULL; b = rnd_rtree_next(&it)) { next = (pcb_meshnode_t *)b; if (htip_get(&closed, next->id) != NULL) continue; Index: trunk/src_plugins/acompnet/meshgraph.h =================================================================== --- trunk/src_plugins/acompnet/meshgraph.h (revision 30969) +++ trunk/src_plugins/acompnet/meshgraph.h (revision 30970) @@ -5,7 +5,7 @@ #include typedef struct { - rnd_box_t bbox; + rnd_rnd_box_t bbox; long int id; long int came_from; double gscore, fscore; @@ -14,13 +14,13 @@ typedef struct { - pcb_rtree_t ntree; + rnd_rtree_t ntree; htip_t id2node; long int next_id; } pcb_meshgraph_t; void pcb_msgr_init(pcb_meshgraph_t *gr); -long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_box_t *bbox, int score); +long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_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 30969) +++ trunk/src_plugins/asm/asm.c (revision 30970) @@ -335,7 +335,7 @@ void *r1, *r2, *r3; pcb_subc_t *sc; pcb_objtype_t type; - rnd_box_t view; + rnd_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_box_t box; + rnd_rnd_box_t box; /* unselect all */ box.X1 = -PCB_MAX_COORD; Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 30969) +++ trunk/src_plugins/autocrop/autocrop.c (revision 30970) @@ -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_box_t box; + rnd_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 30969) +++ trunk/src_plugins/autoplace/autoplace.c (revision 30970) @@ -129,26 +129,26 @@ #define STEP_POINT 100 /* get next slot for a box, allocates memory if necessary */ -static rnd_box_t *pcb_box_new(rnd_box_list_t *Boxes) +static rnd_rnd_box_t *pcb_box_new(rnd_rnd_box_list_t *Boxes) { - rnd_box_t *box = Boxes->Box; + rnd_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_box_t *) realloc(box, Boxes->BoxMax * sizeof(rnd_box_t)); + box = (rnd_rnd_box_t *) realloc(box, Boxes->BoxMax * sizeof(rnd_rnd_box_t)); Boxes->Box = box; - memset(box + Boxes->BoxN, 0, (Boxes->BoxMax - Boxes->BoxN) * sizeof(rnd_box_t)); + memset(box + Boxes->BoxN, 0, (Boxes->BoxMax - Boxes->BoxN) * sizeof(rnd_rnd_box_t)); } return (box + Boxes->BoxN++); } /* frees memory used by a box list */ -static void pcb_box_free(rnd_box_list_t *Boxlist) +static void pcb_box_free(rnd_rnd_box_list_t *Boxlist) { if (Boxlist) { free(Boxlist->Box); - memset(Boxlist, 0, sizeof(rnd_box_list_t)); + memset(Boxlist, 0, sizeof(rnd_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_box_list_t *blist) +static void showboxes(rnd_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_box_t *neighbor; - rnd_box_t trap; + const rnd_rnd_box_t *neighbor; + rnd_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 pcb_r_dir_t __r_find_neighbor_reg_in_sea(const rnd_box_t * region, void *cl) +static pcb_r_dir_t __r_find_neighbor_reg_in_sea(const rnd_rnd_box_t * region, void *cl) { struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; - rnd_box_t query = *region; + rnd_rnd_box_t query = *region; RND_BOX_ROTATE_TO_NORTH(query, ni->search_dir); /* ______________ __ trap.y1 __ * \ / |__| query rect. @@ -246,10 +246,10 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t __r_find_neighbor_rect_in_reg(const rnd_box_t * box, void *cl) +static pcb_r_dir_t __r_find_neighbor_rect_in_reg(const rnd_rnd_box_t * box, void *cl) { struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; - rnd_box_t query = *box; + rnd_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_box_t *r_find_neighbor(pcb_rtree_t * rtree, const rnd_box_t * box, rnd_direction_t search_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) { struct r_neighbor_info ni; - rnd_box_t bbox; + rnd_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_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 */ + 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 */ { @@ -380,8 +380,8 @@ /* two lists for solder side / component side. */ PCB_SUBC_LOOP(PCB->Data); { - rnd_box_list_t *thisside, *otherside; - rnd_box_t *box, *lastbox = NULL; + rnd_rnd_box_list_t *thisside, *otherside; + rnd_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_box_t box2; + rnd_rnd_box_t box2; box2.X1 = o->BoundingBox.X1 - clearance; box2.Y1 = o->BoundingBox.Y1 - clearance; box2.X2 = o->BoundingBox.X2 + clearance; @@ -451,16 +451,16 @@ /* create r tree */ vtp0_t seboxes, ceboxes; struct ebox { - rnd_box_t box; + rnd_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_box_t *vbox; + rnd_rnd_box_t *vbox; }; rnd_direction_t dir[4] = { RND_NORTH, RND_EAST, RND_SOUTH, RND_WEST }; struct ebox **boxpp, *boxp; - pcb_rtree_t *rt_s, *rt_c; + rnd_rtree_t *rt_s, *rt_c; int factor; vtp0_init(&seboxes); @@ -489,9 +489,9 @@ PCB_END_LOOP; rt_s = pcb_r_create_tree(); - pcb_r_insert_array(rt_s, (const rnd_box_t **) seboxes.array, vtp0_len(&seboxes)); + pcb_r_insert_array(rt_s, (const rnd_rnd_box_t **) seboxes.array, vtp0_len(&seboxes)); rt_c = pcb_r_create_tree(); - pcb_r_insert_array(rt_c, (const rnd_box_t **) ceboxes.array, vtp0_len(&ceboxes)); + pcb_r_insert_array(rt_c, (const rnd_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_box_t *bb; + rnd_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 30969) +++ trunk/src_plugins/autoroute/autoroute.c (revision 30970) @@ -229,7 +229,7 @@ typedef enum etype { TERM, VIA, VIA_SHADOW, LINE, OTHER, EXPANSION_AREA, PLANE, THERMAL } etype; struct routebox_s { - rnd_box_t box, sbox; + rnd_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 */ @@ -311,7 +311,7 @@ typedef struct routedata_s { int max_styles; /* one rtree per layer *group */ - pcb_rtree_t *layergrouptree[PCB_MAX_LAYERGRP]; /* no silkscreen layers here =) */ + rnd_rtree_t *layergrouptree[PCB_MAX_LAYERGRP]; /* no silkscreen layers here =) */ /* root pointer into connectivity information */ routebox_t *first_net; /* default routing style */ @@ -386,13 +386,13 @@ } routeone_state_t; -static routebox_t *CreateExpansionArea(const rnd_box_t * area, rnd_cardinal_t group, +static routebox_t *CreateExpansionArea(const rnd_rnd_box_t * area, rnd_cardinal_t group, routebox_t * parent, rnd_bool relax_edge_requirements, edge_t * edge); static pcb_cost_t edge_cost(const edge_t * e, const pcb_cost_t too_big); static void best_path_candidate(routeone_state_t *s, edge_t * e, routebox_t * best_target); -static rnd_box_t edge_to_box(const routebox_t * rb, rnd_direction_t expand_dir); +static rnd_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); @@ -461,7 +461,7 @@ return 1; } -int no_planes(const rnd_box_t * b, void *cl) +int no_planes(const rnd_rnd_box_t * b, void *cl) { routebox_t *rb = (routebox_t *) b; if (rb->type == PLANE) @@ -548,7 +548,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_box_t *bp = (rnd_box_t *) & rb->box; /* note discarding const! */ + rnd_rnd_box_t *bp = (rnd_rnd_box_t *) & rb->box; /* note discarding const! */ assert(!rb->flags.inited); assert(X1 <= X2 && Y1 <= Y2); bp->X1 = X1 - clearance; @@ -555,7 +555,7 @@ bp->Y1 = Y1 - clearance; bp->X2 = X2 + clearance; bp->Y2 = Y2 + clearance; - bp = (rnd_box_t *) & rb->sbox; + bp = (rnd_rnd_box_t *) & rb->sbox; bp->X1 = X1; bp->Y1 = Y1; bp->X2 = X2; @@ -563,12 +563,12 @@ rb->flags.inited = 1; } -static inline rnd_box_t shrink_routebox(const routebox_t * rb) +static inline rnd_rnd_box_t shrink_routebox(const routebox_t * rb) { return rb->sbox; } -static inline pcb_cost_t box_area(const rnd_box_t b) +static inline pcb_cost_t box_area(const rnd_rnd_box_t b) { pcb_cost_t ans = b.X2 - b.X1; return ans * (b.Y2 - b.Y1); @@ -581,7 +581,7 @@ static inline rnd_bool point_in_shrunk_box(const routebox_t * box, rnd_coord_t X, rnd_coord_t Y) { - rnd_box_t b = shrink_routebox(box); + rnd_rnd_box_t b = shrink_routebox(box); return rnd_point_in_box(&b, X, Y); } @@ -787,16 +787,16 @@ } struct rb_info { - rnd_box_t query; + rnd_rnd_box_t query; routebox_t *winner; jmp_buf env; }; -static pcb_r_dir_t __found_one_on_lg(const rnd_box_t * box, void *cl) +static pcb_r_dir_t __found_one_on_lg(const rnd_rnd_box_t * box, void *cl) { struct rb_info *inf = (struct rb_info *) cl; routebox_t *rb = (routebox_t *) box; - rnd_box_t sb; + rnd_rnd_box_t sb; if (rb->flags.nonstraight) return PCB_R_DIR_NOT_FOUND; @@ -1109,7 +1109,7 @@ static routedata_t *CreateRouteData() { vtp0_t layergroupboxes[PCB_MAX_LAYERGRP]; - rnd_box_t bbox; + rnd_rnd_box_t bbox; routedata_t *rd; int group, i; @@ -1200,7 +1200,7 @@ for (i = 0; i < pcb_max_group(PCB); i++) { /* create the r-tree */ rd->layergrouptree[i] = pcb_r_create_tree(); - pcb_r_insert_array(rd->layergrouptree[i], (const rnd_box_t **) layergroupboxes[i].array, vtp0_len(&layergroupboxes[i])); + pcb_r_insert_array(rd->layergrouptree[i], (const rnd_rnd_box_t **) layergroupboxes[i].array, vtp0_len(&layergroupboxes[i])); } if (AutoRouteParameters.use_vias) { @@ -1302,7 +1302,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 pcb_cost_t pcb_cost_to_layerless_box(const rnd_cheap_point_t * p, rnd_cardinal_t point_layer, const rnd_box_t * b) +static pcb_cost_t pcb_cost_to_layerless_box(const rnd_cheap_point_t * p, rnd_cardinal_t point_layer, const rnd_rnd_box_t * b) { rnd_cheap_point_t p2 = rnd_closest_cheap_point_in_box(p, b); register pcb_cost_t c1, c2; @@ -1355,9 +1355,9 @@ } -static rnd_box_t bloat_routebox(routebox_t * rb) +static rnd_rnd_box_t bloat_routebox(routebox_t * rb) { - rnd_box_t r; + rnd_rnd_box_t r; rnd_coord_t clearance; assert(__routepcb_box_is_good(rb)); @@ -1377,7 +1377,7 @@ typedef short pcb_dimension_t; /* makes a line on the solder layer silk surrounding the box */ -static void showbox(rnd_box_t b, pcb_dimension_t thickness, int group) +static void showbox(rnd_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); @@ -1423,7 +1423,7 @@ #if defined(ROUTE_DEBUG) static void showedge(edge_t * e) { - rnd_box_t *b = (rnd_box_t *) e->rb; + rnd_rnd_box_t *b = (rnd_rnd_box_t *) e->rb; if (ddraw == NULL) return; @@ -1540,7 +1540,7 @@ routebox_t *nearest; pcb_cost_t nearest_cost; }; -static pcb_r_dir_t __region_within_guess(const rnd_box_t * region, void *cl) +static pcb_r_dir_t __region_within_guess(const rnd_rnd_box_t * region, void *cl) { struct minpcb_cost_target_closure *mtc = (struct minpcb_cost_target_closure *) cl; pcb_cost_t pcb_cost_to_region; @@ -1554,7 +1554,7 @@ return (pcb_cost_to_region < mtc->nearest_cost) ? PCB_R_DIR_FOUND_CONTINUE : PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t __found_new_guess(const rnd_box_t * box, void *cl) +static pcb_r_dir_t __found_new_guess(const rnd_rnd_box_t * box, void *cl) { struct minpcb_cost_target_closure *mtc = (struct minpcb_cost_target_closure *) cl; routebox_t *guess = (routebox_t *) box; @@ -1573,7 +1573,7 @@ /* target_guess is our guess at what the nearest target is, or NULL if we * just plum don't have a clue. */ static routebox_t *minpcb_cost_target_to_point(const rnd_cheap_point_t * CostPoint, - rnd_cardinal_t CostPointLayer, pcb_rtree_t * targets, routebox_t * target_guess) + rnd_cardinal_t CostPointLayer, rnd_rtree_t * targets, routebox_t * target_guess) { struct minpcb_cost_target_closure mtc; assert(target_guess == NULL || target_guess->flags.target); /* this is a target, right? */ @@ -1594,7 +1594,7 @@ /* minpcb_cost_target_guess can be NULL */ static edge_t *CreateEdge(routebox_t * rb, rnd_coord_t CostPointX, rnd_coord_t CostPointY, - pcb_cost_t pcb_cost_to_point, routebox_t * minpcb_cost_target_guess, rnd_direction_t expand_dir, pcb_rtree_t * targets) + pcb_cost_t pcb_cost_to_point, routebox_t * minpcb_cost_target_guess, rnd_direction_t expand_dir, rnd_rtree_t * targets) { edge_t *e; assert(__routepcb_box_is_good(rb)); @@ -1634,9 +1634,9 @@ /* create edge, using previous edge to fill in defaults. */ /* most of the work here is in determining a new cost point */ static edge_t *CreateEdge2(routebox_t * rb, rnd_direction_t expand_dir, - edge_t * previous_edge, pcb_rtree_t * targets, routebox_t * guess) + edge_t * previous_edge, rnd_rtree_t * targets, routebox_t * guess) { - rnd_box_t thisbox; + rnd_rnd_box_t thisbox; rnd_cheap_point_t thiscost, prevcost; pcb_cost_t d; @@ -1657,9 +1657,9 @@ } /* create via edge, using previous edge to fill in defaults. */ -static edge_t *CreateViaEdge(const rnd_box_t * area, rnd_cardinal_t group, +static edge_t *CreateViaEdge(const rnd_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, pcb_rtree_t * targets) + conflict_t to_site_conflict, conflict_t through_site_conflict, rnd_rtree_t * targets) { routebox_t *rb; rnd_cheap_point_t costpoint; @@ -1723,9 +1723,9 @@ * it will become available if the conflict is elliminated. * That is why we ignore the interior_edge argument. */ -static edge_t *CreateEdgeWithConflicts(const rnd_box_t * interior_edge, +static edge_t *CreateEdgeWithConflicts(const rnd_rnd_box_t * interior_edge, routebox_t * container, edge_t * previous_edge, - pcb_cost_t cost_penalty_to_box, pcb_rtree_t * targets) + pcb_cost_t cost_penalty_to_box, rnd_rtree_t * targets) { routebox_t *rb; rnd_cheap_point_t costpoint; @@ -1783,9 +1783,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_box_t edge_to_box(const routebox_t * rb, rnd_direction_t expand_dir) +static rnd_rnd_box_t edge_to_box(const routebox_t * rb, rnd_direction_t expand_dir) { - rnd_box_t b = shrink_routebox(rb); + rnd_rnd_box_t b = shrink_routebox(rb); /* narrow box down to just the appropriate edge */ switch (expand_dir) { case RND_NORTH: @@ -1808,13 +1808,13 @@ } struct broken_boxes { - rnd_box_t left, center, right; + rnd_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_box_t * original, rnd_direction_t which_edge, routebox_t * breaker) +static struct broken_boxes break_box_edge(const rnd_rnd_box_t * original, rnd_direction_t which_edge, routebox_t * breaker) { - rnd_box_t origbox, breakbox; + rnd_rnd_box_t origbox, breakbox; struct broken_boxes result; assert(original && breaker); @@ -1849,7 +1849,7 @@ } #ifndef NDEBUG -static int share_edge(const rnd_box_t * child, const rnd_box_t * parent) +static int share_edge(const rnd_rnd_box_t * child, const rnd_rnd_box_t * parent) { return (child->X1 == parent->X2 || child->X2 == parent->X1 || @@ -1857,7 +1857,7 @@ ((parent->X1 <= child->X1 && child->X2 <= parent->X2) || (parent->Y1 <= child->Y1 && child->Y2 <= parent->Y2)); } -static int edge_intersect(const rnd_box_t * child, const rnd_box_t * parent) +static int edge_intersect(const rnd_rnd_box_t * child, const rnd_rnd_box_t * parent) { return (child->X1 <= parent->X2) && (child->X2 >= parent->X1) && (child->Y1 <= parent->Y2) && (child->Y2 >= parent->Y1); } @@ -1867,7 +1867,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_box_t * area, rnd_cardinal_t group, +static routebox_t *CreateExpansionArea(const rnd_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)); @@ -1880,7 +1880,7 @@ #ifndef NDEBUG { /* work around rounding errors: grow both boxes by 2 nm */ - rnd_box_t b1 = rb->sbox, b2 = parent->sbox; + rnd_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) @@ -1915,7 +1915,7 @@ routebox_t *parent; routebox_t *n, *e, *s, *w; rnd_coord_t keep, bloat; - rnd_box_t inflated, orig; + rnd_rnd_box_t inflated, orig; int done; }; @@ -1925,11 +1925,11 @@ * like it wouldn't be seen. We do this while keep the inflated * box as large as possible. */ -static pcb_r_dir_t __Expand_this_rect(const rnd_box_t * box, void *cl) +static pcb_r_dir_t __Expand_this_rect(const rnd_rnd_box_t * box, void *cl) { struct E_result *res = (struct E_result *) cl; routebox_t *rb = (routebox_t *) box; - rnd_box_t rbox; + rnd_rnd_box_t rbox; rnd_coord_t dn, de, ds, dw, bloat; /* we don't see conflicts already encountered */ @@ -2065,7 +2065,7 @@ * looks past the clearance to see these targets even though they * weren't actually touched in the expansion. */ -struct E_result *Expand(pcb_rtree_t * rtree, edge_t * e, const rnd_box_t * box) +struct E_result *Expand(rnd_rtree_t * rtree, edge_t * e, const rnd_rnd_box_t * box) { static struct E_result ans; int noshrink; /* bit field of which edges to not shrink */ @@ -2207,9 +2207,9 @@ * It returns 1 for any fixed blocker that is not part * of this net and zero otherwise. */ -static int blocker_to_heap(pcb_heap_t * heap, routebox_t * rb, rnd_box_t * box, rnd_direction_t dir) +static int blocker_to_heap(pcb_heap_t * heap, routebox_t * rb, rnd_rnd_box_t * box, rnd_direction_t dir) { - rnd_box_t b = rb->sbox; + rnd_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); @@ -2244,7 +2244,7 @@ * (more commonly) create a supper-thin box to provide a * home for an expansion edge. */ -static routebox_t *CreateBridge(const rnd_box_t * area, routebox_t * parent, rnd_direction_t dir) +static routebox_t *CreateBridge(const rnd_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)); @@ -2272,12 +2272,12 @@ * starting box, direction and blocker if any. */ void -moveable_edge(vector_t * result, const rnd_box_t * box, rnd_direction_t dir, +moveable_edge(vector_t * result, const rnd_rnd_box_t * box, rnd_direction_t dir, routebox_t * rb, - routebox_t * blocker, edge_t * e, pcb_rtree_t * targets, - routeone_state_t *s, pcb_rtree_t * tree, vector_t * area_vec) + routebox_t * blocker, edge_t * e, rnd_rtree_t * targets, + routeone_state_t *s, rnd_rtree_t * tree, vector_t * area_vec) { - rnd_box_t b; + rnd_rnd_box_t b; assert(rnd_box_is_good(box)); b = *box; /* for the cardinal directions, move the box to overlap the @@ -2455,16 +2455,16 @@ struct break_info { pcb_heap_t *heap; routebox_t *parent; - rnd_box_t box; + rnd_rnd_box_t box; rnd_direction_t dir; rnd_bool ignore_source; }; -static pcb_r_dir_t __GatherBlockers(const rnd_box_t * box, void *cl) +static pcb_r_dir_t __GatherBlockers(const rnd_rnd_box_t * box, void *cl) { routebox_t *rb = (routebox_t *) box; struct break_info *bi = (struct break_info *) cl; - rnd_box_t b; + rnd_rnd_box_t b; if (bi->parent == rb || rb->flags.touched || bi->parent->parent.expansion_area == rb) return PCB_R_DIR_NOT_FOUND; @@ -2484,9 +2484,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_box_t previous_edge(rnd_coord_t last, rnd_direction_t i, const rnd_box_t * b) +static inline rnd_rnd_box_t previous_edge(rnd_coord_t last, rnd_direction_t i, const rnd_rnd_box_t * b) { - rnd_box_t db = *b; + rnd_rnd_box_t db = *b; switch (i) { case RND_EAST: db.X1 = last; @@ -2508,7 +2508,7 @@ * targets as they are found, and putting any moveable edges * in the return vector. */ -vector_t *BreakManyEdges(routeone_state_t * s, pcb_rtree_t * targets, pcb_rtree_t * tree, +vector_t *BreakManyEdges(routeone_state_t * s, rnd_rtree_t * targets, rnd_rtree_t * tree, vector_t * area_vec, struct E_result * ans, routebox_t * rb, edge_t * e) { struct break_info bi; @@ -2539,7 +2539,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_box_t *fb = (rnd_box_t *) & fake.sbox; + rnd_rnd_box_t *fb = (rnd_rnd_box_t *) & fake.sbox; memset(&fake, 0, sizeof(fake)); *fb = e->rb->sbox; fake.flags.fixed = 1; /* this stops expansion there */ @@ -2548,7 +2548,7 @@ #ifndef NDEBUG /* the routbox_is_good checker wants a lot more! */ fake.flags.inited = 1; - fb = (rnd_box_t *) & fake.box; + fb = (rnd_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; @@ -2643,7 +2643,7 @@ * heap loop because it is special; it can be part of a corner */ routebox_t *blk = (routebox_t *) pcb_heap_remove_smallest(heap[dir]); - rnd_box_t b = rb->sbox; + rnd_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 @@ -2651,7 +2651,7 @@ */ if (last > 0) { /* make a corner expansion */ - rnd_box_t db = b; + rnd_rnd_box_t db = b; switch (dir) { case RND_EAST: /* possible NE expansion */ @@ -2693,7 +2693,7 @@ * in the direction of the previous edge, * which it belongs to. */ - rnd_box_t db = previous_edge(last, dir, &rb->sbox); + rnd_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) @@ -2747,7 +2747,7 @@ if (last > 0) { /* expand the leftover from the prior direction */ - rnd_box_t db = previous_edge(last, dir, &rb->sbox); + rnd_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; @@ -2755,7 +2755,7 @@ } /* for loop */ /* finally, check for the NW corner now that we've come full circle */ if (first > 0 && last > 0) { - rnd_box_t db = rb->sbox; + rnd_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); @@ -2762,12 +2762,12 @@ } else { if (first > 0) { - rnd_box_t db = rb->sbox; + rnd_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_box_t db = rb->sbox; + rnd_rnd_box_t db = rb->sbox; db.Y2 = last; moveable_edge(edges, &db, RND_WEST, rb, NULL, e, targets, s, NULL, NULL); } @@ -2793,15 +2793,15 @@ /* ------------ */ struct foib_info { - const rnd_box_t *box; + const rnd_rnd_box_t *box; routebox_t *intersect; jmp_buf env; }; -static pcb_r_dir_t foib_rect_in_reg(const rnd_box_t * box, void *cl) +static pcb_r_dir_t foib_rect_in_reg(const rnd_rnd_box_t * box, void *cl) { struct foib_info *foib = (struct foib_info *) cl; - rnd_box_t rbox; + rnd_rnd_box_t rbox; routebox_t *rb = (routebox_t *) box; if (rb->flags.touched) return PCB_R_DIR_NOT_FOUND; @@ -2816,10 +2816,10 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static routebox_t *FindOneInBox(pcb_rtree_t * rtree, routebox_t * rb) +static routebox_t *FindOneInBox(rnd_rtree_t * rtree, routebox_t * rb) { struct foib_info foib; - rnd_box_t r; + rnd_rnd_box_t r; r = rb->sbox; foib.box = &r; @@ -2832,14 +2832,14 @@ struct therm_info { routebox_t *plane; - rnd_box_t query; + rnd_rnd_box_t query; jmp_buf env; }; -static pcb_r_dir_t ftherm_rect_in_reg(const rnd_box_t * box, void *cl) +static pcb_r_dir_t ftherm_rect_in_reg(const rnd_rnd_box_t * box, void *cl) { routebox_t *rbox = (routebox_t *) box; struct therm_info *ti = (struct therm_info *) cl; - rnd_box_t sq, sb; + rnd_rnd_box_t sq, sb; if (rbox->type != TERM) return PCB_R_DIR_NOT_FOUND; @@ -2865,7 +2865,7 @@ } /* check for a pin or via target that a polygon can just use a thermal to connect to */ -routebox_t *FindThermable(pcb_rtree_t * rtree, routebox_t * rb) +routebox_t *FindThermable(rnd_rtree_t * rtree, routebox_t * rb) { struct therm_info info; @@ -3070,7 +3070,7 @@ static rnd_bool RD_DrawManhattanLine(routedata_t * rd, - const rnd_box_t * box1, const rnd_box_t * box2, + const rnd_rnd_box_t * box1, const rnd_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) { @@ -3127,7 +3127,7 @@ /* for smoothing, don't pack traces to min clearance gratuitously */ #if 0 -static void add_clearance(rnd_cheap_point_t * nextpoint, const rnd_box_t * b) +static void add_clearance(rnd_cheap_point_t * nextpoint, const rnd_rnd_box_t * b) { if (nextpoint->X == b->X1) { if (nextpoint->X + AutoRouteParameters.style->Clearance < (b->X1 + b->X2) / 2) @@ -3175,7 +3175,7 @@ rnd_coord_t radius = HALF_THICK(AutoRouteParameters.style->Diameter); rnd_cheap_point_t lastpoint, nextpoint; routebox_t *lastpath; - rnd_box_t b; + rnd_rnd_box_t b; assert(subnet->style == AutoRouteParameters.style); /*XXX: because we round up odd thicknesses, there's the possibility that @@ -3328,10 +3328,10 @@ /* create a fake "edge" used to defer via site searching. */ static void CreateSearchEdge(routeone_state_t *s, vetting_t * work, edge_t * parent, - routebox_t * rb, conflict_t conflict, pcb_rtree_t * targets, rnd_bool in_plane) + routebox_t * rb, conflict_t conflict, rnd_rtree_t * targets, rnd_bool in_plane) { routebox_t *target; - rnd_box_t b; + rnd_rnd_box_t b; pcb_cost_t cost; assert(__routepcb_box_is_good(rb)); /* find the cheapest target */ @@ -3408,11 +3408,11 @@ add_via_sites(routeone_state_t *s, struct routeone_via_site_state *vss, mtspace_t * mtspace, routebox_t * within, - conflict_t within_conflict_level, edge_t * parent_edge, pcb_rtree_t * targets, rnd_coord_t shrink, rnd_bool in_plane) + conflict_t within_conflict_level, edge_t * parent_edge, rnd_rtree_t * targets, rnd_coord_t shrink, rnd_bool in_plane) { rnd_coord_t radius, clearance; vetting_t *work; - rnd_box_t region = shrink_routebox(within); + rnd_rnd_box_t region = shrink_routebox(within); rnd_shrink_box(®ion, shrink); radius = HALF_THICK(AutoRouteParameters.style->Diameter); @@ -3434,7 +3434,7 @@ void do_via_search(edge_t * search, routeone_state_t *s, - struct routeone_via_site_state *vss, mtspace_t * mtspace, pcb_rtree_t * targets) + struct routeone_via_site_state *vss, mtspace_t * mtspace, rnd_rtree_t * targets) { int i, j, count = 0; rnd_coord_t radius, clearance; @@ -3456,8 +3456,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_box_t cliparea; - rnd_box_t *area = (rnd_box_t *) vector_remove_last(v); + rnd_rnd_box_t cliparea; + rnd_rnd_box_t *area = (rnd_rnd_box_t *) vector_remove_last(v); if (!(i == NO_CONFLICT || AutoRouteParameters.with_conflicts)) { free(area); continue; @@ -3573,7 +3573,7 @@ #endif -static pcb_r_dir_t __conflict_source(const rnd_box_t * box, void *cl) +static pcb_r_dir_t __conflict_source(const rnd_rnd_box_t * box, void *cl) { routebox_t *rb = (routebox_t *) box; if (rb->flags.touched || rb->flags.fixed) @@ -3586,7 +3586,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static void source_conflicts(pcb_rtree_t * tree, routebox_t * rb) +static void source_conflicts(rnd_rtree_t * tree, routebox_t * rb) { if (!AutoRouteParameters.with_conflicts) return; @@ -3607,9 +3607,9 @@ routeone_status_t result; routebox_t *p; int seen, i; - const rnd_box_t **target_list; + const rnd_rnd_box_t **target_list; int num_targets; - pcb_rtree_t *targets; + rnd_rtree_t *targets; /* vector of source edges for filtering */ vector_t *source_vec; /* working vector */ @@ -3685,7 +3685,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_box_t **) malloc(num_targets * sizeof(*target_list)); + target_list = (const rnd_rnd_box_t **) malloc(num_targets * sizeof(*target_list)); i = 0; LIST_LOOP(from, same_net, p); if (p->flags.target) { @@ -3696,7 +3696,7 @@ } PCB_END_LOOP; targets = pcb_r_create_tree(); - pcb_r_insert_array(targets, (const rnd_box_t **)target_list, i); + pcb_r_insert_array(targets, (const rnd_rnd_box_t **)target_list, i); assert(i <= num_targets); free(target_list); @@ -3711,7 +3711,7 @@ if (p->flags.source && is_layer_group_active[p->group]) { rnd_cheap_point_t cp; edge_t *e; - rnd_box_t b = shrink_routebox(p); + rnd_rnd_box_t b = shrink_routebox(p); #if defined(ROUTE_DEBUG) && defined(DEBUG_SHOW_SOURCES) showroutebox(p); @@ -3794,7 +3794,7 @@ if (e->rb->type == PLANE) { routebox_t *pin = FindThermable(targets, e->rb); if (pin) { - rnd_box_t b = shrink_routebox(pin); + rnd_rnd_box_t b = shrink_routebox(pin); edge_t *ne; routebox_t *nrb; assert(pin->flags.target); @@ -3837,7 +3837,7 @@ /* we have hit a plane */ edge_t *ne; routebox_t *nrb; - rnd_box_t b = shrink_routebox(e->rb); + rnd_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, pcb_true, e); @@ -3866,7 +3866,7 @@ goto dontexpand; else if (0) { /* XXX: disabling this causes no via collisions. */ - rnd_box_t a = bloat_routebox(intersecting), b; + rnd_rnd_box_t a = bloat_routebox(intersecting), b; edge_t *ne; int i, j; /* something intersects this via candidate. split via candidate @@ -3939,7 +3939,7 @@ if (1) { routebox_t *nrb; struct E_result *ans; - rnd_box_t b; + rnd_rnd_box_t b; vector_t *broken; if (e->flags.is_interior) { assert(AutoRouteParameters.with_conflicts); /* no interior edges unless @@ -4112,7 +4112,7 @@ } #ifndef NDEBUG -pcb_r_dir_t bad_boy(const rnd_box_t * b, void *cl) +pcb_r_dir_t bad_boy(const rnd_rnd_box_t * b, void *cl) { routebox_t *box = (routebox_t *) b; if (box->type == EXPANSION_AREA) @@ -4123,7 +4123,7 @@ rnd_bool no_expansion_boxes(routedata_t * rd) { int i; - rnd_box_t big; + rnd_rnd_box_t big; big.X1 = 0; big.X2 = PCB_MAX_COORD; big.Y1 = 0; @@ -4152,7 +4152,7 @@ } } -static pcb_r_dir_t ripout_livedraw_obj_cb(const rnd_box_t * b, void *cl) +static pcb_r_dir_t ripout_livedraw_obj_cb(const rnd_rnd_box_t * b, void *cl) { routebox_t *box = (routebox_t *) b; ripout_livedraw_obj(box); @@ -4211,7 +4211,7 @@ LIST_LOOP(rd->first_net, different_net, net); { double area; - rnd_box_t bb = shrink_routebox(net); + rnd_rnd_box_t bb = shrink_routebox(net); LIST_LOOP(net, same_net, p); { PCB_MAKE_MIN(bb.X1, p->sbox.X1); @@ -4327,7 +4327,7 @@ LIST_LOOP(net, same_net, p); { #ifdef NET_HEAP - rnd_box_t b = shrink_routebox(p); + rnd_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 */ pcb_heap_insert(net_heap, (float) (b.X2 - b.X1) * @@ -4452,7 +4452,7 @@ jmp_buf env; }; -static pcb_r_dir_t fpstk_rect(const rnd_box_t * b, void *cl) +static pcb_r_dir_t fpstk_rect(const rnd_rnd_box_t * b, void *cl) { pcb_pstk_t *ps = (pcb_pstk_t *)b; struct fpin_info *info = (struct fpin_info *) cl; @@ -4463,7 +4463,7 @@ return PCB_R_DIR_NOT_FOUND; } -static int FindPin(const rnd_box_t *box, pcb_pstk_t **ps_out) +static int FindPin(const rnd_rnd_box_t *box, pcb_pstk_t **ps_out) { struct fpin_info info; @@ -4509,7 +4509,7 @@ if (p->type == LINE) { rnd_coord_t halfwidth = HALF_THICK(p->style->Thick); double th = halfwidth * 2 + 1; - rnd_box_t b; + rnd_rnd_box_t b; assert(p->parent.line == NULL); /* orthogonal; thickness is 2*halfwidth */ /* flip coordinates, if bl_to_ur */ @@ -4539,7 +4539,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_box_t b = shrink_routebox(p); + rnd_rnd_box_t b = shrink_routebox(p); total_via_count++; assert(pp->type == VIA); if (pp->parent.via == NULL) { @@ -4749,7 +4749,7 @@ pcb_hid_progress(0, 0, NULL); if (conf_core.editor.live_routing) { int i; - rnd_box_t big = { 0, 0, PCB_MAX_COORD, PCB_MAX_COORD }; + rnd_rnd_box_t big = { 0, 0, PCB_MAX_COORD, PCB_MAX_COORD }; for (i = 0; i < pcb_max_group(PCB); i++) { pcb_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 30969) +++ trunk/src_plugins/autoroute/mtspace.c (revision 30970) @@ -57,7 +57,7 @@ /* mtspace data structures are built on r-trees. */ typedef struct mtspacebox { - const rnd_box_t box; + const rnd_rnd_box_t box; rnd_coord_t clearance; /* the smallest clearance around this box */ } mtspacebox_t; @@ -65,7 +65,7 @@ struct mtspace { /* rtrees keeping track of regions expanded by their required clearance. */ /* one for fixed, even, and odd */ - pcb_rtree_t *ftree, *etree, *otree; + rnd_rtree_t *ftree, *etree, *otree; }; typedef union { @@ -86,13 +86,13 @@ #define SPECIAL 823157 -mtspacebox_t *mtspace_create_box(const rnd_box_t * box, rnd_coord_t clearance) +mtspacebox_t *mtspace_create_box(const rnd_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_box_t *) & mtsb->box) = *box; + *((rnd_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_box_t box; - pcb_rtree_t *tree; + rnd_rnd_box_t box; + rnd_rtree_t *tree; jmp_buf env; }; -static pcb_r_dir_t mts_remove_one(const rnd_box_t * b, void *cl) +static pcb_r_dir_t mts_remove_one(const rnd_rnd_box_t * b, void *cl) { struct mts_info *info = (struct mts_info *) cl; mtspacebox_t *box = (mtspacebox_t *) b; @@ -142,13 +142,13 @@ /* 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) { - pcb_r_delete_entry_free_data(info->tree, (rnd_box_t *)b, free); + pcb_r_delete_entry_free_data(info->tree, (rnd_rnd_box_t *)b, free); longjmp(info->env, 1); } return PCB_R_DIR_NOT_FOUND; } -pcb_rtree_t *which_tree(mtspace_t * mtspace, mtspace_type_t which) +rnd_rtree_t *which_tree(mtspace_t * mtspace, mtspace_type_t which) { switch (which) { case FIXED: @@ -161,17 +161,17 @@ } /* add a space-filler to the empty space representation. */ -void mtspace_add(mtspace_t * mtspace, const rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) +void mtspace_add(mtspace_t * mtspace, const rnd_rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) { mtspacebox_t *filler = mtspace_create_box(box, clearance); - pcb_r_insert_entry(which_tree(mtspace, which), (const rnd_box_t *) filler); + pcb_r_insert_entry(which_tree(mtspace, which), (const rnd_rnd_box_t *) filler); } /* remove a space-filler from the empty space representation. */ -void mtspace_remove(mtspace_t * mtspace, const rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) +void mtspace_remove(mtspace_t * mtspace, const rnd_rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance) { struct mts_info cl; - rnd_box_t small_search; + rnd_rnd_box_t small_search; cl.clearance = clearance; cl.box = *box; @@ -184,7 +184,7 @@ } struct query_closure { - rnd_box_t *cbox; + rnd_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(pcb_heap_t * heap, rnd_cheap_point_t * desired, rnd_box_t * newone) +static inline void heap_append(pcb_heap_t * heap, rnd_cheap_point_t * desired, rnd_rnd_box_t * newone) { rnd_cheap_point_t p = *desired; assert(desired); @@ -201,7 +201,7 @@ pcb_heap_insert(heap, PCB_ABS(p.X - desired->X) + (p.Y - desired->Y), newone); } -static inline void append(struct query_closure *qc, rnd_box_t * newone) +static inline void append(struct query_closure *qc, rnd_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 pcb_r_dir_t query_one(const rnd_box_t * box, void *cl) +static pcb_r_dir_t query_one(const rnd_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_box_t b1 = *qc->cbox, b2 = mtsb->box; + rnd_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_box_t *newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); + rnd_rnd_box_t *newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_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_box_t *newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); + rnd_rnd_box_t *newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_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_box_t *newone; - newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); + rnd_rnd_box_t *newone; + newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_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_box_t *newone = (rnd_box_t *) malloc(sizeof(rnd_box_t)); + rnd_rnd_box_t *newone = (rnd_rnd_box_t *) malloc(sizeof(rnd_rnd_box_t)); newone->Y1 = qc->cbox->Y1; newone->Y2 = qc->cbox->Y2; newone->X2 = qc->cbox->X2; @@ -313,13 +313,13 @@ * it returns pcb_true if it has exhausted the region vector/heap and never * found an empty area. */ -static void qloop(struct query_closure *qc, pcb_rtree_t * tree, heap_or_vector res, rnd_bool is_vec) +static void qloop(struct query_closure *qc, rnd_rtree_t * tree, heap_or_vector res, rnd_bool is_vec) { - rnd_box_t *cbox; + rnd_rnd_box_t *cbox; int n; while (!(qc->desired ? pcb_heap_is_empty(qc->checking.h) : vector_is_empty(qc->checking.v))) { - cbox = qc->desired ? (rnd_box_t *) pcb_heap_remove_smallest(qc->checking.h) : (rnd_box_t *) vector_remove_last(qc->checking.v); + cbox = qc->desired ? (rnd_rnd_box_t *) pcb_heap_remove_smallest(qc->checking.h) : (rnd_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_box_t * region, +vetting_t *mtspace_query_rect(mtspace_t * mtspace, const rnd_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_box_t *cbox; + rnd_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_box_t *) malloc(sizeof(rnd_box_t)); + cbox = (rnd_rnd_box_t *) malloc(sizeof(rnd_rnd_box_t)); *cbox = rnd_bloat_box(region, clearance + radius); if (desired) { work->untested.h = pcb_heap_create(); Index: trunk/src_plugins/autoroute/mtspace.h =================================================================== --- trunk/src_plugins/autoroute/mtspace.h (revision 30969) +++ trunk/src_plugins/autoroute/mtspace.h (revision 30970) @@ -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_box_t * box, mtspace_type_t which, rnd_coord_t clearance); +void mtspace_add(mtspace_t * mtspace, const rnd_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_box_t * box, mtspace_type_t which, rnd_coord_t clearance); +void mtspace_remove(mtspace_t * mtspace, const rnd_rnd_box_t * box, mtspace_type_t which, rnd_coord_t clearance); -vetting_t *mtspace_query_rect(mtspace_t * mtspace, const rnd_box_t * region, +vetting_t *mtspace_query_rect(mtspace_t * mtspace, const rnd_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 30969) +++ trunk/src_plugins/ddraft/centgeo.c (revision 30970) @@ -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_box_t *ip, double offs[2]) +int pcb_intersect_cline_cline(pcb_line_t *Line1, pcb_line_t *Line2, rnd_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_box_t *ip, double offs[2], int oline) +static int intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_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_box_t *ip, double offs[2]) +int pcb_intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, rnd_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_box_t *ip, double offs[2]) +int pcb_intersect_carc_cline(pcb_arc_t *Arc, pcb_line_t *Line, rnd_rnd_box_t *ip, double offs[2]) { return intersect_cline_carc(Line, Arc, ip, offs, 0); } @@ -320,7 +320,7 @@ } /* reduce arc start angle and delta to 0..360 */ -static void normalize_angles(pcb_angle_t *sa, pcb_angle_t *d) +static void normalize_angles(rnd_angle_t *sa, rnd_angle_t *d) { if (*d < 0) { *sa += *d; @@ -334,7 +334,7 @@ static int radius_crosses_arc(double x, double y, pcb_arc_t *arc) { double alpha = atan2(y - arc->Y, -x + arc->X) * PCB_RAD_TO_DEG; - pcb_angle_t sa = arc->StartAngle, d = arc->Delta; + rnd_angle_t sa = arc->StartAngle, d = arc->Delta; normalize_angles(&sa, &d); if (alpha < 0) @@ -344,7 +344,7 @@ return (sa + d - 360) >= alpha; } -int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, rnd_box_t *ip, double offs[2]) +int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, rnd_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 30969) +++ trunk/src_plugins/ddraft/centgeo.h (revision 30970) @@ -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_box_t *ip, double offs[2]); +int pcb_intersect_cline_cline(pcb_line_t *Line1, pcb_line_t *Line2, rnd_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_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]); +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]); /* 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_box_t *ip, double offs[2]); +int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, rnd_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.c =================================================================== --- trunk/src_plugins/ddraft/cli.c (revision 30969) +++ trunk/src_plugins/ddraft/cli.c (revision 30970) @@ -97,7 +97,7 @@ int invalid; rnd_coord_t x, y, dist; - pcb_angle_t angle, offs; + rnd_angle_t angle, offs; rnd_cardinal_t id; }; Index: trunk/src_plugins/ddraft/cli_line.c =================================================================== --- trunk/src_plugins/ddraft/cli_line.c (revision 30969) +++ trunk/src_plugins/ddraft/cli_line.c (revision 30970) @@ -1,4 +1,4 @@ -static int line_parse(char *line, int argc, cli_node_t *argv, rnd_box_t *box, int verbose, int annot) +static int line_parse(char *line, int argc, cli_node_t *argv, rnd_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_box_t box; + rnd_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_box_t box; + rnd_rnd_box_t box; pcb_ddraft_attached_reset(); Index: trunk/src_plugins/ddraft/trim.c =================================================================== --- trunk/src_plugins/ddraft/trim.c (revision 30969) +++ trunk/src_plugins/ddraft/trim.c (revision 30970) @@ -34,7 +34,7 @@ /* Move a line endpoint to a new absoltue coord in an undoable way */ static void move_lp(pcb_line_t *line, int pt_idx, rnd_coord_t x, rnd_coord_t y) { - pcb_point_t *pt; + rnd_point_t *pt; switch(pt_idx) { case 1: pt = &line->Point1; break; Index: trunk/src_plugins/dialogs/dlg_fontsel.c =================================================================== --- trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30969) +++ trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30970) @@ -145,7 +145,7 @@ static void pcb_dlg_fontsel(pcb_board_t *pcb, int modal, int global, pcb_text_t *txt_obj) { - rnd_box_t vbox = {0, 0, PCB_MM_TO_COORD(55), PCB_MM_TO_COORD(55)}; + rnd_rnd_box_t vbox = {0, 0, PCB_MM_TO_COORD(55), PCB_MM_TO_COORD(55)}; pcb_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 30969) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 30970) @@ -54,7 +54,7 @@ long subc_id; rnd_cardinal_t proto_id; rnd_cardinal_t *stat; /* temporary usage stat */ - rnd_box_t drawbox; + rnd_rnd_box_t drawbox; rnd_bool modal; } pstk_lib_ctx_t; @@ -210,7 +210,7 @@ ps->BoundingBox.Y1 -= PCB_MM_TO_COORD(0.5); ps->BoundingBox.X2 += PCB_MM_TO_COORD(0.5); ps->BoundingBox.Y2 += PCB_MM_TO_COORD(0.5); - memcpy(&ctx->drawbox, &ps->BoundingBox, sizeof(rnd_box_t)); + memcpy(&ctx->drawbox, &ps->BoundingBox, sizeof(rnd_rnd_box_t)); pcb_dad_preview_zoomto(&ctx->dlg[ctx->wprev], &ctx->drawbox); } @@ -413,7 +413,7 @@ pcb_hid_attribute_t *attr; pcb_hid_row_t *r; long pid; - rnd_box_t box; + rnd_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 30969) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 30970) @@ -137,7 +137,7 @@ static void library_update_preview(library_ctx_t *ctx, pcb_subc_t *sc, pcb_fplibrary_t *l) { - rnd_box_t bbox; + rnd_rnd_box_t bbox; pcb_hid_attr_val_t hv; gds_t tmp; Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 30969) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 30970) @@ -33,7 +33,7 @@ typedef struct { PCB_DAD_DECL_NOINIT(dlg) pcb_board_t *pcb; - rnd_box_t bb_prv; + rnd_rnd_box_t bb_prv; int wnetlist, wprev, wtermlist; int wsel, wunsel, wfind, wunfind, wrats, wnorats, wripup, waddrats, wrename, wmerge, wattr; int active; /* already open - allow only one instance */ Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 30969) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 30970) @@ -71,7 +71,7 @@ } else { char tmp[128]; - rnd_box_t bbox; + rnd_rnd_box_t bbox; sprintf(tmp, "Subcircuit #%ld not found.", ctx->subc_id); bbox.X1 = bbox.Y1 = 0; bbox.X2 = bbox.Y2 = PCB_MM_TO_COORD(10); @@ -111,7 +111,7 @@ pinout_ctx_t *ctx = prv->user_ctx; void *r1, *r2, *r3; pcb_objtype_t type; - rnd_box_t b; + rnd_rnd_box_t b; pcb_hid_attr_val_t val; val.str = "n/a"; Index: trunk/src_plugins/dialogs/dlg_pref_confedit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30969) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30970) @@ -84,7 +84,7 @@ break; case RND_CFN_UNIT: { - const pcb_unit_t *u = get_unit_struct(val); + const rnd_unit_t *u = get_unit_struct(val); if (u != NULL) hv.lng = u - pcb_units; else Index: trunk/src_plugins/dialogs/dlg_pref_layer.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 30969) +++ trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 30970) @@ -50,7 +50,7 @@ void pcb_dlg_pref_layer_create(pref_ctx_t *ctx) { - rnd_box_t vbox = {0, 0, PCB_MM_TO_COORD(150), PCB_MM_TO_COORD(150)}; + rnd_rnd_box_t vbox = {0, 0, PCB_MM_TO_COORD(150), PCB_MM_TO_COORD(150)}; PCB_DAD_COMPFLAG(ctx->dlg, PCB_HATF_EXPFILL); PCB_DAD_BEGIN_VBOX(ctx->dlg); Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 30969) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 30970) @@ -245,10 +245,10 @@ hatch_box(x1, y1, x2, y2, thick_hatch, -step_back); } -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 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 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(pcb_hid_gc_t gc, int x, int y, const char *label, rnd_box_t *box) +static rnd_coord_t create_button(pcb_hid_gc_t gc, int x, int y, const char *label, rnd_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 PCB_COORD_TO_MM(box->X2); } -static int is_button(int x, int y, const rnd_box_t *box) +static int is_button(int x, int y, const rnd_rnd_box_t *box) { return (x >= box->X1) && (x <= box->X2) && (y >= box->Y1) && (y <= box->Y2); } Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 30969) +++ trunk/src_plugins/export_dsn/dsn.c (revision 30970) @@ -304,7 +304,7 @@ pcb_layergrp_t *grp = pcb_get_layergrp(PCB, gid); char *padstack = pcb_strdup_printf("Term_poly_%ld", poly->ID); pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; pcb_fprintf(fp, " (pin %s \"%s\" %.6mm %.6mm)\n", padstack, poly->term, 0, 0); Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 30969) +++ trunk/src_plugins/export_dxf/dxf.c (revision 30970) @@ -443,7 +443,7 @@ free(gc); } -static void dxf_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void dxf_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { if (direct) return; Index: trunk/src_plugins/export_dxf/dxf_draw.c =================================================================== --- trunk/src_plugins/export_dxf/dxf_draw.c (revision 30969) +++ trunk/src_plugins/export_dxf/dxf_draw.c (revision 30970) @@ -110,9 +110,9 @@ } } -static void dxf_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void dxf_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { - pcb_angle_t end_angle, tmp; + rnd_angle_t end_angle, tmp; dxf_ctx_t *ctx = &dxf_ctx; end_angle = start_angle + delta_angle; Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 30969) +++ trunk/src_plugins/export_excellon/excellon.c (revision 30970) @@ -337,7 +337,7 @@ free(gc); } -static void excellon_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) +static void excellon_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -420,7 +420,7 @@ excellon_draw_line(gc, x2, y1, x2, y2); } -static void excellon_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void excellon_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { if (!warn.arc) { warn.arc = 1; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 30969) +++ trunk/src_plugins/export_gerber/gerber.c (revision 30970) @@ -294,7 +294,7 @@ } } -static rnd_box_t region; +static rnd_rnd_box_t region; static void append_file_suffix(gds_t *dst, pcb_layergrp_id_t gid, pcb_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(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) +static void gerber_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) { gerber_drawing_mode = op; if ((f != NULL) && (gerber_debug)) @@ -852,7 +852,7 @@ gerber_draw_line(gc, x2, y1, x2, y2); } -static void gerber_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void gerber_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_bool m = pcb_false; double arcStartX, arcStopX, arcStartY, arcStopY; Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 30969) +++ trunk/src_plugins/export_openems/excitation.c (revision 30970) @@ -145,7 +145,7 @@ static rnd_bool to_hz(const char *s, double *out) { - const pcb_unit_t *u; + const rnd_unit_t *u; double d; if (!pcb_get_value_unit(s, NULL, 0, &d, &u)) return pcb_false; Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 30969) +++ trunk/src_plugins/export_openems/export_openems.c (revision 30970) @@ -708,7 +708,7 @@ free(gc); } -static void openems_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void openems_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -752,7 +752,7 @@ { } -static void openems_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void openems_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { } Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 30969) +++ trunk/src_plugins/export_openems/mesh.c (revision 30970) @@ -386,7 +386,7 @@ polylist_foreach(&layer->Polygon, &it, poly) { pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; for(pa = pcb_poly_island_first(poly, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { rnd_coord_t x, y; Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 30969) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 30970) @@ -429,7 +429,7 @@ free(gc); } -static void openscad_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void openscad_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -524,7 +524,7 @@ openscad_draw_line(gc, x1, y2, x1, y1); } -static void openscad_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void openscad_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { double a, step = delta_angle/10.0, end_angle = start_angle + delta_angle; int first; @@ -621,7 +621,7 @@ PCB_POLY_ALL_LOOP(PCB->Data); { pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; if (!PCB_FLAG_TEST(PCB_FLAG_SELECTED, polygon)) continue; Index: trunk/src_plugins/export_openscad/scad_draw.c =================================================================== --- trunk/src_plugins/export_openscad/scad_draw.c (revision 30969) +++ trunk/src_plugins/export_openscad/scad_draw.c (revision 30970) @@ -117,8 +117,8 @@ static void scad_draw_drills(void) { - pcb_rtree_it_t it; - rnd_box_t *obj; + rnd_rtree_it_t it; + rnd_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 30969) +++ trunk/src_plugins/export_png/png.c (revision 30970) @@ -443,7 +443,7 @@ } static const char *filename; -static rnd_box_t *bounds; +static rnd_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, pcb_hid_attr_val_t *options, pcb_xform_t *xform) { static int saved_layer_stack[PCB_MAX_LAYER]; - rnd_box_t tmp, region; + rnd_rnd_box_t tmp, region; pcb_hid_expose_ctx_t ctx; f = the_file; @@ -600,7 +600,7 @@ { int save_ons[PCB_MAX_LAYER]; int i; - rnd_box_t tmp, *bbox; + rnd_rnd_box_t tmp, *bbox; int w, h; int xmax, ymax, dpi; pcb_xform_t xform; @@ -873,7 +873,7 @@ } static pcb_composite_op_t drawing_mode; -static void png_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void png_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { static gdImagePtr dst_im; drawing_mode = op; @@ -1244,9 +1244,9 @@ } -static void png_draw_arc_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void png_draw_arc_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { - pcb_angle_t sa, ea; + rnd_angle_t sa, ea; use_gc(im, gc); gdImageSetThickness(im, 0); @@ -1302,7 +1302,7 @@ gdImageArc(im, SCALE_X(cx), SCALE_Y(cy), SCALE(2 * width), SCALE(2 * height), sa, ea, gdBrushed); } -static void png_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void png_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { png_draw_arc_(im, gc, cx, cy, width, height, start_angle, delta_angle); if ((im != erase_im) && (erase_im != NULL)) { Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 30969) +++ trunk/src_plugins/export_ps/eps.c (revision 30970) @@ -159,7 +159,7 @@ } static const char *filename; -static rnd_box_t *bounds; +static rnd_rnd_box_t *bounds; static int in_mono, as_shown; static pcb_hid_attr_val_t *options_; @@ -217,7 +217,7 @@ { int i; static int saved_layer_stack[PCB_MAX_LAYER]; - rnd_box_t tmp, region; + rnd_rnd_box_t tmp, region; pcb_hid_expose_ctx_t ctx; options_ = options; @@ -443,7 +443,7 @@ free(gc); } -static void eps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void eps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { if (direct) return; @@ -571,9 +571,9 @@ pcb_fprintf(f, "%mi %mi %mi %mi %s\n", x1, y1, x2, y2, gc->erase ? "tc" : "t"); } -static void eps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void eps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { - pcb_angle_t sa, ea; + rnd_angle_t sa, ea; double w; if ((width == 0) && (height == 0)) { Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 30969) +++ trunk/src_plugins/export_ps/ps.c (revision 30970) @@ -963,7 +963,7 @@ free(gc); } -static void ps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void ps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { global.drawing_mode = op; } @@ -1114,9 +1114,9 @@ pcb_fprintf(global.f, "%mi %mi %mi %mi t\n", x1, y1, x2, y2); } -static void ps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void ps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { - pcb_angle_t sa, ea; + rnd_angle_t sa, ea; double w; if ((width == 0) && (height == 0)) { Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 30969) +++ trunk/src_plugins/export_stat/stat.c (revision 30970) @@ -334,7 +334,7 @@ PCB_END_LOOP; if (pcb_has_explicit_outline(PCB)) { - rnd_box_t bb; + rnd_rnd_box_t bb; pcb_data_bbox_naked(&bb, PCB->Data, pcb_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 30969) +++ trunk/src_plugins/export_svg/svg.c (revision 30970) @@ -486,7 +486,7 @@ free(gc); } -static void svg_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void svg_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { drawing_mode = op; @@ -720,10 +720,10 @@ } } -static void svg_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void svg_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_coord_t x1, y1, x2, y2, diff = 0, diff2, maxdiff; - pcb_angle_t sa, ea; + rnd_angle_t sa, ea; svg_drawn_objs++; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 30969) +++ trunk/src_plugins/export_xy/xy.c (revision 30970) @@ -84,7 +84,7 @@ static pcb_hid_attr_val_t xy_values[NUM_OPTIONS]; static const char *xy_filename; -static const pcb_unit_t *xy_unit; +static const rnd_unit_t *xy_unit; vts0_t fmt_names; /* array of const char * long name of each format, pointing into the conf database */ vts0_t fmt_ids; /* array of strdup'd short name (ID) of each format */ @@ -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_box_t box; + rnd_rnd_box_t box; box.X1 = box.Y1 = PCB_MAX_COORD; box.X2 = box.Y2 = -PCB_MAX_COORD; Index: trunk/src_plugins/exto_std/bus.c =================================================================== --- trunk/src_plugins/exto_std/bus.c (revision 30969) +++ trunk/src_plugins/exto_std/bus.c (revision 30970) @@ -95,7 +95,7 @@ ny = vx; \ } while(0) -static int close_enough(pcb_point_t a, pcb_point_t b) +static int close_enough(rnd_point_t a, rnd_point_t b) { rnd_coord_t dx = a.X - b.X, dy = a.Y - b.Y; @@ -123,8 +123,8 @@ o0 = ((bus->width - 1) * bus->pitch)/2; for(l = linelist_first(&ely->Line); l != NULL; l = linelist_next(l)) { - pcb_rtree_box_t sb; - pcb_rtree_it_t it; + rnd_rtree_box_t sb; + rnd_rtree_it_t it; bus_seg_def; double o = o0, a1 = 0, a2 = 0, tune1, tune2; int n, c1 = 0, c2 = 0; @@ -137,7 +137,7 @@ /* rnd_trace("line\n");*/ sb.x1 = l->Point1.X-1; sb.y1 = l->Point1.Y-1; sb.x2 = l->Point1.X+1; sb.y2 = l->Point1.Y+1; - for(ltmp = pcb_rtree_first(&it, ely->line_tree, &sb); ltmp != NULL; ltmp = pcb_rtree_next(&it)) + for(ltmp = rnd_rtree_first(&it, ely->line_tree, &sb); ltmp != NULL; ltmp = rnd_rtree_next(&it)) { if ((ltmp == l) || (ltmp->parent.any != l->parent.any)) continue; if (close_enough(l->Point1, ltmp->Point1)) { @@ -155,7 +155,7 @@ } sb.x1 = l->Point2.X-1; sb.y1 = l->Point2.Y-1; sb.x2 = l->Point2.X+1; sb.y2 = l->Point2.Y+1; - for(ltmp = pcb_rtree_first(&it, ely->line_tree, &sb); ltmp != NULL; ltmp = pcb_rtree_next(&it)) + for(ltmp = rnd_rtree_first(&it, ely->line_tree, &sb); ltmp != NULL; ltmp = rnd_rtree_next(&it)) { if ((ltmp == l) || (ltmp->parent.any != l->parent.any)) continue; if (close_enough(l->Point2, ltmp->Point1)) { Index: trunk/src_plugins/exto_std/cord.c =================================================================== --- trunk/src_plugins/exto_std/cord.c (revision 30969) +++ trunk/src_plugins/exto_std/cord.c (revision 30970) @@ -174,7 +174,7 @@ { pcb_exto_draw_mark(info, subc); if (subc->extobj_data == cord_footprint) - pcb_draw_subc_mark((const rnd_box_t *)subc, info); + pcb_draw_subc_mark((const rnd_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 30969) +++ trunk/src_plugins/exto_std/dimension.c (revision 30970) @@ -195,7 +195,7 @@ } else { /* modify the floater if it exists */ if (ly->line_tree != NULL) - pcb_r_delete_entry(ly->line_tree, (rnd_box_t *)flt); + pcb_r_delete_entry(ly->line_tree, (rnd_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) - pcb_r_insert_entry(ly->line_tree, (rnd_box_t *)flt); + pcb_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)flt); } /* guide lines */ Index: trunk/src_plugins/exto_std/line_of_vias.c =================================================================== --- trunk/src_plugins/exto_std/line_of_vias.c (revision 30969) +++ trunk/src_plugins/exto_std/line_of_vias.c (revision 30970) @@ -96,8 +96,8 @@ too_close = pitch/2.0; qbox_bloat = pitch/4.0; for(offs = 0; offs <= len; offs += pitch) { - pcb_rtree_it_t it; - pcb_rtree_box_t qbox; + rnd_rtree_it_t it; + rnd_rtree_box_t qbox; pcb_pstk_t *cl; int skip = 0; rnd_coord_t rx = rnd_round(x), ry = rnd_round(y); @@ -107,7 +107,7 @@ qbox.x2 = rnd_round(rx + qbox_bloat); qbox.y2 = rnd_round(ry + qbox_bloat); if ((pcb != NULL) && (pcb->Data->padstack_tree != NULL)) { - for(cl = pcb_rtree_first(&it, pcb->Data->padstack_tree, &qbox); cl != NULL; cl = pcb_rtree_next(&it)) { + for(cl = rnd_rtree_first(&it, pcb->Data->padstack_tree, &qbox); cl != NULL; cl = rnd_rtree_next(&it)) { if (rnd_distance(rx, ry, cl->x, cl->y) < too_close) { skip = 1; break; Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 30969) +++ trunk/src_plugins/fontmode/fontmode.c (revision 30970) @@ -196,7 +196,7 @@ for(poly = polylist_first(&symbol->polys); poly != NULL; poly = polylist_next(poly)) { int n; - pcb_point_t *pnt; + rnd_point_t *pnt; add_poly(lfont, poly, ox, oy); add_poly(lorig, poly, ox, oy); Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 30969) +++ trunk/src_plugins/hid_batch/batch.c (revision 30970) @@ -204,7 +204,7 @@ { } -static void batch_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t end_angle) +static void batch_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t end_angle) { } @@ -305,7 +305,7 @@ } -static void batch_view_get(pcb_hid_t *hid, rnd_box_t *viewbox) +static void batch_view_get(pcb_hid_t *hid, rnd_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 30969) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30970) @@ -374,7 +374,7 @@ priv->out_clip = priv->sketch_clip; } -static void ghid_gdk_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void ghid_gdk_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_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(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_box_t *screen) +static void ghid_gdk_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_gui->coord_per_pix = ghidgui->port.view.coord_per_px; } @@ -666,7 +666,7 @@ gdk_draw_line(priv->out_clip, priv->clip_gc, dx1, dy1, dx2, dy2); } -static void ghid_gdk_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void ghid_gdk_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) { gint vrx2, vry2; double w, h, radius; @@ -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_box_t *b, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static int poly_is_aligned_rect(rnd_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(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { - rnd_box_t b; + rnd_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(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { - rnd_box_t b; + rnd_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 30969) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30970) @@ -62,7 +62,7 @@ rnd_coord_t width; } hid_gc_s; -void ghid_gl_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_box_t *screen) +void ghid_gl_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_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_box_t *drawn_area) +static void ghid_gl_draw_grid(rnd_hidlib_t *hidlib, rnd_rnd_box_t *drawn_area) { render_priv_t *priv = ghidgui->port.render_priv; @@ -459,7 +459,7 @@ hidgl_draw_line(gc->core_gc.cap, gc->width, x1, y1, x2, y2, ghidgui->port.view.coord_per_px); } -static void ghid_gl_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void ghid_gl_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) { USE_GC(gc); Index: trunk/src_plugins/hid_lesstif/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 30969) +++ trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 30970) @@ -94,7 +94,7 @@ pcb_ltf_preview_redraw(pd); } -static void ltf_preview_zoomto(pcb_hid_attribute_t *attr, void *hid_ctx, const rnd_box_t *view) +static void ltf_preview_zoomto(pcb_hid_attribute_t *attr, void *hid_ctx, const rnd_rnd_box_t *view) { pcb_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 30969) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30970) @@ -2038,7 +2038,7 @@ { static int c_x = -2, c_y = -2; static pcb_mark_t saved_mark; - static const pcb_unit_t *old_grid_unit = NULL; + static const rnd_unit_t *old_grid_unit = NULL; if (crosshair_x != c_x || crosshair_y != c_y || pcbhl_conf.editor.grid_unit != old_grid_unit || memcmp(&saved_mark, &pcb_marked, sizeof(pcb_mark_t))) { c_x = crosshair_x; c_y = crosshair_y; @@ -2175,12 +2175,12 @@ free(gc); } -static void lesstif_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_box_t *screen) +static void lesstif_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_gui->coord_per_pix = view_zoom; } -static void lesstif_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) +static void lesstif_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) { lesstif_drawing_mode = op; @@ -2395,7 +2395,7 @@ } } -static void lesstif_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void lesstif_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { if (conf_core.editor.thin_draw && gc->erase) return; @@ -2897,7 +2897,7 @@ } -static void ltf_view_get(pcb_hid_t *hid, rnd_box_t *viewbox) +static void ltf_view_get(pcb_hid_t *hid, rnd_rnd_box_t *viewbox) { viewbox->X1 = view_left_x; viewbox->Y1 = view_top_y; @@ -2925,7 +2925,7 @@ void lesstif_create_menu(pcb_hid_t *hid, const char *menu, const pcb_menu_prop_t *props); int lesstif_remove_menu(pcb_hid_t *hid, const char *menu); int lesstif_remove_menu_node(pcb_hid_t *hid, lht_node_t *node); -pcb_hid_cfg_t *lesstif_get_menu_cfg(pcb_hid_t *hid); +rnd_hid_cfg_t *lesstif_get_menu_cfg(pcb_hid_t *hid); int ltf_open_popup(pcb_hid_t *hid, const char *menupath); int pplg_check_ver_hid_lesstif(int version_we_need) { return 0; } Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 30969) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 30970) @@ -33,7 +33,7 @@ extern rnd_hidlib_t *ltf_hidlib; Widget lesstif_menubar; -pcb_hid_cfg_t *lesstif_cfg; +rnd_hid_cfg_t *lesstif_cfg; rnd_conf_hid_id_t lesstif_menuconf_id = -1; htsp_t ltf_popups; /* popup_name -> Widget */ @@ -666,7 +666,7 @@ return pcb_hid_cfg_remove_menu_node(lesstif_cfg, node, del_menu, NULL); } -pcb_hid_cfg_t *lesstif_get_menu_cfg(pcb_hid_t *hid) +rnd_hid_cfg_t *lesstif_get_menu_cfg(pcb_hid_t *hid) { return lesstif_cfg; } Index: trunk/src_plugins/hid_lesstif/wt_preview.c =================================================================== --- trunk/src_plugins/hid_lesstif/wt_preview.c (revision 30969) +++ trunk/src_plugins/hid_lesstif/wt_preview.c (revision 30970) @@ -169,7 +169,7 @@ pcb_ltf_preview_redraw(pd); } -void pcb_ltf_preview_invalidate(const rnd_box_t *screen) +void pcb_ltf_preview_invalidate(const rnd_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_box_t pb; + rnd_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 30969) +++ trunk/src_plugins/hid_lesstif/wt_preview.h (revision 30970) @@ -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_box_t *screen); +void pcb_ltf_preview_invalidate(const rnd_rnd_box_t *screen); void pcb_ltf_preview_add(pcb_ltf_preview_t *prv); Index: trunk/src_plugins/hid_remote/proto.c =================================================================== --- trunk/src_plugins/hid_remote/proto.c (revision 30969) +++ trunk/src_plugins/hid_remote/proto.c (revision 30970) @@ -241,7 +241,7 @@ send_end(&pctx); } -void proto_send_draw_arc(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +void proto_send_draw_arc(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { send_begin(&pctx, "arc"); send_open(&pctx, 0, 1); Index: trunk/src_plugins/hid_remote/proto.h =================================================================== --- trunk/src_plugins/hid_remote/proto.h (revision 30969) +++ trunk/src_plugins/hid_remote/proto.h (revision 30970) @@ -43,7 +43,7 @@ void proto_send_set_line_width(int gc, rnd_coord_t width); void proto_send_set_draw_xor(int gc, int xor_set); void proto_send_draw_line(int gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); -void proto_send_draw_arc(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle); +void proto_send_draw_arc(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle); void proto_send_draw_rect(int gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int is_filled); void proto_send_fill_circle(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); void proto_send_draw_poly(int gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 30969) +++ trunk/src_plugins/hid_remote/remote.c (revision 30970) @@ -192,7 +192,7 @@ } static const char *drawing_mode_names[] = { "reset", "positive", "negative", "flush"}; -static void remote_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *drw_screen) +static void remote_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_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); @@ -257,7 +257,7 @@ proto_send_draw_line(idx, x1, y1, x2, y2); } -static void remote_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void remote_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { int idx = gc2idx(gc); if (idx >= 0) Index: trunk/src_plugins/import_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/import_ipcd356/ipcd356.c (revision 30969) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 30970) @@ -425,7 +425,7 @@ pcb_subc_bbox(sc); if (PCB->Data->subc_tree == NULL) PCB->Data->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(PCB->Data->subc_tree, (rnd_box_t *)sc); + pcb_r_insert_entry(PCB->Data->subc_tree, (rnd_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 30969) +++ trunk/src_plugins/io_autotrax/read.c (revision 30970) @@ -298,8 +298,8 @@ pcb_layer_t *ly; rnd_coord_t centreX, centreY, width, height, Thickness, Clearance, radius; - pcb_angle_t start_angle = 0.0; - pcb_angle_t delta = 360.0; + rnd_angle_t start_angle = 0.0; + rnd_angle_t delta = 360.0; pcb_flag_t Flags = pcb_flag_make(0); /* start with something bland here */ pcb_layer_id_t PCB_layer; @@ -1065,7 +1065,7 @@ pcb_subc_bbox(new_module); if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)new_module); + pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_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_box_t board_size, *box; + rnd_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 30969) +++ trunk/src_plugins/io_autotrax/write.c (revision 30970) @@ -290,7 +290,7 @@ } /* generates an autotrax arc "segments" value to approximate an arc being exported */ -static int pcb_rnd_arc_to_autotrax_segments(pcb_angle_t arc_start, pcb_angle_t arc_delta) +static int pcb_rnd_arc_to_autotrax_segments(rnd_angle_t arc_start, rnd_angle_t arc_delta) { int arc_segments = 0; /* start with no arc segments */ /* 15 = circle, bit 1 = LUQ, bit 2 = LLQ, bit 3 = LRQ, bit 4 = URQ */ @@ -497,7 +497,7 @@ static int wrax_subc(wctx_t *ctx, pcb_subc_t *subc) { int res, on_bottom = 0, silk_layer; - rnd_box_t *box = &subc->BoundingBox; + rnd_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") @@ -552,7 +552,7 @@ rnd_cardinal_t current_layer = number; pcb_poly_it_t poly_it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; rnd_coord_t minx, miny, maxx, maxy; Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 30969) +++ trunk/src_plugins/io_dsn/read.c (revision 30970) @@ -52,8 +52,8 @@ typedef struct { gsxl_dom_t dom; pcb_board_t *pcb; - const pcb_unit_t *unit; - rnd_box_t bbox; /* board's bbox from the boundary subtrees, in the file's coordinate system */ + const rnd_unit_t *unit; + rnd_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 */ @@ -129,9 +129,9 @@ } \ } while(0) -static const pcb_unit_t *push_unit(dsn_read_t *ctx, gsxl_node_t *nu) +static const rnd_unit_t *push_unit(dsn_read_t *ctx, gsxl_node_t *nu) { - const pcb_unit_t *old = ctx->unit; + const rnd_unit_t *old = ctx->unit; char *su, *s; if ((nu == NULL) || (nu->children == NULL)) @@ -149,7 +149,7 @@ return old; } -static void pop_unit(dsn_read_t *ctx, const pcb_unit_t *saved) +static void pop_unit(dsn_read_t *ctx, const rnd_unit_t *saved) { ctx->unit = saved; } @@ -156,9 +156,9 @@ /* Search a subtree for a unit descriptor and push it and return the old. Returns NULL if nothing found/pushed */ -static const pcb_unit_t *dsn_set_old_unit(dsn_read_t *ctx, gsxl_node_t *nd) +static const rnd_unit_t *dsn_set_old_unit(dsn_read_t *ctx, gsxl_node_t *nd) { - const pcb_unit_t *old_unit = NULL; + const rnd_unit_t *old_unit = NULL; gsxl_node_t *n; for(n = nd; n != NULL; n = n->next) { @@ -189,7 +189,7 @@ rnd_attribute_put(attr, STRE(kv), STRE(kv->children)); } -static int dsn_parse_rect(dsn_read_t *ctx, rnd_box_t *dst, gsxl_node_t *src, int no_y_flip) +static int dsn_parse_rect(dsn_read_t *ctx, rnd_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_box_t box; + rnd_rnd_box_t box; b = gsxl_children(bnd); if ((b->next == NULL) || (b->next->next == NULL)) { @@ -370,7 +370,7 @@ gsxl_node_t *n, *i; pcb_layergrp_t *topcop = NULL, *botcop = NULL, *grp; pcb_layergrp_id_t gid; - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; const pcb_dflgmap_t doclayers[] = { {"top_outline", PCB_LYT_TOP | PCB_LYT_DOC, "outline", PCB_LYC_AUTO, 0}, {"bot_outline", PCB_LYT_BOTTOM | PCB_LYT_DOC, "outline", PCB_LYC_AUTO, 0}, @@ -538,7 +538,7 @@ int dsn_parse_pstk_shape_rect(dsn_read_t *ctx, gsxl_node_t *nd, pcb_pstk_shape_t *shp) { - rnd_box_t box; + rnd_rnd_box_t box; gsxl_node_t *args = nd->children->next; if (dsn_parse_rect(ctx, &box, args, 1) != 0) @@ -729,7 +729,7 @@ static int dsn_parse_lib_padstack(dsn_read_t *ctx, gsxl_node_t *wrr) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; gsxl_node_t *n; pcb_pstk_proto_t *prt; pcb_pstk_shape_t hole; @@ -954,7 +954,7 @@ static int dsn_parse_lib_image(dsn_read_t *ctx, gsxl_node_t *imr) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; pcb_subc_t *subc; char *id; int n; @@ -1049,7 +1049,7 @@ static int dsn_parse_library(dsn_read_t *ctx, gsxl_node_t *wrr) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; gsxl_node_t *n; old_unit = dsn_set_old_unit(ctx, wrr->children); @@ -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_box_t box; + rnd_rnd_box_t box; gsxl_node_t *net = wrr->children; pcb_layer_t *ly; @@ -1492,7 +1492,7 @@ static int dsn_parse_wiring(dsn_read_t *ctx, gsxl_node_t *wrr) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; old_unit = dsn_set_old_unit(ctx, wrr->children); @@ -1589,7 +1589,7 @@ static int dsn_parse_placement(dsn_read_t *ctx, gsxl_node_t *plr) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; int mirror_first = 1; old_unit = dsn_set_old_unit(ctx, plr->children); Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 30969) +++ trunk/src_plugins/io_eagle/read.c (revision 30970) @@ -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 = pcb_r_create_tree(); - pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_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 30969) +++ trunk/src_plugins/io_hyp/parser.c (revision 30970) @@ -478,7 +478,7 @@ pcb_subc_bbox(subc); if (hyp_dest->subc_tree == NULL) hyp_dest->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(hyp_dest->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(hyp_dest->subc_tree, (rnd_rnd_box_t *)subc); pcb_subc_rebind(hyp_dest->parent.board, subc); } @@ -948,9 +948,9 @@ rnd_coord_t YC, rnd_coord_t Width, rnd_coord_t Height, pcb_bool_t Clockwise, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags) { - pcb_angle_t start_angle; - pcb_angle_t end_angle; - pcb_angle_t delta; + rnd_angle_t start_angle; + rnd_angle_t end_angle; + rnd_angle_t delta; pcb_arc_t *new_arc; if (Width < 1) { @@ -1139,7 +1139,7 @@ pcb_bool_t outer_contour; hyp_vertex_t *vrtx; - pcb_polyarea_t *polyarea = NULL; + rnd_polyarea_t *polyarea = NULL; pcb_pline_t *contour = NULL; polyarea = pcb_polyarea_create(); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 30969) +++ trunk/src_plugins/io_kicad/read.c (revision 30970) @@ -1062,7 +1062,7 @@ if (st->pcb != NULL) { if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_rnd_box_t *)subc); pcb_subc_rebind(st->pcb, subc); } else @@ -1185,7 +1185,7 @@ gsxl_node_t *n; unsigned long tally = 0, required; rnd_coord_t cx, cy, endx, endy, thickness, clearance, deltax, deltay; - pcb_angle_t end_angle = 0.0, delta = 360.0; /* these defaults allow a gr_circle to be parsed, which does not specify (angle XXX) */ + rnd_angle_t end_angle = 0.0, delta = 360.0; /* these defaults allow a gr_circle to be parsed, which does not specify (angle XXX) */ pcb_flag_t flg = pcb_flag_make(0); /* start with something bland here */ pcb_layer_t *ly = NULL; pcb_arc_t *arc; @@ -1248,7 +1248,7 @@ return kicad_error(subtree, "unexpected empty/NULL node in arc."); { - pcb_angle_t start_angle; + rnd_angle_t start_angle; rnd_coord_t width, height; width = height = rnd_distance(cx, cy, endx, endy); /* calculate radius of arc */ @@ -1576,13 +1576,13 @@ /* search all layers for polygons */ for(lid = 0, ly = st->pcb->Data->Layer; lid < st->pcb->Data->LayerN; lid++,ly++) { - pcb_rtree_it_t it; + rnd_rtree_it_t it; pcb_poly_t *p; if (ly->polygon_tree == NULL) continue; /* use rtree to search for polys that are near the padstack */ - for(p = pcb_rtree_first(&it, ly->polygon_tree, (const pcb_rtree_box_t *)&zc->ps->BoundingBox); p != NULL; p = pcb_rtree_next(&it)) { + for(p = rnd_rtree_first(&it, ly->polygon_tree, (const rnd_rtree_box_t *)&zc->ps->BoundingBox); p != NULL; p = rnd_rtree_next(&it)) { const char *pnet; pnet = htpp_get(&st->poly2net, p); if ((zc != NULL) && (zc->netname != NULL) && (pnet != NULL) && (strcmp(pnet, zc->netname) == 0)) { @@ -2513,7 +2513,7 @@ if (st->pcb != NULL) { if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(st->pcb->Data->subc_tree, (rnd_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 30969) +++ trunk/src_plugins/io_kicad/write.c (revision 30970) @@ -574,7 +574,7 @@ if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { int i; pcb_line_t line; - rnd_box_t bx; + rnd_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 30969) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 30970) @@ -461,7 +461,7 @@ if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { int i; pcb_line_t line; - rnd_box_t bx; + rnd_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 30969) +++ trunk/src_plugins/io_lihata/read.c (revision 30970) @@ -207,7 +207,7 @@ } /* Load the Angle value of a text node into res. Return 0 on success */ -static int parse_angle(pcb_angle_t *res, lht_node_t *nd) +static int parse_angle(rnd_angle_t *res, lht_node_t *nd) { double tmp; rnd_bool success; @@ -744,7 +744,7 @@ poly->PointN += cnt->data.table.rows; } poly->PointMax = poly->PointN; - poly->Points = malloc(sizeof(pcb_point_t) * poly->PointMax); + poly->Points = malloc(sizeof(rnd_point_t) * poly->PointMax); poly->HoleIndexMax = poly->HoleIndexN = c-1; if (poly->HoleIndexN > 0) poly->HoleIndex = malloc(sizeof(rnd_cardinal_t) * poly->HoleIndexMax); @@ -1310,7 +1310,7 @@ if (dt->subc_tree == NULL) dt->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dt->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(dt->subc_tree, (rnd_rnd_box_t *)subc); pcb_subc_rebind(pcb, subc); @@ -1350,7 +1350,7 @@ if (!dt->subc_tree) dt->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dt->subc_tree, (rnd_box_t *)sc); + pcb_r_insert_entry(dt->subc_tree, (rnd_rnd_box_t *)sc); if (subc_out != NULL) *subc_out = sc; @@ -2310,8 +2310,8 @@ /* Run poly clipping at the end so we have all IDs and we can announce the clipping (it's slow, we may need a progress bar) */ { - pcb_rtree_it_t it; - rnd_box_t *b; + rnd_rtree_it_t it; + rnd_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_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 30969) +++ trunk/src_plugins/io_lihata/write.c (revision 30970) @@ -351,7 +351,7 @@ { char buff[128]; lht_node_t *obj; - pcb_point_t *pnt; + rnd_point_t *pnt; int n; sprintf(buff, "simplepoly.%ld", (local_id >= 0 ? local_id : poly->ID)); Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 30969) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 30970) @@ -74,7 +74,7 @@ }; typedef struct { - const pcb_unit_t *unit; + const rnd_unit_t *unit; node_t *subtree; unsigned valid:1; /* whether it's already parsed */ pcb_pstk_shape_t shp; @@ -81,7 +81,7 @@ } hkp_shape_t; typedef struct { - const pcb_unit_t *unit; + const rnd_unit_t *unit; node_t *subtree; unsigned valid:1; /* whether it's already parsed */ unsigned plated:1; @@ -90,7 +90,7 @@ } hkp_hole_t; typedef struct { - const pcb_unit_t *unit; + const rnd_unit_t *unit; node_t *subtree; unsigned valid:1; /* whether it's already parsed */ pcb_pstk_proto_t proto; @@ -113,8 +113,8 @@ int num_cop_layers; - const pcb_unit_t *unit; /* default unit used while converting coords any given time */ - const pcb_unit_t *pstk_unit; /* default unit for the padstacks file */ + const rnd_unit_t *unit; /* default unit used while converting coords any given time */ + const rnd_unit_t *pstk_unit; /* default unit for the padstacks file */ hkp_netclass_t nc_dflt; /* for default clearances */ @@ -1123,7 +1123,7 @@ if (dt->subc_tree == NULL) dt->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(dt->subc_tree, (rnd_box_t *)subc); + pcb_r_insert_entry(dt->subc_tree, (rnd_rnd_box_t *)subc); pcb_subc_rebind(ctx->pcb, subc); } @@ -1158,7 +1158,7 @@ } } -static const pcb_unit_t *parse_units(const char *ust) +static const rnd_unit_t *parse_units(const char *ust) { if (strcmp(ust, "MIL") == 0) return get_unit_struct("mil"); if (strcmp(ust, "TH") == 0) return get_unit_struct("mil"); @@ -1260,7 +1260,7 @@ /* 'autocrop' the board for now (required by y mirror and unknown extents) */ { - rnd_box_t bb; + rnd_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_mentor_cell/read_pstk.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 30969) +++ trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 30970) @@ -40,7 +40,7 @@ static hkp_hole_t *parse_hole(hkp_ctx_t *ctx, const char *name) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; node_t *hr, *ho; hkp_hole_t *h = htsp_get(&ctx->holes, name); @@ -102,7 +102,7 @@ } while(0) static hkp_shape_t *parse_shape(hkp_ctx_t *ctx, const char *name) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; node_t *n, *on, *tmp; rnd_coord_t ox = 0, oy = 0; hkp_shape_t *s = htsp_get(&ctx->shapes, name); @@ -229,7 +229,7 @@ static hkp_pstk_t *parse_pstk(hkp_ctx_t *ctx, const char *ps) { - const pcb_unit_t *old_unit; + const rnd_unit_t *old_unit; rnd_coord_t ox = 0, oy = 0; node_t *n, *hn, *on, *tn; hkp_pstk_t *p = htsp_get(&ctx->pstks, ps); Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 30969) +++ trunk/src_plugins/io_pcb/file.c (revision 30970) @@ -636,7 +636,7 @@ rnd_cardinal_t hole = 0; fprintf(FP, "\tPolygon(%s)\n\t(", F2S(polygon, PCB_OBJ_POLY)); for (p = 0; p < polygon->PointN; p++) { - pcb_point_t *point = &polygon->Points[p]; + rnd_point_t *point = &polygon->Points[p]; if (hole < polygon->HoleIndexN && p == polygon->HoleIndex[hole]) { if (hole > 0) @@ -772,7 +772,7 @@ void PostLoadElementPCB() { pcb_board_t *pcb_save = PCB; - rnd_box_t dbb; + rnd_rnd_box_t dbb; pcb_subc_t *sc; if (!yyPCB) @@ -1073,7 +1073,7 @@ pcb_subc_bbox(yysubc); if (Data->subc_tree == NULL) Data->subc_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Data->subc_tree, (rnd_box_t *)yysubc); + pcb_r_insert_entry(Data->subc_tree, (rnd_rnd_box_t *)yysubc); } static pcb_layer_t *subc_silk_layer(pcb_subc_t *subc) @@ -1090,7 +1090,7 @@ } pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, - rnd_coord_t Width, rnd_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, rnd_coord_t Thickness) + rnd_coord_t Width, rnd_coord_t Height, rnd_angle_t angle, rnd_angle_t delta, rnd_coord_t Thickness) { pcb_layer_t *ly = subc_silk_layer(subc); return pcb_arc_new(ly, X, Y, Width, Height, angle, delta, Thickness, 0, pcb_no_flags(), pcb_true); Index: trunk/src_plugins/io_pcb/file.h =================================================================== --- trunk/src_plugins/io_pcb/file.h (revision 30969) +++ trunk/src_plugins/io_pcb/file.h (revision 30970) @@ -84,7 +84,7 @@ pcb_subc_t *io_pcb_element_new(pcb_data_t *Data, pcb_subc_t *Element, pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, char *Value, rnd_coord_t TextX, rnd_coord_t TextY, unsigned int Direction, int TextScale, pcb_flag_t TextFlags, rnd_bool uniqueName); void io_pcb_element_fin(pcb_data_t *Data); pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness); -pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Width, rnd_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, rnd_coord_t Thickness); +pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Width, rnd_coord_t Height, rnd_angle_t angle, rnd_angle_t delta, rnd_coord_t Thickness); pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, rnd_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags); pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags); void io_pcb_preproc_board(pcb_board_t *pcb); Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 30969) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 30970) @@ -2455,7 +2455,7 @@ pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_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 30969) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 30970) @@ -796,7 +796,7 @@ pcb_poly_bbox(Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = pcb_r_create_tree(); - pcb_r_insert_entry(Layer->polygon_tree, (rnd_box_t *) Polygon); + pcb_r_insert_entry(Layer->polygon_tree, (rnd_rnd_box_t *) Polygon); } } ; Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 30969) +++ trunk/src_plugins/io_tedax/tboard.c (revision 30970) @@ -301,7 +301,7 @@ struct tdx_text_s { char *layer; - rnd_box_t bbox; + rnd_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 30969) +++ trunk/src_plugins/io_tedax/tetest.c (revision 30970) @@ -124,8 +124,8 @@ int tedax_etest_fsave(pcb_board_t *pcb, const char *etestid, FILE *f) { - rnd_box_t *b; - pcb_rtree_it_t it; + rnd_rnd_box_t *b; + rnd_rtree_it_t it; fprintf(f, "begin etest v1 "); tedax_fprint_escape(f, etestid); Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 30969) +++ trunk/src_plugins/jostle/jostle.c (revision 30970) @@ -70,12 +70,12 @@ #define ARG(n) (argc > (n) ? argv[n] : 0) /* DEBUG */ -static void Debugpcb_polyarea_t(pcb_polyarea_t * s, char *color) +static void Debugpcb_polyarea_t(rnd_polyarea_t * s, char *color) { int *x, *y, n, i = 0; pcb_pline_t *pl; pcb_vnode_t *v; - pcb_polyarea_t *p; + rnd_polyarea_t *p; #ifndef DEBUG_pcb_polyarea_t return; @@ -116,16 +116,16 @@ /* pcb_hid_busy(PCB, 0); */ } -/* Find the bounding box of a pcb_polyarea_t. +/* Find the bounding box of a rnd_polyarea_t. * * 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_box_t pcb_polyarea_t_boundingBox(pcb_polyarea_t * a) +static rnd_rnd_box_t pcb_polyarea_t_boundingBox(rnd_polyarea_t * a) { - pcb_polyarea_t *n; + rnd_polyarea_t *n; pcb_pline_t *pa; - rnd_box_t box; + rnd_rnd_box_t box; int first = 1; n = a; @@ -151,7 +151,7 @@ /* Given a polygon and a side of it (a direction north/northeast/etc), find a line tangent to that side, offset by clearance, and return it as a pair of vectors PQ. Make it long so it will intersect everything in the area. */ -static void pcb_polyarea_t_findXmostLine(pcb_polyarea_t * a, int side, pcb_vector_t p, pcb_vector_t q, int clearance) +static void pcb_polyarea_t_findXmostLine(rnd_polyarea_t * a, int side, pcb_vector_t p, pcb_vector_t q, int clearance) { int extra; p[0] = p[1] = 0; @@ -266,13 +266,13 @@ return line; } -static pcb_line_t *MakeBypassLine(pcb_layer_t * layer, pcb_vector_t a, pcb_vector_t b, pcb_line_t * orig, pcb_polyarea_t ** expandp) +static pcb_line_t *MakeBypassLine(pcb_layer_t * layer, pcb_vector_t a, pcb_vector_t b, pcb_line_t * orig, rnd_polyarea_t ** expandp) { pcb_line_t *line; line = Createpcb_vector_tLineOnLayer(layer, a, b, orig->Thickness, orig->Clearance, orig->Flags); if (line && expandp) { - pcb_polyarea_t *p = pcb_poly_from_pcb_line(line, line->Thickness + line->Clearance); + rnd_polyarea_t *p = pcb_poly_from_pcb_line(line, line->Thickness + line->Clearance); pcb_polyarea_boolean_free(*expandp, p, expandp, PCB_PBO_UNITE); } return line; @@ -293,7 +293,7 @@ * Then intersect them with each other and the original to find * points a, b, c, d. Finally connect the dots and remove the * old straight line. */ -static int MakeBypassingLines(pcb_polyarea_t * brush, pcb_layer_t * layer, pcb_line_t * line, int side, pcb_polyarea_t ** expandp) +static int MakeBypassingLines(rnd_polyarea_t * brush, pcb_layer_t * layer, pcb_line_t * line, int side, rnd_polyarea_t ** expandp) { pcb_vector_t pA, pB, flatA, flatB, qA, qB; pcb_vector_t lA, lB; @@ -329,10 +329,10 @@ } struct info { - rnd_box_t box; - pcb_polyarea_t *brush; + rnd_rnd_box_t box; + rnd_polyarea_t *brush; pcb_layer_t *layer; - pcb_polyarea_t *smallest; /* after cutting brush with line, the smallest chunk, which we will go around on 'side'. */ + rnd_polyarea_t *smallest; /* after cutting brush with line, the smallest chunk, which we will go around on 'side'. */ pcb_line_t *line; int side; double centroid; /* smallest difference between slices of brush after cutting with line, trying to find the line closest to the centroid to process first */ @@ -339,11 +339,11 @@ }; /* Process lines that intersect our 'brush'. */ -static pcb_r_dir_t jostle_callback(const rnd_box_t * targ, void *private) +static pcb_r_dir_t jostle_callback(const rnd_rnd_box_t * targ, void *private) { pcb_line_t *line = (pcb_line_t *) targ; struct info *info = private; - pcb_polyarea_t *lp, *copy, *tmp, *n, *smallest = NULL; + rnd_polyarea_t *lp, *copy, *tmp, *n, *smallest = NULL; pcb_vector_t p; int inside = 0, side, r; double small, big; @@ -471,7 +471,7 @@ static fgw_error_t pcb_act_jostle(fgw_arg_t *res, int argc, fgw_arg_t *argv) { rnd_coord_t x, y; - pcb_polyarea_t *expand; + rnd_polyarea_t *expand; float value = conf_core.design.via_thickness + (conf_core.design.bloat + 1) * 2 + 50; struct info info; int found; Index: trunk/src_plugins/lib_gtk_common/bu_menu.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30969) +++ trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30970) @@ -462,7 +462,7 @@ } -GtkWidget *ghid_load_menus(pcb_gtk_menu_ctx_t *menu, rnd_hidlib_t *hidlib, pcb_hid_cfg_t **cfg_out) +GtkWidget *ghid_load_menus(pcb_gtk_menu_ctx_t *menu, rnd_hidlib_t *hidlib, rnd_hid_cfg_t **cfg_out) { const lht_node_t *mr; GtkWidget *menu_bar = NULL; Index: trunk/src_plugins/lib_gtk_common/bu_menu.h =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.h (revision 30969) +++ trunk/src_plugins/lib_gtk_common/bu_menu.h (revision 30970) @@ -37,7 +37,7 @@ void menu_toggle_update_cb(rnd_hidlib_t *hidlib, GtkAction *act, const char *tflag, const char *aflag); -GtkWidget *ghid_load_menus(pcb_gtk_menu_ctx_t *menu, rnd_hidlib_t *hidlib, pcb_hid_cfg_t **cfg_out); +GtkWidget *ghid_load_menus(pcb_gtk_menu_ctx_t *menu, rnd_hidlib_t *hidlib, rnd_hid_cfg_t **cfg_out); GtkWidget *pcb_gtk_menu_widget(lht_node_t *node); Index: trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 30969) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 30970) @@ -72,7 +72,7 @@ return pcb_false; } -void ghid_preview_zoomto(pcb_hid_attribute_t *attrib, void *hid_ctx, const rnd_box_t *view) +void ghid_preview_zoomto(pcb_hid_attribute_t *attrib, void *hid_ctx, const rnd_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 30969) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30970) @@ -306,7 +306,7 @@ void pcb_gtk_previews_invalidate_lr(rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { - rnd_box_t screen; + rnd_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 30969) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30970) @@ -339,7 +339,7 @@ ghid_update_toggle_flags(gctx->hidlib, &gctx->topwin, cookie); } -pcb_hid_cfg_t *ghid_get_menu_cfg(pcb_hid_t *hid) +rnd_hid_cfg_t *ghid_get_menu_cfg(pcb_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; if (!gctx->hid_active) @@ -474,7 +474,7 @@ gctx->port.view.panning = mode; } -static void ghid_view_get(pcb_hid_t *hid, rnd_box_t *viewbox) +static void ghid_view_get(pcb_hid_t *hid, rnd_rnd_box_t *viewbox) { pcb_gtk_t *gctx = hid->hid_data; viewbox->X1 = gctx->port.view.x0; Index: trunk/src_plugins/lib_gtk_common/pcb_gtk.h =================================================================== --- trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30969) +++ trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30970) @@ -108,7 +108,7 @@ struct pcb_gtk_topwin_s { /* util/builder states */ pcb_gtk_menu_ctx_t menu; - pcb_hid_cfg_t *ghid_cfg; + rnd_hid_cfg_t *ghid_cfg; pcb_gtk_command_t cmd; /* own widgets */ Index: trunk/src_plugins/lib_gtk_common/wt_preview.c =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 30969) +++ trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 30970) @@ -70,7 +70,7 @@ perview_update_offs(preview); } -void pcb_gtk_preview_zoomto(pcb_gtk_preview_t *preview, const rnd_box_t *data_view) +void pcb_gtk_preview_zoomto(pcb_gtk_preview_t *preview, const rnd_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_box_t view; + rnd_rnd_box_t view; - memcpy(&view, preview->obj, sizeof(rnd_box_t)); /* assumes the object's first field is rnd_box_t */ + memcpy(&view, preview->obj, sizeof(rnd_rnd_box_t)); /* assumes the object's first field is rnd_rnd_box_t */ pcb_gtk_preview_zoomto(preview, &view); } @@ -295,7 +295,7 @@ preview->view.canvas_height = ev->height; if (need_rezoom) { - rnd_box_t b; + rnd_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_box_t *screen) +void pcb_gtk_preview_invalidate(pcb_gtk_t *ctx, const rnd_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_box_t pb; + rnd_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 30969) +++ trunk/src_plugins/lib_gtk_common/wt_preview.h (revision 30970) @@ -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, pcb_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_box_t *data_view); +void pcb_gtk_preview_zoomto(pcb_gtk_preview_t *preview, const rnd_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_box_t *screen); +void pcb_gtk_preview_invalidate(pcb_gtk_t *ctx, const rnd_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 30969) +++ trunk/src_plugins/lib_hid_common/act_dad.c (revision 30970) @@ -506,7 +506,7 @@ txt = NULL; rnd_PCB_ACT_MAY_CONVARG(4, FGW_STR, dad, txt = argv[4].val.str); if (txt != NULL) { - const pcb_unit_t *u = get_unit_struct(txt); + const rnd_unit_t *u = get_unit_struct(txt); if (u == NULL) { rnd_message(RND_MSG_ERROR, "Invalid unit %s (get ignored)\n", txt); return FGW_ERR_NOT_FOUND; Index: trunk/src_plugins/lib_hid_common/grid_menu.c =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30969) +++ trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30970) @@ -39,7 +39,7 @@ static rnd_conf_resolve_t grids_idx = {"editor.grids_idx", RND_CFN_INTEGER, 0, NULL}; -static void grid_install_menu(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) +static void grid_install_menu(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *node, char *path) { rnd_conf_native_t *nat; rnd_conflist_t *lst; Index: trunk/src_plugins/lib_hid_common/menu_helper.c =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30969) +++ trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30970) @@ -180,7 +180,7 @@ return lht_tree_path_(parent->doc, parent, path, 1, 0, NULL); } -static int hid_cfg_remove_item(pcb_hid_cfg_t *hr, lht_node_t *item, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx) +static int hid_cfg_remove_item(rnd_hid_cfg_t *hr, lht_node_t *item, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx) { if (gui_remove(ctx, item) != 0) return -1; @@ -188,7 +188,7 @@ return 0; } -int pcb_hid_cfg_remove_menu_node(pcb_hid_cfg_t *hr, lht_node_t *root, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx) +int pcb_hid_cfg_remove_menu_node(rnd_hid_cfg_t *hr, lht_node_t *root, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx) { if ((root == NULL) || (hr == NULL)) return -1; @@ -216,7 +216,7 @@ return hid_cfg_remove_item(hr, root, gui_remove, ctx); } -int pcb_hid_cfg_remove_menu_cookie(pcb_hid_cfg_t *hr, const char *cookie, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx, int level, lht_node_t *curr) +int pcb_hid_cfg_remove_menu_cookie(rnd_hid_cfg_t *hr, const char *cookie, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx, int level, lht_node_t *curr) { lht_err_t err; lht_dom_iterator_t it; @@ -240,7 +240,7 @@ return 0; } -int pcb_hid_cfg_remove_menu(pcb_hid_cfg_t *hr, const char *path, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx) +int pcb_hid_cfg_remove_menu(rnd_hid_cfg_t *hr, const char *path, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx) { if (hr != NULL) { lht_node_t *nd = pcb_hid_cfg_get_menu_at(hr, NULL, path, NULL, NULL); @@ -254,7 +254,7 @@ } typedef struct { - pcb_hid_cfg_t *hr; + rnd_hid_cfg_t *hr; pcb_create_menu_widget_t cb; void *cb_ctx; lht_node_t *parent; @@ -334,7 +334,7 @@ return node; } -int pcb_hid_cfg_create_menu(pcb_hid_cfg_t *hr, const char *path, const pcb_menu_prop_t *props, pcb_create_menu_widget_t cb, void *cb_ctx) +int pcb_hid_cfg_create_menu(rnd_hid_cfg_t *hr, const char *path, const pcb_menu_prop_t *props, pcb_create_menu_widget_t cb, void *cb_ctx) { const char *name; create_menu_ctx_t cmc; Index: trunk/src_plugins/lib_hid_common/menu_helper.h =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.h (revision 30969) +++ trunk/src_plugins/lib_hid_common/menu_helper.h (revision 30970) @@ -35,7 +35,7 @@ NOTE: unlike other cookies, this cookie is strdup()'d. */ typedef int (*pcb_create_menu_widget_t)(void *ctx, const char *path, const char *name, int is_main, lht_node_t *parent, lht_node_t *ins_after, lht_node_t *menu_item); -int pcb_hid_cfg_create_menu(pcb_hid_cfg_t *hr, const char *path, const pcb_menu_prop_t *props, pcb_create_menu_widget_t cb, void *cb_ctx); +int pcb_hid_cfg_create_menu(rnd_hid_cfg_t *hr, const char *path, const pcb_menu_prop_t *props, pcb_create_menu_widget_t cb, void *cb_ctx); /* Looks up an integer (usually boolean) value by conf path or by running an action (if name has a parenthesis). When an action is run, it has 0 @@ -77,7 +77,7 @@ /* Remove a path recursively; call gui_remove() on leaf paths until the subtree is consumed (should return 0 on success) */ -int pcb_hid_cfg_remove_menu(pcb_hid_cfg_t *hr, const char *path, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx); -int pcb_hid_cfg_remove_menu_node(pcb_hid_cfg_t *hr, lht_node_t *root, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx); +int pcb_hid_cfg_remove_menu(rnd_hid_cfg_t *hr, const char *path, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx); +int pcb_hid_cfg_remove_menu_node(rnd_hid_cfg_t *hr, lht_node_t *root, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx); #endif Index: trunk/src_plugins/lib_hid_common/toolbar.c =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.c (revision 30969) +++ trunk/src_plugins/lib_hid_common/toolbar.c (revision 30970) @@ -100,7 +100,7 @@ vti0_set(&toolbar.tid2wid, tid, wid); } -static void toolbar_create_static(pcb_hid_cfg_t *cfg) +static void toolbar_create_static(rnd_hid_cfg_t *cfg) { const lht_node_t *t, *ts = pcb_hid_cfg_get_menu(cfg, "/toolbar_static"); @@ -147,7 +147,7 @@ } } -static void toolbar_docked_create(pcb_hid_cfg_t *cfg) +static void toolbar_docked_create(rnd_hid_cfg_t *cfg) { toolbar.tid2wid.used = 0; @@ -169,7 +169,7 @@ static void toolbar_create(void) { - pcb_hid_cfg_t *cfg = pcb_gui->get_menu_cfg(pcb_gui); + rnd_hid_cfg_t *cfg = pcb_gui->get_menu_cfg(pcb_gui); if (cfg == NULL) return; toolbar_docked_create(cfg); Index: trunk/src_plugins/lib_hid_gl/hidgl.c =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.c (revision 30969) +++ trunk/src_plugins/lib_hid_gl/hidgl.c (revision 30970) @@ -57,7 +57,7 @@ static int grid_point_capacity = 0; -static inline void mode_reset(rnd_bool direct, const rnd_box_t *screen) +static inline void mode_reset(rnd_bool direct, const rnd_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_box_t *screen) +static inline void mode_positive(rnd_bool direct, const rnd_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_box_t *screen) +static inline void mode_positive_xor(rnd_bool direct, const rnd_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_box_t *screen) +static inline void mode_negative(rnd_bool direct, const rnd_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_box_t *screen) +static inline void mode_flush(rnd_bool direct, rnd_bool xor_mode, const rnd_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(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { rnd_bool xor_mode = (composite_op == PCB_HID_COMP_POSITIVE_XOR ? pcb_true : pcb_false); @@ -225,7 +225,7 @@ } -void hidgl_draw_grid(rnd_hidlib_t *hidlib, rnd_box_t *drawn_area) +void hidgl_draw_grid(rnd_hidlib_t *hidlib, rnd_rnd_box_t *drawn_area) { rnd_coord_t x1, y1, x2, y2, n, i; double x, y; @@ -281,7 +281,7 @@ #define MIN_TRIANGLES_PER_CAP 3 #define MAX_TRIANGLES_PER_CAP 90 -static void draw_cap(rnd_coord_t width, rnd_coord_t x, rnd_coord_t y, pcb_angle_t angle, double scale) +static void draw_cap(rnd_coord_t width, rnd_coord_t x, rnd_coord_t y, rnd_angle_t angle, double scale) { float last_capx, last_capy; float capx, capy; @@ -380,7 +380,7 @@ #define MIN_SLICES_PER_ARC 6 #define MAX_SLICES_PER_ARC 360 -void hidgl_draw_arc(rnd_coord_t width, rnd_coord_t x, rnd_coord_t y, rnd_coord_t rx, rnd_coord_t ry, pcb_angle_t start_angle, pcb_angle_t delta_angle, double scale) +void hidgl_draw_arc(rnd_coord_t width, rnd_coord_t x, rnd_coord_t y, rnd_coord_t rx, rnd_coord_t ry, rnd_angle_t start_angle, rnd_angle_t delta_angle, double scale) { float last_inner_x, last_inner_y; float last_outer_x, last_outer_y; Index: trunk/src_plugins/lib_hid_gl/hidgl.h =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.h (revision 30969) +++ trunk/src_plugins/lib_hid_gl/hidgl.h (revision 30970) @@ -30,19 +30,19 @@ /*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_box_t *drawn_area); +void hidgl_draw_grid(rnd_hidlib_t *hidlib, rnd_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, pcb_angle_t start_angle, pcb_angle_t delta_angle, 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); void hidgl_draw_rect(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); void hidgl_draw_texture_rect( rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned long texture_id ); 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(pcb_polyarea_t *poly, const rnd_box_t *clip_box, double scale, int fullpoly); +void hidgl_fill_pcb_polygon(rnd_polyarea_t *poly, const rnd_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(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen); +void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen); pcb_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 30969) +++ trunk/src_plugins/lib_hid_pcbui/act.c (revision 30970) @@ -60,7 +60,7 @@ RND_PCB_ACT_CONVARG(1, FGW_STR, Zoom, vp = argv[1].val.str); if (rnd_strcasecmp(vp, "selected") == 0) { - rnd_box_t sb; + rnd_rnd_box_t sb; if (pcb_get_selection_bbox(&sb, PCB->Data) > 0) pcb_gui->zoom_win(pcb_gui, sb.X1, sb.Y1, sb.X2, sb.Y2, 1); else @@ -69,7 +69,7 @@ } if (rnd_strcasecmp(vp, "found") == 0) { - rnd_box_t sb; + rnd_rnd_box_t sb; if (pcb_get_found_bbox(&sb, PCB->Data) > 0) pcb_gui->zoom_win(pcb_gui, sb.X1, sb.Y1, sb.X2, sb.Y2, 1); else @@ -89,7 +89,7 @@ pcb_layergrp_id_t active_group = pcb_layer_get_group(PCB, pcb_layer_stack[0]); pcb_layergrp_id_t comp_group = -1, solder_group = -1; rnd_bool comp_on = pcb_false, solder_on = pcb_false; - rnd_box_t vb; + rnd_rnd_box_t vb; rnd_coord_t x, y; double xcent, ycent, xoffs, yoffs; Index: trunk/src_plugins/lib_hid_pcbui/layer_menu.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30969) +++ trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30970) @@ -48,7 +48,7 @@ int view; } ly_ctx_t; -static void layer_install_menu1(void *ctx_, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) +static void layer_install_menu1(void *ctx_, rnd_hid_cfg_t *cfg, lht_node_t *node, char *path) { ly_ctx_t *ctx = ctx_; int plen = strlen(path); @@ -181,7 +181,7 @@ } -static void layer_install_menu_key(void *ctx_, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) +static void layer_install_menu_key(void *ctx_, rnd_hid_cfg_t *cfg, lht_node_t *node, char *path) { ly_ctx_t *ctx = ctx_; int plen = strlen(path); Index: trunk/src_plugins/lib_hid_pcbui/routest.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30969) +++ trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30970) @@ -51,7 +51,7 @@ #include "routest_dlg.c" -static void rst_install_menu(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) +static void rst_install_menu(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *node, char *path) { pcb_menu_prop_t props; char *end = path + strlen(path); Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 30969) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 30970) @@ -52,7 +52,7 @@ int wrdunit, wrd1[3], wrd2[2]; gds_t buf; /* save on allocation */ int lock; - const pcb_unit_t *last_unit; + const rnd_unit_t *last_unit; } status_ctx_t; static status_ctx_t status; @@ -104,8 +104,8 @@ static void build_st_help(void) { - static const pcb_unit_t *unit_mm = NULL, *unit_mil; - const pcb_unit_t *unit_inv; + static const rnd_unit_t *unit_mm = NULL, *unit_mil; + const rnd_unit_t *unit_inv; if (unit_mm == NULL) { /* cache mm and mil units to save on the lookups */ unit_mm = get_unit_struct("mm"); Index: trunk/src_plugins/lib_hid_pcbui/util.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/util.c (revision 30969) +++ trunk/src_plugins/lib_hid_pcbui/util.c (revision 30970) @@ -30,7 +30,7 @@ #include "data_it.h" #include "flag.h" -static rnd_cardinal_t pcb_get_bbox_by_flag(rnd_box_t *dst, const pcb_data_t *data, pcb_flag_values_t flg) +static rnd_cardinal_t pcb_get_bbox_by_flag(rnd_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_box_t *dst, const pcb_data_t *data) +rnd_cardinal_t pcb_get_selection_bbox(rnd_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_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) { 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 30969) +++ trunk/src_plugins/lib_hid_pcbui/util.h (revision 30970) @@ -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_box_t *dst, const pcb_data_t *data); -rnd_cardinal_t pcb_get_found_bbox(rnd_box_t *dst, const pcb_data_t *data); +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); Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30969) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30970) @@ -128,7 +128,7 @@ { rnd_cardinal_t res = 0; pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; for(pa = pcb_poly_island_first(src, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { @@ -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_box_t *b = &e->bbox; + rnd_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); - pcb_r_insert_entry(dst->edge_tree, (rnd_box_t *)e); + pcb_r_insert_entry(dst->edge_tree, (rnd_rnd_box_t *)e); } static void add_track(pcb_cpoly_edgetree_t *dst, pcb_pline_t *track) @@ -200,7 +200,7 @@ pcb_cpoly_edgetree_t *pcb_cpoly_edgetree_create(const pcb_poly_t *src, rnd_coord_t offs) { pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; pcb_cpoly_edgetree_t *res; rnd_cardinal_t alloced = pcb_cpoly_num_corners(src) * sizeof(pcb_cpoly_edge_t); @@ -244,7 +244,7 @@ rnd_coord_t coord[1]; } intersect_t; -static pcb_r_dir_t pcb_cploy_hatch_edge_hor(const rnd_box_t *region, void *cl) +static pcb_r_dir_t pcb_cploy_hatch_edge_hor(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t pcb_cploy_hatch_edge_ver(const rnd_box_t *region, void *cl) +static pcb_r_dir_t pcb_cploy_hatch_edge_ver(const rnd_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_box_t scan; + rnd_rnd_box_t scan; int n; intersect_t *is; @@ -483,7 +483,7 @@ continue; if (want_contour) { pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; for(pa = pcb_poly_island_first(polygon, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { pcb_pline_t *pl = pcb_poly_contour(&it); if (pl != NULL) { /* we have a contour */ Index: trunk/src_plugins/lib_polyhelp/polyhelp.h =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 30969) +++ trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 30970) @@ -44,13 +44,13 @@ /*** Generate an rtree of all edges if a polygon */ typedef struct { - rnd_box_t bbox; + rnd_rnd_box_t bbox; rnd_coord_t x1, y1, x2, y2; } pcb_cpoly_edge_t; typedef struct { - pcb_rtree_t *edge_tree; - rnd_box_t bbox; + rnd_rtree_t *edge_tree; + rnd_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 30969) +++ trunk/src_plugins/lib_polyhelp/topoly.c (revision 30970) @@ -58,7 +58,7 @@ pcb_dynf_t mark; } next_conn_t; -static pcb_r_dir_t next_conn_found_arc(const rnd_box_t *box, void *cl) +static pcb_r_dir_t next_conn_found_arc(const rnd_rnd_box_t *box, void *cl) { rnd_coord_t ex, ey; next_conn_t *ctx = cl; @@ -82,7 +82,7 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t next_conn_found_line(const rnd_box_t *box, void *cl) +static pcb_r_dir_t next_conn_found_line(const rnd_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_box_t region; + rnd_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 30969) +++ trunk/src_plugins/loghid/hid-logger.c (revision 30970) @@ -85,7 +85,7 @@ delegatee_->destroy_gc(gc); } -static void log_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_box_t *screen) +static void log_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { if (screen != NULL) pcb_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(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_box_t *screen) +static void log_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_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); @@ -144,7 +144,7 @@ delegatee_->draw_line(gc, x1, y1, x2, y2); } -static void log_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void log_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) { pcb_fprintf(out_, "draw_arc(gc, %mm, %mm, rx=%mm, ry=%mm, start_angle=%.1f, delta_a=%.1f)\n", cx, cy, xradius, yradius, start_angle, delta_angle); Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 30969) +++ trunk/src_plugins/millpath/toolpath.c (revision 30970) @@ -85,7 +85,7 @@ RND_INLINE void sub_layer_poly(pcb_board_t *pcb, pcb_tlp_session_t *result, pcb_layer_t *layer, const pcb_poly_t *poly, int centerline) { - pcb_polyarea_t *f, *b, *ra; + rnd_polyarea_t *f, *b, *ra; if (!PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, poly)) { f = poly->Clipped->f; @@ -130,7 +130,7 @@ static void sub_layer_all(pcb_board_t *pcb, pcb_tlp_session_t *result, pcb_layer_t *layer, int centerline) { - pcb_rtree_it_t it; + rnd_rtree_it_t it; pcb_line_t *line; pcb_arc_t *arc; pcb_poly_t *poly; @@ -173,7 +173,7 @@ static void sub_global_all(pcb_board_t *pcb, pcb_tlp_session_t *result, pcb_layer_t *layer) { pcb_pstk_t *ps, ps_tmp; - pcb_rtree_it_t it; + rnd_rtree_it_t it; for(ps = (pcb_pstk_t *)pcb_r_first(pcb->Data->padstack_tree, &it); ps != NULL; ps = (pcb_pstk_t *)pcb_r_next(&it)) { memcpy(&ps_tmp, ps, sizeof(ps_tmp)); @@ -237,8 +237,8 @@ if (has_otl) { /* if there's an outline layer, the remove-poly shouldn't be bigger than that */ pcb_line_t *line; pcb_arc_t *arc; - pcb_rtree_it_t it; - rnd_box_t otlbb; + rnd_rtree_it_t it; + rnd_rnd_box_t otlbb; pcb_layer_id_t lid; otlbb.X1 = otlbb.Y1 = PCB_MAX_COORD; @@ -254,11 +254,11 @@ continue; for(line = (pcb_line_t *)pcb_r_first(l->line_tree, &it); line != NULL; line = (pcb_line_t *)pcb_r_next(&it)) - rnd_box_bump_box(&otlbb, (rnd_box_t *)line); + rnd_box_bump_box(&otlbb, (rnd_rnd_box_t *)line); pcb_r_end(&it); for(arc = (pcb_arc_t *)pcb_r_first(l->arc_tree, &it); arc != NULL; arc = (pcb_arc_t *)pcb_r_next(&it)) - rnd_box_bump_box(&otlbb, (rnd_box_t *)arc); + rnd_box_bump_box(&otlbb, (rnd_rnd_box_t *)arc); pcb_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)); @@ -290,7 +290,7 @@ /* remove fill from remain */ { - pcb_polyarea_t *rp; + rnd_polyarea_t *rp; pcb_polyarea_boolean(result->remain->Clipped, result->fill->Clipped, &rp, PCB_PBO_SUB); pcb_polyarea_free(&result->remain->Clipped); result->remain->Clipped = rp; @@ -308,7 +308,7 @@ static rnd_cardinal_t trace_contour(pcb_board_t *pcb, pcb_tlp_session_t *result, int tool_idx, rnd_coord_t extra_offs) { pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; rnd_coord_t tool_dia = result->tools->dia[tool_idx]; rnd_cardinal_t cnt = 0; @@ -347,11 +347,11 @@ pcb_any_obj_t *cut; } pline_ctx_t; -pcb_rtree_dir_t fix_overcuts_in_seg(void *ctx_, void *obj, const pcb_rtree_box_t *box) +rnd_rtree_dir_t fix_overcuts_in_seg(void *ctx_, void *obj, const rnd_rtree_box_t *box) { pline_ctx_t *ctx = ctx_; pcb_line_t *l = (pcb_line_t *)ctx->cut, lo, vl; - rnd_box_t ip; + rnd_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 */ @@ -377,7 +377,7 @@ pcb_line_new(ly, l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y, 1, 0, pcb_no_flags()); pcb_line_new(ly, lo.Point1.X, lo.Point1.Y, lo.Point2.X, lo.Point2.Y, 1, 0, pcb_no_flags()); */ - return pcb_RTREE_DIR_FOUND | pcb_RTREE_DIR_STOP; + return rnd_RTREE_DIR_FOUND | rnd_RTREE_DIR_STOP; } lo.Point1.X = l->Point1.X - ox + vx*500; lo.Point1.Y = l->Point1.Y - oy + vy*500; @@ -388,18 +388,18 @@ pcb_line_new(ly, l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y, 1, 0, pcb_no_flags()); pcb_line_new(ly, lo.Point1.X, lo.Point1.Y, lo.Point2.X, lo.Point2.Y, 1, 0, pcb_no_flags()); */ - return pcb_RTREE_DIR_FOUND | pcb_RTREE_DIR_STOP; + return rnd_RTREE_DIR_FOUND | rnd_RTREE_DIR_STOP; } return 0; } -pcb_rtree_dir_t fix_overcuts_in_pline(void *ctx_, void *obj, const pcb_rtree_box_t *box) +rnd_rtree_dir_t fix_overcuts_in_pline(void *ctx_, void *obj, const rnd_rtree_box_t *box) { pline_ctx_t *ctx = ctx_; pcb_pline_t *pl = obj; - return pcb_rtree_search_obj(pl->tree, (const pcb_rtree_box_t *)&ctx->cut->BoundingBox, fix_overcuts_in_seg, ctx); + return rnd_rtree_search_obj(pl->tree, (const rnd_rtree_box_t *)&ctx->cut->BoundingBox, fix_overcuts_in_seg, ctx); } static long fix_overcuts(pcb_board_t *pcb, pcb_tlp_session_t *result) @@ -412,24 +412,24 @@ pctx.result = result; linelist_foreach(&result->res_path->Line, &it, line) { - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; pa = result->remain->Clipped; do { - pcb_rtree_dir_t dir; + rnd_rtree_dir_t dir; pctx.cut = (pcb_any_obj_t *)line; if (pa == NULL) continue; - dir = pcb_rtree_search_obj(pa->contour_tree, (const pcb_rtree_box_t *)&line->BoundingBox, fix_overcuts_in_pline, &pctx); - if (dir & pcb_RTREE_DIR_FOUND) { /* line crosses poly */ + dir = rnd_rtree_search_obj(pa->contour_tree, (const rnd_rtree_box_t *)&line->BoundingBox, fix_overcuts_in_pline, &pctx); + if (dir & rnd_RTREE_DIR_FOUND) { /* line crosses poly */ error++; pcb_line_free(line); line = NULL; } else { /* check endpoints only if side didn't intersect */ - pcb_polyarea_t *c; + rnd_polyarea_t *c; rnd_coord_t r = (line->Thickness-1)/2 - 1000; int within = 0; Index: trunk/src_plugins/order/order.c =================================================================== --- trunk/src_plugins/order/order.c (revision 30969) +++ trunk/src_plugins/order/order.c (revision 30970) @@ -81,7 +81,7 @@ {"OrderPCB", pcb_act_OrderPCB, pcb_acth_OrderPCB, pcb_acts_OrderPCB} }; -static void order_install_menu(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) +static void order_install_menu(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *node, char *path) { char *end = path + strlen(path); pcb_menu_prop_t props; @@ -169,7 +169,7 @@ void pcb_order_autoload_field(order_ctx_t *octx, pcb_order_field_t *f) { - rnd_box_t bb; + rnd_rnd_box_t bb; long l; pcb_layergrp_id_t gid; Index: trunk/src_plugins/polycombine/polycombine.c =================================================================== --- trunk/src_plugins/polycombine/polycombine.c (revision 30969) +++ trunk/src_plugins/polycombine/polycombine.c (revision 30970) @@ -31,10 +31,10 @@ #include #include "obj_poly.h" -static pcb_polyarea_t *original_poly(pcb_poly_t *p, rnd_bool *forward) +static rnd_polyarea_t *original_poly(pcb_poly_t *p, rnd_bool *forward) { pcb_pline_t *contour = NULL; - pcb_polyarea_t *np = NULL; + rnd_polyarea_t *np = NULL; rnd_cardinal_t n; pcb_vector_t v; int hole = 0; @@ -87,7 +87,7 @@ struct poly_tree { pcb_poly_t *polygon; rnd_bool forward; - pcb_polyarea_t *polyarea; + rnd_polyarea_t *polyarea; poly_tree *parent; poly_tree *child; poly_tree *prev; @@ -118,7 +118,7 @@ * contours can be assumed not to overlap, we can drill down in this * order: P1, P2, P3, P4, P5, P6. */ -static rnd_bool PolygonContainsPolygon(pcb_polyarea_t *outer, pcb_polyarea_t *inner) +static rnd_bool PolygonContainsPolygon(rnd_polyarea_t *outer, rnd_polyarea_t *inner) { /* int contours_isect;*/ /* Should check outer contours don't intersect? */ @@ -240,9 +240,9 @@ return to_insert; } -static pcb_polyarea_t *compute_polygon_recursive(poly_tree * root, pcb_polyarea_t * accumulate) +static rnd_polyarea_t *compute_polygon_recursive(poly_tree * root, rnd_polyarea_t * accumulate) { - pcb_polyarea_t *res; + rnd_polyarea_t *res; poly_tree *cur_node; for (cur_node = root; cur_node != NULL; cur_node = cur_node->next) { /* Process this element */ @@ -262,11 +262,11 @@ /* DOC: polycombine.html */ static fgw_error_t pcb_act_polycombine(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_polyarea_t *rs; + rnd_polyarea_t *rs; rnd_bool forward; - pcb_polyarea_t *np; + rnd_polyarea_t *np; /* bool outer; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; pcb_pline_t *pline; pcb_vnode_t *node; pcb_poly_t *Polygon;*/ Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 30969) +++ trunk/src_plugins/propedit/propdlg.c (revision 30970) @@ -584,7 +584,7 @@ const char *hdr[] = {"property", "common", "min", "max", "avg", NULL}; const char *hdr_val[] = {"use", "values"}; pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; - static rnd_box_t prvbb = {0, 0, PCB_MM_TO_COORD(10), PCB_MM_TO_COORD(10)}; + static rnd_rnd_box_t prvbb = {0, 0, PCB_MM_TO_COORD(10), PCB_MM_TO_COORD(10)}; int n; pcb_hid_attr_val_t hv; Index: trunk/src_plugins/propedit/props.h =================================================================== --- trunk/src_plugins/propedit/props.h (revision 30969) +++ trunk/src_plugins/propedit/props.h (revision 30970) @@ -56,7 +56,7 @@ typedef union { const char *string; rnd_coord_t coord; - pcb_angle_t angle; + rnd_angle_t angle; int i; rnd_color_t clr; } pcb_propval_t; Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 30969) +++ trunk/src_plugins/propedit/propsel.c (revision 30970) @@ -51,7 +51,7 @@ /*********** map ***********/ #define type2field_String string #define type2field_rnd_coord_t coord -#define type2field_pcb_angle_t angle +#define type2field_rnd_angle_t angle #define type2field_int i #define type2field_bool i #define type2field_color clr @@ -58,7 +58,7 @@ #define type2TYPE_String PCB_PROPT_STRING #define type2TYPE_rnd_coord_t PCB_PROPT_COORD -#define type2TYPE_pcb_angle_t PCB_PROPT_ANGLE +#define type2TYPE_rnd_angle_t PCB_PROPT_ANGLE #define type2TYPE_int PCB_PROPT_INT #define type2TYPE_bool PCB_PROPT_BOOL #define type2TYPE_color PCB_PROPT_COLOR @@ -190,8 +190,8 @@ map_add_prop(ctx, "p/trace/clearance", rnd_coord_t, arc->Clearance/2); map_add_prop(ctx, "p/arc/width", rnd_coord_t, arc->Width); map_add_prop(ctx, "p/arc/height", rnd_coord_t, arc->Height); - map_add_prop(ctx, "p/arc/angle/start", pcb_angle_t, arc->StartAngle); - map_add_prop(ctx, "p/arc/angle/delta", pcb_angle_t, arc->Delta); + map_add_prop(ctx, "p/arc/angle/start", rnd_angle_t, arc->StartAngle); + map_add_prop(ctx, "p/arc/angle/delta", rnd_angle_t, arc->Delta); map_common(ctx, (pcb_any_obj_t *)arc); map_attr(ctx, &arc->Attributes); if (ctx->geo) { @@ -204,7 +204,7 @@ { map_add_prop(ctx, "p/gfx/sx", rnd_coord_t, gfx->sx); map_add_prop(ctx, "p/gfx/sy", rnd_coord_t, gfx->sy); - map_add_prop(ctx, "p/gfx/rot", pcb_angle_t, gfx->rot); + map_add_prop(ctx, "p/gfx/rot", rnd_angle_t, gfx->rot); map_common(ctx, (pcb_any_obj_t *)gfx); map_attr(ctx, &gfx->Attributes); if (ctx->geo) { @@ -217,7 +217,7 @@ { map_add_prop(ctx, "p/text/scale", int, text->Scale); map_add_prop(ctx, "p/text/fid", int, text->fid); - map_add_prop(ctx, "p/text/rotation", pcb_angle_t, text->rot); + map_add_prop(ctx, "p/text/rotation", rnd_angle_t, text->rot); map_add_prop(ctx, "p/text/thickness", rnd_coord_t, text->thickness); map_add_prop(ctx, "p/text/string", String, text->TextString); map_common(ctx, (pcb_any_obj_t *)text); @@ -241,7 +241,7 @@ map_add_prop(ctx, "p/padstack/xmirror", rnd_coord_t, ps->xmirror); map_add_prop(ctx, "p/padstack/smirror", rnd_coord_t, ps->smirror); - map_add_prop(ctx, "p/padstack/rotation", pcb_angle_t, ps->rot); + map_add_prop(ctx, "p/padstack/rotation", rnd_angle_t, ps->rot); map_add_prop(ctx, "p/padstack/proto", rnd_coord_t, ps->proto); proto = pcb_pstk_get_proto(ps); Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 30969) +++ trunk/src_plugins/puller/puller.c (revision 30970) @@ -248,7 +248,7 @@ /* */ /*****************************************************************************/ -static pcb_r_dir_t line_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t line_callback(const rnd_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 PCB_R_DIR_FOUND_CONTINUE; } -static pcb_r_dir_t arc_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t arc_callback(const rnd_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_box_t spot; + rnd_rnd_box_t spot; #if TRACE1 pcb_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 pcb_r_dir_t find_pair_line_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t find_pair_line_callback(const rnd_rnd_box_t * b, void *cl) { pcb_line_t *line = (pcb_line_t *) b; #if TRACE1 @@ -644,7 +644,7 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t find_pair_arc_callback(const rnd_box_t * b, void *cl) +static pcb_r_dir_t find_pair_arc_callback(const rnd_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_box_t b; + rnd_rnd_box_t b; if (*e) return; @@ -726,7 +726,7 @@ return 0; } -static pcb_r_dir_t find_pair_pstkline_callback(const rnd_box_t *b, void *cl) +static pcb_r_dir_t find_pair_pstkline_callback(const rnd_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 PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t find_pair_pstkarc_callback(const rnd_box_t *b, void *cl) +static pcb_r_dir_t find_pair_pstkarc_callback(const rnd_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_box_t box; + rnd_rnd_box_t box; box = padstack->BoundingBox; pcb_r_search(PCB_CURRLAYER(PCB)->line_tree, &box, NULL, find_pair_pstkline_callback, padstack, NULL); pcb_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_box_t *b, int x, int y, int t) +static void expand_box(rnd_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 pcb_r_dir_t gp_line_cb(const rnd_box_t * b, void *cb) +static pcb_r_dir_t gp_line_cb(const rnd_rnd_box_t * b, void *cb) { const pcb_line_t *l = (pcb_line_t *) b; Extra *e = LINE2EXTRA(l); @@ -1353,7 +1353,7 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t gp_arc_cb(const rnd_box_t * b, void *cb) +static pcb_r_dir_t gp_arc_cb(const rnd_rnd_box_t * b, void *cb) { const pcb_arc_t *a = (pcb_arc_t *) b; Extra *e = ARC2EXTRA(a); @@ -1375,7 +1375,7 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t gp_text_cb(const rnd_box_t * b, void *cb) +static pcb_r_dir_t gp_text_cb(const rnd_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 PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t gp_poly_cb(const rnd_box_t * b, void *cb) +static pcb_r_dir_t gp_poly_cb(const rnd_rnd_box_t * b, void *cb) { int i; const pcb_poly_t *p = (pcb_poly_t *) b; @@ -1395,7 +1395,7 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t gp_pstk_cb(const rnd_box_t *b, void *cb) +static pcb_r_dir_t gp_pstk_cb(const rnd_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_box_t box; + rnd_rnd_box_t box; /* Line half-thicknesses, including line space */ int ex, ey; pcb_line_t *new_line; Index: trunk/src_plugins/query/fnc_geo.c =================================================================== --- trunk/src_plugins/query/fnc_geo.c (revision 30969) +++ trunk/src_plugins/query/fnc_geo.c (revision 30970) @@ -35,7 +35,7 @@ pcb_poly_t *poly; long cnt = 0; pcb_poly_it_t it; - pcb_polyarea_t *pa; + rnd_polyarea_t *pa; if ((argc != 1) || (argv[0].type != PCBQ_VT_OBJ)) return -1; Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 30969) +++ trunk/src_plugins/query/query_access.c (revision 30970) @@ -302,7 +302,7 @@ } \ \ if ((fh1 == query_fields_bbox) || (fh1 == query_fields_bbox_naked)) { \ - rnd_box_t *bx = (fh1 == query_fields_bbox) ? &(obj)->BoundingBox : &(obj)->bbox_naked; \ + rnd_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/query/query_y.c =================================================================== --- trunk/src_plugins/query/query_y.c (revision 30969) +++ trunk/src_plugins/query/query_y.c (revision 30970) @@ -261,7 +261,7 @@ char *s; rnd_coord_t c; double d; - const pcb_unit_t *u; + const rnd_unit_t *u; pcb_qry_node_t *n; #line 268 "query_y.c" /* yacc.c:352 */ Index: trunk/src_plugins/query/query_y.h =================================================================== --- trunk/src_plugins/query/query_y.h (revision 30969) +++ trunk/src_plugins/query/query_y.h (revision 30970) @@ -84,7 +84,7 @@ char *s; rnd_coord_t c; double d; - const pcb_unit_t *u; + const rnd_unit_t *u; pcb_qry_node_t *n; #line 91 "query_y.h" /* yacc.c:1921 */ Index: trunk/src_plugins/query/query_y.y =================================================================== --- trunk/src_plugins/query/query_y.y (revision 30969) +++ trunk/src_plugins/query/query_y.y (revision 30970) @@ -120,7 +120,7 @@ char *s; rnd_coord_t c; double d; - const pcb_unit_t *u; + const rnd_unit_t *u; pcb_qry_node_t *n; } Index: trunk/src_plugins/report/drill.c =================================================================== --- trunk/src_plugins/report/drill.c (revision 30969) +++ trunk/src_plugins/report/drill.c (revision 30970) @@ -75,8 +75,8 @@ pcb_drill_info_t *AllDrills; pcb_drill_t *Drill = NULL; rnd_bool DrillFound = pcb_false; - pcb_rtree_it_t it; - rnd_box_t *pb; + rnd_rtree_it_t it; + rnd_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 30969) +++ trunk/src_plugins/report/report.c (revision 30970) @@ -231,7 +231,7 @@ static void report_arc(gds_t *dst, pcb_arc_t *arc) { - rnd_box_t box; + rnd_rnd_box_t box; #ifndef NDEBUG if (pcb_gui->shift_is_pressed(pcb_gui)) pcb_r_dump_tree(arc->parent.layer->arc_tree, 0); @@ -349,7 +349,7 @@ gfx->cx, gfx->cy, gfx->sx, gfx->sx, gfx->rot); } -static void report_point(gds_t *dst, int type, pcb_layer_t *layer, pcb_point_t *point) +static void report_point(gds_t *dst, int type, pcb_layer_t *layer, rnd_point_t *point) { pcb_append_printf(dst, "%m+POINT ID# %ld.\n" "Located at (X,Y) = %$mD.\n" @@ -663,21 +663,21 @@ #undef MINDIST2 rnd_message(RND_MSG_INFO, "The two arms of the net are:\n"); - pcb_r_delete_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); ox = l->Point1.X; oy = l->Point1.Y; l->Point1.X = x; l->Point1.Y = y; - pcb_r_insert_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); report_net_length_(res, argc, argv, x, y); - pcb_r_delete_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); l->Point1.X = ox; l->Point1.Y = oy; - pcb_r_insert_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); - pcb_r_delete_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); ox = l->Point2.X; oy = l->Point2.Y; l->Point2.X = x; l->Point2.Y = y; - pcb_r_insert_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); report_net_length_(res, argc, argv, x, y); - pcb_r_delete_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_delete_entry(ly->line_tree, (rnd_rnd_box_t *)l); l->Point2.X = ox; l->Point2.Y = oy; - pcb_r_insert_entry(ly->line_tree, (rnd_box_t *)l); + pcb_r_insert_entry(ly->line_tree, (rnd_rnd_box_t *)l); PCB_FLAG_SET(PCB_FLAG_SELECTED, l); Index: trunk/src_plugins/rubberband_orig/fgeometry.c =================================================================== --- trunk/src_plugins/rubberband_orig/fgeometry.c (revision 30969) +++ trunk/src_plugins/rubberband_orig/fgeometry.c (revision 30970) @@ -88,7 +88,7 @@ } -pcb_fline_t pcb_fline_create_from_points(struct pcb_point_s *base_point, struct pcb_point_s *other_point) +pcb_fline_t pcb_fline_create_from_points(struct rnd_point_s *base_point, struct rnd_point_s *other_point) { pcb_fline_t ret; Index: trunk/src_plugins/rubberband_orig/fgeometry.h =================================================================== --- trunk/src_plugins/rubberband_orig/fgeometry.h (revision 30969) +++ trunk/src_plugins/rubberband_orig/fgeometry.h (revision 30970) @@ -28,7 +28,7 @@ pcb_fline_t pcb_fline_create(pcb_any_line_t *line); -pcb_fline_t pcb_fline_create_from_points(struct pcb_point_s *base_point, struct pcb_point_s *other_point); +pcb_fline_t pcb_fline_create_from_points(struct rnd_point_s *base_point, struct rnd_point_s *other_point); int pcb_fline_is_valid(pcb_fline_t l); Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 30969) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 30970) @@ -118,7 +118,7 @@ rnd_coord_t radius; rnd_coord_t X, Y; pcb_line_t *line; - rnd_box_t box; + rnd_rnd_box_t box; pcb_layer_t *layer; rubber_ctx_t *rbnd; int delta_index; @@ -127,21 +127,21 @@ static pcb_rb_line_t *pcb_rubber_band_create(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, int point_number, int delta_index); static pcb_rb_arc_t *pcb_rubber_band_create_arc(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Line, int end, int delta_index); -static void CheckLinePointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, pcb_point_t *, int delta_index); +static void CheckLinePointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, rnd_point_t *, int delta_index); static void CheckArcPointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, int *, rnd_bool); static void CheckArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, rnd_bool); static void CheckPolygonForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_poly_t *); -static void CheckLinePointForRat(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_point_t *); +static void CheckLinePointForRat(rubber_ctx_t *rbnd, pcb_layer_t *, rnd_point_t *); static void CheckLineForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *); static void calculate_route_rubber_arc_point_move(pcb_rb_arc_t *arcptr, int end, rnd_coord_t dx, rnd_coord_t dy, pcb_route_t *route); -static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, pcb_point_t *, rnd_bool); +static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, rnd_point_t *, rnd_bool); -static pcb_r_dir_t rubber_callback(const rnd_box_t *b, void *cl); -static pcb_r_dir_t rubber_callback_arc(const rnd_box_t *b, void *cl); +static pcb_r_dir_t rubber_callback(const rnd_rnd_box_t *b, void *cl); +static pcb_r_dir_t rubber_callback_arc(const rnd_rnd_box_t *b, void *cl); -static pcb_r_dir_t rubber_callback(const rnd_box_t *b, void *cl) +static pcb_r_dir_t rubber_callback(const rnd_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 ? PCB_R_DIR_FOUND_CONTINUE : PCB_R_DIR_NOT_FOUND; } -static pcb_r_dir_t rubber_callback_arc(const rnd_box_t *b, void *cl) +static pcb_r_dir_t rubber_callback_arc(const rnd_rnd_box_t *b, void *cl) { pcb_arc_t *arc = (pcb_arc_t *) b; struct rubber_info *i = (struct rubber_info *)cl; @@ -356,12 +356,12 @@ int type; pcb_layergrp_id_t group; pcb_pstk_t *pstk; - pcb_point_t *point; + rnd_point_t *point; rubber_ctx_t *rbnd; int delta_index; }; -static pcb_r_dir_t rat_callback(const rnd_box_t *box, void *cl) +static pcb_r_dir_t rat_callback(const rnd_rnd_box_t *box, void *cl) { pcb_rat_t *rat = (pcb_rat_t *) box; struct rinfo *i = (struct rinfo *)cl; @@ -397,7 +397,7 @@ pcb_r_search(PCB->Data->rat_tree, &pstk->BoundingBox, NULL, rat_callback, &info, NULL); } -static void CheckLinePointForRat(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_point_t *Point) +static void CheckLinePointForRat(rubber_ctx_t *rbnd, pcb_layer_t *Layer, rnd_point_t *Point) { struct rinfo info; info.group = pcb_layer_get_group_(Layer); @@ -406,13 +406,13 @@ info.rbnd = rbnd; info.delta_index = 0; - pcb_r_search(PCB->Data->rat_tree, (rnd_box_t *) Point, NULL, rat_callback, &info, NULL); + pcb_r_search(PCB->Data->rat_tree, (rnd_rnd_box_t *) Point, NULL, rat_callback, &info, NULL); } /* checks all visible lines which belong to the same group as the passed line. * If one of the endpoints of the line is connected to an endpoint of the * passed line, the scanned line is added to the 'rubberband' list */ -static void CheckLinePointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *LinePoint, int delta_index) +static void CheckLinePointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *LinePoint, int delta_index) { const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); @@ -453,7 +453,7 @@ /* checks all visible arcs which belong to the same group as the passed line. * If one of the endpoints of the arc lays * inside the passed line, * the scanned arc is added to the 'rubberband' list */ -static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *LinePoint, rnd_bool Exact) +static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *LinePoint, rnd_bool Exact) { const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); @@ -909,9 +909,9 @@ } case PCB_OBJ_LINE_POINT: - CheckLinePointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (pcb_point_t *) Ptr3, 0); + CheckLinePointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (rnd_point_t *) Ptr3, 0); if (conf_rbo.plugins.rubberband_orig.enable_rubberband_arcs != 0) - CheckLinePointForRubberbandArcConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (pcb_point_t *) Ptr3, pcb_true); + CheckLinePointForRubberbandArcConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (rnd_point_t *) Ptr3, pcb_true); break; case PCB_OBJ_ARC_POINT: @@ -955,7 +955,7 @@ } case PCB_OBJ_LINE_POINT: - CheckLinePointForRat(rbnd, (pcb_layer_t *) Ptr1, (pcb_point_t *) Ptr3); + CheckLinePointForRat(rbnd, (pcb_layer_t *) Ptr1, (rnd_point_t *) Ptr3); break; } @@ -1042,8 +1042,8 @@ /* Move both ends with route. */ const int argi1 = (dindex1 * 2) + 2; const int argi2 = (dindex2 * 2) + 2; - pcb_point_t point1 = ptr->Line->Point1; - pcb_point_t point2 = ptr->Line->Point2; + rnd_point_t point1 = ptr->Line->Point1; + rnd_point_t point2 = ptr->Line->Point2; pcb_route_t route; point1.X += argv[argi1].d.i; @@ -1178,8 +1178,8 @@ } } else { - pcb_point_t point1; - pcb_point_t point2; + rnd_point_t point1; + rnd_point_t point2; pcb_route_t route; point1.X = x[0]; @@ -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); - pcb_r_delete_entry(ptr->Layer->line_tree, (rnd_box_t *) ptr->Line); + pcb_r_delete_entry(ptr->Layer->line_tree, (rnd_rnd_box_t *) ptr->Line); } else - pcb_r_delete_entry(PCB->Data->rat_tree, (rnd_box_t *) ptr->Line); + pcb_r_delete_entry(PCB->Data->rat_tree, (rnd_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) { - pcb_r_insert_entry(ptr->Layer->line_tree, (rnd_box_t *) ptr->Line); + pcb_r_insert_entry(ptr->Layer->line_tree, (rnd_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 { - pcb_r_insert_entry(PCB->Data->rat_tree, (rnd_box_t *) ptr->Line); + pcb_r_insert_entry(PCB->Data->rat_tree, (rnd_rnd_box_t *) ptr->Line); pcb_rat_invalidate_draw((pcb_rat_t *) ptr->Line); } @@ -1395,9 +1395,9 @@ pcb_layer_id_t layerid = pcb_layer_id(PCB->Data, arcptr->Layer); pcb_arc_t arc = *(arcptr->Arc); - pcb_point_t startpoint; - pcb_point_t endpoint; - pcb_point_t center; + rnd_point_t startpoint; + rnd_point_t endpoint; + rnd_point_t center; if (end == 1) { arc.StartAngle += arc.Delta; Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 30969) +++ trunk/src_plugins/script/live_script.c (revision 30970) @@ -499,7 +499,7 @@ return 0; } -static void lvs_install_menu(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) +static void lvs_install_menu(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *node, char *path) { char *end = path + strlen(path); pcb_menu_prop_t props; Index: trunk/src_plugins/serpentine/serpentine.c =================================================================== --- trunk/src_plugins/serpentine/serpentine.c (revision 30969) +++ trunk/src_plugins/serpentine/serpentine.c (revision 30970) @@ -50,8 +50,8 @@ #include "route.h" typedef struct { - pcb_point_t start; - pcb_point_t end; + rnd_point_t start; + rnd_point_t end; double amplitude; double minimum_amplitude; double nx,ny; /* Normal of host line */ @@ -106,8 +106,8 @@ int serpentine_calculate_route( pcb_route_t * route, const pcb_line_t * line, - const pcb_point_t * point1, - const pcb_point_t * point2, + const rnd_point_t * point1, + const rnd_point_t * point2, const rnd_coord_t pitch, serpentine_info_t * p_info ) { @@ -119,7 +119,7 @@ int count = 0; double sind,cosd,sinn,cosn; - pcb_point_t start,end; + rnd_point_t start,end; /* Project the start and end points onto the line */ double t0 = point_on_line(point1->X,point1->Y,line->Point1.X,line->Point1.Y,line->Point2.X,line->Point2.Y,&sx,&sy); @@ -180,8 +180,8 @@ double nax = 0.0; double nay = 0.0; double last_amplitude = 0.0; - pcb_point_t startpos; - pcb_point_t endpos; + rnd_point_t startpos; + rnd_point_t endpos; route->start_point = route->end_point = line->Point1; route->thickness = line->Thickness; @@ -328,8 +328,8 @@ double pitch_mult = conf_serpentine.plugins.serpentine.pitch; pcb_route_t route; pcb_line_t * p_line = (pcb_line_t *)pcb_crosshair.AttachedObject.Ptr2; - pcb_point_t point1; - pcb_point_t point2; + rnd_point_t point1; + rnd_point_t point2; point1.X = pcb_crosshair.AttachedObject.X; point1.Y = pcb_crosshair.AttachedObject.Y; point2.X = pcb_crosshair.AttachedObject.tx; @@ -371,8 +371,8 @@ pcb_route_t route; serpentine_info_t info; pcb_line_t * p_line = (pcb_line_t *)pcb_crosshair.AttachedObject.Ptr2; - pcb_point_t point1; - pcb_point_t point2; + rnd_point_t point1; + rnd_point_t point2; point1.X = pcb_crosshair.AttachedObject.X; point1.Y = pcb_crosshair.AttachedObject.Y; point2.X = pcb_crosshair.AttachedObject.tx; Index: trunk/src_plugins/shape/shape.c =================================================================== --- trunk/src_plugins/shape/shape.c (revision 30969) +++ trunk/src_plugins/shape/shape.c (revision 30970) @@ -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); - pcb_r_delete_entry(PCB_CURRLAYER(PCB)->polygon_tree, (rnd_box_t *)p); + pcb_r_delete_entry(PCB_CURRLAYER(PCB)->polygon_tree, (rnd_rnd_box_t *)p); pcb_poly_free_fields(p); pcb_poly_free(p); pcb_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); - pcb_r_delete_entry(PCB_CURRLAYER(PCB)->line_tree, (rnd_box_t *)l); + pcb_r_delete_entry(PCB_CURRLAYER(PCB)->line_tree, (rnd_rnd_box_t *)l); pcb_line_free(l); pcb_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 30969) +++ trunk/src_plugins/sketch_route/sketch_route.c (revision 30970) @@ -71,7 +71,7 @@ htpp_t terminals; /* key - terminal object; value - cdt point */ vtwire_t wires; vtewire_t ewires; - pcb_rtree_t *spoke_tree; + rnd_rtree_t *spoke_tree; pcb_layer_t *ui_layer_cdt; pcb_layer_t *ui_layer_erbs; } sketch_t; @@ -653,7 +653,7 @@ sketch_t *sk; }; -static pcb_r_dir_t r_search_cb(const rnd_box_t *box, void *cl) +static pcb_r_dir_t r_search_cb(const rnd_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_box_t bbox; + rnd_rnd_box_t bbox; struct search_info info; char name[256]; @@ -1081,8 +1081,8 @@ int i; if (pcb_crosshair.AttachedObject.Type != PCB_OBJ_VOID) { for (i = 0; i < vtp0_len(&attached_path.lines); i++) { - pcb_point_t *p1 = &((pcb_attached_line_t *) attached_path.lines.array[i])->Point1; - pcb_point_t *p2 = &((pcb_attached_line_t *) attached_path.lines.array[i])->Point2; + rnd_point_t *p1 = &((pcb_attached_line_t *) attached_path.lines.array[i])->Point1; + rnd_point_t *p2 = &((pcb_attached_line_t *) attached_path.lines.array[i])->Point2; pcb_render->draw_line(pcb_crosshair.GC, p1->X, p1->Y, p2->X, p2->Y); } } Index: trunk/src_plugins/sketch_route/spoke.c =================================================================== --- trunk/src_plugins/sketch_route/spoke.c (revision 30969) +++ trunk/src_plugins/sketch_route/spoke.c (revision 30970) @@ -27,7 +27,7 @@ static void spoke_pos(spoke_t *sp, rnd_coord_t spacing, rnd_coord_t *x, rnd_coord_t *y) { - rnd_box_t *obj_bbox = &((pointdata_t *) sp->p->data)->obj->bbox_naked; + rnd_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 30969) +++ trunk/src_plugins/sketch_route/spoke.h (revision 30970) @@ -18,7 +18,7 @@ struct spoke_s { spoke_dir_t dir; - rnd_box_t bbox; + rnd_rnd_box_t bbox; vtp0_t slots; point_t *p; }; Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 30969) +++ trunk/src_plugins/teardrops/teardrops.c (revision 30970) @@ -39,7 +39,7 @@ static int new_arcs = 0; -static pcb_r_dir_t check_line_callback(const rnd_box_t * box, void *cl) +static pcb_r_dir_t check_line_callback(const rnd_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_box_t spot; + rnd_rnd_box_t spot; int n; double mindist; @@ -250,8 +250,8 @@ static fgw_error_t pcb_act_teardrops(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_box_t *b; - pcb_rtree_it_t it; + rnd_rnd_box_t *b; + rnd_rtree_it_t it; new_arcs = 0; for(b = pcb_r_first(PCB->Data->padstack_tree, &it); b != NULL; b = pcb_r_next(&it)) Index: trunk/src_plugins/tool_std/tool_arc.c =================================================================== --- trunk/src_plugins/tool_std/tool_arc.c (revision 30969) +++ trunk/src_plugins/tool_std/tool_arc.c (revision 30970) @@ -90,7 +90,7 @@ { pcb_arc_t *arc; rnd_coord_t wx, wy; - pcb_angle_t sa, dir; + rnd_angle_t sa, dir; wx = hl->tool_x - pcb_crosshair.AttachedBox.Point1.X; wy = hl->tool_y - pcb_crosshair.AttachedBox.Point1.Y; rnd_trace("arc: %mm %mm wh %mm %mm\n", hl->tool_x, hl->tool_y, wx, wy); Index: trunk/src_plugins/tool_std/tool_arrow.c =================================================================== --- trunk/src_plugins/tool_std/tool_arrow.c (revision 30969) +++ trunk/src_plugins/tool_std/tool_arrow.c (revision 30970) @@ -83,7 +83,7 @@ pcb_tool_select_by_name(hl, "buffer"); } else if (hl->tool_hit && !pcb_gui->shift_is_pressed(pcb_gui)) { - rnd_box_t box; + rnd_rnd_box_t box; hl->tool_grabbed.status = pcb_true; pcb_tool_save(hl); @@ -109,7 +109,7 @@ pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, pcb_true); } else { - rnd_box_t box; + rnd_rnd_box_t box; hl->tool_hit = 0; pcb_crosshair_note.Moving = pcb_false; @@ -179,11 +179,11 @@ void pcb_tool_arrow_release_mode(rnd_hidlib_t *hl) { - rnd_box_t box; + rnd_rnd_box_t box; pcb_board_t *pcb = (pcb_board_t *)hl; if (hl->tool_click) { - rnd_box_t box; + rnd_rnd_box_t box; box.X1 = -PCB_MAX_COORD; box.Y1 = -PCB_MAX_COORD; Index: trunk/src_plugins/tool_std/tool_insert.c =================================================================== --- trunk/src_plugins/tool_std/tool_insert.c (revision 30969) +++ trunk/src_plugins/tool_std/tool_insert.c (revision 30970) @@ -48,7 +48,7 @@ pcb_line_t line; } fake; -static pcb_point_t InsertedPoint; +static rnd_point_t InsertedPoint; static rnd_cardinal_t polyIndex = 0; @@ -135,7 +135,7 @@ void pcb_tool_insert_adjust_attached_objects(rnd_hidlib_t *hl) { - pcb_point_t *pnt; + rnd_point_t *pnt; pnt = pcb_adjust_insert_point(); if (pnt) InsertedPoint = *pnt; Index: trunk/src_plugins/tool_std/tool_poly.c =================================================================== --- trunk/src_plugins/tool_std/tool_poly.c (revision 30969) +++ trunk/src_plugins/tool_std/tool_poly.c (revision 30970) @@ -55,7 +55,7 @@ void pcb_tool_poly_notify_mode(rnd_hidlib_t *hl) { - pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; + rnd_point_t *points = pcb_crosshair.AttachedPolygon.Points; rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; /* do update of position */ Index: trunk/src_plugins/tool_std/tool_polyhole.c =================================================================== --- trunk/src_plugins/tool_std/tool_polyhole.c (revision 30969) +++ trunk/src_plugins/tool_std/tool_polyhole.c (revision 30970) @@ -82,7 +82,7 @@ /* second notify, insert new point into object */ case PCB_CH_STATE_SECOND: { - pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; + rnd_point_t *points = pcb_crosshair.AttachedPolygon.Points; rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; /* do update of position */ Index: trunk/tests/librnd/librnd_test.c =================================================================== --- trunk/tests/librnd/librnd_test.c (revision 30969) +++ trunk/tests/librnd/librnd_test.c (revision 30970) @@ -14,7 +14,7 @@ static void poly_test() { - pcb_polyarea_t pa; + rnd_polyarea_t pa; pcb_polyarea_init(&pa); pcb_poly_valid(&pa); }