Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 7770) +++ trunk/src/buffer.c (revision 7771) @@ -590,7 +590,7 @@ pcb_layer_t *sourcelayer = &PCB_PASTEBUFFER->Data->Layer[i], *destlayer = LAYER_PTR(i); if (destlayer->On) { - changed = changed || (!PCB_LAYER_IS_EMPTY(sourcelayer)); + changed = changed || (!pcb_layer_is_empty_(PCB, sourcelayer)); PCB_LINE_LOOP(sourcelayer); { CopyLine(&ctx, destlayer, line); Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 7770) +++ trunk/src/data.c (revision 7771) @@ -261,7 +261,7 @@ hasNoObjects = (pinlist_length(&Data->Via) == 0); hasNoObjects &= (elementlist_length(&Data->Element) == 0); for (i = 0; i < pcb_max_layer; i++) - hasNoObjects = hasNoObjects && PCB_LAYER_IS_EMPTY(&(Data->Layer[i])); + hasNoObjects = hasNoObjects && pcb_layer_is_empty_(PCB, &(Data->Layer[i])); return (hasNoObjects); } Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 7770) +++ trunk/src/layer.h (revision 7771) @@ -157,9 +157,7 @@ /* Returns pcb_true if the given layer is empty (there are no objects on the layer) */ pcb_bool pcb_layer_is_empty_(pcb_board_t *pcb, pcb_layer_t *ly); pcb_bool pcb_layer_is_empty(pcb_board_t *pcb, pcb_layer_id_t ly); -#define PCB_LAYER_IS_EMPTY(layer) pcb_layer_is_empty_(PCB, (layer)) - /* call the gui to set a virtual layer or the UI layer group */ int pcb_layer_gui_set_vlayer(pcb_virtual_layer_t vid, int is_empty); int pcb_layer_gui_set_g_ui(pcb_layer_t *first, int is_empty); Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 7770) +++ trunk/src_plugins/export_gcode/gcode.c (revision 7771) @@ -263,7 +263,7 @@ continue; layer = &PCB->Data->Layer[n]; - if (!PCB_LAYER_IS_EMPTY(layer)) { + if (!pcb_layer_is_empty_(PCB, layer)) { /* layer isn't empty */ /* Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 7770) +++ trunk/src_plugins/export_nelma/nelma.c (revision 7771) @@ -495,7 +495,7 @@ continue; layer = &PCB->Data->Layer[n]; - if (!PCB_LAYER_IS_EMPTY(layer)) { + if (!pcb_layer_is_empty_(PCB, layer)) { /* layer isn't empty */ if ((flags & PCB_LYT_COPPER) || (flags & PCB_LYT_OUTLINE)) { /* layer is a copper layer */ Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 7770) +++ trunk/src_plugins/export_ps/eps.c (revision 7771) @@ -211,7 +211,7 @@ if (pcb_layer_flags(i) & PCB_LYT_SILK) continue; if (layer->On) - if (!PCB_LAYER_IS_EMPTY(layer)) + if (!pcb_layer_is_empty_(PCB, layer)) print_group[pcb_layer_get_group(PCB, i)] = 1; } Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 7770) +++ trunk/src_plugins/io_kicad/write.c (revision 7771) @@ -605,7 +605,7 @@ pcb_cardinal_t currentLayer = number; /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); @@ -647,7 +647,7 @@ int copperStartY; /* used for mapping geda copper arcs onto kicad copper lines */ /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); @@ -728,7 +728,7 @@ pcb_cardinal_t currentLayer = number; /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); @@ -1296,7 +1296,7 @@ pcb_cardinal_t currentLayer = number; /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { int localFlag = 0; polylist_foreach(&layer->Polygon, &it, polygon) { if (polygon->HoleIndexN == 0) { /* no holes defined within polygon, which we implement support for first */ Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 7770) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 7771) @@ -561,7 +561,7 @@ pcb_cardinal_t currentLayer = number; /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); @@ -605,7 +605,7 @@ int copperStartY; /* used for mapping geda copper arcs onto kicad copper lines */ /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); @@ -683,7 +683,7 @@ pcb_cardinal_t currentLayer = number; /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { /* fprintf(FP, "Layer(%i ", (int) Number + 1); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); @@ -1213,7 +1213,7 @@ pcb_cardinal_t currentLayer = number; /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { int localFlag = 0; polylist_foreach(&layer->Polygon, &it, polygon) { if (polygon->HoleIndexN == 0) { /* no holes defined within polygon, which we implement support for first */ Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 7770) +++ trunk/src_plugins/io_pcb/file.c (revision 7771) @@ -491,7 +491,7 @@ pcb_polygon_t *polygon; /* write information about non empty layers */ - if (!PCB_LAYER_IS_EMPTY(layer) || (layer->Name && *layer->Name)) { + if (!pcb_layer_is_empty_(PCB, layer) || (layer->Name && *layer->Name)) { fprintf(FP, "Layer(%i ", (int) Number + 1); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(layer->Name)); fputs(")\n(\n", FP);