Index: eps.c =================================================================== --- eps.c (revision 37071) +++ eps.c (revision 37072) @@ -112,12 +112,12 @@ static rnd_hid_attr_val_t eps_values[NUM_OPTIONS]; -static const rnd_export_opt_t *eps_get_export_options(rnd_hid_t *hid, int *n) +static const rnd_export_opt_t *eps_get_export_options(rnd_hid_t *hid, int *n, rnd_design_t *dsg, void *appspec) { const char *val = eps_values[HA_psfile].str; - if ((PCB != NULL) && ((val == NULL) || (*val == '\0'))) - pcb_derive_default_filename(PCB->hidlib.loadname, &eps_values[HA_psfile], ".eps"); + if ((dsg != NULL) && ((val == NULL) || (*val == '\0'))) + pcb_derive_default_filename(dsg->loadname, &eps_values[HA_psfile], ".eps"); if (n) *n = NUM_OPTIONS; @@ -255,7 +255,7 @@ rnd_xform_t xform; if (!options) { - eps_get_export_options(hid, 0); + eps_get_export_options(hid, 0, design, appspec); options = eps_values; } Index: ps.c =================================================================== --- ps.c (revision 37071) +++ ps.c (revision 37072) @@ -315,12 +315,12 @@ int had_page; /* 1 if we ever wrote a page */ } global; -static const rnd_export_opt_t *ps_get_export_options(rnd_hid_t *hid, int *n) +static const rnd_export_opt_t *ps_get_export_options(rnd_hid_t *hid, int *n, rnd_design_t *dsg, void *appspec) { const char *val = global.ps_values[HA_psfile].str; - if ((PCB != NULL) && ((val == NULL) || (*val == '\0'))) - pcb_derive_default_filename(PCB->hidlib.loadname, &global.ps_values[HA_psfile], ".ps"); + if ((dsg != NULL) && ((val == NULL) || (*val == '\0'))) + pcb_derive_default_filename(dsg->loadname, &global.ps_values[HA_psfile], ".ps"); if (n) *n = NUM_OPTIONS; @@ -442,7 +442,7 @@ global.ovr_all = 0; if (!options) { - ps_get_export_options(hid, 0); + ps_get_export_options(hid, 0, design, appspec); options = global.ps_values; }