Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 10208) +++ trunk/src/polygon.c (revision 10209) @@ -705,7 +705,7 @@ return np; } -/* clear np1 from the polygon */ +/* clear np1 from the polygon - should be inline with -O3 */ static int Subtract(pcb_polyarea_t * np1, pcb_polygon_t * p, pcb_bool fnp) { pcb_polyarea_t *merged = NULL, *np = np1; @@ -743,6 +743,11 @@ return 1; } +int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_polygon_t *p, pcb_bool fnp) +{ + return Subtract(np1, p, fnp); +} + /* create a polygon of the pin clearance */ pcb_polyarea_t *pcb_poly_from_pin(pcb_pin_t * pin, pcb_coord_t thick, pcb_coord_t clear) { Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 10208) +++ trunk/src/polygon.h (revision 10209) @@ -96,5 +96,8 @@ pcb_bool pcb_pline_is_rectangle(pcb_pline_t *pl); +/* clear np1 from the polygon; also free np1 if fnp is true. Returns 1 on + success. */ +int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_polygon_t *p, pcb_bool fnp); #endif