Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 7743) +++ trunk/src/layer_grp.c (revision 7744) @@ -239,8 +239,9 @@ return stack->grp+where+1; } -static pcb_layer_group_t *pcb_get_grp_new_intern_(pcb_board_t *pcb, pcb_layer_stack_t *stack, int omit_substrate) +static pcb_layer_group_t *pcb_get_grp_new_intern_(pcb_board_t *pcb, int omit_substrate) { + pcb_layer_stack_t *stack = &pcb->LayerGroups; int bl, n; if (stack->len+2 >= PCB_MAX_LAYERGRP) @@ -270,8 +271,9 @@ return NULL; } -pcb_layer_group_t *pcb_get_grp_new_intern(pcb_board_t *pcb, pcb_layer_stack_t *stack, int intern_id) +pcb_layer_group_t *pcb_get_grp_new_intern(pcb_board_t *pcb, int intern_id) { + pcb_layer_stack_t *stack = &pcb->LayerGroups; pcb_layer_group_t *g; if (intern_id > 0) { /* look for existing intern layer first */ @@ -282,7 +284,7 @@ } inhibit_notify++; - g = pcb_get_grp_new_intern_(pcb, stack, 0); + g = pcb_get_grp_new_intern_(pcb, 0); inhibit_notify--; g->intern_id = intern_id; NOTIFY(); @@ -289,11 +291,11 @@ return g; } -pcb_layer_group_t *pcb_get_grp_new_misc(pcb_board_t *pcb, pcb_layer_stack_t *stack) +pcb_layer_group_t *pcb_get_grp_new_misc(pcb_board_t *pcb) { pcb_layer_group_t *g; inhibit_notify++; - g = pcb_get_grp_new_intern_(pcb, stack, 1); + g = pcb_get_grp_new_intern_(pcb, 1); inhibit_notify--; NOTIFY(); return g; @@ -433,7 +435,7 @@ goto error; /* finalize group */ if (loc & PCB_LYT_INTERN) - g = pcb_get_grp_new_intern(pcb, LayerGroup, -1); + g = pcb_get_grp_new_intern(pcb, -1); else g = pcb_get_grp(LayerGroup, loc, PCB_LYT_COPPER); Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 7743) +++ trunk/src/layer_grp.h (revision 7744) @@ -132,8 +132,8 @@ /* for parsing old files with old layer descriptions, with no layer groups */ void pcb_layer_group_setup_default(pcb_layer_stack_t *newg); pcb_layer_group_t *pcb_get_grp(pcb_layer_stack_t *stack, pcb_layer_type_t loc, pcb_layer_type_t typ); -pcb_layer_group_t *pcb_get_grp_new_intern(pcb_board_t *pcb, pcb_layer_stack_t *stack, int intern_id); -pcb_layer_group_t *pcb_get_grp_new_misc(pcb_board_t *pcb, pcb_layer_stack_t *stack); +pcb_layer_group_t *pcb_get_grp_new_intern(pcb_board_t *pcb, int intern_id); +pcb_layer_group_t *pcb_get_grp_new_misc(pcb_board_t *pcb); /* ugly hack: remove the extra substrate we added after the outline layer */ void pcb_layergrp_fix_old_outline(pcb_board_t *pcb); Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 7743) +++ trunk/src_plugins/fontmode/fontmode.c (revision 7744) @@ -137,8 +137,8 @@ pcb_layergrp_inhibit_inc(); pcb_layers_reset(); pcb_layer_group_setup_default(&PCB->LayerGroups); - pcb_get_grp_new_intern(PCB, &PCB->LayerGroups, 1); - pcb_get_grp_new_intern(PCB, &PCB->LayerGroups, 2); + pcb_get_grp_new_intern(PCB, 1); + pcb_get_grp_new_intern(PCB, 2); assert(pcb_layergrp_list(PCB, PCB_LYT_COPPER, grp, 4) == 4); lfont = make_layer(grp[0], "Font"); Index: trunk/src_plugins/import_hyp/parser.c =================================================================== --- trunk/src_plugins/import_hyp/parser.c (revision 7743) +++ trunk/src_plugins/import_hyp/parser.c (revision 7744) @@ -795,7 +795,7 @@ /* create outline layer */ id = -1; - grp = pcb_get_grp_new_intern(PCB, &PCB->LayerGroups, -1); + grp = pcb_get_grp_new_intern(PCB, -1); if (grp != NULL) { id = pcb_layer_create(grp - PCB->LayerGroups.grp, "outline"); pcb_layergrp_fix_turn_to_outline(grp); @@ -873,7 +873,7 @@ } /* move old bottom layer to internal */ - grp = pcb_get_grp_new_intern(PCB, &PCB->LayerGroups, -1); + grp = pcb_get_grp_new_intern(PCB, -1); pcb_layer_move_to_group(PCB, bottom_layer_id, grp - PCB->LayerGroups.grp); /* created layer becomes new bottom layer */ Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 7743) +++ trunk/src_plugins/io_kicad/read.c (revision 7744) @@ -908,13 +908,13 @@ default: if (strcmp(lname, "Edge.Cuts") == 0) { /* Edge must be the outline */ - pcb_layer_group_t *g = pcb_get_grp_new_intern(PCB, &PCB->LayerGroups, -1); + pcb_layer_group_t *g = pcb_get_grp_new_intern(PCB, -1); pcb_layergrp_fix_turn_to_outline(g); id = pcb_layer_create(g - PCB->LayerGroups.grp, lname); } else if ((strcmp(ltype, "signal") == 0) || (strcmp(ltype, "power") == 0) || (strncmp(lname, "Dwgs.", 4) == 0) || (strncmp(lname, "Cmts.", 4) == 0) || (strncmp(lname, "Eco", 3) == 0)) { /* Create a new inner layer for signals and for emulating misc layers */ - pcb_layer_group_t *g = pcb_get_grp_new_intern(PCB, &PCB->LayerGroups, -1); + pcb_layer_group_t *g = pcb_get_grp_new_intern(PCB, -1); id = pcb_layer_create(g - PCB->LayerGroups.grp, lname); } else if ((lname[1] == '.') && ((lname[0] == 'F') || (lname[0] == 'B'))) { Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 7743) +++ trunk/src_plugins/io_lihata/read.c (revision 7744) @@ -749,7 +749,7 @@ else if (grp == top_silk) g = pcb_get_grp(&pcb->LayerGroups, PCB_LYT_TOP, PCB_LYT_COPPER); else - g = pcb_get_grp_new_intern(pcb, &pcb->LayerGroups, grp); + g = pcb_get_grp_new_intern(pcb, grp); /* pcb_trace(" add %ld\n", g - pcb->LayerGroups.grp);*/ pcb_layer_add_in_group_(pcb, g, g - pcb->LayerGroups.grp, n); if (strcmp(l->Name, "outline") == 0)