Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4964) +++ trunk/doc-rnd/hacking/renames (revision 4965) @@ -570,3 +570,8 @@ MOVE_PAD_LOWLEVEL -> pcb_pad_move MOVE_PIN_LOWLEVEL -> pcb_pin_move MOVE_VIA_LOWLEVEL -> pcb_via_move +ALLARC_LOOP -> PCB_ARC_ALL_LOOP +COPPERARC_LOOP -> PCB_ARC_COPPER_LOOP +SILKARC_LOOP -> PCB_ARC_SILK_LOOP +VISIBLEARC_LOOP -> PCB_ARC_VISIBLE_LOOP +ARC_LOOP -> PCB_ARC_LOOP Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4964) +++ trunk/src/action_helper.c (revision 4965) @@ -275,7 +275,7 @@ } } ENDALL_LOOP; - ALLARC_LOOP(PCB->Data); + PCB_ARC_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, arc)) { PCB_FLAG_CLEAR(PCB_FLAG_WARN, arc); Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4964) +++ trunk/src/buffer.c (revision 4965) @@ -249,7 +249,7 @@ r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; - ALLARC_LOOP(Buffer->Data); + PCB_ARC_ALL_LOOP(Buffer->Data); { r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); pcb_arc_rotate90(arc, Buffer->X, Buffer->Y, Number); @@ -311,7 +311,7 @@ r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; - ALLARC_LOOP(Buffer->Data); + PCB_ARC_ALL_LOOP(Buffer->Data); { r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); free_rotate(&arc->X, &arc->Y, Buffer->X, Buffer->Y, cosa, sina); @@ -432,7 +432,7 @@ line->Point2.Y = PCB_SWAP_Y(line->Point2.Y); } ENDALL_LOOP; - ALLARC_LOOP(Buffer->Data); + PCB_ARC_ALL_LOOP(Buffer->Data); { arc->X = PCB_SWAP_X(arc->X); arc->Y = PCB_SWAP_Y(arc->Y); @@ -494,7 +494,7 @@ r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } ENDALL_LOOP; - ALLARC_LOOP(Buffer->Data); + PCB_ARC_ALL_LOOP(Buffer->Data); { r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); arc->X = PCB_SWAP_X(arc->X); @@ -643,7 +643,7 @@ CopyLine(&ctx, destlayer, line); } END_LOOP; - ARC_LOOP(sourcelayer); + PCB_ARC_LOOP(sourcelayer); { CopyArc(&ctx, destlayer, arc); } Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4964) +++ trunk/src/crosshair.c (revision 4965) @@ -232,7 +232,7 @@ END_LOOP; /* arc coordinates and angles have to be converted to X11 notation */ - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { gui->draw_arc(Crosshair.GC, DX + arc->X, DY + arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); } @@ -298,7 +298,7 @@ gui->draw_line(Crosshair.GC, x + line->Point1.X, y + line->Point1.Y, x + line->Point2.X, y + line->Point2.Y); } END_LOOP; - ARC_LOOP(layer); + PCB_ARC_LOOP(layer); { gui->draw_arc(Crosshair.GC, x + arc->X, y + arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); } Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 4964) +++ trunk/src/data.c (revision 4965) @@ -67,7 +67,7 @@ } if (acb != NULL) { - ARC_LOOP(layer); + PCB_ARC_LOOP(layer); { acb(ctx, PCB, layer, arc); } @@ -114,7 +114,7 @@ } if (eacb != NULL) { - ELEMENTARC_LOOP(element); + ELEMENTPCB_ARC_LOOP(element); { eacb(ctx, PCB, element, arc); } @@ -316,7 +316,7 @@ box.Y2 = MAX(box.Y2, line->Point2.Y + line->Thickness / 2); } ENDALL_LOOP; - ALLARC_LOOP(Data); + PCB_ARC_ALL_LOOP(Data); { box.X1 = MIN(box.X1, arc->BoundingBox.X1); box.Y1 = MIN(box.Y1, arc->BoundingBox.Y1); Index: trunk/src/find_clear.c =================================================================== --- trunk/src/find_clear.c (revision 4964) +++ trunk/src/find_clear.c (revision 4965) @@ -106,7 +106,7 @@ } } ENDALL_LOOP; - COPPERARC_LOOP(PCB->Data); + PCB_ARC_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, arc)) { if (AndDraw) Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 4964) +++ trunk/src/find_drc.c (revision 4965) @@ -426,7 +426,7 @@ ENDALL_LOOP; } if (!IsBad) { - COPPERARC_LOOP(PCB->Data); + PCB_ARC_COPPER_LOOP(PCB->Data); { PlowsPolygon(PCB->Data, PCB_TYPE_ARC, layer, arc, drc_callback); if (IsBad) Index: trunk/src/find_misc.c =================================================================== --- trunk/src/find_misc.c (revision 4964) +++ trunk/src/find_misc.c (revision 4965) @@ -372,7 +372,7 @@ } } ENDALL_LOOP; - COPPERARC_LOOP(PCB->Data); + PCB_ARC_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(TheFlag, arc)) { if (AndDraw) Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 4964) +++ trunk/src/obj_arc.c (revision 4965) @@ -176,7 +176,7 @@ { pcb_arc_t *Arc; - ARC_LOOP(Layer); + PCB_ARC_LOOP(Layer); { if (arc->X == X1 && arc->Y == Y1 && arc->Width == width && NormalizeAngle(arc->StartAngle) == NormalizeAngle(sa) && arc->Delta == dir) Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 4964) +++ trunk/src/obj_arc.h (revision 4965) @@ -69,39 +69,39 @@ PCB_BOX_MOVE_LOWLEVEL(&((__a__)->BoundingBox),__dx__,__dy__); \ } while(0) -#define ARC_LOOP(element) do { \ +#define PCB_ARC_LOOP(element) do { \ pcb_arc_t *arc; \ gdl_iterator_t __it__; \ linelist_foreach(&(element)->Arc, &__it__, arc) { -#define ALLARC_LOOP(top) do { \ +#define PCB_ARC_ALL_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l =0; l < max_copper_layer + 2; l++, layer++) \ { \ - ARC_LOOP(layer) + PCB_ARC_LOOP(layer) -#define COPPERARC_LOOP(top) do { \ +#define PCB_ARC_COPPER_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l =0; l < max_copper_layer; l++, layer++) \ { \ - ARC_LOOP(layer) + PCB_ARC_LOOP(layer) -#define SILKARC_LOOP(top) do { \ +#define PCB_ARC_SILK_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ layer += max_copper_layer; \ for (l = 0; l < 2; l++, layer++) \ { \ - ARC_LOOP(layer) + PCB_ARC_LOOP(layer) -#define VISIBLEARC_LOOP(top) do { \ +#define PCB_ARC_VISIBLE_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ if (layer->On) \ - ARC_LOOP(layer) + PCB_ARC_LOOP(layer) #endif Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4964) +++ trunk/src/obj_elem.c (revision 4965) @@ -188,7 +188,7 @@ line->Number = pcb_strdup_null(NAMEONPCB_NAME(element)); } END_LOOP; - ARC_LOOP(element); + PCB_ARC_LOOP(element); { pcb_arc_new(&Buffer->Data->SILKLAYER, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness, 0, pcb_no_flags()); @@ -367,7 +367,7 @@ hasParts = pcb_true; } END_LOOP; - ARC_LOOP(&Buffer->Data->SILKLAYER); + PCB_ARC_LOOP(&Buffer->Data->SILKLAYER); { pcb_element_arc_new(Element, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness); hasParts = pcb_true; @@ -435,7 +435,7 @@ pcb_line_bbox((pcb_line_t *) pad); } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { free_rotate(&arc->X, &arc->Y, X, Y, cosa, sina); arc->StartAngle = NormalizeAngle(arc->StartAngle + angle); @@ -545,7 +545,7 @@ pad->Clearance, pad->Mask, pad->Name, pad->Number, pcb_flag_mask(pad->Flags, PCB_FLAG_FOUND)); } END_LOOP; - ARC_LOOP(Src); + PCB_ARC_LOOP(Src); { pcb_element_arc_new(Dest, arc->X + dx, arc->Y + dy, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness); } @@ -690,7 +690,7 @@ PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, pad); } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { arc->X = PCB_SWAP_X(arc->X); arc->Y = PCB_SWAP_Y(arc->Y) + yoff; @@ -755,7 +755,7 @@ PCB_MAKE_MAX(box->Y2, line->Point2.Y + (line->Thickness + 1) / 2); } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { pcb_arc_bbox(arc); PCB_MAKE_MIN(box->X1, arc->BoundingBox.X1); @@ -1026,7 +1026,7 @@ } } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { pcb_arc_move(arc, DX, DY); } @@ -1096,7 +1096,7 @@ ROTATE_PAD_LOWLEVEL(pad, X, Y, Number); } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { pcb_arc_rotate90(arc, X, Y, Number); } @@ -1324,7 +1324,7 @@ } } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : arc->Thickness + ctx->chgsize.delta; if (value <= MAX_LINESIZE && value >= MIN_LINESIZE && value != arc->Thickness) { @@ -1728,7 +1728,7 @@ _draw_line(line); } END_LOOP; - ARC_LOOP(element); + PCB_ARC_LOOP(element); { _draw_arc(arc); } @@ -1805,7 +1805,7 @@ EraseLine(line); } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { EraseArc(arc); } @@ -1858,7 +1858,7 @@ DrawLine(NULL, line); } END_LOOP; - ARC_LOOP(Element); + PCB_ARC_LOOP(Element); { DrawArc(NULL, arc); } Index: trunk/src/obj_elem.h =================================================================== --- trunk/src/obj_elem.h (revision 4964) +++ trunk/src/obj_elem.h (revision 4965) @@ -144,7 +144,7 @@ gdl_iterator_t __it__; \ linelist_foreach(&(element)->Line, &__it__, line) { -#define ELEMENTARC_LOOP(element) do { \ +#define ELEMENTPCB_ARC_LOOP(element) do { \ pcb_arc_t *arc; \ gdl_iterator_t __it__; \ linelist_foreach(&(element)->Arc, &__it__, arc) { Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 4964) +++ trunk/src/object_act.c (revision 4965) @@ -739,7 +739,7 @@ } } ENDALL_LOOP; - ALLARC_LOOP(PCB->Data); + PCB_ARC_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_AUTO, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) { RemoveObject(PCB_TYPE_ARC, layer, arc, arc); @@ -966,7 +966,7 @@ } } ENDALL_LOOP; - ALLARC_LOOP(PCB->Data); + PCB_ARC_ALL_LOOP(PCB->Data); { if (!PCB_FLAGS_TEST(flags, arc)) continue; Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 4964) +++ trunk/src/search.c (revision 4965) @@ -1154,7 +1154,7 @@ ENDALL_LOOP; } if (type == PCB_TYPE_ARC) { - ALLARC_LOOP(Base); + PCB_ARC_ALL_LOOP(Base); { if (arc->ID == ID) { *Result1 = (void *) layer; @@ -1253,7 +1253,7 @@ } END_LOOP; if (type == PCB_TYPE_ELEMENT_ARC) - ARC_LOOP(element); + PCB_ARC_LOOP(element); { if (arc->ID == ID) { *Result1 = (void *) element; Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 4964) +++ trunk/src/select.c (revision 4965) @@ -320,7 +320,7 @@ } } END_LOOP; - ARC_LOOP(layer); + PCB_ARC_LOOP(layer); { if (ARC_NEAR_BOX(arc, Box) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc) @@ -577,7 +577,7 @@ /* check arcs */ if (type & PCB_TYPE_ARC && F->Arc) - VISIBLEARC_LOOP(PCB->Data); + PCB_ARC_VISIBLE_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, arc)) { if (Reset) { @@ -750,7 +750,7 @@ } } ENDALL_LOOP; - VISIBLEARC_LOOP(PCB->Data); + PCB_ARC_VISIBLE_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) { AddObjectToFlagUndoList(PCB_TYPE_ARC, layer, arc, arc); Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 4964) +++ trunk/src_plugins/autocrop/autocrop.c (revision 4965) @@ -155,7 +155,7 @@ AddObjectToMoveUndoList(PCB_TYPE_LINE, NULL, NULL, line, dx, dy); } ENDALL_LOOP; - ALLARC_LOOP(PCB->Data); + PCB_ARC_ALL_LOOP(PCB->Data); { MyMoveArcLowLevel(PCB->Data, layer, arc, dx, dy); AddObjectToMoveUndoList(PCB_TYPE_ARC, NULL, NULL, arc, dx, dy); Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4964) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4965) @@ -1118,7 +1118,7 @@ } END_LOOP; /* add all arcs */ - ARC_LOOP(LAYER_PTR(i)); + PCB_ARC_LOOP(LAYER_PTR(i)); { AddArc(layergroupboxes, layergroup, arc, rd->styles[rd->max_styles]); } Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 4964) +++ trunk/src_plugins/boardflip/boardflip.c (revision 4965) @@ -100,7 +100,7 @@ InitClip(PCB->Data, layer, polygon); } END_LOOP; - ARC_LOOP(layer); + PCB_ARC_LOOP(layer); { FLIP(arc->Y); NEG(arc->StartAngle); @@ -131,7 +131,7 @@ FLIP(line->Point2.Y); } END_LOOP; - ELEMENTARC_LOOP(element); + ELEMENTPCB_ARC_LOOP(element); { FLIP(arc->Y); NEG(arc->StartAngle); Index: trunk/src_plugins/draw_fab/draw_fab.c =================================================================== --- trunk/src_plugins/draw_fab/draw_fab.c (revision 4964) +++ trunk/src_plugins/draw_fab/draw_fab.c (revision 4965) @@ -269,7 +269,7 @@ gui->draw_line(gc, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); } END_LOOP; - ARC_LOOP(layer); + PCB_ARC_LOOP(layer); { gui->draw_arc(gc, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); } Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 4964) +++ trunk/src_plugins/export_bboard/bboard.c (revision 4965) @@ -555,7 +555,7 @@ bboard_draw_line_cairo(line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness); } END_LOOP; - ARC_LOOP(&(PCB->Data->Layer[i])); + PCB_ARC_LOOP(&(PCB->Data->Layer[i])); { #warning TODO: remove x1;y1;x2;y2 bboard_draw_arc_cairo(/*arc->Point1.X, arc->Point1.Y, Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4964) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4965) @@ -145,7 +145,7 @@ } } ENDALL_LOOP; - COPPERARC_LOOP(PCB->Data); + PCB_ARC_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, arc)) { AddObjectToFlagUndoList(PCB_TYPE_ARC, layer, arc, arc); Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4964) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4965) @@ -540,7 +540,7 @@ } ENDALL_LOOP; - VISIBLEARC_LOOP(PCB->Data); + PCB_ARC_VISIBLE_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) RemoveObject(PCB_TYPE_ARC, layer, arc, arc); Index: trunk/src_plugins/hid_gtk/gui-pinout-preview.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 4964) +++ trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 4965) @@ -94,7 +94,7 @@ } END_LOOP; - ARC_LOOP(&pinout->element); + PCB_ARC_LOOP(&pinout->element); { /* * for whatever reason setting a thickness of 0 causes the arcs to Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 4964) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 4965) @@ -180,7 +180,7 @@ } ENDALL_LOOP; - VISIBLEARC_LOOP(PCB->Data); + PCB_ARC_VISIBLE_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) RemoveObject(PCB_TYPE_ARC, layer, arc, arc); Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 4964) +++ trunk/src_plugins/puller/puller.c (revision 4965) @@ -945,7 +945,7 @@ static void find_pairs() { - ARC_LOOP(CURRENT); { + PCB_ARC_LOOP(CURRENT); { Extra *e = new_arc_extra(arc); fix_arc_extra(arc, e); } END_LOOP; @@ -963,7 +963,7 @@ } END_LOOP; - ARC_LOOP(CURRENT); { + PCB_ARC_LOOP(CURRENT); { Extra *e = ARC2EXTRA(arc); if (!e->deleted) { find_pairs_1(arc, &e->start.next, e->start.x, e->start.y); @@ -1174,7 +1174,7 @@ e = LINE2EXTRA(line); trace_path(e); } END_LOOP; - ARC_LOOP(CURRENT); { + PCB_ARC_LOOP(CURRENT); { e = ARC2EXTRA(arc); trace_path(e); } END_LOOP; @@ -2359,7 +2359,7 @@ } END_LOOP; - ARC_LOOP(CURRENT); + PCB_ARC_LOOP(CURRENT); { if (ARC2EXTRA(arc)->deleted) pcb_arc_destroy(CURRENT, arc); Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4964) +++ trunk/src_plugins/report/report.c (revision 4965) @@ -531,7 +531,7 @@ } ENDALL_LOOP; - ALLARC_LOOP(PCB->Data); + PCB_ARC_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, arc)) { double l;