Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4794) +++ trunk/src/crosshair.c (revision 4795) @@ -726,7 +726,7 @@ op.type = PCB_TYPE_LINE; op.obj.line = line; vtop_append(&crosshair->onpoint_objs, op); - SET_FLAG(PCB_FLAG_ONPOINT, (AnyObjectType *) line); + SET_FLAG(PCB_FLAG_ONPOINT, (pcb_any_obj_t *) line); DrawLine(NULL, line); return R_DIR_FOUND_CONTINUE; } @@ -756,7 +756,7 @@ op.type = PCB_TYPE_ARC; op.obj.arc = arc; vtop_append(&crosshair->onpoint_objs, op); - SET_FLAG(PCB_FLAG_ONPOINT, (AnyObjectType *) arc); + SET_FLAG(PCB_FLAG_ONPOINT, (pcb_any_obj_t *) arc); DrawArc(NULL, arc); return R_DIR_FOUND_CONTINUE; } @@ -845,7 +845,7 @@ if (onpoint_find(&crosshair->onpoint_objs, op->obj.any) != NULL) continue; - CLEAR_FLAG(PCB_FLAG_ONPOINT, (AnyObjectType *) op->obj.any); + CLEAR_FLAG(PCB_FLAG_ONPOINT, (pcb_any_obj_t *) op->obj.any); DrawLineOrArc(op->type, op->obj.any); redraw = pcb_true; } Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 4794) +++ trunk/src/find_drc.c (revision 4795) @@ -113,7 +113,7 @@ *object_count = 1; *object_id_list = (long int *) malloc(sizeof(long int)); *object_type_list = (int *) malloc(sizeof(int)); - **object_id_list = ((AnyObjectType *) thing_ptr3)->ID; + **object_id_list = ((pcb_any_obj_t *) thing_ptr3)->ID; **object_type_list = thing_type; return; Index: trunk/src/macro.h =================================================================== --- trunk/src/macro.h (revision 4794) +++ trunk/src/macro.h (revision 4795) @@ -50,7 +50,7 @@ /* --------------------------------------------------------------------------- * returns the object ID */ -#define OBJECT_ID(p) (((AnyObjectTypePtr) p)->ID) +#define OBJECT_ID(p) (((pcb_any_obj_t *) p)->ID) /* --------------------------------------------------------------------------- * Determines if object is on front or back Index: trunk/src/obj_any.h =================================================================== --- trunk/src/obj_any.h (revision 4794) +++ trunk/src/obj_any.h (revision 4795) @@ -54,7 +54,7 @@ /* combinations, groups, masks */ PCB_OBJ_CLASS_MASK= 0xF00000, - PCB_OBJ_CLASS_OBJ = 0x000000, /* anything with common object fields (AnyObjectType) */ + PCB_OBJ_CLASS_OBJ = 0x000000, /* anything with common object fields (pcb_any_obj_t) */ PCB_OBJ_ANY = 0xFFFFFF } pcb_objtype_t; @@ -77,7 +77,7 @@ pcb_objtype_t type; union { void *any; - AnyObjectType *anyobj; + pcb_any_obj_t *anyobj; pcb_point_t *point; pcb_line_t *line; pcb_text_t *text; Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 4794) +++ trunk/src/obj_arc.h (revision 4795) @@ -32,7 +32,7 @@ #include "obj_common.h" struct pcb_arc_s { /* holds information about arcs */ - ANYOBJECTFIELDS; + PCB_ANYOBJECTFIELDS; Coord Thickness, Clearance; Coord Width, Height, /* length of axis */ X, Y; /* center coordinates */ Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 4794) +++ trunk/src/obj_common.h (revision 4795) @@ -73,8 +73,8 @@ /* Any object that uses the "object flags" defined in const.h, or exists as an object on the pcb, MUST be defined using this as the - first fields, either directly or through ANYLINEFIELDS. */ -#define ANYOBJECTFIELDS \ + first fields, either directly or through PCB_ANYLINEFIELDS. */ +#define PCB_ANYOBJECTFIELDS \ pcb_box_t BoundingBox; \ long int ID; \ pcb_flag_t Flags; \ @@ -83,8 +83,8 @@ /* struct pcb_lib_entry_t *net */ /* Lines, pads, and rats all use this so they can be cross-cast. */ -#define ANYLINEFIELDS \ - ANYOBJECTFIELDS; \ +#define PCB_ANYLINEFIELDS \ + PCB_ANYOBJECTFIELDS; \ Coord Thickness, \ Clearance; \ pcb_point_t Point1, \ @@ -93,14 +93,12 @@ /* All on-pcb objects (elements, lines, pads, vias, rats, etc) are based on this. */ typedef struct { - ANYOBJECTFIELDS; -} AnyObjectType, *AnyObjectTypePtr; + PCB_ANYOBJECTFIELDS; +} pcb_any_obj_t; /* Lines, rats, pads, etc. */ typedef struct { - ANYLINEFIELDS; -} AnyLineObjectType, *AnyLineObjectTypePtr; + PCB_ANYLINEFIELDS; +} pcb_any_line_t; - - #endif Index: trunk/src/obj_elem.h =================================================================== --- trunk/src/obj_elem.h (revision 4794) +++ trunk/src/obj_elem.h (revision 4795) @@ -38,7 +38,7 @@ struct pcb_element_s { - ANYOBJECTFIELDS; + PCB_ANYOBJECTFIELDS; pcb_text_t Name[MAX_ELEMENTNAMES]; /* the elements names: description text, name on PCB second, value third - see NAME_INDEX() below */ Coord MarkX, MarkY; /* position mark */ pinlist_t Pin; Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 4794) +++ trunk/src/obj_line.h (revision 4795) @@ -32,7 +32,7 @@ #include "obj_common.h" struct pcb_line_s { /* holds information about one line */ - ANYLINEFIELDS; + PCB_ANYLINEFIELDS; char *Number; gdl_elem_t link; /* a line is in a list: either on a layer or in an element */ }; Index: trunk/src/obj_pad.h =================================================================== --- trunk/src/obj_pad.h (revision 4794) +++ trunk/src/obj_pad.h (revision 4795) @@ -32,7 +32,7 @@ #include "obj_common.h" struct pcb_pad_s { /* a SMD pad */ - ANYLINEFIELDS; + PCB_ANYLINEFIELDS; Coord Mask; char *Name, *Number; /* 'Line' */ void *Element; Index: trunk/src/obj_pinvia.h =================================================================== --- trunk/src/obj_pinvia.h (revision 4794) +++ trunk/src/obj_pinvia.h (revision 4795) @@ -32,7 +32,7 @@ #include "obj_common.h" struct pcb_pin_s { - ANYOBJECTFIELDS; + PCB_ANYOBJECTFIELDS; Coord Thickness, Clearance, Mask, DrillingHole; Coord X, Y; /* center and diameter */ char *Name, *Number; Index: trunk/src/obj_poly.h =================================================================== --- trunk/src/obj_poly.h (revision 4794) +++ trunk/src/obj_poly.h (revision 4795) @@ -33,7 +33,7 @@ #include "polyarea.h" struct pcb_polygon_s { /* holds information about a polygon */ - ANYOBJECTFIELDS; + PCB_ANYOBJECTFIELDS; pcb_cardinal_t PointN; /* number of points in polygon */ pcb_cardinal_t PointMax; /* max number from malloc() */ POLYAREA *Clipped; /* the clipped region of this polygon */ Index: trunk/src/obj_rat.h =================================================================== --- trunk/src/obj_rat.h (revision 4794) +++ trunk/src/obj_rat.h (revision 4795) @@ -32,7 +32,7 @@ #include "obj_common.h" struct pcb_rat_line_s { /* a rat-line */ - ANYLINEFIELDS; + PCB_ANYLINEFIELDS; pcb_cardinal_t group1, group2; /* the layer group each point is on */ gdl_elem_t link; /* an arc is in a list on a design */ }; Index: trunk/src/obj_text.h =================================================================== --- trunk/src/obj_text.h (revision 4794) +++ trunk/src/obj_text.h (revision 4795) @@ -32,7 +32,7 @@ #include "obj_common.h" struct pcb_text_s { - ANYOBJECTFIELDS; + PCB_ANYOBJECTFIELDS; int Scale; /* text scaling in percent */ Coord X, Y; /* origin */ pcb_uint8_t Direction; Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 4794) +++ trunk/src/search.c (revision 4795) @@ -80,7 +80,7 @@ { struct ans_info *i = (struct ans_info *) cl; pcb_pin_t *pin = (pcb_pin_t *) box; - AnyObjectType *ptr1 = pin->Element ? pin->Element : pin; + pcb_any_obj_t *ptr1 = pin->Element ? pin->Element : pin; if (TEST_FLAG(i->locked, ptr1)) return R_DIR_NOT_FOUND; @@ -135,7 +135,7 @@ { pcb_pad_t *pad = (pcb_pad_t *) b; struct ans_info *i = (struct ans_info *) cl; - AnyObjectType *ptr1 = pad->Element; + pcb_any_obj_t *ptr1 = pad->Element; if (TEST_FLAG(i->locked, ptr1)) return R_DIR_NOT_FOUND; @@ -793,7 +793,7 @@ /* Also used from line_callback with line type smaller than pad type; use the smallest common subset; ->Thickness is still ok. */ Coord t2 = (Pad->Thickness + 1) / 2, range; - AnyLineObjectType pad = *(AnyLineObjectType *) Pad; + pcb_any_line_t pad = *(pcb_any_line_t *) Pad; /* series of transforms saving range */ Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 4794) +++ trunk/src/undo.c (revision 4795) @@ -755,7 +755,7 @@ { void *ptr1, *ptr2, *ptr3; void *ptr1b, *ptr2b, *ptr3b; - AnyObjectType *obj, *obj2; + pcb_any_obj_t *obj, *obj2; int type; long int swap_id; @@ -768,8 +768,8 @@ if (type == PCB_TYPE_NONE) return pcb_false; - obj = (AnyObjectType *) ptr2; - obj2 = (AnyObjectType *) ptr2b; + obj = (pcb_any_obj_t *) ptr2; + obj2 = (pcb_any_obj_t *) ptr2b; swap_id = obj->ID; obj->ID = obj2->ID; @@ -780,7 +780,7 @@ if (andDraw) DrawRecoveredObject(Entry->Kind, ptr1, ptr2, ptr3); - obj = (AnyObjectType *) MoveObjectToBuffer(PCB->Data, RemoveList, type, ptr1, ptr2, ptr3); + obj = (pcb_any_obj_t *) MoveObjectToBuffer(PCB->Data, RemoveList, type, ptr1, ptr2, ptr3); if (Entry->Kind == PCB_TYPE_POLYGON) InitClip(PCB->Data, (pcb_layer_t *) ptr1b, (pcb_polygon_t *) obj); return (pcb_true); @@ -1286,7 +1286,7 @@ static void CopyObjectToUndoList(int undo_type, int Type, void *Ptr1, void *Ptr2, void *Ptr3) { UndoListTypePtr undo; - AnyObjectType *copy; + pcb_any_obj_t *copy; if (Locked) return; @@ -1295,7 +1295,7 @@ RemoveList = CreateNewBuffer(); undo = GetUndoSlot(undo_type, OBJECT_ID(Ptr2), Type); - copy = (AnyObjectType *) CopyObjectToBuffer(RemoveList, PCB->Data, Type, Ptr1, Ptr2, Ptr3); + copy = (pcb_any_obj_t *) CopyObjectToBuffer(RemoveList, PCB->Data, Type, Ptr1, Ptr2, Ptr3); undo->Data.CopyID = copy->ID; } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/object.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/object.c (revision 4794) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/object.c (revision 4795) @@ -10,12 +10,12 @@ int layout_obj_coord(layout_object_t *obj, layout_object_coord_t coord) { - AnyObjectType *o; + pcb_any_obj_t *o; if (obj == NULL) return -1; - o = (AnyObjectType *)obj->obj.l; + o = (pcb_any_obj_t *)obj->obj.l; /* bounding box is the same for any type */ switch (coord) { 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 4794) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c (revision 4795) @@ -110,7 +110,7 @@ static void select_cb(void *obj_, void *ud) { select_t *ctx = ud; - AnyObjectTypePtr obj = obj_; + pcb_any_obj_t *obj = obj_; if (TEST_FLAG(ctx->flag, obj)) search_append(ctx->search, obj); } Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4794) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4795) @@ -210,7 +210,7 @@ continue; } AddObjectToFlagUndoList(object_type, ptr1, ptr2, ptr3); - SET_FLAG(PCB_FLAG_FOUND, (AnyObjectType *) ptr2); + SET_FLAG(PCB_FLAG_FOUND, (pcb_any_obj_t *) ptr2); switch (violation->object_type_list[i]) { case PCB_TYPE_LINE: case PCB_TYPE_ARC: Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4794) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4795) @@ -203,7 +203,7 @@ return; AddObjectToFlagUndoList(conn.type, conn.ptr1, conn.ptr2, conn.ptr2); - TOGGLE_FLAG(PCB_FLAG_SELECTED, (AnyObjectType *) conn.ptr2); + TOGGLE_FLAG(PCB_FLAG_SELECTED, (pcb_any_obj_t *) conn.ptr2); DrawObject(conn.type, conn.ptr1, conn.ptr2); } Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 4794) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 4795) @@ -56,11 +56,11 @@ struct short_conn_s { int gid; /* id in the graph */ int from_type; -/* AnyObjectType *from;*/ +/* pcb_any_obj_t *from;*/ int from_id; int to_type; int edges; /* number of edges */ - AnyObjectType *to; + pcb_any_obj_t *to; pcb_found_conn_type_t type; short_conn_t *next; }; @@ -71,7 +71,7 @@ static void proc_short_cb(int current_type, void *current_obj, int from_type, void *from_obj, pcb_found_conn_type_t type) { - AnyObjectType *curr = current_obj, *from = from_obj; + pcb_any_obj_t *curr = current_obj, *from = from_obj; short_conn_t *s; s = malloc(sizeof(short_conn_t)); Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 4794) +++ trunk/src_plugins/puller/puller.c (revision 4795) @@ -612,7 +612,7 @@ #if TRACE1 -static void clear_found_cb(AnyObjectType * ptr, Extra * extra, void *userdata) +static void clear_found_cb(pcb_any_obj_t * ptr, Extra * extra, void *userdata) { extra->found = 0; } @@ -916,7 +916,7 @@ return R_DIR_NOT_FOUND; } -static void null_multi_next_ends(AnyObjectType * ptr, Extra * extra, void *userdata) +static void null_multi_next_ends(pcb_any_obj_t * ptr, Extra * extra, void *userdata) { if (extra->start.next == &multi_next) extra->start.next = NULL; @@ -1044,7 +1044,7 @@ } } -static void propogate_end_step1_cb(AnyObjectType * ptr, Extra * extra, void *userdata) +static void propogate_end_step1_cb(pcb_any_obj_t * ptr, Extra * extra, void *userdata) { if (extra->start.next != NULL && extra->start.next == extra->end.next) { extra->end.next = NULL; @@ -1058,7 +1058,7 @@ propogate_ends_at(extra, &extra->end, &extra->start); } -static void propogate_end_step2_cb(AnyObjectType * ptr, Extra * extra, void *userdata) +static void propogate_end_step2_cb(pcb_any_obj_t * ptr, Extra * extra, void *userdata) { if (extra->start.in_pin) { #if TRACE1 @@ -1074,7 +1074,7 @@ } } -static void propogate_end_step3_cb(AnyObjectType * ptr, Extra * extra, void *userdata) +static void propogate_end_step3_cb(pcb_any_obj_t * ptr, Extra * extra, void *userdata) { if (extra->start.next) propogate_end_pin(extra, &extra->end, &extra->start); @@ -2216,7 +2216,7 @@ abort(); } -static void validate_pair_cb(AnyObjectType * ptr, Extra * extra, void *userdata) +static void validate_pair_cb(pcb_any_obj_t * ptr, Extra * extra, void *userdata) { validate_pair(extra, &extra->start); validate_pair(extra, &extra->end); @@ -2246,7 +2246,7 @@ } #if TRACE1 -static void trace_print_extra(AnyObjectType * ptr, Extra * extra, void *userdata) +static void trace_print_extra(pcb_any_obj_t * ptr, Extra * extra, void *userdata) { last_pextra = (Extra *) 1; print_extra(extra, 0); Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4794) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4795) @@ -102,7 +102,7 @@ static Coord padDX(pcb_connection_t * conn) { pcb_element_t *element = (pcb_element_t *) conn->ptr1; - AnyLineObjectType *line = (AnyLineObjectType *) conn->ptr2; + pcb_any_line_t *line = (pcb_any_line_t *) conn->ptr2; return line->BoundingBox.X1 - (element->BoundingBox.X1 + element->BoundingBox.X2) / 2; }