Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4760) +++ trunk/src/action_helper.c (revision 4761) @@ -94,7 +94,7 @@ break; case PCB_TYPE_ARC: { - BoxTypePtr box; + pcb_box_t *box; box = GetArcEnds((ArcTypePtr) ptr2); *x = box->X1; @@ -106,7 +106,7 @@ static void AttachForCopy(Coord PlaceX, Coord PlaceY) { - BoxTypePtr box; + pcb_box_t *box; Coord mx = 0, my = 0; Crosshair.AttachedObject.RubberbandN = 0; @@ -317,7 +317,7 @@ SetMode(PCB_MODE_PASTE_BUFFER); } else if (Note.Hit && !gui->shift_is_pressed()) { - BoxType box; + pcb_box_t box; SaveMode(); saved_mode = pcb_true; @@ -342,7 +342,7 @@ AttachForCopy(Note.X, Note.Y); } else { - BoxType box; + pcb_box_t box; Note.Hit = 0; Note.Moving = pcb_false; @@ -364,10 +364,10 @@ void ReleaseMode(void) { - BoxType box; + pcb_box_t box; if (Note.Click) { - BoxType box; + pcb_box_t box; box.X1 = -MAX_COORD; box.Y1 = -MAX_COORD; @@ -683,7 +683,7 @@ conf_core.design.line_thickness, 2 * conf_core.design.clearance, MakeFlags(conf_core.editor.clear_line ? PCB_FLAG_CLEARLINE : 0)))) { - BoxTypePtr bx; + pcb_box_t *bx; bx = GetArcEnds(arc); Crosshair.AttachedBox.Point1.X = Crosshair.AttachedBox.Point2.X = bx->X2; @@ -1110,11 +1110,11 @@ for (i = 0; i < MAX_ELEMENTNAMES; i++) { if (i == save_n) EraseElementName(e); - r_delete_entry(PCB->Data->name_tree[i], (BoxType *) & (e->Name[i])); + r_delete_entry(PCB->Data->name_tree[i], (pcb_box_t *) & (e->Name[i])); memcpy(&(e->Name[i]), &(estr[i]), sizeof(TextType)); e->Name[i].Element = e; SetTextBoundingBox(&PCB->Font, &(e->Name[i])); - r_insert_entry(PCB->Data->name_tree[i], (BoxType *) & (e->Name[i]), 0); + r_insert_entry(PCB->Data->name_tree[i], (pcb_box_t *) & (e->Name[i]), 0); if (i == save_n) DrawElementName(e); } Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 4760) +++ trunk/src/board.c (revision 4761) @@ -192,7 +192,7 @@ int nunplated; } HoleCountStruct; -static r_dir_t hole_counting_callback(const BoxType * b, void *cl) +static r_dir_t hole_counting_callback(const pcb_box_t * b, void *cl) { PinTypePtr pin = (PinTypePtr) b; HoleCountStruct *hcs = (HoleCountStruct *) cl; @@ -209,7 +209,7 @@ * a given area of the board. To count for the whole board, pass NULL * within_area. */ -void CountHoles(int *plated, int *unplated, const BoxType * within_area) +void CountHoles(int *plated, int *unplated, const pcb_box_t * within_area) { HoleCountStruct hcs = { 0, 0 }; Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 4760) +++ trunk/src/board.h (revision 4761) @@ -121,7 +121,7 @@ void pcb_colors_from_settings(pcb_board_t *); -void CountHoles(int *plated, int *unplated, const BoxType * within_area); +void CountHoles(int *plated, int *unplated, const pcb_box_t * within_area); #define SWAP_X(x) (SWAP_SIGN_X(x)) #define SWAP_Y(y) (PCB->MaxHeight +SWAP_SIGN_Y(y)) Index: trunk/src/box.c =================================================================== --- trunk/src/box.c (revision 4760) +++ trunk/src/box.c (revision 4761) @@ -34,16 +34,16 @@ /* --------------------------------------------------------------------------- * get next slot for a box, allocates memory if necessary */ -BoxTypePtr GetBoxMemory(BoxListTypePtr Boxes) +pcb_box_t *GetBoxMemory(BoxListTypePtr Boxes) { - BoxTypePtr box = Boxes->Box; + pcb_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 = (BoxTypePtr) realloc(box, Boxes->BoxMax * sizeof(BoxType)); + box = (pcb_box_t *) realloc(box, Boxes->BoxMax * sizeof(pcb_box_t)); Boxes->Box = box; - memset(box + Boxes->BoxN, 0, (Boxes->BoxMax - Boxes->BoxN) * sizeof(BoxType)); + memset(box + Boxes->BoxN, 0, (Boxes->BoxMax - Boxes->BoxN) * sizeof(pcb_box_t)); } return (box + Boxes->BoxN++); } Index: trunk/src/box.h =================================================================== --- trunk/src/box.h (revision 4760) +++ trunk/src/box.h (revision 4761) @@ -45,7 +45,7 @@ struct pcb_boxlist_s { pcb_cardinal_t BoxN, /* the number of boxes contained */ BoxMax; /* max boxes from malloc */ - BoxTypePtr Box; + pcb_box_t *Box; }; #include "misc_util.h" @@ -110,27 +110,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*. */ -static inline PCB_FUNC_UNUSED pcb_bool point_in_box(const BoxType * box, Coord X, Coord Y) +static inline PCB_FUNC_UNUSED pcb_bool point_in_box(const pcb_box_t * box, Coord X, Coord Y) { return (X >= box->X1) && (Y >= box->Y1) && (X < box->X2) && (Y < box->Y2); } -static inline PCB_FUNC_UNUSED pcb_bool point_in_closed_box(const BoxType * box, Coord X, Coord Y) +static inline PCB_FUNC_UNUSED pcb_bool point_in_closed_box(const pcb_box_t * box, Coord X, Coord Y) { return (X >= box->X1) && (Y >= box->Y1) && (X <= box->X2) && (Y <= box->Y2); } -static inline PCB_FUNC_UNUSED pcb_bool box_is_good(const BoxType * b) +static inline PCB_FUNC_UNUSED pcb_bool box_is_good(const pcb_box_t * b) { return (b->X1 < b->X2) && (b->Y1 < b->Y2); } -static inline PCB_FUNC_UNUSED pcb_bool box_intersect(const BoxType * a, const BoxType * b) +static inline PCB_FUNC_UNUSED pcb_bool box_intersect(const pcb_box_t * a, const pcb_box_t * b) { return (a->X1 < b->X2) && (b->X1 < a->X2) && (a->Y1 < b->Y2) && (b->Y1 < a->Y2); } -static inline PCB_FUNC_UNUSED CheapPointType closest_point_in_box(const CheapPointType * from, const BoxType * box) +static inline PCB_FUNC_UNUSED CheapPointType closest_point_in_box(const CheapPointType * from, const pcb_box_t * box) { CheapPointType r; assert(box->X1 < box->X2 && box->Y1 < box->Y2); @@ -140,14 +140,14 @@ return r; } -static inline PCB_FUNC_UNUSED pcb_bool box_in_box(const BoxType * outer, const BoxType * inner) +static inline PCB_FUNC_UNUSED pcb_bool box_in_box(const pcb_box_t * outer, const pcb_box_t * inner) { return (outer->X1 <= inner->X1) && (inner->X2 <= outer->X2) && (outer->Y1 <= inner->Y1) && (inner->Y2 <= outer->Y2); } -static inline PCB_FUNC_UNUSED BoxType clip_box(const BoxType * box, const BoxType * clipbox) +static inline PCB_FUNC_UNUSED pcb_box_t clip_box(const pcb_box_t * box, const pcb_box_t * clipbox) { - BoxType r; + pcb_box_t r; assert(box_intersect(box, clipbox)); r.X1 = MAX(box->X1, clipbox->X1); r.X2 = MIN(box->X2, clipbox->X2); @@ -157,9 +157,9 @@ return r; } -static inline PCB_FUNC_UNUSED BoxType shrink_box(const BoxType * box, Coord amount) +static inline PCB_FUNC_UNUSED pcb_box_t shrink_box(const pcb_box_t * box, Coord amount) { - BoxType r = *box; + pcb_box_t r = *box; r.X1 += amount; r.Y1 += amount; r.X2 -= amount; @@ -167,15 +167,15 @@ return r; } -static inline PCB_FUNC_UNUSED BoxType bloat_box(const BoxType * box, Coord amount) +static inline PCB_FUNC_UNUSED pcb_box_t bloat_box(const pcb_box_t * box, Coord amount) { return shrink_box(box, -amount); } /* construct a minimum box that touches the input box at the center */ -static inline PCB_FUNC_UNUSED BoxType box_center(const BoxType * box) +static inline PCB_FUNC_UNUSED pcb_box_t box_center(const pcb_box_t * box) { - BoxType r; + pcb_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; @@ -184,9 +184,9 @@ } /* construct a minimum box that touches the input box at the corner */ -static inline PCB_FUNC_UNUSED BoxType box_corner(const BoxType * box) +static inline PCB_FUNC_UNUSED pcb_box_t box_corner(const pcb_box_t * box) { - BoxType r; + pcb_box_t r; r.X1 = box->X1; r.X2 = r.X1 + 1; r.Y1 = box->Y1; @@ -195,9 +195,9 @@ } /* construct a box that holds a single point */ -static inline PCB_FUNC_UNUSED BoxType point_box(Coord X, Coord Y) +static inline PCB_FUNC_UNUSED pcb_box_t point_box(Coord X, Coord Y) { - BoxType r; + pcb_box_t r; r.X1 = X; r.X2 = X + 1; r.Y1 = Y; @@ -206,7 +206,7 @@ } /* close a bounding box by pushing its upper right corner */ -static inline PCB_FUNC_UNUSED void close_box(BoxType * r) +static inline PCB_FUNC_UNUSED void close_box(pcb_box_t * r) { r->X2++; r->Y2++; @@ -215,13 +215,13 @@ /* 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. */ -static inline PCB_FUNC_UNUSED double dist2_to_box(const CheapPointType * p, const BoxType * b) +static inline PCB_FUNC_UNUSED double dist2_to_box(const CheapPointType * p, const pcb_box_t * b) { CheapPointType r = closest_point_in_box(p, b); return Distance(r.X, r.Y, p->X, p->Y); } -BoxTypePtr GetBoxMemory(BoxListTypePtr); +pcb_box_t *GetBoxMemory(BoxListTypePtr); void FreeBoxListMemory(BoxListTypePtr); void SetPointBoundingBox(PointTypePtr Pnt); Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4760) +++ trunk/src/buffer.c (revision 4761) @@ -83,7 +83,7 @@ */ void SetBufferBoundingBox(pcb_buffer_t *Buffer) { - BoxTypePtr box = GetDataBoundingBox(Buffer->Data); + pcb_box_t *box = GetDataBoundingBox(Buffer->Data); if (box) Buffer->BoundingBox = *box; @@ -225,10 +225,10 @@ /* rotate vias */ VIA_LOOP(Buffer->Data); { - r_delete_entry(Buffer->Data->via_tree, (BoxType *) via); + r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); ROTATE_VIA_LOWLEVEL(via, Buffer->X, Buffer->Y, Number); SetPinBoundingBox(via); - r_insert_entry(Buffer->Data->via_tree, (BoxType *) via, 0); + r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } END_LOOP; @@ -242,30 +242,30 @@ /* all layer related objects */ ALLLINE_LOOP(Buffer->Data); { - r_delete_entry(layer->line_tree, (BoxType *) line); + r_delete_entry(layer->line_tree, (pcb_box_t *) line); RotateLineLowLevel(line, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->line_tree, (BoxType *) line, 0); + r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; ALLARC_LOOP(Buffer->Data); { - r_delete_entry(layer->arc_tree, (BoxType *) arc); + r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); RotateArcLowLevel(arc, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->arc_tree, (BoxType *) arc, 0); + r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } ENDALL_LOOP; ALLTEXT_LOOP(Buffer->Data); { - r_delete_entry(layer->text_tree, (BoxType *) text); + r_delete_entry(layer->text_tree, (pcb_box_t *) text); RotateTextLowLevel(text, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->text_tree, (BoxType *) text, 0); + r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); } ENDALL_LOOP; ALLPOLYGON_LOOP(Buffer->Data); { - r_delete_entry(layer->polygon_tree, (BoxType *) polygon); + r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); RotatePolygonLowLevel(polygon, Buffer->X, Buffer->Y, Number); - r_insert_entry(layer->polygon_tree, (BoxType *) polygon, 0); + r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); } ENDALL_LOOP; @@ -284,10 +284,10 @@ /* rotate vias */ VIA_LOOP(Buffer->Data); { - r_delete_entry(Buffer->Data->via_tree, (BoxType *) via); + r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); free_rotate(&via->X, &via->Y, Buffer->X, Buffer->Y, cosa, sina); SetPinBoundingBox(via); - r_insert_entry(Buffer->Data->via_tree, (BoxType *) via, 0); + r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } END_LOOP; @@ -301,25 +301,25 @@ /* all layer related objects */ ALLLINE_LOOP(Buffer->Data); { - r_delete_entry(layer->line_tree, (BoxType *) line); + r_delete_entry(layer->line_tree, (pcb_box_t *) line); free_rotate(&line->Point1.X, &line->Point1.Y, Buffer->X, Buffer->Y, cosa, sina); free_rotate(&line->Point2.X, &line->Point2.Y, Buffer->X, Buffer->Y, cosa, sina); SetLineBoundingBox(line); - r_insert_entry(layer->line_tree, (BoxType *) line, 0); + r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; ALLARC_LOOP(Buffer->Data); { - r_delete_entry(layer->arc_tree, (BoxType *) arc); + r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); free_rotate(&arc->X, &arc->Y, Buffer->X, Buffer->Y, cosa, sina); arc->StartAngle = NormalizeAngle(arc->StartAngle + angle); - r_insert_entry(layer->arc_tree, (BoxType *) arc, 0); + r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } ENDALL_LOOP; /* FIXME: rotate text */ ALLPOLYGON_LOOP(Buffer->Data); { - r_delete_entry(layer->polygon_tree, (BoxType *) polygon); + r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); POLYGONPOINT_LOOP(polygon); { free_rotate(&point->X, &point->Y, Buffer->X, Buffer->Y, cosa, sina); @@ -326,7 +326,7 @@ } END_LOOP; SetPolygonBoundingBox(polygon); - r_insert_entry(layer->polygon_tree, (BoxType *) polygon, 0); + r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); } ENDALL_LOOP; @@ -473,38 +473,38 @@ Buffer->Y = SWAP_Y(Buffer->Y); VIA_LOOP(Buffer->Data); { - r_delete_entry(Buffer->Data->via_tree, (BoxType *) via); + r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); via->X = SWAP_X(via->X); via->Y = SWAP_Y(via->Y); SetPinBoundingBox(via); - r_insert_entry(Buffer->Data->via_tree, (BoxType *) via, 0); + r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } END_LOOP; ALLLINE_LOOP(Buffer->Data); { - r_delete_entry(layer->line_tree, (BoxType *) line); + r_delete_entry(layer->line_tree, (pcb_box_t *) line); line->Point1.X = SWAP_X(line->Point1.X); line->Point1.Y = SWAP_Y(line->Point1.Y); line->Point2.X = SWAP_X(line->Point2.X); line->Point2.Y = SWAP_Y(line->Point2.Y); SetLineBoundingBox(line); - r_insert_entry(layer->line_tree, (BoxType *) line, 0); + r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; ALLARC_LOOP(Buffer->Data); { - r_delete_entry(layer->arc_tree, (BoxType *) arc); + r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); arc->X = SWAP_X(arc->X); arc->Y = SWAP_Y(arc->Y); arc->StartAngle = SWAP_ANGLE(arc->StartAngle); arc->Delta = SWAP_DELTA(arc->Delta); SetArcBoundingBox(arc); - r_insert_entry(layer->arc_tree, (BoxType *) arc, 0); + r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } ENDALL_LOOP; ALLPOLYGON_LOOP(Buffer->Data); { - r_delete_entry(layer->polygon_tree, (BoxType *) polygon); + r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); POLYGONPOINT_LOOP(polygon); { point->X = SWAP_X(point->X); @@ -512,18 +512,18 @@ } END_LOOP; SetPolygonBoundingBox(polygon); - r_insert_entry(layer->polygon_tree, (BoxType *) polygon, 0); + r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); /* hmmm, how to handle clip */ } ENDALL_LOOP; ALLTEXT_LOOP(Buffer->Data); { - r_delete_entry(layer->text_tree, (BoxType *) text); + r_delete_entry(layer->text_tree, (pcb_box_t *) text); text->X = SWAP_X(text->X); text->Y = SWAP_Y(text->Y); TOGGLE_FLAG(PCB_FLAG_ONSOLDER, text); SetTextBoundingBox(&PCB->Font, text); - r_insert_entry(layer->text_tree, (BoxType *) text, 0); + r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); } ENDALL_LOOP; /* swap silkscreen layers */ Index: trunk/src/buffer.h =================================================================== --- trunk/src/buffer.h (revision 4760) +++ trunk/src/buffer.h (revision 4761) @@ -33,7 +33,7 @@ struct pcb_buffer_s { /* information about the paste buffer */ Coord X, Y; /* offset */ - BoxType BoundingBox; + pcb_box_t BoundingBox; pcb_data_t *Data; /* data; not all members of pcb_board_t */ /* are used */ }; Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4760) +++ trunk/src/crosshair.c (revision 4761) @@ -133,7 +133,7 @@ static void XORDrawAttachedArc(Coord thick) { ArcType arc; - BoxTypePtr bx; + pcb_box_t *bx; Coord wx, wy; Angle sa, dir; Coord wid = thick / 2; @@ -305,7 +305,7 @@ END_LOOP; TEXT_LOOP(layer); { - BoxTypePtr box = &text->BoundingBox; + pcb_box_t *box = &text->BoundingBox; gui->draw_rect(Crosshair.GC, x + box->X1, y + box->Y1, x + box->X2, y + box->Y2); } END_LOOP; @@ -440,7 +440,7 @@ case PCB_TYPE_TEXT: { TextTypePtr text = (TextTypePtr) Crosshair.AttachedObject.Ptr2; - BoxTypePtr box = &text->BoundingBox; + pcb_box_t *box = &text->BoundingBox; gui->draw_rect(Crosshair.GC, box->X1 + dx, box->Y1 + dy, box->X2 + dx, box->Y2 + dy); break; } @@ -711,7 +711,7 @@ Coord Y; }; -static r_dir_t onpoint_line_callback(const BoxType * box, void *cl) +static r_dir_t onpoint_line_callback(const pcb_box_t * box, void *cl) { struct onpoint_search_info *info = (struct onpoint_search_info *) cl; CrosshairType *crosshair = info->crosshair; @@ -737,7 +737,7 @@ #define close_enough(v1, v2) (coord_abs((v1)-(v2)) < 10) -static r_dir_t onpoint_arc_callback(const BoxType * box, void *cl) +static r_dir_t onpoint_arc_callback(const pcb_box_t * box, void *cl) { struct onpoint_search_info *info = (struct onpoint_search_info *) cl; CrosshairType *crosshair = info->crosshair; @@ -812,7 +812,7 @@ */ static void onpoint_work(CrosshairType * crosshair, Coord X, Coord Y) { - BoxType SearchBox = point_box(X, Y); + pcb_box_t SearchBox = point_box(X, Y); struct onpoint_search_info info; int i; pcb_bool redraw = pcb_false; Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 4760) +++ trunk/src/crosshair.h (revision 4761) @@ -41,11 +41,11 @@ Point2; long int State; pcb_bool otherway; -} AttachedBoxType, *AttachedBoxTypePtr; +} AttachedBoxType; typedef struct { /* currently attached object */ Coord X, Y; /* saved position when PCB_MODE_MOVE */ - BoxType BoundingBox; + pcb_box_t BoundingBox; long int Type, /* object type */ State; void *Ptr1, /* three pointers to data, see */ Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 4760) +++ trunk/src/data.c (revision 4761) @@ -271,9 +271,9 @@ * gets minimum and maximum coordinates * returns NULL if layout is empty */ -BoxTypePtr GetDataBoundingBox(pcb_data_t *Data) +pcb_box_t *GetDataBoundingBox(pcb_data_t *Data) { - static BoxType box; + static pcb_box_t box; /* FIX ME: use r_search to do this much faster */ /* preset identifiers with highest and lowest possible values */ Index: trunk/src/data.h =================================================================== --- trunk/src/data.h (revision 4760) +++ trunk/src/data.h (revision 4761) @@ -123,6 +123,6 @@ void FreeDataMemory(pcb_data_t *); pcb_bool IsDataEmpty(pcb_data_t *); -BoxTypePtr GetDataBoundingBox(pcb_data_t *Data); +pcb_box_t *GetDataBoundingBox(pcb_data_t *Data); #endif Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 4760) +++ trunk/src/draw.c (revision 4761) @@ -68,7 +68,7 @@ * some local identifiers */ -BoxType pcb_draw_invalidated = { MAXINT, MAXINT, -MAXINT, -MAXINT }; +pcb_box_t pcb_draw_invalidated = { MAXINT, MAXINT, -MAXINT, -MAXINT }; int pcb_draw_doing_pinout = 0; pcb_bool pcb_draw_doing_assy = pcb_false; @@ -76,12 +76,12 @@ /* --------------------------------------------------------------------------- * some local prototypes */ -static void DrawEverything(const BoxType *); -static void DrawPPV(int group, const BoxType *); -static void DrawLayerGroup(int, const BoxType *); -static void DrawMask(int side, const BoxType *); -static void DrawRats(const BoxType *); -static void DrawSilk(int side, const BoxType *); +static void DrawEverything(const pcb_box_t *); +static void DrawPPV(int group, const pcb_box_t *); +static void DrawLayerGroup(int, const pcb_box_t *); +static void DrawMask(int side, const pcb_box_t *); +static void DrawRats(const pcb_box_t *); +static void DrawSilk(int side, const pcb_box_t *); #warning TODO: this should be cached void LightenColor(const char *orig, char buf[8], double factor) @@ -126,7 +126,7 @@ gui->invalidate_all(); } -static void DrawHoles(pcb_bool draw_plated, pcb_bool draw_unplated, const BoxType * drawn_area) +static void DrawHoles(pcb_bool draw_plated, pcb_bool draw_unplated, const pcb_box_t * drawn_area) { int plated = -1; @@ -142,7 +142,7 @@ /* --------------------------------------------------------------------------- * prints assembly drawing. */ -static void PrintAssembly(int side, const BoxType * drawn_area) +static void PrintAssembly(int side, const pcb_box_t * drawn_area) { int side_group = GetLayerGroupNumberByNumber(max_copper_layer + side); @@ -156,7 +156,7 @@ pcb_draw_doing_assy = pcb_false; } -static void DrawEverything_holes(const BoxType * drawn_area) +static void DrawEverything_holes(const pcb_box_t * drawn_area) { int plated, unplated; CountHoles(&plated, &unplated, drawn_area); @@ -175,7 +175,7 @@ /* --------------------------------------------------------------------------- * initializes some identifiers for a new zoom factor and redraws whole screen */ -static void DrawEverything(const BoxType * drawn_area) +static void DrawEverything(const pcb_box_t * drawn_area) { int i, ngroups, side; int component, solder; @@ -303,7 +303,7 @@ * Draws pins pads and vias - Always draws for non-gui HIDs, * otherwise drawing depends on PCB->PinOn and PCB->ViaOn */ -static void DrawPPV(int group, const BoxType * drawn_area) +static void DrawPPV(int group, const pcb_box_t * drawn_area) { int component_group = GetLayerGroupNumberByNumber(component_silk_layer); int solder_group = GetLayerGroupNumberByNumber(solder_silk_layer); @@ -338,7 +338,7 @@ * Draws silk layer. */ -static void DrawSilk(int side, const BoxType * drawn_area) +static void DrawSilk(int side, const pcb_box_t * drawn_area) { #if 0 /* This code is used when you want to mask silk to avoid exposed @@ -374,7 +374,7 @@ } -static void DrawMaskBoardArea(int mask_type, const BoxType * drawn_area) +static void DrawMaskBoardArea(int mask_type, const pcb_box_t * drawn_area) { /* Skip the mask drawing if the GUI doesn't want this type */ if ((mask_type == HID_MASK_BEFORE && !gui->poly_before) || (mask_type == HID_MASK_AFTER && !gui->poly_after)) @@ -391,7 +391,7 @@ /* --------------------------------------------------------------------------- * draws solder mask layer - this will cover nearly everything */ -static void DrawMask(int side, const BoxType * screen) +static void DrawMask(int side, const pcb_box_t * screen) { int thin = conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly; @@ -414,7 +414,7 @@ } } -static void DrawRats(const BoxType * drawn_area) +static void DrawRats(const pcb_box_t * drawn_area) { /* * XXX lesstif allows positive AND negative drawing in HID_MASK_CLEAR. @@ -431,7 +431,7 @@ gui->use_mask(HID_MASK_OFF); } -void DrawLayer(pcb_layer_t *Layer, const BoxType * screen) +void DrawLayer(pcb_layer_t *Layer, const pcb_box_t * screen) { struct draw_poly_info info; @@ -468,7 +468,7 @@ * draws one layer group. If the exporter is not a GUI, * also draws the pins / pads / vias in this layer group. */ -static void DrawLayerGroup(int group, const BoxType * drawn_area) +static void DrawLayerGroup(int group, const pcb_box_t * drawn_area) { int i, rv = 1; int layernum; @@ -576,7 +576,7 @@ * HID drawing callback. */ -void hid_expose_callback(HID * hid, BoxType * region, void *item) +void hid_expose_callback(HID * hid, pcb_box_t * region, void *item) { HID *old_gui = gui; Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 4760) +++ trunk/src/draw.h (revision 4761) @@ -57,13 +57,13 @@ } while(0) \ /* the minimum box that needs to be redrawn */ -extern BoxType pcb_draw_invalidated; +extern pcb_box_t pcb_draw_invalidated; /* Adds the update rect to the invalidated region. This schedules the object - for redraw (by Draw()). obj is anything that can be casted to BoxType */ + for redraw (by Draw()). obj is anything that can be casted to pcb_box_t */ #define pcb_draw_invalidate(obj) \ do { \ - BoxType *box = (BoxType *)obj; \ + pcb_box_t *box = (pcb_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); \ @@ -79,7 +79,7 @@ void Draw(void); void Redraw(void); void DrawObject(int, void *, void *); -void DrawLayer(pcb_layer_t *, const BoxType *); +void DrawLayer(pcb_layer_t *, const pcb_box_t *); void EraseObject(int, void *, void *); #endif Index: trunk/src/find_deadcode.c =================================================================== --- trunk/src/find_deadcode.c (revision 4760) +++ trunk/src/find_deadcode.c (revision 4761) @@ -29,7 +29,7 @@ #error do not compile this -static int LOT_Linecallback(const BoxType * b, void *cl) +static int LOT_Linecallback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -39,7 +39,7 @@ return 0; } -static int LOT_Arccallback(const BoxType * b, void *cl) +static int LOT_Arccallback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -51,7 +51,7 @@ return 0; } -static int LOT_Padcallback(const BoxType * b, void *cl) +static int LOT_Padcallback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -69,11 +69,11 @@ info.line = *line; EXPAND_BOUNDS(&info.line); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (BoxType *) & info.line, NULL, pv_touch_callback, &info, NULL); + r_search(PCB->Data->via_tree, (pcb_box_t *) & info.line, NULL, pv_touch_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (BoxType *) & info.line, NULL, pv_touch_callback, &info, NULL); + r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.line, NULL, pv_touch_callback, &info, NULL); else return pcb_true; @@ -103,11 +103,11 @@ /* find the first line that touches coordinates */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (BoxType *) & info.line, NULL, LOT_Linecallback, &info, NULL); + r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.line, NULL, LOT_Linecallback, &info, NULL); else return (pcb_true); if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (BoxType *) & info.line, NULL, LOT_Arccallback, &info, NULL); + r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.line, NULL, LOT_Arccallback, &info, NULL); else return (pcb_true); Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 4760) +++ trunk/src/find_geo.c (revision 4761) @@ -419,7 +419,7 @@ pcb_bool LineArcIntersect(LineTypePtr Line, ArcTypePtr Arc) { double dx, dy, dx1, dy1, l, d, r, r2, Radius; - BoxTypePtr box; + pcb_box_t *box; dx = Line->Point2.X - Line->Point1.X; dy = Line->Point2.Y - Line->Point1.Y; @@ -473,7 +473,7 @@ */ pcb_bool IsArcInPolygon(ArcTypePtr Arc, PolygonTypePtr Polygon) { - BoxTypePtr Box = (BoxType *) Arc; + pcb_box_t *Box = (pcb_box_t *) Arc; /* arcs with clearance never touch polys */ if (TEST_FLAG(PCB_FLAG_CLEARPOLY, Polygon) && TEST_FLAG(PCB_FLAG_CLEARLINE, Arc)) @@ -502,7 +502,7 @@ */ pcb_bool IsLineInPolygon(LineTypePtr Line, PolygonTypePtr Polygon) { - BoxTypePtr Box = (BoxType *) Line; + pcb_box_t *Box = (pcb_box_t *) Line; POLYAREA *lp; /* lines with clearance never touch polygons */ @@ -609,7 +609,7 @@ return LineArcIntersect((LineTypePtr) (Pad), (Arc)); } -pcb_bool BoxBoxIntersection(BoxTypePtr b1, BoxTypePtr b2) +pcb_bool BoxBoxIntersection(pcb_box_t *b1, pcb_box_t *b2) { if (b2->X2 < b1->X1 || b2->X1 > b1->X2) return pcb_false; @@ -626,7 +626,7 @@ static inline pcb_bool PV_TOUCH_PV(PinTypePtr PV1, PinTypePtr PV2) { double t1, t2; - BoxType b1, b2; + pcb_box_t b1, b2; int shape1, shape2; shape1 = GET_SQUARE(PV1); Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 4760) +++ trunk/src/find_lookup.c (revision 4761) @@ -30,11 +30,11 @@ static inline r_dir_t r_search_pt(rtree_t * rtree, const PointType * pt, int radius, - r_dir_t (*region_in_search) (const BoxType * region, void *cl), - r_dir_t (*rectangle_in_region) (const BoxType * box, void *cl), void *closure, + r_dir_t (*region_in_search) (const pcb_box_t * region, void *cl), + r_dir_t (*rectangle_in_region) (const pcb_box_t * box, void *cl), void *closure, int *num_found) { - BoxType box; + pcb_box_t box; box.X1 = pt->X - radius; box.X2 = pt->X + radius; @@ -292,7 +292,7 @@ jmp_buf env; }; -static r_dir_t LOCtoPVline_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPVline_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct pv_info *i = (struct pv_info *) cl; @@ -304,7 +304,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPVarc_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPVarc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct pv_info *i = (struct pv_info *) cl; @@ -316,7 +316,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPVpad_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPVpad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct pv_info *i = (struct pv_info *) cl; @@ -328,7 +328,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPVrat_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPVrat_callback(const pcb_box_t * b, void *cl) { RatTypePtr rat = (RatTypePtr) b; struct pv_info *i = (struct pv_info *) cl; @@ -338,7 +338,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPVpoly_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPVpoly_callback(const pcb_box_t * b, void *cl) { PolygonTypePtr polygon = (PolygonTypePtr) b; struct pv_info *i = (struct pv_info *) cl; @@ -392,7 +392,7 @@ /* check pads */ if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, (BoxType *) & info.pv, NULL, LOCtoPVpad_callback, &info, NULL); + r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVpad_callback, &info, NULL); else return pcb_true; @@ -403,17 +403,17 @@ info.layer = layer; /* add touching lines */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (BoxType *) & info.pv, NULL, LOCtoPVline_callback, &info, NULL); + r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVline_callback, &info, NULL); else return pcb_true; /* add touching arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (BoxType *) & info.pv, NULL, LOCtoPVarc_callback, &info, NULL); + r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVarc_callback, &info, NULL); else return pcb_true; /* check all polygons */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->polygon_tree, (BoxType *) & info.pv, NULL, LOCtoPVpoly_callback, &info, NULL); + r_search(LAYER_PTR(layer)->polygon_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVpoly_callback, &info, NULL); else return pcb_true; } @@ -420,7 +420,7 @@ /* Check for rat-lines that may intersect the PV */ if (AndRats) { if (setjmp(info.env) == 0) - r_search(PCB->Data->rat_tree, (BoxType *) & info.pv, NULL, LOCtoPVrat_callback, &info, NULL); + r_search(PCB->Data->rat_tree, (pcb_box_t *) & info.pv, NULL, LOCtoPVrat_callback, &info, NULL); else return pcb_true; } @@ -529,7 +529,7 @@ return (pcb_false); } -static r_dir_t pv_pv_callback(const BoxType * b, void *cl) +static r_dir_t pv_pv_callback(const pcb_box_t * b, void *cl) { PinTypePtr pin = (PinTypePtr) b; struct pv_info *i = (struct pv_info *) cl; @@ -585,11 +585,11 @@ EXPAND_BOUNDS(&info.pv); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (BoxType *) & info.pv, NULL, pv_pv_callback, &info, NULL); + r_search(PCB->Data->via_tree, (pcb_box_t *) & info.pv, NULL, pv_pv_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (BoxType *) & info.pv, NULL, pv_pv_callback, &info, NULL); + r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.pv, NULL, pv_pv_callback, &info, NULL); else return pcb_true; PVList.Location++; @@ -608,7 +608,7 @@ jmp_buf env; }; -static r_dir_t pv_line_callback(const BoxType * b, void *cl) +static r_dir_t pv_line_callback(const pcb_box_t * b, void *cl) { PinTypePtr pv = (PinTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -625,7 +625,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t pv_pad_callback(const BoxType * b, void *cl) +static r_dir_t pv_pad_callback(const pcb_box_t * b, void *cl) { PinTypePtr pv = (PinTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -642,7 +642,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t pv_arc_callback(const BoxType * b, void *cl) +static r_dir_t pv_arc_callback(const pcb_box_t * b, void *cl) { PinTypePtr pv = (PinTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -659,7 +659,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t pv_poly_callback(const BoxType * b, void *cl) +static r_dir_t pv_poly_callback(const pcb_box_t * b, void *cl) { PinTypePtr pv = (PinTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -691,7 +691,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t pv_rat_callback(const BoxType * b, void *cl) +static r_dir_t pv_rat_callback(const pcb_box_t * b, void *cl) { PinTypePtr pv = (PinTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -728,11 +728,11 @@ info.line = *(LINELIST_ENTRY(layer, LineList[layer].Location)); EXPAND_BOUNDS(&info.line); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (BoxType *) & info.line, NULL, pv_line_callback, &info, NULL); + r_search(PCB->Data->via_tree, (pcb_box_t *) & info.line, NULL, pv_line_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (BoxType *) & info.line, NULL, pv_line_callback, &info, NULL); + r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.line, NULL, pv_line_callback, &info, NULL); else return pcb_true; LineList[layer].Location++; @@ -743,11 +743,11 @@ info.arc = *(ARCLIST_ENTRY(layer, ArcList[layer].Location)); EXPAND_BOUNDS(&info.arc); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (BoxType *) & info.arc, NULL, pv_arc_callback, &info, NULL); + r_search(PCB->Data->via_tree, (pcb_box_t *) & info.arc, NULL, pv_arc_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (BoxType *) & info.arc, NULL, pv_arc_callback, &info, NULL); + r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.arc, NULL, pv_arc_callback, &info, NULL); else return pcb_true; ArcList[layer].Location++; @@ -759,11 +759,11 @@ info.polygon = *(POLYGONLIST_ENTRY(layer, PolygonList[layer].Location)); EXPAND_BOUNDS(&info.polygon); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (BoxType *) & info.polygon, NULL, pv_poly_callback, &info, NULL); + r_search(PCB->Data->via_tree, (pcb_box_t *) & info.polygon, NULL, pv_poly_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (BoxType *) & info.polygon, NULL, pv_poly_callback, &info, NULL); + r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.polygon, NULL, pv_poly_callback, &info, NULL); else return pcb_true; PolygonList[layer].Location++; @@ -785,11 +785,11 @@ info.pad = *(PADLIST_ENTRY(layer, PadList[layer].Location)); EXPAND_BOUNDS(&info.pad); if (setjmp(info.env) == 0) - r_search(PCB->Data->via_tree, (BoxType *) & info.pad, NULL, pv_pad_callback, &info, NULL); + r_search(PCB->Data->via_tree, (pcb_box_t *) & info.pad, NULL, pv_pad_callback, &info, NULL); else return pcb_true; if (setjmp(info.env) == 0) - r_search(PCB->Data->pin_tree, (BoxType *) & info.pad, NULL, pv_pad_callback, &info, NULL); + r_search(PCB->Data->pin_tree, (pcb_box_t *) & info.pad, NULL, pv_pad_callback, &info, NULL); else return pcb_true; PadList[layer].Location++; @@ -815,7 +815,7 @@ return (pcb_false); } -r_dir_t pv_touch_callback(const BoxType * b, void *cl) +r_dir_t pv_touch_callback(const pcb_box_t * b, void *cl) { PinTypePtr pin = (PinTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -825,7 +825,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoArcLine_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoArcLine_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -837,7 +837,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoArcArc_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoArcArc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -851,7 +851,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoArcPad_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoArcPad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -917,7 +917,7 @@ return (pcb_false); } -static r_dir_t LOCtoLineLine_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoLineLine_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -929,7 +929,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoLineArc_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoLineArc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -943,7 +943,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoLineRat_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoLineRat_callback(const pcb_box_t * b, void *cl) { RatTypePtr rat = (RatTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -963,7 +963,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoLinePad_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoLinePad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1006,12 +1006,12 @@ info.layer = layer; /* add lines */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (BoxType *) & info.line, NULL, LOCtoLineLine_callback, &info, NULL); + r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.line, NULL, LOCtoLineLine_callback, &info, NULL); else return pcb_true; /* add arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (BoxType *) & info.line, NULL, LOCtoLineArc_callback, &info, NULL); + r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.line, NULL, LOCtoLineArc_callback, &info, NULL); else return pcb_true; /* now check all polygons */ @@ -1045,7 +1045,7 @@ jmp_buf env; }; -static r_dir_t LOCtoRat_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoRat_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct rat_info *i = (struct rat_info *) cl; @@ -1059,7 +1059,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t PolygonToRat_callback(const BoxType * b, void *cl) +static r_dir_t PolygonToRat_callback(const pcb_box_t * b, void *cl) { PolygonTypePtr polygon = (PolygonTypePtr) b; struct rat_info *i = (struct rat_info *) cl; @@ -1073,7 +1073,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPad_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct rat_info *i = (struct rat_info *) cl; @@ -1133,7 +1133,7 @@ return (pcb_false); } -static r_dir_t LOCtoPadLine_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPadLine_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1145,7 +1145,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPadArc_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPadArc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1159,7 +1159,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPadPoly_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPadPoly_callback(const pcb_box_t * b, void *cl) { PolygonTypePtr polygon = (PolygonTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1172,7 +1172,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPadRat_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPadRat_callback(const pcb_box_t * b, void *cl) { RatTypePtr rat = (RatTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1198,7 +1198,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPadPad_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPadPad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1300,7 +1300,7 @@ /* handle special 'pad' layers */ info.layer = layer - max_copper_layer; if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, (BoxType *) & info.pad, NULL, LOCtoPadPad_callback, &info, NULL); + r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.pad, NULL, LOCtoPadPad_callback, &info, NULL); else return pcb_true; } @@ -1309,7 +1309,7 @@ return retv; } -static r_dir_t LOCtoPolyLine_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPolyLine_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1321,7 +1321,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPolyArc_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPolyArc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1335,7 +1335,7 @@ return 0; } -static r_dir_t LOCtoPolyPad_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPolyPad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1348,7 +1348,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t LOCtoPolyRat_callback(const BoxType * b, void *cl) +static r_dir_t LOCtoPolyRat_callback(const pcb_box_t * b, void *cl) { RatTypePtr rat = (RatTypePtr) b; struct lo_info *i = (struct lo_info *) cl; @@ -1382,7 +1382,7 @@ info.layer = LayerGroup; /* check rats */ if (setjmp(info.env) == 0) - r_search(PCB->Data->rat_tree, (BoxType *) & info.polygon, NULL, LOCtoPolyRat_callback, &info, NULL); + r_search(PCB->Data->rat_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyRat_callback, &info, NULL); else return pcb_true; /* loop over all layers of the group */ @@ -1407,12 +1407,12 @@ info.layer = layer; /* check all lines */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->line_tree, (BoxType *) & info.polygon, NULL, LOCtoPolyLine_callback, &info, NULL); + r_search(LAYER_PTR(layer)->line_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyLine_callback, &info, NULL); else return pcb_true; /* check all arcs */ if (setjmp(info.env) == 0) - r_search(LAYER_PTR(layer)->arc_tree, (BoxType *) & info.polygon, NULL, LOCtoPolyArc_callback, &info, NULL); + r_search(LAYER_PTR(layer)->arc_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyArc_callback, &info, NULL); else return pcb_true; } @@ -1419,7 +1419,7 @@ else { info.layer = layer - max_copper_layer; if (setjmp(info.env) == 0) - r_search(PCB->Data->pad_tree, (BoxType *) & info.polygon, NULL, LOCtoPolyPad_callback, &info, NULL); + r_search(PCB->Data->pad_tree, (pcb_box_t *) & info.polygon, NULL, LOCtoPolyPad_callback, &info, NULL); else return pcb_true; } Index: trunk/src/font.h =================================================================== --- trunk/src/font.h (revision 4760) +++ trunk/src/font.h (revision 4761) @@ -43,7 +43,7 @@ struct pcb_font_s { /* complete set of symbols */ Coord MaxHeight, MaxWidth; /* maximum cell width and height */ - BoxType DefaultSymbol; /* the default symbol is a filled box */ + pcb_box_t DefaultSymbol; /* the default symbol is a filled box */ SymbolType Symbol[MAX_FONTPOSITION + 1]; pcb_bool Valid; }; Index: trunk/src/global_typedefs.h =================================================================== --- trunk/src/global_typedefs.h (revision 4760) +++ trunk/src/global_typedefs.h (revision 4761) @@ -31,7 +31,7 @@ typedef struct pcb_buffer_s pcb_buffer_t; typedef struct pcb_net_s pcb_net_t; typedef struct pcb_connection_s pcb_connection_t; -typedef struct pcb_box_s BoxType, *BoxTypePtr; +typedef struct pcb_box_s pcb_box_t; typedef struct pcb_boxlist_s BoxListType, *BoxListTypePtr; typedef struct pcb_font_s FontType, *FontTypePtr; typedef struct pcb_line_s LineType, *LineTypePtr; Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 4760) +++ trunk/src/hid.h (revision 4761) @@ -284,8 +284,8 @@ void (*draw_rect) (hidGC gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_); void (*fill_circle) (hidGC gc_, Coord cx_, Coord cy_, Coord radius_); void (*fill_polygon) (hidGC gc_, int n_coords_, Coord * x_, Coord * y_); - void (*fill_pcb_polygon) (hidGC gc_, PolygonType * poly, const BoxType * clip_box); - void (*thindraw_pcb_polygon) (hidGC gc_, PolygonType * poly, const BoxType * clip_box); + void (*fill_pcb_polygon) (hidGC gc_, PolygonType * poly, const pcb_box_t * clip_box); + void (*thindraw_pcb_polygon) (hidGC gc_, PolygonType * poly, const pcb_box_t * clip_box); void (*fill_pcb_pad) (hidGC gc_, PadType * pad, pcb_bool clip, pcb_bool mask); void (*thindraw_pcb_pad) (hidGC gc_, PadType * pad, pcb_bool clip, pcb_bool mask); void (*fill_pcb_pv) (hidGC fg_gc, hidGC bg_gc, PinType * pv, pcb_bool drawHole, pcb_bool mask); @@ -550,8 +550,8 @@ Do *not* assume that the hid that is passed is the GUI hid. This callback is also used for printing and exporting. */ -struct BoxType; -void hid_expose_callback(HID * hid_, BoxType *region_, void *item_); +struct pcb_box_t; +void hid_expose_callback(HID * hid_, pcb_box_t *region_, void *item_); /* This is initially set to a "no-gui" gui, and later reset by main. hid_expose_callback also temporarily set it for drawing. */ Index: trunk/src/hid_draw_helpers.c =================================================================== --- trunk/src/hid_draw_helpers.c (revision 4760) +++ trunk/src/hid_draw_helpers.c (revision 4761) @@ -72,7 +72,7 @@ poly_FreeContours(&local_pl); } -static void fill_clipped_contour(hidGC gc, PLINE * pl, const BoxType * clip_box) +static void fill_clipped_contour(hidGC gc, PLINE * pl, const pcb_box_t * clip_box) { PLINE *pl_copy; POLYAREA *clip_poly; @@ -102,7 +102,7 @@ * lets compute the complete no-holes polygon. */ #define BOUNDS_INSIDE_CLIP_THRESHOLD 0.5 -static int should_compute_no_holes(PolygonType * poly, const BoxType * clip_box) +static int should_compute_no_holes(PolygonType * poly, const pcb_box_t * clip_box) { Coord x1, x2, y1, y2; double poly_bounding_area; @@ -134,7 +134,7 @@ #undef BOUNDS_INSIDE_CLIP_THRESHOLD -void common_fill_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box) +void common_fill_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box) { if (!poly->NoHolesValid) { /* If enough of the polygon is on-screen, compute the entire @@ -174,7 +174,7 @@ return 0; } -void common_thindraw_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box) +void common_thindraw_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box) { thindraw_contour(gc, poly->Clipped->contours); PolygonHoles(poly, clip_box, thindraw_hole_cb, gc); Index: trunk/src/hid_draw_helpers.h =================================================================== --- trunk/src/hid_draw_helpers.h (revision 4760) +++ trunk/src/hid_draw_helpers.h (revision 4761) @@ -1,7 +1,7 @@ #ifndef PCB_HID_DRAW_HELPERS_H #define PCB_HID_DRAW_HELPERS_H -void common_fill_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box); -void common_thindraw_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box); +void common_fill_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box); +void common_thindraw_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box); void common_fill_pcb_pad(hidGC gc, PadType * pad, pcb_bool clear, pcb_bool mask); void common_thindraw_pcb_pad(hidGC gc, PadType * pad, pcb_bool clear, pcb_bool mask); void common_fill_pcb_pv(hidGC gc, PinType * pv, pcb_bool drawHole, pcb_bool mask); Index: trunk/src/hid_extents.c =================================================================== --- trunk/src/hid_extents.c (revision 4760) +++ trunk/src/hid_extents.c (revision 4761) @@ -8,7 +8,7 @@ #define MAXINT (((unsigned int)(~0))>>1) #endif -static BoxType box; +static pcb_box_t box; typedef struct hid_gc_struct { int width; @@ -157,9 +157,9 @@ initialised = pcb_true; } -BoxType *hid_get_extents(void *item) +pcb_box_t *hid_get_extents(void *item) { - BoxType region; + pcb_box_t region; /* As this isn't a real "HID", we need to ensure we are initialised. */ hid_extents_init(); Index: trunk/src/hid_extents.h =================================================================== --- trunk/src/hid_extents.h (revision 4760) +++ trunk/src/hid_extents.h (revision 4761) @@ -6,7 +6,7 @@ /* Convenience function that calls the expose callback for the item, and returns the extents of what was drawn. */ -BoxType *hid_get_extents(void *item); +pcb_box_t *hid_get_extents(void *item); #endif Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 4760) +++ trunk/src/hid_nogui.c (revision 4761) @@ -118,7 +118,7 @@ CRASH("fill_polygon"); } -static void nogui_fill_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box) +static void nogui_fill_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box) { CRASH("fill_pcb_polygon"); } Index: trunk/src/intersect.c =================================================================== --- trunk/src/intersect.c (revision 4760) +++ trunk/src/intersect.c (revision 4761) @@ -179,7 +179,7 @@ */ double ComputeUnionArea(BoxListTypePtr boxlist) { - BoxTypePtr *rectLeft, *rectRight; + pcb_box_t **rectLeft, **rectRight; pcb_cardinal_t i, j; LocationList yCoords; SegmentTree segtree; @@ -194,8 +194,8 @@ segtree = createSegmentTree(yCoords.p, yCoords.size); free(yCoords.p); /* create sorted list of left and right X coordinates of rectangles */ - rectLeft = (BoxTypePtr *) calloc(boxlist->BoxN, sizeof(*rectLeft)); - rectRight = (BoxTypePtr *) calloc(boxlist->BoxN, sizeof(*rectRight)); + rectLeft = (pcb_box_t **) calloc(boxlist->BoxN, sizeof(*rectLeft)); + rectRight = (pcb_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); @@ -211,7 +211,7 @@ /* i will step through rectLeft, j will through rectRight */ if (i == boxlist->BoxN || rectRight[j]->X2 < rectLeft[i]->X1) { /* right edge of rectangle */ - BoxTypePtr b = rectRight[j++]; + pcb_box_t *b = rectRight[j++]; /* check lastX */ if (b->X2 != lastX) { assert(lastX < b->X2); @@ -223,7 +223,7 @@ } else { /* left edge of rectangle */ - BoxTypePtr b = rectLeft[i++]; + pcb_box_t *b = rectLeft[i++]; /* check lastX */ if (b->X1 != lastX) { assert(lastX < b->X1); @@ -242,13 +242,13 @@ static int compareleft(const void *ptr1, const void *ptr2) { - BoxTypePtr *b1 = (BoxTypePtr *) ptr1, *b2 = (BoxTypePtr *) ptr2; + pcb_box_t **b1 = (pcb_box_t **) ptr1, **b2 = (pcb_box_t **) ptr2; return (*b1)->X1 - (*b2)->X1; } static int compareright(const void *ptr1, const void *ptr2) { - BoxTypePtr *b1 = (BoxTypePtr *) ptr1, *b2 = (BoxTypePtr *) ptr2; + pcb_box_t **b1 = (pcb_box_t **) ptr1, **b2 = (pcb_box_t **) ptr2; return (*b1)->X2 - (*b2)->X2; } Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 4760) +++ trunk/src/obj_arc.c (revision 4761) @@ -130,9 +130,9 @@ close_box(&Arc->BoundingBox); } -BoxTypePtr GetArcEnds(ArcTypePtr Arc) +pcb_box_t *GetArcEnds(ArcTypePtr Arc) { - static BoxType box; + static pcb_box_t box; box.X1 = Arc->X - Arc->Width * cos(Arc->StartAngle * PCB_M180); box.Y1 = Arc->Y + Arc->Height * sin(Arc->StartAngle * PCB_M180); box.X2 = Arc->X - Arc->Width * cos((Arc->StartAngle + Arc->Delta) * PCB_M180); @@ -148,12 +148,12 @@ new_sa = 0; } RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); AddObjectToChangeAnglesUndoList(PCB_TYPE_ARC, a, a, a); a->StartAngle = new_sa; a->Delta = new_da; SetArcBoundingBox(a); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); } @@ -161,12 +161,12 @@ void ChangeArcRadii(pcb_layer_t *Layer, ArcTypePtr a, Coord new_width, Coord new_height) { RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); AddObjectToChangeRadiiUndoList(PCB_TYPE_ARC, a, a, a); a->Width = new_width; a->Height = new_height; SetArcBoundingBox(a); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); } @@ -206,7 +206,7 @@ SetArcBoundingBox(Arc); if (!Layer->arc_tree) Layer->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); } @@ -236,7 +236,7 @@ pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; RestoreToPolygon(ctx->buffer.src, PCB_TYPE_ARC, layer, arc); - r_delete_entry(layer->arc_tree, (BoxType *) arc); + r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); arclist_remove(arc); arclist_append(&lay->Arc, arc); @@ -245,7 +245,7 @@ if (!lay->arc_tree) lay->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->arc_tree, (BoxType *) arc, 0); + r_insert_entry(lay->arc_tree, (pcb_box_t *) arc, 0); ClearFromPolygon(ctx->buffer.dst, PCB_TYPE_ARC, lay, arc); return (arc); } @@ -260,11 +260,11 @@ if (value <= MAX_LINESIZE && value >= MIN_LINESIZE && value != Arc->Thickness) { AddObjectToSizeUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); Arc->Thickness = value; SetArcBoundingBox(Arc); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -283,7 +283,7 @@ if (value != Arc->Clearance) { AddObjectToClearSizeUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); Arc->Clearance = value; if (Arc->Clearance == 0) { @@ -291,7 +291,7 @@ Arc->Clearance = PCB_MIL_TO_COORD(10); } SetArcBoundingBox(Arc); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -324,11 +324,11 @@ if (value != *dst) { AddObjectToChangeRadiiUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); *dst = value; SetArcBoundingBox(Arc); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -364,11 +364,11 @@ if (value != *dst) { AddObjectToChangeAnglesUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); *dst = value; SetArcBoundingBox(Arc); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); DrawArc(Layer, Arc); return (Arc); @@ -431,7 +431,7 @@ void *MoveArc(pcb_opctx_t *ctx, pcb_layer_t *Layer, ArcTypePtr Arc) { RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); - r_delete_entry(Layer->arc_tree, (BoxType *) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); if (Layer->On) { EraseArc(Arc); MOVE_ARC_LOWLEVEL(Arc, ctx->move.dx, ctx->move.dy); @@ -441,7 +441,7 @@ else { MOVE_ARC_LOWLEVEL(Arc, ctx->move.dx, ctx->move.dy); } - r_insert_entry(Layer->arc_tree, (BoxType *) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); return (Arc); } @@ -449,7 +449,7 @@ /* moves an arc between layers; lowlevel routines */ void *MoveArcToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, ArcType * arc, pcb_layer_t * Destination) { - r_delete_entry(Source->arc_tree, (BoxType *) arc); + r_delete_entry(Source->arc_tree, (pcb_box_t *) arc); arclist_remove(arc); arclist_append(&Destination->Arc, arc); @@ -456,7 +456,7 @@ if (!Destination->arc_tree) Destination->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->arc_tree, (BoxType *) arc, 0); + r_insert_entry(Destination->arc_tree, (pcb_box_t *) arc, 0); return arc; } @@ -491,7 +491,7 @@ /* destroys an arc from a layer */ void *DestroyArc(pcb_opctx_t *ctx, pcb_layer_t *Layer, ArcTypePtr Arc) { - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); RemoveFreeArc(Arc); @@ -544,9 +544,9 @@ void *RotateArc(pcb_opctx_t *ctx, pcb_layer_t *Layer, ArcTypePtr Arc) { EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); RotateArcLowLevel(Arc, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); DrawArc(Layer, Arc); Draw(); return (Arc); @@ -592,7 +592,7 @@ _draw_arc(arc); } -r_dir_t draw_arc_callback(const BoxType * b, void *cl) +r_dir_t draw_arc_callback(const pcb_box_t * b, void *cl) { draw_arc((pcb_layer_t *) cl, (ArcTypePtr) b); return R_DIR_FOUND_CONTINUE; Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 4760) +++ trunk/src/obj_arc.h (revision 4761) @@ -48,7 +48,7 @@ /*** Utility ***/ void SetArcBoundingBox(ArcTypePtr Arc); -BoxTypePtr GetArcEnds(ArcTypePtr Arc); +pcb_box_t *GetArcEnds(ArcTypePtr Arc); void ChangeArcAngles(pcb_layer_t *Layer, ArcTypePtr a, Angle new_sa, Angle new_da); void ChangeArcRadii(pcb_layer_t *Layer, ArcTypePtr a, Coord new_width, Coord new_height); void *RemoveArc(pcb_layer_t *Layer, ArcTypePtr Arc); Index: trunk/src/obj_arc_draw.h =================================================================== --- trunk/src/obj_arc_draw.h (revision 4760) +++ trunk/src/obj_arc_draw.h (revision 4761) @@ -28,7 +28,7 @@ /* Include rtree.h for this */ #ifdef PCB_RTREE_H -r_dir_t draw_arc_callback(const BoxType * b, void *cl); +r_dir_t draw_arc_callback(const pcb_box_t * b, void *cl); #endif void _draw_arc(ArcType * arc); Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 4760) +++ trunk/src/obj_common.c (revision 4761) @@ -37,7 +37,7 @@ /* returns a pointer to an objects bounding box; * data is valid until the routine is called again */ -BoxTypePtr GetObjectBoundingBox(int Type, void *Ptr1, void *Ptr2, void *Ptr3) +pcb_box_t *GetObjectBoundingBox(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { switch (Type) { case PCB_TYPE_LINE: @@ -47,16 +47,16 @@ case PCB_TYPE_PAD: case PCB_TYPE_PIN: case PCB_TYPE_ELEMENT_NAME: - return (BoxType *) Ptr2; + return (pcb_box_t *) Ptr2; case PCB_TYPE_VIA: case PCB_TYPE_ELEMENT: - return (BoxType *) Ptr1; + return (pcb_box_t *) Ptr1; case PCB_TYPE_POLYGON_POINT: case PCB_TYPE_LINE_POINT: - return (BoxType *) Ptr3; + return (pcb_box_t *) Ptr3; default: Message(PCB_MSG_DEFAULT, "Request for bounding box of unsupported type %d\n", Type); - return (BoxType *) Ptr2; + return (pcb_box_t *) Ptr2; } } Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 4760) +++ trunk/src/obj_common.h (revision 4761) @@ -35,7 +35,7 @@ /* point and box type - they are so common everything depends on them */ struct pcb_point_s { /* a line/polygon point */ - Coord X, Y, X2, Y2; /* so Point type can be cast as BoxType */ + Coord X, Y, X2, Y2; /* so Point type can be cast as pcb_box_t */ long int ID; }; @@ -44,7 +44,7 @@ Coord X2, Y2; /* and lower right corner */ }; -BoxTypePtr GetObjectBoundingBox(int Type, void *Ptr1, void *Ptr2, void *Ptr3); +pcb_box_t *GetObjectBoundingBox(int Type, void *Ptr1, void *Ptr2, void *Ptr3); /* memset object to 0, but keep the link field */ #define reset_obj_mem(type, obj) \ @@ -75,7 +75,7 @@ exists as an object on the pcb, MUST be defined using this as the first fields, either directly or through ANYLINEFIELDS. */ #define ANYOBJECTFIELDS \ - BoxType BoundingBox; \ + pcb_box_t BoundingBox; \ long int ID; \ FlagType Flags; \ AttributeListType Attributes Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4760) +++ trunk/src/obj_elem.c (revision 4761) @@ -402,7 +402,7 @@ ELEMENTTEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(Data->name_tree[n], (BoxType *) text); + r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); RotateTextLowLevel(text, X, Y, Number); } END_LOOP; @@ -418,7 +418,7 @@ { /* pre-delete the pins from the pin-tree before their coordinates change */ if (Data) - r_delete_entry(Data->pin_tree, (BoxType *) pin); + r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); RestoreToPolygon(Data, PCB_TYPE_PIN, Element, pin); free_rotate(&pin->X, &pin->Y, X, Y, cosa, sina); SetPinBoundingBox(pin); @@ -428,7 +428,7 @@ { /* pre-delete the pads before their coordinates change */ if (Data) - r_delete_entry(Data->pad_tree, (BoxType *) pad); + r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); RestoreToPolygon(Data, PCB_TYPE_PAD, Element, pad); free_rotate(&pad->Point1.X, &pad->Point1.Y, X, Y, cosa, sina); free_rotate(&pad->Point2.X, &pad->Point2.Y, X, Y, cosa, sina); @@ -718,20 +718,20 @@ /* sets the bounding box of an elements */ void SetElementBoundingBox(pcb_data_t *Data, ElementTypePtr Element, FontTypePtr Font) { - BoxTypePtr box, vbox; + pcb_box_t *box, *vbox; if (Data && Data->element_tree) - r_delete_entry(Data->element_tree, (BoxType *) Element); + r_delete_entry(Data->element_tree, (pcb_box_t *) Element); /* first update the text objects */ ELEMENTTEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(Data->name_tree[n], (BoxType *) text); + r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); SetTextBoundingBox(Font, text); if (Data && !Data->name_tree[n]) Data->name_tree[n] = r_create_tree(NULL, 0, 0); if (Data) - r_insert_entry(Data->name_tree[n], (BoxType *) text, 0); + r_insert_entry(Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; @@ -768,12 +768,12 @@ PIN_LOOP(Element); { if (Data && Data->pin_tree) - r_delete_entry(Data->pin_tree, (BoxType *) pin); + r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); SetPinBoundingBox(pin); if (Data) { if (!Data->pin_tree) Data->pin_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Data->pin_tree, (BoxType *) pin, 0); + r_insert_entry(Data->pin_tree, (pcb_box_t *) pin, 0); } MAKEMIN(box->X1, pin->BoundingBox.X1); MAKEMIN(box->Y1, pin->BoundingBox.Y1); @@ -788,12 +788,12 @@ PAD_LOOP(Element); { if (Data && Data->pad_tree) - r_delete_entry(Data->pad_tree, (BoxType *) pad); + r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); SetPadBoundingBox(pad); if (Data) { if (!Data->pad_tree) Data->pad_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Data->pad_tree, (BoxType *) pad, 0); + r_insert_entry(Data->pad_tree, (pcb_box_t *) pad, 0); } MAKEMIN(box->X1, pad->BoundingBox.X1); MAKEMIN(box->Y1, pad->BoundingBox.Y1); @@ -904,20 +904,20 @@ void r_delete_element(pcb_data_t * data, ElementType * element) { - r_delete_entry(data->element_tree, (BoxType *) element); + r_delete_entry(data->element_tree, (pcb_box_t *) element); PIN_LOOP(element); { - r_delete_entry(data->pin_tree, (BoxType *) pin); + r_delete_entry(data->pin_tree, (pcb_box_t *) pin); } END_LOOP; PAD_LOOP(element); { - r_delete_entry(data->pad_tree, (BoxType *) pad); + r_delete_entry(data->pad_tree, (pcb_box_t *) pad); } END_LOOP; ELEMENTTEXT_LOOP(element); { - r_delete_entry(data->name_tree[n], (BoxType *) text); + r_delete_entry(data->name_tree[n], (pcb_box_t *) text); } END_LOOP; } @@ -994,7 +994,7 @@ void MoveElementLowLevel(pcb_data_t *Data, ElementTypePtr Element, Coord DX, Coord DY) { if (Data) - r_delete_entry(Data->element_tree, (BoxType *) Element); + r_delete_entry(Data->element_tree, (pcb_box_t *) Element); ELEMENTLINE_LOOP(Element); { MOVE_LINE_LOWLEVEL(line, DX, DY); @@ -1003,12 +1003,12 @@ PIN_LOOP(Element); { if (Data) { - r_delete_entry(Data->pin_tree, (BoxType *) pin); + r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); RestoreToPolygon(Data, PCB_TYPE_PIN, Element, pin); } MOVE_PIN_LOWLEVEL(pin, DX, DY); if (Data) { - r_insert_entry(Data->pin_tree, (BoxType *) pin, 0); + r_insert_entry(Data->pin_tree, (pcb_box_t *) pin, 0); ClearFromPolygon(Data, PCB_TYPE_PIN, Element, pin); } } @@ -1016,12 +1016,12 @@ PAD_LOOP(Element); { if (Data) { - r_delete_entry(Data->pad_tree, (BoxType *) pad); + r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); RestoreToPolygon(Data, PCB_TYPE_PAD, Element, pad); } MOVE_PAD_LOWLEVEL(pad, DX, DY); if (Data) { - r_insert_entry(Data->pad_tree, (BoxType *) pad, 0); + r_insert_entry(Data->pad_tree, (pcb_box_t *) pad, 0); ClearFromPolygon(Data, PCB_TYPE_PAD, Element, pad); } } @@ -1034,10 +1034,10 @@ ELEMENTTEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(PCB->Data->name_tree[n], (BoxType *) text); + r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); MOVE_TEXT_LOWLEVEL(text, DX, DY); if (Data && Data->name_tree[n]) - r_insert_entry(PCB->Data->name_tree[n], (BoxType *) text, 0); + r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; MOVE_BOX_LOWLEVEL(&Element->BoundingBox, DX, DY); @@ -1044,7 +1044,7 @@ MOVE_BOX_LOWLEVEL(&Element->VBox, DX, DY); MOVE(Element->MarkX, Element->MarkY, DX, DY); if (Data) - r_insert_entry(Data->element_tree, (BoxType *) Element, 0); + r_insert_entry(Data->element_tree, (pcb_box_t *) Element, 0); } void *RemoveElement(ElementTypePtr Element) @@ -1069,7 +1069,7 @@ ELEMENTTEXT_LOOP(Element); { if (Data && Data->name_tree[n]) - r_delete_entry(Data->name_tree[n], (BoxType *) text); + r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); RotateTextLowLevel(text, X, Y, Number); } END_LOOP; @@ -1082,7 +1082,7 @@ { /* pre-delete the pins from the pin-tree before their coordinates change */ if (Data) - r_delete_entry(Data->pin_tree, (BoxType *) pin); + r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); RestoreToPolygon(Data, PCB_TYPE_PIN, Element, pin); ROTATE_PIN_LOWLEVEL(pin, X, Y, Number); } @@ -1091,7 +1091,7 @@ { /* pre-delete the pads before their coordinates change */ if (Data) - r_delete_entry(Data->pad_tree, (BoxType *) pad); + r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); RestoreToPolygon(Data, PCB_TYPE_PAD, Element, pad); ROTATE_PAD_LOWLEVEL(pad, X, Y, Number); } @@ -1355,10 +1355,10 @@ ELEMENTTEXT_LOOP(Element); { AddObjectToSizeUndoList(PCB_TYPE_ELEMENT_NAME, Element, text, text); - r_delete_entry(PCB->Data->name_tree[n], (BoxType *) text); + r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); text->Scale = value; SetTextBoundingBox(&PCB->Font, text); - r_insert_entry(PCB->Data->name_tree[n], (BoxType *) text, 0); + r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; DrawElementName(Element); @@ -1535,10 +1535,10 @@ ELEMENTTEXT_LOOP(Element); { if (PCB->Data->name_tree[n]) - r_delete_entry(PCB->Data->name_tree[n], (BoxType *) text); + r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); MOVE_TEXT_LOWLEVEL(text, ctx->move.dx, ctx->move.dy); if (PCB->Data->name_tree[n]) - r_insert_entry(PCB->Data->name_tree[n], (BoxType *) text, 0); + r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; DrawElementName(Element); @@ -1548,10 +1548,10 @@ ELEMENTTEXT_LOOP(Element); { if (PCB->Data->name_tree[n]) - r_delete_entry(PCB->Data->name_tree[n], (BoxType *) text); + r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); MOVE_TEXT_LOWLEVEL(text, ctx->move.dx, ctx->move.dy); if (PCB->Data->name_tree[n]) - r_insert_entry(PCB->Data->name_tree[n], (BoxType *) text, 0); + r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; } @@ -1588,11 +1588,11 @@ void *DestroyElement(pcb_opctx_t *ctx, ElementTypePtr Element) { if (ctx->remove.destroy_target->element_tree) - r_delete_entry(ctx->remove.destroy_target->element_tree, (BoxType *) Element); + r_delete_entry(ctx->remove.destroy_target->element_tree, (pcb_box_t *) Element); if (ctx->remove.destroy_target->pin_tree) { PIN_LOOP(Element); { - r_delete_entry(ctx->remove.destroy_target->pin_tree, (BoxType *) pin); + r_delete_entry(ctx->remove.destroy_target->pin_tree, (pcb_box_t *) pin); } END_LOOP; } @@ -1599,7 +1599,7 @@ if (ctx->remove.destroy_target->pad_tree) { PAD_LOOP(Element); { - r_delete_entry(ctx->remove.destroy_target->pad_tree, (BoxType *) pad); + r_delete_entry(ctx->remove.destroy_target->pad_tree, (pcb_box_t *) pad); } END_LOOP; } @@ -1606,7 +1606,7 @@ ELEMENTTEXT_LOOP(Element); { if (ctx->remove.destroy_target->name_tree[n]) - r_delete_entry(ctx->remove.destroy_target->name_tree[n], (BoxType *) text); + r_delete_entry(ctx->remove.destroy_target->name_tree[n], (pcb_box_t *) text); } END_LOOP; FreeElementMemory(Element); @@ -1647,9 +1647,9 @@ EraseElementName(Element); ELEMENTTEXT_LOOP(Element); { - r_delete_entry(PCB->Data->name_tree[n], (BoxType *) text); + r_delete_entry(PCB->Data->name_tree[n], (pcb_box_t *) text); RotateTextLowLevel(text, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); - r_insert_entry(PCB->Data->name_tree[n], (BoxType *) text, 0); + r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } END_LOOP; DrawElementName(Element); @@ -1680,7 +1680,7 @@ } -r_dir_t draw_element_name_callback(const BoxType * b, void *cl) +r_dir_t draw_element_name_callback(const pcb_box_t * b, void *cl) { TextTypePtr text = (TextTypePtr) b; ElementTypePtr element = (ElementTypePtr) text->Element; @@ -1742,7 +1742,7 @@ draw_element_pins_and_pads(element); } -r_dir_t draw_element_callback(const BoxType * b, void *cl) +r_dir_t draw_element_callback(const pcb_box_t * b, void *cl) { ElementTypePtr element = (ElementTypePtr) b; int *side = cl; @@ -1790,7 +1790,7 @@ } } -r_dir_t draw_element_mark_callback(const BoxType * b, void *cl) +r_dir_t draw_element_mark_callback(const pcb_box_t * b, void *cl) { ElementTypePtr element = (ElementTypePtr) b; Index: trunk/src/obj_elem.h =================================================================== --- trunk/src/obj_elem.h (revision 4760) +++ trunk/src/obj_elem.h (revision 4761) @@ -45,7 +45,7 @@ padlist_t Pad; linelist_t Line; arclist_t Arc; - BoxType VBox; + pcb_box_t VBox; gdl_elem_t link; }; Index: trunk/src/obj_elem_draw.h =================================================================== --- trunk/src/obj_elem_draw.h (revision 4760) +++ trunk/src/obj_elem_draw.h (revision 4761) @@ -28,9 +28,9 @@ /* Include rtree.h for these */ #ifdef PCB_RTREE_H -r_dir_t draw_element_name_callback(const BoxType * b, void *cl); -r_dir_t draw_element_mark_callback(const BoxType * b, void *cl); -r_dir_t draw_element_callback(const BoxType * b, void *cl); +r_dir_t draw_element_name_callback(const pcb_box_t * b, void *cl); +r_dir_t draw_element_mark_callback(const pcb_box_t * b, void *cl); +r_dir_t draw_element_callback(const pcb_box_t * b, void *cl); #endif void draw_element_package(ElementType * element); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 4760) +++ trunk/src/obj_line.c (revision 4761) @@ -78,7 +78,7 @@ jmp_buf env; }; -static r_dir_t line_callback(const BoxType * b, void *cl) +static r_dir_t line_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct line_info *i = (struct line_info *) cl; @@ -149,7 +149,7 @@ LineTypePtr CreateDrawnLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, FlagType Flags) { struct line_info info; - BoxType search; + pcb_box_t search; search.X1 = MIN(X1, X2); search.X2 = MAX(X1, X2); @@ -218,7 +218,7 @@ SetLineBoundingBox(Line); if (!Layer->line_tree) Layer->line_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->line_tree, (BoxTypePtr) Line, 0); + r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); } /* sets the bounding box of a line */ @@ -263,7 +263,7 @@ pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; RestoreToPolygon(ctx->buffer.src, PCB_TYPE_LINE, layer, line); - r_delete_entry(layer->line_tree, (BoxType *) line); + r_delete_entry(layer->line_tree, (pcb_box_t *) line); linelist_remove(line); linelist_append(&(lay->Line), line); @@ -272,7 +272,7 @@ if (!lay->line_tree) lay->line_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->line_tree, (BoxType *) line, 0); + r_insert_entry(lay->line_tree, (pcb_box_t *) line, 0); ClearFromPolygon(ctx->buffer.dst, PCB_TYPE_LINE, lay, line); return (line); } @@ -287,11 +287,11 @@ if (value <= MAX_LINESIZE && value >= MIN_LINESIZE && value != Line->Thickness) { AddObjectToSizeUndoList(PCB_TYPE_LINE, Layer, Line, Line); EraseLine(Line); - r_delete_entry(Layer->line_tree, (BoxTypePtr) Line); + r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); RestoreToPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); Line->Thickness = value; SetLineBoundingBox(Line); - r_insert_entry(Layer->line_tree, (BoxTypePtr) Line, 0); + r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); return (Line); @@ -311,7 +311,7 @@ AddObjectToClearSizeUndoList(PCB_TYPE_LINE, Layer, Line, Line); RestoreToPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); EraseLine(Line); - r_delete_entry(Layer->line_tree, (BoxTypePtr) Line); + r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); Line->Clearance = value; if (Line->Clearance == 0) { CLEAR_FLAG(PCB_FLAG_CLEARLINE, Line); @@ -318,7 +318,7 @@ Line->Clearance = PCB_MIL_TO_COORD(10); } SetLineBoundingBox(Line); - r_insert_entry(Layer->line_tree, (BoxTypePtr) Line, 0); + r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); return (Line); @@ -396,9 +396,9 @@ if (Layer->On) EraseLine(Line); RestoreToPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); - r_delete_entry(Layer->line_tree, (BoxType *) Line); + r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); MOVE_LINE_LOWLEVEL(Line, ctx->move.dx, ctx->move.dy); - r_insert_entry(Layer->line_tree, (BoxType *) Line, 0); + r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); if (Layer->On) { DrawLine(Layer, Line); @@ -444,7 +444,7 @@ /* moves a line between layers; lowlevel routines */ void *MoveLineToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, LineType * line, pcb_layer_t * Destination) { - r_delete_entry(Source->line_tree, (BoxType *) line); + r_delete_entry(Source->line_tree, (pcb_box_t *) line); linelist_remove(line); linelist_append(&(Destination->Line), line); @@ -451,7 +451,7 @@ if (!Destination->line_tree) Destination->line_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->line_tree, (BoxType *) line, 0); + r_insert_entry(Destination->line_tree, (pcb_box_t *) line, 0); return line; } @@ -463,7 +463,7 @@ jmp_buf env; }; -static r_dir_t moveline_callback(const BoxType * b, void *cl) +static r_dir_t moveline_callback(const pcb_box_t * b, void *cl) { struct via_info *i = (struct via_info *) cl; PinTypePtr via; @@ -480,7 +480,7 @@ void *MoveLineToLayer(pcb_opctx_t *ctx, pcb_layer_t * Layer, LineType * Line) { struct via_info info; - BoxType sb; + pcb_box_t sb; LineTypePtr newone; void *ptr1, *ptr2, *ptr3; @@ -540,7 +540,7 @@ /* destroys a line from a layer */ void *DestroyLine(pcb_opctx_t *ctx, pcb_layer_t *Layer, LineTypePtr Line) { - r_delete_entry(Layer->line_tree, (BoxTypePtr) Line); + r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); free(Line->Number); RemoveFreeLine(Line); @@ -553,7 +553,7 @@ LineTypePtr line; PointTypePtr point; }; -static r_dir_t remove_point(const BoxType * b, void *cl) +static r_dir_t remove_point(const pcb_box_t * b, void *cl) { LineType *line = (LineType *) b; struct rlp_info *info = (struct rlp_info *) cl; @@ -586,7 +586,7 @@ info.line = Line; info.point = Point; if (setjmp(info.env) == 0) { - r_search(Layer->line_tree, (const BoxType *) Point, NULL, remove_point, &info, NULL); + r_search(Layer->line_tree, (const pcb_box_t *) Point, NULL, remove_point, &info, NULL); return RemoveLine_op(ctx, Layer, Line); } MoveObject(PCB_TYPE_LINE_POINT, Layer, info.line, info.point, other.X - Point->X, other.Y - Point->Y); @@ -650,19 +650,19 @@ EraseLine(Line); if (Layer) { RestoreToPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); - r_delete_entry(Layer->line_tree, (BoxTypePtr) Line); + r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); } else - r_delete_entry(PCB->Data->rat_tree, (BoxTypePtr) Line); + r_delete_entry(PCB->Data->rat_tree, (pcb_box_t *) Line); RotatePointLowLevel(Point, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); SetLineBoundingBox(Line); if (Layer) { - r_insert_entry(Layer->line_tree, (BoxTypePtr) Line, 0); + r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); } else { - r_insert_entry(PCB->Data->rat_tree, (BoxTypePtr) Line, 0); + r_insert_entry(PCB->Data->rat_tree, (pcb_box_t *) Line, 0); DrawRat((RatTypePtr) Line); } Draw(); @@ -682,12 +682,12 @@ Y = Line->Point2.Y; AddObjectToMoveUndoList(PCB_TYPE_LINE_POINT, Layer, Line, &Line->Point2, ctx->insert.x - X, ctx->insert.y - Y); EraseLine(Line); - r_delete_entry(Layer->line_tree, (BoxTypePtr) Line); + r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); RestoreToPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); Line->Point2.X = ctx->insert.x; Line->Point2.Y = ctx->insert.y; SetLineBoundingBox(Line); - r_insert_entry(Layer->line_tree, (BoxTypePtr) Line, 0); + r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, Layer, Line); DrawLine(Layer, Line); /* we must create after playing with Line since creation may @@ -741,7 +741,7 @@ _draw_line(line); } -r_dir_t draw_line_callback(const BoxType * b, void *cl) +r_dir_t draw_line_callback(const pcb_box_t * b, void *cl) { draw_line((pcb_layer_t *) cl, (LineType *) b); return R_DIR_FOUND_CONTINUE; Index: trunk/src/obj_line_draw.h =================================================================== --- trunk/src/obj_line_draw.h (revision 4760) +++ trunk/src/obj_line_draw.h (revision 4761) @@ -28,7 +28,7 @@ /* Include rtree.h for this */ #ifdef PCB_RTREE_H -r_dir_t draw_line_callback(const BoxType * b, void *cl); +r_dir_t draw_line_callback(const pcb_box_t * b, void *cl); #endif void _draw_line(LineType * line); Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 4760) +++ trunk/src/obj_line_drcenf.c (revision 4761) @@ -199,7 +199,7 @@ jmp_buf env; }; -static r_dir_t drcVia_callback(const BoxType * b, void *cl) +static r_dir_t drcVia_callback(const pcb_box_t * b, void *cl) { PinTypePtr via = (PinTypePtr) b; struct drc_info *i = (struct drc_info *) cl; @@ -209,7 +209,7 @@ return R_DIR_FOUND_CONTINUE; } -static r_dir_t drcPad_callback(const BoxType * b, void *cl) +static r_dir_t drcPad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct drc_info *i = (struct drc_info *) cl; @@ -219,7 +219,7 @@ return R_DIR_FOUND_CONTINUE; } -static r_dir_t drcLine_callback(const BoxType * b, void *cl) +static r_dir_t drcLine_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct drc_info *i = (struct drc_info *) cl; @@ -229,7 +229,7 @@ return R_DIR_FOUND_CONTINUE; } -static r_dir_t drcArc_callback(const BoxType * b, void *cl) +static r_dir_t drcArc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct drc_info *i = (struct drc_info *) cl; Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 4760) +++ trunk/src/obj_pad.c (revision 4761) @@ -298,7 +298,7 @@ /*** draw ***/ static void draw_pad_name(PadType * pad) { - BoxType box; + pcb_box_t box; pcb_bool vert; TextType text; char buff[128]; @@ -389,7 +389,7 @@ draw_pad_name(pad); } -r_dir_t draw_pad_callback(const BoxType * b, void *cl) +r_dir_t draw_pad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; int *side = cl; @@ -399,7 +399,7 @@ return R_DIR_FOUND_CONTINUE; } -r_dir_t clear_pad_callback(const BoxType * b, void *cl) +r_dir_t clear_pad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; int *side = cl; @@ -409,7 +409,7 @@ } /* draws solder paste layer for a given side of the board - only pads get paste */ -void DrawPaste(int side, const BoxType * drawn_area) +void DrawPaste(int side, const pcb_box_t * drawn_area) { gui->set_color(Output.fgGC, PCB->ElementColor); ALLPAD_LOOP(PCB->Data); @@ -426,7 +426,7 @@ static void GatherPadName(PadTypePtr Pad) { - BoxType box; + pcb_box_t box; pcb_bool vert; /* should text be vertical ? */ Index: trunk/src/obj_pad_draw.h =================================================================== --- trunk/src/obj_pad_draw.h (revision 4760) +++ trunk/src/obj_pad_draw.h (revision 4761) @@ -29,12 +29,12 @@ /* Include rtree.h for these */ #ifdef PCB_RTREE_H -r_dir_t draw_pad_callback(const BoxType * b, void *cl); -r_dir_t clear_pad_callback(const BoxType * b, void *cl); +r_dir_t draw_pad_callback(const pcb_box_t * b, void *cl); +r_dir_t clear_pad_callback(const pcb_box_t * b, void *cl); #endif void draw_pad(PadType * pad); -void DrawPaste(int side, const BoxType * drawn_area); +void DrawPaste(int side, const pcb_box_t * drawn_area); void ErasePad(PadTypePtr Pad); void ErasePadName(PadTypePtr Pad); void DrawPad(PadTypePtr Pad); Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 4760) +++ trunk/src/obj_pinvia.c (revision 4761) @@ -200,7 +200,7 @@ SetPinBoundingBox(Via); if (!Data->via_tree) Data->via_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Data->via_tree, (BoxTypePtr) Via, 0); + r_insert_entry(Data->via_tree, (pcb_box_t *) Via, 0); } /* sets the bounding box of a pin or via */ @@ -243,7 +243,7 @@ { RestoreToPolygon(ctx->buffer.src, PCB_TYPE_VIA, via, via); - r_delete_entry(ctx->buffer.src->via_tree, (BoxType *) via); + r_delete_entry(ctx->buffer.src->via_tree, (pcb_box_t *) via); pinlist_remove(via); pinlist_append(&ctx->buffer.dst->Via, via); @@ -251,7 +251,7 @@ if (!ctx->buffer.dst->via_tree) ctx->buffer.dst->via_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(ctx->buffer.dst->via_tree, (BoxType *) via, 0); + r_insert_entry(ctx->buffer.dst->via_tree, (pcb_box_t *) via, 0); ClearFromPolygon(ctx->buffer.dst, PCB_TYPE_VIA, via, via); return via; } @@ -299,7 +299,7 @@ value >= MIN_PINORVIASIZE && value >= Via->DrillingHole + MIN_PINORVIACOPPER && value != Via->Thickness) { AddObjectToSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); EraseVia(Via); - r_delete_entry(PCB->Data->via_tree, (BoxType *) Via); + r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); RestoreToPolygon(PCB->Data, PCB_TYPE_PIN, Via, Via); if (Via->Mask) { AddObjectToMaskSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); @@ -307,7 +307,7 @@ } Via->Thickness = value; SetPinBoundingBox(Via); - r_insert_entry(PCB->Data->via_tree, (BoxType *) Via, 0); + r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_VIA, Via, Via); DrawVia(Via); return (Via); @@ -385,10 +385,10 @@ RestoreToPolygon(PCB->Data, PCB_TYPE_VIA, Via, Via); AddObjectToClearSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); EraseVia(Via); - r_delete_entry(PCB->Data->via_tree, (BoxType *) Via); + r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); Via->Clearance = value; SetPinBoundingBox(Via); - r_insert_entry(PCB->Data->via_tree, (BoxType *) Via, 0); + r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_VIA, Via, Via); DrawVia(Via); Via->Element = NULL; @@ -633,7 +633,7 @@ EraseVia(Via); AddObjectToFlagUndoList(PCB_TYPE_VIA, Via, Via, Via); AddObjectToMaskSizeUndoList(PCB_TYPE_VIA, Via, Via, Via); - r_delete_entry(PCB->Data->via_tree, (BoxType *) Via); + r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); RestoreToPolygon(PCB->Data, PCB_TYPE_VIA, Via, Via); TOGGLE_FLAG(PCB_FLAG_HOLE, Via); @@ -652,7 +652,7 @@ } SetPinBoundingBox(Via); - r_insert_entry(PCB->Data->via_tree, (BoxType *) Via, 0); + r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_VIA, Via, Via); DrawVia(Via); Draw(); @@ -716,12 +716,12 @@ /* moves a via */ void *MoveVia(pcb_opctx_t *ctx, PinTypePtr Via) { - r_delete_entry(PCB->Data->via_tree, (BoxType *) Via); + r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); RestoreToPolygon(PCB->Data, PCB_TYPE_VIA, Via, Via); MOVE_VIA_LOWLEVEL(Via, ctx->move.dx, ctx->move.dy); if (PCB->ViaOn) EraseVia(Via); - r_insert_entry(PCB->Data->via_tree, (BoxType *) Via, 0); + r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_VIA, Via, Via); if (PCB->ViaOn) { DrawVia(Via); @@ -733,7 +733,7 @@ /* destroys a via */ void *DestroyVia(pcb_opctx_t *ctx, PinTypePtr Via) { - r_delete_entry(ctx->remove.destroy_target->via_tree, (BoxTypePtr) Via); + r_delete_entry(ctx->remove.destroy_target->via_tree, (pcb_box_t *) Via); free(Via->Name); RemoveFreeVia(Via); @@ -803,7 +803,7 @@ static void _draw_pv_name(PinType * pv) { - BoxType box; + pcb_box_t box; pcb_bool vert; TextType text; char buff[128]; @@ -864,13 +864,13 @@ _draw_pv(pin, draw_hole); } -r_dir_t draw_pin_callback(const BoxType * b, void *cl) +r_dir_t draw_pin_callback(const pcb_box_t * b, void *cl) { draw_pin((PinType *) b, pcb_false); return R_DIR_FOUND_CONTINUE; } -r_dir_t clear_pin_callback(const BoxType * b, void *cl) +r_dir_t clear_pin_callback(const pcb_box_t * b, void *cl) { PinType *pin = (PinTypePtr) b; if (conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly) @@ -887,13 +887,13 @@ _draw_pv(via, draw_hole); } -r_dir_t draw_via_callback(const BoxType * b, void *cl) +r_dir_t draw_via_callback(const pcb_box_t * b, void *cl) { draw_via((PinType *) b, pcb_false); return R_DIR_FOUND_CONTINUE; } -r_dir_t draw_hole_callback(const BoxType * b, void *cl) +r_dir_t draw_hole_callback(const pcb_box_t * b, void *cl) { PinTypePtr pv = (PinTypePtr) b; int plated = cl ? *(int *) cl : -1; @@ -937,7 +937,7 @@ static void GatherPVName(PinTypePtr Ptr) { - BoxType box; + pcb_box_t box; pcb_bool vert = TEST_FLAG(PCB_FLAG_EDGE2, Ptr); if (vert) { Index: trunk/src/obj_pinvia_draw.h =================================================================== --- trunk/src/obj_pinvia_draw.h (revision 4760) +++ trunk/src/obj_pinvia_draw.h (revision 4761) @@ -28,10 +28,10 @@ /* Include rtree.h for these */ #ifdef PCB_RTREE_H -r_dir_t draw_pin_callback(const BoxType * b, void *cl); -r_dir_t clear_pin_callback(const BoxType * b, void *cl); -r_dir_t draw_via_callback(const BoxType * b, void *cl); -r_dir_t draw_hole_callback(const BoxType * b, void *cl); +r_dir_t draw_pin_callback(const pcb_box_t * b, void *cl); +r_dir_t clear_pin_callback(const pcb_box_t * b, void *cl); +r_dir_t draw_via_callback(const pcb_box_t * b, void *cl); +r_dir_t draw_hole_callback(const pcb_box_t * b, void *cl); #endif Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 4760) +++ trunk/src/obj_poly.c (revision 4761) @@ -168,7 +168,7 @@ SetPolygonBoundingBox(polygon); if (!Layer->polygon_tree) Layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->polygon_tree, (BoxTypePtr) polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) polygon, 0); } /* creates a new polygon on a layer */ @@ -241,7 +241,7 @@ */ if (!layer->polygon_tree) layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(layer->polygon_tree, (BoxType *) polygon, 0); + r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); CLEAR_FLAG(PCB_FLAG_FOUND | ctx->buffer.extraflg, polygon); return (polygon); @@ -253,7 +253,7 @@ { pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; - r_delete_entry(layer->polygon_tree, (BoxType *) polygon); + r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); polylist_remove(polygon); polylist_append(&lay->Polygon, polygon); @@ -262,7 +262,7 @@ if (!lay->polygon_tree) lay->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->polygon_tree, (BoxType *) polygon, 0); + r_insert_entry(lay->polygon_tree, (pcb_box_t *) polygon, 0); return (polygon); } @@ -315,7 +315,7 @@ * second, shift the points up to make room for the new point */ ErasePolygon(Polygon); - r_delete_entry(Layer->polygon_tree, (BoxTypePtr) Polygon); + r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); save = *CreateNewPointInPolygon(Polygon, ctx->insert.x, ctx->insert.y); for (n = Polygon->PointN - 1; n > ctx->insert.idx; n--) Polygon->Points[n] = Polygon->Points[n - 1]; @@ -330,7 +330,7 @@ AddObjectToInsertPointUndoList(PCB_TYPE_POLYGON_POINT, Layer, Polygon, &Polygon->Points[ctx->insert.idx]); SetPolygonBoundingBox(Polygon); - r_insert_entry(Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); InitClip(PCB->Data, Layer, Polygon); if (ctx->insert.forcible || !RemoveExcessPolygonPoints(Layer, Polygon)) { DrawPolygon(Layer, Polygon); @@ -356,9 +356,9 @@ if (Layer->On) { ErasePolygon(Polygon); } - r_delete_entry(Layer->polygon_tree, (BoxType *) Polygon); + r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); MovePolygonLowLevel(Polygon, ctx->move.dx, ctx->move.dy); - r_insert_entry(Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); InitClip(PCB->Data, Layer, Polygon); if (Layer->On) { DrawPolygon(Layer, Polygon); @@ -373,10 +373,10 @@ if (Layer->On) { ErasePolygon(Polygon); } - r_delete_entry(Layer->polygon_tree, (BoxType *) Polygon); + r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); MOVE(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); SetPolygonBoundingBox(Polygon); - r_insert_entry(Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); RemoveExcessPolygonPoints(Layer, Polygon); InitClip(PCB->Data, Layer, Polygon); if (Layer->On) { @@ -389,7 +389,7 @@ /* moves a polygon between layers; lowlevel routines */ void *MovePolygonToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, PolygonType * polygon, pcb_layer_t * Destination) { - r_delete_entry(Source->polygon_tree, (BoxType *) polygon); + r_delete_entry(Source->polygon_tree, (pcb_box_t *) polygon); polylist_remove(polygon); polylist_append(&Destination->Polygon, polygon); @@ -396,7 +396,7 @@ if (!Destination->polygon_tree) Destination->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->polygon_tree, (BoxType *) polygon, 0); + r_insert_entry(Destination->polygon_tree, (pcb_box_t *) polygon, 0); return polygon; } @@ -407,7 +407,7 @@ PolygonTypePtr polygon; } mptlc; -r_dir_t mptl_pin_callback(const BoxType * b, void *cl) +r_dir_t mptl_pin_callback(const pcb_box_t * b, void *cl) { struct mptlc *d = (struct mptlc *) cl; PinTypePtr pin = (PinTypePtr) b; @@ -458,7 +458,7 @@ /* destroys a polygon from a layer */ void *DestroyPolygon(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon) { - r_delete_entry(Layer->polygon_tree, (BoxTypePtr) Polygon); + r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); FreePolygonMemory(Polygon); RemoveFreePolygon(Polygon); @@ -483,7 +483,7 @@ if (contour_points <= 3) return RemovePolygonContour(ctx, Layer, Polygon, contour); - r_delete_entry(Layer->polygon_tree, (BoxType *) Polygon); + r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -496,7 +496,7 @@ Polygon->HoleIndex[i]--; SetPolygonBoundingBox(Polygon); - r_insert_entry(Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); InitClip(PCB->Data, Layer, Polygon); return (Polygon); } @@ -590,7 +590,7 @@ /* insert the polygon-point into the undo list */ AddObjectToRemovePointUndoList(PCB_TYPE_POLYGON_POINT, Layer, Polygon, point_idx); - r_delete_entry(Layer->polygon_tree, (BoxType *) Polygon); + r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); /* remove point from list, keep point order */ for (i = point_idx; i < Polygon->PointN - 1; i++) @@ -603,7 +603,7 @@ Polygon->HoleIndex[i]--; SetPolygonBoundingBox(Polygon); - r_insert_entry(Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); RemoveExcessPolygonPoints(Layer, Polygon); InitClip(PCB->Data, Layer, Polygon); @@ -626,7 +626,7 @@ MovePolygonLowLevel(polygon, ctx->copy.DeltaX, ctx->copy.DeltaY); if (!Layer->polygon_tree) Layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->polygon_tree, (BoxTypePtr) polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) polygon, 0); InitClip(PCB->Data, Layer, polygon); DrawPolygon(Layer, polygon); AddObjectToCreateUndoList(PCB_TYPE_POLYGON, Layer, polygon, polygon); @@ -634,7 +634,7 @@ } /*** draw ***/ -r_dir_t draw_poly_callback(const BoxType * b, void *cl) +r_dir_t draw_poly_callback(const pcb_box_t * b, void *cl) { struct draw_poly_info *i = cl; PolygonType *polygon = (PolygonType *) b; Index: trunk/src/obj_poly_draw.h =================================================================== --- trunk/src/obj_poly_draw.h (revision 4760) +++ trunk/src/obj_poly_draw.h (revision 4761) @@ -29,10 +29,10 @@ /* Include rtree.h for these */ #ifdef PCB_RTREE_H struct draw_poly_info { - const BoxType *drawn_area; + const pcb_box_t *drawn_area; pcb_layer_t *layer; }; -r_dir_t draw_poly_callback(const BoxType * b, void *cl); +r_dir_t draw_poly_callback(const pcb_box_t * b, void *cl); #endif void ErasePolygon(PolygonTypePtr Polygon); Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 4760) +++ trunk/src/obj_rat.c (revision 4761) @@ -134,7 +134,7 @@ /* moves a rat-line to paste buffer */ void *MoveRatToBuffer(pcb_opctx_t *ctx, RatType * rat) { - r_delete_entry(ctx->buffer.src->rat_tree, (BoxType *) rat); + r_delete_entry(ctx->buffer.src->rat_tree, (pcb_box_t *) rat); ratlist_remove(rat); ratlist_append(&ctx->buffer.dst->Rat, rat); @@ -143,7 +143,7 @@ if (!ctx->buffer.dst->rat_tree) ctx->buffer.dst->rat_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(ctx->buffer.dst->rat_tree, (BoxType *) rat, 0); + r_insert_entry(ctx->buffer.dst->rat_tree, (pcb_box_t *) rat, 0); return rat; } @@ -220,7 +220,7 @@ } /*** draw ***/ -r_dir_t draw_rat_callback(const BoxType * b, void *cl) +r_dir_t draw_rat_callback(const pcb_box_t * b, void *cl) { RatType *rat = (RatType *) b; @@ -255,7 +255,7 @@ if (TEST_FLAG(PCB_FLAG_VIA, Rat)) { Coord w = Rat->Thickness; - BoxType b; + pcb_box_t b; b.X1 = Rat->Point1.X - w * 2 - w / 2; b.X2 = Rat->Point1.X + w * 2 + w / 2; @@ -276,7 +276,7 @@ if (TEST_FLAG(PCB_FLAG_VIA, Rat)) { Coord w = Rat->Thickness; - BoxType b; + pcb_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 4760) +++ trunk/src/obj_rat_draw.h (revision 4761) @@ -28,7 +28,7 @@ /* Include rtree.h for these */ #ifdef PCB_RTREE_H -r_dir_t draw_rat_callback(const BoxType * b, void *cl); +r_dir_t draw_rat_callback(const pcb_box_t * b, void *cl); #endif void EraseRat(RatTypePtr Rat); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 4760) +++ trunk/src/obj_text.c (revision 4761) @@ -100,7 +100,7 @@ text->ID = CreateIDGet(); if (!Layer->text_tree) Layer->text_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->text_tree, (BoxTypePtr) text, 0); + r_insert_entry(Layer->text_tree, (pcb_box_t *) text, 0); } /* creates the bounding box of a text object */ @@ -160,7 +160,7 @@ space = symbol[*s].Delta; } else { - BoxType *ds = &FontPtr->DefaultSymbol; + pcb_box_t *ds = &FontPtr->DefaultSymbol; Coord w = ds->X2 - ds->X1; minx = MIN(minx, ds->X1 + tx); @@ -229,7 +229,7 @@ { pcb_layer_t *lay = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, layer)]; - r_delete_entry(layer->text_tree, (BoxType *) text); + r_delete_entry(layer->text_tree, (pcb_box_t *) text); RestoreToPolygon(ctx->buffer.src, PCB_TYPE_TEXT, layer, text); textlist_remove(text); @@ -237,7 +237,7 @@ if (!lay->text_tree) lay->text_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->text_tree, (BoxType *) text, 0); + r_insert_entry(lay->text_tree, (pcb_box_t *) text, 0); ClearFromPolygon(ctx->buffer.dst, PCB_TYPE_TEXT, lay, text); return (text); } @@ -253,11 +253,11 @@ if (value <= MAX_TEXTSCALE && value >= MIN_TEXTSCALE && value != Text->Scale) { AddObjectToSizeUndoList(PCB_TYPE_TEXT, Layer, Text, Text); EraseText(Layer, Text); - r_delete_entry(Layer->text_tree, (BoxTypePtr) Text); + r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); RestoreToPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); Text->Scale = value; SetTextBoundingBox(&PCB->Font, Text); - r_insert_entry(Layer->text_tree, (BoxTypePtr) Text, 0); + r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); DrawText(Layer, Text); return (Text); @@ -274,13 +274,13 @@ if (TEST_FLAG(PCB_FLAG_LOCK, Text)) return (NULL); EraseText(Layer, Text); - r_delete_entry(Layer->text_tree, (BoxTypePtr)Text); + r_delete_entry(Layer->text_tree, (pcb_box_t *)Text); RestoreToPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); Text->TextString = ctx->chgname.new_name; /* calculate size of the bounding box */ SetTextBoundingBox(&PCB->Font, Text); - r_insert_entry(Layer->text_tree, (BoxTypePtr) Text, 0); + r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); DrawText(Layer, Text); return (old); @@ -338,7 +338,7 @@ void *MoveText(pcb_opctx_t *ctx, pcb_layer_t *Layer, TextTypePtr Text) { RestoreToPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); - r_delete_entry(Layer->text_tree, (BoxType *) Text); + r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); if (Layer->On) { EraseText(Layer, Text); MOVE_TEXT_LOWLEVEL(Text, ctx->move.dx, ctx->move.dy); @@ -347,7 +347,7 @@ } else MOVE_TEXT_LOWLEVEL(Text, ctx->move.dx, ctx->move.dy); - r_insert_entry(Layer->text_tree, (BoxType *) Text, 0); + r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); return (Text); } @@ -356,7 +356,7 @@ void *MoveTextToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, TextType * text, pcb_layer_t * Destination) { RestoreToPolygon(PCB->Data, PCB_TYPE_TEXT, Source, text); - r_delete_entry(Source->text_tree, (BoxType *) text); + r_delete_entry(Source->text_tree, (pcb_box_t *) text); textlist_remove(text); textlist_append(&Destination->Text, text); @@ -370,7 +370,7 @@ SetTextBoundingBox(&PCB->Font, text); if (!Destination->text_tree) Destination->text_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->text_tree, (BoxType *) text, 0); + r_insert_entry(Destination->text_tree, (pcb_box_t *) text, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_TEXT, Destination, text); return text; @@ -400,7 +400,7 @@ void *DestroyText(pcb_opctx_t *ctx, pcb_layer_t *Layer, TextTypePtr Text) { free(Text->TextString); - r_delete_entry(Layer->text_tree, (BoxTypePtr) Text); + r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); RemoveFreeText(Text); @@ -413,7 +413,7 @@ /* erase from screen */ if (Layer->On) { EraseText(Layer, Text); - r_delete_entry(Layer->text_tree, (BoxTypePtr)Text); + r_delete_entry(Layer->text_tree, (pcb_box_t *)Text); if (!ctx->remove.bulk) Draw(); } @@ -454,9 +454,9 @@ { EraseText(Layer, Text); RestoreToPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); - r_delete_entry(Layer->text_tree, (BoxTypePtr) Text); + r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); RotateTextLowLevel(Text, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); - r_insert_entry(Layer->text_tree, (BoxTypePtr) Text, 0); + r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_TEXT, Layer, Text); DrawText(Layer, Text); Draw(); @@ -516,7 +516,7 @@ } else { /* the default symbol is a filled box */ - BoxType defaultsymbol = PCB->Font.DefaultSymbol; + pcb_box_t defaultsymbol = PCB->Font.DefaultSymbol; Coord size = (defaultsymbol.X2 - defaultsymbol.X1) * 6 / 5; defaultsymbol.X1 = PCB_SCALE_TEXT(defaultsymbol.X1 + x, Text->Scale); @@ -541,7 +541,7 @@ } -r_dir_t draw_text_callback(const BoxType * b, void *cl) +r_dir_t draw_text_callback(const pcb_box_t * b, void *cl) { pcb_layer_t *layer = cl; TextType *text = (TextType *) b; Index: trunk/src/obj_text_draw.h =================================================================== --- trunk/src/obj_text_draw.h (revision 4760) +++ trunk/src/obj_text_draw.h (revision 4761) @@ -29,7 +29,7 @@ /* Include rtree.h for these */ #ifdef PCB_RTREE_H -r_dir_t draw_text_callback(const BoxType * b, void *cl); +r_dir_t draw_text_callback(const pcb_box_t * b, void *cl); #endif void DrawTextLowLevel(TextTypePtr Text, Coord min_line_width); Index: trunk/src/polyarea.h =================================================================== --- trunk/src/polyarea.h (revision 4760) +++ trunk/src/polyarea.h (revision 4761) @@ -166,6 +166,6 @@ int SavePOLYAREA(POLYAREA * PA, char *fname); /* calculate the bounding box of a POLYAREA and save result in b */ -void poly_bbox(POLYAREA * p, BoxType * b); +void poly_bbox(POLYAREA * p, pcb_box_t * b); #endif /* PCB_POLYAREA_H */ Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 4760) +++ trunk/src/polygon.c (revision 4761) @@ -475,7 +475,7 @@ PLINE *contour = NULL; POLYAREA *np = NULL; Vector v; - BoxType *ends; + pcb_box_t *ends; int i, segs; double ang, da, rx, ry; long half; @@ -757,7 +757,7 @@ return CirclePoly(pin->X, pin->Y, size); } -POLYAREA *BoxPolyBloated(BoxType * box, Coord bloat) +POLYAREA *BoxPolyBloated(pcb_box_t * box, Coord bloat) { return RectPoly(box->X1 - bloat, box->X2 + bloat, box->Y1 - bloat, box->Y2 + bloat); } @@ -821,7 +821,7 @@ static int SubtractText(TextType * text, PolygonType * p) { POLYAREA *np; - const BoxType *b = &text->BoundingBox; + const pcb_box_t *b = &text->BoundingBox; if (!TEST_FLAG(PCB_FLAG_CLEARLINE, text)) return 0; @@ -848,7 +848,7 @@ } struct cpInfo { - const BoxType *other; + const pcb_box_t *other; pcb_data_t *data; pcb_layer_t *layer; PolygonType *polygon; @@ -867,7 +867,7 @@ info->batch_size = 0; } -static r_dir_t pin_sub_callback(const BoxType * b, void *cl) +static r_dir_t pin_sub_callback(const pcb_box_t * b, void *cl) { PinTypePtr pin = (PinTypePtr) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -906,7 +906,7 @@ return R_DIR_FOUND_CONTINUE; } -static r_dir_t arc_sub_callback(const BoxType * b, void *cl) +static r_dir_t arc_sub_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -923,7 +923,7 @@ return R_DIR_FOUND_CONTINUE; } -static r_dir_t pad_sub_callback(const BoxType * b, void *cl) +static r_dir_t pad_sub_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -943,7 +943,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t line_sub_callback(const BoxType * b, void *cl) +static r_dir_t line_sub_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -971,7 +971,7 @@ return R_DIR_FOUND_CONTINUE; } -static r_dir_t text_sub_callback(const BoxType * b, void *cl) +static r_dir_t text_sub_callback(const pcb_box_t * b, void *cl) { TextTypePtr text = (TextTypePtr) b; struct cpInfo *info = (struct cpInfo *) cl; @@ -998,10 +998,10 @@ return i; } -static int clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, PolygonType * polygon, const BoxType * here, Coord expand) +static int clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, PolygonType * polygon, const pcb_box_t * here, Coord expand) { int r = 0, seen; - BoxType region; + pcb_box_t region; struct cpInfo info; pcb_cardinal_t group; @@ -1096,7 +1096,7 @@ if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const BoxType *) pin, 2 * UNSUBTRACT_BLOAT * 400000); + clearPoly(PCB->Data, l, p, (const pcb_box_t *) pin, 2 * UNSUBTRACT_BLOAT * 400000); return 1; } @@ -1114,7 +1114,7 @@ return 0; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const BoxType *) arc, 2 * UNSUBTRACT_BLOAT); + clearPoly(PCB->Data, l, p, (const pcb_box_t *) arc, 2 * UNSUBTRACT_BLOAT); return 1; } @@ -1132,7 +1132,7 @@ return 0; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const BoxType *) line, 2 * UNSUBTRACT_BLOAT); + clearPoly(PCB->Data, l, p, (const pcb_box_t *) line, 2 * UNSUBTRACT_BLOAT); return 1; } @@ -1150,7 +1150,7 @@ return -1; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const BoxType *) text, 2 * UNSUBTRACT_BLOAT); + clearPoly(PCB->Data, l, p, (const pcb_box_t *) text, 2 * UNSUBTRACT_BLOAT); return 1; } @@ -1165,7 +1165,7 @@ return 0; if (!Unsubtract(np, p)) return 0; - clearPoly(PCB->Data, l, p, (const BoxType *) pad, 2 * UNSUBTRACT_BLOAT); + clearPoly(PCB->Data, l, p, (const pcb_box_t *) pad, 2 * UNSUBTRACT_BLOAT); return 1; } @@ -1347,7 +1347,7 @@ SetPolygonBoundingBox(polygon); if (!CURRENT->polygon_tree) CURRENT->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(CURRENT->polygon_tree, (BoxType *) polygon, 0); + r_insert_entry(CURRENT->polygon_tree, (pcb_box_t *) polygon, 0); InitClip(PCB->Data, CURRENT, polygon); DrawPolygon(CURRENT, polygon); SetChangedFlag(pcb_true); @@ -1366,7 +1366,7 @@ * the search. */ int -PolygonHoles(PolygonType * polygon, const BoxType * range, int (*callback) (PLINE * contour, void *user_data), void *user_data) +PolygonHoles(PolygonType * polygon, const pcb_box_t * range, int (*callback) (PLINE * contour, void *user_data), void *user_data) { POLYAREA *pa = polygon->Clipped; PLINE *pl; @@ -1446,7 +1446,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t plow_callback(const BoxType * b, void *cl) +static r_dir_t plow_callback(const pcb_box_t * b, void *cl) { struct plow_info *plow = (struct plow_info *) cl; PolygonTypePtr polygon = (PolygonTypePtr) b; @@ -1460,7 +1460,7 @@ PlowsPolygon(pcb_data_t * Data, int type, void *ptr1, void *ptr2, r_dir_t (*call_back) (pcb_data_t *data, pcb_layer_t *lay, PolygonTypePtr poly, int type, void *ptr1, void *ptr2)) { - BoxType sb = ((PinTypePtr) ptr2)->BoundingBox; + pcb_box_t sb = ((PinTypePtr) ptr2)->BoundingBox; int r = 0, seen; struct plow_info info; @@ -1657,7 +1657,7 @@ } } -void NoHolesPolygonDicer(PolygonTypePtr p, const BoxType * clip, void (*emit) (PLINE *, void *), void *user_data) +void NoHolesPolygonDicer(PolygonTypePtr p, const pcb_box_t * clip, void (*emit) (PLINE *, void *), void *user_data) { POLYAREA *main_contour, *cur, *next; @@ -1733,7 +1733,7 @@ newone->Clipped = p; p = p->f; /* go to next pline */ newone->Clipped->b = newone->Clipped->f = newone->Clipped; /* unlink from others */ - r_insert_entry(layer->polygon_tree, (BoxType *) newone, 0); + r_insert_entry(layer->polygon_tree, (pcb_box_t *) newone, 0); DrawPolygon(layer, newone); } else { @@ -1834,7 +1834,7 @@ SetPolygonBoundingBox(Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); DrawPolygon(Layer, Polygon); /* add to undo list */ Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 4760) +++ trunk/src/polygon.h (revision 4761) @@ -61,7 +61,7 @@ void GoToPreviousPoint(void); void ClosePolygon(void); void CopyAttachedPolygonToLayer(void); -int PolygonHoles(PolygonType * ptr, const BoxType * range, int (*callback) (PLINE *, void *user_data), void *user_data); +int PolygonHoles(PolygonType * ptr, const pcb_box_t * range, int (*callback) (PLINE *, void *user_data), void *user_data); int PlowsPolygon(pcb_data_t *, int, void *, void *, r_dir_t (*callback) (pcb_data_t *, pcb_layer_t *, PolygonTypePtr, int, void *, void *)); void ComputeNoHoles(PolygonType * poly); @@ -73,7 +73,7 @@ POLYAREA *LinePoly(LineType * l, Coord thick); POLYAREA *ArcPoly(ArcType * l, Coord thick); POLYAREA *PinPoly(PinType * l, Coord thick, Coord clear); -POLYAREA *BoxPolyBloated(BoxType * box, Coord radius); +POLYAREA *BoxPolyBloated(pcb_box_t * box, Coord radius); void frac_circle(PLINE *, Coord, Coord, Vector, int); int InitClip(pcb_data_t * d, pcb_layer_t * l, PolygonType * p); void RestoreToPolygon(pcb_data_t *, int, void *, void *); @@ -84,7 +84,7 @@ pcb_bool IsRectangleInPolygon(Coord, Coord, Coord, Coord, PolygonTypePtr); pcb_bool isects(POLYAREA *, PolygonTypePtr, pcb_bool); pcb_bool MorphPolygon(pcb_layer_t *, PolygonTypePtr); -void NoHolesPolygonDicer(PolygonType * p, const BoxType * clip, void (*emit) (PLINE *, void *), void *user_data); +void NoHolesPolygonDicer(PolygonType * p, const pcb_box_t * clip, void (*emit) (PLINE *, void *), void *user_data); void PolyToPolygonsOnLayer(pcb_data_t *, pcb_layer_t *, POLYAREA *, FlagType); void square_pin_factors(int style, double *xm, double *ym); Index: trunk/src/polygon1.c =================================================================== --- trunk/src/polygon1.c (revision 4760) +++ trunk/src/polygon1.c (revision 4761) @@ -461,7 +461,7 @@ /* some structures for handling segment intersections using the rtrees */ typedef struct seg { - BoxType box; + pcb_box_t box; VNODE *v; PLINE *p; int intersected; @@ -514,7 +514,7 @@ q->box.X2 = max(q->v->point[0], q->v->next->point[0]) + 1; q->box.Y1 = min(q->v->point[1], q->v->next->point[1]); q->box.Y2 = max(q->v->point[1], q->v->next->point[1]) + 1; - r_insert_entry(tree, (const BoxType *) q, 1); + r_insert_entry(tree, (const pcb_box_t *) q, 1); q = (seg *) malloc(sizeof(struct seg)); if (!q) return 1; @@ -525,8 +525,8 @@ q->box.X2 = max(q->v->point[0], q->v->next->point[0]) + 1; q->box.Y1 = min(q->v->point[1], q->v->next->point[1]); q->box.Y2 = max(q->v->point[1], q->v->next->point[1]) + 1; - r_insert_entry(tree, (const BoxType *) q, 1); - r_delete_entry(tree, (const BoxType *) s); + r_insert_entry(tree, (const pcb_box_t *) q, 1); + r_delete_entry(tree, (const pcb_box_t *) s); return 0; } @@ -535,7 +535,7 @@ * (C) 2006, harry eaton * This prunes the search for boxes that don't intersect the segment. */ -static r_dir_t seg_in_region(const BoxType * b, void *cl) +static r_dir_t seg_in_region(const pcb_box_t * b, void *cl) { struct info *i = (struct info *) cl; double y1, y2; @@ -572,7 +572,7 @@ * problem. There are efficient algorithms for finding intersections with snap * rounding, but I don't have time to implement them right now. */ -static r_dir_t seg_in_seg(const BoxType * b, void *cl) +static r_dir_t seg_in_seg(const pcb_box_t * b, void *cl) { struct info *i = (struct info *) cl; struct seg *s = (struct seg *) b; @@ -650,13 +650,13 @@ } s->v = bv; s->p = pb; - r_insert_entry(ans, (const BoxType *) s, 1); + r_insert_entry(ans, (const pcb_box_t *) s, 1); } while ((bv = bv->next) != &pb->head); return (void *) ans; } -static r_dir_t get_seg(const BoxType * b, void *cl) +static r_dir_t get_seg(const pcb_box_t * b, void *cl) { struct info *i = (struct info *) cl; struct seg *s = (struct seg *) b; @@ -685,7 +685,7 @@ * */ -static r_dir_t contour_bounds_touch(const BoxType * b, void *cl) +static r_dir_t contour_bounds_touch(const pcb_box_t * b, void *cl) { contour_info *c_info = (contour_info *) cl; PLINE *pa = c_info->pa; @@ -694,7 +694,7 @@ PLINE *looping_over; VNODE *av; /* node iterators */ struct info info; - BoxType box; + pcb_box_t box; jmp_buf restart; /* Have seg_in_seg return to our desired location if it touches */ @@ -781,7 +781,7 @@ } for (pa = a->contours; pa; pa = pa->next) { /* Loop over the contours of POLYAREA "a" */ - BoxType sb; + pcb_box_t sb; jmp_buf out; int retval; @@ -887,7 +887,7 @@ /*****************************************************************/ /* Routines for making labels */ -static r_dir_t count_contours_i_am_inside(const BoxType * b, void *cl) +static r_dir_t count_contours_i_am_inside(const pcb_box_t * b, void *cl) { PLINE *me = (PLINE *) cl; PLINE *check = (PLINE *) b; @@ -924,7 +924,7 @@ break; outer = (POLYAREA *) heap_remove_smallest(heap); - r_search(outer->contour_tree, (BoxType *) poly, NULL, count_contours_i_am_inside, poly, &cnt); + r_search(outer->contour_tree, (pcb_box_t *) poly, NULL, count_contours_i_am_inside, poly, &cnt); switch (cnt) { case 0: /* Didn't find anything in this piece, Keep looking */ break; @@ -1084,7 +1084,7 @@ } newp->contours = c; newp->contour_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(newp->contour_tree, (BoxTypePtr) c, 0); + r_insert_entry(newp->contour_tree, (pcb_box_t *) c, 0); c->next = NULL; } /* InsCntr */ @@ -1098,7 +1098,7 @@ if (cntr->Flags.orient == PLF_DIR) { if (owner != NULL) - r_delete_entry(owner->contour_tree, (BoxType *) cntr); + r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); InsCntr(e, cntr, contours); } /* put hole into temporary list */ @@ -1109,8 +1109,8 @@ parent_contour->next = cntr; if (owner != parent) { if (owner != NULL) - r_delete_entry(owner->contour_tree, (BoxType *) cntr); - r_insert_entry(parent->contour_tree, (BoxType *) cntr, 0); + r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); + r_insert_entry(parent->contour_tree, (pcb_box_t *) cntr, 0); } } else { @@ -1119,7 +1119,7 @@ /* We don't insert the holes into an r-tree, * they just form a linked list */ if (owner != NULL) - r_delete_entry(owner->contour_tree, (BoxType *) cntr); + r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); } } } /* PutContour */ @@ -1136,15 +1136,15 @@ contour->next = NULL; if (remove_rtree_entry) - r_delete_entry(piece->contour_tree, (BoxType *) contour); + r_delete_entry(piece->contour_tree, (pcb_box_t *) contour); } struct polyarea_info { - BoxType BoundingBox; + pcb_box_t BoundingBox; POLYAREA *pa; }; -static r_dir_t heap_it(const BoxType * b, void *cl) +static r_dir_t heap_it(const pcb_box_t * b, void *cl) { heap_t *heap = (heap_t *) cl; struct polyarea_info *pa_info = (struct polyarea_info *) b; @@ -1161,7 +1161,7 @@ PLINE *result; }; -static r_dir_t find_inside(const BoxType * b, void *cl) +static r_dir_t find_inside(const pcb_box_t * b, void *cl) { struct find_inside_info *info = (struct find_inside_info *) cl; PLINE *check = (PLINE *) b; @@ -1211,7 +1211,7 @@ all_pa_info[i].BoundingBox.X2 = curc->contours->xmax; all_pa_info[i].BoundingBox.Y2 = curc->contours->ymax; all_pa_info[i].pa = curc; - r_insert_entry(tree, (const BoxType *) &all_pa_info[i], 0); + r_insert_entry(tree, (const pcb_box_t *) &all_pa_info[i], 0); i++; } while ((curc = curc->f) != dest); @@ -1223,7 +1223,7 @@ container = NULL; /* build a heap of all of the polys that the hole is inside its bounding box */ heap = heap_create(); - r_search(tree, (BoxType *) curh, NULL, heap_it, heap, NULL); + r_search(tree, (pcb_box_t *) curh, NULL, heap_it, heap, NULL); if (heap_is_empty(heap)) { #ifndef NDEBUG #ifdef DEBUG @@ -1282,7 +1282,7 @@ info.result = NULL; /* Rtree search, calling back a routine to longjmp back with data about any hole inside the added one */ /* Be sure not to bother jumping back to report the main contour! */ - r_search(pa_info->pa->contour_tree, (BoxType *) curh, NULL, find_inside, &info, NULL); + r_search(pa_info->pa->contour_tree, (pcb_box_t *) curh, NULL, find_inside, &info, NULL); /* Nothing found? */ break; @@ -1306,7 +1306,7 @@ /* link at front of hole list */ curh->next = container->next; container->next = curh; - r_insert_entry(pa_info->pa->contour_tree, (BoxTypePtr) curh, 0); + r_insert_entry(pa_info->pa->contour_tree, (pcb_box_t *) curh, 0); } } @@ -1756,7 +1756,7 @@ PLINE *result; }; -static r_dir_t find_inside_m_pa(const BoxType * b, void *cl) +static r_dir_t find_inside_m_pa(const pcb_box_t * b, void *cl) { struct find_inside_m_pa_info *info = (struct find_inside_m_pa_info *) cl; PLINE *check = (PLINE *) b; @@ -1780,7 +1780,7 @@ POLYAREA *b; POLYAREA *anext; PLINE *curc, *next, *prev; - BoxType box; + pcb_box_t box; /* int inv_inside = 0; */ int del_inside = 0; int del_outside = 0; @@ -1803,10 +1803,10 @@ break; } - box = *((BoxType *) bpa->contours); + box = *((pcb_box_t *) bpa->contours); b = bpa; while ((b = b->f) != bpa) { - BoxType *b_box = (BoxType *) b->contours; + pcb_box_t *b_box = (pcb_box_t *) b->contours; MAKEMIN(box.X1, b_box->X1); MAKEMIN(box.Y1, b_box->Y1); MAKEMAX(box.X2, b_box->X2); @@ -2361,7 +2361,7 @@ C->tree = (rtree_t *) make_edge_tree(C); } /* poly_PreContour */ -static r_dir_t flip_cb(const BoxType * b, void *cl) +static r_dir_t flip_cb(const pcb_box_t * b, void *cl) { struct seg *s = (struct seg *) b; s->v = s->v->prev; @@ -2475,7 +2475,7 @@ for (cur = src->contours; cur != NULL; cur = cur->next) { if (!poly_CopyContour(last, cur)) return pcb_false; - r_insert_entry(dst->contour_tree, (BoxTypePtr) * last, 0); + r_insert_entry(dst->contour_tree, (pcb_box_t *) * last, 0); last = &(*last)->next; } return pcb_true; @@ -2528,7 +2528,7 @@ p->contours->next = c; c->next = tmp; } - r_insert_entry(p->contour_tree, (BoxTypePtr) c, 0); + r_insert_entry(p->contour_tree, (pcb_box_t *) c, 0); return pcb_true; } @@ -2539,7 +2539,7 @@ } pip; -static r_dir_t crossing(const BoxType * b, void *cl) +static r_dir_t crossing(const pcb_box_t * b, void *cl) { struct seg *s = (struct seg *) b; struct pip *p = (struct pip *) cl; @@ -2580,7 +2580,7 @@ int poly_InsideContour(PLINE * c, Vector p) { struct pip info; - BoxType ray; + pcb_box_t ray; if (!cntrbox_pointin(c, p)) return pcb_false; @@ -2902,7 +2902,7 @@ return pcb_false; } -void poly_bbox(POLYAREA * p, BoxType * b) +void poly_bbox(POLYAREA * p, pcb_box_t * b) { PLINE *n; /*int cnt;*/ Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 4760) +++ trunk/src/rotate.c (revision 4761) @@ -78,7 +78,7 @@ /* --------------------------------------------------------------------------- * rotates a box in 90 degree steps */ -void RotateBoxLowLevel(BoxTypePtr Box, Coord X, Coord Y, unsigned Number) +void RotateBoxLowLevel(pcb_box_t *Box, Coord X, Coord Y, unsigned Number) { Coord x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2; @@ -116,19 +116,19 @@ EraseLine(ptr->Line); if (ptr->Layer) { RestoreToPolygon(PCB->Data, PCB_TYPE_LINE, ptr->Layer, ptr->Line); - r_delete_entry(ptr->Layer->line_tree, (BoxType *) ptr->Line); + r_delete_entry(ptr->Layer->line_tree, (pcb_box_t *) ptr->Line); } else - r_delete_entry(PCB->Data->rat_tree, (BoxType *) ptr->Line); + r_delete_entry(PCB->Data->rat_tree, (pcb_box_t *) ptr->Line); RotatePointLowLevel(ptr->MovedPoint, ctx.rotate.center_x, ctx.rotate.center_y, Steps); SetLineBoundingBox(ptr->Line); if (ptr->Layer) { - r_insert_entry(ptr->Layer->line_tree, (BoxType *) ptr->Line, 0); + r_insert_entry(ptr->Layer->line_tree, (pcb_box_t *) ptr->Line, 0); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, ptr->Layer, ptr->Line); DrawLine(ptr->Layer, ptr->Line); } else { - r_insert_entry(PCB->Data->rat_tree, (BoxType *) ptr->Line, 0); + r_insert_entry(PCB->Data->rat_tree, (pcb_box_t *) ptr->Line, 0); DrawRat((RatTypePtr) ptr->Line); } Crosshair.AttachedObject.RubberbandN--; Index: trunk/src/rotate.h =================================================================== --- trunk/src/rotate.h (revision 4760) +++ trunk/src/rotate.h (revision 4761) @@ -92,7 +92,7 @@ #define ROTATE_TYPES (PCB_TYPE_ELEMENT | PCB_TYPE_TEXT | PCB_TYPE_ELEMENT_NAME | PCB_TYPE_ARC) -void RotateBoxLowLevel(BoxTypePtr, Coord, Coord, unsigned); +void RotateBoxLowLevel(pcb_box_t *, Coord, Coord, unsigned); void RotatePolygonLowLevel(PolygonTypePtr, Coord, Coord, unsigned); void *RotateObject(int, void *, void *, void *, Coord, Coord, unsigned); void RotateScreenObject(Coord, Coord, unsigned); Index: trunk/src/rtree.c =================================================================== --- trunk/src/rtree.c (revision 4760) +++ trunk/src/rtree.c (revision 4761) @@ -67,12 +67,12 @@ #define DELETE_BY_POINTER typedef struct { - const BoxType *bptr; /* pointer to the box */ - BoxType bounds; /* copy of the box for locality of reference */ + const pcb_box_t *bptr; /* pointer to the box */ + pcb_box_t bounds; /* copy of the box for locality of reference */ } Rentry; struct rtree_node { - BoxType box; /* bounds rectangle of this node */ + pcb_box_t box; /* bounds rectangle of this node */ struct rtree_node *parent; /* parent of this node, NULL = root */ struct { unsigned is_leaf:1; /* this is a leaf node */ @@ -240,7 +240,7 @@ * according to the largest side. */ #ifdef SORT -static int cmp_box(const BoxType * a, const BoxType * b) +static int cmp_box(const pcb_box_t * a, const pcb_box_t * b) { /* compare two box coordinates so that the __r_search * will fail at the earliest comparison possible. @@ -341,7 +341,7 @@ * it, so don't free the box list until you've called r_destroy_tree. * if you set 'manage' to pcb_true, r_destroy_tree will free your boxlist. */ -rtree_t *r_create_tree(const BoxType * boxlist[], int N, int manage) +rtree_t *r_create_tree(const pcb_box_t * boxlist[], int N, int manage) { rtree_t *rtree; struct rtree_node *node; @@ -396,8 +396,8 @@ } typedef struct { - r_dir_t (*check_it) (const BoxType * region, void *cl); - r_dir_t (*found_it) (const BoxType * box, void *cl); + r_dir_t (*check_it) (const pcb_box_t * region, void *cl); + r_dir_t (*found_it) (const pcb_box_t * box, void *cl); void *closure; int cancel; } r_arg; @@ -406,7 +406,7 @@ * so some careful thought has been given to maximizing the speed * */ -int __r_search(struct rtree_node *node, const BoxType * query, r_arg * arg) +int __r_search(struct rtree_node *node, const pcb_box_t * query, r_arg * arg) { r_dir_t res; @@ -498,9 +498,9 @@ * Returns how the search ended. */ r_dir_t -r_search(rtree_t * rtree, const BoxType * query, - r_dir_t (*check_region) (const BoxType * region, void *cl), - r_dir_t (*found_rectangle) (const BoxType * box, void *cl), void *cl, +r_search(rtree_t * rtree, const pcb_box_t * query, + r_dir_t (*check_region) (const pcb_box_t * region, void *cl), + r_dir_t (*found_rectangle) (const pcb_box_t * box, void *cl), void *cl, int *num_found) { r_arg arg; @@ -546,7 +546,7 @@ } /*------ r_region_is_empty ------*/ -static r_dir_t __r_region_is_empty_rect_in_reg(const BoxType * box, void *cl) +static r_dir_t __r_region_is_empty_rect_in_reg(const pcb_box_t * box, void *cl) { jmp_buf *envp = (jmp_buf *) cl; longjmp(*envp, 1); /* found one! */ @@ -553,7 +553,7 @@ } /* return 0 if there are any rectangles in the given region. */ -int r_region_is_empty(rtree_t * rtree, const BoxType * region) +int r_region_is_empty(rtree_t * rtree, const pcb_box_t * region) { jmp_buf env; int r; @@ -582,7 +582,7 @@ int a_manage = 0, b_manage = 0; int i, old_ax, old_ay, old_bx, old_by; struct rtree_node *new_node; - BoxType *b; + pcb_box_t *b; for (i = 0; i < M_SIZE + 1; i++) { if (node->flags.is_leaf) @@ -754,7 +754,7 @@ split_node(node->parent); } -static inline int contained(struct rtree_node *node, const BoxType * query) +static inline int contained(struct rtree_node *node, const pcb_box_t * query) { if (node->box.X1 > query->X1 || node->box.X2 < query->X2 || node->box.Y1 > query->Y1 || node->box.Y2 < query->Y2) return 0; @@ -762,7 +762,7 @@ } -static inline double penalty(struct rtree_node *node, const BoxType * query) +static inline double penalty(struct rtree_node *node, const pcb_box_t * query) { double score; @@ -776,7 +776,7 @@ return score; } -static void __r_insert_node(struct rtree_node *node, const BoxType * query, int manage, pcb_bool force) +static void __r_insert_node(struct rtree_node *node, const pcb_box_t * query, int manage, pcb_bool force) { #ifdef SLOW_ASSERTS @@ -885,7 +885,7 @@ } } -void r_insert_entry(rtree_t * rtree, const BoxType * which, int man) +void r_insert_entry(rtree_t * rtree, const pcb_box_t * which, int man) { assert(which); assert(which->X1 <= which->X2); @@ -898,7 +898,7 @@ rtree->size++; } -pcb_bool __r_delete(struct rtree_node *node, const BoxType * query) +pcb_bool __r_delete(struct rtree_node *node, const pcb_box_t * query) { int i, flag, mask, a; @@ -989,7 +989,7 @@ return pcb_true; } -pcb_bool r_delete_entry(rtree_t * rtree, const BoxType * box) +pcb_bool r_delete_entry(rtree_t * rtree, const pcb_box_t * box) { pcb_bool r; Index: trunk/src/rtree.h =================================================================== --- trunk/src/rtree.h (revision 4760) +++ trunk/src/rtree.h (revision 4761) @@ -53,12 +53,12 @@ /* create an rtree from the list of boxes. if 'manage' is pcb_true, then * the tree will take ownership of 'boxlist' and free it when the tree * is destroyed. */ -rtree_t *r_create_tree(const BoxType * boxlist[], int N, int manage); +rtree_t *r_create_tree(const pcb_box_t * boxlist[], int N, int manage); /* destroy an rtree */ void r_destroy_tree(rtree_t ** rtree); -pcb_bool r_delete_entry(rtree_t * rtree, const BoxType * which); -void r_insert_entry(rtree_t * rtree, const BoxType * which, int manage); +pcb_bool r_delete_entry(rtree_t * rtree, const pcb_box_t * which); +void r_insert_entry(rtree_t * rtree, const pcb_box_t * which, int manage); /* generic search routine */ /* region_in_search should return pcb_true if "what you're looking for" is @@ -74,14 +74,14 @@ * abort the search if that is the desired behavior. */ -r_dir_t r_search(rtree_t * rtree, const BoxType * starting_region, - r_dir_t (*region_in_search) (const BoxType * region, void *cl), - r_dir_t (*rectangle_in_region) (const BoxType * box, void *cl), void *closure, +r_dir_t r_search(rtree_t * rtree, const pcb_box_t * starting_region, + r_dir_t (*region_in_search) (const pcb_box_t * region, void *cl), + r_dir_t (*rectangle_in_region) (const pcb_box_t * box, void *cl), void *closure, int *num_found); /* -- special-purpose searches build upon r_search -- */ /* return 0 if there are any rectangles in the given region. */ -int r_region_is_empty(rtree_t * rtree, const BoxType * region); +int r_region_is_empty(rtree_t * rtree, const pcb_box_t * region); void __r_dump_tree(struct rtree_node *, int); Index: trunk/src/rubberband.c =================================================================== --- trunk/src/rubberband.c (revision 4760) +++ trunk/src/rubberband.c (revision 4761) @@ -47,17 +47,17 @@ static void CheckLinePointForRubberbandConnection(pcb_layer_t *, LineTypePtr, PointTypePtr, pcb_bool); static void CheckPolygonForRubberbandConnection(pcb_layer_t *, PolygonTypePtr); static void CheckLinePointForRat(pcb_layer_t *, PointTypePtr); -static r_dir_t rubber_callback(const BoxType * b, void *cl); +static r_dir_t rubber_callback(const pcb_box_t * b, void *cl); struct rubber_info { Coord radius; Coord X, Y; LineTypePtr line; - BoxType box; + pcb_box_t box; pcb_layer_t *layer; }; -static r_dir_t rubber_callback(const BoxType * b, void *cl) +static r_dir_t rubber_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct rubber_info *i = (struct rubber_info *) cl; @@ -210,7 +210,7 @@ PointTypePtr point; }; -static r_dir_t rat_callback(const BoxType * box, void *cl) +static r_dir_t rat_callback(const pcb_box_t * box, void *cl) { RatTypePtr rat = (RatTypePtr) box; struct rinfo *i = (struct rinfo *) cl; @@ -281,7 +281,7 @@ info.point = Point; info.type = PCB_TYPE_LINE_POINT; - r_search(PCB->Data->rat_tree, (BoxType *) Point, NULL, rat_callback, &info, NULL); + r_search(PCB->Data->rat_tree, (pcb_box_t *) Point, NULL, rat_callback, &info, NULL); } /* --------------------------------------------------------------------------- Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 4760) +++ trunk/src/search.c (revision 4761) @@ -46,7 +46,7 @@ */ static double PosX, PosY; /* search position for subroutines */ static Coord SearchRadius; -static BoxType SearchBox; +static pcb_box_t SearchBox; static pcb_layer_t *SearchLayer; /* --------------------------------------------------------------------------- @@ -76,7 +76,7 @@ int locked; /* This will be zero or PCB_FLAG_LOCK */ }; -static r_dir_t pinorvia_callback(const BoxType * box, void *cl) +static r_dir_t pinorvia_callback(const pcb_box_t * box, void *cl) { struct ans_info *i = (struct ans_info *) cl; PinTypePtr pin = (PinTypePtr) box; @@ -131,7 +131,7 @@ return pcb_false; } -static r_dir_t pad_callback(const BoxType * b, void *cl) +static r_dir_t pad_callback(const pcb_box_t * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct ans_info *i = (struct ans_info *) cl; @@ -182,7 +182,7 @@ int locked; }; -static r_dir_t line_callback(const BoxType * box, void *cl) +static r_dir_t line_callback(const pcb_box_t * box, void *cl) { struct line_info *i = (struct line_info *) cl; LineTypePtr l = (LineTypePtr) box; @@ -214,7 +214,7 @@ return pcb_false; } -static r_dir_t rat_callback(const BoxType * box, void *cl) +static r_dir_t rat_callback(const pcb_box_t * box, void *cl) { LineTypePtr line = (LineTypePtr) box; struct ans_info *i = (struct ans_info *) cl; @@ -256,7 +256,7 @@ int locked; }; -static r_dir_t arc_callback(const BoxType * box, void *cl) +static r_dir_t arc_callback(const pcb_box_t * box, void *cl) { struct arc_info *i = (struct arc_info *) cl; ArcTypePtr a = (ArcTypePtr) box; @@ -286,7 +286,7 @@ return pcb_false; } -static r_dir_t text_callback(const BoxType * box, void *cl) +static r_dir_t text_callback(const pcb_box_t * box, void *cl) { TextTypePtr text = (TextTypePtr) box; struct ans_info *i = (struct ans_info *) cl; @@ -318,7 +318,7 @@ return pcb_false; } -static r_dir_t polygon_callback(const BoxType * box, void *cl) +static r_dir_t polygon_callback(const pcb_box_t * box, void *cl) { PolygonTypePtr polygon = (PolygonTypePtr) box; struct ans_info *i = (struct ans_info *) cl; @@ -351,7 +351,7 @@ return pcb_false; } -static r_dir_t linepoint_callback(const BoxType * b, void *cl) +static r_dir_t linepoint_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; struct line_info *i = (struct line_info *) cl; @@ -428,7 +428,7 @@ return (pcb_false); } -static r_dir_t name_callback(const BoxType * box, void *cl) +static r_dir_t name_callback(const pcb_box_t * box, void *cl) { TextTypePtr text = (TextTypePtr) box; struct ans_info *i = (struct ans_info *) cl; @@ -474,7 +474,7 @@ return (pcb_false); } -static r_dir_t element_callback(const BoxType * box, void *cl) +static r_dir_t element_callback(const pcb_box_t * box, void *cl) { ElementTypePtr element = (ElementTypePtr) box; struct ans_info *i = (struct ans_info *) cl; @@ -526,7 +526,7 @@ { Coord t = PIN_SIZE(pin) / 2; if (TEST_FLAG(PCB_FLAG_SQUARE, pin)) { - BoxType b; + pcb_box_t b; b.X1 = pin->X - t; b.X2 = pin->X + t; @@ -856,7 +856,7 @@ return range < Radius; } -pcb_bool IsPointInBox(Coord X, Coord Y, BoxTypePtr box, Coord Radius) +pcb_bool IsPointInBox(Coord X, Coord Y, pcb_box_t *box, Coord Radius) { Coord width, height, range; @@ -1012,7 +1012,7 @@ if (!HigherAvail && Type & PCB_TYPE_ELEMENT_NAME && SearchElementNameByLocation(locked, (ElementTypePtr *) pr1, (TextTypePtr *) pr2, (TextTypePtr *) pr3, pcb_false)) { - BoxTypePtr box = &((TextTypePtr) r2)->BoundingBox; + pcb_box_t *box = &((TextTypePtr) r2)->BoundingBox; HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1); HigherAvail = PCB_TYPE_ELEMENT_NAME; } @@ -1019,7 +1019,7 @@ if (!HigherAvail && Type & PCB_TYPE_ELEMENT && SearchElementByLocation(locked, (ElementTypePtr *) pr1, (ElementTypePtr *) pr2, (ElementTypePtr *) pr3, pcb_false)) { - BoxTypePtr box = &((ElementTypePtr) r1)->BoundingBox; + pcb_box_t *box = &((ElementTypePtr) r1)->BoundingBox; HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1); HigherAvail = PCB_TYPE_ELEMENT; } @@ -1060,7 +1060,7 @@ if (Type & PCB_TYPE_POLYGON && SearchPolygonByLocation(locked, (pcb_layer_t **) Result1, (PolygonTypePtr *) Result2, (PolygonTypePtr *) Result3)) { if (HigherAvail) { - BoxTypePtr box = &(*(PolygonTypePtr *) Result2)->BoundingBox; + pcb_box_t *box = &(*(PolygonTypePtr *) Result2)->BoundingBox; double area = (double) (box->X2 - box->X1) * (double) (box->X2 - box->X1); if (HigherBound < area) break; Index: trunk/src/search.h =================================================================== --- trunk/src/search.h (revision 4760) +++ trunk/src/search.h (revision 4761) @@ -153,7 +153,7 @@ pcb_bool IsLineInQuadrangle(PointType p[4], LineTypePtr Line); pcb_bool IsArcInRectangle(Coord, Coord, Coord, Coord, ArcTypePtr); pcb_bool IsPointInPad(Coord, Coord, Coord, PadTypePtr); -pcb_bool IsPointInBox(Coord, Coord, BoxTypePtr, Coord); +pcb_bool IsPointInBox(Coord, Coord, pcb_box_t *, Coord); int SearchObjectByLocation(unsigned, void **, void **, void **, Coord, Coord, Coord); int SearchScreen(Coord, Coord, int, void **, void **, void **); int SearchScreenGridSlop(Coord, Coord, int, void **, void **, void **); Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 4760) +++ trunk/src/select.c (revision 4761) @@ -214,7 +214,7 @@ * returns a list of object IDs matched the search and loads len with the * length of the list. Returns NULL on no match. */ -static long int *ListBlock_(BoxTypePtr Box, pcb_bool Flag, int *len) +static long int *ListBlock_(pcb_box_t *Box, pcb_bool Flag, int *len) { int changed = 0; int used = 0, alloced = 0; @@ -466,7 +466,7 @@ * Flag determines if the block is to be selected or unselected * returns pcb_true if the state of any object has changed */ -pcb_bool SelectBlock(BoxTypePtr Box, pcb_bool Flag) +pcb_bool SelectBlock(pcb_box_t *Box, pcb_bool Flag) { /* do not list, set flag */ return (ListBlock_(Box, Flag, NULL) == NULL) ? pcb_false : pcb_true; @@ -475,7 +475,7 @@ /* ---------------------------------------------------------------------- * List all visible objects within the passed box */ -long int *ListBlock(BoxTypePtr Box, int *len) +long int *ListBlock(pcb_box_t *Box, int *len) { return ListBlock_(Box, 1, len); } Index: trunk/src/select.h =================================================================== --- trunk/src/select.h (revision 4760) +++ trunk/src/select.h (revision 4761) @@ -37,8 +37,8 @@ PCB_TYPE_PIN | PCB_TYPE_PAD | PCB_TYPE_ELEMENT_NAME | PCB_TYPE_RATLINE | PCB_TYPE_ARC) pcb_bool SelectObject(void); -pcb_bool SelectBlock(BoxTypePtr, pcb_bool); -long int *ListBlock(BoxTypePtr Box, int *len); +pcb_bool SelectBlock(pcb_box_t *, pcb_bool); +long int *ListBlock(pcb_box_t *Box, int *len); void *ObjectOperation(pcb_opfunc_t *F, pcb_opctx_t *ctx, int Type, void *Ptr1, void *Ptr2, void *Ptr3); pcb_bool SelectedOperation(pcb_opfunc_t *F, pcb_opctx_t *ctx, pcb_bool Reset, int type); Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 4760) +++ trunk/src/select_act.c (revision 4761) @@ -177,7 +177,7 @@ /* all objects in block */ case F_Block: { - BoxType box; + pcb_box_t box; box.X1 = MIN(Crosshair.AttachedBox.Point1.X, Crosshair.AttachedBox.Point2.X); box.Y1 = MIN(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); @@ -196,7 +196,7 @@ /* select all visible objects */ case F_All: { - BoxType box; + pcb_box_t box; box.X1 = -MAX_COORD; box.Y1 = -MAX_COORD; @@ -329,7 +329,7 @@ /* all objects in block */ case F_Block: { - BoxType box; + pcb_box_t box; box.X1 = MIN(Crosshair.AttachedBox.Point1.X, Crosshair.AttachedBox.Point2.X); box.Y1 = MIN(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); @@ -348,7 +348,7 @@ /* unselect all visible objects */ case F_All: { - BoxType box; + pcb_box_t box; box.X1 = -MAX_COORD; box.Y1 = -MAX_COORD; Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 4760) +++ trunk/src/undo.c (revision 4761) @@ -369,7 +369,7 @@ if (type == PCB_TYPE_ARC) { pcb_layer_t *Layer = (pcb_layer_t *) ptr1; ArcTypePtr a = (ArcTypePtr) ptr2; - r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); old_sa = a->StartAngle; old_da = a->Delta; if (andDraw) @@ -377,7 +377,7 @@ a->StartAngle = Entry->Data.AngleChange.angle[0]; a->Delta = Entry->Data.AngleChange.angle[1]; SetArcBoundingBox(a); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); Entry->Data.AngleChange.angle[0] = old_sa; Entry->Data.AngleChange.angle[1] = old_da; DrawObject(type, ptr1, a); @@ -400,7 +400,7 @@ if (type == PCB_TYPE_ARC) { pcb_layer_t *Layer = (pcb_layer_t *) ptr1; ArcTypePtr a = (ArcTypePtr) ptr2; - r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); old_w = a->Width; old_h = a->Height; if (andDraw) @@ -408,7 +408,7 @@ a->Width = Entry->Data.Move.DX; a->Height = Entry->Data.Move.DY; SetArcBoundingBox(a); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) a, 0); Entry->Data.Move.DX = old_w; Entry->Data.Move.DY = old_h; DrawObject(type, ptr1, a); Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 4760) +++ trunk/src/undo_act.c (revision 4761) @@ -215,7 +215,7 @@ } if (Crosshair.AttachedBox.State == STATE_THIRD) { void *ptr1, *ptr2, *ptr3; - BoxTypePtr bx; + pcb_box_t *bx; /* guaranteed to succeed */ SearchObjectByLocation(PCB_TYPE_ARC, &ptr1, &ptr2, &ptr3, Crosshair.AttachedBox.Point1.X, Crosshair.AttachedBox.Point1.Y, 0); Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 4760) +++ trunk/src_plugins/autocrop/autocrop.c (revision 4761) @@ -65,11 +65,11 @@ { if (Data) { RestoreToPolygon(Data, PCB_TYPE_VIA, Via, Via); - r_delete_entry(Data->via_tree, (BoxType *) Via); + r_delete_entry(Data->via_tree, (pcb_box_t *) Via); } MOVE_VIA_LOWLEVEL(Via, dx, dy); if (Data) { - r_insert_entry(Data->via_tree, (BoxType *) Via, 0); + r_insert_entry(Data->via_tree, (pcb_box_t *) Via, 0); ClearFromPolygon(Data, PCB_TYPE_VIA, Via, Via); } return Via; @@ -79,11 +79,11 @@ { if (Data) { RestoreToPolygon(Data, PCB_TYPE_LINE, Layer, Line); - r_delete_entry(Layer->line_tree, (BoxType *) Line); + r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); } MOVE_LINE_LOWLEVEL(Line, dx, dy); if (Data) { - r_insert_entry(Layer->line_tree, (BoxType *) Line, 0); + r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); ClearFromPolygon(Data, PCB_TYPE_LINE, Layer, Line); } return Line; @@ -93,11 +93,11 @@ { if (Data) { RestoreToPolygon(Data, PCB_TYPE_ARC, Layer, Arc); - r_delete_entry(Layer->arc_tree, (BoxType *) Arc); + r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); } MOVE_ARC_LOWLEVEL(Arc, dx, dy); if (Data) { - r_insert_entry(Layer->arc_tree, (BoxType *) Arc, 0); + r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); ClearFromPolygon(Data, PCB_TYPE_ARC, Layer, Arc); } return Arc; @@ -106,12 +106,12 @@ static void *MyMovePolygonLowLevel(pcb_data_t * Data, pcb_layer_t * Layer, PolygonType * Polygon, Coord dx, Coord dy) { if (Data) { - r_delete_entry(Layer->polygon_tree, (BoxType *) Polygon); + r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); } /* move.c actually only moves points, note no Data/Layer args */ MovePolygonLowLevel(Polygon, dx, dy); if (Data) { - r_insert_entry(Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon, 0); InitClip(Data, Layer, Polygon); } return Polygon; @@ -120,10 +120,10 @@ static void *MyMoveTextLowLevel(pcb_layer_t * Layer, TextType * Text, Coord dx, Coord dy) { if (Layer) - r_delete_entry(Layer->text_tree, (BoxType *) Text); + r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); MOVE_TEXT_LOWLEVEL(Text, dx, dy); if (Layer) - r_insert_entry(Layer->text_tree, (BoxType *) Text, 0); + r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); return Text; } @@ -183,7 +183,7 @@ static int autocrop(int argc, const char **argv, Coord x, Coord y) { Coord dx, dy, pad; - BoxType *box; + pcb_box_t *box; box = GetDataBoundingBox(PCB->Data); /* handy! */ if (!box || (box->X1 == box->X2 || box->Y1 == box->Y2)) { Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 4760) +++ trunk/src_plugins/autoplace/autoplace.c (revision 4761) @@ -210,8 +210,8 @@ */ /*------ r_find_neighbor ------*/ struct r_neighbor_info { - const BoxType *neighbor; - BoxType trap; + const pcb_box_t *neighbor; + pcb_box_t trap; direction_t search_dir; }; #define ROTATEBOX(box) { Coord t;\ @@ -220,10 +220,10 @@ t = (box).X1; (box).X1 = (box).X2; (box).X2 = t;\ } /* helper methods for __r_find_neighbor */ -static r_dir_t __r_find_neighbor_reg_in_sea(const BoxType * region, void *cl) +static r_dir_t __r_find_neighbor_reg_in_sea(const pcb_box_t * region, void *cl) { struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; - BoxType query = *region; + pcb_box_t query = *region; ROTATEBOX_TO_NORTH(query, ni->search_dir); /* ______________ __ trap.y1 __ * \ / |__| query rect. @@ -236,10 +236,10 @@ return R_DIR_NOT_FOUND; } -static r_dir_t __r_find_neighbor_rect_in_reg(const BoxType * box, void *cl) +static r_dir_t __r_find_neighbor_rect_in_reg(const pcb_box_t * box, void *cl) { struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; - BoxType query = *box; + pcb_box_t query = *box; int r; ROTATEBOX_TO_NORTH(query, ni->search_dir); /* ______________ __ trap.y1 __ @@ -260,10 +260,10 @@ /* main r_find_neighbor routine. Returns NULL if no neighbor in the * requested direction. */ -static const BoxType *r_find_neighbor(rtree_t * rtree, const BoxType * box, direction_t search_direction) +static const pcb_box_t *r_find_neighbor(rtree_t * rtree, const pcb_box_t * box, direction_t search_direction) { struct r_neighbor_info ni; - BoxType bbox; + pcb_box_t bbox; ni.neighbor = NULL; ni.trap = *box; @@ -335,7 +335,7 @@ } /* save bounding rectangle */ { - BoxTypePtr box = GetBoxMemory(&bounds); + pcb_box_t *box = GetBoxMemory(&bounds); box->X1 = minx; box->Y1 = miny; box->X2 = maxx; @@ -360,8 +360,8 @@ { BoxListTypePtr thisside; BoxListTypePtr otherside; - BoxTypePtr box; - BoxTypePtr lastbox = NULL; + pcb_box_t *box; + pcb_box_t *lastbox = NULL; Coord thickness; Coord clearance; if (TEST_FLAG(PCB_FLAG_ONSOLDER, element)) { @@ -459,7 +459,7 @@ , ceboxes = { 0, 0, NULL}; struct ebox { - BoxType box; + pcb_box_t box; ElementTypePtr element; }; direction_t dir[4] = { NORTH, EAST, SOUTH, WEST }; @@ -480,8 +480,8 @@ (*boxpp)->element = element; } END_LOOP; - rt_s = r_create_tree((const BoxType **) seboxes.Ptr, seboxes.PtrN, 1); - rt_c = r_create_tree((const BoxType **) ceboxes.Ptr, ceboxes.PtrN, 1); + rt_s = r_create_tree((const pcb_box_t **) seboxes.Ptr, seboxes.PtrN, 1); + rt_c = r_create_tree((const pcb_box_t **) ceboxes.Ptr, ceboxes.PtrN, 1); FreePointerListMemory(&seboxes); FreePointerListMemory(&ceboxes); /* now, for each element, find its neighbor on all four sides */ Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4760) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4761) @@ -220,7 +220,7 @@ typedef enum etype { PAD, PIN, VIA, VIA_SHADOW, LINE, OTHER, EXPANSION_AREA, PLANE, THERMAL } etype; typedef struct routebox { - BoxType box, sbox; + pcb_box_t box, sbox; union { PadTypePtr pad; PinTypePtr pin; @@ -378,13 +378,13 @@ /* --------------------------------------------------------------------------- * some local prototypes */ -static routebox_t *CreateExpansionArea(const BoxType * area, pcb_cardinal_t group, +static routebox_t *CreateExpansionArea(const pcb_box_t * area, pcb_cardinal_t group, routebox_t * parent, pcb_bool relax_edge_requirements, edge_t * edge); static cost_t edge_cost(const edge_t * e, const cost_t too_big); static void best_path_candidate(struct routeone_state *s, edge_t * e, routebox_t * best_target); -static BoxType edge_to_box(const routebox_t * rb, direction_t expand_dir); +static pcb_box_t edge_to_box(const routebox_t * rb, direction_t expand_dir); static void add_or_destroy_edge(struct routeone_state *s, edge_t * e); @@ -456,7 +456,7 @@ return 1; } -int no_planes(const BoxType * b, void *cl) +int no_planes(const pcb_box_t * b, void *cl) { routebox_t *rb = (routebox_t *) b; if (rb->type == PLANE) @@ -543,7 +543,7 @@ static void init_const_box(routebox_t * rb, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord clearance) { - BoxType *bp = (BoxType *) & rb->box; /* note discarding const! */ + pcb_box_t *bp = (pcb_box_t *) & rb->box; /* note discarding const! */ assert(!rb->flags.inited); assert(X1 <= X2 && Y1 <= Y2); bp->X1 = X1 - clearance; @@ -550,7 +550,7 @@ bp->Y1 = Y1 - clearance; bp->X2 = X2 + clearance; bp->Y2 = Y2 + clearance; - bp = (BoxType *) & rb->sbox; + bp = (pcb_box_t *) & rb->sbox; bp->X1 = X1; bp->Y1 = Y1; bp->X2 = X2; @@ -558,12 +558,12 @@ rb->flags.inited = 1; } -static inline BoxType shrink_routebox(const routebox_t * rb) +static inline pcb_box_t shrink_routebox(const routebox_t * rb) { return rb->sbox; } -static inline cost_t box_area(const BoxType b) +static inline cost_t box_area(const pcb_box_t b) { cost_t ans = b.X2 - b.X1; return ans * (b.Y2 - b.Y1); @@ -576,7 +576,7 @@ static inline pcb_bool point_in_shrunk_box(const routebox_t * box, Coord X, Coord Y) { - BoxType b = shrink_routebox(box); + pcb_box_t b = shrink_routebox(box); return point_in_box(&b, X, Y); } @@ -773,16 +773,16 @@ } struct rb_info { - BoxType query; + pcb_box_t query; routebox_t *winner; jmp_buf env; }; -static r_dir_t __found_one_on_lg(const BoxType * box, void *cl) +static r_dir_t __found_one_on_lg(const pcb_box_t * box, void *cl) { struct rb_info *inf = (struct rb_info *) cl; routebox_t *rb = (routebox_t *) box; - BoxType sb; + pcb_box_t sb; if (rb->flags.nonstraight) return R_DIR_NOT_FOUND; @@ -853,7 +853,7 @@ { NetListListType Nets; PointerListType layergroupboxes[MAX_LAYER]; - BoxType bbox; + pcb_box_t bbox; routedata_t *rd; int group, i; @@ -1128,7 +1128,7 @@ /* create r-trees from pointer lists */ for (i = 0; i < max_group; i++) { /* create the r-tree */ - rd->layergrouptree[i] = r_create_tree((const BoxType **) layergroupboxes[i].Ptr, layergroupboxes[i].PtrN, 1); + rd->layergrouptree[i] = r_create_tree((const pcb_box_t **) layergroupboxes[i].Ptr, layergroupboxes[i].PtrN, 1); } if (AutoRouteParameters.use_vias) { @@ -1228,7 +1228,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 cost_t cost_to_layerless_box(const CheapPointType * p, pcb_cardinal_t point_layer, const BoxType * b) +static cost_t cost_to_layerless_box(const CheapPointType * p, pcb_cardinal_t point_layer, const pcb_box_t * b) { CheapPointType p2 = closest_point_in_box(p, b); register cost_t c1, c2; @@ -1294,9 +1294,9 @@ } -static BoxType bloat_routebox(routebox_t * rb) +static pcb_box_t bloat_routebox(routebox_t * rb) { - BoxType r; + pcb_box_t r; Coord clearance; assert(__routebox_is_good(rb)); @@ -1316,7 +1316,7 @@ typedef short pcb_dimension_t; /* makes a line on the solder layer silk surrounding the box */ -static void showbox(BoxType b, pcb_dimension_t thickness, int group) +static void showbox(pcb_box_t b, pcb_dimension_t thickness, int group) { LineTypePtr line; pcb_layer_t *SLayer = LAYER_PTR(group); @@ -1358,7 +1358,7 @@ #if defined(ROUTE_DEBUG) static void showedge(edge_t * e) { - BoxType *b = (BoxType *) e->rb; + pcb_box_t *b = (pcb_box_t *) e->rb; if (ddraw == NULL) return; @@ -1473,7 +1473,7 @@ routebox_t *nearest; cost_t nearest_cost; }; -static r_dir_t __region_within_guess(const BoxType * region, void *cl) +static r_dir_t __region_within_guess(const pcb_box_t * region, void *cl) { struct mincost_target_closure *mtc = (struct mincost_target_closure *) cl; cost_t cost_to_region; @@ -1487,7 +1487,7 @@ return (cost_to_region < mtc->nearest_cost) ? R_DIR_FOUND_CONTINUE : R_DIR_NOT_FOUND; } -static r_dir_t __found_new_guess(const BoxType * box, void *cl) +static r_dir_t __found_new_guess(const pcb_box_t * box, void *cl) { struct mincost_target_closure *mtc = (struct mincost_target_closure *) cl; routebox_t *guess = (routebox_t *) box; @@ -1569,7 +1569,7 @@ static edge_t *CreateEdge2(routebox_t * rb, direction_t expand_dir, edge_t * previous_edge, rtree_t * targets, routebox_t * guess) { - BoxType thisbox; + pcb_box_t thisbox; CheapPointType thiscost, prevcost; cost_t d; @@ -1590,7 +1590,7 @@ } /* create via edge, using previous edge to fill in defaults. */ -static edge_t *CreateViaEdge(const BoxType * area, pcb_cardinal_t group, +static edge_t *CreateViaEdge(const pcb_box_t * area, pcb_cardinal_t group, routebox_t * parent, edge_t * previous_edge, conflict_t to_site_conflict, conflict_t through_site_conflict, rtree_t * targets) { @@ -1656,7 +1656,7 @@ * it will become available if the conflict is elliminated. * That is why we ignore the interior_edge argument. */ -static edge_t *CreateEdgeWithConflicts(const BoxType * interior_edge, +static edge_t *CreateEdgeWithConflicts(const pcb_box_t * interior_edge, routebox_t * container, edge_t * previous_edge, cost_t cost_penalty_to_box, rtree_t * targets) { @@ -1716,9 +1716,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 BoxType edge_to_box(const routebox_t * rb, direction_t expand_dir) +static pcb_box_t edge_to_box(const routebox_t * rb, direction_t expand_dir) { - BoxType b = shrink_routebox(rb); + pcb_box_t b = shrink_routebox(rb); /* narrow box down to just the appropriate edge */ switch (expand_dir) { case NORTH: @@ -1741,13 +1741,13 @@ } struct broken_boxes { - BoxType left, center, right; + pcb_box_t left, center, right; pcb_bool is_valid_left, is_valid_center, is_valid_right; }; -static struct broken_boxes break_box_edge(const BoxType * original, direction_t which_edge, routebox_t * breaker) +static struct broken_boxes break_box_edge(const pcb_box_t * original, direction_t which_edge, routebox_t * breaker) { - BoxType origbox, breakbox; + pcb_box_t origbox, breakbox; struct broken_boxes result; assert(original && breaker); @@ -1782,7 +1782,7 @@ } #ifndef NDEBUG -static int share_edge(const BoxType * child, const BoxType * parent) +static int share_edge(const pcb_box_t * child, const pcb_box_t * parent) { return (child->X1 == parent->X2 || child->X2 == parent->X1 || @@ -1790,7 +1790,7 @@ ((parent->X1 <= child->X1 && child->X2 <= parent->X2) || (parent->Y1 <= child->Y1 && child->Y2 <= parent->Y2)); } -static int edge_intersect(const BoxType * child, const BoxType * parent) +static int edge_intersect(const pcb_box_t * child, const pcb_box_t * parent) { return (child->X1 <= parent->X2) && (child->X2 >= parent->X1) && (child->Y1 <= parent->Y2) && (child->Y2 >= parent->Y1); } @@ -1800,7 +1800,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 BoxType * area, pcb_cardinal_t group, +static routebox_t *CreateExpansionArea(const pcb_box_t * area, pcb_cardinal_t group, routebox_t * parent, pcb_bool relax_edge_requirements, edge_t * src_edge) { routebox_t *rb = (routebox_t *) malloc(sizeof(*rb)); @@ -1840,7 +1840,7 @@ routebox_t *parent; routebox_t *n, *e, *s, *w; Coord keep, bloat; - BoxType inflated, orig; + pcb_box_t inflated, orig; int done; }; @@ -1850,11 +1850,11 @@ * like it wouldn't be seen. We do this while keep the inflated * box as large as possible. */ -static r_dir_t __Expand_this_rect(const BoxType * box, void *cl) +static r_dir_t __Expand_this_rect(const pcb_box_t * box, void *cl) { struct E_result *res = (struct E_result *) cl; routebox_t *rb = (routebox_t *) box; - BoxType rbox; + pcb_box_t rbox; Coord dn, de, ds, dw, bloat; /* we don't see conflicts already encountered */ @@ -1990,7 +1990,7 @@ * looks past the clearance to see these targets even though they * weren't actually touched in the expansion. */ -struct E_result *Expand(rtree_t * rtree, edge_t * e, const BoxType * box) +struct E_result *Expand(rtree_t * rtree, edge_t * e, const pcb_box_t * box) { static struct E_result ans; int noshrink; /* bit field of which edges to not shrink */ @@ -2132,9 +2132,9 @@ * It returns 1 for any fixed blocker that is not part * of this net and zero otherwise. */ -static int blocker_to_heap(heap_t * heap, routebox_t * rb, BoxType * box, direction_t dir) +static int blocker_to_heap(heap_t * heap, routebox_t * rb, pcb_box_t * box, direction_t dir) { - BoxType b = rb->sbox; + pcb_box_t b = rb->sbox; if (rb->style->Clearance > AutoRouteParameters.style->Clearance) b = bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); b = clip_box(&b, box); @@ -2169,7 +2169,7 @@ * (more commonly) create a supper-thin box to provide a * home for an expansion edge. */ -static routebox_t *CreateBridge(const BoxType * area, routebox_t * parent, direction_t dir) +static routebox_t *CreateBridge(const pcb_box_t * area, routebox_t * parent, direction_t dir) { routebox_t *rb = (routebox_t *) malloc(sizeof(*rb)); memset((void *) rb, 0, sizeof(*rb)); @@ -2197,12 +2197,12 @@ * starting box, direction and blocker if any. */ void -moveable_edge(vector_t * result, const BoxType * box, direction_t dir, +moveable_edge(vector_t * result, const pcb_box_t * box, direction_t dir, routebox_t * rb, routebox_t * blocker, edge_t * e, rtree_t * targets, struct routeone_state *s, rtree_t * tree, vector_t * area_vec) { - BoxType b; + pcb_box_t b; assert(box_is_good(box)); b = *box; /* for the cardinal directions, move the box to overlap the @@ -2380,16 +2380,16 @@ struct break_info { heap_t *heap; routebox_t *parent; - BoxType box; + pcb_box_t box; direction_t dir; pcb_bool ignore_source; }; -static r_dir_t __GatherBlockers(const BoxType * box, void *cl) +static r_dir_t __GatherBlockers(const pcb_box_t * box, void *cl) { routebox_t *rb = (routebox_t *) box; struct break_info *bi = (struct break_info *) cl; - BoxType b; + pcb_box_t b; if (bi->parent == rb || rb->flags.touched || bi->parent->parent.expansion_area == rb) return R_DIR_NOT_FOUND; @@ -2409,9 +2409,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 BoxType previous_edge(Coord last, direction_t i, const BoxType * b) +static inline pcb_box_t previous_edge(Coord last, direction_t i, const pcb_box_t * b) { - BoxType db = *b; + pcb_box_t db = *b; switch (i) { case EAST: db.X1 = last; @@ -2464,7 +2464,7 @@ * we still need to break portions of all 4 edges */ if (e->expand_dir == NE || e->expand_dir == SE || e->expand_dir == SW || e->expand_dir == NW) { - BoxType *fb = (BoxType *) & fake.sbox; + pcb_box_t *fb = (pcb_box_t *) & fake.sbox; memset(&fake, 0, sizeof(fake)); *fb = e->rb->sbox; fake.flags.fixed = 1; /* this stops expansion there */ @@ -2473,7 +2473,7 @@ #ifndef NDEBUG /* the routbox_is_good checker wants a lot more! */ fake.flags.inited = 1; - fb = (BoxType *) & fake.box; + fb = (pcb_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; @@ -2568,7 +2568,7 @@ * heap loop because it is special; it can be part of a corner */ routebox_t *blk = (routebox_t *) heap_remove_smallest(heap[dir]); - BoxType b = rb->sbox; + pcb_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 @@ -2576,7 +2576,7 @@ */ if (last > 0) { /* make a corner expansion */ - BoxType db = b; + pcb_box_t db = b; switch (dir) { case EAST: /* possible NE expansion */ @@ -2618,7 +2618,7 @@ * in the direction of the previous edge, * which it belongs to. */ - BoxType db = previous_edge(last, dir, &rb->sbox); + pcb_box_t db = previous_edge(last, dir, &rb->sbox); moveable_edge(edges, &db, (direction_t) (dir - 1), rb, NULL, e, targets, s, NULL, NULL); } if (broke.is_valid_center && !blk->flags.source) @@ -2672,7 +2672,7 @@ if (last > 0) { /* expand the leftover from the prior direction */ - BoxType db = previous_edge(last, dir, &rb->sbox); + pcb_box_t db = previous_edge(last, dir, &rb->sbox); moveable_edge(edges, &db, (direction_t) (dir - 1), rb, NULL, e, targets, s, NULL, NULL); } last = -1; @@ -2680,7 +2680,7 @@ } /* for loop */ /* finally, check for the NW corner now that we've come full circle */ if (first > 0 && last > 0) { - BoxType db = rb->sbox; + pcb_box_t db = rb->sbox; db.X2 = first; db.Y2 = last; moveable_edge(edges, &db, NW, rb, NULL, e, targets, s, NULL, NULL); @@ -2687,12 +2687,12 @@ } else { if (first > 0) { - BoxType db = rb->sbox; + pcb_box_t db = rb->sbox; db.X2 = first; moveable_edge(edges, &db, NORTH, rb, NULL, e, targets, s, NULL, NULL); } else if (last > 0) { - BoxType db = rb->sbox; + pcb_box_t db = rb->sbox; db.Y2 = last; moveable_edge(edges, &db, WEST, rb, NULL, e, targets, s, NULL, NULL); } @@ -2718,15 +2718,15 @@ /* ------------ */ struct foib_info { - const BoxType *box; + const pcb_box_t *box; routebox_t *intersect; jmp_buf env; }; -static r_dir_t foib_rect_in_reg(const BoxType * box, void *cl) +static r_dir_t foib_rect_in_reg(const pcb_box_t * box, void *cl) { struct foib_info *foib = (struct foib_info *) cl; - BoxType rbox; + pcb_box_t rbox; routebox_t *rb = (routebox_t *) box; if (rb->flags.touched) return R_DIR_NOT_FOUND; @@ -2744,7 +2744,7 @@ static routebox_t *FindOneInBox(rtree_t * rtree, routebox_t * rb) { struct foib_info foib; - BoxType r; + pcb_box_t r; r = rb->sbox; foib.box = &r; @@ -2757,14 +2757,14 @@ struct therm_info { routebox_t *plane; - BoxType query; + pcb_box_t query; jmp_buf env; }; -static r_dir_t ftherm_rect_in_reg(const BoxType * box, void *cl) +static r_dir_t ftherm_rect_in_reg(const pcb_box_t * box, void *cl) { routebox_t *rbox = (routebox_t *) box; struct therm_info *ti = (struct therm_info *) cl; - BoxType sq, sb; + pcb_box_t sq, sb; if (rbox->type != PIN && rbox->type != VIA && rbox->type != VIA_SHADOW) return R_DIR_NOT_FOUND; @@ -3011,7 +3011,7 @@ static pcb_bool RD_DrawManhattanLine(routedata_t * rd, - const BoxType * box1, const BoxType * box2, + const pcb_box_t * box1, const pcb_box_t * box2, CheapPointType start, CheapPointType end, Coord halfthick, pcb_cardinal_t group, routebox_t * subnet, pcb_bool is_bad, pcb_bool last_was_x) { @@ -3068,7 +3068,7 @@ /* for smoothing, don't pack traces to min clearance gratuitously */ #if 0 -static void add_clearance(CheapPointType * nextpoint, const BoxType * b) +static void add_clearance(CheapPointType * nextpoint, const pcb_box_t * b) { if (nextpoint->X == b->X1) { if (nextpoint->X + AutoRouteParameters.style->Clearance < (b->X1 + b->X2) / 2) @@ -3116,7 +3116,7 @@ Coord radius = HALF_THICK(AutoRouteParameters.style->Diameter); CheapPointType lastpoint, nextpoint; routebox_t *lastpath; - BoxType b; + pcb_box_t b; assert(subnet->style == AutoRouteParameters.style); /*XXX: because we round up odd thicknesses, there's the possibility that @@ -3272,7 +3272,7 @@ routebox_t * rb, conflict_t conflict, rtree_t * targets, pcb_bool in_plane) { routebox_t *target; - BoxType b; + pcb_box_t b; cost_t cost; assert(__routebox_is_good(rb)); /* find the cheapest target */ @@ -3353,7 +3353,7 @@ { Coord radius, clearance; vetting_t *work; - BoxType region = shrink_routebox(within); + pcb_box_t region = shrink_routebox(within); shrink_box(®ion, shrink); radius = HALF_THICK(AutoRouteParameters.style->Diameter); @@ -3397,8 +3397,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)) { - BoxType cliparea; - BoxType *area = (BoxType *) vector_remove_last(v); + pcb_box_t cliparea; + pcb_box_t *area = (pcb_box_t *) vector_remove_last(v); if (!(i == NO_CONFLICT || AutoRouteParameters.with_conflicts)) { free(area); continue; @@ -3514,7 +3514,7 @@ #endif -static r_dir_t __conflict_source(const BoxType * box, void *cl) +static r_dir_t __conflict_source(const pcb_box_t * box, void *cl) { routebox_t *rb = (routebox_t *) box; if (rb->flags.touched || rb->flags.fixed) @@ -3548,7 +3548,7 @@ struct routeone_status result; routebox_t *p; int seen, i; - const BoxType **target_list; + const pcb_box_t **target_list; int num_targets; rtree_t *targets; /* vector of source edges for filtering */ @@ -3626,7 +3626,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 BoxType **) malloc(num_targets * sizeof(*target_list)); + target_list = (const pcb_box_t **) malloc(num_targets * sizeof(*target_list)); i = 0; LIST_LOOP(from, same_net, p); if (p->flags.target) { @@ -3636,7 +3636,7 @@ #endif } END_LOOP; - targets = r_create_tree((const BoxType **) target_list, i, 0); + targets = r_create_tree((const pcb_box_t **) target_list, i, 0); assert(i <= num_targets); free(target_list); @@ -3651,7 +3651,7 @@ if (p->flags.source && is_layer_group_active[p->group]) { CheapPointType cp; edge_t *e; - BoxType b = shrink_routebox(p); + pcb_box_t b = shrink_routebox(p); #if defined(ROUTE_DEBUG) && defined(DEBUG_SHOW_SOURCES) showroutebox(p); @@ -3734,7 +3734,7 @@ if (e->rb->type == PLANE) { routebox_t *pin = FindThermable(targets, e->rb); if (pin) { - BoxType b = shrink_routebox(pin); + pcb_box_t b = shrink_routebox(pin); edge_t *ne; routebox_t *nrb; assert(pin->flags.target); @@ -3777,7 +3777,7 @@ /* we have hit a plane */ edge_t *ne; routebox_t *nrb; - BoxType b = shrink_routebox(e->rb); + pcb_box_t b = shrink_routebox(e->rb); /* limit via region to that inside the plane */ clip_box(&b, &intersecting->sbox); nrb = CreateExpansionArea(&b, e->rb->group, e->rb, pcb_true, e); @@ -3806,7 +3806,7 @@ goto dontexpand; else if (0) { /* XXX: disabling this causes no via collisions. */ - BoxType a = bloat_routebox(intersecting), b; + pcb_box_t a = bloat_routebox(intersecting), b; edge_t *ne; int i, j; /* something intersects this via candidate. split via candidate @@ -3879,7 +3879,7 @@ if (1) { routebox_t *nrb; struct E_result *ans; - BoxType b; + pcb_box_t b; vector_t *broken; if (e->flags.is_interior) { assert(AutoRouteParameters.with_conflicts); /* no interior edges unless @@ -4052,7 +4052,7 @@ } #ifndef NDEBUG -r_dir_t bad_boy(const BoxType * b, void *cl) +r_dir_t bad_boy(const pcb_box_t * b, void *cl) { routebox_t *box = (routebox_t *) b; if (box->type == EXPANSION_AREA) @@ -4063,7 +4063,7 @@ pcb_bool no_expansion_boxes(routedata_t * rd) { int i; - BoxType big; + pcb_box_t big; big.X1 = 0; big.X2 = MAX_COORD; big.Y1 = 0; @@ -4091,7 +4091,7 @@ } } -static r_dir_t ripout_livedraw_obj_cb(const BoxType * b, void *cl) +static r_dir_t ripout_livedraw_obj_cb(const pcb_box_t * b, void *cl) { routebox_t *box = (routebox_t *) b; ripout_livedraw_obj(box); @@ -4150,7 +4150,7 @@ LIST_LOOP(rd->first_net, different_net, net); { double area; - BoxType bb = shrink_routebox(net); + pcb_box_t bb = shrink_routebox(net); LIST_LOOP(net, same_net, p); { MAKEMIN(bb.X1, p->sbox.X1); @@ -4266,7 +4266,7 @@ LIST_LOOP(net, same_net, p); { #ifdef NET_HEAP - BoxType b = shrink_routebox(p); + pcb_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 */ heap_insert(net_heap, (float) (b.X2 - b.X1) * @@ -4391,7 +4391,7 @@ jmp_buf env; }; -static r_dir_t fpin_rect(const BoxType * b, void *cl) +static r_dir_t fpin_rect(const pcb_box_t * b, void *cl) { PinTypePtr pin = (PinTypePtr) b; struct fpin_info *info = (struct fpin_info *) cl; @@ -4402,7 +4402,7 @@ return R_DIR_NOT_FOUND; } -static int FindPin(const BoxType * box, PinTypePtr * pin) +static int FindPin(const pcb_box_t * box, PinTypePtr * pin) { struct fpin_info info; @@ -4452,7 +4452,7 @@ if (p->type == LINE) { Coord halfwidth = HALF_THICK(p->style->Thick); double th = halfwidth * 2 + 1; - BoxType b; + pcb_box_t b; assert(p->parent.line == NULL); /* orthogonal; thickness is 2*halfwidth */ /* flip coordinates, if bl_to_ur */ @@ -4482,7 +4482,7 @@ else if (p->type == VIA || p->type == VIA_SHADOW) { routebox_t *pp = (p->type == VIA_SHADOW) ? p->parent.via_shadow : p; Coord radius = HALF_THICK(pp->style->Diameter); - BoxType b = shrink_routebox(p); + pcb_box_t b = shrink_routebox(p); total_via_count++; assert(pp->type == VIA); if (pp->parent.via == NULL) { @@ -4688,7 +4688,7 @@ gui->progress(0, 0, NULL); if (conf_core.editor.live_routing) { int i; - BoxType big = { 0, 0, MAX_COORD, MAX_COORD }; + pcb_box_t big = { 0, 0, MAX_COORD, MAX_COORD }; for (i = 0; i < max_group; i++) { r_search(rd->layergrouptree[i], &big, NULL, ripout_livedraw_obj_cb, NULL, NULL); } Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 4760) +++ trunk/src_plugins/autoroute/mtspace.c (revision 4761) @@ -52,7 +52,7 @@ */ typedef struct mtspacebox { - const BoxType box; + const pcb_box_t box; Coord clearance; /* the smallest clearance around this box */ } mtspacebox_t; @@ -81,13 +81,13 @@ #define SPECIAL 823157 -mtspacebox_t *mtspace_create_box(const BoxType * box, Coord clearance) +mtspacebox_t *mtspace_create_box(const pcb_box_t * box, Coord clearance) { mtspacebox_t *mtsb; assert(box_is_good(box)); mtsb = (mtspacebox_t *) malloc(sizeof(*mtsb)); /* the box was sent to us pre-bloated by the clearance amount */ - *((BoxTypePtr) & mtsb->box) = *box; + *((pcb_box_t *) & mtsb->box) = *box; mtsb->clearance = clearance; assert(box_is_good(&mtsb->box)); return mtsb; @@ -120,12 +120,12 @@ struct mts_info { Coord clearance; - BoxType box; + pcb_box_t box; rtree_t *tree; jmp_buf env; }; -static r_dir_t mts_remove_one(const BoxType * b, void *cl) +static r_dir_t mts_remove_one(const pcb_box_t * b, void *cl) { struct mts_info *info = (struct mts_info *) cl; mtspacebox_t *box = (mtspacebox_t *) b; @@ -153,17 +153,17 @@ } /* add a space-filler to the empty space representation. */ -void mtspace_add(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord clearance) +void mtspace_add(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, Coord clearance) { mtspacebox_t *filler = mtspace_create_box(box, clearance); - r_insert_entry(which_tree(mtspace, which), (const BoxType *) filler, 1); + r_insert_entry(which_tree(mtspace, which), (const pcb_box_t *) filler, 1); } /* remove a space-filler from the empty space representation. */ -void mtspace_remove(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord clearance) +void mtspace_remove(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, Coord clearance) { struct mts_info cl; - BoxType small_search; + pcb_box_t small_search; cl.clearance = clearance; cl.box = *box; @@ -176,7 +176,7 @@ } struct query_closure { - BoxType *cbox; + pcb_box_t *cbox; heap_or_vector checking; heap_or_vector touching; CheapPointType *desired; @@ -185,7 +185,7 @@ pcb_bool touch_is_vec; }; -static inline void heap_append(heap_t * heap, CheapPointType * desired, BoxType * newone) +static inline void heap_append(heap_t * heap, CheapPointType * desired, pcb_box_t * newone) { CheapPointType p = *desired; assert(desired); @@ -193,7 +193,7 @@ heap_insert(heap, PCB_ABS(p.X - desired->X) + (p.Y - desired->Y), newone); } -static inline void append(struct query_closure *qc, BoxType * newone) +static inline void append(struct query_closure *qc, pcb_box_t * newone) { if (qc->desired) heap_append(qc->checking.h, qc->desired, newone); @@ -205,7 +205,7 @@ * First check if it does intersect, then break it into * overlaping regions that don't intersect this box. */ -static r_dir_t query_one(const BoxType * box, void *cl) +static r_dir_t query_one(const pcb_box_t * box, void *cl) { struct query_closure *qc = (struct query_closure *) cl; mtspacebox_t *mtsb = (mtspacebox_t *) box; @@ -226,7 +226,7 @@ Coord Y1 = qc->cbox->Y1; Coord Y2 = mtsb->box.Y1 + shrink; if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { - BoxType *newone = (BoxType *) malloc(sizeof(BoxType)); + pcb_box_t *newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); newone->X1 = qc->cbox->X1; newone->X2 = qc->cbox->X2; newone->Y1 = Y1; @@ -239,7 +239,7 @@ Coord Y1 = mtsb->box.Y2 - shrink; Coord Y2 = qc->cbox->Y2; if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { - BoxType *newone = (BoxType *) malloc(sizeof(BoxType)); + pcb_box_t *newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); newone->X1 = qc->cbox->X1; newone->X2 = qc->cbox->X2; newone->Y2 = qc->cbox->Y2; @@ -252,8 +252,8 @@ Coord X1 = qc->cbox->X1; Coord X2 = mtsb->box.X1 + shrink; if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { - BoxType *newone; - newone = (BoxType *) malloc(sizeof(BoxType)); + pcb_box_t *newone; + newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); newone->Y1 = qc->cbox->Y1; newone->Y2 = qc->cbox->Y2; newone->X1 = qc->cbox->X1; @@ -266,7 +266,7 @@ Coord X1 = mtsb->box.X2 - shrink; Coord X2 = qc->cbox->X2; if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { - BoxType *newone = (BoxType *) malloc(sizeof(BoxType)); + pcb_box_t *newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); newone->Y1 = qc->cbox->Y1; newone->Y2 = qc->cbox->Y2; newone->X2 = qc->cbox->X2; @@ -297,11 +297,11 @@ */ static void qloop(struct query_closure *qc, rtree_t * tree, heap_or_vector res, pcb_bool is_vec) { - BoxType *cbox; + pcb_box_t *cbox; int n; while (!(qc->desired ? heap_is_empty(qc->checking.h) : vector_is_empty(qc->checking.v))) { - cbox = qc->desired ? (BoxTypePtr) heap_remove_smallest(qc->checking.h) : (BoxTypePtr) vector_remove_last(qc->checking.v); + cbox = qc->desired ? (pcb_box_t *) heap_remove_smallest(qc->checking.h) : (pcb_box_t *) vector_remove_last(qc->checking.v); if (setjmp(qc->env) == 0) { assert(box_is_good(cbox)); qc->cbox = cbox; @@ -369,7 +369,7 @@ * to search harder for such regions if the computation becomes * necessary. */ -vetting_t *mtspace_query_rect(mtspace_t * mtspace, const BoxType * region, +vetting_t *mtspace_query_rect(mtspace_t * mtspace, const pcb_box_t * region, Coord radius, Coord clearance, vetting_t * work, vector_t * free_space_vec, @@ -384,7 +384,7 @@ assert(hi_conflict_space_vec); /* search out to anything that might matter */ if (region) { - BoxType *cbox; + pcb_box_t *cbox; assert(work == NULL); assert(box_is_good(region)); assert(vector_is_empty(free_space_vec)); @@ -393,7 +393,7 @@ work = (vetting_t *) malloc(sizeof(vetting_t)); work->clearance = clearance; work->radius = radius; - cbox = (BoxType *) malloc(sizeof(BoxType)); + cbox = (pcb_box_t *) malloc(sizeof(pcb_box_t)); *cbox = bloat_box(region, clearance + radius); if (desired) { work->untested.h = heap_create(); Index: trunk/src_plugins/autoroute/mtspace.h =================================================================== --- trunk/src_plugins/autoroute/mtspace.h (revision 4760) +++ trunk/src_plugins/autoroute/mtspace.h (revision 4761) @@ -56,15 +56,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 BoxType * box, mtspace_type_t which, Coord clearance); +void mtspace_add(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, Coord 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 BoxType * box, mtspace_type_t which, Coord clearance); +void mtspace_remove(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, Coord clearance); -vetting_t *mtspace_query_rect(mtspace_t * mtspace, const BoxType * region, +vetting_t *mtspace_query_rect(mtspace_t * mtspace, const pcb_box_t * region, Coord radius, Coord clearance, vetting_t * work, vector_t * free_space_vec, Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 4760) +++ trunk/src_plugins/export_dxf/dxf.c (revision 4761) @@ -4228,7 +4228,7 @@ const char *dxf_fnbase; int i; static int saved_layer_stack[MAX_LAYER]; - BoxType region; + pcb_box_t region; int save_ons[MAX_LAYER + 2]; int tmp[128], len; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 4760) +++ trunk/src_plugins/export_gcode/gcode.c (revision 4761) @@ -333,7 +333,7 @@ void gcode_start_png_export() { - BoxType region; + pcb_box_t region; region.X1 = 0; region.Y1 = 0; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 4760) +++ trunk/src_plugins/export_gerber/gerber.c (revision 4761) @@ -391,7 +391,7 @@ } } -static BoxType region; +static pcb_box_t region; /* Very similar to layer_type_to_file_name() but appends only a three-character suffix compatible with Eagle's defaults. */ Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 4760) +++ trunk/src_plugins/export_nelma/nelma.c (revision 4761) @@ -580,7 +580,7 @@ void nelma_start_png_export() { - BoxType region; + pcb_box_t region; region.X1 = 0; region.Y1 = 0; Index: trunk/src_plugins/export_openscad/scad.c =================================================================== --- trunk/src_plugins/export_openscad/scad.c (revision 4760) +++ trunk/src_plugins/export_openscad/scad.c (revision 4761) @@ -501,7 +501,7 @@ int i; int inner_layers; float layer_spacing, layer_offset, cut_offset = 0.; - BoxType region; + pcb_box_t region; pcb_layer_t *layer; conf_force_set_bool(conf_core.editor.thin_draw, 0); Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 4760) +++ trunk/src_plugins/export_png/png.c (revision 4761) @@ -409,7 +409,7 @@ } static const char *filename; -static BoxType *bounds; +static pcb_box_t *bounds; static int in_mono, as_shown; static void parse_bloat(const char *str) @@ -431,7 +431,7 @@ { int i; static int saved_layer_stack[MAX_LAYER]; - BoxType region; + pcb_box_t region; f = the_file; @@ -601,7 +601,7 @@ { int save_ons[MAX_LAYER + 2]; int i; - BoxType *bbox; + pcb_box_t *bbox; int w, h; int xmax, ymax, dpi; const char *fmt; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 4760) +++ trunk/src_plugins/export_ps/eps.c (revision 4761) @@ -175,7 +175,7 @@ } static const char *filename; -static BoxType *bounds; +static pcb_box_t *bounds; static int in_mono, as_shown; void eps_hid_export_to_file(FILE * the_file, HID_Attr_Val * options) @@ -182,7 +182,7 @@ { int i; static int saved_layer_stack[MAX_LAYER]; - BoxType region; + pcb_box_t region; conf_force_set_bool(conf_core.editor.thin_draw, 0); conf_force_set_bool(conf_core.editor.thin_draw_poly, 0); Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 4760) +++ trunk/src_plugins/export_ps/ps.c (revision 4761) @@ -404,7 +404,7 @@ double scale_factor; - BoxType region; + pcb_box_t region; HID_Attr_Val ps_values[NUM_OPTIONS]; @@ -1216,7 +1216,7 @@ return *c1 < *c2; } -static void ps_fill_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box) +static void ps_fill_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box) { /* Ignore clip_box, just draw everything */ Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 4760) +++ trunk/src_plugins/export_svg/svg.c (revision 4761) @@ -194,7 +194,7 @@ void svg_hid_export_to_file(FILE * the_file, HID_Attr_Val * options) { static int saved_layer_stack[MAX_LAYER]; - BoxType region; + pcb_box_t region; region.X1 = 0; region.Y1 = 0; Index: trunk/src_plugins/gl/hidgl.c =================================================================== --- trunk/src_plugins/gl/hidgl.c (revision 4760) +++ trunk/src_plugins/gl/hidgl.c (revision 4761) @@ -97,7 +97,7 @@ global_depth = depth; } -void hidgl_draw_grid(BoxType * drawn_area) +void hidgl_draw_grid(pcb_box_t * drawn_area) { static GLfloat *points = 0; static int npoints = 0; @@ -547,7 +547,7 @@ double scale; }; -static r_dir_t do_hole(const BoxType * b, void *cl) +static r_dir_t do_hole(const pcb_box_t * b, void *cl) { struct do_hole_info *info = cl; PLINE *curc = (PLINE *) b; @@ -566,7 +566,7 @@ static int assigned_bits = 0; /* FIXME: JUST DRAWS THE FIRST PIECE.. TODO: SUPPORT FOR FULLPOLY POLYGONS */ -void hidgl_fill_pcb_polygon(PolygonType * poly, const BoxType * clip_box, double scale) +void hidgl_fill_pcb_polygon(PolygonType * poly, const pcb_box_t * clip_box, double scale) { int vertex_count = 0; PLINE *contour; Index: trunk/src_plugins/gl/hidgl.h =================================================================== --- trunk/src_plugins/gl/hidgl.h (revision 4760) +++ trunk/src_plugins/gl/hidgl.h (revision 4761) @@ -60,7 +60,7 @@ hidgl_add_triangle_3D(buffer, x1, y1, global_depth, x2, y2, global_depth, x3, y3, global_depth); } -void hidgl_draw_grid(BoxType * drawn_area); +void hidgl_draw_grid(pcb_box_t * drawn_area); void hidgl_set_depth(float depth); void hidgl_draw_line(int cap, Coord width, Coord x1, Coord y1, Coord x2, Coord y2, double scale); void hidgl_draw_arc(Coord width, Coord vx, Coord vy, Coord vrx, Coord vry, Angle start_angle, Angle delta_angle, double scale); @@ -67,7 +67,7 @@ void hidgl_draw_rect(Coord x1, Coord y1, Coord x2, Coord y2); void hidgl_fill_circle(Coord vx, Coord vy, Coord vr, double scale); void hidgl_fill_polygon(int n_coords, Coord * x, Coord * y); -void hidgl_fill_pcb_polygon(PolygonType * poly, const BoxType * clip_box, double scale); +void hidgl_fill_pcb_polygon(PolygonType * poly, const pcb_box_t * clip_box, double scale); void hidgl_fill_rect(Coord x1, Coord y1, Coord x2, Coord y2); void hidgl_init(void); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.h (revision 4760) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.h (revision 4761) @@ -36,7 +36,7 @@ } EndCapStyle; typedef void *PolygonType; -typedef void *BoxType; +typedef void *pcb_box_t; #endif typedef struct hid_s { Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c (revision 4760) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c (revision 4761) @@ -54,7 +54,7 @@ { hid_t *h = hid_gpmi_data_get(exporter); int save_ons[MAX_LAYER + 2]; - BoxType region; + pcb_box_t region; h->result = options; gpmi_event(h->module, HIDE_do_export_start, h); @@ -151,7 +151,7 @@ gpmi_event(h->module, HIDE_fill_polygon, h, gc, x, y); } -void gpmi_hid_fill_pcb_polygon(hidGC gc, PolygonType *poly, const BoxType *clip_box) +void gpmi_hid_fill_pcb_polygon(hidGC gc, PolygonType *poly, const pcb_box_t *clip_box) { /* TODO */ } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h (revision 4760) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h (revision 4761) @@ -15,7 +15,7 @@ void gpmi_hid_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); void gpmi_hid_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); void gpmi_hid_fill_polygon(hidGC gc, int n_coords, Coord *x, Coord *y); -void gpmi_hid_fill_pcb_polygon(hidGC gc, PolygonType *poly, const BoxType *clip_box); +void gpmi_hid_fill_pcb_polygon(hidGC gc, PolygonType *poly, const pcb_box_t *clip_box); void gpmi_hid_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); void gpmi_hid_fill_pcb_pv(hidGC fg_gc, hidGC bg_gc, PinType *pad, pcb_bool drawHole, pcb_bool mask); void gpmi_hid_fill_pcb_pad(hidGC gc, PadType * pad, pcb_bool clear, pcb_bool mask); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h (revision 4760) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h (revision 4761) @@ -257,8 +257,8 @@ void draw_rect(dctx_t *ctx, int x1_, int y1_, int x2_, int y2_); void fill_circle(dctx_t *ctx, int cx_, int cy_, int radius_); void fill_polygon(dctx_t *ctx, int n_ints_, int *x_, int *y_); -void fill_pcb_polygon(dctx_t *ctx, PolygonType *poly, const BoxType *clip_box); -void thindraw_pcb_polygon(dctx_t *ctx, PolygonType *poly, const BoxType *clip_box); +void fill_pcb_polygon(dctx_t *ctx, PolygonType *poly, const pcb_box_t *clip_box); +void thindraw_pcb_polygon(dctx_t *ctx, PolygonType *poly, const pcb_box_t *clip_box); void fill_pcb_pad(dctx_t *ctx, PadType *pad, pcb_bool clip, pcb_bool mask); void thindraw_pcb_pad(dctx_t *ctx, PadType *pad, pcb_bool clip, pcb_bool mask); void fill_pcb_pv(hidGC fg_gc, hidGC bg_gc, PinType *pv, pcb_bool drawHole, pcb_bool mask); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c (revision 4760) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c (revision 4761) @@ -31,7 +31,7 @@ } } -static r_dir_t search_callback (const BoxType * b, void *cl) +static r_dir_t search_callback (const pcb_box_t * b, void *cl) { search_append(cl, (void *)b); return R_DIR_FOUND_CONTINUE; @@ -56,7 +56,7 @@ int layout_search_box(const char *search_ID, layout_object_mask_t obj_types, int x1, int y1, int x2, int y2) { - BoxType spot; + pcb_box_t spot; layout_search_t *s = new_search(search_ID); spot.X1 = x1; Index: trunk/src_plugins/hid_gtk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4760) +++ trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4761) @@ -745,7 +745,7 @@ static void redraw_region(GdkRectangle * rect) { int eleft, eright, etop, ebottom; - BoxType region; + pcb_box_t region; render_priv *priv = gport->render_priv; if (!gport->pixmap) @@ -1185,7 +1185,7 @@ GdkDrawable *save_drawable; view_data save_view; int save_width, save_height; - BoxType region; + pcb_box_t region; render_priv *priv = gport->render_priv; save_drawable = gport->drawable; Index: trunk/src_plugins/hid_gtk/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4760) +++ trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4761) @@ -172,7 +172,7 @@ return rv; } -static void ghid_draw_grid(BoxTypePtr drawn_area) +static void ghid_draw_grid(pcb_box_t *drawn_area) { if (Vz(PCB->Grid) < MIN_GRID_DISTANCE) return; @@ -520,7 +520,7 @@ hidgl_fill_polygon(n_coords, x, y); } -void ghid_fill_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box) +void ghid_fill_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box) { USE_GC(gc); @@ -527,7 +527,7 @@ hidgl_fill_pcb_polygon(poly, clip_box, gport->view.coord_per_px); } -void ghid_thindraw_pcb_polygon(hidGC gc, PolygonType * poly, const BoxType * clip_box) +void ghid_thindraw_pcb_polygon(hidGC gc, PolygonType * poly, const pcb_box_t * clip_box) { common_thindraw_pcb_polygon(gc, poly, clip_box); ghid_set_alpha_mult(gc, 0.25); @@ -780,7 +780,7 @@ { render_priv *priv = port->render_priv; GtkAllocation allocation; - BoxType region; + pcb_box_t region; gtk_widget_get_allocation(widget, &allocation); @@ -987,7 +987,7 @@ GdkGLDrawable *gldrawable; view_data save_view; int save_width, save_height; - BoxType region; + pcb_box_t region; save_view = gport->view; save_width = gport->width; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 4760) +++ trunk/src_plugins/hid_lesstif/main.c (revision 4761) @@ -739,7 +739,7 @@ { int i = 0; time_t start, end; - BoxType region; + pcb_box_t region; Drawable save_main; save_main = main_pixmap; @@ -2359,7 +2359,7 @@ { if (need_redraw) { int mx, my; - BoxType region; + pcb_box_t region; lesstif_use_mask(0); pixmap = main_pixmap; mx = view_width; @@ -3463,7 +3463,7 @@ static void pinout_callback(Widget da, PinoutData * pd, XmDrawingAreaCallbackStruct * cbs) { - BoxType region; + pcb_box_t region; int save_vx, save_vy, save_vw, save_vh; int save_fx, save_fy; double save_vz; @@ -3546,7 +3546,7 @@ { double scale; Widget da; - BoxType *extents; + pcb_box_t *extents; PinoutData *pd; for (pd = pinouts; pd; pd = pd->next) Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 4760) +++ trunk/src_plugins/hid_remote/remote.c (revision 4761) @@ -82,7 +82,7 @@ static int remote_stay; static void remote_do_export(HID_Attr_Val * options) { - BoxType region; + pcb_box_t region; region.X1 = 0; region.Y1 = 0; region.X2 = PCB->MaxWidth; Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 4760) +++ trunk/src_plugins/io_kicad/write.c (revision 4761) @@ -613,7 +613,7 @@ gdl_iterator_t it; ArcType *arc; ArcType localArc; /* for converting ellipses to circular arcs */ - BoxType *boxResult; /* for figuring out arc ends */ + pcb_box_t *boxResult; /* for figuring out arc ends */ pcb_cardinal_t currentLayer = number; Coord radius, xStart, yStart, xEnd, yEnd; int copperStartX; /* used for mapping geda copper arcs onto kicad copper lines */ @@ -804,7 +804,7 @@ LineType *line; ArcType *arc; ElementType *element; - BoxType *boxResult; + pcb_box_t *boxResult; Coord arcStartX, arcStartY, arcEndX, arcEndY; /* for arc exporting */ @@ -1131,7 +1131,7 @@ arclist_foreach(&element->Arc, &it, arc) { - BoxType *boxResult = GetArcEnds(arc); + pcb_box_t *boxResult = GetArcEnds(arc); arcStartX = boxResult->X1; arcStartY = boxResult->Y1; arcEndX = boxResult->X2; Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 4760) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 4761) @@ -574,7 +574,7 @@ gdl_iterator_t it; ArcType *arc; ArcType localArc; /* for converting ellipses to circular arcs */ - BoxType *boxResult; /* for figuring out arc ends */ + pcb_box_t *boxResult; /* for figuring out arc ends */ pcb_cardinal_t currentLayer = number; Coord radius, xStart, yStart, xEnd, yEnd; int copperStartX; /* used for mapping geda copper arcs onto kicad copper lines */ @@ -764,7 +764,7 @@ LineType *line; ArcType *arc; ElementType *element; - BoxType *boxResult; + pcb_box_t *boxResult; Coord arcStartX, arcStartY, arcEndX, arcEndY; /* for arc exporting */ @@ -1144,7 +1144,7 @@ arclist_foreach(&element->Arc, &it, arc) { - BoxType *boxResult = GetArcEnds(arc); + pcb_box_t *boxResult = GetArcEnds(arc); arcStartX = boxResult->X1; arcStartY = boxResult->Y1; arcEndX = boxResult->X2; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 4760) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 4761) @@ -2397,7 +2397,7 @@ SetPolygonBoundingBox (Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = r_create_tree (NULL, 0, 0); - r_insert_entry (Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry (Layer->polygon_tree, (pcb_box_t *) Polygon, 0); } } #line 2404 "parse_y.c" /* yacc.c:1646 */ Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 4760) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 4761) @@ -1175,7 +1175,7 @@ SetPolygonBoundingBox (Polygon); if (!Layer->polygon_tree) Layer->polygon_tree = r_create_tree (NULL, 0, 0); - r_insert_entry (Layer->polygon_tree, (BoxType *) Polygon, 0); + r_insert_entry (Layer->polygon_tree, (pcb_box_t *) Polygon, 0); } } ; Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 4760) +++ trunk/src_plugins/jostle/jostle.c (revision 4761) @@ -128,11 +128,11 @@ * n->contours->next would be the start of the inner holes (irrelevant * for bounding box). */ -static BoxType POLYAREA_boundingBox(POLYAREA * a) +static pcb_box_t POLYAREA_boundingBox(POLYAREA * a) { POLYAREA *n; PLINE *pa; - BoxType box; + pcb_box_t box; int first = 1; n = a; @@ -347,7 +347,7 @@ } struct info { - BoxType box; + pcb_box_t box; POLYAREA *brush; pcb_layer_t *layer; POLYAREA *smallest; @@ -366,7 +366,7 @@ /*! * Process lines that intersect our 'brush'. */ -static r_dir_t jostle_callback(const BoxType * targ, void *private) +static r_dir_t jostle_callback(const pcb_box_t * targ, void *private) { LineType *line = (LineType *) targ; struct info *info = private; Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 4760) +++ trunk/src_plugins/loghid/hid-logger.c (revision 4761) @@ -134,12 +134,12 @@ delegatee_->fill_polygon(gc, n_coords, x, y); } -static void log_fill_pcb_polygon(hidGC gc, PolygonType *poly, const BoxType *clip_box) { +static void log_fill_pcb_polygon(hidGC gc, PolygonType *poly, const pcb_box_t *clip_box) { pcb_fprintf(out_, "fill_pcb_polygon(gc, poly->PointN=%d, ...)\n", poly->PointN); delegatee_->fill_pcb_polygon(gc, poly, clip_box); } -static void log_thindraw_pcb_polygon(hidGC gc, PolygonType *poly, const BoxType *clip_box) { +static void log_thindraw_pcb_polygon(hidGC gc, PolygonType *poly, const pcb_box_t *clip_box) { pcb_fprintf(out_, "thindraw_pcb_polygon(gc, poly->PointN=%d, ...)\n", poly->PointN); delegatee_->thindraw_pcb_polygon(gc, poly, clip_box); } Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 4760) +++ trunk/src_plugins/polystitch/polystitch.c (revision 4761) @@ -208,8 +208,8 @@ dup_endpoints(inner_poly); dup_endpoints(outer_poly); - r_delete_entry(poly_layer->polygon_tree, (BoxType *) inner_poly); - r_delete_entry(poly_layer->polygon_tree, (BoxType *) outer_poly); + r_delete_entry(poly_layer->polygon_tree, (pcb_box_t *) inner_poly); + r_delete_entry(poly_layer->polygon_tree, (pcb_box_t *) outer_poly); for (i = 0; i < inner_poly->PointN; i++) CreateNewPointInPolygon(outer_poly, inner_poly->Points[i].X, inner_poly->Points[i].Y); @@ -218,7 +218,7 @@ outer_poly->NoHolesValid = 0; SetPolygonBoundingBox(outer_poly); - r_insert_entry(poly_layer->polygon_tree, (BoxType *) outer_poly, 0); + r_insert_entry(poly_layer->polygon_tree, (pcb_box_t *) outer_poly, 0); RemoveExcessPolygonPoints(poly_layer, outer_poly); InitClip(PCB->Data, poly_layer, outer_poly); DrawPolygon(poly_layer, outer_poly); Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 4760) +++ trunk/src_plugins/puller/puller.c (revision 4761) @@ -274,7 +274,7 @@ /* */ /*****************************************************************************/ -static r_dir_t line_callback(const BoxType * b, void *cl) +static r_dir_t line_callback(const pcb_box_t * b, void *cl) { /* pcb_layer_t *layer = (pcb_layer_t *)cl; */ LineTypePtr l = (LineTypePtr) b; @@ -300,7 +300,7 @@ return R_DIR_FOUND_CONTINUE; } -static r_dir_t arc_callback(const BoxType * b, void *cl) +static r_dir_t arc_callback(const pcb_box_t * b, void *cl) { /* pcb_layer_t *layer = (pcb_layer_t *) cl; */ ArcTypePtr a = (ArcTypePtr) b; @@ -336,7 +336,7 @@ static int find_pair(int Px, int Py) { - BoxType spot; + pcb_box_t spot; #if TRACE1 pcb_printf("\nPuller find_pair at %#mD\n", Crosshair.X, Crosshair.Y); @@ -647,7 +647,7 @@ #define NEAR(a,b) ((a) <= (b) + 2 && (a) >= (b) - 2) -static r_dir_t find_pair_line_callback(const BoxType * b, void *cl) +static r_dir_t find_pair_line_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; #if TRACE1 @@ -682,7 +682,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t find_pair_arc_callback(const BoxType * b, void *cl) +static r_dir_t find_pair_arc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; Extra *e = ARC2EXTRA(arc); @@ -710,7 +710,7 @@ static void find_pairs_1(void *me, Extra ** e, int x, int y) { FindPairCallbackStruct fpcs; - BoxType b; + pcb_box_t b; if (*e) return; @@ -749,7 +749,7 @@ return 0; } -static r_dir_t find_pair_pinline_callback(const BoxType * b, void *cl) +static r_dir_t find_pair_pinline_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; PinTypePtr pin = (PinTypePtr) cl; @@ -781,7 +781,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t find_pair_pinarc_callback(const BoxType * b, void *cl) +static r_dir_t find_pair_pinarc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; PinTypePtr pin = (PinTypePtr) cl; @@ -837,7 +837,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t find_pair_padline_callback(const BoxType * b, void *cl) +static r_dir_t find_pair_padline_callback(const pcb_box_t * b, void *cl) { LineTypePtr line = (LineTypePtr) b; PadTypePtr pad = (PadTypePtr) cl; @@ -895,7 +895,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t find_pair_padarc_callback(const BoxType * b, void *cl) +static r_dir_t find_pair_padarc_callback(const pcb_box_t * b, void *cl) { ArcTypePtr arc = (ArcTypePtr) b; PadTypePtr pad = (PadTypePtr) cl; @@ -973,7 +973,7 @@ END_LOOP; ALLPIN_LOOP(PCB->Data); { - BoxType box; + pcb_box_t box; box.X1 = pin->X - pin->Thickness / 2; box.Y1 = pin->Y - pin->Thickness / 2; box.X2 = pin->X + pin->Thickness / 2; @@ -984,7 +984,7 @@ ENDALL_LOOP; VIA_LOOP(PCB->Data); { - BoxType box; + pcb_box_t box; box.X1 = via->X - via->Thickness / 2; box.Y1 = via->Y - via->Thickness / 2; box.X2 = via->X + via->Thickness / 2; @@ -995,7 +995,7 @@ END_LOOP; ALLPAD_LOOP(PCB->Data); { - BoxType box; + pcb_box_t box; box.X1 = MIN(pad->Point1.X, pad->Point2.X) - pad->Thickness / 2; box.Y1 = MIN(pad->Point1.Y, pad->Point2.Y) - pad->Thickness / 2; box.X2 = MAX(pad->Point1.X, pad->Point2.X) + pad->Thickness / 2; @@ -1221,7 +1221,7 @@ memcpy(&e->end, &etmp, sizeof(End)); } -static void expand_box(BoxTypePtr b, int x, int y, int t) +static void expand_box(pcb_box_t *b, int x, int y, int t) { b->X1 = MIN(b->X1, x - t); b->X2 = MAX(b->X2, x + t); @@ -1490,7 +1490,7 @@ return gp_point_force(x, y, t, e, esa, eda, 0, func); } -static r_dir_t gp_line_cb(const BoxType * b, void *cb) +static r_dir_t gp_line_cb(const pcb_box_t * b, void *cb) { const LineTypePtr l = (LineTypePtr) b; Extra *e = LINE2EXTRA(l); @@ -1509,7 +1509,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t gp_arc_cb(const BoxType * b, void *cb) +static r_dir_t gp_arc_cb(const pcb_box_t * b, void *cb) { const ArcTypePtr a = (ArcTypePtr) b; Extra *e = ARC2EXTRA(a); @@ -1531,7 +1531,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t gp_text_cb(const BoxType * b, void *cb) +static r_dir_t gp_text_cb(const pcb_box_t * b, void *cb) { const TextTypePtr t = (TextTypePtr) b; /* FIXME: drop in the actual text-line endpoints later. */ @@ -1542,7 +1542,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t gp_poly_cb(const BoxType * b, void *cb) +static r_dir_t gp_poly_cb(const pcb_box_t * b, void *cb) { int i; const PolygonTypePtr p = (PolygonTypePtr) b; @@ -1551,7 +1551,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t gp_pin_cb(const BoxType * b, void *cb) +static r_dir_t gp_pin_cb(const pcb_box_t * b, void *cb) { const PinTypePtr p = (PinTypePtr) b; int t2 = (p->Thickness + 1) / 2; @@ -1573,7 +1573,7 @@ return R_DIR_NOT_FOUND; } -static r_dir_t gp_pad_cb(const BoxType * b, void *cb) +static r_dir_t gp_pad_cb(const pcb_box_t * b, void *cb) { const PadTypePtr p = (PadTypePtr) b; int t2 = (p->Thickness + 1) / 2; @@ -1766,7 +1766,7 @@ static void maybe_pull_1(LineTypePtr line) { - BoxType box; + pcb_box_t box; /* Line half-thicknesses, including line space */ int ex, ey; LineTypePtr new_line; Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4760) +++ trunk/src_plugins/report/report.c (revision 4761) @@ -265,7 +265,7 @@ case PCB_TYPE_ARC: { ArcTypePtr Arc; - BoxTypePtr box; + pcb_box_t *box; #ifndef NDEBUG if (gui->shift_is_pressed()) { pcb_layer_t *layer = (pcb_layer_t *) ptr1; Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 4760) +++ trunk/src_plugins/stroke/stroke.c (revision 4761) @@ -43,7 +43,7 @@ void FinishStroke(void); -BoxType StrokeBox; +pcb_box_t StrokeBox; /* --------------------------------------------------------------------------- * FinishStroke - try to recognize the stroke sent Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 4760) +++ trunk/src_plugins/teardrops/teardrops.c (revision 4761) @@ -56,7 +56,7 @@ return distance; } -static r_dir_t check_line_callback(const BoxType * box, void *cl) +static r_dir_t check_line_callback(const pcb_box_t * box, void *cl) { pcb_layer_t *lay = &PCB->Data->Layer[layer]; LineType *l = (LineType *) box; @@ -194,7 +194,7 @@ static void check_pin(PinType * _pin) { - BoxType spot; + pcb_box_t spot; pin = _pin; @@ -222,7 +222,7 @@ static void check_via(PinType * _pin) { - BoxType spot; + pcb_box_t spot; pin = _pin;