Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 25232) +++ trunk/src/file_act.c (revision 25233) @@ -295,7 +295,7 @@ a = args; a++; pcb_exporter->parse_arguments(&argc, &a); - pcb_exporter->do_export(NULL); + pcb_exporter->do_export(&PCB->hidlib, NULL); pcb_exporter = NULL; PCB_ACT_IRES(0); Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 25232) +++ trunk/src/hid.h (revision 25233) @@ -235,7 +235,7 @@ the choices made from the options returned from get_export_options. Call with options_ == NULL to start the primary GUI (create a main window, print, export, etc) */ - void (*do_export)(pcb_hid_attr_val_t *options); + void (*do_export)(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options); /* uninit a GUI hid */ void (*uninit)(pcb_hid_t *hid); Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 25232) +++ trunk/src/hid_nogui.c (revision 25233) @@ -61,7 +61,7 @@ return NULL; } -static void nogui_do_export(pcb_hid_attr_val_t * options) +static void nogui_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { CRASH("do_export"); } Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 25232) +++ trunk/src/main.c (revision 25233) @@ -674,7 +674,7 @@ pcb_message(PCB_MSG_WARNING, "Exporting empty board (nothing loaded or drawn).\n"); if (pcb_gui->set_hidlib != NULL) pcb_gui->set_hidlib(&PCB->hidlib); - pcb_gui->do_export(0); + pcb_gui->do_export(&PCB->hidlib, 0); log_print_uninit_errs("Exporting"); pcb_main_uninit(); exit(0); @@ -693,7 +693,7 @@ } if (pcb_gui->set_hidlib != NULL) pcb_gui->set_hidlib(&PCB->hidlib); - pcb_gui->do_export(0); + pcb_gui->do_export(&PCB->hidlib, 0); pcb_gui = pcb_next_gui; pcb_next_gui = NULL; if (pcb_gui != NULL) { Index: trunk/src_plugins/cam/cam.c =================================================================== --- trunk/src_plugins/cam/cam.c (revision 25232) +++ trunk/src_plugins/cam/cam.c (revision 25233) @@ -268,7 +268,7 @@ return 1; } -static void export_cam_do_export(pcb_hid_attr_val_t *options) +static void export_cam_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { if (!cam_export_has_outfile) cam_init_inst_fn(&cam_export_ctx); Index: trunk/src_plugins/cam/cam_compile.c =================================================================== --- trunk/src_plugins/cam/cam_compile.c (revision 25232) +++ trunk/src_plugins/cam/cam_compile.c (revision 25233) @@ -98,7 +98,7 @@ { /* call the exporter */ void *old_vars, *tmp; old_vars = pcb_cam_vars_use(ctx->vars); - ctx->exporter->do_export(0); + ctx->exporter->do_export(&PCB->hidlib, 0); tmp = pcb_cam_vars_use(old_vars); assert(tmp == ctx->vars); /* we must be restoring from our own context else the recursion is broken */ } Index: trunk/src_plugins/dialogs/dlg_export.c =================================================================== --- trunk/src_plugins/dialogs/dlg_export.c (revision 25232) +++ trunk/src_plugins/dialogs/dlg_export.c (revision 25233) @@ -26,6 +26,7 @@ #include "config.h" #include "actions.h" +#include "board.h" #include "hid.h" #include "hid_dad.h" #include "hid_init.h" @@ -71,7 +72,7 @@ for(h = 0; h < export_ctx->len; h++) { if (export_ctx->button[h] == wid) { pcb_hid_attr_val_t *results = get_results(export_ctx, h); - export_ctx->hid[h]->do_export(results); + export_ctx->hid[h]->do_export(&PCB->hidlib, results); free(results); pcb_message(PCB_MSG_INFO, "Export done using exporter: %s\n", export_ctx->hid[h]->name); return; Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 25232) +++ trunk/src_plugins/export_bboard/bboard.c (revision 25233) @@ -486,7 +486,7 @@ } -static void bboard_do_export(pcb_hid_attr_val_t * options) +static void bboard_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int i; int clr_r, clr_g, clr_b; Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 25232) +++ trunk/src_plugins/export_bom/bom.c (revision 25233) @@ -262,7 +262,7 @@ return 0; } -static void bom_do_export(pcb_hid_attr_val_t * options) +static void bom_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int i; Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 25232) +++ trunk/src_plugins/export_dsn/dsn.c (revision 25233) @@ -569,7 +569,7 @@ } -static void dsn_do_export(pcb_hid_attr_val_t * options) +static void dsn_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int i; if (!options) { Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 25232) +++ trunk/src_plugins/export_dxf/dxf.c (revision 25233) @@ -267,7 +267,7 @@ } extern const char dxf_templ_default_arr[]; -static void dxf_do_export(pcb_hid_attr_val_t * options) +static void dxf_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { const char *filename; int save_ons[PCB_MAX_LAYER + 2]; Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 25232) +++ trunk/src_plugins/export_excellon/excellon.c (revision 25233) @@ -201,7 +201,7 @@ return excellon_options; } -static void excellon_do_export(pcb_hid_attr_val_t * options) +static void excellon_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { const char *fnbase, *fn; char *filesuff; Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 25232) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 25233) @@ -164,7 +164,7 @@ free(msg); } -static void fidocadj_do_export(pcb_hid_attr_val_t * options) +static void fidocadj_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { FILE *f; const char *filename, *libfile; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 25232) +++ trunk/src_plugins/export_gcode/gcode.c (revision 25233) @@ -357,7 +357,7 @@ pcb_hid_expose_all(&gcode_hid, &ctx, NULL); } -static void gcode_do_export(pcb_hid_attr_val_t * options) +static void gcode_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int save_ons[PCB_MAX_LAYER + 2]; int i, idx; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 25232) +++ trunk/src_plugins/export_gerber/gerber.c (revision 25233) @@ -55,7 +55,7 @@ static pcb_cam_t gerber_cam; static pcb_hid_attribute_t *gerber_get_export_options(int *n); -static void gerber_do_export(pcb_hid_attr_val_t * options); +static void gerber_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options); static int gerber_parse_arguments(int *argc, char ***argv); static pcb_hid_gc_t gerber_make_gc(void); static void gerber_destroy_gc(pcb_hid_gc_t gc); @@ -537,7 +537,7 @@ gds_uninit(&tmp); } -static void gerber_do_export(pcb_hid_attr_val_t * options) +static void gerber_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { const char *fnbase; int i; Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 25232) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 25233) @@ -432,7 +432,7 @@ return pcb_hid_parse_command_line(argc, argv); } -static void ipcd356_do_export(pcb_hid_attr_val_t *options) +static void ipcd356_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int n; const char *fn; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 25232) +++ trunk/src_plugins/export_lpr/lpr.c (revision 25233) @@ -66,7 +66,7 @@ return lpr_options; } -static void lpr_do_export(pcb_hid_attr_val_t * options) +static void lpr_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { FILE *f; int i; Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 25232) +++ trunk/src_plugins/export_openems/export_openems.c (revision 25233) @@ -631,7 +631,7 @@ conf_update(NULL, -1); /* restore forced sets */ } -static void openems_do_export(pcb_hid_attr_val_t * options) +static void openems_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { const char *filename; char *runfn, *end; Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 25232) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 25233) @@ -293,7 +293,7 @@ } -static void openscad_do_export(pcb_hid_attr_val_t * options) +static void openscad_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { const char *filename; int save_ons[PCB_MAX_LAYER + 2]; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 25232) +++ trunk/src_plugins/export_png/png.c (revision 25233) @@ -988,7 +988,7 @@ pcb_hid_cache_color_destroy(&brush_cache, png_brush_free); } -static void png_do_export(pcb_hid_attr_val_t * options) +static void png_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int save_ons[PCB_MAX_LAYER + 2]; int i; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 25232) +++ trunk/src_plugins/export_ps/eps.c (revision 25233) @@ -32,7 +32,7 @@ /* Function prototypes */ /*----------------------------------------------------------------------------*/ static pcb_hid_attribute_t *eps_get_export_options(int *n); -static void eps_do_export(pcb_hid_attr_val_t * options); +static void eps_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options); static int eps_parse_arguments(int *argc, char ***argv); static int eps_set_layer_group(pcb_hidlib_t *hidlib, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform); static pcb_hid_gc_t eps_make_gc(void); @@ -333,7 +333,7 @@ options_ = NULL; } -static void eps_do_export(pcb_hid_attr_val_t * options) +static void eps_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int i; int save_ons[PCB_MAX_LAYER + 2]; Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 25232) +++ trunk/src_plugins/export_ps/ps.c (revision 25233) @@ -608,7 +608,7 @@ conf_update(NULL, -1); /* restore forced sets */ } -static void ps_do_export(pcb_hid_attr_val_t * options) +static void ps_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { FILE *fh; int save_ons[PCB_MAX_LAYER + 2]; Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 25232) +++ trunk/src_plugins/export_stat/stat.c (revision 25233) @@ -128,7 +128,7 @@ unsigned long int lines, arcs, polys, elements; } layer_stat_t; -static void stat_do_export(pcb_hid_attr_val_t * options) +static void stat_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { FILE *f; const char *filename; Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 25232) +++ trunk/src_plugins/export_svg/svg.c (revision 25233) @@ -312,7 +312,7 @@ fprintf(f, "\n"); } -static void svg_do_export(pcb_hid_attr_val_t * options) +static void svg_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { const char *filename; int save_ons[PCB_MAX_LAYER + 2]; Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 25232) +++ trunk/src_plugins/export_test/export_test.c (revision 25233) @@ -65,7 +65,7 @@ return 0; } -static void export_test_do_export(pcb_hid_attr_val_t * options) +static void export_test_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int i; Index: trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c =================================================================== --- trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c (revision 25232) +++ trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c (revision 25233) @@ -255,7 +255,7 @@ static char **fuse_argv; static int fuse_argc = 0; -static void export_vfs_fuse_do_export(pcb_hid_attr_val_t *options) +static void export_vfs_fuse_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { static struct fuse_operations oper; Index: trunk/src_plugins/export_vfs_mc/export_vfs_mc.c =================================================================== --- trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 25232) +++ trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 25233) @@ -104,7 +104,7 @@ } } -static void export_vfs_mc_do_export(pcb_hid_attr_val_t * options) +static void export_vfs_mc_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { const char *cmd; int i; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 25232) +++ trunk/src_plugins/export_xy/xy.c (revision 25233) @@ -771,7 +771,7 @@ return NULL; } -static void xy_do_export(pcb_hid_attr_val_t * options) +static void xy_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int i; template_t templ; Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 25232) +++ trunk/src_plugins/hid_batch/batch.c (revision 25233) @@ -151,7 +151,7 @@ /* ----------------------------------------------------------------------------- */ static int batch_stay; -static void batch_do_export(pcb_hid_attr_val_t * options) +static void batch_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { int interactive; char line[1000]; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 25232) +++ trunk/src_plugins/hid_lesstif/main.c (revision 25233) @@ -1358,7 +1358,7 @@ extern Widget lesstif_menubar; static int lesstif_hid_inited = 0; -static void lesstif_do_export(pcb_hid_attr_val_t * options) +static void lesstif_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { Dimension width, height; Widget menu; Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 25232) +++ trunk/src_plugins/hid_remote/remote.c (revision 25233) @@ -90,7 +90,7 @@ /* ----------------------------------------------------------------------------- */ static int remote_stay; -static void remote_do_export(pcb_hid_attr_val_t * options) +static void remote_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { pcb_hid_expose_ctx_t ctx; Index: trunk/src_plugins/lib_gtk_hid/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 25232) +++ trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 25233) @@ -148,9 +148,9 @@ } -void gtkhid_do_export(pcb_hid_attr_val_t *options) +void gtkhid_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options) { - gtkhid_begin(&PCB->hidlib); + gtkhid_begin(hidlib); pcb_hid_cfg_keys_init(&ghid_keymap); ghid_keymap.translate_key = ghid_translate_key; Index: trunk/src_plugins/lib_gtk_hid/glue_hid.h =================================================================== --- trunk/src_plugins/lib_gtk_hid/glue_hid.h (revision 25232) +++ trunk/src_plugins/lib_gtk_hid/glue_hid.h (revision 25233) @@ -1,6 +1,6 @@ #include "hid.h" void ghid_glue_hid_init(pcb_hid_t *dst); -void gtkhid_do_export(pcb_hid_attr_val_t *options); +void gtkhid_do_export(pcb_hidlib_t *hidlib, pcb_hid_attr_val_t *options); int gtkhid_parse_arguments(int *argc, char ***argv);