Index: eps.c =================================================================== --- eps.c (revision 26779) +++ eps.c (revision 26780) @@ -47,7 +47,7 @@ static void eps_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius); static void eps_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t * x, pcb_coord_t * y); static void eps_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy); -static void eps_calibrate(double xval, double yval); +static void eps_calibrate(pcb_hid_t *hid, double xval, double yval); static void eps_set_crosshair(pcb_coord_t x, pcb_coord_t y, int action); /*----------------------------------------------------------------------------*/ @@ -661,7 +661,7 @@ pcb_fprintf(f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); } -static void eps_calibrate(double xval, double yval) +static void eps_calibrate(pcb_hid_t *hid, double xval, double yval) { CRASH("eps_calibrate"); } Index: ps.c =================================================================== --- ps.c (revision 26779) +++ ps.c (revision 26780) @@ -1329,7 +1329,7 @@ return 1; } -void ps_calibrate_1(double xval, double yval, int use_command) +void ps_calibrate_1(pcb_hid_t *hid, double xval, double yval, int use_command) { pcb_hid_attr_val_t vals[3]; FILE *ps_cal_file; @@ -1396,9 +1396,9 @@ fclose(ps_cal_file); } -static void ps_calibrate(double xval, double yval) +static void ps_calibrate(pcb_hid_t *hid, double xval, double yval) { - ps_calibrate_1(xval, yval, 0); + ps_calibrate_1(hid, xval, yval, 0); } static void ps_set_crosshair(pcb_coord_t x, pcb_coord_t y, int action) @@ -1405,9 +1405,11 @@ { } +pcb_hid_t ps_hid; + static fgw_error_t pcb_act_PSCalib(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - ps_calibrate(0.0, 0.0); + ps_calibrate(&ps_hid, 0.0, 0.0); return 0; } @@ -1420,7 +1422,6 @@ #include "dolists.h" -pcb_hid_t ps_hid; static int ps_inited = 0; void ps_ps_init(pcb_hid_t * hid) { Index: ps.h =================================================================== --- ps.h (revision 26779) +++ ps.h (revision 26780) @@ -2,6 +2,6 @@ extern pcb_hid_t ps_hid; extern void ps_hid_export_to_file(FILE *, pcb_hid_attr_val_t *); extern void ps_start_file(FILE *); -extern void ps_calibrate_1(double, double, int); +extern void ps_calibrate_1(pcb_hid_t *hid, double, double, int); extern void hid_eps_init(); void ps_ps_init(pcb_hid_t * hid);