Index: src/conf.c =================================================================== --- src/conf.c (revision 3674) +++ src/conf.c (revision 3675) @@ -279,7 +279,7 @@ return 0; } -static const char *get_project_conf_name(const char *project_fn, const char *pcb_fn, const char **try) +const char *conf_get_project_conf_name(const char *project_fn, const char *pcb_fn, const char **try) { static char res[MAXPATHLEN]; static const char *project_name = "project.lht"; @@ -903,7 +903,7 @@ /* load config files */ conf_load_as(CFR_SYSTEM, PCBSHAREDIR "/pcb-conf.lht", 0); conf_load_as(CFR_USER, conf_user_fn, 0); - pc = get_project_conf_name(project_fn, pcb_fn, &try); + pc = conf_get_project_conf_name(project_fn, pcb_fn, &try); if (pc != NULL) conf_load_as(CFR_PROJECT, pc, 0); conf_merge_all(NULL); @@ -921,7 +921,7 @@ assert((project_fn != NULL) || (pcb_fn != NULL)); - pc = get_project_conf_name(project_fn, pcb_fn, &try); + pc = conf_get_project_conf_name(project_fn, pcb_fn, &try); if (pc != NULL) if (conf_load_as(CFR_PROJECT, pc, 0) != 0) pc = NULL; @@ -1484,7 +1484,7 @@ fn = conf_user_fn; break; case CFR_PROJECT: - fn = get_project_conf_name(project_fn, pcb_fn, &try); + fn = conf_get_project_conf_name(project_fn, pcb_fn, &try); if (fn == NULL) { Message(PCB_MSG_DEFAULT, "Error: can not save config to project file: %s does not exist - please create an empty file there first\n", try); return -1; Index: src/conf.h =================================================================== --- src/conf.h (revision 3674) +++ src/conf.h (revision 3675) @@ -352,4 +352,7 @@ fields depending on type */ int conf_parse_text(confitem_t *dst, int idx, conf_native_type_t type, const char *text, lht_node_t *err_node); +/* Determine the file name of the project file - project_fn and pcb_fn can be NULL */ +const char *conf_get_project_conf_name(const char *project_fn, const char *pcb_fn, const char **out_project_fn); + #endif