Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 8318) +++ trunk/src/action_helper.c (revision 8319) @@ -766,8 +766,8 @@ pcb_crosshair.AttachedLine.Point1.Y, conf_core.design.via_thickness / 2) == PCB_TYPE_NONE - && (pcb_layer_flags(pcb_layer_id(PCB->Data, CURRENT)) & PCB_LYT_COPPER) - && (pcb_layer_flags(pcb_layer_id(PCB->Data, lastLayer)) & PCB_LYT_COPPER) + && (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, CURRENT)) & PCB_LYT_COPPER) + && (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, lastLayer)) & PCB_LYT_COPPER) && (via = pcb_via_new(PCB->Data, pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, @@ -823,7 +823,7 @@ } if (conf_core.editor.auto_drc - && (pcb_layer_flags(pcb_layer_id(PCB->Data, CURRENT)) & PCB_LYT_COPPER)) + && (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, CURRENT)) & PCB_LYT_COPPER)) maybe_found_flag = PCB_FLAG_FOUND; else maybe_found_flag = 0; @@ -851,8 +851,8 @@ isn't a pin already here */ if (PCB->ViaOn && pcb_layer_get_group_(CURRENT) != pcb_layer_get_group_(lastLayer) - && (pcb_layer_flags(pcb_layer_id(PCB->Data, CURRENT)) & PCB_LYT_COPPER) - && (pcb_layer_flags(pcb_layer_id(PCB->Data, lastLayer)) & PCB_LYT_COPPER) + && (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, CURRENT)) & PCB_LYT_COPPER) + && (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, lastLayer)) & PCB_LYT_COPPER) && pcb_search_obj_by_location(PCB_TYPEMASK_PIN, &ptr1, &ptr2, &ptr3, pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, @@ -949,7 +949,7 @@ pcb_text_t *text; int flag = PCB_FLAG_CLEARLINE; - if (pcb_layer_flags(INDEXOFCURRENT) & PCB_LYT_BOTTOM) + if (pcb_layer_flags(PCB, INDEXOFCURRENT) & PCB_LYT_BOTTOM) flag |= PCB_FLAG_ONSOLDER; if ((text = pcb_text_new(CURRENT, pcb_font(PCB, conf_core.design.text_font_id, 1), Note.X, Note.Y, 0, conf_core.design.text_scale, string, pcb_flag_make(flag))) != NULL) { Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 8318) +++ trunk/src/buffer.c (revision 8319) @@ -504,11 +504,11 @@ pcb_layer_id_t cnumber = pcb->LayerGroups.grp[cgroup].lid[k]; pcb_layer_id_t snumber = pcb->LayerGroups.grp[sgroup].lid[j]; - if ((pcb_layer_flags(snumber)) & PCB_LYT_SILK) + if ((pcb_layer_flags(pcb, snumber)) & PCB_LYT_SILK) continue; swap = Buffer->Data->Layer[snumber]; - while ((pcb_layer_flags(cnumber)) & PCB_LYT_SILK) { + while ((pcb_layer_flags(pcb, cnumber)) & PCB_LYT_SILK) { k++; cnumber = pcb->LayerGroups.grp[cgroup].lid[k]; } Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 8318) +++ trunk/src/draw.c (revision 8319) @@ -553,7 +553,7 @@ lid = pcb_layer_id(PCB->Data, Layer); if (lid >= 0) - lflg = pcb_layer_flags(lid); + lflg = pcb_layer_flags(PCB, lid); /* The implicit outline rectangle (or automatic outline rectanlge). We should check for pcb_gui->gui here, but it's kinda cool seeing the @@ -725,7 +725,7 @@ void pcb_hid_expose_layer(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *e) { pcb_hid_t *old_gui = expose_begin(hid); - unsigned long lflg = pcb_layer_flags(e->content.layer_id); + unsigned long lflg = pcb_layer_flags(PCB, e->content.layer_id); int fx, fy; if (lflg & PCB_LYT_LOGICAL) { Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 8318) +++ trunk/src/find_lookup.c (revision 8319) @@ -250,7 +250,7 @@ for(i = 0; i < pcb_max_layer; i++) { pcb_layer_t *layer = LAYER_PTR(i); - if (pcb_layer_flags(i) & PCB_LYT_COPPER) { + if (pcb_layer_flags(PCB, i) & PCB_LYT_COPPER) { if (linelist_length(&layer->Line)) { LineList[i].Size = linelist_length(&layer->Line); @@ -413,7 +413,7 @@ /* now all lines, arcs and polygons of the several layers */ for(layer = 0; layer < pcb_max_layer; layer++) { - if (!(pcb_layer_flags(layer) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) continue; if (LAYER_PTR(layer)->no_drc) continue; @@ -731,7 +731,7 @@ /* loop over all layers */ for(layer = 0; layer < pcb_max_layer; layer++) { - if (!(pcb_layer_flags(layer) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) continue; if (LAYER_PTR(layer)->no_drc) continue; Index: trunk/src/find_misc.c =================================================================== --- trunk/src/find_misc.c (revision 8318) +++ trunk/src/find_misc.c (revision 8319) @@ -230,7 +230,7 @@ pcb_layer_id_t laynum = pcb_layer_id(PCB->Data, (pcb_layer_t *) ptr1); /* don't mess with non-conducting objects! */ - if (!(pcb_layer_flags(laynum) & PCB_LYT_COPPER) || ((pcb_layer_t *) ptr1)->no_drc) + if (!(pcb_layer_flags(PCB, laynum) & PCB_LYT_COPPER) || ((pcb_layer_t *) ptr1)->no_drc) return; } } Index: trunk/src/hid_helper.c =================================================================== --- trunk/src/hid_helper.c (revision 8318) +++ trunk/src/hid_helper.c (revision 8319) @@ -42,7 +42,7 @@ const char *single_name, *res = NULL; if (flags == 0) - flags = pcb_layer_flags(lid); + flags = pcb_layer_flags(PCB, lid); if (flags & PCB_LYT_OUTLINE) { strcpy(dest, "outline"); Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 8318) +++ trunk/src/layer.c (revision 8319) @@ -109,7 +109,7 @@ if (lid < 0) return 1; - flags = pcb_layer_flags(lid); + flags = pcb_layer_flags(pcb, lid); if ((flags & PCB_LYT_COPPER) && (flags & PCB_LYT_TOP)) { /* if our layer is the top copper layer and we have an element pad on it, it's non-empty */ PCB_PAD_ALL_LOOP(pcb->Data); @@ -173,7 +173,7 @@ return paste_empty; } -unsigned int pcb_layer_flags(pcb_layer_id_t layer_idx) +unsigned int pcb_layer_flags(pcb_board_t *pcb, pcb_layer_id_t layer_idx) { pcb_layer_t *l; @@ -183,11 +183,11 @@ if ((layer_idx >= PCB_LAYER_VIRT_MIN) && (layer_idx <= PCB_LAYER_VIRT_MAX)) return pcb_virt_layers[layer_idx - PCB_LAYER_VIRT_MIN].type; - if ((layer_idx < 0) || (layer_idx >= PCB->Data->LayerN)) + if ((layer_idx < 0) || (layer_idx >= pcb->Data->LayerN)) return 0; - l = &PCB->Data->Layer[layer_idx]; - return pcb_layergrp_flags(PCB, l->grp); + l = &pcb->Data->Layer[layer_idx]; + return pcb_layergrp_flags(pcb, l->grp); } #define APPEND(n) \ @@ -228,7 +228,7 @@ APPEND_VIRT(v); for (n = 0; n < PCB_MAX_LAYER; n++) - if ((pcb_layer_flags(n) & mask) == mask) + if ((pcb_layer_flags(PCB, n) & mask) == mask) APPEND(n); if (mask == PCB_LYT_UI) @@ -248,7 +248,7 @@ APPEND_VIRT(v); for (n = 0; n < PCB_MAX_LAYER; n++) - if ((pcb_layer_flags(n) & mask)) + if ((pcb_layer_flags(PCB, n) & mask)) APPEND(n); if (mask & PCB_LYT_UI) Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 8318) +++ trunk/src/layer.h (revision 8319) @@ -172,7 +172,7 @@ /* returns a bitfield of pcb_layer_type_t; returns 0 if layer_idx is invalid. */ -unsigned int pcb_layer_flags(pcb_layer_id_t layer_idx); +unsigned int pcb_layer_flags(pcb_board_t *pcb, pcb_layer_id_t layer_idx); /* map bits of a layer type (call cb for each bit set); return number of bits found. */ Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 8318) +++ trunk/src/layer_grp.h (revision 8319) @@ -123,7 +123,7 @@ pcb_layer_t *layer; \ pcb_layer_id_t number; \ number = ((pcb_board_t *)(data->pcb))->LayerGroups.grp[(group)].lid[entry]; \ - if (!(pcb_layer_flags(number) & PCB_LYT_COPPER)) \ + if (!(pcb_layer_flags(PCB, number) & PCB_LYT_COPPER)) \ continue; \ layer = &data->Layer[number]; Index: trunk/src/layer_it.h =================================================================== --- trunk/src/layer_it.h (revision 8318) +++ trunk/src/layer_it.h (revision 8319) @@ -73,7 +73,7 @@ /* TODO: check group flags against mask here for more efficiency */ lid = g->lid[it->lidx]; it->lidx++; - hit = pcb_layer_flags(lid) & it->mask; + hit = pcb_layer_flags(PCB, lid) & it->mask; if (it->exact) { if (hit == it->mask) return lid; Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 8318) +++ trunk/src/layer_vis.c (revision 8319) @@ -99,7 +99,7 @@ printf("pcb_layervis_change_group_vis(Layer=%d, On=%d, ChangeStackOrder=%d)\n", Layer, On, ChangeStackOrder); /* special case: some layer groups are controlled by a config setting */ - flg = pcb_layer_flags(Layer); + flg = pcb_layer_flags(PCB, Layer); if (flg & PCB_LYT_MASK) conf_set_editor(show_mask, On); if (flg & PCB_LYT_PASTE) @@ -143,7 +143,7 @@ assert(PCB->Data->LayerN <= PCB_MAX_LAYER); for (i = 0; i < pcb_max_layer; i++) { - if (!(pcb_layer_flags(i) & PCB_LYT_SILK)) + if (!(pcb_layer_flags(PCB, i) & PCB_LYT_SILK)) pcb_layer_stack[i] = i; PCB->Data->Layer[i].On = pcb_true; } @@ -177,7 +177,7 @@ } for (i = 0; i < pcb_max_layer; i++) { - if (!(pcb_layer_flags(i) & PCB_LYT_SILK)) + if (!(pcb_layer_flags(PCB, i) & PCB_LYT_SILK)) SavedStack.pcb_layer_stack[i] = pcb_layer_stack[i]; SavedStack.LayerOn[i] = PCB->Data->Layer[i].On; } @@ -205,7 +205,7 @@ } for (i = 0; i < pcb_max_layer; i++) { - if (!(pcb_layer_flags(i) & PCB_LYT_SILK)) + if (!(pcb_layer_flags(PCB, i) & PCB_LYT_SILK)) pcb_layer_stack[i] = SavedStack.pcb_layer_stack[i]; PCB->Data->Layer[i].On = SavedStack.LayerOn[i]; } @@ -231,7 +231,7 @@ in = 1; for(n = 0; n < pcb_max_layer; n++) { - if (pcb_layer_flags(n) & PCB_LYT_MASK) { + if (pcb_layer_flags(PCB, n) & PCB_LYT_MASK) { if (PCB->Data->Layer[n].On != *cfg->val.boolean) { chg = 1; PCB->Data->Layer[n].On = *cfg->val.boolean; Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 8318) +++ trunk/src/obj_arc.h (revision 8319) @@ -105,7 +105,7 @@ pcb_layer_t *layer = (top)->Layer; \ for (l =0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ - if (!(pcb_layer_flags(l) & PCB_LYT_COPPER)) continue; \ + if (!(pcb_layer_flags(PCB, l) & PCB_LYT_COPPER)) continue; \ PCB_ARC_LOOP(layer) #define PCB_ARC_SILK_LOOP(top) do { \ @@ -113,7 +113,7 @@ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ - if (!(pcb_layer_flags(l) & PCB_LYT_SILK)) continue; \ + if (!(pcb_layer_flags(PCB, l) & PCB_LYT_SILK)) continue; \ PCB_ARC_LOOP(layer) #define PCB_ARC_VISIBLE_LOOP(top) do { \ Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 8318) +++ trunk/src/obj_line.c (revision 8319) @@ -541,7 +541,7 @@ pcb_draw(); if (!PCB->ViaOn || ctx->move.more_to_come || pcb_layer_get_group_(Layer) == - pcb_layer_get_group_(ctx->move.dst_layer) || !(pcb_layer_flags(pcb_layer_id(PCB->Data, Layer)) & PCB_LYT_COPPER) || !(pcb_layer_flags(pcb_layer_id(PCB->Data, ctx->move.dst_layer)) & PCB_LYT_COPPER)) + pcb_layer_get_group_(ctx->move.dst_layer) || !(pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, Layer)) & PCB_LYT_COPPER) || !(pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, ctx->move.dst_layer)) & PCB_LYT_COPPER)) return (newone); /* consider via at Point1 */ sb.X1 = newone->Point1.X - newone->Thickness / 2; Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 8318) +++ trunk/src/obj_line.h (revision 8319) @@ -108,7 +108,7 @@ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ - if (!(pcb_layer_flags(l) & PCB_LYT_COPPER)) continue; \ + if (!(pcb_layer_flags(PCB, l) & PCB_LYT_COPPER)) continue; \ PCB_LINE_LOOP(layer) #define PCB_LINE_SILK_LOOP(top) do { \ @@ -116,7 +116,7 @@ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ - if (!(pcb_layer_flags(l) & PCB_LYT_SILK)) continue; \ + if (!(pcb_layer_flags(PCB, l) & PCB_LYT_SILK)) continue; \ PCB_LINE_LOOP(layer) #define PCB_LINE_VISIBLE_LOOP(top) do { \ Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 8318) +++ trunk/src/obj_line_drcenf.c (revision 8319) @@ -489,7 +489,7 @@ if (pcb_gui->mod1_is_pressed() || pcb_gui->control_is_pressed() || PCB->RatDraw) return; - if (!(pcb_layer_flags(layer_idx) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layer_idx) & PCB_LYT_COPPER)) return; rs.X = r45.X = pcb_crosshair.X; Index: trunk/src/obj_poly.h =================================================================== --- trunk/src/obj_poly.h (revision 8318) +++ trunk/src/obj_poly.h (revision 8319) @@ -98,7 +98,7 @@ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ - if (!(pcb_layer_flags(l) & PCB_LYT_COPPER)) continue; \ + if (!(pcb_layer_flags(PCB, l) & PCB_LYT_COPPER)) continue; \ PCB_POLY_LOOP(layer) #define PCB_POLY_SILK_LOOP(top) do { \ @@ -106,7 +106,7 @@ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ - if (!(pcb_layer_flags(l) & PCB_LYT_SILK)) continue; \ + if (!(pcb_layer_flags(PCB, l) & PCB_LYT_SILK)) continue; \ PCB_POLY_LOOP(layer) #define PCB_POLY_VISIBLE_LOOP(top) do { \ Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 8318) +++ trunk/src/obj_text.c (revision 8319) @@ -388,7 +388,7 @@ textlist_remove(text); textlist_append(&Destination->Text, text); - if (pcb_layer_flags(pcb_layer_id(PCB->Data, Destination)) & PCB_LYT_BOTTOM) + if (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, Destination)) & PCB_LYT_BOTTOM) PCB_FLAG_SET(PCB_FLAG_ONSOLDER, text); /* get the text mirrored on display */ else PCB_FLAG_CLEAR(PCB_FLAG_ONSOLDER, text); Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 8318) +++ trunk/src/object_act.c (revision 8319) @@ -1082,7 +1082,7 @@ new_index = atoi(argv[1]); if (new_index < 0) { - if (pcb_layer_flags(old_index) & PCB_LYT_SILK) { + if (pcb_layer_flags(PCB, old_index) & PCB_LYT_SILK) { pcb_message(PCB_MSG_ERROR, "Can not remove silk layers\n"); return 1; } Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 8318) +++ trunk/src/polygon.c (revision 8319) @@ -1021,7 +1021,7 @@ pcb_layergrp_id_t group; unsigned int gflg; - if (!(pcb_layer_flags(pcb_layer_id(Data, Layer)) & PCB_LYT_COPPER)) { + if (!(pcb_layer_flags(PCB, pcb_layer_id(Data, Layer)) & PCB_LYT_COPPER)) { polygon->NoHolesValid = 0; return 0; } @@ -1503,7 +1503,7 @@ if (type == PCB_TYPE_PIN || ptr1 == ptr2 || ptr1 == NULL) { LAYER_LOOP(Data, pcb_max_layer); { - if (!(pcb_layer_flags(pcb_layer_id(Data, layer)) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, pcb_layer_id(Data, layer)) & PCB_LYT_COPPER)) continue; info.layer = layer; pcb_r_search(layer->polygon_tree, &sb, NULL, plow_callback, &info, &seen); @@ -1528,7 +1528,7 @@ if (!PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, (pcb_line_t *) ptr2)) return 0; /* non-copper (e.g. silk, outline) doesn't plow */ - if (!(pcb_layer_flags(pcb_layer_id(Data, (pcb_layer_t *) ptr1) & PCB_LYT_COPPER))) + if (!(pcb_layer_flags(PCB, pcb_layer_id(Data, (pcb_layer_t *) ptr1) & PCB_LYT_COPPER))) return 0; PCB_COPPER_GROUP_LOOP(Data, pcb_layer_get_group(PCB, pcb_layer_id(Data, ((pcb_layer_t *) ptr1)))); { Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 8318) +++ trunk/src/search.c (revision 8319) @@ -1092,7 +1092,7 @@ } for (i = -1; i < pcb_max_layer + 1; i++) { - if (pcb_layer_flags(i) & PCB_LYT_SILK) /* special order: silks are i=-1 and i=max+1, if we meet them elsewhere, skip */ + if (pcb_layer_flags(PCB, i) & PCB_LYT_SILK) /* special order: silks are i=-1 and i=max+1, if we meet them elsewhere, skip */ continue; if (i < 0) SearchLayer = &PCB->Data->SILKLAYER; Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 8318) +++ trunk/src/select.c (revision 8319) @@ -298,7 +298,7 @@ /* check layers */ LAYER_LOOP(pcb->Data, pcb_max_layer); { - unsigned int lflg = pcb_layer_flags(n); + unsigned int lflg = pcb_layer_flags(pcb, n); if ((lflg & PCB_LYT_SILK) && (PCB_LAYERFLG_ON_VISIBLE_SIDE(lflg))) { if (!(pcb->ElementOn || !Flag)) Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 8318) +++ trunk/src_plugins/autoroute/autoroute.c (revision 8319) @@ -862,7 +862,7 @@ for (i = 0; i < PCB->LayerGroups.grp[group].len; i++) { pcb_layer_id_t lid = PCB->LayerGroups.grp[group].lid[i]; /* layer must be 1) copper and 2) on */ - if ((pcb_layer_flags(lid) & PCB_LYT_COPPER) && PCB->Data->Layer[lid].On) { + if ((pcb_layer_flags(PCB, lid) & PCB_LYT_COPPER) && PCB->Data->Layer[lid].On) { routing_layers++; is_layer_group_active[group] = pcb_true; break; @@ -1074,7 +1074,7 @@ for (i = 0; i < pcb_max_layer; i++) { pcb_layergrp_id_t layergroup; - if (!(pcb_layer_flags(i) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, i) & PCB_LYT_COPPER)) continue; layergroup = pcb_layer_get_group(PCB, i); Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 8318) +++ trunk/src_plugins/diag/diag.c (revision 8319) @@ -156,7 +156,7 @@ for(n = 0; n < used; n++) { pcb_layer_id_t layer_id = arr[n]; pcb_layergrp_id_t grp = pcb_layer_get_group(PCB, layer_id); - printf(" [%lx] %04x group=%ld %s\n", layer_id, pcb_layer_flags(layer_id), grp, pcb_layer_name(layer_id)); + printf(" [%lx] %04x group=%ld %s\n", layer_id, pcb_layer_flags(PCB, layer_id), grp, pcb_layer_name(layer_id)); } /* query by logical layer: any bottom copper */ Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 8318) +++ trunk/src_plugins/djopt/djopt.c (revision 8319) @@ -469,7 +469,7 @@ { line_s *ls; - if (!(pcb_layer_flags(layer) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) dj_abort("layer %d\n", layer); if (example == NULL) @@ -1738,7 +1738,7 @@ directions[c->lines[i]->layer] |= o; } for (o = 0, i = 0; i < pcb_max_layer; i++) { - if (!(pcb_layer_flags(i) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, i) & PCB_LYT_COPPER)) continue; if (counts[i] == 1) { o = directions[i]; @@ -1758,7 +1758,7 @@ continue; } for (i = 0; i < pcb_max_layer; i++) { - if (!(pcb_layer_flags(i) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, i) & PCB_LYT_COPPER)) continue; if (counts[i] && directions[i] != o && directions[i] != oboth) goto vianudge_continue; @@ -2297,7 +2297,7 @@ dprintf("%s x %#mS-%#mS y %#mS-%#mS\n", corner_name(c), left, right, bottom, top); for (l = 0; l <= pcb_max_layer; l++) { - if (!(pcb_layer_flags(l) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, l) & PCB_LYT_COPPER)) continue; best_dist[l] = close * 2; best_c[l] = 0; @@ -2481,7 +2481,7 @@ for (i = 0; i < pcb_max_group(PCB); i++) { f = 0; for (j = 0; j < l->grp[i].len; j++) { - unsigned int lflg = pcb_layer_flags(l->grp[i].lid[j]); + unsigned int lflg = pcb_layer_flags(PCB, l->grp[i].lid[j]); if (lflg & PCB_LYT_BOTTOM) f |= LT_SOLDER; if (lflg & PCB_LYT_TOP) @@ -2619,7 +2619,7 @@ for (layn = 0; layn < pcb_max_layer; layn++) { pcb_layer_t *layer = LAYER_PTR(layn); - if (!(pcb_layer_flags(layn) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layn) & PCB_LYT_COPPER)) continue; PCB_LINE_LOOP(layer); Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 8318) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 8319) @@ -486,7 +486,7 @@ pcb_layer_group_t *grp; unsigned int tflg; - tflg = pcb_layer_flags(lid); + tflg = pcb_layer_flags(PCB, lid); grp = pcb_get_layergrp(PCB, pcb_layer_get_group(PCB, lid)); if (grp == NULL) { Index: trunk/src_plugins/draw_fab/draw_fab.c =================================================================== --- trunk/src_plugins/draw_fab/draw_fab.c (revision 8318) +++ trunk/src_plugins/draw_fab/draw_fab.c (revision 8319) @@ -245,7 +245,7 @@ yoff = -TEXT_LINE; for (found = 0, i = 0; i < pcb_max_layer; i++) { pcb_layer_t *l = LAYER_PTR(i); - if ((pcb_layer_flags(i) & PCB_LYT_OUTLINE) && (linelist_length(&l->Line) || arclist_length(&l->Arc))) { + if ((pcb_layer_flags(PCB, i) & PCB_LYT_OUTLINE) && (linelist_length(&l->Line) || arclist_length(&l->Arc))) { found = 1; break; } Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 8318) +++ trunk/src_plugins/export_bboard/bboard.c (revision 8319) @@ -529,7 +529,7 @@ /* draw all wires from all valid layers */ for (i = pcb_max_layer; i >= 0; i--) { - unsigned int flg = pcb_layer_flags(i); + unsigned int flg = pcb_layer_flags(PCB, i); if (flg & PCB_LYT_SILK) continue; if (bboard_validate_layer(flg, pcb_layer_get_group(PCB, i), options[HA_skipsolder].int_value)) { Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 8318) +++ trunk/src_plugins/export_dsn/dsn.c (revision 8319) @@ -221,7 +221,7 @@ pcb_layer_t *layer = iter->data; char *layeropts = pcb_strdup("(type signal)"); - if (!(pcb_layer_flags(pcb_layer_id(PCB->Data, layer)) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, layer)) & PCB_LYT_COPPER)) continue; /* see if layer has same name as a net and make it a power layer */ Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 8318) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 8319) @@ -197,7 +197,7 @@ fidoly_next = 3; for(lid = 0; lid < pcb_max_layer; lid++) { pcb_layer_t *ly = PCB->Data->Layer+lid; - unsigned int lflg = pcb_layer_flags(lid); + unsigned int lflg = pcb_layer_flags(PCB, lid); int fidoly = layer_map(lflg, &fidoly_next, &layer_warned, ly->Name); if (fidoly < 0) Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 8318) +++ trunk/src_plugins/export_gcode/gcode.c (revision 8319) @@ -258,7 +258,7 @@ memset(gcode_export_group, 0, sizeof(gcode_export_group)); for (n = 0; n < pcb_max_layer; n++) { - unsigned int flags = pcb_layer_flags(n); + unsigned int flags = pcb_layer_flags(PCB, n); if (flags & PCB_LYT_SILK) continue; layer = &PCB->Data->Layer[n]; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 8318) +++ trunk/src_plugins/export_gerber/gerber.c (revision 8319) @@ -557,7 +557,7 @@ outline_layer = NULL; for (i = 0; i < pcb_max_layer; i++) - if (pcb_layer_flags(i) & PCB_LYT_OUTLINE) + if (pcb_layer_flags(PCB, i) & PCB_LYT_OUTLINE) outline_layer = PCB->Data->Layer + i; i = strlen(fnbase); Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 8318) +++ trunk/src_plugins/export_nelma/nelma.c (revision 8319) @@ -490,7 +490,7 @@ memset(nelma_export_group, 0, sizeof(nelma_export_group)); for (n = 0; n < pcb_max_layer; n++) { - unsigned int flags = pcb_layer_flags(n); + unsigned int flags = pcb_layer_flags(PCB, n); if (flags & PCB_LYT_SILK) continue; layer = &PCB->Data->Layer[n]; Index: trunk/src_plugins/export_openscad/scad.c =================================================================== --- trunk/src_plugins/export_openscad/scad.c (revision 8318) +++ trunk/src_plugins/export_openscad/scad.c (revision 8319) @@ -545,7 +545,7 @@ group_data[gtop].component = 1; for (i = 0; i < pcb_max_layer; i++) { - if (pcb_layer_flags(i) & PCB_LYT_SILK) + if (pcb_layer_flags(PCB, i) & PCB_LYT_SILK) continue; layer = PCB->Data->Layer + i; if (!pcb_layer_is_empty_(PCB, layer)) Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 8318) +++ trunk/src_plugins/export_ps/eps.c (revision 8319) @@ -208,7 +208,7 @@ /* Figure out which layers actually have stuff on them. */ for (i = 0; i < pcb_max_layer; i++) { pcb_layer_t *layer = PCB->Data->Layer + i; - if (pcb_layer_flags(i) & PCB_LYT_SILK) + if (pcb_layer_flags(PCB, i) & PCB_LYT_SILK) continue; if (layer->On) if (!pcb_layer_is_empty_(PCB, layer)) @@ -239,7 +239,7 @@ /* Now, for each group we're printing, mark its layers for printing. */ for (i = 0; i < pcb_max_layer; i++) { - if (pcb_layer_flags(i) & PCB_LYT_SILK) + if (pcb_layer_flags(PCB, i) & PCB_LYT_SILK) continue; if (print_group[pcb_layer_get_group(PCB, i)]) print_layer[i] = 1; Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 8318) +++ trunk/src_plugins/export_stat/stat.c (revision 8319) @@ -172,7 +172,7 @@ for(lid = 0; lid < pcb_max_layer; lid++) { pcb_layer_t *l = PCB->Data->Layer+lid; int empty = pcb_layer_is_empty_(PCB, l); - unsigned int lflg = pcb_layer_flags(lid); + unsigned int lflg = pcb_layer_flags(PCB, lid); lgid = pcb_layer_get_group(PCB, lid); lgs = lgss + lgid; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 8318) +++ trunk/src_plugins/hid_lesstif/main.c (revision 8319) @@ -566,7 +566,7 @@ *c = PCB->LayerGroups.grp[g].lid[0]; for (i = 0; i < PCB->LayerGroups.grp[g].len; i++) { l = PCB->LayerGroups.grp[g].lid[i]; - if (l >= 0 && l < pcb_max_layer && (!(pcb_layer_flags(l) & PCB_LYT_SILK))) { + if (l >= 0 && l < pcb_max_layer && (!(pcb_layer_flags(PCB, l) & PCB_LYT_SILK))) { *c = l; if (PCB->Data->Layer[l].On) return 1; Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 8318) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 8319) @@ -169,7 +169,7 @@ } XtSetValues(lb->w[i], stdarg_args, stdarg_n); - if ((i >= pcb_max_layer && i < PCB_MAX_LAYER) || (pcb_layer_flags(i) & PCB_LYT_SILK)) + if ((i >= pcb_max_layer && i < PCB_MAX_LAYER) || (pcb_layer_flags(PCB, i) & PCB_LYT_SILK)) XtUnmanageChild(lb->w[i]); else XtManageChild(lb->w[i]); @@ -252,12 +252,12 @@ } show_one_layer_button(layer, set); - if ((layer < pcb_max_layer) && (!(pcb_layer_flags(layer) & PCB_LYT_SILK))) { + if ((layer < pcb_max_layer) && (!(pcb_layer_flags(PCB, layer) & PCB_LYT_SILK))) { int i; pcb_layergrp_id_t group = pcb_layer_get_group(PCB, layer); for (i = 0; i < PCB->LayerGroups.grp[group].len; i++) { l = PCB->LayerGroups.grp[group].lid[i]; - if (l != layer && (!(pcb_layer_flags(l) & PCB_LYT_SILK))) { + if (l != layer && (!(pcb_layer_flags(PCB, l) & PCB_LYT_SILK))) { show_one_layer_button(l, set); PCB->Data->Layer[l].On = set; } @@ -272,7 +272,7 @@ const char *name; PCB->RatDraw = (layer == LB_RATS); PCB->SilkActive = (layer == LB_SILK); - if ((layer < pcb_max_layer) && (!(pcb_layer_flags(layer) & PCB_LYT_SILK))) + if ((layer < pcb_max_layer) && (!(pcb_layer_flags(PCB, layer) & PCB_LYT_SILK))) pcb_layervis_change_group_vis(layer, 1, 1); for (l = 0; l < num_layer_buttons; l++) { LayerButtons *lb = layer_button_list + l; Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 8318) +++ trunk/src_plugins/hid_remote/remote.c (revision 8319) @@ -81,7 +81,7 @@ pcb_layergrp_id_t gid = pcb_layer_get_group(PCB, layer_id); name = pcb_layer_name(layer_id); if ((gid < 0) && (name != NULL)) { - pcb_remote_new_layer_group(name, layer_id, pcb_layer_flags(layer_id)); + pcb_remote_new_layer_group(name, layer_id, pcb_layer_flags(PCB, layer_id)); pcb_remote_new_layer(name, layer_id, layer_id); } } Index: trunk/src_plugins/import_mucs/mucs.c =================================================================== --- trunk/src_plugins/import_mucs/mucs.c (revision 8318) +++ trunk/src_plugins/import_mucs/mucs.c (revision 8319) @@ -59,7 +59,7 @@ pcb_coord_t x1, y1, x2, y2, r; fname = argc ? argv[0] : 0; - if (!(pcb_layer_flags(INDEXOFCURRENT) & PCB_LYT_COPPER)) { + if (!(pcb_layer_flags(PCB, INDEXOFCURRENT) & PCB_LYT_COPPER)) { pcb_message(PCB_MSG_ERROR, "The currently active layer is not a copper layer.\n"); } Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 8318) +++ trunk/src_plugins/io_hyp/parser.c (revision 8319) @@ -911,7 +911,7 @@ pcb_bool_t hyp_is_bottom_layer(char *layer_name) { - return ((layer_name != NULL) && (pcb_layer_flags(pcb_layer_by_name(layer_name)) & PCB_LYT_BOTTOM)); + return ((layer_name != NULL) && (pcb_layer_flags(PCB, pcb_layer_by_name(layer_name)) & PCB_LYT_BOTTOM)); } /* Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 8318) +++ trunk/src_plugins/io_kicad/read.c (revision 8319) @@ -237,7 +237,7 @@ PCBLayer = kicad_get_layeridx(st, n->children->str); if (PCBLayer < 0) { return -1; - } else if (pcb_layer_flags(PCBLayer) & PCB_LYT_BOTTOM) { + } else if (pcb_layer_flags(PCB, PCBLayer) & PCB_LYT_BOTTOM) { Flags = pcb_flag_make(PCB_FLAG_ONSOLDER); } } else { @@ -1105,7 +1105,7 @@ moduleLayer = PCBLayer; if (PCBLayer < 0) { return -1; - } else if (pcb_layer_flags(PCBLayer) & PCB_LYT_BOTTOM) { + } else if (pcb_layer_flags(PCB, PCBLayer) & PCB_LYT_BOTTOM) { Flags = pcb_flag_make(PCB_FLAG_ONSOLDER); TextFlags = pcb_flag_make(PCB_FLAG_ONSOLDER); moduleOnTop = 0; @@ -1274,7 +1274,7 @@ pcb_printf("\ttext layer not defined for module text, default being used.\n"); Flags = pcb_flag_make(0); /*return -1;*/ - } else if (pcb_layer_flags(PCBLayer) & PCB_LYT_BOTTOM) { + } else if (pcb_layer_flags(PCB, PCBLayer) & PCB_LYT_BOTTOM) { Flags = pcb_flag_make(PCB_FLAG_ONSOLDER); } } else { @@ -1527,7 +1527,7 @@ } } else if (PCBLayer < -1) { printf("\tUnimplemented layer definition: %s\n", l->str); - } else if (pcb_layer_flags(PCBLayer) & PCB_LYT_BOTTOM) { + } else if (pcb_layer_flags(PCB, PCBLayer) & PCB_LYT_BOTTOM) { kicadLayer = 0; padLayerDefCount++; } else if (padLayerDefCount) { Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 8318) +++ trunk/src_plugins/io_pcb/file.c (revision 8319) @@ -482,7 +482,7 @@ */ static const char *layer_name_hack(pcb_layer_t *layer, const char *name) { - unsigned long lflg = pcb_layer_flags(pcb_layer_id(PCB->Data, layer)); + unsigned long lflg = pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, layer)); /* The old PCB format encodes some properties in layer names - have to alter the real layer name before save to get the same effect */ if (lflg & PCB_LYT_OUTLINE) { Index: trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 8318) +++ trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 8319) @@ -59,7 +59,7 @@ return NULL; /* don't mess with silk objects! */ - if ((type & PCB_SILK_TYPE) && (pcb_layer_flags(pcb_layer_id(PCB->Data, (pcb_layer_t *) ptr1)) & PCB_LYT_SILK)) + if ((type & PCB_SILK_TYPE) && (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, (pcb_layer_t *) ptr1)) & PCB_LYT_SILK)) return NULL; if (type == PCB_TYPE_PIN || type == PCB_TYPE_PAD) Index: trunk/src_plugins/lib_gtk_common/bu_layer_selector.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_layer_selector.c (revision 8318) +++ trunk/src_plugins/lib_gtk_common/bu_layer_selector.c (revision 8319) @@ -281,7 +281,7 @@ gboolean active = TRUE; for (i = 0; i < pcb_max_layer; ++i) { - if (pcb_layer_flags(i) & PCB_LYT_SILK) + if (pcb_layer_flags(PCB, i) & PCB_LYT_SILK) continue; /* silks have a special, common button */ layer_process(&color_string, &text, &active, i); pcb_gtk_layer_selector_add_layer(GHID_LAYER_SELECTOR(layersel), i, text, color_string, active, TRUE); @@ -392,7 +392,7 @@ /*! \brief callback for pcb_gtk_layer_selector_delete_layers */ gboolean get_layer_delete(gint layer) { - if (pcb_layer_flags(layer) & PCB_LYT_SILK) + if (pcb_layer_flags(PCB, layer) & PCB_LYT_SILK) return 1; return layer >= pcb_max_layer; } Index: trunk/src_plugins/lib_gtk_config/gui-config.c =================================================================== --- trunk/src_plugins/lib_gtk_config/gui-config.c (revision 8318) +++ trunk/src_plugins/lib_gtk_config/gui-config.c (revision 8319) @@ -1309,9 +1309,9 @@ continue; for (entry = 0; entry < lg->grp[group].len; entry++) { layer = lg->grp[group].lid[entry]; - if ((pcb_layer_flags(layer) & PCB_LYT_TOP) && (pcb_layer_flags(layer) & PCB_LYT_COPPER)) + if ((pcb_layer_flags(PCB, layer) & PCB_LYT_TOP) && (pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) string = g_string_append(string, "c"); - else if ((pcb_layer_flags(layer) & PCB_LYT_BOTTOM) && (pcb_layer_flags(layer) & PCB_LYT_COPPER)) + else if ((pcb_layer_flags(PCB, layer) & PCB_LYT_BOTTOM) && (pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) string = g_string_append(string, "s"); else g_string_append_printf(string, "%ld", layer + 1); Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 8318) +++ trunk/src_plugins/query/query_access.c (revision 8319) @@ -241,8 +241,8 @@ switch(fh1) { case query_fields_name: PCB_QRY_RET_STR(res, l->Name); case query_fields_visible: PCB_QRY_RET_INT(res, l->On); - case query_fields_position: PCB_QRY_RET_INT(res, pcb_layer_flags(pcb_layer_id(PCB->Data, l)) & PCB_LYT_ANYWHERE); - case query_fields_type: PCB_QRY_RET_INT(res, pcb_layer_flags(pcb_layer_id(PCB->Data, l)) & PCB_LYT_ANYTHING); + case query_fields_position: PCB_QRY_RET_INT(res, pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, l)) & PCB_LYT_ANYWHERE); + case query_fields_type: PCB_QRY_RET_INT(res, pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, l)) & PCB_LYT_ANYTHING); default:; } Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 8318) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 8319) @@ -383,7 +383,7 @@ } for (n = 0; n < pcb_max_layer; n++) { - if (pcb_layer_flags(n) & PCB_LYT_COPPER) { + if (pcb_layer_flags(PCB, n) & PCB_LYT_COPPER) { info.layer = LAYER_PTR(n); pcb_r_search(info.layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); } @@ -575,7 +575,7 @@ { pcb_layer_t *layer = (pcb_layer_t *) Ptr1; pcb_line_t *line = (pcb_line_t *) Ptr2; - if (pcb_layer_flags(pcb_layer_id(PCB->Data, layer)) & PCB_LYT_COPPER) { + if (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, layer)) & PCB_LYT_COPPER) { CheckLinePointForRubberbandConnection(rbnd, layer, line, &line->Point1, pcb_false); CheckLinePointForRubberbandConnection(rbnd, layer, line, &line->Point2, pcb_false); } @@ -583,17 +583,17 @@ } case PCB_TYPE_LINE_POINT: - if (pcb_layer_flags(pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) + if (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) CheckLinePointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (pcb_point_t *) Ptr3, pcb_true); break; case PCB_TYPE_ARC_POINT: - if (pcb_layer_flags(pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) + if (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) CheckArcPointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, (int *) Ptr3, pcb_true); break; case PCB_TYPE_ARC: - if (pcb_layer_flags(pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) + if (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) CheckArcForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, pcb_true); break; @@ -602,7 +602,7 @@ break; case PCB_TYPE_POLYGON: - if (pcb_layer_flags(pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) + if (pcb_layer_flags(PCB, pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) CheckPolygonForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_polygon_t *) Ptr2); break; } Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 8318) +++ trunk/src_plugins/teardrops/teardrops.c (revision 8319) @@ -216,7 +216,7 @@ for (layer = 0; layer < pcb_max_layer; layer++) { pcb_layer_t *l = &(PCB->Data->Layer[layer]); - if (!(pcb_layer_flags(layer) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) continue; pcb_r_search(l->line_tree, &spot, NULL, check_line_callback, l, NULL); } @@ -240,7 +240,7 @@ for (layer = 0; layer < pcb_max_layer; layer++) { pcb_layer_t *l = &(PCB->Data->Layer[layer]); - if (!(pcb_layer_flags(layer) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) continue; pcb_r_search(l->line_tree, &spot, NULL, check_line_callback, l, NULL); } @@ -278,7 +278,7 @@ for (layer = 0; layer < pcb_max_layer; layer++) { pcb_layer_t *l = &(PCB->Data->Layer[layer]); - if (!(pcb_layer_flags(layer) & PCB_LYT_COPPER)) + if (!(pcb_layer_flags(PCB, layer) & PCB_LYT_COPPER)) continue; pcb_r_search(l->line_tree, &(pad->BoundingBox), NULL, check_line_callback, l, NULL); }