Index: board.c =================================================================== --- board.c (revision 37052) +++ board.c (revision 37053) @@ -57,7 +57,7 @@ free(pcb->line_mod_merge); free(pcb->hidlib.name); - free(pcb->hidlib.filename); + free(pcb->hidlib.loadname); free(pcb->PrintFilename); pcb_ratspatch_destroy(pcb); pcb_data_free(pcb->Data); @@ -147,10 +147,10 @@ if (dpcb == 0) { nw = PCB; - if (nw->hidlib.filename != NULL) { + if (nw->hidlib.loadname != NULL) { /* make sure the new PCB doesn't inherit the name and loader of the default pcb */ - free(nw->hidlib.filename); - nw->hidlib.filename = NULL; + free(nw->hidlib.loadname); + nw->hidlib.loadname = NULL; nw->Data->loader = NULL; } } @@ -251,7 +251,7 @@ const char *pcb_board_get_filename(void) { - return PCB->hidlib.filename; + return PCB->hidlib.loadname; } const char *pcb_board_get_name(void) Index: file_act.c =================================================================== --- file_act.c (revision 37052) +++ file_act.c (revision 37053) @@ -115,7 +115,7 @@ break; case F_Revert: - if (RND_ACT_DESIGN->filename && (!pcb->Changed || (rnd_hid_message_box(RND_ACT_DESIGN, "warning", "Revert: lose data", "Really revert all modifications?", "no", 0, "yes", 1, NULL) == 1))) + if (RND_ACT_DESIGN->loadname && (!pcb->Changed || (rnd_hid_message_box(RND_ACT_DESIGN, "warning", "Revert: lose data", "Really revert all modifications?", "no", 0, "yes", 1, NULL) == 1))) pcb_revert_pcb(); break; @@ -263,7 +263,7 @@ rnd_message(RND_MSG_ERROR, "SaveTo(Layout) doesn't take file name or format - did you mean SaveTo(LayoutAs)?\n"); return FGW_ERR_ARGC; } - if (pcb_save_pcb(RND_ACT_DESIGN->filename, NULL) == 0) + if (pcb_save_pcb(RND_ACT_DESIGN->loadname, NULL) == 0) pcb_board_set_changed_flag(PCB_ACT_BOARD, rnd_false); rnd_event(RND_ACT_DESIGN, RND_EVENT_DESIGN_FN_CHANGED, NULL); return 0; @@ -271,8 +271,8 @@ case F_LayoutAs: if (pcb_save_pcb(name, fmt) == 0) { pcb_board_set_changed_flag(PCB_ACT_BOARD, rnd_false); - free(RND_ACT_DESIGN->filename); - RND_ACT_DESIGN->filename = rnd_strdup(name); + free(RND_ACT_DESIGN->loadname); + RND_ACT_DESIGN->loadname = rnd_strdup(name); rnd_event(RND_ACT_DESIGN, RND_EVENT_DESIGN_FN_CHANGED, NULL); } return 0; Index: main.c =================================================================== --- main.c (revision 37052) +++ main.c (revision 37053) @@ -530,7 +530,7 @@ exit(1); } /* keep filename if load failed: file might not exist, save it by that name */ - PCB->hidlib.filename = rnd_strdup(command_line_pcb); + PCB->hidlib.loadname = rnd_strdup(command_line_pcb); } } Index: main_act.c =================================================================== --- main_act.c (revision 37052) +++ main_act.c (revision 37053) @@ -276,7 +276,7 @@ RND_ACT_CONVARG(1, FGW_STR, System, cmd = argv[1].val.str); RND_ACT_IRES(0); - rnd_setenv("PCB_RND_BOARD_FILE_NAME", RND_ACT_DESIGN->filename == NULL ? "" : RND_ACT_DESIGN->filename, 1); + rnd_setenv("PCB_RND_BOARD_FILE_NAME", RND_ACT_DESIGN->loadname == NULL ? "" : RND_ACT_DESIGN->loadname, 1); rnd_snprintf(tmp, sizeof(tmp), "%mm", pcb_crosshair.X); rnd_setenv("PCB_RND_CROSSHAIR_X_MM", tmp, 1); rnd_snprintf(tmp, sizeof(tmp), "%mm", pcb_crosshair.Y); Index: plug_io.c =================================================================== --- plug_io.c (revision 37052) +++ plug_io.c (revision 37053) @@ -372,9 +372,9 @@ int len; if (fmt == NULL) { - if (PCB->hidlib.filename != NULL) { /* have a file name, guess from extension */ - int fn_len = strlen(PCB->hidlib.filename); - const char *end = PCB->hidlib.filename + fn_len; + if (PCB->hidlib.loadname != NULL) { /* have a file name, guess from extension */ + int fn_len = strlen(PCB->hidlib.loadname); + const char *end = PCB->hidlib.loadname + fn_len; pcb_plug_io_t *n, *best = NULL; int best_score = 0; @@ -410,7 +410,7 @@ return NULL; } else { - if (PCB->hidlib.filename != NULL) + if (PCB->hidlib.loadname != NULL) rnd_message(RND_MSG_WARNING, "Saving a file with unknown format: failed to guess format from file name, falling back to %s as configured in rc/save_final_fallback_fmt\n", fmt); } } @@ -666,7 +666,7 @@ /* clear 'changed flag' */ pcb_board_set_changed_flag(PCB, rnd_false); - PCB->hidlib.filename = new_filename; + PCB->hidlib.loadname = new_filename; /* just in case a bad file saved file is loaded */ /* geda/pcb compatibility: use attribute PCB::grid::unit as unit, if present */ @@ -842,7 +842,7 @@ int pcb_revert_pcb(void) { - return real_load_pcb(PCB->hidlib.filename, NULL, rnd_true, rnd_true, 0); + return real_load_pcb(PCB->hidlib.loadname, NULL, rnd_true, rnd_true, 0); } int pcb_load_buffer(rnd_design_t *hidlib, pcb_buffer_t *buff, const char *fn, const char *fmt) Index: rats_patch.c =================================================================== --- rats_patch.c (revision 37052) +++ rats_patch.c (revision 37053) @@ -650,12 +650,12 @@ if (fn == NULL) { char *default_file; - if (PCB->hidlib.filename != NULL) { + if (PCB->hidlib.loadname != NULL) { char *end; int len; - len = strlen(PCB->hidlib.filename); + len = strlen(PCB->hidlib.loadname); default_file = malloc(len + 8); - memcpy(default_file, PCB->hidlib.filename, len + 1); + memcpy(default_file, PCB->hidlib.loadname, len + 1); end = strrchr(default_file, '.'); if ((end == NULL) || (rnd_strcasecmp(end, ".pcb") != 0)) end = default_file + len;