Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 5067) +++ trunk/doc-rnd/hacking/renames (revision 5068) @@ -1115,3 +1115,8 @@ plug_fp_chain -> pcb_plug_fp_chain plug_import_chain -> pcb_plug_import_chain plug_io_chain -> pcb_plug_io_chain +PLF_DIR -> PCB_PLF_DIR +PLF_INV -> PCB_PLF_INV +PLF_MARK -> PCB_PLF_MARK +VertexEqu -> pcb_vertex_equ +VertexCpy -> pcb_vertex_cpy Index: trunk/src/polyarea.h =================================================================== --- trunk/src/polyarea.h (revision 5067) +++ trunk/src/polyarea.h (revision 5068) @@ -25,9 +25,9 @@ #ifndef PCB_POLYAREA_H #define PCB_POLYAREA_H -#define PLF_DIR 1 -#define PLF_INV 0 -#define PLF_MARK 1 +#define PCB_PLF_DIR 1 +#define PCB_PLF_INV 0 +#define PCB_PLF_MARK 1 #ifndef min #define min(x, y) ((x) < (y) ? (x) : (y)) @@ -42,8 +42,8 @@ coordinates */ typedef pcb_vertex_t pcb_vector_t; -#define VertexEqu(a,b) (memcmp((a),(b),sizeof(pcb_vector_t))==0) -#define VertexCpy(a,b) memcpy((a),(b),sizeof(pcb_vector_t)) +#define pcb_vertex_equ(a,b) (memcmp((a),(b),sizeof(pcb_vector_t))==0) +#define pcb_vertex_cpy(a,b) memcpy((a),(b),sizeof(pcb_vector_t)) extern pcb_vector_t vect_zero; Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 5067) +++ trunk/src/polygon.c (revision 5068) @@ -238,7 +238,7 @@ { pcb_polyarea_t *p; pcb_poly_contour_pre(contour, pcb_true); - assert(contour->Flags.orient == PLF_DIR); + assert(contour->Flags.orient == PCB_PLF_DIR); if (!(p = pcb_polyarea_create())) return NULL; pcb_polyarea_contour_include(p, contour); @@ -277,9 +277,9 @@ pcb_poly_contour_pre(contour, pcb_true); /* make sure it is a positive contour (outer) or negative (hole) */ - if (contour->Flags.orient != (hole ? PLF_INV : PLF_DIR)) + if (contour->Flags.orient != (hole ? PCB_PLF_INV : PCB_PLF_DIR)) pcb_poly_contour_inv(contour); - assert(contour->Flags.orient == (hole ? PLF_INV : PLF_DIR)); + assert(contour->Flags.orient == (hole ? PCB_PLF_INV : PCB_PLF_DIR)); pcb_polyarea_contour_include(np, contour); contour = NULL; Index: trunk/src/polygon1.c =================================================================== --- trunk/src/polygon1.c (revision 5067) +++ trunk/src/polygon1.c (revision 5068) @@ -1096,7 +1096,7 @@ assert(cntr->Count > 2); cntr->next = NULL; - if (cntr->Flags.orient == PLF_DIR) { + if (cntr->Flags.orient == PCB_PLF_DIR) { if (owner != NULL) pcb_r_delete_entry(owner->contour_tree, (pcb_box_t *) cntr); InsCntr(e, cntr, contours); @@ -1167,7 +1167,7 @@ pcb_pline_t *check = (pcb_pline_t *) b; /* Do test on check to see if it inside info->want_inside */ /* If it is: */ - if (check->Flags.orient == PLF_DIR) { + if (check->Flags.orient == PCB_PLF_DIR) { return R_DIR_NOT_FOUND; } if (pcb_poly_contour_in_contour(info->want_inside, check)) { @@ -1761,7 +1761,7 @@ struct find_inside_m_pa_info *info = (struct find_inside_m_pa_info *) cl; pcb_pline_t *check = (pcb_pline_t *) b; /* Don't report for the main contour */ - if (check->Flags.orient == PLF_DIR) + if (check->Flags.orient == PCB_PLF_DIR) return R_DIR_NOT_FOUND; /* Don't look at contours marked as being intersected */ if (check->Flags.status == ISECTED) @@ -2357,7 +2357,7 @@ } C->area = PCB_ABS(area); if (C->Count > 2) - C->Flags.orient = ((area < 0) ? PLF_INV : PLF_DIR); + C->Flags.orient = ((area < 0) ? PCB_PLF_INV : PCB_PLF_DIR); C->tree = (pcb_rtree_t *) make_edge_tree(C); } /* poly_PreContour */ @@ -2515,7 +2515,7 @@ if ((c == NULL) || (p == NULL)) return pcb_false; - if (c->Flags.orient == PLF_DIR) { + if (c->Flags.orient == PCB_PLF_DIR) { if (p->contours != NULL) return pcb_false; p->contours = c; @@ -2705,7 +2705,7 @@ pcb_vnode_t *min_q = NULL; double dist; double min_dist = 0.0; - double dir = (poly->Flags.orient == PLF_DIR) ? 1. : -1; + double dir = (poly->Flags.orient == PCB_PLF_DIR) ? 1. : -1; /* Find a convex node on the polygon */ pt1 = &poly->head; @@ -2933,11 +2933,11 @@ if ((p == NULL) || (p->contours == NULL)) return pcb_false; - if (p->contours->Flags.orient == PLF_INV || pcb_polyarea_contour_check(p->contours)) { + if (p->contours->Flags.orient == PCB_PLF_INV || pcb_polyarea_contour_check(p->contours)) { #ifndef NDEBUG pcb_vnode_t *v, *n; DEBUGP("Invalid Outer pcb_pline_t\n"); - if (p->contours->Flags.orient == PLF_INV) + if (p->contours->Flags.orient == PCB_PLF_INV) DEBUGP("failed orient\n"); if (pcb_polyarea_contour_check(p->contours)) DEBUGP("failed self-intersection\n"); @@ -2951,11 +2951,11 @@ return pcb_false; } for (c = p->contours->next; c != NULL; c = c->next) { - if (c->Flags.orient == PLF_DIR || pcb_polyarea_contour_check(c) || !pcb_poly_contour_in_contour(p->contours, c)) { + if (c->Flags.orient == PCB_PLF_DIR || pcb_polyarea_contour_check(c) || !pcb_poly_contour_in_contour(p->contours, c)) { #ifndef NDEBUG pcb_vnode_t *v, *n; DEBUGP("Invalid Inner pcb_pline_t orient = %d\n", c->Flags.orient); - if (c->Flags.orient == PLF_DIR) + if (c->Flags.orient == PCB_PLF_DIR) DEBUGP("failed orient\n"); if (pcb_polyarea_contour_check(c)) DEBUGP("failed self-intersection\n"); Index: trunk/src_plugins/gl/hidgl.c =================================================================== --- trunk/src_plugins/gl/hidgl.c (revision 5067) +++ trunk/src_plugins/gl/hidgl.c (revision 5068) @@ -553,7 +553,7 @@ pcb_pline_t *curc = (pcb_pline_t *) b; /* Ignore the outer contour - we draw it first explicitly */ - if (curc->Flags.orient == PLF_DIR) { + if (curc->Flags.orient == PCB_PLF_DIR) { return R_DIR_NOT_FOUND; } Index: trunk/src_plugins/polycombine/polycombine.c =================================================================== --- trunk/src_plugins/polycombine/polycombine.c (revision 5067) +++ trunk/src_plugins/polycombine/polycombine.c (revision 5068) @@ -72,12 +72,12 @@ /* Log the direction in which the outer contour was specified */ if (hole == 0) - *forward = (contour->Flags.orient == PLF_DIR); + *forward = (contour->Flags.orient == PCB_PLF_DIR); /* make sure it is a positive contour (outer) or negative (hole) */ - if (contour->Flags.orient != (hole ? PLF_INV : PLF_DIR)) + if (contour->Flags.orient != (hole ? PCB_PLF_INV : PCB_PLF_DIR)) pcb_poly_contour_inv(contour); - assert(contour->Flags.orient == (hole ? PLF_INV : PLF_DIR)); + assert(contour->Flags.orient == (hole ? PCB_PLF_INV : PCB_PLF_DIR)); pcb_polyarea_contour_include(np, contour); contour = NULL;