Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 13206) +++ trunk/src/board.c (revision 13207) @@ -213,13 +213,13 @@ return PCB_R_DIR_FOUND_CONTINUE; } -void pcb_board_count_holes(int *plated, int *unplated, const pcb_box_t * within_area) +void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const pcb_box_t *within_area) { HoleCountStruct hcs = { 0, 0 }; - pcb_r_search(PCB->Data->pin_tree, within_area, NULL, hole_counting_old_callback, &hcs, NULL); - pcb_r_search(PCB->Data->via_tree, within_area, NULL, hole_counting_old_callback, &hcs, NULL); - pcb_r_search(PCB->Data->padstack_tree, within_area, NULL, hole_counting_callback, &hcs, NULL); + pcb_r_search(pcb->Data->pin_tree, within_area, NULL, hole_counting_old_callback, &hcs, NULL); + pcb_r_search(pcb->Data->via_tree, within_area, NULL, hole_counting_old_callback, &hcs, NULL); + pcb_r_search(pcb->Data->padstack_tree, within_area, NULL, hole_counting_callback, &hcs, NULL); if (plated != NULL) *plated = hcs.nplated; Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 13206) +++ trunk/src/board.h (revision 13207) @@ -126,7 +126,7 @@ /* counts the number of plated and unplated holes in the design within a given area of the board. To count for the whole board, pass NULL within_area. */ -void pcb_board_count_holes(int *plated, int *unplated, const pcb_box_t * within_area); +void pcb_board_count_holes(pcb_board_t *pcb, int *plated, int *unplated, const pcb_box_t * within_area); #define PCB_SWAP_X(x) (PCB_SWAP_SIGN_X(x)) #define PCB_SWAP_Y(y) (PCB->MaxHeight +PCB_SWAP_SIGN_Y(y)) Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 13206) +++ trunk/src/draw.c (revision 13207) @@ -185,7 +185,7 @@ static void DrawEverything_holes(pcb_layergrp_id_t gid, const pcb_box_t *drawn_area) { int plated, unplated; - pcb_board_count_holes(&plated, &unplated, drawn_area); + pcb_board_count_holes(PCB, &plated, &unplated, drawn_area); if (plated && pcb_layer_gui_set_vlayer(PCB, PCB_VLY_PLATED_DRILL, 0)) { DrawHoles(pcb_true, pcb_false, drawn_area); Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 13206) +++ trunk/src_plugins/export_stat/stat.c (revision 13207) @@ -150,7 +150,7 @@ return; } - pcb_board_count_holes(&hp, &hup, NULL); + pcb_board_count_holes(PCB, &hp, &hup, NULL); pcb_print_utc(buff, sizeof(buff), 0); fprintf(f, "ha:pcb-rnd-board-stats-v1 {\n");