Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4967) +++ trunk/doc-rnd/hacking/renames (revision 4968) @@ -585,3 +585,8 @@ SILKLINE_LOOP -> PCB_LINE_SILK_LOOP VISIBLELINE_LOOP -> PCB_LINE_VISIBLE_LOOP LINE_LOOP -> PCB_LINE_LOOP +ALLPAD_LOOP -> PCB_PAD_ALL_LOOP +PAD_LOOP -> PCB_PAD_LOOP +ALLPIN_LOOP -> PCB_PIN_ALL_LOOP +VIA_LOOP -> PCB_VIA_LOOP +PIN_LOOP -> PCB_PIN_LOOP Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4967) +++ trunk/src/action_helper.c (revision 4968) @@ -243,7 +243,7 @@ void pcb_clear_warnings() { conf_core.temp.rat_warn = pcb_false; - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, pin)) { PCB_FLAG_CLEAR(PCB_FLAG_WARN, pin); @@ -251,7 +251,7 @@ } } ENDALL_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, via)) { PCB_FLAG_CLEAR(PCB_FLAG_WARN, via); @@ -259,7 +259,7 @@ } } END_LOOP; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_WARN, pad)) { PCB_FLAG_CLEAR(PCB_FLAG_WARN, pad); @@ -685,13 +685,13 @@ pcb_element_t *element = (pcb_element_t *) ptr2; PCB_FLAG_TOGGLE(PCB_FLAG_LOCK, element); - PIN_LOOP(element); + PCB_PIN_LOOP(element); { PCB_FLAG_TOGGLE(PCB_FLAG_LOCK, pin); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { PCB_FLAG_TOGGLE(PCB_FLAG_LOCK, pad); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, pad); Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4967) +++ trunk/src/buffer.c (revision 4968) @@ -225,7 +225,7 @@ void pcb_buffer_rotate(pcb_buffer_t *Buffer, pcb_uint8_t Number) { /* rotate vias */ - VIA_LOOP(Buffer->Data); + PCB_VIA_LOOP(Buffer->Data); { r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); ROTATE_VIA_LOWLEVEL(via, Buffer->X, Buffer->Y, Number); @@ -285,7 +285,7 @@ #warning unravel: move these to the corresponding obj_*.[ch] /* rotate vias */ - VIA_LOOP(Buffer->Data); + PCB_VIA_LOOP(Buffer->Data); { r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); free_rotate(&via->X, &via->Y, Buffer->X, Buffer->Y, cosa, sina); @@ -418,7 +418,7 @@ /* set buffer offset to 'mark' position */ Buffer->X = PCB_SWAP_X(Buffer->X); Buffer->Y = PCB_SWAP_Y(Buffer->Y); - VIA_LOOP(Buffer->Data); + PCB_VIA_LOOP(Buffer->Data); { via->X = PCB_SWAP_X(via->X); via->Y = PCB_SWAP_Y(via->Y); @@ -474,7 +474,7 @@ /* set buffer offset to 'mark' position */ Buffer->X = PCB_SWAP_X(Buffer->X); Buffer->Y = PCB_SWAP_Y(Buffer->Y); - VIA_LOOP(Buffer->Data); + PCB_VIA_LOOP(Buffer->Data); { r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); via->X = PCB_SWAP_X(via->X); @@ -555,7 +555,7 @@ Buffer->Data->Layer[cnumber] = swap; k++; /* move the thermal flags with the layers */ - ALLPIN_LOOP(Buffer->Data); + PCB_PIN_ALL_LOOP(Buffer->Data); { t1 = PCB_FLAG_THERM_TEST(snumber, pin); t2 = PCB_FLAG_THERM_TEST(cnumber, pin); @@ -563,7 +563,7 @@ PCB_FLAG_THERM_ASSIGN(cnumber, t1, pin); } ENDALL_LOOP; - VIA_LOOP(Buffer->Data); + PCB_VIA_LOOP(Buffer->Data); { t1 = PCB_FLAG_THERM_TEST(snumber, via); t2 = PCB_FLAG_THERM_TEST(cnumber, via); @@ -679,7 +679,7 @@ /* finally the vias */ if (PCB->ViaOn) { changed |= (pinlist_length(&(PCB_PASTEBUFFER->Data->Via)) != 0); - VIA_LOOP(PCB_PASTEBUFFER->Data); + PCB_VIA_LOOP(PCB_PASTEBUFFER->Data); { CopyVia(&ctx, via); } Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 4967) +++ trunk/src/change.c (revision 4968) @@ -721,7 +721,7 @@ pcb_bool change = pcb_false; if (PCB->ViaOn) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, via)) change |= pcb_pin_change_hole(via); @@ -742,7 +742,7 @@ { pcb_bool change = pcb_false; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad)) change |= pcb_pad_change_paste(pad); Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 4967) +++ trunk/src/change_act.c (revision 4968) @@ -572,7 +572,7 @@ PCB_ELEMENT_LOOP(PCB->Data); { if (PCB_NSTRCMP(refdes, NAMEONPCB_NAME(element)) == 0) { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_NSTRCMP(pinnum, pin->Number) == 0) { AddObjectToChangeNameUndoList(PCB_TYPE_PIN, NULL, NULL, pin, pin->Name); @@ -587,7 +587,7 @@ } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PCB_NSTRCMP(pinnum, pad->Number) == 0) { AddObjectToChangeNameUndoList(PCB_TYPE_PAD, NULL, NULL, pad, pad->Name); Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4967) +++ trunk/src/crosshair.c (revision 4968) @@ -239,7 +239,7 @@ END_LOOP; } /* pin coordinates and angles have to be converted to X11 notation */ - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { thindraw_moved_pv(pin, DX, DY); } @@ -246,7 +246,7 @@ END_LOOP; /* pads */ - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { if (PCB->InvisibleObjectsOn || (PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) != 0) == conf_core.editor.show_solder_side) { /* Make a copy of the pad structure, moved to the correct position */ @@ -330,7 +330,7 @@ /* and the vias */ if (PCB->ViaOn) - VIA_LOOP(Buffer->Data); + PCB_VIA_LOOP(Buffer->Data); { thindraw_moved_pv(via, x, y); } Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 4967) +++ trunk/src/data.c (revision 4968) @@ -130,7 +130,7 @@ } if (epicb != NULL) { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { epicb(ctx, PCB, element, pin); } @@ -139,7 +139,7 @@ if (epacb != NULL) { - PAD_LOOP(element); + PCB_PAD_LOOP(element); { epacb(ctx, PCB, element, pad); } @@ -156,7 +156,7 @@ void pcb_loop_vias(void *ctx, pcb_via_cb_t vcb) { if (vcb != NULL) { - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { vcb(ctx, PCB, via); } @@ -186,7 +186,7 @@ if (data == NULL) return; - VIA_LOOP(data); + PCB_VIA_LOOP(data); { free(via->Name); } @@ -281,7 +281,7 @@ box.X2 = box.Y2 = -MAX_COORD; /* now scan for the lowest/highest X and Y coordinate */ - VIA_LOOP(Data); + PCB_VIA_LOOP(Data); { box.X1 = MIN(box.X1, via->X - via->Thickness / 2); box.Y1 = MIN(box.Y1, via->Y - via->Thickness / 2); Index: trunk/src/find_clear.c =================================================================== --- trunk/src/find_clear.c (revision 4967) +++ trunk/src/find_clear.c (revision 4968) @@ -30,7 +30,7 @@ { pcb_bool change = pcb_false; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, via)) { if (AndDraw) @@ -44,7 +44,7 @@ END_LOOP; PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_FLAG_TEST(flag, pin)) { if (AndDraw) @@ -56,7 +56,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(flag, pad)) { if (AndDraw) Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 4967) +++ trunk/src/find_drc.c (revision 4968) @@ -349,7 +349,7 @@ PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (!PCB_FLAG_TEST(PCB_FLAG_DRC, pin) && DRCFind(PCB_TYPE_PIN, (void *) element, (void *) pin, (void *) pin)) { @@ -360,7 +360,7 @@ END_LOOP; if (IsBad) break; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { /* count up how many pads have no solderpaste openings */ @@ -379,7 +379,7 @@ } END_LOOP; if (!IsBad) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_DRC, via) && DRCFind(PCB_TYPE_VIA, (void *) via, (void *) via, (void *) via)) { @@ -457,7 +457,7 @@ ENDALL_LOOP; } if (!IsBad) { - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { PlowsPolygon(PCB->Data, PCB_TYPE_PIN, element, pin, drc_callback); if (IsBad) @@ -511,7 +511,7 @@ ENDALL_LOOP; } if (!IsBad) { - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { PlowsPolygon(PCB->Data, PCB_TYPE_PAD, element, pad, drc_callback); if (IsBad) @@ -542,7 +542,7 @@ ENDALL_LOOP; } if (!IsBad) { - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { PlowsPolygon(PCB->Data, PCB_TYPE_VIA, via, via, drc_callback); if (IsBad) Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 4967) +++ trunk/src/find_lookup.c (revision 4968) @@ -205,7 +205,7 @@ * on each of the two possible layers */ NumberOfPads[COMPONENT_LAYER] = NumberOfPads[SOLDER_LAYER] = 0; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad)) NumberOfPads[SOLDER_LAYER]++; @@ -572,7 +572,7 @@ ic = PCB_FLAG_INTCONN_GET(orig_pin); if ((info.pv.Element != NULL) && (ic > 0)) { pcb_element_t *e = info.pv.Element; - PIN_LOOP(e); + PCB_PIN_LOOP(e); { if ((orig_pin != pin) && (ic == PCB_FLAG_INTCONN_GET(pin))) { if (!PCB_FLAG_TEST(TheFlag, pin)) @@ -1242,7 +1242,7 @@ /*fprintf(stderr, "tlayer=%d\n", tlayer);*/ if (tlayer >= 0) { - PAD_LOOP(e); + PCB_PAD_LOOP(e); { if ((orig_pad != pad) && (ic == PCB_FLAG_INTCONN_GET(pad))) { int padlayer = PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) ? SOLDER_LAYER : COMPONENT_LAYER; Index: trunk/src/find_misc.c =================================================================== --- trunk/src/find_misc.c (revision 4967) +++ trunk/src/find_misc.c (revision 4968) @@ -296,7 +296,7 @@ { pcb_bool change = pcb_false; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(TheFlag, via)) { if (AndDraw) @@ -310,7 +310,7 @@ END_LOOP; PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_FLAG_TEST(TheFlag, pin)) { if (AndDraw) @@ -322,7 +322,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(TheFlag, pad)) { if (AndDraw) Index: trunk/src/find_print.c =================================================================== --- trunk/src/find_print.c (revision 4967) +++ trunk/src/find_print.c (revision 4968) @@ -39,7 +39,7 @@ /* check all pins in element */ - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { if (!PCB_FLAG_TEST(PCB_FLAG_HOLE, pin)) { /* pin might have bee checked before, add to list if not */ @@ -79,7 +79,7 @@ END_LOOP; /* check all pads in element */ - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { /* lookup pad in list */ /* pad might has bee checked before, add to list if not */ @@ -162,7 +162,7 @@ PrintConnectionElementName(Element, FP); /* check all pins in element */ - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { /* pin might have been checked before, add to list if not */ if (PCB_FLAG_TEST(TheFlag, pin)) { @@ -184,7 +184,7 @@ END_LOOP; /* check all pads in element */ - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { pcb_cardinal_t layer; /* pad might have been checked before, add to list if not */ Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 4967) +++ trunk/src/gui_act.c (revision 4968) @@ -459,7 +459,7 @@ PCB_TYPE_ELEMENT | PCB_TYPE_PIN | PCB_TYPE_PAD | PCB_TYPE_VIA, (void **) &ptr1, (void **) &ptr2, (void **) &ptr3)) { case PCB_TYPE_ELEMENT: - PIN_LOOP((pcb_element_t *) ptr1); + PCB_PIN_LOOP((pcb_element_t *) ptr1); { if (PCB_FLAG_TEST(PCB_FLAG_DISPLAYNAME, pin)) ErasePinName(pin); @@ -469,7 +469,7 @@ PCB_FLAG_TOGGLE(PCB_FLAG_DISPLAYNAME, pin); } END_LOOP; - PAD_LOOP((pcb_element_t *) ptr1); + PCB_PAD_LOOP((pcb_element_t *) ptr1); { if (PCB_FLAG_TEST(PCB_FLAG_DISPLAYNAME, pad)) ErasePadName(pad); Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 4967) +++ trunk/src/layer.c (revision 4968) @@ -457,7 +457,7 @@ pcb_bool IsPasteEmpty(int side) { pcb_bool paste_empty = pcb_true; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_ON_SIDE(pad, side) && !PCB_FLAG_TEST(PCB_FLAG_NOPASTE, pad) && pad->Mask > 0) { paste_empty = pcb_false; @@ -882,13 +882,13 @@ static void move_all_thermals(int old_index, int new_index) { - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { move_one_thermal(old_index, new_index, via); } END_LOOP; - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { move_one_thermal(old_index, new_index, pin); } Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 4967) +++ trunk/src/netlist_act.c (revision 4968) @@ -52,7 +52,7 @@ PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pin)) { int le, lp; Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4967) +++ trunk/src/obj_elem.c (revision 4968) @@ -86,13 +86,13 @@ free(textstring); } END_LOOP; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { free(pin->Name); free(pin->Number); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { free(pad->Name); free(pad->Number); @@ -194,7 +194,7 @@ arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness, 0, pcb_no_flags()); } END_LOOP; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { pcb_flag_t f = pcb_no_flags(); pcb_flag_add(f, PCB_FLAG_VIA); @@ -208,7 +208,7 @@ clayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]]; group = GetLayerGroupNumberByNumber(SWAP_IDENT ? component_silk_layer : solder_silk_layer); slayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]]; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { pcb_line_t *line; line = pcb_line_new(PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) ? slayer : clayer, @@ -270,7 +270,7 @@ PCB_PASTEBUFFER->Y, 0, 100, pcb_flag_make(SWAP_IDENT ? PCB_FLAG_ONSOLDER : PCB_FLAG_NO), pcb_false); if (!Element) return (pcb_false); - VIA_LOOP(Buffer->Data); + PCB_VIA_LOOP(Buffer->Data); { char num[8]; if (via->Mask < via->Thickness) @@ -414,7 +414,7 @@ pcb_line_bbox(line); } END_LOOP; - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { /* pre-delete the pins from the pin-tree before their coordinates change */ if (Data) @@ -424,7 +424,7 @@ pcb_pin_bbox(pin); } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { /* pre-delete the pads before their coordinates change */ if (Data) @@ -532,13 +532,13 @@ line->Point1.Y + dy, line->Point2.X + dx, line->Point2.Y + dy, line->Thickness); } END_LOOP; - PIN_LOOP(Src); + 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; - PAD_LOOP(Src); + PCB_PAD_LOOP(Src); { pcb_element_pad_new(Dest, pad->Point1.X + dx, pad->Point1.Y + dy, pad->Point2.X + dx, pad->Point2.Y + dy, pad->Thickness, @@ -673,7 +673,7 @@ line->Point2.Y = PCB_SWAP_Y(line->Point2.Y) + yoff; } END_LOOP; - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { RestoreToPolygon(Data, PCB_TYPE_PIN, Element, pin); pin->X = PCB_SWAP_X(pin->X); @@ -680,7 +680,7 @@ pin->Y = PCB_SWAP_Y(pin->Y) + yoff; } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { RestoreToPolygon(Data, PCB_TYPE_PAD, Element, pad); pad->Point1.X = PCB_SWAP_X(pad->Point1.X); @@ -765,7 +765,7 @@ } END_LOOP; *vbox = *box; - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { if (Data && Data->pin_tree) r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); @@ -785,7 +785,7 @@ PCB_MAKE_MAX(vbox->Y2, pin->Y + pin->Thickness / 2); } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { if (Data && Data->pad_tree) r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); @@ -808,7 +808,7 @@ /* now we set the PCB_FLAG_EDGE2 of the pad if Point2 * is closer to the outside edge than Point1 */ - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { if (pad->Point1.Y == pad->Point2.Y) { /* horizontal pad */ @@ -829,7 +829,7 @@ /* mark pins with component orientation */ if ((box->X2 - box->X1) > (box->Y2 - box->Y1)) { - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { PCB_FLAG_SET(PCB_FLAG_EDGE2, pin); } @@ -836,7 +836,7 @@ END_LOOP; } else { - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { PCB_FLAG_CLEAR(PCB_FLAG_EDGE2, pin); } @@ -905,12 +905,12 @@ void r_delete_element(pcb_data_t * data, pcb_element_t * element) { r_delete_entry(data->element_tree, (pcb_box_t *) element); - PIN_LOOP(element); + PCB_PIN_LOOP(element); { r_delete_entry(data->pin_tree, (pcb_box_t *) pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { r_delete_entry(data->pad_tree, (pcb_box_t *) pad); } @@ -940,7 +940,7 @@ pin2x = 0; pin2y = 0; - PIN_LOOP(e); + PCB_PIN_LOOP(e); { if (PCB_NSTRCMP(pin->Number, "1") == 0) { pin1x = pin->X; @@ -955,7 +955,7 @@ } END_LOOP; - PAD_LOOP(e); + PCB_PAD_LOOP(e); { if (PCB_NSTRCMP(pad->Number, "1") == 0) { pin1x = (pad->Point1.X + pad->Point2.X) / 2; @@ -1000,7 +1000,7 @@ pcb_line_move(line, DX, DY); } END_LOOP; - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { if (Data) { r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); @@ -1013,7 +1013,7 @@ } } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { if (Data) { r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); @@ -1078,7 +1078,7 @@ pcb_line_rotate90(line, X, Y, Number); } END_LOOP; - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { /* pre-delete the pins from the pin-tree before their coordinates change */ if (Data) @@ -1087,7 +1087,7 @@ ROTATE_PIN_LOWLEVEL(pin, X, Y, Number); } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { /* pre-delete the pads before their coordinates change */ if (Data) @@ -1123,12 +1123,12 @@ PCB_FLAG_CLEAR(ctx->buffer.extraflg, text); } END_LOOP; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { PCB_FLAG_CLEAR(PCB_FLAG_FOUND | ctx->buffer.extraflg, pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { PCB_FLAG_CLEAR(PCB_FLAG_FOUND | ctx->buffer.extraflg, pad); } @@ -1149,13 +1149,13 @@ elementlist_remove(element); elementlist_append(&ctx->buffer.dst->Element, element); - PIN_LOOP(element); + PCB_PIN_LOOP(element); { RestoreToPolygon(ctx->buffer.src, PCB_TYPE_PIN, element, pin); PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND, pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { RestoreToPolygon(ctx->buffer.src, PCB_TYPE_PAD, element, pad); PCB_FLAG_CLEAR(PCB_FLAG_WARN | PCB_FLAG_FOUND, pad); @@ -1165,12 +1165,12 @@ /* * Now clear the from the polygons in the destination */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { ClearFromPolygon(ctx->buffer.dst, PCB_TYPE_PIN, element, pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { ClearFromPolygon(ctx->buffer.dst, PCB_TYPE_PAD, element, pad); } @@ -1188,7 +1188,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pin->DrillingHole + ctx->chgsize.delta; if (value <= MAX_PINORVIASIZE && @@ -1222,7 +1222,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pin->DrillingHole + ctx->chgsize.delta; if (value <= MAX_PINORVIASIZE && value >= pin->DrillingHole + MIN_PINORVIACOPPER && value != pin->Thickness) { @@ -1254,7 +1254,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pin->Clearance + ctx->chgsize.delta; if (value <= MAX_PINORVIASIZE && @@ -1275,7 +1275,7 @@ } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pad->Clearance + ctx->chgsize.delta; if (value <= MAX_PINORVIASIZE && value >= MIN_PINORVIAHOLE && value != pad->Clearance) { @@ -1398,12 +1398,12 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { ans = ChangePinSquare(ctx, Element, pin); } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { ans = ChangePadSquare(ctx, Element, pad); } @@ -1418,12 +1418,12 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { ans = SetPinSquare(ctx, Element, pin); } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { ans = SetPadSquare(ctx, Element, pad); } @@ -1438,12 +1438,12 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { ans = ClrPinSquare(ctx, Element, pin); } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { ans = ClrPadSquare(ctx, Element, pad); } @@ -1458,7 +1458,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { ChangePinOctagon(ctx, Element, pin); result = Element; @@ -1474,7 +1474,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { SetPinOctagon(ctx, Element, pin); result = Element; @@ -1490,7 +1490,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Element)) return (NULL); - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { ClrPinOctagon(ctx, Element, pin); result = Element; @@ -1590,7 +1590,7 @@ if (ctx->remove.destroy_target->element_tree) r_delete_entry(ctx->remove.destroy_target->element_tree, (pcb_box_t *) Element); if (ctx->remove.destroy_target->pin_tree) { - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { r_delete_entry(ctx->remove.destroy_target->pin_tree, (pcb_box_t *) pin); } @@ -1597,7 +1597,7 @@ END_LOOP; } if (ctx->remove.destroy_target->pad_tree) { - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { r_delete_entry(ctx->remove.destroy_target->pad_tree, (pcb_box_t *) pad); } @@ -1696,13 +1696,13 @@ void draw_element_pins_and_pads(pcb_element_t * element) { - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (pcb_draw_doing_pinout || pcb_draw_doing_assy || PCB_FRONT(pad) || PCB->InvisibleObjectsOn) draw_pad(pad); } END_LOOP; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { draw_pin(pin, pcb_true); } @@ -1817,12 +1817,12 @@ void EraseElementPinsAndPads(pcb_element_t *Element) { - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { ErasePin(pin); } END_LOOP; - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { ErasePad(pad); } @@ -1867,13 +1867,13 @@ void DrawElementPinsAndPads(pcb_element_t *Element) { - PAD_LOOP(Element); + PCB_PAD_LOOP(Element); { if (pcb_draw_doing_pinout || pcb_draw_doing_assy || PCB_FRONT(pad) || PCB->InvisibleObjectsOn) DrawPad(pad); } END_LOOP; - PIN_LOOP(Element); + PCB_PIN_LOOP(Element); { DrawPin(pin); } Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 4967) +++ trunk/src/obj_pad.c (revision 4968) @@ -412,7 +412,7 @@ void DrawPaste(int side, const pcb_box_t * drawn_area) { gui->set_color(Output.fgGC, PCB->ElementColor); - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_ON_SIDE(pad, side) && !PCB_FLAG_TEST(PCB_FLAG_NOPASTE, pad) && pad->Mask > 0) { if (pad->Mask < pad->Thickness) Index: trunk/src/obj_pad.h =================================================================== --- trunk/src/obj_pad.h (revision 4967) +++ trunk/src/obj_pad.h (revision 4968) @@ -62,14 +62,14 @@ pcb_pad_bbox((__p__)); \ } while(0) -#define PAD_LOOP(element) do { \ +#define PCB_PAD_LOOP(element) do { \ pcb_pad_t *pad; \ gdl_iterator_t __it__; \ padlist_foreach(&(element)->Pad, &__it__, pad) { -#define ALLPAD_LOOP(top) \ +#define PCB_PAD_ALL_LOOP(top) \ PCB_ELEMENT_LOOP(top); \ - PAD_LOOP(element) + PCB_PAD_LOOP(element) #endif Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 4967) +++ trunk/src/obj_pinvia.c (revision 4968) @@ -90,7 +90,7 @@ pcb_pin_t *Via; if (!pcb_create_be_lenient) { - VIA_LOOP(Data); + PCB_VIA_LOOP(Data); { if (pcb_distance(X, Y, via->X, via->Y) <= via->DrillingHole / 2 + DrillingHole / 2) { pcb_message(PCB_MSG_DEFAULT, _("%m+Dropping via at %$mD because it's hole would overlap with the via " Index: trunk/src/obj_pinvia.h =================================================================== --- trunk/src/obj_pinvia.h (revision 4967) +++ trunk/src/obj_pinvia.h (revision 4968) @@ -72,18 +72,18 @@ #define pcb_pin_move(p,dx,dy) pcb_via_move(p, dx, dy) -#define VIA_LOOP(top) do { \ +#define PCB_VIA_LOOP(top) do { \ pcb_pin_t *via; \ gdl_iterator_t __it__; \ pinlist_foreach(&(top)->Via, &__it__, via) { -#define PIN_LOOP(element) do { \ +#define PCB_PIN_LOOP(element) do { \ pcb_pin_t *pin; \ gdl_iterator_t __it__; \ pinlist_foreach(&(element)->Pin, &__it__, pin) { -#define ALLPIN_LOOP(top) \ +#define PCB_PIN_ALL_LOOP(top) \ PCB_ELEMENT_LOOP(top); \ - PIN_LOOP(element) \ + PCB_PIN_LOOP(element) \ #endif Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 4967) +++ trunk/src/object_act.c (revision 4968) @@ -747,7 +747,7 @@ } } ENDALL_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_AUTO, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) { RemoveObject(PCB_TYPE_VIA, via, via, via); @@ -772,7 +772,7 @@ } ENDALL_LOOP; if (PCB->ViaOn) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAGS_TEST(PCB_FLAG_AUTO | PCB_FLAG_SELECTED, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) { @@ -850,7 +850,7 @@ SaveUndoSerialNumber(); PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (!PCB_FLAGS_TEST(flags, pin)) continue; @@ -860,7 +860,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (!PCB_FLAGS_TEST(flags, pad)) continue; @@ -872,7 +872,7 @@ END_LOOP; } END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (!PCB_FLAGS_TEST(flags, via)) continue; @@ -924,7 +924,7 @@ SaveUndoSerialNumber(); PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (!PCB_FLAGS_TEST(flags, pin)) continue; @@ -934,7 +934,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (!PCB_FLAGS_TEST(flags, pad)) continue; @@ -946,7 +946,7 @@ END_LOOP; } END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (!PCB_FLAGS_TEST(flags, via)) continue; Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 4967) +++ trunk/src/polygon.c (revision 4968) @@ -1524,12 +1524,12 @@ case PCB_TYPE_ELEMENT: { - PIN_LOOP((pcb_element_t *) ptr1); + PCB_PIN_LOOP((pcb_element_t *) ptr1); { PlowsPolygon(Data, PCB_TYPE_PIN, ptr1, pin, call_back); } END_LOOP; - PAD_LOOP((pcb_element_t *) ptr1); + PCB_PAD_LOOP((pcb_element_t *) ptr1); { PlowsPolygon(Data, PCB_TYPE_PAD, ptr1, pad, call_back); } Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 4967) +++ trunk/src/rats.c (revision 4968) @@ -203,13 +203,13 @@ Wantlist = (pcb_netlist_t *) calloc(1, sizeof(pcb_netlist_t)); if (Wantlist) { - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { pin->Spare = NULL; PCB_FLAG_CLEAR(PCB_FLAG_DRC, pin); } ENDALL_LOOP; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { pad->Spare = NULL; PCB_FLAG_CLEAR(PCB_FLAG_DRC, pad); @@ -272,12 +272,12 @@ END_LOOP; } /* clear all visit marks */ - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { PCB_FLAG_CLEAR(PCB_FLAG_DRC, pin); } ENDALL_LOOP; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { PCB_FLAG_CLEAR(PCB_FLAG_DRC, pad); } @@ -319,7 +319,7 @@ void **menu = GetPointerMemory(generic); *menu = theNet; - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { pcb_element_t *e = pin->Element; /* TODO: should be: !PCB_FLAG_TEST(PCB_FLAG_NONETLIST, (pcb_element_t *)pin->Element)*/ @@ -350,7 +350,7 @@ } } ENDALL_LOOP; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { pcb_element_t *e = pad->Element; /* TODO: should be: !PCB_FLAG_TEST(PCB_FLAG_NONETLIST, (pcb_element_t *)pad->Element)*/ @@ -460,7 +460,7 @@ } } ENDALL_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_DRC, via)) { conn = GetConnectionMemory(a); Index: trunk/src/rubberband.c =================================================================== --- trunk/src/rubberband.c (revision 4967) +++ trunk/src/rubberband.c (revision 4968) @@ -408,12 +408,12 @@ * and readability is more important then the few % * of failures that are immediately recognized */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { CheckPinForRubberbandConnection(pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { CheckPadForRubberbandConnection(pad); } @@ -455,12 +455,12 @@ { pcb_element_t *element = (pcb_element_t *) Ptr1; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { CheckPinForRat(pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { CheckPadForRat(pad); } Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 4967) +++ trunk/src/search.c (revision 4968) @@ -1200,7 +1200,7 @@ ENDALL_LOOP; } if (type == PCB_TYPE_VIA) { - VIA_LOOP(Base); + PCB_VIA_LOOP(Base); { if (via->ID == ID) { *Result1 = *Result2 = *Result3 = (void *) via; @@ -1273,7 +1273,7 @@ } END_LOOP; if (type == PCB_TYPE_PIN) - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (pin->ID == ID) { *Result1 = (void *) element; @@ -1283,7 +1283,7 @@ } END_LOOP; if (type == PCB_TYPE_PAD) - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (pad->ID == ID) { *Result1 = (void *) element; Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 4967) +++ trunk/src/select.c (revision 4968) @@ -56,13 +56,13 @@ void pcb_select_element(pcb_element_t *element, pcb_change_flag_t how, int redraw) { /* select all pins and names of the element */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { AddObjectToFlagUndoList(PCB_TYPE_PIN, element, pin, pin); PCB_FLAG_CHANGE(how, PCB_FLAG_SELECTED, pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { AddObjectToFlagUndoList(PCB_TYPE_PAD, element, pad, pad); PCB_FLAG_CHANGE(how, PCB_FLAG_SELECTED, pad); @@ -381,7 +381,7 @@ if ((PCB->PinOn || !Flag) && ELEMENT_NEAR_BOX(element, Box)) if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, element) != Flag) { append(PCB_TYPE_ELEMENT, element, element); - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pin) != Flag) { append(PCB_TYPE_PIN, element, pin); @@ -390,7 +390,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad) != Flag) { append(PCB_TYPE_PAD, element, pad); @@ -405,7 +405,7 @@ } } if ((PCB->PinOn || !Flag) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, element) && !gotElement) { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if ((VIA_OR_PIN_NEAR_BOX(pin, Box) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, pin) != Flag)) { @@ -415,7 +415,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PAD_NEAR_BOX(pad, Box) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad) != Flag @@ -432,7 +432,7 @@ END_LOOP; /* end with vias */ if (PCB->ViaOn || !Flag) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (VIA_OR_PIN_NEAR_BOX(via, Box) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via) @@ -651,7 +651,7 @@ if (type & PCB_TYPE_PIN && PCB->PinOn && F->Pin) PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pin)) { if (Reset) { @@ -669,7 +669,7 @@ if (type & PCB_TYPE_PAD && PCB->PinOn && F->Pad) PCB_ELEMENT_LOOP(PCB->Data); { - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad)) { if (Reset) { @@ -686,7 +686,7 @@ /* process vias */ if (type & PCB_TYPE_VIA && PCB->ViaOn && F->Via) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, via)) { if (Reset) { @@ -772,7 +772,7 @@ ENDALL_LOOP; if (PCB->PinOn && PCB->ElementOn) { - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, element) && PCB_FLAG_TEST(PCB_FLAG_FOUND, pin)) { AddObjectToFlagUndoList(PCB_TYPE_PIN, element, pin, pin); @@ -782,7 +782,7 @@ } } ENDALL_LOOP; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, element) && PCB_FLAG_TEST(PCB_FLAG_FOUND, pad)) { AddObjectToFlagUndoList(PCB_TYPE_PAD, element, pad, pad); @@ -795,7 +795,7 @@ } if (PCB->ViaOn) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) { AddObjectToFlagUndoList(PCB_TYPE_VIA, via, via, via); @@ -910,13 +910,13 @@ if (name && REGEXEC(name)) { AddObjectToFlagUndoList(PCB_TYPE_ELEMENT, element, element, element); PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, Flag, element); - PIN_LOOP(element); + PCB_PIN_LOOP(element); { AddObjectToFlagUndoList(PCB_TYPE_PIN, element, pin, pin); PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, Flag, pin); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { AddObjectToFlagUndoList(PCB_TYPE_PAD, element, pad, pad); PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, Flag, pad); @@ -936,7 +936,7 @@ } END_LOOP; if (PCB->PinOn && (Type & PCB_TYPE_PIN)) - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, element) && pin->Name && REGEXEC(pin->Name) @@ -949,7 +949,7 @@ } ENDALL_LOOP; if (PCB->PinOn && (Type & PCB_TYPE_PAD)) - ALLPAD_LOOP(PCB->Data); + 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) @@ -963,7 +963,7 @@ } ENDALL_LOOP; if (PCB->ViaOn && (Type & PCB_TYPE_VIA)) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, via) && via->Name && REGEXEC(via->Name) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, via) != Flag) { Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 4967) +++ trunk/src_plugins/autocrop/autocrop.c (revision 4968) @@ -143,7 +143,7 @@ AddObjectToMoveUndoList(PCB_TYPE_ELEMENT, NULL, NULL, element, dx, dy); } END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { MyMoveViaLowLevel(PCB->Data, via, dx, dy); AddObjectToMoveUndoList(PCB_TYPE_VIA, NULL, NULL, via, dx, dy); Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 4967) +++ trunk/src_plugins/autoplace/autoplace.c (revision 4968) @@ -382,7 +382,7 @@ box->Y1 = MAX_COORD; box->X2 = -MAX_COORD; box->Y2 = -MAX_COORD; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { thickness = pin->Thickness / 2; clearance = pin->Clearance * 2; @@ -390,7 +390,7 @@ pin->X - (thickness + clearance), pin->Y - (thickness + clearance), pin->X + (thickness + clearance), pin->Y + (thickness + clearance))} END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { thickness = pad->Thickness / 2; clearance = pad->Clearance * 2; @@ -407,7 +407,7 @@ /* add a box for each pin to the "opposite side": * surface mount components can't sit on top of pins */ if (!CostParameter.fast) - PIN_LOOP(element); + PCB_PIN_LOOP(element); { box = pcb_box_new(otherside); thickness = pin->Thickness / 2; Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4967) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4968) @@ -1041,7 +1041,7 @@ } /* add pins and pads of elements */ - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_DRC, pin)) PCB_FLAG_CLEAR(PCB_FLAG_DRC, pin); @@ -1049,7 +1049,7 @@ AddPin(layergroupboxes, pin, pcb_false, rd->styles[rd->max_styles]); } ENDALL_LOOP; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_DRC, pad)) PCB_FLAG_CLEAR(PCB_FLAG_DRC, pad); @@ -1058,7 +1058,7 @@ } ENDALL_LOOP; /* add all vias */ - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_DRC, via)) PCB_FLAG_CLEAR(PCB_FLAG_DRC, via); Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 4967) +++ trunk/src_plugins/boardflip/boardflip.c (revision 4968) @@ -109,7 +109,7 @@ END_LOOP; } END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { FLIP(via->Y); } @@ -138,12 +138,12 @@ NEG(arc->Delta); } END_LOOP; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { FLIP(pin->Y); } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { FLIP(pad->Point1.Y); FLIP(pad->Point2.Y); Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 4967) +++ trunk/src_plugins/djopt/djopt.c (revision 4968) @@ -121,13 +121,13 @@ { PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (pin == c->pin) return element->Name[1].TextString; } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (pad == c->pad) return element->Name[1].TextString; @@ -2433,7 +2433,7 @@ if (l->s->pad && l->s->pad == l->e->pad) continue; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { int layerflag = PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, element) ? LT_SOLDER : LT_COMPONENT; @@ -2564,13 +2564,13 @@ grok_layer_groups(); PCB_ELEMENT_LOOP(PCB->Data); - PIN_LOOP(element); + PCB_PIN_LOOP(element); { c = find_corner(pin->X, pin->Y, -1); c->pin = pin; } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { int layern = PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) ? solder_layer : component_layer; line_s *ls = (line_s *) malloc(sizeof(line_s)); @@ -2589,7 +2589,7 @@ } END_LOOP; END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); /* hace don't mess with vias that have thermals */ /* but then again don't bump into them if (!PCB_FLAG_TEST(ALLTHERMFLAGS, via)) Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 4967) +++ trunk/src_plugins/export_dsn/dsn.c (revision 4968) @@ -118,7 +118,7 @@ double sumx = 0.0, sumy = 0.0; int pin_cnt = 0; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { sumx += (double) pin->X; sumy += (double) pin->Y; @@ -126,7 +126,7 @@ } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { sumx += (pad->Point1.X + pad->Point2.X) / 2.0; sumy += (pad->Point1.Y + pad->Point2.Y) / 2.0; @@ -268,7 +268,7 @@ } END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { /* add mounting holes */ pcb_fprintf(fp, " (component %d\n", via->ID); pcb_fprintf(fp, " (place %d %.6mm %.6mm %s 0 (PN 0))\n", via->ID, via->X, (PCB->MaxHeight - via->Y), "front"); @@ -290,7 +290,7 @@ pcb_point_t centroid = get_centroid(element); fprintf(fp, " (image %ld\n", element->ID); /* map every element by ID */ /* loop thru pins and pads to add to image */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { pcb_coord_t ty; pcb_coord_t pinthickness; @@ -321,7 +321,7 @@ } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { pcb_coord_t xlen, ylen, xc, yc, p1y, p2y; pcb_coord_t lx, ly; /* store local coordinates for pins */ @@ -363,7 +363,7 @@ } END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { /* add mounting holes and vias */ fprintf(fp, " (image %ld\n", via->ID); /* map every via by ID */ /* for mounting holes, clearance is added to thickness for higher total clearance */ Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 4967) +++ trunk/src_plugins/export_dxf/dxf.c (revision 4968) @@ -4018,7 +4018,7 @@ * While we're at it, store the location of pin/pad #1 and #2 * if we can find them. */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { sumx += (double) pin->X; sumy += (double) pin->Y; @@ -4037,7 +4037,7 @@ } } END_LOOP; /* End of PIN_LOOP */ - PAD_LOOP(element); + PCB_PAD_LOOP(element); { sumx += (pad->Point1.X + pad->Point2.X) / 2.0; sumy += (pad->Point1.Y + pad->Point2.Y) / 2.0; Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4967) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4968) @@ -176,7 +176,7 @@ int padx, pady, tmp; PCB_ELEMENT_LOOP(PCB->Data); - PAD_LOOP(element); + PCB_PAD_LOOP(element); if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pad)) { fprintf(fd, "327%-17.14s", net); /* Net Name. */ fprintf(fd, "%-6.6s", element->Name[1].TextString); /* Refdes. */ @@ -236,7 +236,7 @@ } END_LOOP; /* Pad. */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pin)) { if (PCB_FLAG_TEST(PCB_FLAG_HOLE, pin)) { /* Non plated? */ fprintf(fd, "367%-17.14s", net); /* Net Name. */ @@ -312,7 +312,7 @@ END_LOOP; /* Pin. */ END_LOOP; /* Element */ - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); if (PCB_FLAG_TEST(PCB_FLAG_FOUND, via)) { if (PCB_FLAG_TEST(PCB_FLAG_HOLE, via)) { /* Non plated ? */ fprintf(fd, "367%-17.14s", net); /* Net Name. */ @@ -426,7 +426,7 @@ PCB_ELEMENT_LOOP(PCB->Data); - PIN_LOOP(element); + PCB_PIN_LOOP(element); if (!PCB_FLAG_TEST(PCB_FLAG_VISIT, pin)) { pcb_clear_flag_on_lines_polys(pcb_true, PCB_FLAG_FOUND); pcb_clear_flag_on_pins_vias_pads(pcb_true, PCB_FLAG_FOUND); @@ -444,7 +444,7 @@ IPCD356_WriteNet(fp, net); } END_LOOP; /* Pin. */ - PAD_LOOP(element); + PCB_PAD_LOOP(element); if (!PCB_FLAG_TEST(PCB_FLAG_VISIT, pad)) { pcb_clear_flag_on_lines_polys(pcb_true, PCB_FLAG_FOUND); pcb_clear_flag_on_pins_vias_pads(pcb_true, PCB_FLAG_FOUND); @@ -465,7 +465,7 @@ END_LOOP; /* Element. */ - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); if (!PCB_FLAG_TEST(PCB_FLAG_VISIT, via)) { pcb_clear_flag_on_lines_polys(pcb_true, PCB_FLAG_FOUND); pcb_clear_flag_on_pins_vias_pads(pcb_true, PCB_FLAG_FOUND); @@ -491,14 +491,14 @@ void ResetVisitPinsViasAndPads() { - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); PCB_FLAG_CLEAR(PCB_FLAG_VISIT, via); END_LOOP; /* Via. */ PCB_ELEMENT_LOOP(PCB->Data); - PIN_LOOP(element); + PCB_PIN_LOOP(element); PCB_FLAG_CLEAR(PCB_FLAG_VISIT, pin); END_LOOP; /* Pin. */ - PAD_LOOP(element); + PCB_PAD_LOOP(element); PCB_FLAG_CLEAR(PCB_FLAG_VISIT, pad); END_LOOP; /* Pad. */ END_LOOP; /* Element. */ Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 4967) +++ trunk/src_plugins/export_test/export_test.c (revision 4968) @@ -165,7 +165,7 @@ * we can find them */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { sumx += (double) pin->X; sumy += (double) pin->Y; @@ -185,7 +185,7 @@ } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { sumx += (pad->Point1.X + pad->Point2.X) / 2.0; sumy += (pad->Point1.Y + pad->Point2.Y) / 2.0; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 4967) +++ trunk/src_plugins/export_xy/xy.c (revision 4968) @@ -200,7 +200,7 @@ * we can find them */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { sumx += (double) pin->X; sumy += (double) pin->Y; @@ -217,7 +217,7 @@ } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { sumx += (pad->Point1.X + pad->Point2.X) / 2.0; sumy += (pad->Point1.Y + pad->Point2.Y) / 2.0; Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4967) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4968) @@ -91,7 +91,7 @@ int flag = PCB_FLAG_FOUND; int change = 0; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(flag, via)) { AddObjectToFlagUndoList(PCB_TYPE_VIA, via, via, via); @@ -103,7 +103,7 @@ END_LOOP; PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_FLAG_TEST(flag, pin)) { AddObjectToFlagUndoList(PCB_TYPE_PIN, element, pin, pin); @@ -113,7 +113,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(flag, pad)) { AddObjectToFlagUndoList(PCB_TYPE_PAD, element, pad, pad); Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4967) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4968) @@ -548,7 +548,7 @@ ENDALL_LOOP; if (PCB->ViaOn) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) RemoveObject(PCB_TYPE_VIA, via, via, via); Index: trunk/src_plugins/hid_gtk/gui-pinout-preview.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 4967) +++ trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 4968) @@ -69,13 +69,13 @@ * set all package lines/arcs to zero width */ CopyElementLowLevel(NULL, &pinout->element, element, FALSE, 0, 0); - PIN_LOOP(&pinout->element); + PCB_PIN_LOOP(&pinout->element); { PCB_FLAG_SET(PCB_FLAG_DISPLAYNAME, pin); } END_LOOP; - PAD_LOOP(&pinout->element); + PCB_PAD_LOOP(&pinout->element); { PCB_FLAG_SET(PCB_FLAG_DISPLAYNAME, pad); } Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 4967) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 4968) @@ -188,7 +188,7 @@ ENDALL_LOOP; if (PCB->ViaOn) - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, via) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, via)) RemoveObject(PCB_TYPE_VIA, via, via, via); @@ -214,7 +214,7 @@ { char *es = element->Name[NAMEONPCB_INDEX].TextString; if (es && strcmp(es, ename) == 0) { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (strcmp(pin->Number, pname) == 0) { pcb_crosshair_move_absolute(pin->X, pin->Y); @@ -223,7 +223,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (strcmp(pad->Number, pname) == 0) { int x = (pad->Point1.X + pad->Point2.X) / 2; Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 4967) +++ trunk/src_plugins/puller/puller.c (revision 4968) @@ -972,7 +972,7 @@ } END_LOOP; - ALLPIN_LOOP(PCB->Data); { + PCB_PIN_ALL_LOOP(PCB->Data); { pcb_box_t box; box.X1 = pin->X - pin->Thickness / 2; box.Y1 = pin->Y - pin->Thickness / 2; @@ -983,7 +983,7 @@ } ENDALL_LOOP; - VIA_LOOP(PCB->Data); { + PCB_VIA_LOOP(PCB->Data); { pcb_box_t box; box.X1 = via->X - via->Thickness / 2; box.Y1 = via->Y - via->Thickness / 2; @@ -994,7 +994,7 @@ } END_LOOP; - ALLPAD_LOOP(PCB->Data); { + PCB_PAD_ALL_LOOP(PCB->Data); { pcb_box_t box; box.X1 = MIN(pad->Point1.X, pad->Point2.X) - pad->Thickness / 2; box.Y1 = MIN(pad->Point1.Y, pad->Point2.Y) - pad->Thickness / 2; Index: trunk/src_plugins/report/drill.c =================================================================== --- trunk/src_plugins/report/drill.c (revision 4967) +++ trunk/src_plugins/report/drill.c (revision 4968) @@ -110,7 +110,7 @@ pcb_bool NewDrill; AllDrills = (DrillInfoTypePtr) calloc(1, sizeof(DrillInfoType)); - ALLPIN_LOOP(top); + PCB_PIN_ALL_LOOP(top); { if (!DrillFound) { DrillFound = pcb_true; @@ -151,7 +151,7 @@ } } ENDALL_LOOP; - VIA_LOOP(top); + PCB_VIA_LOOP(top); { if (!DrillFound) { DrillFound = pcb_true; Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4967) +++ trunk/src_plugins/report/report.c (revision 4968) @@ -181,7 +181,7 @@ Pin = (pcb_pin_t *) ptr2; element = (pcb_element_t *) ptr1; - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (pin == Pin) break; @@ -335,7 +335,7 @@ Pad = (pcb_pad_t *) ptr2; element = (pcb_element_t *) ptr1; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { { if (pad == Pad) @@ -481,13 +481,13 @@ gds_append_str(&list, "The following pins/pads are FOUND:\n"); PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { 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; - PAD_LOOP(element); + 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' : ' '); @@ -581,7 +581,7 @@ { char *es = element->Name[NAMEONPCB_INDEX].TextString; if (es && strcmp(es, ename) == 0) { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (strcmp(pin->Number, pname) == 0) { x = pin->X; @@ -591,7 +591,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (strcmp(pad->Number, pname) == 0) { x = (pad->Point1.X + pad->Point2.X) / 2; @@ -658,7 +658,7 @@ PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pin)) { int ni, nei; @@ -679,7 +679,7 @@ } } END_LOOP; - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, pad)) { int ni, nei; Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 4967) +++ trunk/src_plugins/teardrops/teardrops.c (revision 4968) @@ -282,19 +282,19 @@ { new_arcs = 0; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { check_via(via); } END_LOOP; - ALLPIN_LOOP(PCB->Data); + PCB_PIN_ALL_LOOP(PCB->Data); { check_pin(pin); } ENDALL_LOOP; - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { check_pad(pad); } Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 4967) +++ trunk/src_plugins/toporouter/toporouter.c (revision 4968) @@ -1816,7 +1816,7 @@ PCB_ELEMENT_LOOP(PCB->Data); { - PAD_LOOP(element); + PCB_PAD_LOOP(element); { if ((l - r->layers == back && PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad)) || (l - r->layers == front && !PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad))) { @@ -1979,7 +1979,7 @@ PCB_ELEMENT_LOOP(PCB->Data); { - PIN_LOOP(element); + PCB_PIN_LOOP(element); { t = (gdouble) pin->Thickness / 2.0f; @@ -2012,7 +2012,7 @@ } END_LOOP; - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { t = (gdouble) via->Thickness / 2.0f; @@ -8145,7 +8145,7 @@ dir = atoi(argv[0]); - ALLPAD_LOOP(PCB->Data); + PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, pad)) { pcb_pin_t *via; Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 4967) +++ trunk/src_plugins/vendordrill/vendor.c (revision 4968) @@ -316,7 +316,7 @@ if (n_vendor_drills > 0) { /* first all the vias */ - VIA_LOOP(PCB->Data); + PCB_VIA_LOOP(PCB->Data); { tot++; if (via->DrillingHole != vendorDrillMap(via->DrillingHole)) { @@ -347,7 +347,7 @@ */ if (vendorIsElementMappable(element)) { /* the element is ok to modify, so iterate over its pins */ - PIN_LOOP(element); + PCB_PIN_LOOP(element); { tot++; if (pin->DrillingHole != vendorDrillMap(pin->DrillingHole)) {