Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4766) +++ trunk/src/action_helper.c (revision 4767) @@ -89,8 +89,8 @@ case PCB_TYPE_LINE_POINT: case PCB_TYPE_POLYGON_POINT: - *x = ((PointTypePtr) ptr3)->X; - *y = ((PointTypePtr) ptr3)->Y; + *x = ((pcb_point_t *) ptr3)->X; + *y = ((pcb_point_t *) ptr3)->Y; break; case PCB_TYPE_ARC: { @@ -223,7 +223,7 @@ /* --------------------------------------------------------------------------- * some local identifiers */ -static PointType InsertedPoint; +static pcb_point_t InsertedPoint; pcb_layer_t *lastLayer; static struct { PolygonTypePtr poly; @@ -452,7 +452,7 @@ */ void AdjustAttachedObjects(void) { - PointTypePtr pnt; + pcb_point_t *pnt; switch (conf_core.editor.mode) { /* update at least an attached block (selection) */ case PCB_MODE_NO: @@ -948,7 +948,7 @@ case PCB_MODE_POLYGON: { - PointTypePtr points = Crosshair.AttachedPolygon.Points; + pcb_point_t *points = Crosshair.AttachedPolygon.Points; pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN; /* do update of position; use the 'PCB_MODE_LINE' mechanism */ @@ -1014,7 +1014,7 @@ /* second notify, insert new point into object */ case STATE_SECOND: { - PointTypePtr points = Crosshair.AttachedPolygon.Points; + pcb_point_t *points = Crosshair.AttachedPolygon.Points; pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN; POLYAREA *original, *new_hole, *result; FlagType Flags; Index: trunk/src/box.c =================================================================== --- trunk/src/box.c (revision 4766) +++ trunk/src/box.c (revision 4767) @@ -62,7 +62,7 @@ /* --------------------------------------------------------------------------- * sets the bounding box of a point (which is silly) */ -void SetPointBoundingBox(PointTypePtr Pnt) +void SetPointBoundingBox(pcb_point_t *Pnt) { Pnt->X2 = Pnt->X + 1; Pnt->Y2 = Pnt->Y + 1; Index: trunk/src/box.h =================================================================== --- trunk/src/box.h (revision 4766) +++ trunk/src/box.h (revision 4767) @@ -104,7 +104,7 @@ typedef struct cheap_point { Coord X, Y; -} CheapPointType; +} Cheappcb_point_t; /* note that boxes are closed on top and left and open on bottom and right. */ @@ -130,9 +130,9 @@ 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 pcb_box_t * box) +static inline PCB_FUNC_UNUSED Cheappcb_point_t closest_point_in_box(const Cheappcb_point_t * from, const pcb_box_t * box) { - CheapPointType r; + Cheappcb_point_t r; assert(box->X1 < box->X2 && box->Y1 < box->Y2); r.X = (from->X < box->X1) ? box->X1 : (from->X > box->X2 - 1) ? box->X2 - 1 : from->X; r.Y = (from->Y < box->Y1) ? box->Y1 : (from->Y > box->Y2 - 1) ? box->Y2 - 1 : from->Y; @@ -215,14 +215,14 @@ /* 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 pcb_box_t * b) +static inline PCB_FUNC_UNUSED double dist2_to_box(const Cheappcb_point_t * p, const pcb_box_t * b) { - CheapPointType r = closest_point_in_box(p, b); + Cheappcb_point_t r = closest_point_in_box(p, b); return Distance(r.X, r.Y, p->X, p->Y); } pcb_box_t *GetBoxMemory(pcb_box_list_t *); void FreeBoxListMemory(pcb_box_list_t *); -void SetPointBoundingBox(PointTypePtr Pnt); +void SetPointBoundingBox(pcb_point_t *Pnt); #endif /* __BOX_H_INCLUDED__ */ Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4766) +++ trunk/src/crosshair.c (revision 4767) @@ -343,7 +343,7 @@ static void XORDrawInsertPointObject(void) { pcb_line_t *line = (pcb_line_t *) Crosshair.AttachedObject.Ptr2; - PointTypePtr point = (PointTypePtr) Crosshair.AttachedObject.Ptr3; + pcb_point_t *point = (pcb_point_t *) Crosshair.AttachedObject.Ptr3; if (Crosshair.AttachedObject.Type != PCB_TYPE_NONE) { gui->draw_line(Crosshair.GC, point->X, point->Y, line->Point1.X, line->Point1.Y); @@ -398,10 +398,10 @@ case PCB_TYPE_LINE_POINT: { pcb_line_t *line; - PointTypePtr point; + pcb_point_t *point; line = (pcb_line_t *) Crosshair.AttachedObject.Ptr2; - point = (PointTypePtr) Crosshair.AttachedObject.Ptr3; + point = (pcb_point_t *) Crosshair.AttachedObject.Ptr3; if (point == &line->Point1) XORDrawAttachedLine(point->X + dx, point->Y + dy, line->Point2.X, line->Point2.Y, line->Thickness); else @@ -412,11 +412,11 @@ case PCB_TYPE_POLYGON_POINT: { PolygonTypePtr polygon; - PointTypePtr point; + pcb_point_t *point; pcb_cardinal_t point_idx, prev, next; polygon = (PolygonTypePtr) Crosshair.AttachedObject.Ptr2; - point = (PointTypePtr) Crosshair.AttachedObject.Ptr3; + point = (pcb_point_t *) Crosshair.AttachedObject.Ptr3; point_idx = polygon_point_idx(polygon, point); /* get previous and following point */ @@ -457,7 +457,7 @@ i = Crosshair.AttachedObject.RubberbandN; ptr = Crosshair.AttachedObject.Rubberband; while (i) { - PointTypePtr point1, point2; + pcb_point_t *point1, *point2; if (TEST_FLAG(PCB_FLAG_VIA, ptr->Line)) { /* this is a rat going to a polygon. do not draw for rubberband */ ; @@ -1109,7 +1109,7 @@ ans = SearchScreenGridSlop(Crosshair.X, Crosshair.Y, PCB_TYPE_LINE_POINT, &ptr1, &ptr2, &ptr3); if (ans != PCB_TYPE_NONE) { - PointType *pnt = (PointType *) ptr3; + pcb_point_t *pnt = (pcb_point_t *) ptr3; check_snap_object(&snap_data, pnt->X, pnt->Y, pcb_true); } @@ -1124,7 +1124,7 @@ ans = SearchScreenGridSlop(Crosshair.X, Crosshair.Y, PCB_TYPE_POLYGON_POINT, &ptr1, &ptr2, &ptr3); if (ans != PCB_TYPE_NONE) { - PointType *pnt = (PointType *) ptr3; + pcb_point_t *pnt = (pcb_point_t *) ptr3; check_snap_object(&snap_data, pnt->X, pnt->Y, pcb_true); } Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 4766) +++ trunk/src/crosshair.h (revision 4767) @@ -37,7 +37,7 @@ #include "obj_poly.h" typedef struct { /* currently marked block */ - PointType Point1, /* start- and end-position */ + pcb_point_t Point1, /* start- and end-position */ Point2; long int State; pcb_bool otherway; Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 4766) +++ trunk/src/find.c (revision 4767) @@ -159,8 +159,8 @@ static pcb_bool LookupLOConnectionsToPad(PadTypePtr, pcb_cardinal_t); static pcb_bool LookupLOConnectionsToPolygon(PolygonTypePtr, pcb_cardinal_t); static pcb_bool LookupLOConnectionsToArc(pcb_arc_t *, pcb_cardinal_t); -static pcb_bool LookupLOConnectionsToRatEnd(PointTypePtr, pcb_cardinal_t); -static pcb_bool IsRatPointOnLineEnd(PointTypePtr, pcb_line_t *); +static pcb_bool LookupLOConnectionsToRatEnd(pcb_point_t *, pcb_cardinal_t); +static pcb_bool IsRatPointOnLineEnd(pcb_point_t *, pcb_line_t *); static pcb_bool ArcArcIntersect(pcb_arc_t *, pcb_arc_t *); static pcb_bool PrintElementConnections(ElementTypePtr, FILE *, pcb_bool); static pcb_bool ListsEmpty(pcb_bool); Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 4766) +++ trunk/src/find_geo.c (revision 4767) @@ -231,7 +231,7 @@ /* --------------------------------------------------------------------------- * Tests if point is same as line end point */ -static pcb_bool IsRatPointOnLineEnd(PointTypePtr Point, pcb_line_t *Line) +static pcb_bool IsRatPointOnLineEnd(pcb_point_t *Point, pcb_line_t *Line) { if ((Point->X == Line->Point1.X && Point->Y == Line->Point1.Y) || (Point->X == Line->Point2.X && Point->Y == Line->Point2.Y)) @@ -239,7 +239,7 @@ return (pcb_false); } -static void form_slanted_rectangle(PointType p[4], pcb_line_t *l) +static void form_slanted_rectangle(pcb_point_t p[4], pcb_line_t *l) /* writes vertices of a squared line */ { double dwx = 0, dwy = 0; @@ -324,7 +324,7 @@ double s, r; double line1_dx, line1_dy, line2_dx, line2_dy, point1_dx, point1_dy; if (TEST_FLAG(PCB_FLAG_SQUARE, Line1)) { /* pretty reckless recursion */ - PointType p[4]; + pcb_point_t p[4]; form_slanted_rectangle(p, Line1); return IsLineInQuadrangle(p, Line2); } @@ -331,7 +331,7 @@ /* here come only round Line1 because IsLineInQuadrangle() calls LineLineIntersect() with first argument rounded */ if (TEST_FLAG(PCB_FLAG_SQUARE, Line2)) { - PointType p[4]; + pcb_point_t p[4]; form_slanted_rectangle(p, Line2); return IsLineInQuadrangle(p, Line1); } Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 4766) +++ trunk/src/find_lookup.c (revision 4767) @@ -28,7 +28,7 @@ #include "compat_nls.h" #include "board.h" -static inline r_dir_t r_search_pt(rtree_t * rtree, const PointType * pt, +static inline r_dir_t r_search_pt(rtree_t * rtree, const pcb_point_t * pt, int radius, 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, @@ -1041,7 +1041,7 @@ struct rat_info { pcb_cardinal_t layer; - PointTypePtr Point; + pcb_point_t *Point; jmp_buf env; }; @@ -1096,7 +1096,7 @@ * the notation that is used is: * Xij means Xj at line i */ -static pcb_bool LookupLOConnectionsToRatEnd(PointTypePtr Point, pcb_cardinal_t LayerGroup) +static pcb_bool LookupLOConnectionsToRatEnd(pcb_point_t *Point, pcb_cardinal_t LayerGroup) { pcb_cardinal_t entry; struct rat_info info; Index: trunk/src/global_typedefs.h =================================================================== --- trunk/src/global_typedefs.h (revision 4766) +++ trunk/src/global_typedefs.h (revision 4767) @@ -36,7 +36,7 @@ typedef struct pcb_font_s pcb_font_t; typedef struct pcb_line_s pcb_line_t; typedef struct pcb_arc_s pcb_arc_t; -typedef struct pcb_point_s PointType, *PointTypePtr; +typedef struct pcb_point_s pcb_point_t; typedef struct pcb_rat_line_s RatType, *RatTypePtr; typedef struct polygon_st PolygonType, *PolygonTypePtr; Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 4766) +++ trunk/src/insert.c (revision 4767) @@ -83,9 +83,9 @@ /* --------------------------------------------------------------------------- * adjusts the insert point to make 45 degree lines as necessary */ -PointTypePtr AdjustInsertPoint(void) +pcb_point_t *AdjustInsertPoint(void) { - static PointType InsertedPoint; + static pcb_point_t InsertedPoint; double m; Coord x, y, m1, m2; pcb_line_t *line = (pcb_line_t *) Crosshair.AttachedObject.Ptr2; Index: trunk/src/insert.h =================================================================== --- trunk/src/insert.h (revision 4766) +++ trunk/src/insert.h (revision 4767) @@ -37,6 +37,6 @@ * prototypes */ void *InsertPointIntoObject(int, void *, void *, pcb_cardinal_t *, Coord, Coord, pcb_bool, pcb_bool); -PointTypePtr AdjustInsertPoint(void); +pcb_point_t *AdjustInsertPoint(void); #endif Index: trunk/src/obj_any.h =================================================================== --- trunk/src/obj_any.h (revision 4766) +++ trunk/src/obj_any.h (revision 4767) @@ -78,7 +78,7 @@ union { void *any; AnyObjectType *anyobj; - PointType *point; + pcb_point_t *point; pcb_line_t *line; TextType *text; PolygonType *polygon; Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 4766) +++ trunk/src/obj_common.h (revision 4767) @@ -87,7 +87,7 @@ ANYOBJECTFIELDS; \ Coord Thickness, \ Clearance; \ - PointType Point1, \ + pcb_point_t Point1, \ Point2 /* All on-pcb objects (elements, lines, pads, vias, rats, etc) are Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4766) +++ trunk/src/obj_elem.c (revision 4767) @@ -227,7 +227,7 @@ static int polygon_is_rectangle(PolygonTypePtr poly) { int i, best; - PointType temp[4]; + pcb_point_t temp[4]; if (poly->PointN != 4 || poly->HoleIndexN != 0) return 0; best = 0; Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 4766) +++ trunk/src/obj_line.c (revision 4767) @@ -408,7 +408,7 @@ } /* moves one end of a line */ -void *MoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr Point) +void *MoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) { if (Layer) { if (Layer->On) @@ -551,7 +551,7 @@ struct rlp_info { jmp_buf env; pcb_line_t *line; - PointTypePtr point; + pcb_point_t *point; }; static r_dir_t remove_point(const pcb_box_t * b, void *cl) { @@ -575,9 +575,9 @@ } /* removes a line point, or a line if the selected point is the end */ -void *RemoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr Point) +void *RemoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) { - PointType other; + pcb_point_t other; struct rlp_info info; if (&Line->Point1 == Point) other = Line->Point2; @@ -645,7 +645,7 @@ /* rotates a line's point */ -void *RotateLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr Point) +void *RotateLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) { EraseLine(Line); if (Layer) { Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 4766) +++ trunk/src/obj_line.h (revision 4767) @@ -39,7 +39,7 @@ /* crosshair: */ typedef struct { /* current marked line */ - PointType Point1, /* start- and end-position */ + pcb_point_t Point1, /* start- and end-position */ Point2; long int State; pcb_bool draw; Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 4766) +++ trunk/src/obj_line_drcenf.c (revision 4767) @@ -37,7 +37,7 @@ #include "find.h" #include "rtree.h" -static double drc_lines(PointTypePtr end, pcb_bool way); +static double drc_lines(pcb_point_t *end, pcb_bool way); /* --------------------------------------------------------------------------- * Adjust the attached line to 45 degrees if necessary @@ -248,7 +248,7 @@ * It returns the straight-line length of the best answer, and * changes the position of the input end point to the best answer. */ -static double drc_lines(PointTypePtr end, pcb_bool way) +static double drc_lines(pcb_point_t *end, pcb_bool way) { double f, s, f2, s2, len, best; Coord dx, dy, temp, last, length; @@ -257,7 +257,7 @@ pcb_cardinal_t group, comp; struct drc_info info; pcb_bool two_lines, x_is_long, blocker; - PointType ans; + pcb_point_t ans; f = 1.0; s = 0.5; @@ -409,13 +409,13 @@ return best; } -static void drc_line(PointTypePtr end) +static void drc_line(pcb_point_t *end) { struct drc_info info; pcb_cardinal_t group, comp; pcb_line_t line; AttachedLineType aline; - static PointType last_good; /* internal state of last good endpoint - we cna do thsi cheat, because... */ + static pcb_point_t last_good; /* internal state of last good endpoint - we cna do thsi cheat, because... */ /* ... we hardwire the assumption on how a line is drawn: it starts out as a 0 long segment, which is valid: */ if ((Crosshair.AttachedLine.Point1.X == Crosshair.X) && (Crosshair.AttachedLine.Point1.Y == Crosshair.Y)) { @@ -471,7 +471,7 @@ void EnforceLineDRC(void) { - PointType r45, rs; + pcb_point_t r45, rs; pcb_bool shift; double r1, r2; Index: trunk/src/obj_line_op.h =================================================================== --- trunk/src/obj_line_op.h (revision 4766) +++ trunk/src/obj_line_op.h (revision 4767) @@ -39,13 +39,13 @@ void *MoveLineToBuffer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_line_t * line); void *CopyLine(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); void *MoveLine(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); -void *MoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr Point); +void *MoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); void *MoveLineToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_line_t * line, pcb_layer_t * Destination); void *MoveLineToLayer(pcb_opctx_t *ctx, pcb_layer_t * Layer, pcb_line_t * Line); void *DestroyLine(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); -void *RemoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr Point); +void *RemoveLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); void *RemoveLine_op(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); -void *RotateLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr Point); +void *RotateLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 4766) +++ trunk/src/obj_poly.c (revision 4767) @@ -71,16 +71,16 @@ } /* gets the next slot for a point in a polygon struct, allocates memory if necessary */ -PointTypePtr GetPointMemoryInPolygon(PolygonTypePtr Polygon) +pcb_point_t *GetPointMemoryInPolygon(PolygonTypePtr Polygon) { - PointTypePtr points = Polygon->Points; + pcb_point_t *points = Polygon->Points; /* realloc new memory if necessary and clear it */ if (Polygon->PointN >= Polygon->PointMax) { Polygon->PointMax += STEP_POLYGONPOINT; - points = (PointTypePtr) realloc(points, Polygon->PointMax * sizeof(PointType)); + points = (pcb_point_t *) realloc(points, Polygon->PointMax * sizeof(pcb_point_t)); Polygon->Points = points; - memset(points + Polygon->PointN, 0, STEP_POLYGONPOINT * sizeof(PointType)); + memset(points + Polygon->PointN, 0, STEP_POLYGONPOINT * sizeof(pcb_point_t)); } return (points + Polygon->PointN++); } @@ -186,9 +186,9 @@ } /* creates a new point in a polygon */ -PointTypePtr CreateNewPointInPolygon(PolygonTypePtr Polygon, Coord X, Coord Y) +pcb_point_t *CreateNewPointInPolygon(PolygonTypePtr Polygon, Coord X, Coord Y) { - PointTypePtr point = GetPointMemoryInPolygon(Polygon); + pcb_point_t *point = GetPointMemoryInPolygon(Polygon); /* copy values */ point->X = X; @@ -297,7 +297,7 @@ /* inserts a point into a polygon */ void *InsertPointIntoPolygon(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon) { - PointType save; + pcb_point_t save; pcb_cardinal_t n; pcb_line_t line; @@ -368,7 +368,7 @@ } /* moves a polygon-point */ -void *MovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, PointTypePtr Point) +void *MovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, pcb_point_t *Point) { if (Layer->On) { ErasePolygon(Polygon); @@ -467,7 +467,7 @@ } /* removes a polygon-point from a polygon and destroys the data */ -void *DestroyPolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, PointTypePtr Point) +void *DestroyPolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, pcb_point_t *Point) { pcb_cardinal_t point_idx; pcb_cardinal_t i; @@ -569,7 +569,7 @@ } /* removes a polygon-point from a polygon */ -void *RemovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, PointTypePtr Point) +void *RemovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, pcb_point_t *Point) { pcb_cardinal_t point_idx; pcb_cardinal_t i; Index: trunk/src/obj_poly.h =================================================================== --- trunk/src/obj_poly.h (revision 4766) +++ trunk/src/obj_poly.h (revision 4767) @@ -39,7 +39,7 @@ POLYAREA *Clipped; /* the clipped region of this polygon */ PLINE *NoHoles; /* the polygon broken into hole-less regions */ int NoHolesValid; /* Is the NoHoles polygon up to date? */ - PointTypePtr Points; /* data */ + pcb_point_t *Points; /* data */ pcb_cardinal_t *HoleIndex; /* Index of hole data within the Points array */ pcb_cardinal_t HoleIndexN; /* number of holes in polygon */ pcb_cardinal_t HoleIndexMax; /* max number from malloc() */ @@ -50,7 +50,7 @@ PolygonType *GetPolygonMemory(pcb_layer_t * layer); void RemoveFreePolygon(PolygonType * data); -PointTypePtr GetPointMemoryInPolygon(PolygonTypePtr Polygon); +pcb_point_t *GetPointMemoryInPolygon(PolygonTypePtr Polygon); pcb_cardinal_t *GetHoleIndexMemoryInPolygon(PolygonTypePtr Polygon); void FreePolygonMemory(PolygonType * polygon); @@ -57,7 +57,7 @@ void SetPolygonBoundingBox(PolygonTypePtr Polygon); PolygonTypePtr CreateNewPolygonFromRectangle(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, FlagType Flags); PolygonTypePtr CreateNewPolygon(pcb_layer_t *Layer, FlagType Flags); -PointTypePtr CreateNewPointInPolygon(PolygonTypePtr Polygon, Coord X, Coord Y); +pcb_point_t *CreateNewPointInPolygon(PolygonTypePtr Polygon, Coord X, Coord Y); PolygonType *CreateNewHoleInPolygon(PolygonType * Polygon); void *RemovePolygon(pcb_layer_t *Layer, PolygonTypePtr Polygon); @@ -75,7 +75,7 @@ #define POLYGONPOINT_LOOP(polygon) do { \ pcb_cardinal_t n; \ - PointTypePtr point; \ + pcb_point_t *point; \ for (n = (polygon)->PointN-1; n != -1; n--) \ { \ point = &(polygon)->Points[n] Index: trunk/src/obj_poly_op.h =================================================================== --- trunk/src/obj_poly_op.h (revision 4766) +++ trunk/src/obj_poly_op.h (revision 4767) @@ -34,14 +34,14 @@ void *ChangePolyClear(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon); void *InsertPointIntoPolygon(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon); void *MovePolygon(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon); -void *MovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, PointTypePtr Point); +void *MovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, pcb_point_t *Point); void *MovePolygonToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, PolygonType * polygon, pcb_layer_t * Destination); void *MovePolygonToLayer(pcb_opctx_t *ctx, pcb_layer_t * Layer, PolygonType * Polygon); void *DestroyPolygon(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon); -void *DestroyPolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, PointTypePtr Point); +void *DestroyPolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, pcb_point_t *Point); void *RemovePolygon_op(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon); void *RemovePolygonContour(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, pcb_cardinal_t contour); -void *RemovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, PointTypePtr Point); +void *RemovePolygonPoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon, pcb_point_t *Point); void *CopyPolygon(pcb_opctx_t *ctx, pcb_layer_t *Layer, PolygonTypePtr Polygon); Index: trunk/src/operation.h =================================================================== --- trunk/src/operation.h (revision 4766) +++ trunk/src/operation.h (revision 4767) @@ -118,8 +118,8 @@ void *(*ElementName)(pcb_opctx_t *ctx, ElementTypePtr); void *(*Pin)(pcb_opctx_t *ctx, ElementTypePtr, PinTypePtr); void *(*Pad)(pcb_opctx_t *ctx, ElementTypePtr, PadTypePtr); - void *(*LinePoint)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_line_t *, PointTypePtr); - void *(*Point)(pcb_opctx_t *ctx, pcb_layer_t *, PolygonTypePtr, PointTypePtr); + void *(*LinePoint)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_line_t *, pcb_point_t *); + void *(*Point)(pcb_opctx_t *ctx, pcb_layer_t *, PolygonTypePtr, pcb_point_t *); void *(*Arc)(pcb_opctx_t *ctx, pcb_layer_t *, pcb_arc_t *); void *(*Rat)(pcb_opctx_t *ctx, RatTypePtr); } pcb_opfunc_t; Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 4766) +++ trunk/src/polygon.c (revision 4767) @@ -114,11 +114,11 @@ rotate_circle_seg[3] = cos_ang; } -pcb_cardinal_t polygon_point_idx(PolygonTypePtr polygon, PointTypePtr point) +pcb_cardinal_t polygon_point_idx(PolygonTypePtr polygon, pcb_point_t *point) { assert(point >= polygon->Points); assert(point <= polygon->Points + polygon->PointN); - return ((char *) point - (char *) polygon->Points) / sizeof(PointType); + return ((char *) point - (char *) polygon->Points) / sizeof(pcb_point_t); } /* Find contour number: 0 for outer, 1 for first hole etc.. */ @@ -1196,7 +1196,7 @@ */ pcb_bool RemoveExcessPolygonPoints(pcb_layer_t *Layer, PolygonTypePtr Polygon) { - PointTypePtr p; + pcb_point_t *p; pcb_cardinal_t n, prev, next; pcb_line_t line; pcb_bool changed = pcb_false; @@ -1228,7 +1228,7 @@ pcb_cardinal_t GetLowestDistancePolygonPoint(PolygonTypePtr Polygon, Coord X, Coord Y) { double mindistance = (double) MAX_COORD * MAX_COORD; - PointTypePtr ptr1, ptr2; + pcb_point_t *ptr1, *ptr2; pcb_cardinal_t n, result = 0; /* we calculate the distance to each segment and choose the @@ -1287,7 +1287,7 @@ /* back-up one point */ default: { - PointTypePtr points = Crosshair.AttachedPolygon.Points; + pcb_point_t *points = Crosshair.AttachedPolygon.Points; pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN - 2; Crosshair.AttachedPolygon.PointN--; Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 4766) +++ trunk/src/polygon.h (revision 4767) @@ -52,7 +52,7 @@ /* Prototypes */ void polygon_init(void); -pcb_cardinal_t polygon_point_idx(PolygonTypePtr polygon, PointTypePtr point); +pcb_cardinal_t polygon_point_idx(PolygonTypePtr polygon, pcb_point_t *point); pcb_cardinal_t polygon_point_contour(PolygonTypePtr polygon, pcb_cardinal_t point); pcb_cardinal_t prev_contour_point(PolygonTypePtr polygon, pcb_cardinal_t point); pcb_cardinal_t next_contour_point(PolygonTypePtr polygon, pcb_cardinal_t point); Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 4766) +++ trunk/src/rotate.c (revision 4767) @@ -70,7 +70,7 @@ /* --------------------------------------------------------------------------- * rotates a point in 90 degree steps */ -void RotatePointLowLevel(PointTypePtr Point, Coord X, Coord Y, unsigned Number) +void RotatePointLowLevel(pcb_point_t *Point, Coord X, Coord Y, unsigned Number) { ROTATE(Point->X, Point->Y, X, Y, Number); } Index: trunk/src/rotate.h =================================================================== --- trunk/src/rotate.h (revision 4766) +++ trunk/src/rotate.h (revision 4767) @@ -97,7 +97,7 @@ void *RotateObject(int, void *, void *, void *, Coord, Coord, unsigned); void RotateScreenObject(Coord, Coord, unsigned); -void RotatePointLowLevel(PointTypePtr Point, Coord X, Coord Y, unsigned Number); +void RotatePointLowLevel(pcb_point_t *Point, Coord X, Coord Y, unsigned Number); static inline PCB_FUNC_UNUSED void free_rotate(Coord * x, Coord * y, Coord cx, Coord cy, double cosa, double sina) { Index: trunk/src/rubberband.c =================================================================== --- trunk/src/rubberband.c (revision 4766) +++ trunk/src/rubberband.c (revision 4767) @@ -44,9 +44,9 @@ */ static void CheckPadForRubberbandConnection(PadTypePtr); static void CheckPinForRubberbandConnection(PinTypePtr); -static void CheckLinePointForRubberbandConnection(pcb_layer_t *, pcb_line_t *, PointTypePtr, pcb_bool); +static void CheckLinePointForRubberbandConnection(pcb_layer_t *, pcb_line_t *, pcb_point_t *, pcb_bool); static void CheckPolygonForRubberbandConnection(pcb_layer_t *, PolygonTypePtr); -static void CheckLinePointForRat(pcb_layer_t *, PointTypePtr); +static void CheckLinePointForRat(pcb_layer_t *, pcb_point_t *); static r_dir_t rubber_callback(const pcb_box_t * b, void *cl); struct rubber_info { @@ -207,7 +207,7 @@ pcb_cardinal_t group; PinTypePtr pin; PadTypePtr pad; - PointTypePtr point; + pcb_point_t *point; }; static r_dir_t rat_callback(const pcb_box_t * box, void *cl) @@ -274,7 +274,7 @@ r_search(PCB->Data->rat_tree, &Pin->BoundingBox, NULL, rat_callback, &info, NULL); } -static void CheckLinePointForRat(pcb_layer_t *Layer, PointTypePtr Point) +static void CheckLinePointForRat(pcb_layer_t *Layer, pcb_point_t *Point) { struct rinfo info; info.group = GetLayerGroupNumberByPointer(Layer); @@ -322,7 +322,7 @@ * If one of the endpoints of the line lays * inside the passed line, * the scanned line is added to the 'rubberband' list */ -static void CheckLinePointForRubberbandConnection(pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr LinePoint, pcb_bool Exact) +static void CheckLinePointForRubberbandConnection(pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *LinePoint, pcb_bool Exact) { pcb_cardinal_t group; struct rubber_info info; @@ -434,7 +434,7 @@ case PCB_TYPE_LINE_POINT: if (GetLayerNumber(PCB->Data, (pcb_layer_t *) Ptr1) < max_copper_layer) - CheckLinePointForRubberbandConnection((pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (PointTypePtr) Ptr3, pcb_true); + CheckLinePointForRubberbandConnection((pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (pcb_point_t *) Ptr3, pcb_true); break; case PCB_TYPE_VIA: @@ -479,7 +479,7 @@ } case PCB_TYPE_LINE_POINT: - CheckLinePointForRat((pcb_layer_t *) Ptr1, (PointTypePtr) Ptr3); + CheckLinePointForRat((pcb_layer_t *) Ptr1, (pcb_point_t *) Ptr3); break; case PCB_TYPE_VIA: @@ -509,7 +509,7 @@ * adds a new line to the rubberband list of 'Crosshair.AttachedObject' * if Layer == 0 it is a rat line */ -RubberbandTypePtr CreateNewRubberbandEntry(pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr MovedPoint) +RubberbandTypePtr CreateNewRubberbandEntry(pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *MovedPoint) { RubberbandTypePtr ptr = GetRubberbandMemory(); Index: trunk/src/rubberband.h =================================================================== --- trunk/src/rubberband.h (revision 4766) +++ trunk/src/rubberband.h (revision 4767) @@ -37,7 +37,7 @@ typedef struct { /* rubberband lines for element moves */ pcb_layer_t *Layer; /* layer that holds the line */ pcb_line_t *Line; /* the line itself */ - PointTypePtr MovedPoint; /* and finally the point */ + pcb_point_t *MovedPoint; /* and finally the point */ } RubberbandType, *RubberbandTypePtr; @@ -44,6 +44,6 @@ void LookupRubberbandLines(int, void *, void *, void *); void LookupRatLines(int, void *, void *, void *); RubberbandTypePtr GetRubberbandMemory(void); -RubberbandTypePtr CreateNewRubberbandEntry(pcb_layer_t *Layer, pcb_line_t *Line, PointTypePtr MovedPoint); +RubberbandTypePtr CreateNewRubberbandEntry(pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *MovedPoint); #endif Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 4766) +++ trunk/src/search.c (revision 4767) @@ -62,8 +62,8 @@ static pcb_bool SearchPadByLocation(int, ElementTypePtr *, PadTypePtr *, PadTypePtr *, pcb_bool); static pcb_bool SearchViaByLocation(int, PinTypePtr *, PinTypePtr *, PinTypePtr *); static pcb_bool SearchElementNameByLocation(int, ElementTypePtr *, TextTypePtr *, TextTypePtr *, pcb_bool); -static pcb_bool SearchLinePointByLocation(int, pcb_layer_t **, pcb_line_t **, PointTypePtr *); -static pcb_bool SearchPointByLocation(int, pcb_layer_t **, PolygonTypePtr *, PointTypePtr *); +static pcb_bool SearchLinePointByLocation(int, pcb_layer_t **, pcb_line_t **, pcb_point_t **); +static pcb_bool SearchPointByLocation(int, pcb_layer_t **, PolygonTypePtr *, pcb_point_t **); static pcb_bool SearchElementByLocation(int, ElementTypePtr *, ElementTypePtr *, ElementTypePtr *, pcb_bool); /* --------------------------------------------------------------------------- @@ -177,7 +177,7 @@ struct line_info { pcb_line_t **Line; - PointTypePtr *Point; + pcb_point_t **Point; double least; int locked; }; @@ -193,7 +193,7 @@ if (!IsPointInPad(PosX, PosY, SearchRadius, (PadTypePtr) l)) return R_DIR_NOT_FOUND; *i->Line = l; - *i->Point = (PointTypePtr) l; + *i->Point = (pcb_point_t *) l; return R_DIR_CANCEL; /* found what we were looking for */ } @@ -204,7 +204,7 @@ struct line_info info; info.Line = Line; - info.Point = (PointTypePtr *) Dummy; + info.Point = (pcb_point_t **) Dummy; info.locked = (locked & PCB_TYPE_LOCKED) ? 0 : PCB_FLAG_LOCK; *Layer = SearchLayer; @@ -383,7 +383,7 @@ /* --------------------------------------------------------------------------- * searches a line-point on all the search layer */ -static pcb_bool SearchLinePointByLocation(int locked, pcb_layer_t ** Layer, pcb_line_t ** Line, PointTypePtr * Point) +static pcb_bool SearchLinePointByLocation(int locked, pcb_layer_t ** Layer, pcb_line_t ** Line, pcb_point_t ** Point) { struct line_info info; *Layer = SearchLayer; @@ -401,7 +401,7 @@ * searches a polygon-point on all layers that are switched on * in layerstack order */ -static pcb_bool SearchPointByLocation(int locked, pcb_layer_t ** Layer, PolygonTypePtr * Polygon, PointTypePtr * Point) +static pcb_bool SearchPointByLocation(int locked, pcb_layer_t ** Layer, PolygonTypePtr * Polygon, pcb_point_t ** Point) { double d, least; pcb_bool found = pcb_false; @@ -666,7 +666,7 @@ return (pcb_false); } -static int /*checks if a point (of null radius) is in a slanted rectangle */ IsPointInQuadrangle(PointType p[4], PointTypePtr l) +static int /*checks if a point (of null radius) is in a slanted rectangle */ IsPointInQuadrangle(pcb_point_t p[4], pcb_point_t *l) { Coord dx, dy, x, y; double prod0, prod1; @@ -696,7 +696,7 @@ * checks if a line crosses a quadrangle: almost copied from IsLineInRectangle() * Note: actually this quadrangle is a slanted rectangle */ -pcb_bool IsLineInQuadrangle(PointType p[4], pcb_line_t *Line) +pcb_bool IsLineInQuadrangle(pcb_point_t p[4], pcb_line_t *Line) { pcb_line_t line; @@ -1037,12 +1037,12 @@ if (SearchLayer->On) { if ((HigherAvail & (PCB_TYPE_PIN | PCB_TYPE_PAD)) == 0 && Type & PCB_TYPE_POLYGON_POINT && - SearchPointByLocation(locked, (pcb_layer_t **) Result1, (PolygonTypePtr *) Result2, (PointTypePtr *) Result3)) + SearchPointByLocation(locked, (pcb_layer_t **) Result1, (PolygonTypePtr *) Result2, (pcb_point_t **) Result3)) return (PCB_TYPE_POLYGON_POINT); if ((HigherAvail & (PCB_TYPE_PIN | PCB_TYPE_PAD)) == 0 && Type & PCB_TYPE_LINE_POINT && - SearchLinePointByLocation(locked, (pcb_layer_t **) Result1, (pcb_line_t **) Result2, (PointTypePtr *) Result3)) + SearchLinePointByLocation(locked, (pcb_layer_t **) Result1, (pcb_line_t **) Result2, (pcb_point_t **) Result3)) return (PCB_TYPE_LINE_POINT); if ((HigherAvail & (PCB_TYPE_PIN | PCB_TYPE_PAD)) == 0 && Type & PCB_TYPE_LINE Index: trunk/src/search.h =================================================================== --- trunk/src/search.h (revision 4766) +++ trunk/src/search.h (revision 4767) @@ -150,7 +150,7 @@ pcb_bool IsPointOnArc(Coord, Coord, Coord, pcb_arc_t *); pcb_bool IsPointOnLineEnd(Coord, Coord, RatTypePtr); pcb_bool IsLineInRectangle(Coord, Coord, Coord, Coord, pcb_line_t *); -pcb_bool IsLineInQuadrangle(PointType p[4], pcb_line_t *Line); +pcb_bool IsLineInQuadrangle(pcb_point_t p[4], pcb_line_t *Line); pcb_bool IsArcInRectangle(Coord, Coord, Coord, Coord, pcb_arc_t *); pcb_bool IsPointInPad(Coord, Coord, Coord, PadTypePtr); pcb_bool IsPointInBox(Coord, Coord, pcb_box_t *, Coord); Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 4766) +++ trunk/src/select.c (revision 4767) @@ -499,7 +499,7 @@ case PCB_TYPE_LINE_POINT: if (F->LinePoint) - return (F->LinePoint(ctx, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (PointTypePtr) Ptr3)); + return (F->LinePoint(ctx, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (pcb_point_t *) Ptr3)); break; case PCB_TYPE_TEXT: @@ -514,7 +514,7 @@ case PCB_TYPE_POLYGON_POINT: if (F->Point) - return (F->Point(ctx, (pcb_layer_t *) Ptr1, (PolygonTypePtr) Ptr2, (PointTypePtr) Ptr3)); + return (F->Point(ctx, (pcb_layer_t *) Ptr1, (PolygonTypePtr) Ptr2, (pcb_point_t *) Ptr3)); break; case PCB_TYPE_VIA: Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 4766) +++ trunk/src/undo.c (revision 4767) @@ -706,7 +706,7 @@ { pcb_layer_t *layer; PolygonTypePtr polygon; - PointTypePtr pnt; + pcb_point_t *pnt; int type; pcb_cardinal_t point_idx; pcb_cardinal_t hole; Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4766) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4767) @@ -274,7 +274,7 @@ } flags; /* indicate the direction an expansion box came from */ cost_t cost; - CheapPointType cost_point; + Cheappcb_point_t cost_point; /* reference count for homeless routeboxes; free when refcount==0 */ int refcount; /* when routing with conflicts, we keep a record of what we're @@ -316,7 +316,7 @@ typedef struct edge_struct { routebox_t *rb; /* path expansion edges are real routeboxen. */ - CheapPointType cost_point; + Cheappcb_point_t cost_point; cost_t cost_to_point; /* from source */ cost_t cost; /* cached edge cost */ routebox_t *mincost_target; /* minimum cost from cost_point to any target */ @@ -569,7 +569,7 @@ return ans * (b.Y2 - b.Y1); } -static inline CheapPointType closest_point_in_routebox(const CheapPointType * from, const routebox_t * rb) +static inline Cheappcb_point_t closest_point_in_routebox(const Cheappcb_point_t * from, const routebox_t * rb) { return closest_point_in_box(from, &rb->sbox); } @@ -1204,7 +1204,7 @@ END_LOOP; } -static inline cost_t cost_to_point_on_layer(const CheapPointType * p1, const CheapPointType * p2, pcb_cardinal_t point_layer) +static inline cost_t cost_to_point_on_layer(const Cheappcb_point_t * p1, const Cheappcb_point_t * p2, pcb_cardinal_t point_layer) { cost_t x_dist = p1->X - p2->X, y_dist = p1->Y - p2->Y, r; x_dist *= x_cost[point_layer]; @@ -1216,7 +1216,7 @@ return r; } -static cost_t cost_to_point(const CheapPointType * p1, pcb_cardinal_t point_layer1, const CheapPointType * p2, pcb_cardinal_t point_layer2) +static cost_t cost_to_point(const Cheappcb_point_t * p1, pcb_cardinal_t point_layer1, const Cheappcb_point_t * p2, pcb_cardinal_t point_layer2) { cost_t r = cost_to_point_on_layer(p1, p2, point_layer1); /* apply via cost penalty if layers differ */ @@ -1228,9 +1228,9 @@ /* 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 pcb_box_t * b) +static cost_t cost_to_layerless_box(const Cheappcb_point_t * p, pcb_cardinal_t point_layer, const pcb_box_t * b) { - CheapPointType p2 = closest_point_in_box(p, b); + Cheappcb_point_t p2 = closest_point_in_box(p, b); register cost_t c1, c2; c1 = p2.X - p->X; @@ -1245,7 +1245,7 @@ } /* get to actual pins/pad target coordinates */ -pcb_bool TargetPoint(CheapPointType * nextpoint, const routebox_t * target) +pcb_bool TargetPoint(Cheappcb_point_t * nextpoint, const routebox_t * target) { if (target->type == PIN) { nextpoint->X = target->parent.pin->X; @@ -1274,10 +1274,10 @@ * via costs if the route box is on a different layer. * assume routbox is bloated unless it is an expansion area */ -static cost_t cost_to_routebox(const CheapPointType * p, pcb_cardinal_t point_layer, const routebox_t * rb) +static cost_t cost_to_routebox(const Cheappcb_point_t * p, pcb_cardinal_t point_layer, const routebox_t * rb) { register cost_t trial = 0; - CheapPointType p2 = closest_point_in_routebox(p, rb); + Cheappcb_point_t p2 = closest_point_in_routebox(p, rb); if (!usedGroup[point_layer] || !usedGroup[rb->group]) trial = AutoRouteParameters.NewLayerPenalty; if ((p2.X - p->X) * (p2.Y - p->Y) != 0) @@ -1468,7 +1468,7 @@ /* some routines to find the minimum *cost* from a cost point to * a target (any target) */ struct mincost_target_closure { - const CheapPointType *CostPoint; + const Cheappcb_point_t *CostPoint; pcb_cardinal_t CostPointLayer; routebox_t *nearest; cost_t nearest_cost; @@ -1505,7 +1505,7 @@ /* target_guess is our guess at what the nearest target is, or NULL if we * just plum don't have a clue. */ -static routebox_t *mincost_target_to_point(const CheapPointType * CostPoint, +static routebox_t *mincost_target_to_point(const Cheappcb_point_t * CostPoint, pcb_cardinal_t CostPointLayer, rtree_t * targets, routebox_t * target_guess) { struct mincost_target_closure mtc; @@ -1570,7 +1570,7 @@ edge_t * previous_edge, rtree_t * targets, routebox_t * guess) { pcb_box_t thisbox; - CheapPointType thiscost, prevcost; + Cheappcb_point_t thiscost, prevcost; cost_t d; assert(rb && previous_edge); @@ -1595,7 +1595,7 @@ conflict_t to_site_conflict, conflict_t through_site_conflict, rtree_t * targets) { routebox_t *rb; - CheapPointType costpoint; + Cheappcb_point_t costpoint; cost_t d; edge_t *ne; cost_t scale[3]; @@ -1615,7 +1615,7 @@ /* for planes, choose a point near the target */ if (previous_edge->flags.in_plane) { routebox_t *target; - CheapPointType pnt; + Cheappcb_point_t pnt; /* find a target near this via box */ pnt.X = CENTER_X(*area); pnt.Y = CENTER_Y(*area); @@ -1661,7 +1661,7 @@ cost_t cost_penalty_to_box, rtree_t * targets) { routebox_t *rb; - CheapPointType costpoint; + Cheappcb_point_t costpoint; cost_t d; edge_t *ne; assert(interior_edge && container && previous_edge && targets); @@ -2278,7 +2278,7 @@ * these boxes are bigger, so move close to the target */ if (dir == NE || dir == SE || dir == SW || dir == NW) { - CheapPointType p; + Cheappcb_point_t p; p = closest_point_in_box(&nrb->cost_point, &e->mincost_target->sbox); p = closest_point_in_box(&p, &b); nrb->cost += cost_to_point_on_layer(&p, &nrb->cost_point, nrb->group); @@ -3012,10 +3012,10 @@ static pcb_bool RD_DrawManhattanLine(routedata_t * rd, const pcb_box_t * box1, const pcb_box_t * box2, - CheapPointType start, CheapPointType end, + Cheappcb_point_t start, Cheappcb_point_t end, Coord halfthick, pcb_cardinal_t group, routebox_t * subnet, pcb_bool is_bad, pcb_bool last_was_x) { - CheapPointType knee = start; + Cheappcb_point_t knee = start; if (end.X == start.X) { RD_DrawLine(rd, start.X, start.Y, end.X, end.Y, halfthick, group, subnet, is_bad, pcb_false); return pcb_false; @@ -3050,7 +3050,7 @@ else { /* draw 45-degree path across knee */ Coord len45 = MIN(PCB_ABS(start.X - end.X), PCB_ABS(start.Y - end.Y)); - CheapPointType kneestart = knee, kneeend = knee; + Cheappcb_point_t kneestart = knee, kneeend = knee; if (kneestart.X == start.X) kneestart.Y += (kneestart.Y > start.Y) ? -len45 : len45; else @@ -3068,7 +3068,7 @@ /* for smoothing, don't pack traces to min clearance gratuitously */ #if 0 -static void add_clearance(CheapPointType * nextpoint, const pcb_box_t * b) +static void add_clearance(Cheappcb_point_t * nextpoint, const pcb_box_t * b) { if (nextpoint->X == b->X1) { if (nextpoint->X + AutoRouteParameters.style->Clearance < (b->X1 + b->X2) / 2) @@ -3114,7 +3114,7 @@ pcb_bool last_x = pcb_false; Coord halfwidth = HALF_THICK(AutoRouteParameters.style->Thick); Coord radius = HALF_THICK(AutoRouteParameters.style->Diameter); - CheapPointType lastpoint, nextpoint; + Cheappcb_point_t lastpoint, nextpoint; routebox_t *lastpath; pcb_box_t b; @@ -3649,7 +3649,7 @@ { /* we need the test for 'source' because this box may be nonstraight */ if (p->flags.source && is_layer_group_active[p->group]) { - CheapPointType cp; + Cheappcb_point_t cp; edge_t *e; pcb_box_t b = shrink_routebox(p); Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 4766) +++ trunk/src_plugins/autoroute/mtspace.c (revision 4767) @@ -76,7 +76,7 @@ heap_or_vector hi_candidate; Coord radius; Coord clearance; - CheapPointType desired; + Cheappcb_point_t desired; }; #define SPECIAL 823157 @@ -179,15 +179,15 @@ pcb_box_t *cbox; heap_or_vector checking; heap_or_vector touching; - CheapPointType *desired; + Cheappcb_point_t *desired; Coord radius, clearance; jmp_buf env; pcb_bool touch_is_vec; }; -static inline void heap_append(heap_t * heap, CheapPointType * desired, pcb_box_t * newone) +static inline void heap_append(heap_t * heap, Cheappcb_point_t * desired, pcb_box_t * newone) { - CheapPointType p = *desired; + Cheappcb_point_t p = *desired; assert(desired); closest_point_in_box(&p, newone); heap_insert(heap, PCB_ABS(p.X - desired->X) + (p.Y - desired->Y), newone); @@ -374,7 +374,7 @@ vetting_t * work, vector_t * free_space_vec, vector_t * lo_conflict_space_vec, - vector_t * hi_conflict_space_vec, pcb_bool is_odd, pcb_bool with_conflicts, CheapPointType * desired) + vector_t * hi_conflict_space_vec, pcb_bool is_odd, pcb_bool with_conflicts, Cheappcb_point_t * desired) { struct query_closure qc; Index: trunk/src_plugins/autoroute/mtspace.h =================================================================== --- trunk/src_plugins/autoroute/mtspace.h (revision 4766) +++ trunk/src_plugins/autoroute/mtspace.h (revision 4767) @@ -69,7 +69,7 @@ vetting_t * work, vector_t * free_space_vec, vector_t * lo_conflict_space_vec, - vector_t * hi_conflict_space_vec, pcb_bool is_odd, pcb_bool with_conflicts, CheapPointType * desired); + vector_t * hi_conflict_space_vec, pcb_bool is_odd, pcb_bool with_conflicts, Cheappcb_point_t * desired); void mtsFreeWork(vetting_t **); int mtsBoxCount(vetting_t *); Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 4766) +++ trunk/src_plugins/boardflip/boardflip.c (revision 4767) @@ -91,7 +91,7 @@ i = 0; j = polygon->PointN - 1; while (i < j) { - PointType p = polygon->Points[i]; + pcb_point_t p = polygon->Points[i]; polygon->Points[i] = polygon->Points[j]; polygon->Points[j] = p; i++; Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 4766) +++ trunk/src_plugins/export_dsn/dsn.c (revision 4767) @@ -112,9 +112,9 @@ /* this function is mostly ripped from bom.c */ -static PointType get_centroid(ElementType * element) +static pcb_point_t get_centroid(ElementType * element) { - PointType centroid; + pcb_point_t centroid; double sumx = 0.0, sumy = 0.0; int pin_cnt = 0; @@ -254,7 +254,7 @@ ELEMENT_LOOP(PCB->Data); { char *ename; - PointType ecentroid = get_centroid(element); + pcb_point_t ecentroid = get_centroid(element); char *side = TEST_FLAG(PCB_FLAG_ONSOLDER, element) ? "back" : "front"; ename = NAMEONPCB_NAME(element); if (ename != NULL) @@ -287,7 +287,7 @@ { int partside = TEST_FLAG(PCB_FLAG_ONSOLDER, element) ? g_list_length(layerlist) - 1 : 0; int partsidesign = TEST_FLAG(PCB_FLAG_ONSOLDER, element) ? -1 : 1; - PointType centroid = get_centroid(element); + pcb_point_t centroid = get_centroid(element); fprintf(fp, " (image %ld\n", element->ID); /* map every element by ID */ /* loop thru pins and pads to add to image */ PIN_LOOP(element); Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 4766) +++ trunk/src_plugins/io_lihata/read.c (revision 4767) @@ -461,7 +461,7 @@ poly->PointN += cnt->data.table.rows; } poly->PointMax = poly->PointN; - poly->Points = malloc(sizeof(PointType) * poly->PointMax); + poly->Points = malloc(sizeof(pcb_point_t) * poly->PointMax); poly->HoleIndexMax = poly->HoleIndexN = c-1; if (poly->HoleIndexN > 0) poly->HoleIndex = malloc(sizeof(pcb_cardinal_t) * poly->HoleIndexMax); Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 4766) +++ trunk/src_plugins/io_pcb/file.c (revision 4767) @@ -471,7 +471,7 @@ pcb_cardinal_t hole = 0; fprintf(FP, "\tPolygon(%s)\n\t(", F2S(polygon, PCB_TYPE_POLYGON)); for (p = 0; p < polygon->PointN; p++) { - PointTypePtr point = &polygon->Points[p]; + pcb_point_t *point = &polygon->Points[p]; if (hole < polygon->HoleIndexN && p == polygon->HoleIndex[hole]) { if (hole > 0) Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 4766) +++ trunk/src_plugins/polystitch/polystitch.c (revision 4767) @@ -42,7 +42,7 @@ static PolygonType *inner_poly, *outer_poly; static pcb_layer_t *poly_layer; -static double ATAN2(PointType a, PointType b) +static double ATAN2(pcb_point_t a, pcb_point_t b) { if (a.X == b.X && a.Y == b.Y) return 0; @@ -140,7 +140,7 @@ if (iw * ow > 0) { /* Wound in same direction, must reverse one. */ for (i = 0, j = inner_poly->PointN - 1; i < j; i++, j--) { - PointType x = inner_poly->Points[i]; + pcb_point_t x = inner_poly->Points[i]; inner_poly->Points[i] = inner_poly->Points[j]; inner_poly->Points[j] = x; } @@ -153,13 +153,13 @@ */ static void rotate_points(PolygonType * poly, int n) { - PointType *np; + pcb_point_t *np; int n2 = poly->PointN - n; - np = (PointType *) malloc(poly->PointN * sizeof(PointType)); - memcpy(np, poly->Points + n, n2 * sizeof(PointType)); - memcpy(np + n2, poly->Points, n * sizeof(PointType)); - memcpy(poly->Points, np, poly->PointN * sizeof(PointType)); + np = (pcb_point_t *) malloc(poly->PointN * sizeof(pcb_point_t)); + memcpy(np, poly->Points + n, n2 * sizeof(pcb_point_t)); + memcpy(np + n2, poly->Points, n * sizeof(pcb_point_t)); + memcpy(poly->Points, np, poly->PointN * sizeof(pcb_point_t)); free(np); } Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4766) +++ trunk/src_plugins/report/report.c (revision 4767) @@ -442,7 +442,7 @@ case PCB_TYPE_LINE_POINT: case PCB_TYPE_POLYGON_POINT: { - PointTypePtr point = (PointTypePtr) ptr2; + pcb_point_t *point = (pcb_point_t *) ptr2; report = pcb_strdup_printf("%m+POINT ID# %ld.\n" "Located at (X,Y) = %$mD.\n" "It belongs to a %s on layer %d.\n", USER_UNITMASK, point->ID,