Index: eps.c =================================================================== --- eps.c (revision 33274) +++ eps.c (revision 33275) @@ -120,7 +120,9 @@ static rnd_export_opt_t *eps_get_export_options(rnd_hid_t *hid, int *n) { - if ((PCB != NULL) && (eps_attribute_list[HA_psfile].default_val.str == NULL)) + char **val = eps_attribute_list[HA_psfile].value; + + if ((PCB != NULL) && ((val == NULL) || (*val == NULL) || (**val == '\0'))) pcb_derive_default_filename(PCB->hidlib.filename, &eps_attribute_list[HA_psfile], ".eps"); if (n) @@ -309,14 +311,11 @@ static void eps_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { - int i; int save_ons[PCB_MAX_LAYER]; rnd_xform_t xform; if (!options) { eps_get_export_options(hid, 0); - for (i = 0; i < NUM_OPTIONS; i++) - eps_values[i] = eps_attribute_list[i].default_val; options = eps_values; } @@ -684,6 +683,7 @@ eps_hid.fill_rect = eps_fill_rect; eps_hid.calibrate = eps_calibrate; eps_hid.set_crosshair = eps_set_crosshair; + eps_hid.argument_array = eps_values; eps_hid.usage = eps_usage; Index: ps.c =================================================================== --- ps.c (revision 33274) +++ ps.c (revision 33275) @@ -341,7 +341,9 @@ static rnd_export_opt_t *ps_get_export_options(rnd_hid_t *hid, int *n) { - if ((PCB != NULL) && (ps_attribute_list[HA_psfile].default_val.str == NULL)) + char **val = ps_attribute_list[HA_psfile].value; + + if ((PCB != NULL) && ((val == NULL) || (*val == NULL) || (**val == '\0'))) pcb_derive_default_filename(PCB->hidlib.filename, &ps_attribute_list[HA_psfile], ".ps"); if (n) @@ -605,7 +607,6 @@ { FILE *fh; int save_ons[PCB_MAX_LAYER]; - int i; rnd_xform_t xform; global.ovr_all = 0; @@ -612,8 +613,6 @@ if (!options) { ps_get_export_options(hid, 0); - for (i = 0; i < NUM_OPTIONS; i++) - global.ps_values[i] = ps_attribute_list[i].default_val; options = global.ps_values; } @@ -1497,6 +1496,7 @@ ps_hid.description = "Postscript export"; ps_hid.exporter = 1; ps_hid.mask_invert = 1; + ps_hid.argument_array = global.ps_values; ps_hid.usage = ps_usage;