Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 5054) +++ trunk/doc-rnd/hacking/renames (revision 5055) @@ -1085,3 +1085,6 @@ hid_num_hids -> pcb_hid_num_hids MENU_LOOP -> PCB_MENU_LOOP ENTRY_LOOP -> PCB_ENTRY_LOOP +SWAP_IDENT -> PCB_SWAP_IDENT +END_LOOP -> PCB_END_LOOP +ENDALL_LOOP -> PCB_ENDALL_LOOP Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 5054) +++ trunk/src/action_helper.c (revision 5055) @@ -249,7 +249,7 @@ DrawPin(pin); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, via)) { @@ -257,7 +257,7 @@ DrawVia(via); } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, pad)) { @@ -265,7 +265,7 @@ DrawPad(pad); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_LINE_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, line)) { @@ -273,7 +273,7 @@ DrawLine(layer, line); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, arc)) { @@ -281,7 +281,7 @@ DrawArc(layer, arc); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, polygon)) { @@ -289,7 +289,7 @@ DrawPolygon(layer, polygon); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; pcb_draw(); } @@ -689,13 +689,13 @@ PCB_FLAG_TOGGLE(PCB_FLAG_LOCK, pin); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { PCB_FLAG_TOGGLE(PCB_FLAG_LOCK, pad); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, pad); } - END_LOOP; + PCB_END_LOOP; PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, element); /* always re-draw it since I'm too lazy * to tell if a selected flag changed @@ -1130,8 +1130,8 @@ break; case PCB_MODE_ROTATE: - pcb_screen_obj_rotate90(Note.X, Note.Y, pcb_gui->shift_is_pressed()? (SWAP_IDENT ? 1 : 3) - : (SWAP_IDENT ? 3 : 1)); + pcb_screen_obj_rotate90(Note.X, Note.Y, pcb_gui->shift_is_pressed()? (PCB_SWAP_IDENT ? 1 : 3) + : (PCB_SWAP_IDENT ? 3 : 1)); break; /* both are almost the same */ Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 5054) +++ trunk/src/buffer.c (revision 5055) @@ -231,7 +231,7 @@ pcb_pin_bbox(via); pcb_r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } - END_LOOP; + PCB_END_LOOP; /* elements */ PCB_ELEMENT_LOOP(Buffer->Data); @@ -238,7 +238,7 @@ { pcb_element_rotate90(Buffer->Data, element, Buffer->X, Buffer->Y, Number); } - END_LOOP; + PCB_END_LOOP; /* all layer related objects */ PCB_LINE_ALL_LOOP(Buffer->Data); @@ -247,7 +247,7 @@ pcb_line_rotate90(line, Buffer->X, Buffer->Y, Number); pcb_r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); @@ -254,7 +254,7 @@ pcb_arc_rotate90(arc, Buffer->X, Buffer->Y, Number); pcb_r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->text_tree, (pcb_box_t *) text); @@ -261,7 +261,7 @@ pcb_text_rotate90(text, Buffer->X, Buffer->Y, Number); pcb_r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); @@ -268,7 +268,7 @@ pcb_poly_rotate90(polygon, Buffer->X, Buffer->Y, Number); pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* finally the origin and the bounding box */ PCB_COORD_ROTATE90(Buffer->X, Buffer->Y, Buffer->X, Buffer->Y, Number); @@ -291,7 +291,7 @@ pcb_pin_bbox(via); pcb_r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } - END_LOOP; + PCB_END_LOOP; /* elements */ PCB_ELEMENT_LOOP(Buffer->Data); @@ -298,7 +298,7 @@ { pcb_element_rotate(Buffer->Data, element, Buffer->X, Buffer->Y, cosa, sina, angle); } - END_LOOP; + PCB_END_LOOP; /* all layer related objects */ PCB_LINE_ALL_LOOP(Buffer->Data); @@ -309,7 +309,7 @@ pcb_line_bbox(line); pcb_r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); @@ -317,7 +317,7 @@ arc->StartAngle = pcb_normalize_angle(arc->StartAngle + angle); pcb_r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* FIXME: rotate text */ PCB_POLY_ALL_LOOP(Buffer->Data); { @@ -326,11 +326,11 @@ { pcb_rotate(&point->X, &point->Y, Buffer->X, Buffer->Y, cosa, sina); } - END_LOOP; + PCB_END_LOOP; pcb_poly_bbox(polygon); pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; pcb_set_buffer_bbox(Buffer); } @@ -422,7 +422,7 @@ via->X = PCB_SWAP_X(via->X); via->Y = PCB_SWAP_Y(via->Y); } - END_LOOP; + PCB_END_LOOP; PCB_LINE_ALL_LOOP(Buffer->Data); { line->Point1.X = PCB_SWAP_X(line->Point1.X); @@ -430,7 +430,7 @@ line->Point2.X = PCB_SWAP_X(line->Point2.X); line->Point2.Y = PCB_SWAP_Y(line->Point2.Y); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { arc->X = PCB_SWAP_X(arc->X); @@ -439,7 +439,7 @@ arc->Delta = SWAP_DELTA(arc->Delta); pcb_arc_bbox(arc); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Buffer->Data); { PCB_POLY_POINT_LOOP(polygon); @@ -447,10 +447,10 @@ point->X = PCB_SWAP_X(point->X); point->Y = PCB_SWAP_Y(point->Y); } - END_LOOP; + PCB_END_LOOP; pcb_poly_bbox(polygon); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; pcb_set_buffer_bbox(Buffer); } @@ -469,7 +469,7 @@ r_delete_element(Buffer->Data, element); pcb_element_mirror(Buffer->Data, element, 0); } - END_LOOP; + PCB_END_LOOP; /* set buffer offset to 'mark' position */ Buffer->X = PCB_SWAP_X(Buffer->X); Buffer->Y = PCB_SWAP_Y(Buffer->Y); @@ -481,7 +481,7 @@ pcb_pin_bbox(via); pcb_r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } - END_LOOP; + PCB_END_LOOP; PCB_LINE_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->line_tree, (pcb_box_t *) line); @@ -492,7 +492,7 @@ pcb_line_bbox(line); pcb_r_insert_entry(layer->line_tree, (pcb_box_t *) line, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); @@ -503,7 +503,7 @@ pcb_arc_bbox(arc); pcb_r_insert_entry(layer->arc_tree, (pcb_box_t *) arc, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); @@ -512,12 +512,12 @@ point->X = PCB_SWAP_X(point->X); point->Y = PCB_SWAP_Y(point->Y); } - END_LOOP; + PCB_END_LOOP; pcb_poly_bbox(polygon); pcb_r_insert_entry(layer->polygon_tree, (pcb_box_t *) polygon, 0); /* hmmm, how to handle clip */ } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Buffer->Data); { pcb_r_delete_entry(layer->text_tree, (pcb_box_t *) text); @@ -527,7 +527,7 @@ pcb_text_bbox(&PCB->Font, text); pcb_r_insert_entry(layer->text_tree, (pcb_box_t *) text, 0); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* swap silkscreen layers */ swap = Buffer->Data->Layer[pcb_solder_silk_layer]; Buffer->Data->Layer[pcb_solder_silk_layer] = Buffer->Data->Layer[pcb_component_silk_layer]; @@ -561,7 +561,7 @@ PCB_FLAG_THERM_ASSIGN(snumber, t2, pin); PCB_FLAG_THERM_ASSIGN(cnumber, t1, pin); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_VIA_LOOP(Buffer->Data); { t1 = PCB_FLAG_THERM_TEST(snumber, via); @@ -569,7 +569,7 @@ PCB_FLAG_THERM_ASSIGN(snumber, t2, via); PCB_FLAG_THERM_ASSIGN(cnumber, t1, via); } - END_LOOP; + PCB_END_LOOP; } } pcb_set_buffer_bbox(Buffer); @@ -641,22 +641,22 @@ { CopyLine(&ctx, destlayer, line); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(sourcelayer); { CopyArc(&ctx, destlayer, arc); } - END_LOOP; + PCB_END_LOOP; PCB_TEXT_LOOP(sourcelayer); { CopyText(&ctx, destlayer, text); } - END_LOOP; + PCB_END_LOOP; PCB_POLY_LOOP(sourcelayer); { CopyPolygon(&ctx, destlayer, polygon); } - END_LOOP; + PCB_END_LOOP; } } @@ -672,7 +672,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; } /* finally the vias */ @@ -682,7 +682,7 @@ { CopyVia(&ctx, via); } - END_LOOP; + PCB_END_LOOP; } if (changed) { Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 5054) +++ trunk/src/change.c (revision 5055) @@ -726,7 +726,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, via)) change |= pcb_pin_change_hole(via); } - END_LOOP; + PCB_END_LOOP; if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -747,7 +747,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad)) change |= pcb_pad_change_paste(pad); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (change) { pcb_draw(); pcb_undo_inc_serial(); Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 5054) +++ trunk/src/change_act.c (revision 5055) @@ -584,7 +584,7 @@ changed = 1; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { @@ -599,10 +599,10 @@ changed = 1; } } - END_LOOP; + PCB_END_LOOP; } } - END_LOOP; + PCB_END_LOOP; /* * done with our action so increment the undo # if we actually * changed anything Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 5054) +++ trunk/src/crosshair.c (revision 5055) @@ -234,7 +234,7 @@ { pcb_gui->draw_line(pcb_crosshair.GC, DX + line->Point1.X, DY + line->Point1.Y, DX + line->Point2.X, DY + line->Point2.Y); } - END_LOOP; + PCB_END_LOOP; /* arc coordinates and angles have to be converted to X11 notation */ PCB_ARC_LOOP(Element); @@ -241,7 +241,7 @@ { pcb_gui->draw_arc(pcb_crosshair.GC, DX + arc->X, DY + arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); } - END_LOOP; + PCB_END_LOOP; } /* pin coordinates and angles have to be converted to X11 notation */ PCB_PIN_LOOP(Element); @@ -248,7 +248,7 @@ { thindraw_moved_pv(pin, DX, DY); } - END_LOOP; + PCB_END_LOOP; /* pads */ PCB_PAD_LOOP(Element); @@ -264,7 +264,7 @@ pcb_gui->thindraw_pcb_pad(pcb_crosshair.GC, &moved_pad, pcb_false, pcb_false); } } - END_LOOP; + PCB_END_LOOP; /* mark */ pcb_gui->draw_line(pcb_crosshair.GC, Element->MarkX + DX - PCB_EMARK_SIZE, Element->MarkY + DY, Element->MarkX + DX, Element->MarkY + DY - PCB_EMARK_SIZE); @@ -302,18 +302,18 @@ */ pcb_gui->draw_line(pcb_crosshair.GC, x + line->Point1.X, y + line->Point1.Y, x + line->Point2.X, y + line->Point2.Y); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(layer); { pcb_gui->draw_arc(pcb_crosshair.GC, x + arc->X, y + arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); } - END_LOOP; + PCB_END_LOOP; PCB_TEXT_LOOP(layer); { pcb_box_t *box = &text->BoundingBox; pcb_gui->draw_rect(pcb_crosshair.GC, x + box->X1, y + box->Y1, x + box->X2, y + box->Y2); } - END_LOOP; + PCB_END_LOOP; /* the tmp polygon has n+1 points because the first * and the last one are set to the same coordinates */ @@ -321,7 +321,7 @@ { XORPolygon(polygon, x, y, 0); } - END_LOOP; + PCB_END_LOOP; } /* draw elements if visible */ @@ -331,7 +331,7 @@ if (PCB_FRONT(element) || PCB->InvisibleObjectsOn) XORDrawElement(element, x, y); } - END_LOOP; + PCB_END_LOOP; /* and the vias */ if (PCB->ViaOn) @@ -339,7 +339,7 @@ { thindraw_moved_pv(via, x, y); } - END_LOOP; + PCB_END_LOOP; } /* --------------------------------------------------------------------------- @@ -1071,7 +1071,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (found_our_layer == pcb_false) ans = PCB_TYPE_NONE; Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 5054) +++ trunk/src/data.c (revision 5055) @@ -59,7 +59,7 @@ { lcb(ctx, PCB, layer, line); } - END_LOOP; + PCB_END_LOOP; } if (acb != NULL) { @@ -67,7 +67,7 @@ { acb(ctx, PCB, layer, arc); } - END_LOOP; + PCB_END_LOOP; } if (tcb != NULL) { @@ -75,7 +75,7 @@ { tcb(ctx, PCB, layer, text); } - END_LOOP; + PCB_END_LOOP; } if (pocb != NULL) { @@ -83,12 +83,12 @@ { pocb(ctx, PCB, layer, polygon); } - END_LOOP; + PCB_END_LOOP; } if (lacb != NULL) lacb(ctx, PCB, layer, 0); } - END_LOOP; + PCB_END_LOOP; } } @@ -106,7 +106,7 @@ { elcb(ctx, PCB, element, line); } - END_LOOP; + PCB_END_LOOP; } if (eacb != NULL) { @@ -114,7 +114,7 @@ { eacb(ctx, PCB, element, arc); } - END_LOOP; + PCB_END_LOOP; } if (etcb != NULL) { @@ -122,7 +122,7 @@ { etcb(ctx, PCB, element, text); } - END_LOOP; + PCB_END_LOOP; } if (epicb != NULL) { @@ -130,7 +130,7 @@ { epicb(ctx, PCB, element, pin); } - END_LOOP; + PCB_END_LOOP; } @@ -139,13 +139,13 @@ { epacb(ctx, PCB, element, pad); } - END_LOOP; + PCB_END_LOOP; } if (ecb != NULL) ecb(ctx, PCB, element, 0); } - END_LOOP; + PCB_END_LOOP; } } @@ -156,7 +156,7 @@ { vcb(ctx, PCB, via); } - END_LOOP; + PCB_END_LOOP; } } @@ -186,13 +186,13 @@ { free(via->Name); } - END_LOOP; + PCB_END_LOOP; list_map0(&data->Via, pcb_pin_t, pcb_via_free); PCB_ELEMENT_LOOP(data); { pcb_element_destroy(element); } - END_LOOP; + PCB_END_LOOP; list_map0(&data->Element, pcb_element_t, pcb_element_free); list_map0(&data->Rat, pcb_rat_t, pcb_rat_free); @@ -202,7 +202,7 @@ { free(text->TextString); } - END_LOOP; + PCB_END_LOOP; if (layer->Name) free((char*)layer->Name); PCB_LINE_LOOP(layer); @@ -210,7 +210,7 @@ if (line->Number) free(line->Number); } - END_LOOP; + PCB_END_LOOP; list_map0(&layer->Line, pcb_line_t, pcb_line_free); list_map0(&layer->Arc, pcb_arc_t, pcb_arc_free); @@ -219,7 +219,7 @@ { pcb_poly_free_fields(polygon); } - END_LOOP; + PCB_END_LOOP; list_map0(&layer->Polygon, pcb_polygon_t, pcb_poly_free); if (layer->line_tree) pcb_r_destroy_tree(&layer->line_tree); @@ -284,7 +284,7 @@ box.X2 = MAX(box.X2, via->X + via->Thickness / 2); box.Y2 = MAX(box.Y2, via->Y + via->Thickness / 2); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_LOOP(Data); { box.X1 = MIN(box.X1, element->BoundingBox.X1); @@ -299,7 +299,7 @@ box.Y2 = MAX(box.Y2, text->BoundingBox.Y2); }; } - END_LOOP; + PCB_END_LOOP; PCB_LINE_ALL_LOOP(Data); { box.X1 = MIN(box.X1, line->Point1.X - line->Thickness / 2); @@ -311,7 +311,7 @@ box.X2 = MAX(box.X2, line->Point2.X + line->Thickness / 2); box.Y2 = MAX(box.Y2, line->Point2.Y + line->Thickness / 2); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Data); { box.X1 = MIN(box.X1, arc->BoundingBox.X1); @@ -319,7 +319,7 @@ box.X2 = MAX(box.X2, arc->BoundingBox.X2); box.Y2 = MAX(box.Y2, arc->BoundingBox.Y2); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Data); { box.X1 = MIN(box.X1, text->BoundingBox.X1); @@ -327,7 +327,7 @@ box.X2 = MAX(box.X2, text->BoundingBox.X2); box.Y2 = MAX(box.Y2, text->BoundingBox.Y2); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Data); { box.X1 = MIN(box.X1, polygon->BoundingBox.X1); @@ -335,7 +335,7 @@ box.X2 = MAX(box.X2, polygon->BoundingBox.X2); box.Y2 = MAX(box.Y2, polygon->BoundingBox.Y2); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; return (pcb_data_is_empty(Data) ? NULL : &box); } Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 5054) +++ trunk/src/draw.c (revision 5055) @@ -207,7 +207,7 @@ */ if (!conf_core.editor.check_planes && pcb_gui->set_layer("invisible", SL(INVISIBLE, 0), 0)) { - side = SWAP_IDENT ? COMPONENT_LAYER : SOLDER_LAYER; + side = PCB_SWAP_IDENT ? COMPONENT_LAYER : SOLDER_LAYER; if (PCB->ElementOn) { pcb_r_search(PCB->Data->element_tree, drawn_area, NULL, draw_element_callback, &side, NULL); pcb_r_search(PCB->Data->name_tree[NAME_INDEX()], drawn_area, NULL, draw_element_name_callback, &side, NULL); @@ -232,7 +232,7 @@ /* Draw pins, pads, vias below silk */ if (pcb_gui->gui) - DrawPPV(SWAP_IDENT ? solder : component, drawn_area); + DrawPPV(PCB_SWAP_IDENT ? solder : component, drawn_area); else if (!pcb_gui->holes_after) DrawEverything_holes(drawn_area); Index: trunk/src/find_clear.c =================================================================== --- trunk/src/find_clear.c (revision 5054) +++ trunk/src/find_clear.c (revision 5055) @@ -41,7 +41,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_LOOP(PCB->Data); { PCB_PIN_LOOP(element); @@ -55,7 +55,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(flag, pad)) { @@ -67,9 +67,9 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; if (change) pcb_board_set_changed_flag(pcb_true); return change; @@ -93,7 +93,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_LINE_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, line)) { @@ -105,7 +105,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, arc)) { @@ -117,7 +117,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, polygon)) { @@ -129,7 +129,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (change) pcb_board_set_changed_flag(pcb_true); return change; Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 5054) +++ trunk/src/find_drc.c (revision 5055) @@ -357,7 +357,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (IsBad) break; PCB_PAD_LOOP(element); @@ -373,11 +373,11 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (IsBad) break; } - END_LOOP; + PCB_END_LOOP; if (!IsBad) PCB_VIA_LOOP(PCB->Data); { @@ -387,7 +387,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; TheFlag = (IsBad) ? PCB_FLAG_DRC : (PCB_FLAG_FOUND | PCB_FLAG_DRC | PCB_FLAG_SELECTED); pcb_reset_conns(pcb_false); @@ -423,7 +423,7 @@ pcb_undo(pcb_false); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (!IsBad) { PCB_ARC_COPPER_LOOP(PCB->Data); @@ -454,7 +454,7 @@ pcb_undo(pcb_false); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (!IsBad) { PCB_PIN_ALL_LOOP(PCB->Data); @@ -508,7 +508,7 @@ pcb_undo(pcb_false); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (!IsBad) { PCB_PAD_ALL_LOOP(PCB->Data); @@ -539,7 +539,7 @@ pcb_undo(pcb_false); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (!IsBad) { PCB_VIA_LOOP(PCB->Data); @@ -593,7 +593,7 @@ pcb_undo(pcb_false); } } - END_LOOP; + PCB_END_LOOP; } pcb_conn_lookup_uninit(); @@ -626,7 +626,7 @@ } } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } /* check silkscreen minimum widths inside of elements */ @@ -641,7 +641,7 @@ if (line->Thickness < PCB->minSlk) tmpcnt++; } - END_LOOP; + PCB_END_LOOP; if (tmpcnt > 0) { const char *title; const char *name; @@ -680,7 +680,7 @@ } } } - END_LOOP; + PCB_END_LOOP; } Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 5054) +++ trunk/src/find_lookup.c (revision 5055) @@ -212,7 +212,7 @@ else NumberOfPads[COMPONENT_LAYER]++; } - ENDALL_LOOP; + PCB_ENDALL_LOOP; for (i = 0; i < 2; i++) { /*fprintf(stderr, "PadList alloc %d: %d\n", i, NumberOfPads[i]);*/ @@ -579,7 +579,7 @@ ADD_PV_TO_LIST(pin, PCB_TYPE_PIN, orig_pin, PCB_FCT_INTERNAL); } } - END_LOOP; + PCB_END_LOOP; } @@ -1255,7 +1255,7 @@ } } } - END_LOOP; + PCB_END_LOOP; } } Index: trunk/src/find_misc.c =================================================================== --- trunk/src/find_misc.c (revision 5054) +++ trunk/src/find_misc.c (revision 5055) @@ -307,7 +307,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_LOOP(PCB->Data); { PCB_PIN_LOOP(element); @@ -321,7 +321,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(TheFlag, pad)) { @@ -333,9 +333,9 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; if (change) pcb_board_set_changed_flag(pcb_true); return change; @@ -359,7 +359,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_LINE_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(TheFlag, line)) { @@ -371,7 +371,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(TheFlag, arc)) { @@ -383,7 +383,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(TheFlag, polygon)) { @@ -395,7 +395,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (change) pcb_board_set_changed_flag(pcb_true); return change; Index: trunk/src/find_print.c =================================================================== --- trunk/src/find_print.c (revision 5054) +++ trunk/src/find_print.c (revision 5055) @@ -76,7 +76,7 @@ } } } - END_LOOP; + PCB_END_LOOP; /* check all pads in element */ PCB_PAD_LOOP(Element); @@ -117,7 +117,7 @@ return (pcb_true); } } - END_LOOP; + PCB_END_LOOP; /* print separator if element has unused pins or pads */ if (!first) { @@ -181,7 +181,7 @@ if (PrepareNextLoop(FP)) return (pcb_true); } - END_LOOP; + PCB_END_LOOP; /* check all pads in element */ PCB_PAD_LOOP(Element); @@ -205,7 +205,7 @@ if (PrepareNextLoop(FP)) return (pcb_true); } - END_LOOP; + PCB_END_LOOP; fputs("}\n\n", FP); return (pcb_false); } @@ -228,7 +228,7 @@ if (PrintAndSelectUnusedPinsAndPadsOfElement(element, FP)) break; } - END_LOOP; + PCB_END_LOOP; if (conf_core.editor.beep_when_finished) pcb_gui->beep(); @@ -279,7 +279,7 @@ if (conf_core.editor.reset_after_element && gdl_it_idx(&__it__) != 1) pcb_reset_conns(pcb_false); } - END_LOOP; + PCB_END_LOOP; if (conf_core.editor.beep_when_finished) pcb_gui->beep(); pcb_reset_conns(pcb_false); Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 5054) +++ trunk/src/gui_act.c (revision 5055) @@ -237,7 +237,7 @@ { EraseElementName(element); } - END_LOOP; + PCB_END_LOOP; switch (id) { case F_Value: if (conf_core.editor.description || conf_core.editor.name_on_pcb) { @@ -268,7 +268,7 @@ { DrawElementName(element); } - END_LOOP; + PCB_END_LOOP; pcb_draw(); break; @@ -468,7 +468,7 @@ pcb_undo_add_obj_to_flag(PCB_TYPE_PIN, ptr1, pin, pin); PCB_FLAG_TOGGLE(PCB_FLAG_DISPLAYNAME, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP((pcb_element_t *) ptr1); { if (PCB_FLAG_TEST(PCB_FLAG_DISPLAYNAME, pad)) @@ -478,7 +478,7 @@ pcb_undo_add_obj_to_flag(PCB_TYPE_PAD, ptr1, pad, pad); PCB_FLAG_TOGGLE(PCB_FLAG_DISPLAYNAME, pad); } - END_LOOP; + PCB_END_LOOP; pcb_board_set_changed_flag(pcb_true); pcb_undo_inc_serial(); pcb_draw(); @@ -942,7 +942,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (changed) { pcb_draw(); pcb_undo_inc_serial(); Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 5054) +++ trunk/src/layer.c (revision 5055) @@ -464,7 +464,7 @@ break; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; return paste_empty; } @@ -886,13 +886,13 @@ { move_one_thermal(old_index, new_index, via); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_ALL_LOOP(PCB->Data); { move_one_thermal(old_index, new_index, pin); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } static int LastLayerInComponentGroup(int layer) Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 5054) +++ trunk/src/layer.h (revision 5055) @@ -107,7 +107,7 @@ /* These decode the set_layer index. */ #define SL_TYPE(x) ((x) < 0 ? (x) & 0x0f0 : 0) #define SL_SIDE(x) ((x) & 0x00f) -#define SL_MYSIDE(x) ((((x) & SL_BOTTOM_SIDE)!=0) == (SWAP_IDENT != 0)) +#define SL_MYSIDE(x) ((((x) & SL_BOTTOM_SIDE)!=0) == (PCB_SWAP_IDENT != 0)) #define SL_0_SIDE 0x0000 #define SL_TOP_SIDE 0x0001 Index: trunk/src/library.c =================================================================== --- trunk/src/library.c (revision 5054) +++ trunk/src/library.c (revision 5055) @@ -99,12 +99,12 @@ if (!entry->ListEntry_dontfree) free((char*)entry->ListEntry); } - END_LOOP; + PCB_END_LOOP; free(menu->Entry); free(menu->Name); free(menu->directory); } - END_LOOP; + PCB_END_LOOP; free(lib->Menu); /* clear struct */ Index: trunk/src/macro.h =================================================================== --- trunk/src/macro.h (revision 5054) +++ trunk/src/macro.h (revision 5055) @@ -35,8 +35,8 @@ * macros to transform coord systems * draw.c uses a different definition of TO_SCREEN */ -#ifndef SWAP_IDENT -#define SWAP_IDENT conf_core.editor.show_solder_side +#ifndef PCB_SWAP_IDENT +#define PCB_SWAP_IDENT conf_core.editor.show_solder_side #endif #define PCB_ENTRIES(x) (sizeof((x))/sizeof((x)[0])) @@ -56,7 +56,7 @@ * Determines if object is on front or back */ #define PCB_FRONT(o) \ - ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, (o)) != 0) == SWAP_IDENT) + ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, (o)) != 0) == PCB_SWAP_IDENT) /* --------------------------------------------------------------------------- * Determines if an object is on the given side. side is either SOLDER_LAYER @@ -74,8 +74,8 @@ * all data is relative to an objects name 'top' which can be either * PCB or PasteBuffer */ -#define END_LOOP }} while (0) +#define PCB_END_LOOP }} while (0) -#define ENDALL_LOOP }} while (0); }} while(0) +#define PCB_ENDALL_LOOP }} while (0); }} while(0) #endif Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 5054) +++ trunk/src/netlist.c (revision 5055) @@ -296,7 +296,7 @@ { pcb_net_free(net); } - END_LOOP; + PCB_END_LOOP; free(Netlist->Net); memset(Netlist, 0, sizeof(pcb_netlist_t)); } @@ -312,7 +312,7 @@ { pcb_netlist_free(netlist); } - END_LOOP; + PCB_END_LOOP; free(Netlistlist->NetList); memset(Netlistlist, 0, sizeof(pcb_netlist_list_t)); } Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 5054) +++ trunk/src/netlist_act.c (revision 5055) @@ -69,9 +69,9 @@ next++; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; if (next < 2) { pcb_message(PCB_MSG_DEFAULT, "Exactly two pins should be selected for swap (less than 2 selected at the moment)\n"); Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 5054) +++ trunk/src/obj_arc.c (revision 5055) @@ -182,7 +182,7 @@ pcb_normalize_angle(arc->StartAngle) == pcb_normalize_angle(sa) && arc->Delta == dir) return (NULL); /* prevent stacked arcs */ } - END_LOOP; + PCB_END_LOOP; Arc = pcb_arc_alloc(Layer); if (!Arc) return (Arc); Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 5054) +++ trunk/src/obj_elem.c (revision 5055) @@ -85,19 +85,19 @@ { free(textstring); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(element); { free(pin->Name); free(pin->Number); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { free(pad->Name); free(pad->Number); } - END_LOOP; + PCB_END_LOOP; list_map0(&element->Pin, pcb_pin_t, pcb_pin_free); list_map0(&element->Pad, pcb_pad_t, pcb_pad_free); @@ -187,13 +187,13 @@ if (line) line->Number = pcb_strdup_null(NAMEONPCB_NAME(element)); } - END_LOOP; + PCB_END_LOOP; 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()); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(element); { pcb_flag_t f = pcb_no_flags(); @@ -203,10 +203,10 @@ pcb_via_new(Buffer->Data, pin->X, pin->Y, pin->Thickness, pin->Clearance, pin->Mask, pin->DrillingHole, pin->Number, f); } - END_LOOP; - group = GetLayerGroupNumberByNumber(SWAP_IDENT ? pcb_solder_silk_layer : pcb_component_silk_layer); + PCB_END_LOOP; + group = GetLayerGroupNumberByNumber(PCB_SWAP_IDENT ? pcb_solder_silk_layer : pcb_component_silk_layer); clayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]]; - group = GetLayerGroupNumberByNumber(SWAP_IDENT ? pcb_component_silk_layer : pcb_solder_silk_layer); + group = GetLayerGroupNumberByNumber(PCB_SWAP_IDENT ? pcb_component_silk_layer : pcb_solder_silk_layer); slayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]]; PCB_PAD_LOOP(element); { @@ -217,7 +217,7 @@ if (line) line->Number = pcb_strdup_null(pad->Number); } - END_LOOP; + PCB_END_LOOP; pcb_element_destroy(element); pcb_element_free(element); return (pcb_true); @@ -267,7 +267,7 @@ Element = pcb_element_new(PCB->Data, NULL, &PCB->Font, pcb_no_flags(), NULL, NULL, NULL, PCB_PASTEBUFFER->X, - PCB_PASTEBUFFER->Y, 0, 100, pcb_flag_make(SWAP_IDENT ? PCB_FLAG_ONSOLDER : PCB_FLAG_NO), pcb_false); + PCB_PASTEBUFFER->Y, 0, 100, pcb_flag_make(PCB_SWAP_IDENT ? PCB_FLAG_ONSOLDER : PCB_FLAG_NO), pcb_false); if (!Element) return (pcb_false); PCB_VIA_LOOP(Buffer->Data); @@ -287,13 +287,13 @@ } hasParts = pcb_true; } - END_LOOP; + PCB_END_LOOP; for (onsolder = 0; onsolder < 2; onsolder++) { int silk_layer; int onsolderflag; - if ((!onsolder) == (!SWAP_IDENT)) { + if ((!onsolder) == (!PCB_SWAP_IDENT)) { silk_layer = pcb_component_silk_layer; onsolderflag = PCB_FLAG_NO; } @@ -328,7 +328,7 @@ MAYBE_WARN(); hasParts = pcb_true; } - END_LOOP; + PCB_END_LOOP; PCB_POLY_LOOP(layer); { pcb_coord_t x1, y1, x2, y2, w, h, t; @@ -353,9 +353,9 @@ MAYBE_WARN(); hasParts = pcb_true; } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; } /* now add the silkscreen. NOTE: elements must have pads or pins too */ @@ -366,13 +366,13 @@ pcb_element_line_new(Element, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness); hasParts = pcb_true; } - END_LOOP; + PCB_END_LOOP; 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; } - END_LOOP; + PCB_END_LOOP; if (!hasParts) { pcb_destroy_object(PCB->Data, PCB_TYPE_ELEMENT, Element, Element, Element); pcb_message(PCB_MSG_DEFAULT, _("There was nothing to convert!\n" "Elements must have some silk, pads or pins.\n")); @@ -382,7 +382,7 @@ pcb_message(PCB_MSG_DEFAULT, _("There were polygons that can't be made into pins!\n" "So they were not included in the element\n")); Element->MarkX = Buffer->X; Element->MarkY = Buffer->Y; - if (SWAP_IDENT) + if (PCB_SWAP_IDENT) PCB_FLAG_SET(PCB_FLAG_ONSOLDER, Element); pcb_element_bbox(PCB->Data, Element, &PCB->Font); pcb_buffer_clear(Buffer); @@ -405,7 +405,7 @@ pcb_r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); pcb_text_rotate90(text, X, Y, Number); } - END_LOOP; + PCB_END_LOOP; #endif PCB_ELEMENT_PCB_LINE_LOOP(Element); { @@ -413,7 +413,7 @@ pcb_rotate(&line->Point2.X, &line->Point2.Y, X, Y, cosa, sina); pcb_line_bbox(line); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(Element); { /* pre-delete the pins from the pin-tree before their coordinates change */ @@ -423,7 +423,7 @@ pcb_rotate(&pin->X, &pin->Y, X, Y, cosa, sina); pcb_pin_bbox(pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { /* pre-delete the pads before their coordinates change */ @@ -434,13 +434,13 @@ pcb_rotate(&pad->Point2.X, &pad->Point2.Y, X, Y, cosa, sina); pcb_line_bbox((pcb_line_t *) pad); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { pcb_rotate(&arc->X, &arc->Y, X, Y, cosa, sina); arc->StartAngle = pcb_normalize_angle(arc->StartAngle + angle); } - END_LOOP; + PCB_END_LOOP; pcb_rotate(&Element->MarkX, &Element->MarkY, X, Y, cosa, sina); pcb_element_bbox(Data, Element, &PCB->Font); @@ -472,7 +472,7 @@ change |= pcb_element_change_side(element, 0); } } - END_LOOP; + PCB_END_LOOP; if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -531,13 +531,13 @@ pcb_element_line_new(Dest, line->Point1.X + dx, line->Point1.Y + dy, line->Point2.X + dx, line->Point2.Y + dy, line->Thickness); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(Src); { pcb_element_pin_new(Dest, pin->X + dx, pin->Y + dy, pin->Thickness, pin->Clearance, pin->Mask, pin->DrillingHole, pin->Name, pin->Number, pcb_flag_mask(pin->Flags, PCB_FLAG_FOUND)); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Src); { pcb_element_pad_new(Dest, pad->Point1.X + dx, pad->Point1.Y + dy, @@ -544,12 +544,12 @@ pad->Point2.X + dx, pad->Point2.Y + dy, pad->Thickness, pad->Clearance, pad->Mask, pad->Name, pad->Number, pcb_flag_mask(pad->Flags, PCB_FLAG_FOUND)); } - END_LOOP; + PCB_END_LOOP; 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); } - END_LOOP; + PCB_END_LOOP; for (i = 0; i < Src->Attributes.Number; i++) pcb_attribute_put(&Dest->Attributes, Src->Attributes.List[i].name, Src->Attributes.List[i].value, 0); @@ -672,7 +672,7 @@ line->Point2.X = PCB_SWAP_X(line->Point2.X); line->Point2.Y = PCB_SWAP_Y(line->Point2.Y) + yoff; } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(Element); { pcb_poly_restore_to_poly(Data, PCB_TYPE_PIN, Element, pin); @@ -679,7 +679,7 @@ pin->X = PCB_SWAP_X(pin->X); pin->Y = PCB_SWAP_Y(pin->Y) + yoff; } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { pcb_poly_restore_to_poly(Data, PCB_TYPE_PAD, Element, pad); @@ -689,7 +689,7 @@ pad->Point2.Y = PCB_SWAP_Y(pad->Point2.Y) + yoff; PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, pad); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { arc->X = PCB_SWAP_X(arc->X); @@ -697,7 +697,7 @@ arc->StartAngle = SWAP_ANGLE(arc->StartAngle); arc->Delta = SWAP_DELTA(arc->Delta); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_PCB_TEXT_LOOP(Element); { text->X = PCB_SWAP_X(text->X); @@ -704,7 +704,7 @@ text->Y = PCB_SWAP_Y(text->Y) + yoff; PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, text); } - END_LOOP; + PCB_END_LOOP; Element->MarkX = PCB_SWAP_X(Element->MarkX); Element->MarkY = PCB_SWAP_Y(Element->MarkY) + yoff; @@ -733,7 +733,7 @@ if (Data) pcb_r_insert_entry(Data->name_tree[n], (pcb_box_t *) text, 0); } - END_LOOP; + PCB_END_LOOP; /* do not include the elementnames bounding box which * is handled separately @@ -754,7 +754,7 @@ PCB_MAKE_MAX(box->X2, line->Point2.X + (line->Thickness + 1) / 2); PCB_MAKE_MAX(box->Y2, line->Point2.Y + (line->Thickness + 1) / 2); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { pcb_arc_bbox(arc); @@ -763,7 +763,7 @@ PCB_MAKE_MAX(box->X2, arc->BoundingBox.X2); PCB_MAKE_MAX(box->Y2, arc->BoundingBox.Y2); } - END_LOOP; + PCB_END_LOOP; *vbox = *box; PCB_PIN_LOOP(Element); { @@ -784,7 +784,7 @@ PCB_MAKE_MAX(vbox->X2, pin->X + pin->Thickness / 2); PCB_MAKE_MAX(vbox->Y2, pin->Y + pin->Thickness / 2); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { if (Data && Data->pad_tree) @@ -804,7 +804,7 @@ PCB_MAKE_MAX(vbox->X2, MAX(pad->Point1.X, pad->Point2.X) + pad->Thickness / 2); PCB_MAKE_MAX(vbox->Y2, MAX(pad->Point1.Y, pad->Point2.Y) + pad->Thickness / 2); } - END_LOOP; + PCB_END_LOOP; /* now we set the PCB_FLAG_EDGE2 of the pad if Point2 * is closer to the outside edge than Point1 */ @@ -825,7 +825,7 @@ PCB_FLAG_CLEAR(PCB_FLAG_EDGE2, pad); } } - END_LOOP; + PCB_END_LOOP; /* mark pins with component orientation */ if ((box->X2 - box->X1) > (box->Y2 - box->Y1)) { @@ -833,7 +833,7 @@ { PCB_FLAG_SET(PCB_FLAG_EDGE2, pin); } - END_LOOP; + PCB_END_LOOP; } else { PCB_PIN_LOOP(Element); @@ -840,7 +840,7 @@ { PCB_FLAG_CLEAR(PCB_FLAG_EDGE2, pin); } - END_LOOP; + PCB_END_LOOP; } pcb_close_box(box); pcb_close_box(vbox); @@ -895,7 +895,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (unique) return (Name); unique = pcb_true; @@ -909,17 +909,17 @@ { pcb_r_delete_entry(data->pin_tree, (pcb_box_t *) pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { pcb_r_delete_entry(data->pad_tree, (pcb_box_t *) pad); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_PCB_TEXT_LOOP(element); { pcb_r_delete_entry(data->name_tree[n], (pcb_box_t *) text); } - END_LOOP; + PCB_END_LOOP; } /* Returns a best guess about the orientation of an element. The @@ -953,7 +953,7 @@ found_pin2 = 1; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(e); { @@ -968,7 +968,7 @@ found_pin2 = 1; } } - END_LOOP; + PCB_END_LOOP; if (found_pin1 && found_pin2) { dx = pin2x - pin1x; @@ -999,7 +999,7 @@ { pcb_line_move(line, DX, DY); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(Element); { if (Data) { @@ -1012,7 +1012,7 @@ pcb_poly_clear_from_poly(Data, PCB_TYPE_PIN, Element, pin); } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { if (Data) { @@ -1025,12 +1025,12 @@ pcb_poly_clear_from_poly(Data, PCB_TYPE_PAD, Element, pad); } } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { pcb_arc_move(arc, DX, DY); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_PCB_TEXT_LOOP(Element); { if (Data && Data->name_tree[n]) @@ -1039,7 +1039,7 @@ if (Data && Data->name_tree[n]) pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } - END_LOOP; + PCB_END_LOOP; PCB_BOX_MOVE_LOWLEVEL(&Element->BoundingBox, DX, DY); PCB_BOX_MOVE_LOWLEVEL(&Element->VBox, DX, DY); PCB_MOVE(Element->MarkX, Element->MarkY, DX, DY); @@ -1072,12 +1072,12 @@ pcb_r_delete_entry(Data->name_tree[n], (pcb_box_t *) text); pcb_text_rotate90(text, X, Y, Number); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_PCB_LINE_LOOP(Element); { pcb_line_rotate90(line, X, Y, Number); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(Element); { /* pre-delete the pins from the pin-tree before their coordinates change */ @@ -1086,7 +1086,7 @@ pcb_poly_restore_to_poly(Data, PCB_TYPE_PIN, Element, pin); PCB_PIN_ROTATE90(pin, X, Y, Number); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { /* pre-delete the pads before their coordinates change */ @@ -1095,12 +1095,12 @@ pcb_poly_restore_to_poly(Data, PCB_TYPE_PAD, Element, pad); PCB_PAD_ROTATE90(pad, X, Y, Number); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { pcb_arc_rotate90(arc, X, Y, Number); } - END_LOOP; + PCB_END_LOOP; PCB_COORD_ROTATE90(Element->MarkX, Element->MarkY, X, Y, Number); /* SetElementBoundingBox reenters the rtree data */ pcb_element_bbox(Data, Element, &PCB->Font); @@ -1122,17 +1122,17 @@ { PCB_FLAG_CLEAR(ctx->buffer.extraflg, text); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(element); { PCB_FLAG_CLEAR(PCB_FLAG_FOUND | ctx->buffer.extraflg, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { PCB_FLAG_CLEAR(PCB_FLAG_FOUND | ctx->buffer.extraflg, pad); } - END_LOOP; + PCB_END_LOOP; } return (element); } @@ -1154,13 +1154,13 @@ pcb_poly_restore_to_poly(ctx->buffer.src, PCB_TYPE_PIN, element, pin); PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { pcb_poly_restore_to_poly(ctx->buffer.src, PCB_TYPE_PAD, element, pad); PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND, pad); } - END_LOOP; + PCB_END_LOOP; pcb_element_bbox(ctx->buffer.dst, element, &PCB->Font); /* * Now clear the from the polygons in the destination @@ -1169,12 +1169,12 @@ { pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_TYPE_PIN, element, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { pcb_poly_clear_from_poly(ctx->buffer.dst, PCB_TYPE_PAD, element, pad); } - END_LOOP; + PCB_END_LOOP; return element; } @@ -1207,7 +1207,7 @@ DrawPin(pin); } } - END_LOOP; + PCB_END_LOOP; if (changed) return (Element); else @@ -1239,7 +1239,7 @@ DrawPin(pin); } } - END_LOOP; + PCB_END_LOOP; if (changed) return (Element); else @@ -1273,7 +1273,7 @@ DrawPin(pin); } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { @@ -1296,7 +1296,7 @@ DrawPad(pad); } } - END_LOOP; + PCB_END_LOOP; if (changed) return (Element); @@ -1323,7 +1323,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : arc->Thickness + ctx->chgsize.delta; @@ -1333,7 +1333,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (PCB->ElementOn) { DrawElement(Element); } @@ -1360,7 +1360,7 @@ pcb_text_bbox(&PCB->Font, text); pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } - END_LOOP; + PCB_END_LOOP; DrawElementName(Element); return (Element); } @@ -1402,12 +1402,12 @@ { ans = ChangePinSquare(ctx, Element, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { ans = ChangePadSquare(ctx, Element, pad); } - END_LOOP; + PCB_END_LOOP; return (ans); } @@ -1422,12 +1422,12 @@ { ans = SetPinSquare(ctx, Element, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { ans = SetPadSquare(ctx, Element, pad); } - END_LOOP; + PCB_END_LOOP; return (ans); } @@ -1442,12 +1442,12 @@ { ans = ClrPinSquare(ctx, Element, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { ans = ClrPadSquare(ctx, Element, pad); } - END_LOOP; + PCB_END_LOOP; return (ans); } @@ -1463,7 +1463,7 @@ ChangePinOctagon(ctx, Element, pin); result = Element; } - END_LOOP; + PCB_END_LOOP; return (result); } @@ -1479,7 +1479,7 @@ SetPinOctagon(ctx, Element, pin); result = Element; } - END_LOOP; + PCB_END_LOOP; return (result); } @@ -1495,7 +1495,7 @@ ClrPinOctagon(ctx, Element, pin); result = Element; } - END_LOOP; + PCB_END_LOOP; return (result); } @@ -1540,7 +1540,7 @@ if (PCB->Data->name_tree[n]) pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } - END_LOOP; + PCB_END_LOOP; DrawElementName(Element); pcb_draw(); } @@ -1553,7 +1553,7 @@ if (PCB->Data->name_tree[n]) pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } - END_LOOP; + PCB_END_LOOP; } return (Element); } @@ -1594,7 +1594,7 @@ { pcb_r_delete_entry(ctx->remove.destroy_target->pin_tree, (pcb_box_t *) pin); } - END_LOOP; + PCB_END_LOOP; } if (ctx->remove.destroy_target->pad_tree) { PCB_PAD_LOOP(Element); @@ -1601,7 +1601,7 @@ { pcb_r_delete_entry(ctx->remove.destroy_target->pad_tree, (pcb_box_t *) pad); } - END_LOOP; + PCB_END_LOOP; } PCB_ELEMENT_PCB_TEXT_LOOP(Element); { @@ -1608,7 +1608,7 @@ if (ctx->remove.destroy_target->name_tree[n]) pcb_r_delete_entry(ctx->remove.destroy_target->name_tree[n], (pcb_box_t *) text); } - END_LOOP; + PCB_END_LOOP; pcb_element_destroy(Element); pcb_element_free(Element); @@ -1651,7 +1651,7 @@ pcb_text_rotate90(text, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); pcb_r_insert_entry(PCB->Data->name_tree[n], (pcb_box_t *) text, 0); } - END_LOOP; + PCB_END_LOOP; DrawElementName(Element); pcb_draw(); return (Element); @@ -1701,12 +1701,12 @@ if (pcb_draw_doing_pinout || pcb_draw_doing_assy || PCB_FRONT(pad) || PCB->InvisibleObjectsOn) draw_pad(pad); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(element); { draw_pin(pin, pcb_true); } - END_LOOP; + PCB_END_LOOP; } @@ -1727,12 +1727,12 @@ { _draw_line(line); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(element); { _draw_arc(arc); } - END_LOOP; + PCB_END_LOOP; } void draw_element(pcb_element_t *element) @@ -1804,12 +1804,12 @@ { EraseLine(line); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { EraseArc(arc); } - END_LOOP; + PCB_END_LOOP; EraseElementName(Element); EraseElementPinsAndPads(Element); pcb_flag_erase(&Element->Flags); @@ -1821,12 +1821,12 @@ { ErasePin(pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(Element); { ErasePad(pad); } - END_LOOP; + PCB_END_LOOP; } void EraseElementName(pcb_element_t *Element) @@ -1857,12 +1857,12 @@ { DrawLine(NULL, line); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(Element); { DrawArc(NULL, arc); } - END_LOOP; + PCB_END_LOOP; } void DrawElementPinsAndPads(pcb_element_t *Element) @@ -1872,11 +1872,11 @@ if (pcb_draw_doing_pinout || pcb_draw_doing_assy || PCB_FRONT(pad) || PCB->InvisibleObjectsOn) DrawPad(pad); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(Element); { DrawPin(pin); } - END_LOOP; + PCB_END_LOOP; } Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 5054) +++ trunk/src/obj_line_drcenf.c (revision 5055) @@ -371,7 +371,7 @@ pcb_r_search(layer->arc_tree, &line2.BoundingBox, NULL, drcArc_callback, &info, NULL); } } - END_LOOP; + PCB_END_LOOP; /* no intersector! */ blocker = pcb_false; f2 += s2; @@ -456,7 +456,7 @@ pcb_r_search(layer->line_tree, &line.BoundingBox, NULL, drcLine_callback, &info, NULL); pcb_r_search(layer->arc_tree, &line.BoundingBox, NULL, drcArc_callback, &info, NULL); } - END_LOOP; + PCB_END_LOOP; /* no intersector! */ auto_good:; last_good.X = end->X = line.Point2.X; Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 5054) +++ trunk/src/obj_pad.c (revision 5055) @@ -421,7 +421,7 @@ _draw_pad(Output.fgGC, pad, pcb_false, pcb_false); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } static void GatherPadName(pcb_pad_t *Pad) Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 5054) +++ trunk/src/obj_pinvia.c (revision 5055) @@ -98,7 +98,7 @@ return (NULL); /* don't allow via stacking */ } } - END_LOOP; + PCB_END_LOOP; } Via = pcb_via_alloc(Data); Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 5054) +++ trunk/src/obj_poly.c (revision 5055) @@ -124,7 +124,7 @@ { PCB_COORD_ROTATE90(point->X, point->Y, X, Y, Number); } - END_LOOP; + PCB_END_LOOP; pcb_box_rotate90(&Polygon->BoundingBox, X, Y, Number); } @@ -143,7 +143,7 @@ } /* boxes don't include the lower right corner */ pcb_close_box(&Polygon->BoundingBox); - END_LOOP; + PCB_END_LOOP; } /* creates a new polygon from the old formats rectangle data */ @@ -345,7 +345,7 @@ { PCB_MOVE(point->X, point->Y, DX, DY); } - END_LOOP; + PCB_END_LOOP; PCB_BOX_MOVE_LOWLEVEL(&Polygon->BoundingBox, DX, DY); } Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 5054) +++ trunk/src/obj_rat.c (revision 5055) @@ -113,7 +113,7 @@ RemoveRat(&ctx, line); } } - END_LOOP; + PCB_END_LOOP; if (changed) { pcb_draw(); pcb_undo_inc_serial(); Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 5054) +++ trunk/src/object_act.c (revision 5055) @@ -60,7 +60,7 @@ return element_cache; } } - END_LOOP; + PCB_END_LOOP; return NULL; } @@ -153,7 +153,7 @@ n_found++; } } - END_LOOP; + PCB_END_LOOP; if (n_found > 1) { pcb_message(PCB_MSG_DEFAULT, _("Too many elements selected\n")); return 1; @@ -288,7 +288,7 @@ } } - END_LOOP; + PCB_END_LOOP; /* done with our action so increment the undo # */ pcb_undo_inc_serial(); @@ -494,7 +494,7 @@ { PCB_FLAG_CLEAR(PCB_FLAG_FOUND, element); } - END_LOOP; + PCB_END_LOOP; element_cache = NULL; number_of_footprints_not_found = 0; return 0; @@ -511,7 +511,7 @@ PCB_FLAG_SET(PCB_FLAG_SELECTED, element); } } - END_LOOP; + PCB_END_LOOP; if (number_of_footprints_not_found > 0) pcb_gui->confirm_dialog("Not all requested footprints were found.\n" "See the message log for details", "Ok", NULL); return 0; @@ -674,7 +674,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (!e) { pcb_message(PCB_MSG_DEFAULT, _("Cannot change attribute of %s - element not found\n"), refdes); @@ -737,7 +737,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_AUTO, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) { @@ -745,7 +745,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_AUTO, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) { @@ -753,7 +753,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (changed) { pcb_undo_inc_serial(); @@ -769,7 +769,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (PCB->ViaOn) PCB_VIA_LOOP(PCB->Data); { @@ -779,7 +779,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (changed) { pcb_undo_inc_serial(); pcb_board_set_changed_flag(pcb_true); @@ -858,7 +858,7 @@ pcb_undo_restore_serial(); } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (!PCB_FLAGS_TEST(flags, pad)) @@ -868,9 +868,9 @@ pcb_undo_restore_serial(); } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); { if (!PCB_FLAGS_TEST(flags, via)) @@ -880,7 +880,7 @@ pcb_undo_restore_serial(); } } - END_LOOP; + PCB_END_LOOP; pcb_undo_restore_serial(); pcb_undo_inc_serial(); return 0; @@ -932,7 +932,7 @@ pcb_undo_restore_serial(); } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (!PCB_FLAGS_TEST(flags, pad)) @@ -942,9 +942,9 @@ pcb_undo_restore_serial(); } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); { if (!PCB_FLAGS_TEST(flags, via)) @@ -954,7 +954,7 @@ pcb_undo_restore_serial(); } } - END_LOOP; + PCB_END_LOOP; PCB_LINE_ALL_LOOP(PCB->Data); { if (!PCB_FLAGS_TEST(flags, line)) @@ -964,7 +964,7 @@ pcb_undo_restore_serial(); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(PCB->Data); { if (!PCB_FLAGS_TEST(flags, arc)) @@ -974,7 +974,7 @@ pcb_undo_restore_serial(); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; pcb_undo_restore_serial(); pcb_undo_inc_serial(); return 0; @@ -987,7 +987,7 @@ { printf("%d %s\n", pcb_element_get_orientation(element), NAMEONPCB_NAME(element)); } - END_LOOP; + PCB_END_LOOP; return 0; } Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 5054) +++ trunk/src/plug_io.c (revision 5055) @@ -548,10 +548,10 @@ { int result; - if (SWAP_IDENT) + if (PCB_SWAP_IDENT) pcb_swap_buffers(); result = pcb_write_pipe(Filename, pcb_false, fmt); - if (SWAP_IDENT) + if (PCB_SWAP_IDENT) pcb_swap_buffers(); return (result); } Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 5054) +++ trunk/src/polygon.c (revision 5055) @@ -1037,7 +1037,7 @@ pcb_r_search(layer->text_tree, ®ion, NULL, text_sub_callback, &info, &seen); r += seen; } - END_LOOP; + PCB_END_LOOP; pcb_r_search(Data->via_tree, ®ion, NULL, pin_sub_callback, &info, &seen); r += seen; pcb_r_search(Data->pin_tree, ®ion, NULL, pin_sub_callback, &info, &seen); @@ -1478,7 +1478,7 @@ pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } - END_LOOP; + PCB_END_LOOP; } else { GROUP_LOOP(Data, GetLayerGroupNumberByNumber(GetLayerNumber(Data, ((pcb_layer_t *) ptr1)))); @@ -1487,7 +1487,7 @@ pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } - END_LOOP; + PCB_END_LOOP; } break; case PCB_TYPE_LINE: @@ -1505,7 +1505,7 @@ pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } - END_LOOP; + PCB_END_LOOP; break; case PCB_TYPE_PAD: { @@ -1517,7 +1517,7 @@ pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); r += seen; } - END_LOOP; + PCB_END_LOOP; } break; @@ -1527,12 +1527,12 @@ { pcb_poly_plows(Data, PCB_TYPE_PIN, ptr1, pin, call_back); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP((pcb_element_t *) ptr1); { pcb_poly_plows(Data, PCB_TYPE_PAD, ptr1, pad, call_back); } - END_LOOP; + PCB_END_LOOP; } break; } Index: trunk/src/polygon_act.c =================================================================== --- trunk/src/polygon_act.c (revision 5054) +++ trunk/src/polygon_act.c (revision 5055) @@ -82,7 +82,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, polygon)) pcb_poly_morph(layer, polygon); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; pcb_draw(); pcb_undo_inc_serial(); break; Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 5054) +++ trunk/src/rats.c (revision 5055) @@ -208,13 +208,13 @@ pin->Spare = NULL; PCB_FLAG_CLEAR(PCB_FLAG_DRC, pin); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { pad->Spare = NULL; PCB_FLAG_CLEAR(PCB_FLAG_DRC, pad); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_MENU_LOOP(net_menu); { if (menu->Name[0] == '*' || menu->flag == 0) { @@ -267,9 +267,9 @@ ((pcb_pad_t *) LastPoint.ptr2)->Spare = (void *) menu; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; } /* clear all visit marks */ PCB_PIN_ALL_LOOP(PCB->Data); @@ -276,12 +276,12 @@ { PCB_FLAG_CLEAR(PCB_FLAG_DRC, pin); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { PCB_FLAG_CLEAR(PCB_FLAG_DRC, pad); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; return (Wantlist); } @@ -299,7 +299,7 @@ conn = pcb_rat_connection_alloc(DestNet); *conn = *connection; } - END_LOOP; + PCB_END_LOOP; DestNet->Style = SourceNet->Style; /* free the connection memory */ pcb_net_free(SourceNet); @@ -339,7 +339,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (newone) { menu = GetPointerMemory(generic); *menu = pin->Spare; @@ -349,7 +349,7 @@ } } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { pcb_element_t *e = pad->Element; @@ -370,7 +370,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (newone) { menu = GetPointerMemory(generic); *menu = pad->Spare; @@ -380,7 +380,7 @@ } } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; FreePointerListMemory(generic); free(generic); return (warn); @@ -443,7 +443,7 @@ conn->menu = NULL; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* add polygons so the auto-router can see them as targets */ PCB_POLY_ALL_LOOP(PCB->Data); { @@ -459,7 +459,7 @@ conn->menu = NULL; /* agnostic view of where it belongs */ } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_DRC, via)) { @@ -472,7 +472,7 @@ conn->group = SLayer; } } - END_LOOP; + PCB_END_LOOP; if (!NoWarn) Warned |= CheckShorts(a->Connection[0].menu); } @@ -690,12 +690,12 @@ lonesome->Style = net->Style; } } - END_LOOP; + PCB_END_LOOP; Warned |= GatherSubnets(Nets, SelectedOnly, pcb_true); if (Nets->NetN > 0) changed |= DrawShortestRats(Nets, funcp); } - END_LOOP; + PCB_END_LOOP; pcb_netlist_free(Nets); free(Nets); pcb_conn_lookup_uninit(); @@ -775,11 +775,11 @@ lonesome->Style = net->Style; } } - END_LOOP; + PCB_END_LOOP; /* Note that AndRats is *pcb_false* here! */ GatherSubnets(Nets, SelectedOnly, pcb_false); } - END_LOOP; + PCB_END_LOOP; pcb_conn_lookup_uninit(); pcb_restore_find_flag(); return result; @@ -799,7 +799,7 @@ if (menu->Name && (strcmp(menu->Name, name) == 0)) return 1; } - END_LOOP; + PCB_END_LOOP; return 0; } Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 5054) +++ trunk/src/rats_act.c (revision 5055) @@ -100,7 +100,7 @@ shorty = line; } } - END_LOOP; + PCB_END_LOOP; if (shorty) { pcb_undo_add_obj_to_flag(PCB_TYPE_RATLINE, shorty, shorty, shorty); PCB_FLAG_SET(PCB_FLAG_SELECTED, shorty); Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 5054) +++ trunk/src/rats_patch.c (revision 5055) @@ -395,7 +395,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (!(found)) { pcb_message(PCB_MSG_DEFAULT, "ReplaceFootprint works on selected elements, please select elements first!\n"); @@ -436,7 +436,7 @@ pcb_element_remove(element); } } - END_LOOP; + PCB_END_LOOP; return 0; } Index: trunk/src/rubberband.c =================================================================== --- trunk/src/rubberband.c (revision 5054) +++ trunk/src/rubberband.c (revision 5055) @@ -199,7 +199,7 @@ pcb_r_search(info.layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); } } - END_LOOP; + PCB_END_LOOP; } struct rinfo { @@ -346,7 +346,7 @@ pcb_r_search(layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); } } - END_LOOP; + PCB_END_LOOP; } /* --------------------------------------------------------------------------- @@ -380,10 +380,10 @@ if (pcb_poly_is_point_in_p(line->Point2.X, line->Point2.Y, thick, Polygon)) pcb_rubber_band_create(layer, line, &line->Point2); } - END_LOOP; + PCB_END_LOOP; } } - END_LOOP; + PCB_END_LOOP; } /* --------------------------------------------------------------------------- @@ -412,12 +412,12 @@ { CheckPinForRubberbandConnection(pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { CheckPadForRubberbandConnection(pad); } - END_LOOP; + PCB_END_LOOP; break; } @@ -459,12 +459,12 @@ { CheckPinForRat(pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { CheckPadForRat(pad); } - END_LOOP; + PCB_END_LOOP; break; } Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 5054) +++ trunk/src/search.c (revision 5055) @@ -420,9 +420,9 @@ found = pcb_true; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; if (found) return (pcb_true); return (pcb_false); @@ -1151,7 +1151,7 @@ return (PCB_TYPE_LINE_POINT); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (type == PCB_TYPE_ARC) { PCB_ARC_ALL_LOOP(Base); @@ -1162,7 +1162,7 @@ return (PCB_TYPE_ARC); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (type == PCB_TYPE_TEXT) { @@ -1174,7 +1174,7 @@ return (PCB_TYPE_TEXT); } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (type == PCB_TYPE_POLYGON || type == PCB_TYPE_POLYGON_POINT) { @@ -1195,9 +1195,9 @@ return (PCB_TYPE_POLYGON_POINT); } } - END_LOOP; + PCB_END_LOOP; } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (type == PCB_TYPE_VIA) { PCB_VIA_LOOP(Base); @@ -1207,7 +1207,7 @@ return (PCB_TYPE_VIA); } } - END_LOOP; + PCB_END_LOOP; } if (type == PCB_TYPE_RATLINE || type == PCB_TYPE_LINE_POINT) { @@ -1230,7 +1230,7 @@ return (PCB_TYPE_LINE_POINT); } } - END_LOOP; + PCB_END_LOOP; } if (type == PCB_TYPE_ELEMENT || type == PCB_TYPE_PAD || type == PCB_TYPE_PIN @@ -1251,7 +1251,7 @@ return (PCB_TYPE_ELEMENT_LINE); } } - END_LOOP; + PCB_END_LOOP; if (type == PCB_TYPE_ELEMENT_ARC) PCB_ARC_LOOP(element); { @@ -1261,7 +1261,7 @@ return (PCB_TYPE_ELEMENT_ARC); } } - END_LOOP; + PCB_END_LOOP; if (type == PCB_TYPE_ELEMENT_NAME) PCB_ELEMENT_PCB_TEXT_LOOP(element); { @@ -1271,7 +1271,7 @@ return (PCB_TYPE_ELEMENT_NAME); } } - END_LOOP; + PCB_END_LOOP; if (type == PCB_TYPE_PIN) PCB_PIN_LOOP(element); { @@ -1281,7 +1281,7 @@ return (PCB_TYPE_PIN); } } - END_LOOP; + PCB_END_LOOP; if (type == PCB_TYPE_PAD) PCB_PAD_LOOP(element); { @@ -1291,9 +1291,9 @@ return (PCB_TYPE_PAD); } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; pcb_message(PCB_MSG_DEFAULT, "hace: Internal error, search for ID %d failed\n", ID); return (PCB_TYPE_NONE); @@ -1314,7 +1314,7 @@ return (result); } } - END_LOOP; + PCB_END_LOOP; return result; } Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 5054) +++ trunk/src/select.c (revision 5055) @@ -61,24 +61,24 @@ pcb_undo_add_obj_to_flag(PCB_TYPE_PIN, element, pin, pin); PCB_FLAG_CHANGE(how, PCB_FLAG_SELECTED, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { pcb_undo_add_obj_to_flag(PCB_TYPE_PAD, element, pad, pad); PCB_FLAG_CHANGE(how, PCB_FLAG_SELECTED, pad); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_PCB_TEXT_LOOP(element); { pcb_undo_add_obj_to_flag(PCB_TYPE_ELEMENT_NAME, element, text, text); PCB_FLAG_CHANGE(how, PCB_FLAG_SELECTED, text); } - END_LOOP; + PCB_END_LOOP; pcb_undo_add_obj_to_flag(PCB_TYPE_ELEMENT, element, element, element); PCB_FLAG_CHANGE(how, PCB_FLAG_SELECTED, element); if (redraw) { - if (PCB->ElementOn && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) != 0) == SWAP_IDENT || PCB->InvisibleObjectsOn)) + if (PCB->ElementOn && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) != 0) == PCB_SWAP_IDENT || PCB->InvisibleObjectsOn)) if (PCB->ElementOn) { DrawElementName(element); DrawElementPackage(element); @@ -96,7 +96,7 @@ pcb_undo_add_obj_to_flag(PCB_TYPE_ELEMENT_NAME, element, text, text); PCB_FLAG_CHANGE(how, PCB_FLAG_SELECTED, text); } - END_LOOP; + PCB_END_LOOP; if (redraw) DrawElementName(element); @@ -293,7 +293,7 @@ DrawRat(line); } } - END_LOOP; + PCB_END_LOOP; /* check layers */ LAYER_LOOP(PCB->Data, pcb_max_copper_layer + 2); @@ -319,7 +319,7 @@ DrawLine(layer, line); } } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(layer); { if (PCB_ARC_NEAR_BOX(arc, Box) @@ -330,7 +330,7 @@ DrawArc(layer, arc); } } - END_LOOP; + PCB_END_LOOP; PCB_TEXT_LOOP(layer); { if (!Flag || pcb_text_is_visible(PCB, layer, text)) { @@ -343,7 +343,7 @@ } } } - END_LOOP; + PCB_END_LOOP; PCB_POLY_LOOP(layer); { if (PCB_POLYGON_NEAR_BOX(polygon, Box) @@ -354,9 +354,9 @@ DrawPolygon(layer, polygon); } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; /* elements */ PCB_ELEMENT_LOOP(PCB->Data); @@ -365,7 +365,7 @@ pcb_bool gotElement = pcb_false; if ((PCB->ElementOn || !Flag) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, element) - && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) != 0) == SWAP_IDENT || PCB->InvisibleObjectsOn)) { + && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) != 0) == PCB_SWAP_IDENT || PCB->InvisibleObjectsOn)) { if (PCB_BOX_NEAR_BOX(&ELEMENT_TEXT(PCB, element).BoundingBox, Box) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, &ELEMENT_TEXT(PCB, element)) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, &ELEMENT_TEXT(PCB, element)) != Flag) { @@ -374,7 +374,7 @@ { append(PCB_TYPE_ELEMENT_NAME, element, text); } - END_LOOP; + PCB_END_LOOP; if (PCB->ElementOn) DrawElementName(element); } @@ -389,7 +389,7 @@ DrawPin(pin); } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad) != Flag) { @@ -398,7 +398,7 @@ DrawPad(pad); } } - END_LOOP; + PCB_END_LOOP; if (PCB->PinOn) DrawElement(element); gotElement = pcb_true; @@ -414,22 +414,22 @@ DrawPin(pin); } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (PCB_PAD_NEAR_BOX(pad, Box) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad) != Flag - && (PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) == SWAP_IDENT || PCB->InvisibleObjectsOn || !Flag)) { + && (PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) == PCB_SWAP_IDENT || PCB->InvisibleObjectsOn || !Flag)) { append(PCB_TYPE_PAD, element, pad); if (PCB->PinOn) DrawPad(pad); } } - END_LOOP; + PCB_END_LOOP; } } } - END_LOOP; + PCB_END_LOOP; /* end with vias */ if (PCB->ViaOn || !Flag) PCB_VIA_LOOP(PCB->Data); @@ -442,7 +442,7 @@ DrawVia(via); } } - END_LOOP; + PCB_END_LOOP; if (changed) { pcb_draw(); @@ -573,7 +573,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* check arcs */ if (type & PCB_TYPE_ARC && F->Arc) @@ -588,7 +588,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* check text */ if (type & PCB_TYPE_TEXT && F->Text) @@ -603,7 +603,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* check polygons */ if (type & PCB_TYPE_POLYGON && F->Polygon) @@ -618,7 +618,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* elements silkscreen */ if (type & PCB_TYPE_ELEMENT && PCB->ElementOn && F->Element) @@ -633,7 +633,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (type & PCB_TYPE_ELEMENT_NAME && PCB->ElementOn && F->ElementName) PCB_ELEMENT_LOOP(PCB->Data); { @@ -646,7 +646,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (type & PCB_TYPE_PIN && PCB->PinOn && F->Pin) PCB_ELEMENT_LOOP(PCB->Data); @@ -662,9 +662,9 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; if (type & PCB_TYPE_PAD && PCB->PinOn && F->Pad) PCB_ELEMENT_LOOP(PCB->Data); @@ -680,9 +680,9 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; /* process vias */ if (type & PCB_TYPE_VIA && PCB->ViaOn && F->Via) @@ -697,7 +697,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; /* and rat-lines */ if (type & PCB_TYPE_RATLINE && PCB->RatOn && F->Rat) PCB_RAT_LOOP(PCB->Data); @@ -711,7 +711,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (Reset && changed) pcb_undo_inc_serial(); return (changed); @@ -738,7 +738,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_LINE_VISIBLE_LOOP(PCB->Data); { @@ -749,7 +749,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_VISIBLE_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) { @@ -759,7 +759,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_VISIBLE_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, polygon) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, polygon)) { @@ -769,7 +769,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (PCB->PinOn && PCB->ElementOn) { PCB_PIN_ALL_LOOP(PCB->Data); @@ -781,7 +781,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, element) && PCB_FLAG_TEST(PCB_FLAG_FOUND, pad)) { @@ -791,7 +791,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } if (PCB->ViaOn) @@ -804,7 +804,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; return (changed); } @@ -898,13 +898,13 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (PCB->ElementOn && (Type & PCB_TYPE_ELEMENT)) PCB_ELEMENT_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, element) - && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) != 0) == SWAP_IDENT || PCB->InvisibleObjectsOn) + && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) != 0) == PCB_SWAP_IDENT || PCB->InvisibleObjectsOn) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, element) != Flag) { const char* name = ELEMENT_NAME(PCB, element); if (name && REGEXEC(name)) { @@ -915,19 +915,19 @@ pcb_undo_add_obj_to_flag(PCB_TYPE_PIN, element, pin, pin); PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, Flag, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { pcb_undo_add_obj_to_flag(PCB_TYPE_PAD, element, pad, pad); PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, Flag, pad); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_PCB_TEXT_LOOP(element); { pcb_undo_add_obj_to_flag(PCB_TYPE_ELEMENT_NAME, element, text, text); PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, Flag, text); } - END_LOOP; + PCB_END_LOOP; DrawElementName(element); DrawElement(element); changed = pcb_true; @@ -934,7 +934,7 @@ } } } - END_LOOP; + PCB_END_LOOP; if (PCB->PinOn && (Type & PCB_TYPE_PIN)) PCB_PIN_ALL_LOOP(PCB->Data); { @@ -947,12 +947,12 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (PCB->PinOn && (Type & PCB_TYPE_PAD)) PCB_PAD_ALL_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, element) - && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) != 0) == SWAP_IDENT || PCB->InvisibleObjectsOn) + && ((PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) != 0) == PCB_SWAP_IDENT || PCB->InvisibleObjectsOn) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad) != Flag) if (pad->Name && REGEXEC(pad->Name)) { pcb_undo_add_obj_to_flag(PCB_TYPE_PAD, element, pad, pad); @@ -961,7 +961,7 @@ changed = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (PCB->ViaOn && (Type & PCB_TYPE_VIA)) PCB_VIA_LOOP(PCB->Data); { @@ -973,7 +973,7 @@ changed = pcb_true; } } - END_LOOP; + PCB_END_LOOP; if (Type & PCB_TYPE_NET) { pcb_conn_lookup_init(); changed = pcb_reset_conns(pcb_true) || changed; @@ -991,7 +991,7 @@ pcb_rat_find_hook(conn.type, conn.ptr1, conn.ptr2, conn.ptr2, pcb_true, pcb_true); } } - END_LOOP; + PCB_END_LOOP; changed = pcb_select_connection(Flag) || changed; changed = pcb_reset_conns(pcb_false) || changed; Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 5054) +++ trunk/src_plugins/autocrop/autocrop.c (revision 5055) @@ -141,31 +141,31 @@ pcb_element_move(PCB->Data, element, dx, dy); pcb_undo_add_obj_to_move(PCB_TYPE_ELEMENT, NULL, NULL, element, dx, dy); } - END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); { MyMoveViaLowLevel(PCB->Data, via, dx, dy); pcb_undo_add_obj_to_move(PCB_TYPE_VIA, NULL, NULL, via, dx, dy); } - END_LOOP; + PCB_END_LOOP; PCB_LINE_ALL_LOOP(PCB->Data); { MyMoveLineLowLevel(PCB->Data, layer, line, dx, dy); pcb_undo_add_obj_to_move(PCB_TYPE_LINE, NULL, NULL, line, dx, dy); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(PCB->Data); { MyMoveArcLowLevel(PCB->Data, layer, arc, dx, dy); pcb_undo_add_obj_to_move(PCB_TYPE_ARC, NULL, NULL, arc, dx, dy); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(PCB->Data); { MyMoveTextLowLevel(layer, text, dx, dy); pcb_undo_add_obj_to_move(PCB_TYPE_TEXT, NULL, NULL, text, dx, dy); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(PCB->Data); { /* @@ -176,7 +176,7 @@ Mypcb_poly_move(PCB->Data, layer, polygon, dx, dy); pcb_undo_add_obj_to_move(PCB_TYPE_POLYGON, NULL, NULL, polygon, dx, dy); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; } static int autocrop(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 5054) +++ trunk/src_plugins/autoplace/autoplace.c (revision 5055) @@ -185,7 +185,7 @@ *epp = element; } } - END_LOOP; + PCB_END_LOOP; return list; } @@ -390,7 +390,7 @@ EXPANDRECTXY(box, pin->X - (thickness + clearance), pin->Y - (thickness + clearance), pin->X + (thickness + clearance), pin->Y + (thickness + clearance))} - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { thickness = pad->Thickness / 2; @@ -404,7 +404,7 @@ clearance), MAX(pad->Point1.X, pad->Point2.X) + (thickness + clearance), MAX(pad->Point1.Y, pad->Point2.Y) + (thickness + clearance))} - END_LOOP; + PCB_END_LOOP; /* add a box for each pin to the "opposite side": * surface mount components can't sit on top of pins */ if (!CostParameter.fast) @@ -434,12 +434,12 @@ else lastbox = box; } - END_LOOP; + PCB_END_LOOP; /* assess out of bounds penalty */ if (element->VBox.X1 < 0 || element->VBox.Y1 < 0 || element->VBox.X2 > PCB->MaxWidth || element->VBox.Y2 > PCB->MaxHeight) delta3 += CostParameter.out_of_bounds_penalty; } - END_LOOP; + PCB_END_LOOP; /* compute intersection area of module areas box list */ delta2 = sqrt(fabs(pcb_intersect_box_box(&solderside) + pcb_intersect_box_box(&componentside))) * @@ -480,7 +480,7 @@ (*boxpp)->box = element->VBox; (*boxpp)->element = element; } - END_LOOP; + PCB_END_LOOP; rt_s = pcb_r_create_tree((const pcb_box_t **) seboxes.Ptr, seboxes.PtrN, 1); rt_c = pcb_r_create_tree((const pcb_box_t **) ceboxes.Ptr, ceboxes.PtrN, 1); FreePointerListMemory(&seboxes); @@ -512,7 +512,7 @@ element->VBox.Y2 == boxp->element->VBox.Y1 || element->VBox.Y2 == boxp->element->VBox.Y2) delta4 += factor * CostParameter.aligned_neighbor_bonus; } - END_LOOP; + PCB_END_LOOP; /* free k-d tree memory */ pcb_r_destroy_tree(&rt_s); pcb_r_destroy_tree(&rt_c); @@ -528,7 +528,7 @@ PCB_MAKE_MAX(maxX, element->VBox.X2); PCB_MAKE_MAX(maxY, element->VBox.Y2); } - END_LOOP; + PCB_END_LOOP; if (minX < maxX && minY < maxY) delta5 = CostParameter.overall_area_penalty * sqrt(PCB_COORD_TO_MIL(maxX - minX) * PCB_COORD_TO_MIL(maxY - minY)); } Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 5054) +++ trunk/src_plugins/autoroute/autoroute.c (revision 5055) @@ -176,20 +176,20 @@ /* fail-fast: check subnet_processed flags */\ LIST_LOOP(net, same_net, p); \ assert(!p->flags.subnet_processed);\ - END_LOOP;\ + PCB_END_LOOP;\ /* iterate through *distinct* subnets */\ LIST_LOOP(net, same_net, p); \ if (!p->flags.subnet_processed) {\ LIST_LOOP(p, same_subnet, _pp_);\ _pp_->flags.subnet_processed=1;\ - END_LOOP + PCB_END_LOOP #define END_FOREACH(net, p) \ }; \ - END_LOOP;\ + PCB_END_LOOP;\ /* reset subnet_processed flags */\ LIST_LOOP(net, same_net, p); \ p->flags.subnet_processed=0;\ - END_LOOP;\ + PCB_END_LOOP;\ } while (0) #define SWAP(t, f, s) do { t a=s; s=f; f=a; } while (0) /* notes: @@ -924,7 +924,7 @@ else usedGroup[i] = pcb_false; } - END_LOOP; + PCB_END_LOOP; } usedGroup[front] = pcb_true; usedGroup[back] = pcb_true; @@ -1019,14 +1019,14 @@ rd->max_bloat = MAX(rd->max_bloat, BLOAT(rb->style)); rd->max_keep = MAX(rd->max_keep, rb->style->Clearance); } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; if (last_net && last_in_net) MergeNets(last_net, last_in_net, DIFFERENT_NET); last_net = last_in_net; } - END_LOOP; + PCB_END_LOOP; rd->first_net = last_net; } pcb_netlist_list_free(&Nets); @@ -1036,7 +1036,7 @@ routebox_t *net; LIST_LOOP(rd->first_net, different_net, net); ResetSubnet(net); - END_LOOP; + PCB_END_LOOP; } /* add pins and pads of elements */ @@ -1047,7 +1047,7 @@ else AddPin(layergroupboxes, pin, pcb_false, rd->styles[rd->max_styles]); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_DRC, pad)) @@ -1055,7 +1055,7 @@ else AddPad(layergroupboxes, element, pad, rd->styles[rd->max_styles]); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* add all vias */ PCB_VIA_LOOP(PCB->Data); { @@ -1064,7 +1064,7 @@ else AddPin(layergroupboxes, via, pcb_true, rd->styles[rd->max_styles]); } - END_LOOP; + PCB_END_LOOP; for (i = 0; i < pcb_max_copper_layer; i++) { int layergroup = GetLayerGroupNumberByNumber(i); @@ -1100,7 +1100,7 @@ AddLine(layergroupboxes, layergroup, line, line, rd->styles[rd->max_styles]); } } - END_LOOP; + PCB_END_LOOP; /* add all polygons */ PCB_POLY_LOOP(LAYER_PTR(i)); { @@ -1109,19 +1109,19 @@ else AddPolygon(layergroupboxes, i, polygon, rd->styles[rd->max_styles]); } - END_LOOP; + PCB_END_LOOP; /* add all copper text */ PCB_TEXT_LOOP(LAYER_PTR(i)); { AddText(layergroupboxes, layergroup, text, rd->styles[rd->max_styles]); } - END_LOOP; + PCB_END_LOOP; /* add all arcs */ PCB_ARC_LOOP(LAYER_PTR(i)); { AddArc(layergroupboxes, layergroup, arc, rd->styles[rd->max_styles]); } - END_LOOP; + PCB_END_LOOP; } /* create r-trees from pointer lists */ @@ -1142,7 +1142,7 @@ if (!rb->flags.clear_poly) mtspace_add(rd->mtspace, &rb->box, FIXED, rb->style->Clearance); } - END_LOOP; + PCB_END_LOOP; } } /* free pointer lists */ @@ -1200,7 +1200,7 @@ /* reset connectivity of everything on this net */ LIST_LOOP(net, same_net, rb); rb->same_subnet = rb->original_subnet; - END_LOOP; + PCB_END_LOOP; } static inline pcb_cost_t pcb_cost_to_point_on_layer(const pcb_cheap_point_t * p1, const pcb_cheap_point_t * p2, pcb_cardinal_t point_layer) @@ -1446,7 +1446,7 @@ LIST_LOOP(rb, same_net, p); if (!p->flags.fixed) p->flags.touched = touch; - END_LOOP; + PCB_END_LOOP; } if (!touch) { last = NULL; @@ -3465,7 +3465,7 @@ LIST_LOOP(rb, same_net, p); if (p->flags.source && p->parent.pad->ID == id) return pcb_true; - END_LOOP; + PCB_END_LOOP; return pcb_false; } @@ -3508,7 +3508,7 @@ LIST_LOOP(rb, same_net, p); if (p->flags.source) show_one(p); - END_LOOP; + PCB_END_LOOP; } #endif @@ -3563,12 +3563,12 @@ /* no targets on to/from net need clearance areas */ LIST_LOOP(from, same_net, p); p->flags.nobloat = 1; - END_LOOP; + PCB_END_LOOP; /* set 'source' flags */ LIST_LOOP(from, same_subnet, p); if (!p->flags.nonstraight) p->flags.source = 1; - END_LOOP; + PCB_END_LOOP; /* count up the targets */ num_targets = 0; @@ -3584,7 +3584,7 @@ LIST_LOOP(from, same_net, p); if (p == to) seen = 1; - END_LOOP; + PCB_END_LOOP; #endif assert(seen); /* otherwise from and to are on different nets! */ /* set target flags only on 'to's subnet */ @@ -3593,7 +3593,7 @@ p->flags.target = 1; num_targets++; } - END_LOOP; + PCB_END_LOOP; } } else { @@ -3604,7 +3604,7 @@ p->flags.target = 1; num_targets++; } - END_LOOP; + PCB_END_LOOP; } /* if no targets, then net is done! reset flags and return. */ @@ -3611,7 +3611,7 @@ if (num_targets == 0) { LIST_LOOP(from, same_net, p); p->flags.source = p->flags.target = p->flags.nobloat = 0; - END_LOOP; + PCB_END_LOOP; result.found_route = pcb_false; result.net_completely_routed = pcb_true; result.best_route_cost = 0; @@ -3634,7 +3634,7 @@ showroutebox(p); #endif } - END_LOOP; + PCB_END_LOOP; targets = pcb_r_create_tree((const pcb_box_t **) target_list, i, 0); assert(i <= num_targets); free(target_list); @@ -3643,7 +3643,7 @@ /* touch the source subnet to prepare check for conflictors */ LIST_LOOP(from, same_subnet, p); p->flags.touched = 1; - END_LOOP; + PCB_END_LOOP; LIST_LOOP(from, same_subnet, p); { /* we need the test for 'source' because this box may be nonstraight */ @@ -3669,10 +3669,10 @@ vector_append(source_vec, e); } } - END_LOOP; + PCB_END_LOOP; LIST_LOOP(from, same_subnet, p); p->flags.touched = 0; - END_LOOP; + PCB_END_LOOP; /* break source edges; some edges may be too near obstacles to be able * to exit from. */ @@ -4011,7 +4011,7 @@ if (p->flags.source && p->conflicts_with) vector_destroy(&p->conflicts_with); p->flags.touched = p->flags.source = p->flags.target = p->flags.nobloat = 0; - END_LOOP; + PCB_END_LOOP; vector_destroy(&vss.free_space_vec); vector_destroy(&vss.lo_conflict_space_vec); @@ -4157,11 +4157,11 @@ PCB_MAKE_MAX(bb.X2, p->sbox.X2); PCB_MAKE_MAX(bb.Y2, p->sbox.Y2); } - END_LOOP; + PCB_END_LOOP; area = (double) (bb.X2 - bb.X1) * (bb.Y2 - bb.Y1); pcb_heap_insert(this_pass, area, net); } - END_LOOP; + PCB_END_LOOP; ras.total_nets_routed = 0; /* refinement/finishing passes */ @@ -4194,7 +4194,7 @@ rip = pcb_true; break; } - END_LOOP; + PCB_END_LOOP; } LIST_LOOP(net, same_net, p); @@ -4228,7 +4228,7 @@ p->flags.is_odd = AutoRouteParameters.is_odd; } } - END_LOOP; + PCB_END_LOOP; if (conf_core.editor.live_routing) pcb_draw(); /* reset to original connectivity */ @@ -4274,7 +4274,7 @@ #endif (b.Y2 - b.Y1) * (p->type == PLANE ? -1 : (p->type == PAD ? 1 : 10)), p); } - END_LOOP; + PCB_END_LOOP; ros.net_completely_routed = 0; while (!pcb_heap_is_empty(net_heap)) { p = (routebox_t *) pcb_heap_remove_smallest(net_heap); @@ -4305,7 +4305,7 @@ /* don't bother trying any other source in this subnet */ LIST_LOOP(p, same_subnet, pp); pp->flags.subnet_processed = 1; - END_LOOP; + PCB_END_LOOP; break; } /* note that we can infer nothing about ras.total_subnets based @@ -4323,7 +4323,7 @@ } } #ifndef NET_HEAP - END_LOOP; + PCB_END_LOOP; #endif if (!ros.net_completely_routed) net->flags.is_bad = 1; /* don't skip this the next round */ @@ -4342,7 +4342,7 @@ { p->flags.subnet_processed = 0; } - END_LOOP; + PCB_END_LOOP; } /* swap this_pass and next_pass and do it all over again! */ ro = 0; @@ -4509,7 +4509,7 @@ assert(0); } } - END_LOOP; + PCB_END_LOOP; /* loop again to place all the thermals now that the vias are down */ LIST_LOOP(net, same_net, p); { @@ -4528,9 +4528,9 @@ } } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; return changed; } @@ -4572,7 +4572,7 @@ if (!selected || PCB_FLAG_TEST(PCB_FLAG_SELECTED, line)) i++; } - END_LOOP; + PCB_END_LOOP; #ifdef ROUTE_VERBOSE printf("%d nets!\n", i); #endif @@ -4603,7 +4603,7 @@ changed = RouteOne(rd, a, b, 150000).found_route || changed; goto donerouting; } - END_LOOP; + PCB_END_LOOP; } /* otherwise, munge the netlists so that only the selected rats * get connected. */ @@ -4626,10 +4626,10 @@ { rb->same_net = rb->same_subnet; } - END_LOOP; + PCB_END_LOOP; /* at this point all nets are equal to their subnets */ } - END_LOOP; + PCB_END_LOOP; if (last) { last->different_net.next = rd->first_net; rd->first_net->different_net.prev = last; @@ -4655,7 +4655,7 @@ /* merge subnets into a net! */ MergeNets(a, b, NET); } - END_LOOP; + PCB_END_LOOP; /* now 'different_net' may point to too many different nets. Reset. */ LIST_LOOP(rd->first_net, different_net, net); { @@ -4662,12 +4662,12 @@ if (!net->flags.touched) { LIST_LOOP(net, same_net, rb); rb->flags.touched = 1; - END_LOOP; + PCB_END_LOOP; } else /* this is not a "different net"! */ RemoveFromNet(net, DIFFERENT_NET); } - END_LOOP; + PCB_END_LOOP; /* reset "touched" flag */ LIST_LOOP(rd->first_net, different_net, net); { @@ -4676,9 +4676,9 @@ assert(rb->flags.touched); rb->flags.touched = 0; } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; } /* okay, rd's idea of netlist now corresponds to what we want routed */ /* auto-route all nets */ Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 5054) +++ trunk/src_plugins/boardflip/boardflip.c (revision 5055) @@ -73,13 +73,13 @@ FLIP(line->Point1.Y); FLIP(line->Point2.Y); } - END_LOOP; + PCB_END_LOOP; PCB_TEXT_LOOP(layer); { FLIP(text->Y); PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, text); } - END_LOOP; + PCB_END_LOOP; PCB_POLY_LOOP(layer); { int i, j; @@ -87,7 +87,7 @@ { FLIP(point->Y); } - END_LOOP; + PCB_END_LOOP; i = 0; j = polygon->PointN - 1; while (i < j) { @@ -99,7 +99,7 @@ } pcb_poly_init_clip(PCB->Data, layer, polygon); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(layer); { FLIP(arc->Y); @@ -106,14 +106,14 @@ NEG(arc->StartAngle); NEG(arc->Delta); } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); { FLIP(via->Y); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_LOOP(PCB->Data); { FLIP(element->MarkY); @@ -124,13 +124,13 @@ FLIP(text->Y); PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, text); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_PCB_LINE_LOOP(element); { FLIP(line->Point1.Y); FLIP(line->Point2.Y); } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_ARC_LOOP(element); { FLIP(arc->Y); @@ -137,12 +137,12 @@ NEG(arc->StartAngle); NEG(arc->Delta); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_LOOP(element); { FLIP(pin->Y); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { FLIP(pad->Point1.Y); @@ -150,15 +150,15 @@ if (sides) PCB_FLAG_TOGGLE(PCB_FLAG_ONSOLDER, pad); } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; PCB_RAT_LOOP(PCB->Data); { FLIP(line->Point1.Y); FLIP(line->Point2.Y); } - END_LOOP; + PCB_END_LOOP; return 0; } Index: trunk/src_plugins/distalign/distalign.c =================================================================== --- trunk/src_plugins/distalign/distalign.c (revision 5054) +++ trunk/src_plugins/distalign/distalign.c (revision 5055) @@ -249,7 +249,7 @@ continue; nsel++; } - END_LOOP; + PCB_END_LOOP; if (!nsel) return 0; elements_by_pos = malloc(nsel * sizeof(*elements_by_pos)); @@ -262,7 +262,7 @@ elements_by_pos[nsel].element = element; elements_by_pos[nsel++].pos = coord(element, dir, point); } - END_LOOP; + PCB_END_LOOP; qsort(elements_by_pos, nelements_by_pos, sizeof(*elements_by_pos), cmp_ebp); return nelements_by_pos; } @@ -303,7 +303,7 @@ q += coord(element, dir, point); nsel++; } - END_LOOP; + PCB_END_LOOP; if (nsel) q /= nsel; break; @@ -435,7 +435,7 @@ changed = 1; } } - END_LOOP; + PCB_END_LOOP; if (changed) { pcb_undo_inc_serial(); pcb_redraw(); Index: trunk/src_plugins/distaligntext/distaligntext.c =================================================================== --- trunk/src_plugins/distaligntext/distaligntext.c (revision 5054) +++ trunk/src_plugins/distaligntext/distaligntext.c (revision 5055) @@ -174,7 +174,7 @@ continue; nsel++; } - END_LOOP; + PCB_END_LOOP; PCB_TEXT_ALL_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_SELECTED, text)) @@ -181,7 +181,7 @@ continue; nsel++; } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (!nsel) return 0; texts_by_pos = malloc(nsel * sizeof(*texts_by_pos)); @@ -197,7 +197,7 @@ texts_by_pos[nsel].type = PCB_TYPE_ELEMENT_NAME; texts_by_pos[nsel++].pos = coord(text, dir, point); } - END_LOOP; + PCB_END_LOOP; PCB_TEXT_ALL_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_SELECTED, text)) @@ -206,7 +206,7 @@ texts_by_pos[nsel].type = PCB_TYPE_TEXT; texts_by_pos[nsel++].pos = coord(text, dir, point); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; qsort(texts_by_pos, ntexts_by_pos, sizeof(*texts_by_pos), cmp_tbp); return ntexts_by_pos; } @@ -385,7 +385,7 @@ changed = 1; } } - END_LOOP; + PCB_END_LOOP; /* Selected bare text objects */ PCB_TEXT_ALL_LOOP(PCB->Data); { @@ -412,7 +412,7 @@ } } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (changed) { pcb_undo_restore_serial(); pcb_undo_inc_serial(); Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 5054) +++ trunk/src_plugins/djopt/djopt.c (revision 5055) @@ -126,15 +126,15 @@ if (pin == c->pin) return element->Name[1].TextString; } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (pad == c->pad) return element->Name[1].TextString; } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; return "unknown"; } @@ -2455,7 +2455,7 @@ goto next_line; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; next_line:; } } @@ -2569,7 +2569,7 @@ c = find_corner(pin->X, pin->Y, -1); c->pin = pin; } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { int layern = PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) ? solder_layer : component_layer; @@ -2587,8 +2587,8 @@ add_line_to_corner(ls, ls->e); } - END_LOOP; - END_LOOP; + PCB_END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); /* hace don't mess with vias that have thermals */ /* but then again don't bump into them @@ -2598,7 +2598,7 @@ c = find_corner(via->X, via->Y, -1); c->via = via; } - END_LOOP; + PCB_END_LOOP; check(0, 0); if (PCB_NSTRCMP(arg, "splitlines") == 0) { @@ -2637,7 +2637,7 @@ add_line_to_corner(ls, ls->e); ls->layer = layn; } - END_LOOP; + PCB_END_LOOP; } check(0, 0); Index: trunk/src_plugins/draw_fab/draw_fab.c =================================================================== --- trunk/src_plugins/draw_fab/draw_fab.c (revision 5054) +++ trunk/src_plugins/draw_fab/draw_fab.c (revision 5055) @@ -268,17 +268,17 @@ { pcb_gui->draw_line(gc, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(layer); { pcb_gui->draw_arc(gc, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); } - END_LOOP; + PCB_END_LOOP; PCB_TEXT_LOOP(layer); { DrawTextLowLevel(text, 0); } - END_LOOP; + PCB_END_LOOP; pcb_gui->set_line_width(gc, FAB_LINE_W); text_at(gc, PCB->MaxWidth / 2, PCB->MaxHeight + PCB_MIL_TO_COORD(20), 1, "Board outline is the centerline of this path"); } Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 5054) +++ trunk/src_plugins/export_bboard/bboard.c (revision 5055) @@ -536,7 +536,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, (element))) { bboard_export_element_cairo(element, 1); } - END_LOOP; + PCB_END_LOOP; /* write out components on component side */ PCB_ELEMENT_LOOP(PCB->Data); @@ -543,7 +543,7 @@ if (!PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, (element))) { bboard_export_element_cairo(element, 0); } - END_LOOP; + PCB_END_LOOP; /* draw all wires from all valid layers */ for (i = pcb_max_copper_layer - 1; i >= 0; i--) { @@ -554,7 +554,7 @@ { bboard_draw_line_cairo(line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(&(PCB->Data->Layer[i])); { #warning TODO: remove x1;y1;x2;y2 @@ -562,7 +562,7 @@ arc->Point2.X, arc->Point2.Y,*/ arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness); } - END_LOOP; + PCB_END_LOOP; } } Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 5054) +++ trunk/src_plugins/export_bom/bom.c (revision 5055) @@ -243,7 +243,7 @@ bom = bom_insert((char *) PCB_UNKNOWN(NAMEONPCB_NAME(element)), (char *) PCB_UNKNOWN(DESCRIPTION_NAME(element)), (char *) PCB_UNKNOWN(VALUE_NAME(element)), bom); } - END_LOOP; + PCB_END_LOOP; fp = fopen(bom_filename, "w"); if (!fp) { Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 5054) +++ trunk/src_plugins/export_dsn/dsn.c (revision 5055) @@ -123,7 +123,7 @@ sumy += (double) pin->Y; pin_cnt++; } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { @@ -131,7 +131,7 @@ sumy += (pad->Point1.Y + pad->Point2.Y) / 2.0; pin_cnt++; } - END_LOOP; + PCB_END_LOOP; if (pin_cnt > 0) { centroid.X = sumx / (double) pin_cnt; @@ -198,7 +198,7 @@ "\"%s\", DSN files do not have layer groups.", layer->Name, first_layer->Name); } } - END_LOOP; + PCB_END_LOOP; } if (PCB->Data->Layer[bot_layer].On) { @@ -265,7 +265,7 @@ pcb_fprintf(fp, " )\n"); g_free(ename); } - END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); { /* add mounting holes */ @@ -273,7 +273,7 @@ pcb_fprintf(fp, " (place %d %.6mm %.6mm %s 0 (PN 0))\n", via->ID, via->X, (PCB->MaxHeight - via->Y), "front"); pcb_fprintf(fp, " )\n"); } - END_LOOP; + PCB_END_LOOP; fprintf(fp, " )\n"); } @@ -318,7 +318,7 @@ else g_free(padstack); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { @@ -357,10 +357,10 @@ else g_free(padstack); } - END_LOOP; + PCB_END_LOOP; fprintf(fp, " )\n"); } - END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); { /* add mounting holes and vias */ @@ -374,7 +374,7 @@ else g_free(padstack); } - END_LOOP; + PCB_END_LOOP; /* loop thru padstacks and define them all */ for (iter = pads; iter; iter = g_list_next(iter)) { @@ -465,7 +465,7 @@ (PCB->MaxHeight - line->Point1.Y), line->Point2.X, (PCB->MaxHeight - line->Point2.Y)); fprintf(fp, " (type protect))\n"); } - END_LOOP; + PCB_END_LOOP; } fprintf(fp, "\n )\n)\n"); /* close all braces */ } Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 5054) +++ trunk/src_plugins/export_dxf/dxf.c (revision 5055) @@ -3965,7 +3965,7 @@ */ dxf = dxf_insert(PCB_UNKNOWN(NAMEONPCB_NAME(element)), PCB_UNKNOWN(DESCRIPTION_NAME(element)), PCB_UNKNOWN(VALUE_NAME(element)), dxf); } - END_LOOP; /* End of ELEMENT_LOOP */ + PCB_END_LOOP; /* End of ELEMENT_LOOP */ /* * now write a single block definition for every unique element to * the BLOCKS section of the DXF file. @@ -4036,7 +4036,7 @@ found_pin2 = 1; } } - END_LOOP; /* End of PIN_LOOP */ + PCB_END_LOOP; /* End of PIN_LOOP */ PCB_PAD_LOOP(element); { sumx += (pad->Point1.X + pad->Point2.X) / 2.0; @@ -4063,7 +4063,7 @@ found_pin2 = 1; } } - END_LOOP; /* End of PAD_LOOP */ + PCB_END_LOOP; /* End of PAD_LOOP */ if (pin_cnt > 0) { x = sumx / (double) pin_cnt; y = sumy / (double) pin_cnt; @@ -4169,7 +4169,7 @@ } dxf_id_code++; } - END_LOOP; /* End of ELEMENT_LOOP */ + PCB_END_LOOP; /* End of ELEMENT_LOOP */ /* * write an ENDSEC marker to the DXF file. */ Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 5054) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 5055) @@ -235,7 +235,7 @@ PCB_FLAG_SET(PCB_FLAG_VISIT, pad); } - END_LOOP; /* Pad. */ + PCB_END_LOOP; /* Pad. */ PCB_PIN_LOOP(element); if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pin)) { if (PCB_FLAG_TEST(PCB_FLAG_HOLE, pin)) { /* Non plated? */ @@ -309,8 +309,8 @@ } - END_LOOP; /* Pin. */ - END_LOOP; /* Element */ + PCB_END_LOOP; /* Pin. */ + PCB_END_LOOP; /* Element */ PCB_VIA_LOOP(PCB->Data); if (PCB_FLAG_TEST(PCB_FLAG_FOUND, via)) { @@ -377,7 +377,7 @@ PCB_FLAG_SET(PCB_FLAG_VISIT, via); } - END_LOOP; /* Via. */ + PCB_END_LOOP; /* Via. */ } @@ -443,7 +443,7 @@ } IPCD356_WriteNet(fp, net); } - END_LOOP; /* Pin. */ + PCB_END_LOOP; /* Pin. */ PCB_PAD_LOOP(element); if (!PCB_FLAG_TEST(PCB_FLAG_VISIT, pad)) { pcb_clear_flag_on_lines_polys(pcb_true, PCB_FLAG_FOUND); @@ -461,9 +461,9 @@ } IPCD356_WriteNet(fp, net); } - END_LOOP; /* Pad. */ + PCB_END_LOOP; /* Pad. */ - END_LOOP; /* Element. */ + PCB_END_LOOP; /* Element. */ PCB_VIA_LOOP(PCB->Data); if (!PCB_FLAG_TEST(PCB_FLAG_VISIT, via)) { @@ -473,7 +473,7 @@ strcpy(net, "N/C"); IPCD356_WriteNet(fp, net); } - END_LOOP; /* Via. */ + PCB_END_LOOP; /* Via. */ IPCD356_End(fp); fclose(fp); @@ -493,15 +493,15 @@ { PCB_VIA_LOOP(PCB->Data); PCB_FLAG_CLEAR(PCB_FLAG_VISIT, via); - END_LOOP; /* Via. */ + PCB_END_LOOP; /* Via. */ PCB_ELEMENT_LOOP(PCB->Data); PCB_PIN_LOOP(element); PCB_FLAG_CLEAR(PCB_FLAG_VISIT, pin); - END_LOOP; /* Pin. */ + PCB_END_LOOP; /* Pin. */ PCB_PAD_LOOP(element); PCB_FLAG_CLEAR(PCB_FLAG_VISIT, pad); - END_LOOP; /* Pad. */ - END_LOOP; /* Element. */ + PCB_END_LOOP; /* Pad. */ + PCB_END_LOOP; /* Element. */ } int IPCD356_WriteAliases(FILE * fd, IPCD356_AliasList * aliaslist) @@ -572,7 +572,7 @@ pcb_message(PCB_MSG_ERROR, "Error: Found unnamed element. All elements need to be named to create an IPC-D-356 netlist.\n"); return (1); } - END_LOOP; /* Element. */ + PCB_END_LOOP; /* Element. */ return (0); } Index: trunk/src_plugins/export_openscad/scadcomp.c =================================================================== --- trunk/src_plugins/export_openscad/scadcomp.c (revision 5054) +++ trunk/src_plugins/export_openscad/scadcomp.c (revision 5055) @@ -543,7 +543,7 @@ } } - END_LOOP; + PCB_END_LOOP; fprintf(scad_output, "}\n\n"); Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 5054) +++ trunk/src_plugins/export_test/export_test.c (revision 5055) @@ -183,7 +183,7 @@ found_pin2 = 1; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { @@ -209,7 +209,7 @@ } } - END_LOOP; + PCB_END_LOOP; if (pin_cnt > 0) { x = sumx / (double) pin_cnt; @@ -262,7 +262,7 @@ free(value); } } - END_LOOP; + PCB_END_LOOP; fclose(fp); Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 5054) +++ trunk/src_plugins/export_xy/xy.c (revision 5055) @@ -215,7 +215,7 @@ } } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { @@ -239,7 +239,7 @@ } } } - END_LOOP; + PCB_END_LOOP; if (pin_cnt > 0) { centroidx = sumx / (double) pin_cnt; @@ -318,7 +318,7 @@ free(descr); free(value); } - END_LOOP; + PCB_END_LOOP; fclose(fp); Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 5054) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 5055) @@ -99,7 +99,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_ELEMENT_LOOP(PCB->Data); { PCB_PIN_LOOP(element); @@ -111,7 +111,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(flag, pad)) { @@ -121,9 +121,9 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; PCB_RAT_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, line)) { @@ -133,7 +133,7 @@ change = pcb_true; } } - END_LOOP; + PCB_END_LOOP; PCB_LINE_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, line)) { @@ -143,7 +143,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, arc)) { @@ -153,7 +153,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_POLY_COPPER_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, polygon)) { @@ -163,7 +163,7 @@ change = pcb_true; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (change) { pcb_board_set_changed_flag(pcb_true); if (AndDraw) { Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 5054) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 5055) @@ -163,7 +163,7 @@ gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, NODE_NAME_COLUMN, entry->ListEntry, NODE_LIBRARY_COLUMN, entry, -1); } - END_LOOP; + PCB_END_LOOP; return GTK_TREE_MODEL(store); } @@ -399,7 +399,7 @@ NET_NAME_COLUMN, path_segments[path_depth - 1], NET_LIBRARY_COLUMN, menu, -1); g_strfreev(path_segments); } - END_LOOP; + PCB_END_LOOP; g_hash_table_destroy(prefix_hash); @@ -537,7 +537,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, line) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) pcb_remove_object(PCB_TYPE_LINE, layer, line, line); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_VISIBLE_LOOP(PCB->Data); { @@ -544,7 +544,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) pcb_remove_object(PCB_TYPE_ARC, layer, arc, arc); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (PCB->ViaOn) PCB_VIA_LOOP(PCB->Data); @@ -552,7 +552,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) pcb_remove_object(PCB_TYPE_VIA, via, via, via); } - END_LOOP; + PCB_END_LOOP; } Index: trunk/src_plugins/hid_gtk/gui-output-events.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-output-events.c (revision 5054) +++ trunk/src_plugins/hid_gtk/gui-output-events.c (revision 5055) @@ -336,12 +336,12 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (netname != NULL) break; } - END_LOOP; + PCB_END_LOOP; description = g_strdup_printf("Element name: %s\n" "Pinname : %s\n" Index: trunk/src_plugins/hid_gtk/gui-pinout-preview.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 5054) +++ trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 5055) @@ -73,13 +73,13 @@ { PCB_FLAG_SET(PCB_FLAG_DISPLAYNAME, pin); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(&pinout->element); { PCB_FLAG_SET(PCB_FLAG_DISPLAYNAME, pad); } - END_LOOP; + PCB_END_LOOP; pcb_element_move(NULL, &pinout->element, @@ -92,7 +92,7 @@ { line->Thickness = 0; } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(&pinout->element); { @@ -103,7 +103,7 @@ */ arc->Thickness = 1; } - END_LOOP; + PCB_END_LOOP; } Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 5054) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 5055) @@ -178,7 +178,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, line) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) pcb_remove_object(PCB_TYPE_LINE, layer, line, line); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_VISIBLE_LOOP(PCB->Data); { @@ -185,7 +185,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) pcb_remove_object(PCB_TYPE_ARC, layer, arc, arc); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (PCB->ViaOn) PCB_VIA_LOOP(PCB->Data); @@ -193,7 +193,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) pcb_remove_object(PCB_TYPE_VIA, via, via, via); } - END_LOOP; + PCB_END_LOOP; } static void netnode_browse(Widget w, XtPointer v, XmListCallbackStruct * cbs) @@ -222,7 +222,7 @@ return; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (strcmp(pad->Number, pname) == 0) { @@ -233,10 +233,10 @@ return; } } - END_LOOP; + PCB_END_LOOP; } } - END_LOOP; + PCB_END_LOOP; free(ename); } Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 5054) +++ trunk/src_plugins/import_dsn/dsn.c (revision 5055) @@ -132,7 +132,7 @@ if (!strcmp(layer->Name, lname)) rlayer = layer; } - END_LOOP; + PCB_END_LOOP; linethick = dim1; x0 = 0; y0 = 0; Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 5054) +++ trunk/src_plugins/io_lihata/read.c (revision 5055) @@ -987,7 +987,7 @@ { pcb_poly_init_clip(pcb->Data, layer, polygon); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; return 0; } Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 5054) +++ trunk/src_plugins/io_pcb/file.c (revision 5055) @@ -113,7 +113,7 @@ if (polygon->HoleIndexN > 0) return PCB_FILE_VERSION_HOLES; } - ENDALL_LOOP; + PCB_ENDALL_LOOP; return PCB_FILE_VERSION_BASELINE; } Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 5054) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 5055) @@ -1831,7 +1831,7 @@ { pcb_poly_init_clip(yyData, layer, polygon); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB = pcb_save; } #line 1838 "parse_y.c" /* yacc.c:1646 */ Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 5054) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 5055) @@ -214,7 +214,7 @@ { pcb_poly_init_clip(yyData, layer, polygon); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB = pcb_save; } Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 5054) +++ trunk/src_plugins/jostle/jostle.c (revision 5055) @@ -520,7 +520,7 @@ { PCB_FLAG_CLEAR(PCB_FLAG_DRC, line); } - END_LOOP; + PCB_END_LOOP; do { info.box = pcb_polyarea_t_boundingBox(info.brush); Debugpcb_polyarea_t(info.brush, NULL); Index: trunk/src_plugins/polycombine/polycombine.c =================================================================== --- trunk/src_plugins/polycombine/polycombine.c (revision 5054) +++ trunk/src_plugins/polycombine/polycombine.c (revision 5055) @@ -309,7 +309,7 @@ /*pcb_poly_remove(layer, polygon);*/ } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* Now perform a traversal of the tree, computing a polygon */ res = compute_polygon_recursive(root, NULL); @@ -328,7 +328,7 @@ pcb_poly_remove(layer, polygon); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; /* Now de-construct the resulting polygon into raw PCB polygons */ pcb_poly_to_polygons_on_layer(PCB->Data, Layer, res, pcb_strflg_board_s2f("clearpoly", NULL)); Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 5054) +++ trunk/src_plugins/polystitch/polystitch.c (revision 5055) @@ -97,9 +97,9 @@ best = dist; } } - END_LOOP; + PCB_END_LOOP; } - ENDALL_LOOP; + PCB_ENDALL_LOOP; if (!inner_poly) { pcb_message(PCB_MSG_ERROR, "Cannot find any polygons"); return; @@ -125,7 +125,7 @@ return; } } - END_LOOP; + PCB_END_LOOP; pcb_message(PCB_MSG_ERROR, "Cannot find a polygon enclosing the one you selected"); } Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 5054) +++ trunk/src_plugins/puller/puller.c (revision 5055) @@ -948,11 +948,11 @@ PCB_ARC_LOOP(CURRENT); { Extra *e = new_arc_extra(arc); fix_arc_extra(arc, e); - } END_LOOP; + } PCB_END_LOOP; PCB_LINE_LOOP(CURRENT); { new_line_extra(line); - } END_LOOP; + } PCB_END_LOOP; PCB_LINE_LOOP(CURRENT); { Extra *e = LINE2EXTRA(line); @@ -961,7 +961,7 @@ find_pairs_1(line, &e->end.next, line->Point2.X, line->Point2.Y); } } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(CURRENT); { Extra *e = ARC2EXTRA(arc); @@ -970,7 +970,7 @@ find_pairs_1(arc, &e->end.next, e->end.x, e->end.y); } } - END_LOOP; + PCB_END_LOOP; PCB_PIN_ALL_LOOP(PCB->Data); { pcb_box_t box; @@ -981,7 +981,7 @@ pcb_r_search(CURRENT->line_tree, &box, NULL, find_pair_pinline_callback, pin, NULL); pcb_r_search(CURRENT->arc_tree, &box, NULL, find_pair_pinarc_callback, pin, NULL); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_VIA_LOOP(PCB->Data); { pcb_box_t box; @@ -992,7 +992,7 @@ pcb_r_search(CURRENT->line_tree, &box, NULL, find_pair_pinline_callback, via, NULL); pcb_r_search(CURRENT->arc_tree, &box, NULL, find_pair_pinarc_callback, via, NULL); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { pcb_box_t box; @@ -1004,7 +1004,7 @@ pcb_r_search(CURRENT->arc_tree, &box, NULL, find_pair_padarc_callback, pad, NULL); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; g_hash_table_foreach(lines, (GHFunc) null_multi_next_ends, NULL); g_hash_table_foreach(arcs, (GHFunc) null_multi_next_ends, NULL); @@ -1173,11 +1173,11 @@ PCB_LINE_LOOP(CURRENT); { e = LINE2EXTRA(line); trace_path(e); - } END_LOOP; + } PCB_END_LOOP; PCB_ARC_LOOP(CURRENT); { e = ARC2EXTRA(arc); trace_path(e); - } END_LOOP; + } PCB_END_LOOP; } #endif @@ -2339,7 +2339,7 @@ #endif /*pcb_gui->progress(0,0,0); */ } - END_LOOP; + PCB_END_LOOP; } } @@ -2357,7 +2357,7 @@ if (LINE2EXTRA(line)->deleted) pcb_line_destroy(CURRENT, line); } - END_LOOP; + PCB_END_LOOP; PCB_ARC_LOOP(CURRENT); { @@ -2364,7 +2364,7 @@ if (ARC2EXTRA(arc)->deleted) pcb_arc_destroy(CURRENT, arc); } - END_LOOP; + PCB_END_LOOP; g_hash_table_unref(lines); g_hash_table_unref(arcs); Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 5054) +++ trunk/src_plugins/renumber/renumber.c (revision 5055) @@ -180,7 +180,7 @@ element_list[i] = element; } } - END_LOOP; + PCB_END_LOOP; /* Index: trunk/src_plugins/renumber/renumberblock.c =================================================================== --- trunk/src_plugins/renumber/renumberblock.c (revision 5054) +++ trunk/src_plugins/renumber/renumberblock.c (revision 5055) @@ -74,7 +74,7 @@ pcb_chg_obj_name(PCB_TYPE_ELEMENT, element, NULL, NULL, new_ref); } - END_LOOP; + PCB_END_LOOP; pcb_undo_inc_serial(); return 0; } @@ -114,6 +114,6 @@ pcb_chg_obj_name(PCB_TYPE_ELEMENT, element, NULL, NULL, new_ref); } - END_LOOP; + PCB_END_LOOP; return 0; } Index: trunk/src_plugins/report/drill.c =================================================================== --- trunk/src_plugins/report/drill.c (revision 5054) +++ trunk/src_plugins/report/drill.c (revision 5055) @@ -142,7 +142,7 @@ swapdrill = savedrill; } } - END_LOOP; + PCB_END_LOOP; if (AllDrills->Drill[AllDrills->DrillN - 1].DrillSize < pin->DrillingHole) { Drill = GetDrillInfoDrillMemory(AllDrills); InitializeDrill(Drill, pin, element); @@ -150,7 +150,7 @@ } } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_VIA_LOOP(top); { if (!DrillFound) { @@ -169,7 +169,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; if (Drill->DrillSize != via->DrillingHole) { Drill = GetDrillInfoDrillMemory(AllDrills); Drill->DrillSize = via->DrillingHole; @@ -180,7 +180,7 @@ FillDrill(Drill, NULL, via); } } - END_LOOP; + PCB_END_LOOP; qsort(AllDrills->Drill, AllDrills->DrillN, sizeof(DrillType), DrillQSort); return (AllDrills); } @@ -244,7 +244,7 @@ free(drill->Element); free(drill->Pin); } - END_LOOP; + PCB_END_LOOP; free(Drills->Drill); free(Drills); } Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 5054) +++ trunk/src_plugins/report/report.c (revision 5055) @@ -186,7 +186,7 @@ if (pin == Pin) break; } - END_LOOP; + PCB_END_LOOP; if (PCB_FLAG_TEST(PCB_FLAG_HOLE, Pin)) report = pcb_strdup_printf("%m+PIN ID# %ld; Flags:%s\n" "(X,Y) = %$mD.\n" @@ -342,7 +342,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; len = pcb_distance(Pad->Point1.X, Pad->Point1.Y, Pad->Point2.X, Pad->Point2.Y); report = pcb_strdup_printf("%m+PAD ID# %ld; Flags:%s\n" "FirstPoint(X,Y) = %$mD; ID = %ld.\n" @@ -486,15 +486,15 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pin)) pcb_append_printf(&list, "%s-%s,%c", NAMEONPCB_NAME(element), pin->Number, ((col++ % (conf_report.plugins.report.columns + 1)) == conf_report.plugins.report.columns) ? '\n' : ' '); } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pad)) pcb_append_printf(&list, "%s-%s,%c", NAMEONPCB_NAME(element), pad->Number, ((col++ % (conf_report.plugins.report.columns + 1)) == conf_report.plugins.report.columns) ? '\n' : ' '); } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; pcb_gui->report_dialog("Report", list.array); gds_uninit(&list); @@ -529,7 +529,7 @@ *found = 1; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(PCB->Data); { @@ -541,7 +541,7 @@ *found = 1; } } - ENDALL_LOOP; + PCB_ENDALL_LOOP; return length; } @@ -590,7 +590,7 @@ break; } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (strcmp(pad->Number, pname) == 0) { @@ -600,10 +600,10 @@ break; } } - END_LOOP; + PCB_END_LOOP; } } - END_LOOP; + PCB_END_LOOP; if (got_one) { char buf[50]; @@ -678,7 +678,7 @@ } } } - END_LOOP; + PCB_END_LOOP; PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pad)) { @@ -699,9 +699,9 @@ } } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; got_net_name: pcb_reset_conns(pcb_false); Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 5054) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 5055) @@ -174,7 +174,7 @@ set_visited(element); } } - END_LOOP; + PCB_END_LOOP; /* initialize variables for place() */ minx = GAP; @@ -220,7 +220,7 @@ place(ea); } } - END_LOOP; + PCB_END_LOOP; /* Place larger nets, still grouping by net */ PCB_NET_LOOP(Nets); @@ -240,9 +240,9 @@ set_visited(element); place(element); } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; /* Place up anything else */ PCB_ELEMENT_LOOP(PCB->Data); @@ -251,7 +251,7 @@ place(element); } } - END_LOOP; + PCB_END_LOOP; htpi_uninit(&visited); Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 5054) +++ trunk/src_plugins/stroke/stroke.c (revision 5055) @@ -66,13 +66,13 @@ case 987412: case 8741236: case 874123: - pcb_screen_obj_rotate90(StrokeBox.X1, StrokeBox.Y1, SWAP_IDENT ? 1 : 3); + pcb_screen_obj_rotate90(StrokeBox.X1, StrokeBox.Y1, PCB_SWAP_IDENT ? 1 : 3); break; case 7896321: case 786321: case 789632: case 896321: - pcb_screen_obj_rotate90(StrokeBox.X1, StrokeBox.Y1, SWAP_IDENT ? 3 : 1); + pcb_screen_obj_rotate90(StrokeBox.X1, StrokeBox.Y1, PCB_SWAP_IDENT ? 3 : 1); break; case 258: pcb_crosshair_set_mode(PCB_MODE_LINE); Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 5054) +++ trunk/src_plugins/teardrops/teardrops.c (revision 5055) @@ -286,19 +286,19 @@ { check_via(via); } - END_LOOP; + PCB_END_LOOP; PCB_PIN_ALL_LOOP(PCB->Data); { check_pin(pin); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; PCB_PAD_ALL_LOOP(PCB->Data); { check_pad(pad); } - ENDALL_LOOP; + PCB_ENDALL_LOOP; pcb_gui->invalidate_all(); Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 5054) +++ trunk/src_plugins/toporouter/toporouter.c (revision 5055) @@ -1958,9 +1958,9 @@ } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; return 0; } @@ -2008,9 +2008,9 @@ bbox->point = GTS_POINT(insert_vertex(r, l, x, y, bbox)); } } - END_LOOP; + PCB_END_LOOP; } - END_LOOP; + PCB_END_LOOP; PCB_VIA_LOOP(PCB->Data); { @@ -2046,7 +2046,7 @@ } } - END_LOOP; + PCB_END_LOOP; return 0; } @@ -2085,7 +2085,7 @@ g_list_concat(bbox->constraints, insert_constraint_edge(r, l, xs[0], ys[0], 0, xs[1], ys[1], 0, bbox)); } } - END_LOOP; + PCB_END_LOOP; return 0; } @@ -2769,16 +2769,16 @@ } } - END_LOOP; + PCB_END_LOOP; #ifdef DEBUG_MERGING printf("\n"); #endif } - END_LOOP; + PCB_END_LOOP; } } - END_LOOP; + PCB_END_LOOP; pcb_netlist_list_free(&nets); } @@ -2831,7 +2831,7 @@ read_lines(r, cur_layer, layer, number); } - END_LOOP; + PCB_END_LOOP; @@ -8067,12 +8067,12 @@ PCB_RAT_LOOP(PCB->Data); if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, line)) import_route(r, line); - END_LOOP; + PCB_END_LOOP; if (!r->routes->len) { PCB_RAT_LOOP(PCB->Data); import_route(r, line); - END_LOOP; + PCB_END_LOOP; } } @@ -8217,8 +8217,8 @@ } } - END_LOOP; - END_LOOP; + PCB_END_LOOP; + PCB_END_LOOP; pcb_undo_inc_serial(); pcb_draw(); Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 5054) +++ trunk/src_plugins/vendordrill/vendor.c (revision 5055) @@ -335,7 +335,7 @@ } } } - END_LOOP; + PCB_END_LOOP; /* and now the pins */ PCB_ELEMENT_LOOP(PCB->Data); @@ -369,10 +369,10 @@ } } } - END_LOOP; + PCB_END_LOOP; } } - END_LOOP; + PCB_END_LOOP; pcb_message(PCB_MSG_DEFAULT, _("Updated %d drill sizes out of %d total\n"), changed, tot);